// <auto-generated>
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>

namespace k8s.Models
{
    using Newtonsoft.Json;
    using System.Linq;

    /// <summary>
    /// EndpointPort represents a Port used by an EndpointSlice
    /// </summary>
    public partial class Discoveryv1EndpointPort
    {
        /// <summary>
        /// Initializes a new instance of the Discoveryv1EndpointPort class.
        /// </summary>
        public Discoveryv1EndpointPort()
        {
            CustomInit();
        }

        /// <summary>
        /// Initializes a new instance of the Discoveryv1EndpointPort class.
        /// </summary>
        /// <param name="appProtocol">The application protocol for this port.
        /// This field follows standard Kubernetes label syntax. Un-prefixed
        /// names are reserved for IANA standard service names (as per RFC-6335
        /// and http://www.iana.org/assignments/service-names). Non-standard
        /// protocols should use prefixed names such as
        /// mycompany.com/my-custom-protocol.</param>
        /// <param name="name">The name of this port. All ports in an
        /// EndpointSlice must have a unique name. If the EndpointSlice is
        /// dervied from a Kubernetes service, this corresponds to the
        /// Service.ports[].name. Name must either be an empty string or pass
        /// DNS_LABEL validation: * must be no more than 63 characters long. *
        /// must consist of lower case alphanumeric characters or '-'. * must
        /// start and end with an alphanumeric character. Default is empty
        /// string.</param>
        /// <param name="port">The port number of the endpoint. If this is not
        /// specified, ports are not restricted and must be interpreted in the
        /// context of the specific consumer.</param>
        /// <param name="protocol">The IP protocol for this port. Must be UDP,
        /// TCP, or SCTP. Default is TCP.</param>
        public Discoveryv1EndpointPort(string appProtocol = default(string), string name = default(string), int? port = default(int?), string protocol = default(string))
        {
            AppProtocol = appProtocol;
            Name = name;
            Port = port;
            Protocol = protocol;
            CustomInit();
        }

        /// <summary>
        /// An initialization method that performs custom operations like setting defaults
        /// </summary>
        partial void CustomInit();

        /// <summary>
        /// Gets or sets the application protocol for this port. This field
        /// follows standard Kubernetes label syntax. Un-prefixed names are
        /// reserved for IANA standard service names (as per RFC-6335 and
        /// http://www.iana.org/assignments/service-names). Non-standard
        /// protocols should use prefixed names such as
        /// mycompany.com/my-custom-protocol.
        /// </summary>
        [JsonProperty(PropertyName = "appProtocol")]
        public string AppProtocol { get; set; }

        /// <summary>
        /// Gets or sets the name of this port. All ports in an EndpointSlice
        /// must have a unique name. If the EndpointSlice is dervied from a
        /// Kubernetes service, this corresponds to the Service.ports[].name.
        /// Name must either be an empty string or pass DNS_LABEL validation: *
        /// must be no more than 63 characters long. * must consist of lower
        /// case alphanumeric characters or '-'. * must start and end with an
        /// alphanumeric character. Default is empty string.
        /// </summary>
        [JsonProperty(PropertyName = "name")]
        public string Name { get; set; }

        /// <summary>
        /// Gets or sets the port number of the endpoint. If this is not
        /// specified, ports are not restricted and must be interpreted in the
        /// context of the specific consumer.
        /// </summary>
        [JsonProperty(PropertyName = "port")]
        public int? Port { get; set; }

        /// <summary>
        /// Gets or sets the IP protocol for this port. Must be UDP, TCP, or
        /// SCTP. Default is TCP.
        /// </summary>
        [JsonProperty(PropertyName = "protocol")]
        public string Protocol { get; set; }

    }
}
