SessionModel.cs 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  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 SessionModel {
  13. /// <summary>
  14. /// The Name of the App you want to deploy, example: supermario
  15. /// </summary>
  16. /// <value>The Name of the App you want to deploy, example: supermario</value>
  17. [DataMember(Name="app_name", EmitDefaultValue=false)]
  18. [JsonProperty(PropertyName = "app_name")]
  19. public string AppName { get; set; }
  20. /// <summary>
  21. /// The Name of the App Version you want to deploy, example: v1.0
  22. /// </summary>
  23. /// <value>The Name of the App Version you want to deploy, example: v1.0</value>
  24. [DataMember(Name="version_name", EmitDefaultValue=false)]
  25. [JsonProperty(PropertyName = "version_name")]
  26. public string VersionName { get; set; }
  27. /// <summary>
  28. /// The List of IP of your user, Array of String, example: [\"162.254.103.13\",\"198.12.116.39\", \"162.254.135.39\", \"162.254.129.34\"]
  29. /// </summary>
  30. /// <value>The List of IP of your user, Array of String, example: [\"162.254.103.13\",\"198.12.116.39\", \"162.254.135.39\", \"162.254.129.34\"]</value>
  31. [DataMember(Name="ip_list", EmitDefaultValue=false)]
  32. [JsonProperty(PropertyName = "ip_list")]
  33. public List<string> IpList { get; set; }
  34. /// <summary>
  35. /// The list of IP of your user with their location (latitude, longitude)
  36. /// </summary>
  37. /// <value>The list of IP of your user with their location (latitude, longitude)</value>
  38. [DataMember(Name="geo_ip_list", EmitDefaultValue=false)]
  39. [JsonProperty(PropertyName = "geo_ip_list")]
  40. public List<GeoIpListModel> GeoIpList { get; set; }
  41. /// <summary>
  42. /// The request id of your deployment. If specified, the session will link to the deployment
  43. /// </summary>
  44. /// <value>The request id of your deployment. If specified, the session will link to the deployment</value>
  45. [DataMember(Name="deployment_request_id", EmitDefaultValue=false)]
  46. [JsonProperty(PropertyName = "deployment_request_id")]
  47. public string DeploymentRequestId { get; set; }
  48. /// <summary>
  49. /// If you want to specify a centroid for your session.
  50. /// </summary>
  51. /// <value>If you want to specify a centroid for your session.</value>
  52. [DataMember(Name="location", EmitDefaultValue=false)]
  53. [JsonProperty(PropertyName = "location")]
  54. public LocationModel Location { get; set; }
  55. /// <summary>
  56. /// If you want your session in a specific city
  57. /// </summary>
  58. /// <value>If you want your session in a specific city</value>
  59. [DataMember(Name="city", EmitDefaultValue=false)]
  60. [JsonProperty(PropertyName = "city")]
  61. public string City { get; set; }
  62. /// <summary>
  63. /// If you want your session in a specific country
  64. /// </summary>
  65. /// <value>If you want your session in a specific country</value>
  66. [DataMember(Name="country", EmitDefaultValue=false)]
  67. [JsonProperty(PropertyName = "country")]
  68. public string Country { get; set; }
  69. /// <summary>
  70. /// If you want your session in a specific continent
  71. /// </summary>
  72. /// <value>If you want your session in a specific continent</value>
  73. [DataMember(Name="continent", EmitDefaultValue=false)]
  74. [JsonProperty(PropertyName = "continent")]
  75. public string Continent { get; set; }
  76. /// <summary>
  77. /// If you want your session in a specific administrative division
  78. /// </summary>
  79. /// <value>If you want your session in a specific administrative division</value>
  80. [DataMember(Name="administrative_division", EmitDefaultValue=false)]
  81. [JsonProperty(PropertyName = "administrative_division")]
  82. public string AdministrativeDivision { get; set; }
  83. /// <summary>
  84. /// If you want your session in a specific region
  85. /// </summary>
  86. /// <value>If you want your session in a specific region</value>
  87. [DataMember(Name="region", EmitDefaultValue=false)]
  88. [JsonProperty(PropertyName = "region")]
  89. public string Region { get; set; }
  90. /// <summary>
  91. /// List of Selectors to filter potential Deployment to link and tag the Session
  92. /// </summary>
  93. /// <value>List of Selectors to filter potential Deployment to link and tag the Session</value>
  94. [DataMember(Name="selectors", EmitDefaultValue=false)]
  95. [JsonProperty(PropertyName = "selectors")]
  96. public List<SelectorModel> Selectors { get; set; }
  97. /// <summary>
  98. /// Get the string presentation of the object
  99. /// </summary>
  100. /// <returns>String presentation of the object</returns>
  101. public override string ToString() {
  102. StringBuilder sb = new StringBuilder();
  103. sb.Append("class SessionModel {\n");
  104. sb.Append(" AppName: ").Append(AppName).Append("\n");
  105. sb.Append(" VersionName: ").Append(VersionName).Append("\n");
  106. sb.Append(" IpList: ").Append(IpList).Append("\n");
  107. sb.Append(" GeoIpList: ").Append(GeoIpList).Append("\n");
  108. sb.Append(" DeploymentRequestId: ").Append(DeploymentRequestId).Append("\n");
  109. sb.Append(" Location: ").Append(Location).Append("\n");
  110. sb.Append(" City: ").Append(City).Append("\n");
  111. sb.Append(" Country: ").Append(Country).Append("\n");
  112. sb.Append(" Continent: ").Append(Continent).Append("\n");
  113. sb.Append(" AdministrativeDivision: ").Append(AdministrativeDivision).Append("\n");
  114. sb.Append(" Region: ").Append(Region).Append("\n");
  115. sb.Append(" Selectors: ").Append(Selectors).Append("\n");
  116. sb.Append("}\n");
  117. return sb.ToString();
  118. }
  119. /// <summary>
  120. /// Get the JSON string presentation of the object
  121. /// </summary>
  122. /// <returns>JSON string presentation of the object</returns>
  123. public string ToJson() {
  124. return JsonConvert.SerializeObject(this, Formatting.Indented);
  125. }
  126. }
  127. }