- using GpsCardGatewayPosition.Common.Helper;
- using Newtonsoft.Json;
-
-
- namespace GpsCardGatewayPosition.Service.Biz.Location.Dto.Wayz
- {
- public class WayzResponseInfo
- {
- [JsonProperty("id")]
- [JsonConverter(typeof(StringJsonConvert))]
- public string Id { get; set; }
-
- [JsonProperty("asset")]
- [JsonConverter(typeof(StringJsonConvert))]
- public string Asset { get; set; }
-
- [JsonProperty("location")]
- public LocationDetail Location { get; set; }
-
-
- public class LocationDetail
- {
- [JsonProperty("timestamp")]
- [JsonConverter(typeof(StringJsonConvert))]
- public string Timestamp { get; set; }
-
- [JsonProperty("address")]
- public Address Address { get; set; }
-
- [JsonProperty("place")]
- public Place Place { get; set; }
-
- [JsonProperty("nearbyPlaces")]
- public List<NearbyPlace> NearbyPlaces { get; set; }
-
- [JsonProperty("position")]
- public Position Position { get; set; }
-
- }
-
- public class Address
- {
- [JsonProperty("name")]
- [JsonConverter(typeof(StringJsonConvert))]
- public string Name { get; set; }
- [JsonProperty("context")]
- public List<ContextItem> Context { get; set; }
-
- [JsonProperty("level")]
- [JsonConverter(typeof(StringJsonConvert))]
- public string Level { get; set; }
- }
-
- public class Place
- {
- [JsonProperty("type")]
- [JsonConverter(typeof(StringJsonConvert))]
- public string Type { get; set; }
-
- [JsonProperty("name")]
- [JsonConverter(typeof(StringJsonConvert))]
- public string Name { get; set; }
-
- [JsonProperty("categories")]
- public List<CategoryItem> Categories { get; set; }
-
- [JsonProperty("distance")]
- public Distance Distance { get; set; }
- }
-
-
-
- public class NearbyPlace
- {
- [JsonProperty("type")]
- public string Type { get; set; }
- [JsonProperty("name")]
- public string Name { get; set; }
- [JsonProperty("distance")]
- public Distance Distance { get; set; }
- }
-
- public class Position
- {
- [JsonProperty("timestamp")]
- [JsonConverter(typeof(StringJsonConvert))]
- public string Timestamp { get; set; }
-
- [JsonProperty("source")]
- [JsonConverter(typeof(StringJsonConvert))]
- public string Source { get; set; }
-
- [JsonProperty("spatialReference")]
- [JsonConverter(typeof(StringJsonConvert))]
- public string SpatialReference { get; set; } = string.Empty;
-
- [JsonProperty("accuracy")]
- // [JsonConverter(typeof(StringJsonConvert))]
- public float Accuracy { get; set; }
- [JsonProperty("confidence")]
- [JsonConverter(typeof(StringJsonConvert))]
- public string Confidence { get; set; } = string.Empty;
-
- [JsonProperty("point")]
- public Point Point { get; set; }
- }
-
- public class ContextItem
- {
- [JsonProperty("name")]
- [JsonConverter(typeof(StringJsonConvert))]
- public string Name { get; set; }
-
- [JsonProperty("type")]
- [JsonConverter(typeof(StringJsonConvert))]
- public string Type { get; set; }
-
- [JsonProperty("code")]
- [JsonConverter(typeof(StringJsonConvert))]
- public string Code { get; set; } = string.Empty;
-
-
- }
-
- public class CategoryItem
- {
-
-
- [JsonProperty("name")]
- [JsonConverter(typeof(StringJsonConvert))]
- public string Name { get; set; }
-
- [JsonProperty("id")]
- // [JsonConverter(typeof(StringJsonConvert))]
- public long Id { get; set; }
-
- }
-
- public class Distance
- {
- [JsonProperty("line")]
- //[JsonConverter(typeof(StringJsonConvert))]
- public double Line { get; set; } = default;
- }
-
- public class Point
- {
- [JsonProperty("longitude")]
- //[JsonConverter(typeof(StringJsonConvert))]
- public double Longitude { get; set; }
-
- [JsonProperty("latitude")]
- // [JsonConverter(typeof(StringJsonConvert))]
- public double Latitude { get; set; }
-
- [JsonProperty("altitude")]
- // [JsonConverter(typeof(StringJsonConvert))]
- public double Altitude { get; set; }
- }
- }
- }
|