Class MetadataFilter.Builder

  • All Implemented Interfaces:
    MetadataFilterOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    MetadataFilter

    public static final class MetadataFilter.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<MetadataFilter.Builder>
    implements MetadataFilterOrBuilder
     Opaque filter criteria used by load balancers to restrict routing configuration to a limited set of load balancing proxies. Proxies and sidecars involved in load balancing would typically present metadata to the load balancers that need to match criteria specified here. If a match takes place, the relevant configuration is made available to those proxies. For each metadataFilter in this list, if its filterMatchCriteria is set to MATCH_ANY, at least one of the filterLabels must match the corresponding label provided in the metadata. If its filterMatchCriteria is set to MATCH_ALL, then all of its filterLabels must match with corresponding labels provided in the metadata. An example for using metadataFilters would be: if load balancing involves Envoys, they receive routing configuration when values in metadataFilters match values supplied in of their XDS requests to loadbalancers.
     
    Protobuf type google.cloud.compute.v1.MetadataFilter
    • Method Detail

      • 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<MetadataFilter.Builder>
      • clear

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

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

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

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

        public MetadataFilter.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<MetadataFilter.Builder>
      • setField

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

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

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

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

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

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

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

        public MetadataFilter.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<MetadataFilter.Builder>
        Throws:
        IOException
      • getFilterLabelsList

        public List<MetadataFilterLabelMatch> getFilterLabelsList()
         The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries.
         
        repeated .google.cloud.compute.v1.MetadataFilterLabelMatch filter_labels = 307903142;
        Specified by:
        getFilterLabelsList in interface MetadataFilterOrBuilder
      • getFilterLabelsCount

        public int getFilterLabelsCount()
         The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries.
         
        repeated .google.cloud.compute.v1.MetadataFilterLabelMatch filter_labels = 307903142;
        Specified by:
        getFilterLabelsCount in interface MetadataFilterOrBuilder
      • getFilterLabels

        public MetadataFilterLabelMatch getFilterLabels​(int index)
         The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries.
         
        repeated .google.cloud.compute.v1.MetadataFilterLabelMatch filter_labels = 307903142;
        Specified by:
        getFilterLabels in interface MetadataFilterOrBuilder
      • setFilterLabels

        public MetadataFilter.Builder setFilterLabels​(int index,
                                                      MetadataFilterLabelMatch value)
         The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries.
         
        repeated .google.cloud.compute.v1.MetadataFilterLabelMatch filter_labels = 307903142;
      • setFilterLabels

        public MetadataFilter.Builder setFilterLabels​(int index,
                                                      MetadataFilterLabelMatch.Builder builderForValue)
         The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries.
         
        repeated .google.cloud.compute.v1.MetadataFilterLabelMatch filter_labels = 307903142;
      • addFilterLabels

        public MetadataFilter.Builder addFilterLabels​(MetadataFilterLabelMatch value)
         The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries.
         
        repeated .google.cloud.compute.v1.MetadataFilterLabelMatch filter_labels = 307903142;
      • addFilterLabels

        public MetadataFilter.Builder addFilterLabels​(int index,
                                                      MetadataFilterLabelMatch value)
         The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries.
         
        repeated .google.cloud.compute.v1.MetadataFilterLabelMatch filter_labels = 307903142;
      • addFilterLabels

        public MetadataFilter.Builder addFilterLabels​(MetadataFilterLabelMatch.Builder builderForValue)
         The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries.
         
        repeated .google.cloud.compute.v1.MetadataFilterLabelMatch filter_labels = 307903142;
      • addFilterLabels

        public MetadataFilter.Builder addFilterLabels​(int index,
                                                      MetadataFilterLabelMatch.Builder builderForValue)
         The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries.
         
        repeated .google.cloud.compute.v1.MetadataFilterLabelMatch filter_labels = 307903142;
      • addAllFilterLabels

        public MetadataFilter.Builder addAllFilterLabels​(Iterable<? extends MetadataFilterLabelMatch> values)
         The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries.
         
        repeated .google.cloud.compute.v1.MetadataFilterLabelMatch filter_labels = 307903142;
      • clearFilterLabels

        public MetadataFilter.Builder clearFilterLabels()
         The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries.
         
        repeated .google.cloud.compute.v1.MetadataFilterLabelMatch filter_labels = 307903142;
      • removeFilterLabels

        public MetadataFilter.Builder removeFilterLabels​(int index)
         The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries.
         
        repeated .google.cloud.compute.v1.MetadataFilterLabelMatch filter_labels = 307903142;
      • getFilterLabelsBuilder

        public MetadataFilterLabelMatch.Builder getFilterLabelsBuilder​(int index)
         The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries.
         
        repeated .google.cloud.compute.v1.MetadataFilterLabelMatch filter_labels = 307903142;
      • getFilterLabelsOrBuilder

        public MetadataFilterLabelMatchOrBuilder getFilterLabelsOrBuilder​(int index)
         The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries.
         
        repeated .google.cloud.compute.v1.MetadataFilterLabelMatch filter_labels = 307903142;
        Specified by:
        getFilterLabelsOrBuilder in interface MetadataFilterOrBuilder
      • getFilterLabelsOrBuilderList

        public List<? extends MetadataFilterLabelMatchOrBuilder> getFilterLabelsOrBuilderList()
         The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries.
         
        repeated .google.cloud.compute.v1.MetadataFilterLabelMatch filter_labels = 307903142;
        Specified by:
        getFilterLabelsOrBuilderList in interface MetadataFilterOrBuilder
      • addFilterLabelsBuilder

        public MetadataFilterLabelMatch.Builder addFilterLabelsBuilder()
         The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries.
         
        repeated .google.cloud.compute.v1.MetadataFilterLabelMatch filter_labels = 307903142;
      • addFilterLabelsBuilder

        public MetadataFilterLabelMatch.Builder addFilterLabelsBuilder​(int index)
         The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries.
         
        repeated .google.cloud.compute.v1.MetadataFilterLabelMatch filter_labels = 307903142;
      • getFilterLabelsBuilderList

        public List<MetadataFilterLabelMatch.Builder> getFilterLabelsBuilderList()
         The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries.
         
        repeated .google.cloud.compute.v1.MetadataFilterLabelMatch filter_labels = 307903142;
      • hasFilterMatchCriteria

        public boolean hasFilterMatchCriteria()
         Specifies how individual filter label matches within the list of filterLabels and contributes toward the overall metadataFilter match. Supported values are: - MATCH_ANY: at least one of the filterLabels must have a matching label in the provided metadata. - MATCH_ALL: all filterLabels must have matching labels in the provided metadata.
         Check the FilterMatchCriteria enum for the list of possible values.
         
        optional string filter_match_criteria = 239970368;
        Specified by:
        hasFilterMatchCriteria in interface MetadataFilterOrBuilder
        Returns:
        Whether the filterMatchCriteria field is set.
      • getFilterMatchCriteria

        public String getFilterMatchCriteria()
         Specifies how individual filter label matches within the list of filterLabels and contributes toward the overall metadataFilter match. Supported values are: - MATCH_ANY: at least one of the filterLabels must have a matching label in the provided metadata. - MATCH_ALL: all filterLabels must have matching labels in the provided metadata.
         Check the FilterMatchCriteria enum for the list of possible values.
         
        optional string filter_match_criteria = 239970368;
        Specified by:
        getFilterMatchCriteria in interface MetadataFilterOrBuilder
        Returns:
        The filterMatchCriteria.
      • getFilterMatchCriteriaBytes

        public com.google.protobuf.ByteString getFilterMatchCriteriaBytes()
         Specifies how individual filter label matches within the list of filterLabels and contributes toward the overall metadataFilter match. Supported values are: - MATCH_ANY: at least one of the filterLabels must have a matching label in the provided metadata. - MATCH_ALL: all filterLabels must have matching labels in the provided metadata.
         Check the FilterMatchCriteria enum for the list of possible values.
         
        optional string filter_match_criteria = 239970368;
        Specified by:
        getFilterMatchCriteriaBytes in interface MetadataFilterOrBuilder
        Returns:
        The bytes for filterMatchCriteria.
      • setFilterMatchCriteria

        public MetadataFilter.Builder setFilterMatchCriteria​(String value)
         Specifies how individual filter label matches within the list of filterLabels and contributes toward the overall metadataFilter match. Supported values are: - MATCH_ANY: at least one of the filterLabels must have a matching label in the provided metadata. - MATCH_ALL: all filterLabels must have matching labels in the provided metadata.
         Check the FilterMatchCriteria enum for the list of possible values.
         
        optional string filter_match_criteria = 239970368;
        Parameters:
        value - The filterMatchCriteria to set.
        Returns:
        This builder for chaining.
      • clearFilterMatchCriteria

        public MetadataFilter.Builder clearFilterMatchCriteria()
         Specifies how individual filter label matches within the list of filterLabels and contributes toward the overall metadataFilter match. Supported values are: - MATCH_ANY: at least one of the filterLabels must have a matching label in the provided metadata. - MATCH_ALL: all filterLabels must have matching labels in the provided metadata.
         Check the FilterMatchCriteria enum for the list of possible values.
         
        optional string filter_match_criteria = 239970368;
        Returns:
        This builder for chaining.
      • setFilterMatchCriteriaBytes

        public MetadataFilter.Builder setFilterMatchCriteriaBytes​(com.google.protobuf.ByteString value)
         Specifies how individual filter label matches within the list of filterLabels and contributes toward the overall metadataFilter match. Supported values are: - MATCH_ANY: at least one of the filterLabels must have a matching label in the provided metadata. - MATCH_ALL: all filterLabels must have matching labels in the provided metadata.
         Check the FilterMatchCriteria enum for the list of possible values.
         
        optional string filter_match_criteria = 239970368;
        Parameters:
        value - The bytes for filterMatchCriteria to set.
        Returns:
        This builder for chaining.
      • setUnknownFields

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

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