Class EndpointPort

  • All Implemented Interfaces:
    com.marcnuri.yakc.model.Model

    public class EndpointPort
    extends java.lang.Object
    implements com.marcnuri.yakc.model.Model
    EndpointPort represents a Port used by an EndpointSlice
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  EndpointPort.Builder  
    • Constructor Summary

      Constructors 
      Constructor Description
      EndpointPort()  
      EndpointPort​(java.lang.String appProtocol, java.lang.String name, java.lang.Number port, java.lang.String protocol)  
    • Constructor Detail

      • EndpointPort

        public EndpointPort​(java.lang.String appProtocol,
                            java.lang.String name,
                            java.lang.Number port,
                            java.lang.String protocol)
      • EndpointPort

        public EndpointPort()
    • Method Detail

      • getAppProtocol

        public java.lang.String getAppProtocol()
        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 https://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol.
      • getName

        public java.lang.String getName()
        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.
      • getPort

        public java.lang.Number getPort()
        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.
      • getProtocol

        public java.lang.String getProtocol()
        The IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP.
      • setAppProtocol

        public void setAppProtocol​(java.lang.String 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 https://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol.
      • setName

        public void setName​(java.lang.String 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.
      • setPort

        public void setPort​(java.lang.Number 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.
      • setProtocol

        public void setProtocol​(java.lang.String protocol)
        The IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • canEqual

        protected boolean canEqual​(java.lang.Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object