Class V1ContainerPort

java.lang.Object
io.kubernetes.client.openapi.models.V1ContainerPort

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2023-06-18T15:05:57.863601Z[Etc/UTC]") public class V1ContainerPort extends Object
ContainerPort represents a network port in a single container.
  • Field Details

  • Constructor Details

    • V1ContainerPort

      public V1ContainerPort()
  • Method Details

    • containerPort

      public V1ContainerPort containerPort(Integer containerPort)
    • getContainerPort

      public Integer 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

      public void setContainerPort(Integer containerPort)
    • hostIP

      public V1ContainerPort hostIP(String hostIP)
    • getHostIP

      @Nullable public String getHostIP()
      What host IP to bind the external port to.
      Returns:
      hostIP
    • setHostIP

      public void setHostIP(String hostIP)
    • hostPort

      public V1ContainerPort hostPort(Integer hostPort)
    • getHostPort

      @Nullable public Integer 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

      public void setHostPort(Integer hostPort)
    • name

      public V1ContainerPort name(String name)
    • getName

      @Nullable public String 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

      public void setName(String name)
    • protocol

      public V1ContainerPort protocol(String protocol)
    • getProtocol

      @Nullable public String getProtocol()
      Protocol for port. Must be UDP, TCP, or SCTP. Defaults to \"TCP\".
      Returns:
      protocol
    • setProtocol

      public void setProtocol(String protocol)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object