// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. // namespace k8s.Models { using Newtonsoft.Json; using System.Linq; /// /// NetworkPolicyPort describes a port to allow traffic on /// public partial class V1NetworkPolicyPort { /// /// Initializes a new instance of the V1NetworkPolicyPort class. /// public V1NetworkPolicyPort() { CustomInit(); } /// /// Initializes a new instance of the V1NetworkPolicyPort class. /// /// The port on the given protocol. This can either /// be a numerical or named port on a pod. If this field is not /// provided, this matches all port names and numbers. /// The protocol (TCP, UDP, or SCTP) which /// traffic must match. If not specified, this field defaults to /// TCP. public V1NetworkPolicyPort(IntstrIntOrString port = default(IntstrIntOrString), string protocol = default(string)) { Port = port; Protocol = protocol; CustomInit(); } /// /// An initialization method that performs custom operations like setting defaults /// partial void CustomInit(); /// /// Gets or sets the port on the given protocol. This can either be a /// numerical or named port on a pod. If this field is not provided, /// this matches all port names and numbers. /// [JsonProperty(PropertyName = "port")] public IntstrIntOrString Port { get; set; } /// /// Gets or sets the protocol (TCP, UDP, or SCTP) which traffic must /// match. If not specified, this field defaults to TCP. /// [JsonProperty(PropertyName = "protocol")] public string Protocol { get; set; } } }