Class Generated.LabelSelector.Builder

  • All Implemented Interfaces:
    com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable, Generated.LabelSelectorOrBuilder
    Enclosing class:
    Generated.LabelSelector

    public static final class Generated.LabelSelector.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Generated.LabelSelector.Builder>
    implements Generated.LabelSelectorOrBuilder
     A label selector is a label query over a set of resources. The result of matchLabels and
     matchExpressions are ANDed. An empty label selector matches all objects. A null
     label selector matches no objects.
     +structType=atomic
     
    Protobuf type k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector
    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection​(int number)
        Overrides:
        internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessageV3.Builder<Generated.LabelSelector.Builder>
      • internalGetMutableMapFieldReflection

        protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection​(int number)
        Overrides:
        internalGetMutableMapFieldReflection in class com.google.protobuf.GeneratedMessageV3.Builder<Generated.LabelSelector.Builder>
      • internalGetFieldAccessorTable

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

        public Generated.LabelSelector.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<Generated.LabelSelector.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<Generated.LabelSelector.Builder>
      • getDefaultInstanceForType

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

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

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

        public Generated.LabelSelector.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<Generated.LabelSelector.Builder>
      • clearField

        public Generated.LabelSelector.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<Generated.LabelSelector.Builder>
      • clearOneof

        public Generated.LabelSelector.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<Generated.LabelSelector.Builder>
      • setRepeatedField

        public Generated.LabelSelector.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<Generated.LabelSelector.Builder>
      • addRepeatedField

        public Generated.LabelSelector.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<Generated.LabelSelector.Builder>
      • isInitialized

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

        public Generated.LabelSelector.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<Generated.LabelSelector.Builder>
        Throws:
        IOException
      • getMatchLabelsCount

        public int getMatchLabelsCount()
        Description copied from interface: Generated.LabelSelectorOrBuilder
         matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
         map is equivalent to an element of matchExpressions, whose key field is "key", the
         operator is "In", and the values array contains only "value". The requirements are ANDed.
         +optional
         
        map<string, string> matchLabels = 1;
        Specified by:
        getMatchLabelsCount in interface Generated.LabelSelectorOrBuilder
      • containsMatchLabels

        public boolean containsMatchLabels​(String key)
         matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
         map is equivalent to an element of matchExpressions, whose key field is "key", the
         operator is "In", and the values array contains only "value". The requirements are ANDed.
         +optional
         
        map<string, string> matchLabels = 1;
        Specified by:
        containsMatchLabels in interface Generated.LabelSelectorOrBuilder
      • getMatchLabelsMap

        public Map<String,​String> getMatchLabelsMap()
         matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
         map is equivalent to an element of matchExpressions, whose key field is "key", the
         operator is "In", and the values array contains only "value". The requirements are ANDed.
         +optional
         
        map<string, string> matchLabels = 1;
        Specified by:
        getMatchLabelsMap in interface Generated.LabelSelectorOrBuilder
      • getMatchLabelsOrDefault

        public String getMatchLabelsOrDefault​(String key,
                                              String defaultValue)
         matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
         map is equivalent to an element of matchExpressions, whose key field is "key", the
         operator is "In", and the values array contains only "value". The requirements are ANDed.
         +optional
         
        map<string, string> matchLabels = 1;
        Specified by:
        getMatchLabelsOrDefault in interface Generated.LabelSelectorOrBuilder
      • getMatchLabelsOrThrow

        public String getMatchLabelsOrThrow​(String key)
         matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
         map is equivalent to an element of matchExpressions, whose key field is "key", the
         operator is "In", and the values array contains only "value". The requirements are ANDed.
         +optional
         
        map<string, string> matchLabels = 1;
        Specified by:
        getMatchLabelsOrThrow in interface Generated.LabelSelectorOrBuilder
      • removeMatchLabels

        public Generated.LabelSelector.Builder removeMatchLabels​(String key)
         matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
         map is equivalent to an element of matchExpressions, whose key field is "key", the
         operator is "In", and the values array contains only "value". The requirements are ANDed.
         +optional
         
        map<string, string> matchLabels = 1;
      • getMutableMatchLabels

        @Deprecated
        public Map<String,​String> getMutableMatchLabels()
        Deprecated.
        Use alternate mutation accessors instead.
      • putMatchLabels

        public Generated.LabelSelector.Builder putMatchLabels​(String key,
                                                              String value)
         matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
         map is equivalent to an element of matchExpressions, whose key field is "key", the
         operator is "In", and the values array contains only "value". The requirements are ANDed.
         +optional
         
        map<string, string> matchLabels = 1;
      • putAllMatchLabels

        public Generated.LabelSelector.Builder putAllMatchLabels​(Map<String,​String> values)
         matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
         map is equivalent to an element of matchExpressions, whose key field is "key", the
         operator is "In", and the values array contains only "value". The requirements are ANDed.
         +optional
         
        map<string, string> matchLabels = 1;
      • getMatchExpressionsCount

        public int getMatchExpressionsCount()
         matchExpressions is a list of label selector requirements. The requirements are ANDed.
         +optional
         +listType=atomic
         
        repeated .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelectorRequirement matchExpressions = 2;
        Specified by:
        getMatchExpressionsCount in interface Generated.LabelSelectorOrBuilder
      • setMatchExpressions

        public Generated.LabelSelector.Builder setMatchExpressions​(int index,
                                                                   Generated.LabelSelectorRequirement value)
         matchExpressions is a list of label selector requirements. The requirements are ANDed.
         +optional
         +listType=atomic
         
        repeated .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelectorRequirement matchExpressions = 2;
      • setMatchExpressions

        public Generated.LabelSelector.Builder setMatchExpressions​(int index,
                                                                   Generated.LabelSelectorRequirement.Builder builderForValue)
         matchExpressions is a list of label selector requirements. The requirements are ANDed.
         +optional
         +listType=atomic
         
        repeated .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelectorRequirement matchExpressions = 2;
      • addMatchExpressions

        public Generated.LabelSelector.Builder addMatchExpressions​(Generated.LabelSelectorRequirement value)
         matchExpressions is a list of label selector requirements. The requirements are ANDed.
         +optional
         +listType=atomic
         
        repeated .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelectorRequirement matchExpressions = 2;
      • addMatchExpressions

        public Generated.LabelSelector.Builder addMatchExpressions​(int index,
                                                                   Generated.LabelSelectorRequirement value)
         matchExpressions is a list of label selector requirements. The requirements are ANDed.
         +optional
         +listType=atomic
         
        repeated .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelectorRequirement matchExpressions = 2;
      • addMatchExpressions

        public Generated.LabelSelector.Builder addMatchExpressions​(int index,
                                                                   Generated.LabelSelectorRequirement.Builder builderForValue)
         matchExpressions is a list of label selector requirements. The requirements are ANDed.
         +optional
         +listType=atomic
         
        repeated .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelectorRequirement matchExpressions = 2;
      • clearMatchExpressions

        public Generated.LabelSelector.Builder clearMatchExpressions()
         matchExpressions is a list of label selector requirements. The requirements are ANDed.
         +optional
         +listType=atomic
         
        repeated .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelectorRequirement matchExpressions = 2;
      • removeMatchExpressions

        public Generated.LabelSelector.Builder removeMatchExpressions​(int index)
         matchExpressions is a list of label selector requirements. The requirements are ANDed.
         +optional
         +listType=atomic
         
        repeated .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelectorRequirement matchExpressions = 2;
      • getMatchExpressionsBuilder

        public Generated.LabelSelectorRequirement.Builder getMatchExpressionsBuilder​(int index)
         matchExpressions is a list of label selector requirements. The requirements are ANDed.
         +optional
         +listType=atomic
         
        repeated .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelectorRequirement matchExpressions = 2;
      • addMatchExpressionsBuilder

        public Generated.LabelSelectorRequirement.Builder addMatchExpressionsBuilder()
         matchExpressions is a list of label selector requirements. The requirements are ANDed.
         +optional
         +listType=atomic
         
        repeated .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelectorRequirement matchExpressions = 2;
      • addMatchExpressionsBuilder

        public Generated.LabelSelectorRequirement.Builder addMatchExpressionsBuilder​(int index)
         matchExpressions is a list of label selector requirements. The requirements are ANDed.
         +optional
         +listType=atomic
         
        repeated .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelectorRequirement matchExpressions = 2;
      • getMatchExpressionsBuilderList

        public List<Generated.LabelSelectorRequirement.Builder> getMatchExpressionsBuilderList()
         matchExpressions is a list of label selector requirements. The requirements are ANDed.
         +optional
         +listType=atomic
         
        repeated .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelectorRequirement matchExpressions = 2;
      • setUnknownFields

        public final Generated.LabelSelector.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<Generated.LabelSelector.Builder>
      • mergeUnknownFields

        public final Generated.LabelSelector.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<Generated.LabelSelector.Builder>