AppVersion.cs 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  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 AppVersion {
  13. /// <summary>
  14. /// The Version Name
  15. /// </summary>
  16. /// <value>The Version Name</value>
  17. [DataMember(Name="name", EmitDefaultValue=false)]
  18. [JsonProperty(PropertyName = "name")]
  19. public string Name { get; set; }
  20. /// <summary>
  21. /// If the Version is active currently in the system
  22. /// </summary>
  23. /// <value>If the Version is active currently in the system</value>
  24. [DataMember(Name="is_active", EmitDefaultValue=false)]
  25. [JsonProperty(PropertyName = "is_active")]
  26. public bool? IsActive { get; set; }
  27. /// <summary>
  28. /// The Repository where the image is (i.e. 'harbor.edgegap.com' or 'docker.io')
  29. /// </summary>
  30. /// <value>The Repository where the image is (i.e. 'harbor.edgegap.com' or 'docker.io')</value>
  31. [DataMember(Name="docker_repository", EmitDefaultValue=false)]
  32. [JsonProperty(PropertyName = "docker_repository")]
  33. public string DockerRepository { get; set; }
  34. /// <summary>
  35. /// The name of your image (i.e. 'edgegap/demo')
  36. /// </summary>
  37. /// <value>The name of your image (i.e. 'edgegap/demo')</value>
  38. [DataMember(Name="docker_image", EmitDefaultValue=false)]
  39. [JsonProperty(PropertyName = "docker_image")]
  40. public string DockerImage { get; set; }
  41. /// <summary>
  42. /// The tag of your image (i.e. '0.1.2')
  43. /// </summary>
  44. /// <value>The tag of your image (i.e. '0.1.2')</value>
  45. [DataMember(Name="docker_tag", EmitDefaultValue=false)]
  46. [JsonProperty(PropertyName = "docker_tag")]
  47. public string DockerTag { get; set; }
  48. /// <summary>
  49. /// The username to access the docker repository
  50. /// </summary>
  51. /// <value>The username to access the docker repository</value>
  52. [DataMember(Name="private_username", EmitDefaultValue=false)]
  53. [JsonProperty(PropertyName = "private_username")]
  54. public string PrivateUsername { get; set; }
  55. /// <summary>
  56. /// The Private Password or Token of the username (We recommend to use a token)
  57. /// </summary>
  58. /// <value>The Private Password or Token of the username (We recommend to use a token)</value>
  59. [DataMember(Name="private_token", EmitDefaultValue=false)]
  60. [JsonProperty(PropertyName = "private_token")]
  61. public string PrivateToken { get; set; }
  62. /// <summary>
  63. /// Units of vCPU needed (1024= 1vcpu)
  64. /// </summary>
  65. /// <value>Units of vCPU needed (1024= 1vcpu)</value>
  66. [DataMember(Name="req_cpu", EmitDefaultValue=false)]
  67. [JsonProperty(PropertyName = "req_cpu")]
  68. public int? ReqCpu { get; set; }
  69. /// <summary>
  70. /// Units of memory in MB needed (1024 = 1GB)
  71. /// </summary>
  72. /// <value>Units of memory in MB needed (1024 = 1GB)</value>
  73. [DataMember(Name="req_memory", EmitDefaultValue=false)]
  74. [JsonProperty(PropertyName = "req_memory")]
  75. public int? ReqMemory { get; set; }
  76. /// <summary>
  77. /// Units of GPU needed (1024= 1 GPU)
  78. /// </summary>
  79. /// <value>Units of GPU needed (1024= 1 GPU)</value>
  80. [DataMember(Name="req_video", EmitDefaultValue=false)]
  81. [JsonProperty(PropertyName = "req_video")]
  82. public int? ReqVideo { get; set; }
  83. /// <summary>
  84. /// The Max duration of the game in minute. 0 means forever.
  85. /// </summary>
  86. /// <value>The Max duration of the game in minute. 0 means forever.</value>
  87. [DataMember(Name="max_duration", EmitDefaultValue=false)]
  88. [JsonProperty(PropertyName = "max_duration")]
  89. public int? MaxDuration { get; set; }
  90. /// <summary>
  91. /// Allow to inject ASA Variables
  92. /// </summary>
  93. /// <value>Allow to inject ASA Variables</value>
  94. [DataMember(Name="use_telemetry", EmitDefaultValue=false)]
  95. [JsonProperty(PropertyName = "use_telemetry")]
  96. public bool? UseTelemetry { get; set; }
  97. /// <summary>
  98. /// Allow to inject Context Variables
  99. /// </summary>
  100. /// <value>Allow to inject Context Variables</value>
  101. [DataMember(Name="inject_context_env", EmitDefaultValue=false)]
  102. [JsonProperty(PropertyName = "inject_context_env")]
  103. public bool? InjectContextEnv { get; set; }
  104. /// <summary>
  105. /// ACL Protection is active
  106. /// </summary>
  107. /// <value>ACL Protection is active</value>
  108. [DataMember(Name="whitelisting_active", EmitDefaultValue=false)]
  109. [JsonProperty(PropertyName = "whitelisting_active")]
  110. public bool? WhitelistingActive { get; set; }
  111. /// <summary>
  112. /// Allow faster deployment by caching your container image in every Edge site
  113. /// </summary>
  114. /// <value>Allow faster deployment by caching your container image in every Edge site</value>
  115. [DataMember(Name="force_cache", EmitDefaultValue=false)]
  116. [JsonProperty(PropertyName = "force_cache")]
  117. public bool? ForceCache { get; set; }
  118. /// <summary>
  119. /// Start of the preferred interval for caching your container
  120. /// </summary>
  121. /// <value>Start of the preferred interval for caching your container</value>
  122. [DataMember(Name="cache_min_hour", EmitDefaultValue=false)]
  123. [JsonProperty(PropertyName = "cache_min_hour")]
  124. public int? CacheMinHour { get; set; }
  125. /// <summary>
  126. /// End of the preferred interval for caching your container
  127. /// </summary>
  128. /// <value>End of the preferred interval for caching your container</value>
  129. [DataMember(Name="cache_max_hour", EmitDefaultValue=false)]
  130. [JsonProperty(PropertyName = "cache_max_hour")]
  131. public int? CacheMaxHour { get; set; }
  132. /// <summary>
  133. /// Estimated maximum time in seconds to deploy, after this time we will consider it not working and retry.
  134. /// </summary>
  135. /// <value>Estimated maximum time in seconds to deploy, after this time we will consider it not working and retry.</value>
  136. [DataMember(Name="time_to_deploy", EmitDefaultValue=false)]
  137. [JsonProperty(PropertyName = "time_to_deploy")]
  138. public int? TimeToDeploy { get; set; }
  139. /// <summary>
  140. /// Enable every location available. By enabling this, your request will use every potential location, including those which may require a longer time to deploy. This means that your application could take significantly more time before being ready. We do not recommend this feature for live games. This functionality does not support ACL and Caching at the moment.
  141. /// </summary>
  142. /// <value>Enable every location available. By enabling this, your request will use every potential location, including those which may require a longer time to deploy. This means that your application could take significantly more time before being ready. We do not recommend this feature for live games. This functionality does not support ACL and Caching at the moment.</value>
  143. [DataMember(Name="enable_all_locations", EmitDefaultValue=false)]
  144. [JsonProperty(PropertyName = "enable_all_locations")]
  145. public bool? EnableAllLocations { get; set; }
  146. /// <summary>
  147. /// Parameters defining the behavior of a session-based app version. If set, the app is considered to be session-based.
  148. /// </summary>
  149. /// <value>Parameters defining the behavior of a session-based app version. If set, the app is considered to be session-based.</value>
  150. [DataMember(Name="session_config", EmitDefaultValue=false)]
  151. [JsonProperty(PropertyName = "session_config")]
  152. public AppVersionCreateSessionConfig SessionConfig { get; set; }
  153. /// <summary>
  154. /// Gets or Sets Ports
  155. /// </summary>
  156. [DataMember(Name="ports", EmitDefaultValue=false)]
  157. [JsonProperty(PropertyName = "ports")]
  158. public List<AppVersionPort> Ports { get; set; }
  159. /// <summary>
  160. /// Gets or Sets Probe
  161. /// </summary>
  162. [DataMember(Name="probe", EmitDefaultValue=false)]
  163. [JsonProperty(PropertyName = "probe")]
  164. public AppVersionProbe Probe { get; set; }
  165. /// <summary>
  166. /// Gets or Sets Envs
  167. /// </summary>
  168. [DataMember(Name="envs", EmitDefaultValue=false)]
  169. [JsonProperty(PropertyName = "envs")]
  170. public List<AppVersionEnv> Envs { get; set; }
  171. /// <summary>
  172. /// Get the string presentation of the object
  173. /// </summary>
  174. /// <returns>String presentation of the object</returns>
  175. public override string ToString() {
  176. StringBuilder sb = new StringBuilder();
  177. sb.Append("class AppVersion {\n");
  178. sb.Append(" Name: ").Append(Name).Append("\n");
  179. sb.Append(" IsActive: ").Append(IsActive).Append("\n");
  180. sb.Append(" DockerRepository: ").Append(DockerRepository).Append("\n");
  181. sb.Append(" DockerImage: ").Append(DockerImage).Append("\n");
  182. sb.Append(" DockerTag: ").Append(DockerTag).Append("\n");
  183. sb.Append(" PrivateUsername: ").Append(PrivateUsername).Append("\n");
  184. sb.Append(" PrivateToken: ").Append(PrivateToken).Append("\n");
  185. sb.Append(" ReqCpu: ").Append(ReqCpu).Append("\n");
  186. sb.Append(" ReqMemory: ").Append(ReqMemory).Append("\n");
  187. sb.Append(" ReqVideo: ").Append(ReqVideo).Append("\n");
  188. sb.Append(" MaxDuration: ").Append(MaxDuration).Append("\n");
  189. sb.Append(" UseTelemetry: ").Append(UseTelemetry).Append("\n");
  190. sb.Append(" InjectContextEnv: ").Append(InjectContextEnv).Append("\n");
  191. sb.Append(" WhitelistingActive: ").Append(WhitelistingActive).Append("\n");
  192. sb.Append(" ForceCache: ").Append(ForceCache).Append("\n");
  193. sb.Append(" CacheMinHour: ").Append(CacheMinHour).Append("\n");
  194. sb.Append(" CacheMaxHour: ").Append(CacheMaxHour).Append("\n");
  195. sb.Append(" TimeToDeploy: ").Append(TimeToDeploy).Append("\n");
  196. sb.Append(" EnableAllLocations: ").Append(EnableAllLocations).Append("\n");
  197. sb.Append(" SessionConfig: ").Append(SessionConfig).Append("\n");
  198. sb.Append(" Ports: ").Append(Ports).Append("\n");
  199. sb.Append(" Probe: ").Append(Probe).Append("\n");
  200. sb.Append(" Envs: ").Append(Envs).Append("\n");
  201. sb.Append("}\n");
  202. return sb.ToString();
  203. }
  204. /// <summary>
  205. /// Get the JSON string presentation of the object
  206. /// </summary>
  207. /// <returns>JSON string presentation of the object</returns>
  208. public string ToJson() {
  209. return JsonConvert.SerializeObject(this, Formatting.Indented);
  210. }
  211. }
  212. }