Status.cs 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  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 Status {
  13. /// <summary>
  14. /// The Unique ID of the Deployment's request
  15. /// </summary>
  16. /// <value>The Unique ID of the Deployment's request</value>
  17. [DataMember(Name="request_id", EmitDefaultValue=false)]
  18. [JsonProperty(PropertyName = "request_id")]
  19. public string RequestId { get; set; }
  20. /// <summary>
  21. /// The FQDN that allow to connect to your Deployment
  22. /// </summary>
  23. /// <value>The FQDN that allow to connect to your Deployment</value>
  24. [DataMember(Name="fqdn", EmitDefaultValue=false)]
  25. [JsonProperty(PropertyName = "fqdn")]
  26. public string Fqdn { get; set; }
  27. /// <summary>
  28. /// The name of the deployed App
  29. /// </summary>
  30. /// <value>The name of the deployed App</value>
  31. [DataMember(Name="app_name", EmitDefaultValue=false)]
  32. [JsonProperty(PropertyName = "app_name")]
  33. public string AppName { get; set; }
  34. /// <summary>
  35. /// The version of the deployed App
  36. /// </summary>
  37. /// <value>The version of the deployed App</value>
  38. [DataMember(Name="app_version", EmitDefaultValue=false)]
  39. [JsonProperty(PropertyName = "app_version")]
  40. public string AppVersion { get; set; }
  41. /// <summary>
  42. /// The current status of the Deployment
  43. /// </summary>
  44. /// <value>The current status of the Deployment</value>
  45. [DataMember(Name="current_status", EmitDefaultValue=false)]
  46. [JsonProperty(PropertyName = "current_status")]
  47. public string CurrentStatus { get; set; }
  48. /// <summary>
  49. /// True if the current Deployment is ready to be connected and running
  50. /// </summary>
  51. /// <value>True if the current Deployment is ready to be connected and running</value>
  52. [DataMember(Name="running", EmitDefaultValue=false)]
  53. [JsonProperty(PropertyName = "running")]
  54. public bool? Running { get; set; }
  55. /// <summary>
  56. /// True if the current Deployment is ACL protected
  57. /// </summary>
  58. /// <value>True if the current Deployment is ACL protected</value>
  59. [DataMember(Name="whitelisting_active", EmitDefaultValue=false)]
  60. [JsonProperty(PropertyName = "whitelisting_active")]
  61. public bool? WhitelistingActive { get; set; }
  62. /// <summary>
  63. /// Timestamp of the Deployment when it is up and running
  64. /// </summary>
  65. /// <value>Timestamp of the Deployment when it is up and running</value>
  66. [DataMember(Name="start_time", EmitDefaultValue=false)]
  67. [JsonProperty(PropertyName = "start_time")]
  68. public string StartTime { get; set; }
  69. /// <summary>
  70. /// Timestamp of the end of the Deployment
  71. /// </summary>
  72. /// <value>Timestamp of the end of the Deployment</value>
  73. [DataMember(Name="removal_time", EmitDefaultValue=false)]
  74. [JsonProperty(PropertyName = "removal_time")]
  75. public string RemovalTime { get; set; }
  76. /// <summary>
  77. /// Time since the Deployment is up and running in seconds
  78. /// </summary>
  79. /// <value>Time since the Deployment is up and running in seconds</value>
  80. [DataMember(Name="elapsed_time", EmitDefaultValue=false)]
  81. [JsonProperty(PropertyName = "elapsed_time")]
  82. public int? ElapsedTime { get; set; }
  83. /// <summary>
  84. /// The last status of the Deployment
  85. /// </summary>
  86. /// <value>The last status of the Deployment</value>
  87. [DataMember(Name="last_status", EmitDefaultValue=false)]
  88. [JsonProperty(PropertyName = "last_status")]
  89. public string LastStatus { get; set; }
  90. /// <summary>
  91. /// True if there is an error with the Deployment
  92. /// </summary>
  93. /// <value>True if there is an error with the Deployment</value>
  94. [DataMember(Name="error", EmitDefaultValue=false)]
  95. [JsonProperty(PropertyName = "error")]
  96. public bool? Error { get; set; }
  97. /// <summary>
  98. /// The error details of the Deployment
  99. /// </summary>
  100. /// <value>The error details of the Deployment</value>
  101. [DataMember(Name="error_detail", EmitDefaultValue=false)]
  102. [JsonProperty(PropertyName = "error_detail")]
  103. public string ErrorDetail { get; set; }
  104. /// <summary>
  105. /// Gets or Sets Ports
  106. /// </summary>
  107. [DataMember(Name="ports", EmitDefaultValue=false)]
  108. [JsonProperty(PropertyName = "ports")]
  109. public Dictionary<string, PortMapping> Ports { get; set; }
  110. /// <summary>
  111. /// The public IP
  112. /// </summary>
  113. /// <value>The public IP</value>
  114. [DataMember(Name="public_ip", EmitDefaultValue=false)]
  115. [JsonProperty(PropertyName = "public_ip")]
  116. public string PublicIp { get; set; }
  117. /// <summary>
  118. /// List of Active Sessions if Deployment App is Session Based
  119. /// </summary>
  120. /// <value>List of Active Sessions if Deployment App is Session Based</value>
  121. [DataMember(Name="sessions", EmitDefaultValue=false)]
  122. [JsonProperty(PropertyName = "sessions")]
  123. public List<DeploymentSessionContext> Sessions { get; set; }
  124. /// <summary>
  125. /// Location related information
  126. /// </summary>
  127. /// <value>Location related information</value>
  128. [DataMember(Name="location", EmitDefaultValue=false)]
  129. [JsonProperty(PropertyName = "location")]
  130. public DeploymentLocation Location { get; set; }
  131. /// <summary>
  132. /// List of tags associated with the deployment
  133. /// </summary>
  134. /// <value>List of tags associated with the deployment</value>
  135. [DataMember(Name="tags", EmitDefaultValue=false)]
  136. [JsonProperty(PropertyName = "tags")]
  137. public List<string> Tags { get; set; }
  138. /// <summary>
  139. /// The Capacity of the Deployment
  140. /// </summary>
  141. /// <value>The Capacity of the Deployment</value>
  142. [DataMember(Name="sockets", EmitDefaultValue=false)]
  143. [JsonProperty(PropertyName = "sockets")]
  144. public int? Sockets { get; set; }
  145. /// <summary>
  146. /// The Capacity Usage of the Deployment
  147. /// </summary>
  148. /// <value>The Capacity Usage of the Deployment</value>
  149. [DataMember(Name="sockets_usage", EmitDefaultValue=false)]
  150. [JsonProperty(PropertyName = "sockets_usage")]
  151. public int? SocketsUsage { get; set; }
  152. /// <summary>
  153. /// Get the string presentation of the object
  154. /// </summary>
  155. /// <returns>String presentation of the object</returns>
  156. public override string ToString() {
  157. StringBuilder sb = new StringBuilder();
  158. sb.Append("class Status {\n");
  159. sb.Append(" RequestId: ").Append(RequestId).Append("\n");
  160. sb.Append(" Fqdn: ").Append(Fqdn).Append("\n");
  161. sb.Append(" AppName: ").Append(AppName).Append("\n");
  162. sb.Append(" AppVersion: ").Append(AppVersion).Append("\n");
  163. sb.Append(" CurrentStatus: ").Append(CurrentStatus).Append("\n");
  164. sb.Append(" Running: ").Append(Running).Append("\n");
  165. sb.Append(" WhitelistingActive: ").Append(WhitelistingActive).Append("\n");
  166. sb.Append(" StartTime: ").Append(StartTime).Append("\n");
  167. sb.Append(" RemovalTime: ").Append(RemovalTime).Append("\n");
  168. sb.Append(" ElapsedTime: ").Append(ElapsedTime).Append("\n");
  169. sb.Append(" LastStatus: ").Append(LastStatus).Append("\n");
  170. sb.Append(" Error: ").Append(Error).Append("\n");
  171. sb.Append(" ErrorDetail: ").Append(ErrorDetail).Append("\n");
  172. sb.Append(" Ports: ").Append(Ports).Append("\n");
  173. sb.Append(" PublicIp: ").Append(PublicIp).Append("\n");
  174. sb.Append(" Sessions: ").Append(Sessions).Append("\n");
  175. sb.Append(" Location: ").Append(Location).Append("\n");
  176. sb.Append(" Tags: ").Append(Tags).Append("\n");
  177. sb.Append(" Sockets: ").Append(Sockets).Append("\n");
  178. sb.Append(" SocketsUsage: ").Append(SocketsUsage).Append("\n");
  179. sb.Append("}\n");
  180. return sb.ToString();
  181. }
  182. /// <summary>
  183. /// Get the JSON string presentation of the object
  184. /// </summary>
  185. /// <returns>JSON string presentation of the object</returns>
  186. public string ToJson() {
  187. return JsonConvert.SerializeObject(this, Formatting.Indented);
  188. }
  189. }
  190. }