Class V1ContainerPort
java.lang.Object
io.kubernetes.client.openapi.models.V1ContainerPort
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
date="2024-02-02T17:56:12.287571Z[Etc/UTC]")
public class V1ContainerPort
extends Object
ContainerPort represents a network port in a single container.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncontainerPort
(Integer containerPort) boolean
static V1ContainerPort
Create an instance of V1ContainerPort given an JSON stringNumber of port to expose on the pod's IP address.What host IP to bind the external port to.Number of port to expose on the host.getName()
If specified, this must be an IANA_SVC_NAME and unique within the pod.Protocol for port.int
hashCode()
void
setContainerPort
(Integer containerPort) void
void
setHostPort
(Integer hostPort) void
void
setProtocol
(String protocol) toJson()
Convert an instance of V1ContainerPort to an JSON stringtoString()
static void
validateJsonObject
(com.google.gson.JsonObject jsonObj) Validates the JSON Object and throws an exception if issues found
-
Field Details
-
SERIALIZED_NAME_CONTAINER_PORT
- See Also:
-
SERIALIZED_NAME_HOST_I_P
- See Also:
-
SERIALIZED_NAME_HOST_PORT
- See Also:
-
SERIALIZED_NAME_NAME
- See Also:
-
SERIALIZED_NAME_PROTOCOL
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
V1ContainerPort
public V1ContainerPort()
-
-
Method Details
-
containerPort
-
getContainerPort
Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536.- Returns:
- containerPort
-
setContainerPort
-
hostIP
-
getHostIP
What host IP to bind the external port to.- Returns:
- hostIP
-
setHostIP
-
hostPort
-
getHostPort
Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this.- Returns:
- hostPort
-
setHostPort
-
name
-
getName
If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services.- Returns:
- name
-
setName
-
protocol
-
getProtocol
Protocol for port. Must be UDP, TCP, or SCTP. Defaults to \"TCP\".- Returns:
- protocol
-
setProtocol
-
equals
-
hashCode
public int hashCode() -
toString
-
validateJsonObject
Validates the JSON Object and throws an exception if issues found- Parameters:
jsonObj
- JSON Object- Throws:
IOException
- if the JSON Object is invalid with respect to V1ContainerPort
-
fromJson
Create an instance of V1ContainerPort given an JSON string- Parameters:
jsonString
- JSON string- Returns:
- An instance of V1ContainerPort
- Throws:
IOException
- if the JSON string is invalid with respect to V1ContainerPort
-
toJson
Convert an instance of V1ContainerPort to an JSON string- Returns:
- JSON string
-