Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

WayzResponseInfo.cs 4.6KB

10 meses atrás
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. using GpsCardGatewayPosition.Common.Helper;
  2. using Newtonsoft.Json;
  3. namespace GpsCardGatewayPosition.Service.Biz.Location.Dto.Wayz
  4. {
  5. public class WayzResponseInfo
  6. {
  7. [JsonProperty("id")]
  8. [JsonConverter(typeof(StringJsonConvert))]
  9. public string Id { get; set; }
  10. [JsonProperty("asset")]
  11. [JsonConverter(typeof(StringJsonConvert))]
  12. public string Asset { get; set; }
  13. [JsonProperty("location")]
  14. public LocationDetail Location { get; set; }
  15. public class LocationDetail
  16. {
  17. [JsonProperty("timestamp")]
  18. [JsonConverter(typeof(StringJsonConvert))]
  19. public string Timestamp { get; set; }
  20. [JsonProperty("address")]
  21. public Address Address { get; set; }
  22. [JsonProperty("place")]
  23. public Place Place { get; set; }
  24. [JsonProperty("nearbyPlaces")]
  25. public List<NearbyPlace> NearbyPlaces { get; set; }
  26. [JsonProperty("position")]
  27. public Position Position { get; set; }
  28. }
  29. public class Address
  30. {
  31. [JsonProperty("name")]
  32. [JsonConverter(typeof(StringJsonConvert))]
  33. public string Name { get; set; }
  34. [JsonProperty("context")]
  35. public List<ContextItem> Context { get; set; }
  36. [JsonProperty("level")]
  37. [JsonConverter(typeof(StringJsonConvert))]
  38. public string Level { get; set; }
  39. }
  40. public class Place
  41. {
  42. [JsonProperty("type")]
  43. [JsonConverter(typeof(StringJsonConvert))]
  44. public string Type { get; set; }
  45. [JsonProperty("name")]
  46. [JsonConverter(typeof(StringJsonConvert))]
  47. public string Name { get; set; }
  48. [JsonProperty("categories")]
  49. public List<CategoryItem> Categories { get; set; }
  50. [JsonProperty("distance")]
  51. public Distance Distance { get; set; }
  52. }
  53. public class NearbyPlace
  54. {
  55. [JsonProperty("type")]
  56. public string Type { get; set; }
  57. [JsonProperty("name")]
  58. public string Name { get; set; }
  59. [JsonProperty("distance")]
  60. public Distance Distance { get; set; }
  61. }
  62. public class Position
  63. {
  64. [JsonProperty("timestamp")]
  65. [JsonConverter(typeof(StringJsonConvert))]
  66. public string Timestamp { get; set; }
  67. [JsonProperty("source")]
  68. [JsonConverter(typeof(StringJsonConvert))]
  69. public string Source { get; set; }
  70. [JsonProperty("spatialReference")]
  71. [JsonConverter(typeof(StringJsonConvert))]
  72. public string SpatialReference { get; set; } = string.Empty;
  73. [JsonProperty("accuracy")]
  74. // [JsonConverter(typeof(StringJsonConvert))]
  75. public float Accuracy { get; set; }
  76. [JsonProperty("confidence")]
  77. [JsonConverter(typeof(StringJsonConvert))]
  78. public string Confidence { get; set; } = string.Empty;
  79. [JsonProperty("point")]
  80. public Point Point { get; set; }
  81. }
  82. public class ContextItem
  83. {
  84. [JsonProperty("name")]
  85. [JsonConverter(typeof(StringJsonConvert))]
  86. public string Name { get; set; }
  87. [JsonProperty("type")]
  88. [JsonConverter(typeof(StringJsonConvert))]
  89. public string Type { get; set; }
  90. [JsonProperty("code")]
  91. [JsonConverter(typeof(StringJsonConvert))]
  92. public string Code { get; set; } = string.Empty;
  93. }
  94. public class CategoryItem
  95. {
  96. [JsonProperty("name")]
  97. [JsonConverter(typeof(StringJsonConvert))]
  98. public string Name { get; set; }
  99. [JsonProperty("id")]
  100. // [JsonConverter(typeof(StringJsonConvert))]
  101. public long Id { get; set; }
  102. }
  103. public class Distance
  104. {
  105. [JsonProperty("line")]
  106. //[JsonConverter(typeof(StringJsonConvert))]
  107. public double Line { get; set; } = default;
  108. }
  109. public class Point
  110. {
  111. [JsonProperty("longitude")]
  112. //[JsonConverter(typeof(StringJsonConvert))]
  113. public double Longitude { get; set; }
  114. [JsonProperty("latitude")]
  115. // [JsonConverter(typeof(StringJsonConvert))]
  116. public double Latitude { get; set; }
  117. [JsonProperty("altitude")]
  118. // [JsonConverter(typeof(StringJsonConvert))]
  119. public double Altitude { get; set; }
  120. }
  121. }
  122. }