Class EndpointPort
- java.lang.Object
-
- com.marcnuri.yakc.model.io.k8s.api.core.v1.EndpointPort
-
- All Implemented Interfaces:
com.marcnuri.yakc.model.Model
public class EndpointPort extends java.lang.Object implements com.marcnuri.yakc.model.Model
EndpointPort is a tuple that describes a single port.
-
-
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, @NonNull 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.@NonNull 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(@NonNull 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 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()
The name of this port. This must match the 'name' field in the corresponding ServicePort. Must be a DNS_LABEL. Optional only if one port is defined.
-
getPort
@NonNull public @NonNull java.lang.Number getPort()
The port number of the endpoint.
-
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 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)
The name of this port. This must match the 'name' field in the corresponding ServicePort. Must be a DNS_LABEL. Optional only if one port is defined.
-
setPort
public void setPort(@NonNull @NonNull java.lang.Number port)
The port number of the endpoint.
-
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
-
-