Class EndpointMatcher.MetadataLabelMatcher.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<EndpointMatcher.MetadataLabelMatcher.Builder>
com.google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.Builder
All Implemented Interfaces:
EndpointMatcher.MetadataLabelMatcherOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
EndpointMatcher.MetadataLabelMatcher

public static final class EndpointMatcher.MetadataLabelMatcher.Builder extends com.google.protobuf.GeneratedMessage.Builder<EndpointMatcher.MetadataLabelMatcher.Builder> implements EndpointMatcher.MetadataLabelMatcherOrBuilder
 The matcher that is based on node metadata presented by xDS clients.
 
Protobuf type google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher
  • 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<EndpointMatcher.MetadataLabelMatcher.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<EndpointMatcher.MetadataLabelMatcher.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<EndpointMatcher.MetadataLabelMatcher.Builder>
    • getDefaultInstanceForType

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

      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public EndpointMatcher.MetadataLabelMatcher buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

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

    • isInitialized

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

      public EndpointMatcher.MetadataLabelMatcher.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<EndpointMatcher.MetadataLabelMatcher.Builder>
      Throws:
      IOException
    • getMetadataLabelMatchCriteriaValue

      public int getMetadataLabelMatchCriteriaValue()
       Specifies how matching should be done.
      
       Supported values are:
       MATCH_ANY: At least one of the Labels specified in the
       matcher should match the metadata presented by xDS client.
       MATCH_ALL: The metadata presented by the xDS client should
       contain all of the labels specified here.
      
       The selection is determined based on the best match. For
       example, suppose there are three EndpointPolicy
       resources P1, P2 and P3 and if P1 has a the matcher as
       MATCH_ANY <A:1, B:1>, P2 has MATCH_ALL <A:1,B:1>, and P3 has
       MATCH_ALL <A:1,B:1,C:1>.
      
       If a client with label <A:1> connects, the config from P1
       will be selected.
      
       If a client with label <A:1,B:1> connects, the config from P2
       will be selected.
      
       If a client with label <A:1,B:1,C:1> connects, the config
       from P3 will be selected.
      
       If there is more than one best match, (for example, if a
       config P4 with selector <A:1,D:1> exists and if a client with
       label <A:1,B:1,D:1> connects), pick up the one with older creation time.
       
      .google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabelMatchCriteria metadata_label_match_criteria = 1;
      Specified by:
      getMetadataLabelMatchCriteriaValue in interface EndpointMatcher.MetadataLabelMatcherOrBuilder
      Returns:
      The enum numeric value on the wire for metadataLabelMatchCriteria.
    • setMetadataLabelMatchCriteriaValue

      public EndpointMatcher.MetadataLabelMatcher.Builder setMetadataLabelMatchCriteriaValue(int value)
       Specifies how matching should be done.
      
       Supported values are:
       MATCH_ANY: At least one of the Labels specified in the
       matcher should match the metadata presented by xDS client.
       MATCH_ALL: The metadata presented by the xDS client should
       contain all of the labels specified here.
      
       The selection is determined based on the best match. For
       example, suppose there are three EndpointPolicy
       resources P1, P2 and P3 and if P1 has a the matcher as
       MATCH_ANY <A:1, B:1>, P2 has MATCH_ALL <A:1,B:1>, and P3 has
       MATCH_ALL <A:1,B:1,C:1>.
      
       If a client with label <A:1> connects, the config from P1
       will be selected.
      
       If a client with label <A:1,B:1> connects, the config from P2
       will be selected.
      
       If a client with label <A:1,B:1,C:1> connects, the config
       from P3 will be selected.
      
       If there is more than one best match, (for example, if a
       config P4 with selector <A:1,D:1> exists and if a client with
       label <A:1,B:1,D:1> connects), pick up the one with older creation time.
       
      .google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabelMatchCriteria metadata_label_match_criteria = 1;
      Parameters:
      value - The enum numeric value on the wire for metadataLabelMatchCriteria to set.
      Returns:
      This builder for chaining.
    • getMetadataLabelMatchCriteria

       Specifies how matching should be done.
      
       Supported values are:
       MATCH_ANY: At least one of the Labels specified in the
       matcher should match the metadata presented by xDS client.
       MATCH_ALL: The metadata presented by the xDS client should
       contain all of the labels specified here.
      
       The selection is determined based on the best match. For
       example, suppose there are three EndpointPolicy
       resources P1, P2 and P3 and if P1 has a the matcher as
       MATCH_ANY <A:1, B:1>, P2 has MATCH_ALL <A:1,B:1>, and P3 has
       MATCH_ALL <A:1,B:1,C:1>.
      
       If a client with label <A:1> connects, the config from P1
       will be selected.
      
       If a client with label <A:1,B:1> connects, the config from P2
       will be selected.
      
       If a client with label <A:1,B:1,C:1> connects, the config
       from P3 will be selected.
      
       If there is more than one best match, (for example, if a
       config P4 with selector <A:1,D:1> exists and if a client with
       label <A:1,B:1,D:1> connects), pick up the one with older creation time.
       
      .google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabelMatchCriteria metadata_label_match_criteria = 1;
      Specified by:
      getMetadataLabelMatchCriteria in interface EndpointMatcher.MetadataLabelMatcherOrBuilder
      Returns:
      The metadataLabelMatchCriteria.
    • setMetadataLabelMatchCriteria

       Specifies how matching should be done.
      
       Supported values are:
       MATCH_ANY: At least one of the Labels specified in the
       matcher should match the metadata presented by xDS client.
       MATCH_ALL: The metadata presented by the xDS client should
       contain all of the labels specified here.
      
       The selection is determined based on the best match. For
       example, suppose there are three EndpointPolicy
       resources P1, P2 and P3 and if P1 has a the matcher as
       MATCH_ANY <A:1, B:1>, P2 has MATCH_ALL <A:1,B:1>, and P3 has
       MATCH_ALL <A:1,B:1,C:1>.
      
       If a client with label <A:1> connects, the config from P1
       will be selected.
      
       If a client with label <A:1,B:1> connects, the config from P2
       will be selected.
      
       If a client with label <A:1,B:1,C:1> connects, the config
       from P3 will be selected.
      
       If there is more than one best match, (for example, if a
       config P4 with selector <A:1,D:1> exists and if a client with
       label <A:1,B:1,D:1> connects), pick up the one with older creation time.
       
      .google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabelMatchCriteria metadata_label_match_criteria = 1;
      Parameters:
      value - The metadataLabelMatchCriteria to set.
      Returns:
      This builder for chaining.
    • clearMetadataLabelMatchCriteria

      public EndpointMatcher.MetadataLabelMatcher.Builder clearMetadataLabelMatchCriteria()
       Specifies how matching should be done.
      
       Supported values are:
       MATCH_ANY: At least one of the Labels specified in the
       matcher should match the metadata presented by xDS client.
       MATCH_ALL: The metadata presented by the xDS client should
       contain all of the labels specified here.
      
       The selection is determined based on the best match. For
       example, suppose there are three EndpointPolicy
       resources P1, P2 and P3 and if P1 has a the matcher as
       MATCH_ANY <A:1, B:1>, P2 has MATCH_ALL <A:1,B:1>, and P3 has
       MATCH_ALL <A:1,B:1,C:1>.
      
       If a client with label <A:1> connects, the config from P1
       will be selected.
      
       If a client with label <A:1,B:1> connects, the config from P2
       will be selected.
      
       If a client with label <A:1,B:1,C:1> connects, the config
       from P3 will be selected.
      
       If there is more than one best match, (for example, if a
       config P4 with selector <A:1,D:1> exists and if a client with
       label <A:1,B:1,D:1> connects), pick up the one with older creation time.
       
      .google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabelMatchCriteria metadata_label_match_criteria = 1;
      Returns:
      This builder for chaining.
    • getMetadataLabelsList

       The list of label value pairs that must match labels in the
       provided metadata based on filterMatchCriteria This list can
       have at most 64 entries. The list can be empty if the match
       criteria is MATCH_ANY, to specify a wildcard match (i.e this
       matches any client).
       
      repeated .google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabels metadata_labels = 2;
      Specified by:
      getMetadataLabelsList in interface EndpointMatcher.MetadataLabelMatcherOrBuilder
    • getMetadataLabelsCount

      public int getMetadataLabelsCount()
       The list of label value pairs that must match labels in the
       provided metadata based on filterMatchCriteria This list can
       have at most 64 entries. The list can be empty if the match
       criteria is MATCH_ANY, to specify a wildcard match (i.e this
       matches any client).
       
      repeated .google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabels metadata_labels = 2;
      Specified by:
      getMetadataLabelsCount in interface EndpointMatcher.MetadataLabelMatcherOrBuilder
    • getMetadataLabels

      public EndpointMatcher.MetadataLabelMatcher.MetadataLabels getMetadataLabels(int index)
       The list of label value pairs that must match labels in the
       provided metadata based on filterMatchCriteria This list can
       have at most 64 entries. The list can be empty if the match
       criteria is MATCH_ANY, to specify a wildcard match (i.e this
       matches any client).
       
      repeated .google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabels metadata_labels = 2;
      Specified by:
      getMetadataLabels in interface EndpointMatcher.MetadataLabelMatcherOrBuilder
    • setMetadataLabels

       The list of label value pairs that must match labels in the
       provided metadata based on filterMatchCriteria This list can
       have at most 64 entries. The list can be empty if the match
       criteria is MATCH_ANY, to specify a wildcard match (i.e this
       matches any client).
       
      repeated .google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabels metadata_labels = 2;
    • setMetadataLabels

       The list of label value pairs that must match labels in the
       provided metadata based on filterMatchCriteria This list can
       have at most 64 entries. The list can be empty if the match
       criteria is MATCH_ANY, to specify a wildcard match (i.e this
       matches any client).
       
      repeated .google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabels metadata_labels = 2;
    • addMetadataLabels

       The list of label value pairs that must match labels in the
       provided metadata based on filterMatchCriteria This list can
       have at most 64 entries. The list can be empty if the match
       criteria is MATCH_ANY, to specify a wildcard match (i.e this
       matches any client).
       
      repeated .google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabels metadata_labels = 2;
    • addMetadataLabels

       The list of label value pairs that must match labels in the
       provided metadata based on filterMatchCriteria This list can
       have at most 64 entries. The list can be empty if the match
       criteria is MATCH_ANY, to specify a wildcard match (i.e this
       matches any client).
       
      repeated .google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabels metadata_labels = 2;
    • addMetadataLabels

       The list of label value pairs that must match labels in the
       provided metadata based on filterMatchCriteria This list can
       have at most 64 entries. The list can be empty if the match
       criteria is MATCH_ANY, to specify a wildcard match (i.e this
       matches any client).
       
      repeated .google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabels metadata_labels = 2;
    • addMetadataLabels

       The list of label value pairs that must match labels in the
       provided metadata based on filterMatchCriteria This list can
       have at most 64 entries. The list can be empty if the match
       criteria is MATCH_ANY, to specify a wildcard match (i.e this
       matches any client).
       
      repeated .google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabels metadata_labels = 2;
    • addAllMetadataLabels

       The list of label value pairs that must match labels in the
       provided metadata based on filterMatchCriteria This list can
       have at most 64 entries. The list can be empty if the match
       criteria is MATCH_ANY, to specify a wildcard match (i.e this
       matches any client).
       
      repeated .google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabels metadata_labels = 2;
    • clearMetadataLabels

      public EndpointMatcher.MetadataLabelMatcher.Builder clearMetadataLabels()
       The list of label value pairs that must match labels in the
       provided metadata based on filterMatchCriteria This list can
       have at most 64 entries. The list can be empty if the match
       criteria is MATCH_ANY, to specify a wildcard match (i.e this
       matches any client).
       
      repeated .google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabels metadata_labels = 2;
    • removeMetadataLabels

      public EndpointMatcher.MetadataLabelMatcher.Builder removeMetadataLabels(int index)
       The list of label value pairs that must match labels in the
       provided metadata based on filterMatchCriteria This list can
       have at most 64 entries. The list can be empty if the match
       criteria is MATCH_ANY, to specify a wildcard match (i.e this
       matches any client).
       
      repeated .google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabels metadata_labels = 2;
    • getMetadataLabelsBuilder

      public EndpointMatcher.MetadataLabelMatcher.MetadataLabels.Builder getMetadataLabelsBuilder(int index)
       The list of label value pairs that must match labels in the
       provided metadata based on filterMatchCriteria This list can
       have at most 64 entries. The list can be empty if the match
       criteria is MATCH_ANY, to specify a wildcard match (i.e this
       matches any client).
       
      repeated .google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabels metadata_labels = 2;
    • getMetadataLabelsOrBuilder

      public EndpointMatcher.MetadataLabelMatcher.MetadataLabelsOrBuilder getMetadataLabelsOrBuilder(int index)
       The list of label value pairs that must match labels in the
       provided metadata based on filterMatchCriteria This list can
       have at most 64 entries. The list can be empty if the match
       criteria is MATCH_ANY, to specify a wildcard match (i.e this
       matches any client).
       
      repeated .google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabels metadata_labels = 2;
      Specified by:
      getMetadataLabelsOrBuilder in interface EndpointMatcher.MetadataLabelMatcherOrBuilder
    • getMetadataLabelsOrBuilderList

      public List<? extends EndpointMatcher.MetadataLabelMatcher.MetadataLabelsOrBuilder> getMetadataLabelsOrBuilderList()
       The list of label value pairs that must match labels in the
       provided metadata based on filterMatchCriteria This list can
       have at most 64 entries. The list can be empty if the match
       criteria is MATCH_ANY, to specify a wildcard match (i.e this
       matches any client).
       
      repeated .google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabels metadata_labels = 2;
      Specified by:
      getMetadataLabelsOrBuilderList in interface EndpointMatcher.MetadataLabelMatcherOrBuilder
    • addMetadataLabelsBuilder

       The list of label value pairs that must match labels in the
       provided metadata based on filterMatchCriteria This list can
       have at most 64 entries. The list can be empty if the match
       criteria is MATCH_ANY, to specify a wildcard match (i.e this
       matches any client).
       
      repeated .google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabels metadata_labels = 2;
    • addMetadataLabelsBuilder

      public EndpointMatcher.MetadataLabelMatcher.MetadataLabels.Builder addMetadataLabelsBuilder(int index)
       The list of label value pairs that must match labels in the
       provided metadata based on filterMatchCriteria This list can
       have at most 64 entries. The list can be empty if the match
       criteria is MATCH_ANY, to specify a wildcard match (i.e this
       matches any client).
       
      repeated .google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabels metadata_labels = 2;
    • getMetadataLabelsBuilderList

      public List<EndpointMatcher.MetadataLabelMatcher.MetadataLabels.Builder> getMetadataLabelsBuilderList()
       The list of label value pairs that must match labels in the
       provided metadata based on filterMatchCriteria This list can
       have at most 64 entries. The list can be empty if the match
       criteria is MATCH_ANY, to specify a wildcard match (i.e this
       matches any client).
       
      repeated .google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabels metadata_labels = 2;