LocationModel.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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 LocationModel {
  13. /// <summary>
  14. /// Latitude
  15. /// </summary>
  16. /// <value>Latitude</value>
  17. [DataMember(Name="latitude", EmitDefaultValue=false)]
  18. [JsonProperty(PropertyName = "latitude")]
  19. public decimal? Latitude { get; set; }
  20. /// <summary>
  21. /// Longitude
  22. /// </summary>
  23. /// <value>Longitude</value>
  24. [DataMember(Name="longitude", EmitDefaultValue=false)]
  25. [JsonProperty(PropertyName = "longitude")]
  26. public decimal? Longitude { get; set; }
  27. /// <summary>
  28. /// Get the string presentation of the object
  29. /// </summary>
  30. /// <returns>String presentation of the object</returns>
  31. public override string ToString() {
  32. StringBuilder sb = new StringBuilder();
  33. sb.Append("class LocationModel {\n");
  34. sb.Append(" Latitude: ").Append(Latitude).Append("\n");
  35. sb.Append(" Longitude: ").Append(Longitude).Append("\n");
  36. sb.Append("}\n");
  37. return sb.ToString();
  38. }
  39. /// <summary>
  40. /// Get the JSON string presentation of the object
  41. /// </summary>
  42. /// <returns>JSON string presentation of the object</returns>
  43. public string ToJson() {
  44. return JsonConvert.SerializeObject(this, Formatting.Indented);
  45. }
  46. }
  47. }