Class EndpointPort
- java.lang.Object
-
- com.marcnuri.yakc.model.io.k8s.api.discovery.v1beta1.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)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static EndpointPort.Builder
builder()
protected boolean
canEqual(java.lang.Object other)
boolean
equals(java.lang.Object o)
java.lang.String
getAppProtocol()
The application protocol for this port.java.lang.String
getName()
The name of this port.java.lang.Number
getPort()
The port number of the endpoint.java.lang.String
getProtocol()
The IP protocol for this port.int
hashCode()
void
setAppProtocol(java.lang.String appProtocol)
The application protocol for this port.void
setName(java.lang.String name)
The name of this port.void
setPort(java.lang.Number port)
The port number of the endpoint.void
setProtocol(java.lang.String protocol)
The IP protocol for this port.EndpointPort.Builder
toBuilder()
java.lang.String
toString()
-
-
-
Method Detail
-
builder
public static EndpointPort.Builder builder()
-
toBuilder
public EndpointPort.Builder toBuilder()
-
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 classjava.lang.Object
-
canEqual
protected boolean canEqual(java.lang.Object other)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-