Class V1.ContainerPort.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<V1.ContainerPort.Builder>
io.kubernetes.client.proto.V1.ContainerPort.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, V1.ContainerPortOrBuilder, Cloneable
Enclosing class:
V1.ContainerPort

public static final class V1.ContainerPort.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<V1.ContainerPort.Builder> implements V1.ContainerPortOrBuilder
 ContainerPort represents a network port in a single container.
 
Protobuf type k8s.io.api.core.v1.ContainerPort
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<V1.ContainerPort.Builder>
    • clear

      public V1.ContainerPort.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessageV3.Builder<V1.ContainerPort.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<V1.ContainerPort.Builder>
    • getDefaultInstanceForType

      public V1.ContainerPort getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public V1.ContainerPort build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public V1.ContainerPort buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • clone

      public V1.ContainerPort.Builder clone()
      Specified by:
      clone in interface com.google.protobuf.Message.Builder
      Specified by:
      clone in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clone in class com.google.protobuf.GeneratedMessageV3.Builder<V1.ContainerPort.Builder>
    • setField

      public V1.ContainerPort.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      setField in interface com.google.protobuf.Message.Builder
      Overrides:
      setField in class com.google.protobuf.GeneratedMessageV3.Builder<V1.ContainerPort.Builder>
    • clearField

      public V1.ContainerPort.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
      Specified by:
      clearField in interface com.google.protobuf.Message.Builder
      Overrides:
      clearField in class com.google.protobuf.GeneratedMessageV3.Builder<V1.ContainerPort.Builder>
    • clearOneof

      public V1.ContainerPort.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
      Specified by:
      clearOneof in interface com.google.protobuf.Message.Builder
      Overrides:
      clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<V1.ContainerPort.Builder>
    • setRepeatedField

      public V1.ContainerPort.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
      Specified by:
      setRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<V1.ContainerPort.Builder>
    • addRepeatedField

      public V1.ContainerPort.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      addRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<V1.ContainerPort.Builder>
    • mergeFrom

      public V1.ContainerPort.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<V1.ContainerPort.Builder>
    • mergeFrom

      public V1.ContainerPort.Builder mergeFrom(V1.ContainerPort other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<V1.ContainerPort.Builder>
    • mergeFrom

      public V1.ContainerPort.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<V1.ContainerPort.Builder>
      Throws:
      IOException
    • hasName

      public boolean hasName()
       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.
       +optional
       
      optional string name = 1;
      Specified by:
      hasName in interface V1.ContainerPortOrBuilder
    • getName

      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.
       +optional
       
      optional string name = 1;
      Specified by:
      getName in interface V1.ContainerPortOrBuilder
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       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.
       +optional
       
      optional string name = 1;
      Specified by:
      getNameBytes in interface V1.ContainerPortOrBuilder
    • setName

      public V1.ContainerPort.Builder setName(String value)
       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.
       +optional
       
      optional string name = 1;
    • clearName

      public V1.ContainerPort.Builder clearName()
       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.
       +optional
       
      optional string name = 1;
    • setNameBytes

      public V1.ContainerPort.Builder setNameBytes(com.google.protobuf.ByteString value)
       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.
       +optional
       
      optional string name = 1;
    • hasHostPort

      public boolean hasHostPort()
       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.
       +optional
       
      optional int32 hostPort = 2;
      Specified by:
      hasHostPort in interface V1.ContainerPortOrBuilder
    • getHostPort

      public int 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.
       +optional
       
      optional int32 hostPort = 2;
      Specified by:
      getHostPort in interface V1.ContainerPortOrBuilder
    • setHostPort

      public V1.ContainerPort.Builder setHostPort(int value)
       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.
       +optional
       
      optional int32 hostPort = 2;
    • clearHostPort

      public V1.ContainerPort.Builder clearHostPort()
       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.
       +optional
       
      optional int32 hostPort = 2;
    • hasContainerPort

      public boolean hasContainerPort()
       Number of port to expose on the pod's IP address.
       This must be a valid port number, 0 < x < 65536.
       
      optional int32 containerPort = 3;
      Specified by:
      hasContainerPort in interface V1.ContainerPortOrBuilder
    • getContainerPort

      public int getContainerPort()
       Number of port to expose on the pod's IP address.
       This must be a valid port number, 0 < x < 65536.
       
      optional int32 containerPort = 3;
      Specified by:
      getContainerPort in interface V1.ContainerPortOrBuilder
    • setContainerPort

      public V1.ContainerPort.Builder setContainerPort(int value)
       Number of port to expose on the pod's IP address.
       This must be a valid port number, 0 < x < 65536.
       
      optional int32 containerPort = 3;
    • clearContainerPort

      public V1.ContainerPort.Builder clearContainerPort()
       Number of port to expose on the pod's IP address.
       This must be a valid port number, 0 < x < 65536.
       
      optional int32 containerPort = 3;
    • hasProtocol

      public boolean hasProtocol()
       Protocol for port. Must be UDP, TCP, or SCTP.
       Defaults to "TCP".
       +optional
       +default="TCP"
       
      optional string protocol = 4;
      Specified by:
      hasProtocol in interface V1.ContainerPortOrBuilder
    • getProtocol

      public String getProtocol()
       Protocol for port. Must be UDP, TCP, or SCTP.
       Defaults to "TCP".
       +optional
       +default="TCP"
       
      optional string protocol = 4;
      Specified by:
      getProtocol in interface V1.ContainerPortOrBuilder
    • getProtocolBytes

      public com.google.protobuf.ByteString getProtocolBytes()
       Protocol for port. Must be UDP, TCP, or SCTP.
       Defaults to "TCP".
       +optional
       +default="TCP"
       
      optional string protocol = 4;
      Specified by:
      getProtocolBytes in interface V1.ContainerPortOrBuilder
    • setProtocol

      public V1.ContainerPort.Builder setProtocol(String value)
       Protocol for port. Must be UDP, TCP, or SCTP.
       Defaults to "TCP".
       +optional
       +default="TCP"
       
      optional string protocol = 4;
    • clearProtocol

      public V1.ContainerPort.Builder clearProtocol()
       Protocol for port. Must be UDP, TCP, or SCTP.
       Defaults to "TCP".
       +optional
       +default="TCP"
       
      optional string protocol = 4;
    • setProtocolBytes

      public V1.ContainerPort.Builder setProtocolBytes(com.google.protobuf.ByteString value)
       Protocol for port. Must be UDP, TCP, or SCTP.
       Defaults to "TCP".
       +optional
       +default="TCP"
       
      optional string protocol = 4;
    • hasHostIP

      public boolean hasHostIP()
       What host IP to bind the external port to.
       +optional
       
      optional string hostIP = 5;
      Specified by:
      hasHostIP in interface V1.ContainerPortOrBuilder
    • getHostIP

      public String getHostIP()
       What host IP to bind the external port to.
       +optional
       
      optional string hostIP = 5;
      Specified by:
      getHostIP in interface V1.ContainerPortOrBuilder
    • getHostIPBytes

      public com.google.protobuf.ByteString getHostIPBytes()
       What host IP to bind the external port to.
       +optional
       
      optional string hostIP = 5;
      Specified by:
      getHostIPBytes in interface V1.ContainerPortOrBuilder
    • setHostIP

      public V1.ContainerPort.Builder setHostIP(String value)
       What host IP to bind the external port to.
       +optional
       
      optional string hostIP = 5;
    • clearHostIP

      public V1.ContainerPort.Builder clearHostIP()
       What host IP to bind the external port to.
       +optional
       
      optional string hostIP = 5;
    • setHostIPBytes

      public V1.ContainerPort.Builder setHostIPBytes(com.google.protobuf.ByteString value)
       What host IP to bind the external port to.
       +optional
       
      optional string hostIP = 5;
    • setUnknownFields

      public final V1.ContainerPort.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      setUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<V1.ContainerPort.Builder>
    • mergeUnknownFields

      public final V1.ContainerPort.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      mergeUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<V1.ContainerPort.Builder>