Class MatcherClusterSpecifier.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<MatcherClusterSpecifier.Builder>
io.envoyproxy.envoy.extensions.router.cluster_specifiers.matcher.v3.MatcherClusterSpecifier.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, MatcherClusterSpecifierOrBuilder, Cloneable
Enclosing class:
MatcherClusterSpecifier

public static final class MatcherClusterSpecifier.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<MatcherClusterSpecifier.Builder> implements MatcherClusterSpecifierOrBuilder
Protobuf type envoy.extensions.router.cluster_specifiers.matcher.v3.MatcherClusterSpecifier
  • 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<MatcherClusterSpecifier.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<MatcherClusterSpecifier.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<MatcherClusterSpecifier.Builder>
    • getDefaultInstanceForType

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

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

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

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

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

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

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

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

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

      public MatcherClusterSpecifier.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<MatcherClusterSpecifier.Builder>
      Throws:
      IOException
    • hasClusterMatcher

      public boolean hasClusterMatcher()
       The matcher for cluster selection after the route has been selected. This is used when the
       route has multiple clusters (like multiple clusters for different users) and the matcher
       is used to select the cluster to use for the request.
      
       The match tree to use for grouping incoming requests into buckets.
      
       Example:
      
       .. validated-code-block:: yaml
         :type-name: xds.type.matcher.v3.Matcher
      
         matcher_list:
           matchers:
           - predicate:
               single_predicate:
                 input:
                   typed_config:
                     '@type': type.googleapis.com/envoy.type.matcher.v3.HttpRequestHeaderMatchInput
                     header_name: env
                 value_match:
                   exact: staging
             on_match:
               action:
                 typed_config:
                   '@type': type.googleapis.com/envoy.extensions.router.cluster_specifiers.matcher.v3.ClusterAction
                   cluster: "staging-cluster"
      
           - predicate:
               single_predicate:
                 input:
                   typed_config:
                     '@type': type.googleapis.com/envoy.type.matcher.v3.HttpRequestHeaderMatchInput
                     header_name: env
                 value_match:
                   exact: prod
             on_match:
               action:
                 typed_config:
                   '@type': type.googleapis.com/envoy.extensions.router.cluster_specifiers.matcher.v3.ClusterAction
                   cluster: "prod-cluster"
      
         # Catch-all with a default cluster.
         on_no_match:
           action:
             typed_config:
               '@type': type.googleapis.com/envoy.extensions.router.cluster_specifiers.matcher.v3.ClusterAction
               cluster: "default-cluster"
       
      .xds.type.matcher.v3.Matcher cluster_matcher = 1 [(.validate.rules) = { ... }
      Specified by:
      hasClusterMatcher in interface MatcherClusterSpecifierOrBuilder
      Returns:
      Whether the clusterMatcher field is set.
    • getClusterMatcher

      public Matcher getClusterMatcher()
       The matcher for cluster selection after the route has been selected. This is used when the
       route has multiple clusters (like multiple clusters for different users) and the matcher
       is used to select the cluster to use for the request.
      
       The match tree to use for grouping incoming requests into buckets.
      
       Example:
      
       .. validated-code-block:: yaml
         :type-name: xds.type.matcher.v3.Matcher
      
         matcher_list:
           matchers:
           - predicate:
               single_predicate:
                 input:
                   typed_config:
                     '@type': type.googleapis.com/envoy.type.matcher.v3.HttpRequestHeaderMatchInput
                     header_name: env
                 value_match:
                   exact: staging
             on_match:
               action:
                 typed_config:
                   '@type': type.googleapis.com/envoy.extensions.router.cluster_specifiers.matcher.v3.ClusterAction
                   cluster: "staging-cluster"
      
           - predicate:
               single_predicate:
                 input:
                   typed_config:
                     '@type': type.googleapis.com/envoy.type.matcher.v3.HttpRequestHeaderMatchInput
                     header_name: env
                 value_match:
                   exact: prod
             on_match:
               action:
                 typed_config:
                   '@type': type.googleapis.com/envoy.extensions.router.cluster_specifiers.matcher.v3.ClusterAction
                   cluster: "prod-cluster"
      
         # Catch-all with a default cluster.
         on_no_match:
           action:
             typed_config:
               '@type': type.googleapis.com/envoy.extensions.router.cluster_specifiers.matcher.v3.ClusterAction
               cluster: "default-cluster"
       
      .xds.type.matcher.v3.Matcher cluster_matcher = 1 [(.validate.rules) = { ... }
      Specified by:
      getClusterMatcher in interface MatcherClusterSpecifierOrBuilder
      Returns:
      The clusterMatcher.
    • setClusterMatcher

      public MatcherClusterSpecifier.Builder setClusterMatcher(Matcher value)
       The matcher for cluster selection after the route has been selected. This is used when the
       route has multiple clusters (like multiple clusters for different users) and the matcher
       is used to select the cluster to use for the request.
      
       The match tree to use for grouping incoming requests into buckets.
      
       Example:
      
       .. validated-code-block:: yaml
         :type-name: xds.type.matcher.v3.Matcher
      
         matcher_list:
           matchers:
           - predicate:
               single_predicate:
                 input:
                   typed_config:
                     '@type': type.googleapis.com/envoy.type.matcher.v3.HttpRequestHeaderMatchInput
                     header_name: env
                 value_match:
                   exact: staging
             on_match:
               action:
                 typed_config:
                   '@type': type.googleapis.com/envoy.extensions.router.cluster_specifiers.matcher.v3.ClusterAction
                   cluster: "staging-cluster"
      
           - predicate:
               single_predicate:
                 input:
                   typed_config:
                     '@type': type.googleapis.com/envoy.type.matcher.v3.HttpRequestHeaderMatchInput
                     header_name: env
                 value_match:
                   exact: prod
             on_match:
               action:
                 typed_config:
                   '@type': type.googleapis.com/envoy.extensions.router.cluster_specifiers.matcher.v3.ClusterAction
                   cluster: "prod-cluster"
      
         # Catch-all with a default cluster.
         on_no_match:
           action:
             typed_config:
               '@type': type.googleapis.com/envoy.extensions.router.cluster_specifiers.matcher.v3.ClusterAction
               cluster: "default-cluster"
       
      .xds.type.matcher.v3.Matcher cluster_matcher = 1 [(.validate.rules) = { ... }
    • setClusterMatcher

      public MatcherClusterSpecifier.Builder setClusterMatcher(Matcher.Builder builderForValue)
       The matcher for cluster selection after the route has been selected. This is used when the
       route has multiple clusters (like multiple clusters for different users) and the matcher
       is used to select the cluster to use for the request.
      
       The match tree to use for grouping incoming requests into buckets.
      
       Example:
      
       .. validated-code-block:: yaml
         :type-name: xds.type.matcher.v3.Matcher
      
         matcher_list:
           matchers:
           - predicate:
               single_predicate:
                 input:
                   typed_config:
                     '@type': type.googleapis.com/envoy.type.matcher.v3.HttpRequestHeaderMatchInput
                     header_name: env
                 value_match:
                   exact: staging
             on_match:
               action:
                 typed_config:
                   '@type': type.googleapis.com/envoy.extensions.router.cluster_specifiers.matcher.v3.ClusterAction
                   cluster: "staging-cluster"
      
           - predicate:
               single_predicate:
                 input:
                   typed_config:
                     '@type': type.googleapis.com/envoy.type.matcher.v3.HttpRequestHeaderMatchInput
                     header_name: env
                 value_match:
                   exact: prod
             on_match:
               action:
                 typed_config:
                   '@type': type.googleapis.com/envoy.extensions.router.cluster_specifiers.matcher.v3.ClusterAction
                   cluster: "prod-cluster"
      
         # Catch-all with a default cluster.
         on_no_match:
           action:
             typed_config:
               '@type': type.googleapis.com/envoy.extensions.router.cluster_specifiers.matcher.v3.ClusterAction
               cluster: "default-cluster"
       
      .xds.type.matcher.v3.Matcher cluster_matcher = 1 [(.validate.rules) = { ... }
    • mergeClusterMatcher

      public MatcherClusterSpecifier.Builder mergeClusterMatcher(Matcher value)
       The matcher for cluster selection after the route has been selected. This is used when the
       route has multiple clusters (like multiple clusters for different users) and the matcher
       is used to select the cluster to use for the request.
      
       The match tree to use for grouping incoming requests into buckets.
      
       Example:
      
       .. validated-code-block:: yaml
         :type-name: xds.type.matcher.v3.Matcher
      
         matcher_list:
           matchers:
           - predicate:
               single_predicate:
                 input:
                   typed_config:
                     '@type': type.googleapis.com/envoy.type.matcher.v3.HttpRequestHeaderMatchInput
                     header_name: env
                 value_match:
                   exact: staging
             on_match:
               action:
                 typed_config:
                   '@type': type.googleapis.com/envoy.extensions.router.cluster_specifiers.matcher.v3.ClusterAction
                   cluster: "staging-cluster"
      
           - predicate:
               single_predicate:
                 input:
                   typed_config:
                     '@type': type.googleapis.com/envoy.type.matcher.v3.HttpRequestHeaderMatchInput
                     header_name: env
                 value_match:
                   exact: prod
             on_match:
               action:
                 typed_config:
                   '@type': type.googleapis.com/envoy.extensions.router.cluster_specifiers.matcher.v3.ClusterAction
                   cluster: "prod-cluster"
      
         # Catch-all with a default cluster.
         on_no_match:
           action:
             typed_config:
               '@type': type.googleapis.com/envoy.extensions.router.cluster_specifiers.matcher.v3.ClusterAction
               cluster: "default-cluster"
       
      .xds.type.matcher.v3.Matcher cluster_matcher = 1 [(.validate.rules) = { ... }
    • clearClusterMatcher

      public MatcherClusterSpecifier.Builder clearClusterMatcher()
       The matcher for cluster selection after the route has been selected. This is used when the
       route has multiple clusters (like multiple clusters for different users) and the matcher
       is used to select the cluster to use for the request.
      
       The match tree to use for grouping incoming requests into buckets.
      
       Example:
      
       .. validated-code-block:: yaml
         :type-name: xds.type.matcher.v3.Matcher
      
         matcher_list:
           matchers:
           - predicate:
               single_predicate:
                 input:
                   typed_config:
                     '@type': type.googleapis.com/envoy.type.matcher.v3.HttpRequestHeaderMatchInput
                     header_name: env
                 value_match:
                   exact: staging
             on_match:
               action:
                 typed_config:
                   '@type': type.googleapis.com/envoy.extensions.router.cluster_specifiers.matcher.v3.ClusterAction
                   cluster: "staging-cluster"
      
           - predicate:
               single_predicate:
                 input:
                   typed_config:
                     '@type': type.googleapis.com/envoy.type.matcher.v3.HttpRequestHeaderMatchInput
                     header_name: env
                 value_match:
                   exact: prod
             on_match:
               action:
                 typed_config:
                   '@type': type.googleapis.com/envoy.extensions.router.cluster_specifiers.matcher.v3.ClusterAction
                   cluster: "prod-cluster"
      
         # Catch-all with a default cluster.
         on_no_match:
           action:
             typed_config:
               '@type': type.googleapis.com/envoy.extensions.router.cluster_specifiers.matcher.v3.ClusterAction
               cluster: "default-cluster"
       
      .xds.type.matcher.v3.Matcher cluster_matcher = 1 [(.validate.rules) = { ... }
    • getClusterMatcherBuilder

      public Matcher.Builder getClusterMatcherBuilder()
       The matcher for cluster selection after the route has been selected. This is used when the
       route has multiple clusters (like multiple clusters for different users) and the matcher
       is used to select the cluster to use for the request.
      
       The match tree to use for grouping incoming requests into buckets.
      
       Example:
      
       .. validated-code-block:: yaml
         :type-name: xds.type.matcher.v3.Matcher
      
         matcher_list:
           matchers:
           - predicate:
               single_predicate:
                 input:
                   typed_config:
                     '@type': type.googleapis.com/envoy.type.matcher.v3.HttpRequestHeaderMatchInput
                     header_name: env
                 value_match:
                   exact: staging
             on_match:
               action:
                 typed_config:
                   '@type': type.googleapis.com/envoy.extensions.router.cluster_specifiers.matcher.v3.ClusterAction
                   cluster: "staging-cluster"
      
           - predicate:
               single_predicate:
                 input:
                   typed_config:
                     '@type': type.googleapis.com/envoy.type.matcher.v3.HttpRequestHeaderMatchInput
                     header_name: env
                 value_match:
                   exact: prod
             on_match:
               action:
                 typed_config:
                   '@type': type.googleapis.com/envoy.extensions.router.cluster_specifiers.matcher.v3.ClusterAction
                   cluster: "prod-cluster"
      
         # Catch-all with a default cluster.
         on_no_match:
           action:
             typed_config:
               '@type': type.googleapis.com/envoy.extensions.router.cluster_specifiers.matcher.v3.ClusterAction
               cluster: "default-cluster"
       
      .xds.type.matcher.v3.Matcher cluster_matcher = 1 [(.validate.rules) = { ... }
    • getClusterMatcherOrBuilder

      public MatcherOrBuilder getClusterMatcherOrBuilder()
       The matcher for cluster selection after the route has been selected. This is used when the
       route has multiple clusters (like multiple clusters for different users) and the matcher
       is used to select the cluster to use for the request.
      
       The match tree to use for grouping incoming requests into buckets.
      
       Example:
      
       .. validated-code-block:: yaml
         :type-name: xds.type.matcher.v3.Matcher
      
         matcher_list:
           matchers:
           - predicate:
               single_predicate:
                 input:
                   typed_config:
                     '@type': type.googleapis.com/envoy.type.matcher.v3.HttpRequestHeaderMatchInput
                     header_name: env
                 value_match:
                   exact: staging
             on_match:
               action:
                 typed_config:
                   '@type': type.googleapis.com/envoy.extensions.router.cluster_specifiers.matcher.v3.ClusterAction
                   cluster: "staging-cluster"
      
           - predicate:
               single_predicate:
                 input:
                   typed_config:
                     '@type': type.googleapis.com/envoy.type.matcher.v3.HttpRequestHeaderMatchInput
                     header_name: env
                 value_match:
                   exact: prod
             on_match:
               action:
                 typed_config:
                   '@type': type.googleapis.com/envoy.extensions.router.cluster_specifiers.matcher.v3.ClusterAction
                   cluster: "prod-cluster"
      
         # Catch-all with a default cluster.
         on_no_match:
           action:
             typed_config:
               '@type': type.googleapis.com/envoy.extensions.router.cluster_specifiers.matcher.v3.ClusterAction
               cluster: "default-cluster"
       
      .xds.type.matcher.v3.Matcher cluster_matcher = 1 [(.validate.rules) = { ... }
      Specified by:
      getClusterMatcherOrBuilder in interface MatcherClusterSpecifierOrBuilder
    • setUnknownFields

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

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