Class V1.PodAffinityTerm.Builder

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

public static final class V1.PodAffinityTerm.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<V1.PodAffinityTerm.Builder> implements V1.PodAffinityTermOrBuilder
 Defines a set of pods (namely those matching the labelSelector
 relative to the given namespace(s)) that this pod should be
 co-located (affinity) or not co-located (anti-affinity) with,
 where co-located is defined as running on a node whose value of
 the label with key <topologyKey> matches that of any node on which
 a pod of the set of pods is running
 
Protobuf type k8s.io.api.core.v1.PodAffinityTerm
  • 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.PodAffinityTerm.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.PodAffinityTerm.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.PodAffinityTerm.Builder>
    • getDefaultInstanceForType

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

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

      public V1.PodAffinityTerm buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.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.PodAffinityTerm.Builder>
    • setField

      public V1.PodAffinityTerm.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.PodAffinityTerm.Builder>
    • clearField

      public V1.PodAffinityTerm.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.PodAffinityTerm.Builder>
    • clearOneof

      public V1.PodAffinityTerm.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.PodAffinityTerm.Builder>
    • setRepeatedField

      public V1.PodAffinityTerm.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.PodAffinityTerm.Builder>
    • addRepeatedField

      public V1.PodAffinityTerm.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.PodAffinityTerm.Builder>
    • mergeFrom

      public V1.PodAffinityTerm.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.PodAffinityTerm.Builder>
    • mergeFrom

    • isInitialized

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

      public V1.PodAffinityTerm.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.PodAffinityTerm.Builder>
      Throws:
      IOException
    • hasLabelSelector

      public boolean hasLabelSelector()
       A label query over a set of resources, in this case pods.
       +optional
       
      optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector labelSelector = 1;
      Specified by:
      hasLabelSelector in interface V1.PodAffinityTermOrBuilder
    • getLabelSelector

      public Meta.LabelSelector getLabelSelector()
       A label query over a set of resources, in this case pods.
       +optional
       
      optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector labelSelector = 1;
      Specified by:
      getLabelSelector in interface V1.PodAffinityTermOrBuilder
    • setLabelSelector

      public V1.PodAffinityTerm.Builder setLabelSelector(Meta.LabelSelector value)
       A label query over a set of resources, in this case pods.
       +optional
       
      optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector labelSelector = 1;
    • setLabelSelector

      public V1.PodAffinityTerm.Builder setLabelSelector(Meta.LabelSelector.Builder builderForValue)
       A label query over a set of resources, in this case pods.
       +optional
       
      optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector labelSelector = 1;
    • mergeLabelSelector

      public V1.PodAffinityTerm.Builder mergeLabelSelector(Meta.LabelSelector value)
       A label query over a set of resources, in this case pods.
       +optional
       
      optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector labelSelector = 1;
    • clearLabelSelector

      public V1.PodAffinityTerm.Builder clearLabelSelector()
       A label query over a set of resources, in this case pods.
       +optional
       
      optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector labelSelector = 1;
    • getLabelSelectorBuilder

      public Meta.LabelSelector.Builder getLabelSelectorBuilder()
       A label query over a set of resources, in this case pods.
       +optional
       
      optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector labelSelector = 1;
    • getLabelSelectorOrBuilder

      public Meta.LabelSelectorOrBuilder getLabelSelectorOrBuilder()
       A label query over a set of resources, in this case pods.
       +optional
       
      optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector labelSelector = 1;
      Specified by:
      getLabelSelectorOrBuilder in interface V1.PodAffinityTermOrBuilder
    • getNamespacesList

      public com.google.protobuf.ProtocolStringList getNamespacesList()
       namespaces specifies a static list of namespace names that the term applies to.
       The term is applied to the union of the namespaces listed in this field
       and the ones selected by namespaceSelector.
       null or empty namespaces list and null namespaceSelector means "this pod's namespace"
       +optional
       
      repeated string namespaces = 2;
      Specified by:
      getNamespacesList in interface V1.PodAffinityTermOrBuilder
    • getNamespacesCount

      public int getNamespacesCount()
       namespaces specifies a static list of namespace names that the term applies to.
       The term is applied to the union of the namespaces listed in this field
       and the ones selected by namespaceSelector.
       null or empty namespaces list and null namespaceSelector means "this pod's namespace"
       +optional
       
      repeated string namespaces = 2;
      Specified by:
      getNamespacesCount in interface V1.PodAffinityTermOrBuilder
    • getNamespaces

      public String getNamespaces(int index)
       namespaces specifies a static list of namespace names that the term applies to.
       The term is applied to the union of the namespaces listed in this field
       and the ones selected by namespaceSelector.
       null or empty namespaces list and null namespaceSelector means "this pod's namespace"
       +optional
       
      repeated string namespaces = 2;
      Specified by:
      getNamespaces in interface V1.PodAffinityTermOrBuilder
    • getNamespacesBytes

      public com.google.protobuf.ByteString getNamespacesBytes(int index)
       namespaces specifies a static list of namespace names that the term applies to.
       The term is applied to the union of the namespaces listed in this field
       and the ones selected by namespaceSelector.
       null or empty namespaces list and null namespaceSelector means "this pod's namespace"
       +optional
       
      repeated string namespaces = 2;
      Specified by:
      getNamespacesBytes in interface V1.PodAffinityTermOrBuilder
    • setNamespaces

      public V1.PodAffinityTerm.Builder setNamespaces(int index, String value)
       namespaces specifies a static list of namespace names that the term applies to.
       The term is applied to the union of the namespaces listed in this field
       and the ones selected by namespaceSelector.
       null or empty namespaces list and null namespaceSelector means "this pod's namespace"
       +optional
       
      repeated string namespaces = 2;
    • addNamespaces

      public V1.PodAffinityTerm.Builder addNamespaces(String value)
       namespaces specifies a static list of namespace names that the term applies to.
       The term is applied to the union of the namespaces listed in this field
       and the ones selected by namespaceSelector.
       null or empty namespaces list and null namespaceSelector means "this pod's namespace"
       +optional
       
      repeated string namespaces = 2;
    • addAllNamespaces

      public V1.PodAffinityTerm.Builder addAllNamespaces(Iterable<String> values)
       namespaces specifies a static list of namespace names that the term applies to.
       The term is applied to the union of the namespaces listed in this field
       and the ones selected by namespaceSelector.
       null or empty namespaces list and null namespaceSelector means "this pod's namespace"
       +optional
       
      repeated string namespaces = 2;
    • clearNamespaces

      public V1.PodAffinityTerm.Builder clearNamespaces()
       namespaces specifies a static list of namespace names that the term applies to.
       The term is applied to the union of the namespaces listed in this field
       and the ones selected by namespaceSelector.
       null or empty namespaces list and null namespaceSelector means "this pod's namespace"
       +optional
       
      repeated string namespaces = 2;
    • addNamespacesBytes

      public V1.PodAffinityTerm.Builder addNamespacesBytes(com.google.protobuf.ByteString value)
       namespaces specifies a static list of namespace names that the term applies to.
       The term is applied to the union of the namespaces listed in this field
       and the ones selected by namespaceSelector.
       null or empty namespaces list and null namespaceSelector means "this pod's namespace"
       +optional
       
      repeated string namespaces = 2;
    • hasTopologyKey

      public boolean hasTopologyKey()
       This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching
       the labelSelector in the specified namespaces, where co-located is defined as running on a node
       whose value of the label with key topologyKey matches that of any node on which any of the
       selected pods is running.
       Empty topologyKey is not allowed.
       
      optional string topologyKey = 3;
      Specified by:
      hasTopologyKey in interface V1.PodAffinityTermOrBuilder
    • getTopologyKey

      public String getTopologyKey()
       This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching
       the labelSelector in the specified namespaces, where co-located is defined as running on a node
       whose value of the label with key topologyKey matches that of any node on which any of the
       selected pods is running.
       Empty topologyKey is not allowed.
       
      optional string topologyKey = 3;
      Specified by:
      getTopologyKey in interface V1.PodAffinityTermOrBuilder
    • getTopologyKeyBytes

      public com.google.protobuf.ByteString getTopologyKeyBytes()
       This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching
       the labelSelector in the specified namespaces, where co-located is defined as running on a node
       whose value of the label with key topologyKey matches that of any node on which any of the
       selected pods is running.
       Empty topologyKey is not allowed.
       
      optional string topologyKey = 3;
      Specified by:
      getTopologyKeyBytes in interface V1.PodAffinityTermOrBuilder
    • setTopologyKey

      public V1.PodAffinityTerm.Builder setTopologyKey(String value)
       This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching
       the labelSelector in the specified namespaces, where co-located is defined as running on a node
       whose value of the label with key topologyKey matches that of any node on which any of the
       selected pods is running.
       Empty topologyKey is not allowed.
       
      optional string topologyKey = 3;
    • clearTopologyKey

      public V1.PodAffinityTerm.Builder clearTopologyKey()
       This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching
       the labelSelector in the specified namespaces, where co-located is defined as running on a node
       whose value of the label with key topologyKey matches that of any node on which any of the
       selected pods is running.
       Empty topologyKey is not allowed.
       
      optional string topologyKey = 3;
    • setTopologyKeyBytes

      public V1.PodAffinityTerm.Builder setTopologyKeyBytes(com.google.protobuf.ByteString value)
       This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching
       the labelSelector in the specified namespaces, where co-located is defined as running on a node
       whose value of the label with key topologyKey matches that of any node on which any of the
       selected pods is running.
       Empty topologyKey is not allowed.
       
      optional string topologyKey = 3;
    • hasNamespaceSelector

      public boolean hasNamespaceSelector()
       A label query over the set of namespaces that the term applies to.
       The term is applied to the union of the namespaces selected by this field
       and the ones listed in the namespaces field.
       null selector and null or empty namespaces list means "this pod's namespace".
       An empty selector ({}) matches all namespaces.
       This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled.
       +optional
       
      optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector namespaceSelector = 4;
      Specified by:
      hasNamespaceSelector in interface V1.PodAffinityTermOrBuilder
    • getNamespaceSelector

      public Meta.LabelSelector getNamespaceSelector()
       A label query over the set of namespaces that the term applies to.
       The term is applied to the union of the namespaces selected by this field
       and the ones listed in the namespaces field.
       null selector and null or empty namespaces list means "this pod's namespace".
       An empty selector ({}) matches all namespaces.
       This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled.
       +optional
       
      optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector namespaceSelector = 4;
      Specified by:
      getNamespaceSelector in interface V1.PodAffinityTermOrBuilder
    • setNamespaceSelector

      public V1.PodAffinityTerm.Builder setNamespaceSelector(Meta.LabelSelector value)
       A label query over the set of namespaces that the term applies to.
       The term is applied to the union of the namespaces selected by this field
       and the ones listed in the namespaces field.
       null selector and null or empty namespaces list means "this pod's namespace".
       An empty selector ({}) matches all namespaces.
       This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled.
       +optional
       
      optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector namespaceSelector = 4;
    • setNamespaceSelector

      public V1.PodAffinityTerm.Builder setNamespaceSelector(Meta.LabelSelector.Builder builderForValue)
       A label query over the set of namespaces that the term applies to.
       The term is applied to the union of the namespaces selected by this field
       and the ones listed in the namespaces field.
       null selector and null or empty namespaces list means "this pod's namespace".
       An empty selector ({}) matches all namespaces.
       This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled.
       +optional
       
      optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector namespaceSelector = 4;
    • mergeNamespaceSelector

      public V1.PodAffinityTerm.Builder mergeNamespaceSelector(Meta.LabelSelector value)
       A label query over the set of namespaces that the term applies to.
       The term is applied to the union of the namespaces selected by this field
       and the ones listed in the namespaces field.
       null selector and null or empty namespaces list means "this pod's namespace".
       An empty selector ({}) matches all namespaces.
       This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled.
       +optional
       
      optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector namespaceSelector = 4;
    • clearNamespaceSelector

      public V1.PodAffinityTerm.Builder clearNamespaceSelector()
       A label query over the set of namespaces that the term applies to.
       The term is applied to the union of the namespaces selected by this field
       and the ones listed in the namespaces field.
       null selector and null or empty namespaces list means "this pod's namespace".
       An empty selector ({}) matches all namespaces.
       This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled.
       +optional
       
      optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector namespaceSelector = 4;
    • getNamespaceSelectorBuilder

      public Meta.LabelSelector.Builder getNamespaceSelectorBuilder()
       A label query over the set of namespaces that the term applies to.
       The term is applied to the union of the namespaces selected by this field
       and the ones listed in the namespaces field.
       null selector and null or empty namespaces list means "this pod's namespace".
       An empty selector ({}) matches all namespaces.
       This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled.
       +optional
       
      optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector namespaceSelector = 4;
    • getNamespaceSelectorOrBuilder

      public Meta.LabelSelectorOrBuilder getNamespaceSelectorOrBuilder()
       A label query over the set of namespaces that the term applies to.
       The term is applied to the union of the namespaces selected by this field
       and the ones listed in the namespaces field.
       null selector and null or empty namespaces list means "this pod's namespace".
       An empty selector ({}) matches all namespaces.
       This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled.
       +optional
       
      optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector namespaceSelector = 4;
      Specified by:
      getNamespaceSelectorOrBuilder in interface V1.PodAffinityTermOrBuilder
    • setUnknownFields

      public final V1.PodAffinityTerm.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.PodAffinityTerm.Builder>
    • mergeUnknownFields

      public final V1.PodAffinityTerm.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.PodAffinityTerm.Builder>