Class MetadataFilter.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<MetadataFilter.Builder>
com.google.cloud.compute.v1.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.GeneratedMessage.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 itsfilterMatchCriteria is set to MATCH_ANY, at least
 one of thefilterLabels 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 inmetadataFilters match values supplied in  of their XDS requests to loadbalancers.
 
Protobuf type google.cloud.compute.v1.MetadataFilter
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    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.
    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.
    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.
    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.
    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.
    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.
     
     
     
    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.
    Specifies how individual filter label matches within the list of filterLabels and contributes toward the overall metadataFilter match.
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Descriptors.Descriptor
     
    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.
    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.
    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.
    int
    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.
    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.
    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.
    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.
    Specifies how individual filter label matches within the list of filterLabels and contributes toward the overall metadataFilter match.
    com.google.protobuf.ByteString
    Specifies how individual filter label matches within the list of filterLabels and contributes toward the overall metadataFilter match.
    boolean
    Specifies how individual filter label matches within the list of filterLabels and contributes toward the overall metadataFilter match.
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    final boolean
     
     
    mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    mergeFrom(com.google.protobuf.Message other)
     
    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.
    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.
    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.
    Specifies how individual filter label matches within the list of filterLabels and contributes toward the overall metadataFilter match.
    setFilterMatchCriteriaBytes(com.google.protobuf.ByteString value)
    Specifies how individual filter label matches within the list of filterLabels and contributes toward the overall metadataFilter match.

    Methods inherited from class com.google.protobuf.GeneratedMessage.Builder

    addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3

    Methods inherited from class com.google.protobuf.AbstractMessage.Builder

    findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString

    Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder

    addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.Message.Builder

    mergeDelimitedFrom, mergeDelimitedFrom

    Methods inherited from interface com.google.protobuf.MessageLite.Builder

    mergeFrom

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

    findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.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.GeneratedMessage.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.GeneratedMessage.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
    • 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>
    • mergeFrom

      public MetadataFilter.Builder mergeFrom(MetadataFilter other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.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.