PortMapping.cs 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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 PortMapping {
  13. /// <summary>
  14. /// The Port to Connect from Internet
  15. /// </summary>
  16. /// <value>The Port to Connect from Internet</value>
  17. [DataMember(Name="external", EmitDefaultValue=false)]
  18. [JsonProperty(PropertyName = "external")]
  19. public int? External { get; set; }
  20. /// <summary>
  21. /// The internal Port of the Container
  22. /// </summary>
  23. /// <value>The internal Port of the Container</value>
  24. [DataMember(Name="internal", EmitDefaultValue=false)]
  25. [JsonProperty(PropertyName = "internal")]
  26. public int? Internal { get; set; }
  27. /// <summary>
  28. /// The Protocol (i.e. 'TCP')
  29. /// </summary>
  30. /// <value>The Protocol (i.e. 'TCP')</value>
  31. [DataMember(Name="protocol", EmitDefaultValue=false)]
  32. [JsonProperty(PropertyName = "protocol")]
  33. public string Protocol { get; set; }
  34. /// <summary>
  35. /// The Name of the port if given, default to internal port in string
  36. /// </summary>
  37. /// <value>The Name of the port if given, default to internal port in string</value>
  38. [DataMember(Name="name", EmitDefaultValue=false)]
  39. [JsonProperty(PropertyName = "name")]
  40. public string Name { get; set; }
  41. /// <summary>
  42. /// If the port require TLS Upgrade
  43. /// </summary>
  44. /// <value>If the port require TLS Upgrade</value>
  45. [DataMember(Name="tls_upgrade", EmitDefaultValue=false)]
  46. [JsonProperty(PropertyName = "tls_upgrade")]
  47. public bool? TlsUpgrade { get; set; }
  48. /// <summary>
  49. /// link of the port with scheme depending of the protocol
  50. /// </summary>
  51. /// <value>link of the port with scheme depending of the protocol</value>
  52. [DataMember(Name="link", EmitDefaultValue=false)]
  53. [JsonProperty(PropertyName = "link")]
  54. public string Link { get; set; }
  55. /// <summary>
  56. /// Internal Proxy Mapping
  57. /// </summary>
  58. /// <value>Internal Proxy Mapping</value>
  59. [DataMember(Name="proxy", EmitDefaultValue=false)]
  60. [JsonProperty(PropertyName = "proxy")]
  61. public int? Proxy { get; set; }
  62. /// <summary>
  63. /// Get the string presentation of the object
  64. /// </summary>
  65. /// <returns>String presentation of the object</returns>
  66. public override string ToString() {
  67. StringBuilder sb = new StringBuilder();
  68. sb.Append("class PortMapping {\n");
  69. sb.Append(" External: ").Append(External).Append("\n");
  70. sb.Append(" Internal: ").Append(Internal).Append("\n");
  71. sb.Append(" Protocol: ").Append(Protocol).Append("\n");
  72. sb.Append(" Name: ").Append(Name).Append("\n");
  73. sb.Append(" TlsUpgrade: ").Append(TlsUpgrade).Append("\n");
  74. sb.Append(" Link: ").Append(Link).Append("\n");
  75. sb.Append(" Proxy: ").Append(Proxy).Append("\n");
  76. sb.Append("}\n");
  77. return sb.ToString();
  78. }
  79. /// <summary>
  80. /// Get the JSON string presentation of the object
  81. /// </summary>
  82. /// <returns>JSON string presentation of the object</returns>
  83. public string ToJson() {
  84. return JsonConvert.SerializeObject(this, Formatting.Indented);
  85. }
  86. }
  87. }