Location.cs 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. using System;
  2. using System.Text;
  3. using System.Collections;
  4. using System.Collections.Generic;
  5. using System.Runtime.Serialization;
  6. using Newtonsoft.Json;
  7. namespace IO.Swagger.Model {
  8. /// <summary>
  9. ///
  10. /// </summary>
  11. [DataContract]
  12. public class Location {
  13. /// <summary>
  14. /// City Name
  15. /// </summary>
  16. /// <value>City Name</value>
  17. [DataMember(Name="city", EmitDefaultValue=false)]
  18. [JsonProperty(PropertyName = "city")]
  19. public string City { get; set; }
  20. /// <summary>
  21. /// Continent Name
  22. /// </summary>
  23. /// <value>Continent Name</value>
  24. [DataMember(Name="continent", EmitDefaultValue=false)]
  25. [JsonProperty(PropertyName = "continent")]
  26. public string Continent { get; set; }
  27. /// <summary>
  28. /// Country name
  29. /// </summary>
  30. /// <value>Country name</value>
  31. [DataMember(Name="country", EmitDefaultValue=false)]
  32. [JsonProperty(PropertyName = "country")]
  33. public string Country { get; set; }
  34. /// <summary>
  35. /// Timezone name
  36. /// </summary>
  37. /// <value>Timezone name</value>
  38. [DataMember(Name="timezone", EmitDefaultValue=false)]
  39. [JsonProperty(PropertyName = "timezone")]
  40. public string Timezone { get; set; }
  41. /// <summary>
  42. /// Administrative Division
  43. /// </summary>
  44. /// <value>Administrative Division</value>
  45. [DataMember(Name="administrative_division", EmitDefaultValue=false)]
  46. [JsonProperty(PropertyName = "administrative_division")]
  47. public string AdministrativeDivision { get; set; }
  48. /// <summary>
  49. /// The Latitude in decimal
  50. /// </summary>
  51. /// <value>The Latitude in decimal</value>
  52. [DataMember(Name="latitude", EmitDefaultValue=false)]
  53. [JsonProperty(PropertyName = "latitude")]
  54. public decimal? Latitude { get; set; }
  55. /// <summary>
  56. /// The Longitude in decimal
  57. /// </summary>
  58. /// <value>The Longitude in decimal</value>
  59. [DataMember(Name="longitude", EmitDefaultValue=false)]
  60. [JsonProperty(PropertyName = "longitude")]
  61. public decimal? Longitude { get; set; }
  62. /// <summary>
  63. /// The type of location
  64. /// </summary>
  65. /// <value>The type of location</value>
  66. [DataMember(Name="type", EmitDefaultValue=false)]
  67. [JsonProperty(PropertyName = "type")]
  68. public string Type { get; set; }
  69. /// <summary>
  70. /// Get the string presentation of the object
  71. /// </summary>
  72. /// <returns>String presentation of the object</returns>
  73. public override string ToString() {
  74. StringBuilder sb = new StringBuilder();
  75. sb.Append("class Location {\n");
  76. sb.Append(" City: ").Append(City).Append("\n");
  77. sb.Append(" Continent: ").Append(Continent).Append("\n");
  78. sb.Append(" Country: ").Append(Country).Append("\n");
  79. sb.Append(" Timezone: ").Append(Timezone).Append("\n");
  80. sb.Append(" AdministrativeDivision: ").Append(AdministrativeDivision).Append("\n");
  81. sb.Append(" Latitude: ").Append(Latitude).Append("\n");
  82. sb.Append(" Longitude: ").Append(Longitude).Append("\n");
  83. sb.Append(" Type: ").Append(Type).Append("\n");
  84. sb.Append("}\n");
  85. return sb.ToString();
  86. }
  87. /// <summary>
  88. /// Get the JSON string presentation of the object
  89. /// </summary>
  90. /// <returns>JSON string presentation of the object</returns>
  91. public string ToJson() {
  92. return JsonConvert.SerializeObject(this, Formatting.Indented);
  93. }
  94. }
  95. }