Inital work on breaking out the core logic out of the MVC API Web App in preparation to migrating to minimal API's in a seperate project
This commit is contained in:
50
AS1024.GeoFeed.Models/GeoFeed.cs
Normal file
50
AS1024.GeoFeed.Models/GeoFeed.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
using System.Text.Json.Serialization;
|
||||
namespace AS1024.GeoFeed.Models
|
||||
{
|
||||
public class NetboxData
|
||||
{
|
||||
public List<Result>? Results { get; set; }
|
||||
public string? Next { get; set; }
|
||||
public string? Previous { get; set; }
|
||||
}
|
||||
|
||||
public class Result
|
||||
{
|
||||
public string? Prefix { get; set; }
|
||||
public CustomFields? CustomFields { get; set; }
|
||||
}
|
||||
|
||||
public class CustomFields
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents the city associated with the IP address. This field is optional.
|
||||
/// </summary>
|
||||
public string? GeolocCity { get; set; }
|
||||
/// <summary>
|
||||
/// Represents the country associated with the IP address. This field is optional and expected to be a selection field in NetBox.
|
||||
/// </summary>
|
||||
public string? GeolocCountry { get; set; }
|
||||
/// <summary>
|
||||
/// Indicates whether geolocation data is available for the IP address. This field is required.
|
||||
/// </summary>
|
||||
public bool? GeolocHasLocation { get; set; }
|
||||
/// <summary>
|
||||
/// Represents the region or state associated with the IP address. This field is optional and expected to be a selection field in NetBox.
|
||||
/// </summary>
|
||||
public string? GeolocRegion { get; set; }
|
||||
/// <summary>
|
||||
/// Represents the postal code associated with the IP address. This field is optional.
|
||||
/// </summary>
|
||||
public string? GeolocPostalCode { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This class represents the IP GeoFeed Entry
|
||||
/// </summary>
|
||||
public class IPGeoFeed : CustomFields {
|
||||
/// <summary>
|
||||
/// Represents the IP Prefix for the associated GeoFeed entry
|
||||
/// </summary>
|
||||
public string? Prefix { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user