Class EndpointPort
- java.lang.Object
-
- com.marcnuri.yakc.model.io.k8s.api.discovery.v1.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()
name represents the name of this port.java.lang.Number
getPort()
port represents the port number of the endpoint.java.lang.String
getProtocol()
protocol represents 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)
name represents the name of this port.void
setPort(java.lang.Number port)
port represents the port number of the endpoint.void
setProtocol(java.lang.String protocol)
protocol represents 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 is used as a hint for implementations to offer richer behavior for protocols that they understand. This field follows standard Kubernetes label syntax. Valid values are either:* Un-prefixed protocol names - reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names).
* Kubernetes-defined prefixed names:
* 'kubernetes.io/h2c' - HTTP/2 over cleartext as described in https://www.rfc-editor.org/rfc/rfc7540
* 'kubernetes.io/ws' - WebSocket over cleartext as described in https://www.rfc-editor.org/rfc/rfc6455
* 'kubernetes.io/wss' - WebSocket over TLS as described in https://www.rfc-editor.org/rfc/rfc6455
* Other protocols should use implementation-defined prefixed names such as mycompany.com/my-custom-protocol.
-
getName
public java.lang.String getName()
name represents 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()
port represents 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()
protocol represents 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 is used as a hint for implementations to offer richer behavior for protocols that they understand. This field follows standard Kubernetes label syntax. Valid values are either:* Un-prefixed protocol names - reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names).
* Kubernetes-defined prefixed names:
* 'kubernetes.io/h2c' - HTTP/2 over cleartext as described in https://www.rfc-editor.org/rfc/rfc7540
* 'kubernetes.io/ws' - WebSocket over cleartext as described in https://www.rfc-editor.org/rfc/rfc6455
* 'kubernetes.io/wss' - WebSocket over TLS as described in https://www.rfc-editor.org/rfc/rfc6455
* Other protocols should use implementation-defined prefixed names such as mycompany.com/my-custom-protocol.
-
setName
public void setName(java.lang.String name)
name represents 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)
port represents 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)
protocol represents 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
-
-