All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.envoyproxy.envoy.config.route.v3.WeightedCluster Maven / Gradle / Ivy

The newest version!
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: envoy/config/route/v3/route_components.proto

// Protobuf Java Version: 3.25.5
package io.envoyproxy.envoy.config.route.v3;

/**
 * 
 * Compared to the :ref:`cluster <envoy_v3_api_field_config.route.v3.RouteAction.cluster>` field that specifies a
 * single upstream cluster as the target of a request, the :ref:`weighted_clusters
 * <envoy_v3_api_field_config.route.v3.RouteAction.weighted_clusters>` option allows for specification of
 * multiple upstream clusters along with weights that indicate the percentage of
 * traffic to be forwarded to each cluster. The router selects an upstream cluster based on the
 * weights.
 * 
* * Protobuf type {@code envoy.config.route.v3.WeightedCluster} */ public final class WeightedCluster extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:envoy.config.route.v3.WeightedCluster) WeightedClusterOrBuilder { private static final long serialVersionUID = 0L; // Use WeightedCluster.newBuilder() to construct. private WeightedCluster(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private WeightedCluster() { clusters_ = java.util.Collections.emptyList(); runtimeKeyPrefix_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new WeightedCluster(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_WeightedCluster_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_WeightedCluster_fieldAccessorTable .ensureFieldAccessorsInitialized( io.envoyproxy.envoy.config.route.v3.WeightedCluster.class, io.envoyproxy.envoy.config.route.v3.WeightedCluster.Builder.class); } public interface ClusterWeightOrBuilder extends // @@protoc_insertion_point(interface_extends:envoy.config.route.v3.WeightedCluster.ClusterWeight) com.google.protobuf.MessageOrBuilder { /** *
     * Only one of ``name`` and ``cluster_header`` may be specified.
     * [#next-major-version: Need to add back the validation rule: (validate.rules).string = {min_len: 1}]
     * Name of the upstream cluster. The cluster must exist in the
     * :ref:`cluster manager configuration <config_cluster_manager>`.
     * 
* * string name = 1 [(.udpa.annotations.field_migrate) = { ... } * @return The name. */ java.lang.String getName(); /** *
     * Only one of ``name`` and ``cluster_header`` may be specified.
     * [#next-major-version: Need to add back the validation rule: (validate.rules).string = {min_len: 1}]
     * Name of the upstream cluster. The cluster must exist in the
     * :ref:`cluster manager configuration <config_cluster_manager>`.
     * 
* * string name = 1 [(.udpa.annotations.field_migrate) = { ... } * @return The bytes for name. */ com.google.protobuf.ByteString getNameBytes(); /** *
     * Only one of ``name`` and ``cluster_header`` may be specified.
     * [#next-major-version: Need to add back the validation rule: (validate.rules).string = {min_len: 1 }]
     * Envoy will determine the cluster to route to by reading the value of the
     * HTTP header named by cluster_header from the request headers. If the
     * header is not found or the referenced cluster does not exist, Envoy will
     * return a 404 response.
     *
     * .. attention::
     *
     *   Internally, Envoy always uses the HTTP/2 ``:authority`` header to represent the HTTP/1
     *   ``Host`` header. Thus, if attempting to match on ``Host``, match on ``:authority`` instead.
     *
     * .. note::
     *
     *   If the header appears multiple times only the first value is used.
     * 
* * string cluster_header = 12 [(.validate.rules) = { ... } * @return The clusterHeader. */ java.lang.String getClusterHeader(); /** *
     * Only one of ``name`` and ``cluster_header`` may be specified.
     * [#next-major-version: Need to add back the validation rule: (validate.rules).string = {min_len: 1 }]
     * Envoy will determine the cluster to route to by reading the value of the
     * HTTP header named by cluster_header from the request headers. If the
     * header is not found or the referenced cluster does not exist, Envoy will
     * return a 404 response.
     *
     * .. attention::
     *
     *   Internally, Envoy always uses the HTTP/2 ``:authority`` header to represent the HTTP/1
     *   ``Host`` header. Thus, if attempting to match on ``Host``, match on ``:authority`` instead.
     *
     * .. note::
     *
     *   If the header appears multiple times only the first value is used.
     * 
* * string cluster_header = 12 [(.validate.rules) = { ... } * @return The bytes for clusterHeader. */ com.google.protobuf.ByteString getClusterHeaderBytes(); /** *
     * The weight of the cluster. This value is relative to the other clusters'
     * weights. When a request matches the route, the choice of an upstream cluster
     * is determined by its weight. The sum of weights across all
     * entries in the clusters array must be greater than 0, and must not exceed
     * uint32_t maximal value (4294967295).
     * 
* * .google.protobuf.UInt32Value weight = 2; * @return Whether the weight field is set. */ boolean hasWeight(); /** *
     * The weight of the cluster. This value is relative to the other clusters'
     * weights. When a request matches the route, the choice of an upstream cluster
     * is determined by its weight. The sum of weights across all
     * entries in the clusters array must be greater than 0, and must not exceed
     * uint32_t maximal value (4294967295).
     * 
* * .google.protobuf.UInt32Value weight = 2; * @return The weight. */ com.google.protobuf.UInt32Value getWeight(); /** *
     * The weight of the cluster. This value is relative to the other clusters'
     * weights. When a request matches the route, the choice of an upstream cluster
     * is determined by its weight. The sum of weights across all
     * entries in the clusters array must be greater than 0, and must not exceed
     * uint32_t maximal value (4294967295).
     * 
* * .google.protobuf.UInt32Value weight = 2; */ com.google.protobuf.UInt32ValueOrBuilder getWeightOrBuilder(); /** *
     * Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints in
     * the upstream cluster with metadata matching what is set in this field will be considered for
     * load balancing. Note that this will be merged with what's provided in
     * :ref:`RouteAction.metadata_match <envoy_v3_api_field_config.route.v3.RouteAction.metadata_match>`, with
     * values here taking precedence. The filter name should be specified as ``envoy.lb``.
     * 
* * .envoy.config.core.v3.Metadata metadata_match = 3; * @return Whether the metadataMatch field is set. */ boolean hasMetadataMatch(); /** *
     * Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints in
     * the upstream cluster with metadata matching what is set in this field will be considered for
     * load balancing. Note that this will be merged with what's provided in
     * :ref:`RouteAction.metadata_match <envoy_v3_api_field_config.route.v3.RouteAction.metadata_match>`, with
     * values here taking precedence. The filter name should be specified as ``envoy.lb``.
     * 
* * .envoy.config.core.v3.Metadata metadata_match = 3; * @return The metadataMatch. */ io.envoyproxy.envoy.config.core.v3.Metadata getMetadataMatch(); /** *
     * Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints in
     * the upstream cluster with metadata matching what is set in this field will be considered for
     * load balancing. Note that this will be merged with what's provided in
     * :ref:`RouteAction.metadata_match <envoy_v3_api_field_config.route.v3.RouteAction.metadata_match>`, with
     * values here taking precedence. The filter name should be specified as ``envoy.lb``.
     * 
* * .envoy.config.core.v3.Metadata metadata_match = 3; */ io.envoyproxy.envoy.config.core.v3.MetadataOrBuilder getMetadataMatchOrBuilder(); /** *
     * Specifies a list of headers to be added to requests when this cluster is selected
     * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
     * Headers specified at this level are applied before headers from the enclosing
     * :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and
     * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
     * header value syntax, see the documentation on :ref:`custom request headers
     * <config_http_conn_man_headers_custom_request_headers>`.
     * 
* * repeated .envoy.config.core.v3.HeaderValueOption request_headers_to_add = 4 [(.validate.rules) = { ... } */ java.util.List getRequestHeadersToAddList(); /** *
     * Specifies a list of headers to be added to requests when this cluster is selected
     * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
     * Headers specified at this level are applied before headers from the enclosing
     * :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and
     * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
     * header value syntax, see the documentation on :ref:`custom request headers
     * <config_http_conn_man_headers_custom_request_headers>`.
     * 
* * repeated .envoy.config.core.v3.HeaderValueOption request_headers_to_add = 4 [(.validate.rules) = { ... } */ io.envoyproxy.envoy.config.core.v3.HeaderValueOption getRequestHeadersToAdd(int index); /** *
     * Specifies a list of headers to be added to requests when this cluster is selected
     * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
     * Headers specified at this level are applied before headers from the enclosing
     * :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and
     * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
     * header value syntax, see the documentation on :ref:`custom request headers
     * <config_http_conn_man_headers_custom_request_headers>`.
     * 
* * repeated .envoy.config.core.v3.HeaderValueOption request_headers_to_add = 4 [(.validate.rules) = { ... } */ int getRequestHeadersToAddCount(); /** *
     * Specifies a list of headers to be added to requests when this cluster is selected
     * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
     * Headers specified at this level are applied before headers from the enclosing
     * :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and
     * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
     * header value syntax, see the documentation on :ref:`custom request headers
     * <config_http_conn_man_headers_custom_request_headers>`.
     * 
* * repeated .envoy.config.core.v3.HeaderValueOption request_headers_to_add = 4 [(.validate.rules) = { ... } */ java.util.List getRequestHeadersToAddOrBuilderList(); /** *
     * Specifies a list of headers to be added to requests when this cluster is selected
     * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
     * Headers specified at this level are applied before headers from the enclosing
     * :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and
     * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
     * header value syntax, see the documentation on :ref:`custom request headers
     * <config_http_conn_man_headers_custom_request_headers>`.
     * 
* * repeated .envoy.config.core.v3.HeaderValueOption request_headers_to_add = 4 [(.validate.rules) = { ... } */ io.envoyproxy.envoy.config.core.v3.HeaderValueOptionOrBuilder getRequestHeadersToAddOrBuilder( int index); /** *
     * Specifies a list of HTTP headers that should be removed from each request when
     * this cluster is selected through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
     * 
* * repeated string request_headers_to_remove = 9 [(.validate.rules) = { ... } * @return A list containing the requestHeadersToRemove. */ java.util.List getRequestHeadersToRemoveList(); /** *
     * Specifies a list of HTTP headers that should be removed from each request when
     * this cluster is selected through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
     * 
* * repeated string request_headers_to_remove = 9 [(.validate.rules) = { ... } * @return The count of requestHeadersToRemove. */ int getRequestHeadersToRemoveCount(); /** *
     * Specifies a list of HTTP headers that should be removed from each request when
     * this cluster is selected through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
     * 
* * repeated string request_headers_to_remove = 9 [(.validate.rules) = { ... } * @param index The index of the element to return. * @return The requestHeadersToRemove at the given index. */ java.lang.String getRequestHeadersToRemove(int index); /** *
     * Specifies a list of HTTP headers that should be removed from each request when
     * this cluster is selected through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
     * 
* * repeated string request_headers_to_remove = 9 [(.validate.rules) = { ... } * @param index The index of the value to return. * @return The bytes of the requestHeadersToRemove at the given index. */ com.google.protobuf.ByteString getRequestHeadersToRemoveBytes(int index); /** *
     * Specifies a list of headers to be added to responses when this cluster is selected
     * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
     * Headers specified at this level are applied before headers from the enclosing
     * :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and
     * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
     * header value syntax, see the documentation on :ref:`custom request headers
     * <config_http_conn_man_headers_custom_request_headers>`.
     * 
* * repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 5 [(.validate.rules) = { ... } */ java.util.List getResponseHeadersToAddList(); /** *
     * Specifies a list of headers to be added to responses when this cluster is selected
     * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
     * Headers specified at this level are applied before headers from the enclosing
     * :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and
     * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
     * header value syntax, see the documentation on :ref:`custom request headers
     * <config_http_conn_man_headers_custom_request_headers>`.
     * 
* * repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 5 [(.validate.rules) = { ... } */ io.envoyproxy.envoy.config.core.v3.HeaderValueOption getResponseHeadersToAdd(int index); /** *
     * Specifies a list of headers to be added to responses when this cluster is selected
     * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
     * Headers specified at this level are applied before headers from the enclosing
     * :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and
     * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
     * header value syntax, see the documentation on :ref:`custom request headers
     * <config_http_conn_man_headers_custom_request_headers>`.
     * 
* * repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 5 [(.validate.rules) = { ... } */ int getResponseHeadersToAddCount(); /** *
     * Specifies a list of headers to be added to responses when this cluster is selected
     * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
     * Headers specified at this level are applied before headers from the enclosing
     * :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and
     * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
     * header value syntax, see the documentation on :ref:`custom request headers
     * <config_http_conn_man_headers_custom_request_headers>`.
     * 
* * repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 5 [(.validate.rules) = { ... } */ java.util.List getResponseHeadersToAddOrBuilderList(); /** *
     * Specifies a list of headers to be added to responses when this cluster is selected
     * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
     * Headers specified at this level are applied before headers from the enclosing
     * :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and
     * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
     * header value syntax, see the documentation on :ref:`custom request headers
     * <config_http_conn_man_headers_custom_request_headers>`.
     * 
* * repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 5 [(.validate.rules) = { ... } */ io.envoyproxy.envoy.config.core.v3.HeaderValueOptionOrBuilder getResponseHeadersToAddOrBuilder( int index); /** *
     * Specifies a list of headers to be removed from responses when this cluster is selected
     * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
     * 
* * repeated string response_headers_to_remove = 6 [(.validate.rules) = { ... } * @return A list containing the responseHeadersToRemove. */ java.util.List getResponseHeadersToRemoveList(); /** *
     * Specifies a list of headers to be removed from responses when this cluster is selected
     * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
     * 
* * repeated string response_headers_to_remove = 6 [(.validate.rules) = { ... } * @return The count of responseHeadersToRemove. */ int getResponseHeadersToRemoveCount(); /** *
     * Specifies a list of headers to be removed from responses when this cluster is selected
     * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
     * 
* * repeated string response_headers_to_remove = 6 [(.validate.rules) = { ... } * @param index The index of the element to return. * @return The responseHeadersToRemove at the given index. */ java.lang.String getResponseHeadersToRemove(int index); /** *
     * Specifies a list of headers to be removed from responses when this cluster is selected
     * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
     * 
* * repeated string response_headers_to_remove = 6 [(.validate.rules) = { ... } * @param index The index of the value to return. * @return The bytes of the responseHeadersToRemove at the given index. */ com.google.protobuf.ByteString getResponseHeadersToRemoveBytes(int index); /** *
     * This field can be used to provide weighted cluster specific per filter config. The key should match the
     * :ref:`filter config name
     * <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpFilter.name>`.
     * See :ref:`Http filter route specific config <arch_overview_http_filters_per_filter_config>`
     * for details.
     * [#comment: An entry's value may be wrapped in a
     * :ref:`FilterConfig<envoy_v3_api_msg_config.route.v3.FilterConfig>`
     * message to specify additional options.]
     * 
* * map<string, .google.protobuf.Any> typed_per_filter_config = 10; */ int getTypedPerFilterConfigCount(); /** *
     * This field can be used to provide weighted cluster specific per filter config. The key should match the
     * :ref:`filter config name
     * <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpFilter.name>`.
     * See :ref:`Http filter route specific config <arch_overview_http_filters_per_filter_config>`
     * for details.
     * [#comment: An entry's value may be wrapped in a
     * :ref:`FilterConfig<envoy_v3_api_msg_config.route.v3.FilterConfig>`
     * message to specify additional options.]
     * 
* * map<string, .google.protobuf.Any> typed_per_filter_config = 10; */ boolean containsTypedPerFilterConfig( java.lang.String key); /** * Use {@link #getTypedPerFilterConfigMap()} instead. */ @java.lang.Deprecated java.util.Map getTypedPerFilterConfig(); /** *
     * This field can be used to provide weighted cluster specific per filter config. The key should match the
     * :ref:`filter config name
     * <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpFilter.name>`.
     * See :ref:`Http filter route specific config <arch_overview_http_filters_per_filter_config>`
     * for details.
     * [#comment: An entry's value may be wrapped in a
     * :ref:`FilterConfig<envoy_v3_api_msg_config.route.v3.FilterConfig>`
     * message to specify additional options.]
     * 
* * map<string, .google.protobuf.Any> typed_per_filter_config = 10; */ java.util.Map getTypedPerFilterConfigMap(); /** *
     * This field can be used to provide weighted cluster specific per filter config. The key should match the
     * :ref:`filter config name
     * <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpFilter.name>`.
     * See :ref:`Http filter route specific config <arch_overview_http_filters_per_filter_config>`
     * for details.
     * [#comment: An entry's value may be wrapped in a
     * :ref:`FilterConfig<envoy_v3_api_msg_config.route.v3.FilterConfig>`
     * message to specify additional options.]
     * 
* * map<string, .google.protobuf.Any> typed_per_filter_config = 10; */ /* nullable */ com.google.protobuf.Any getTypedPerFilterConfigOrDefault( java.lang.String key, /* nullable */ com.google.protobuf.Any defaultValue); /** *
     * This field can be used to provide weighted cluster specific per filter config. The key should match the
     * :ref:`filter config name
     * <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpFilter.name>`.
     * See :ref:`Http filter route specific config <arch_overview_http_filters_per_filter_config>`
     * for details.
     * [#comment: An entry's value may be wrapped in a
     * :ref:`FilterConfig<envoy_v3_api_msg_config.route.v3.FilterConfig>`
     * message to specify additional options.]
     * 
* * map<string, .google.protobuf.Any> typed_per_filter_config = 10; */ com.google.protobuf.Any getTypedPerFilterConfigOrThrow( java.lang.String key); /** *
     * Indicates that during forwarding, the host header will be swapped with
     * this value.
     * 
* * string host_rewrite_literal = 11 [(.validate.rules) = { ... } * @return Whether the hostRewriteLiteral field is set. */ boolean hasHostRewriteLiteral(); /** *
     * Indicates that during forwarding, the host header will be swapped with
     * this value.
     * 
* * string host_rewrite_literal = 11 [(.validate.rules) = { ... } * @return The hostRewriteLiteral. */ java.lang.String getHostRewriteLiteral(); /** *
     * Indicates that during forwarding, the host header will be swapped with
     * this value.
     * 
* * string host_rewrite_literal = 11 [(.validate.rules) = { ... } * @return The bytes for hostRewriteLiteral. */ com.google.protobuf.ByteString getHostRewriteLiteralBytes(); io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight.HostRewriteSpecifierCase getHostRewriteSpecifierCase(); } /** *
   * [#next-free-field: 13]
   * 
* * Protobuf type {@code envoy.config.route.v3.WeightedCluster.ClusterWeight} */ public static final class ClusterWeight extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:envoy.config.route.v3.WeightedCluster.ClusterWeight) ClusterWeightOrBuilder { private static final long serialVersionUID = 0L; // Use ClusterWeight.newBuilder() to construct. private ClusterWeight(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private ClusterWeight() { name_ = ""; clusterHeader_ = ""; requestHeadersToAdd_ = java.util.Collections.emptyList(); requestHeadersToRemove_ = com.google.protobuf.LazyStringArrayList.emptyList(); responseHeadersToAdd_ = java.util.Collections.emptyList(); responseHeadersToRemove_ = com.google.protobuf.LazyStringArrayList.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new ClusterWeight(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_WeightedCluster_ClusterWeight_descriptor; } @SuppressWarnings({"rawtypes"}) @java.lang.Override protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 10: return internalGetTypedPerFilterConfig(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_WeightedCluster_ClusterWeight_fieldAccessorTable .ensureFieldAccessorsInitialized( io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight.class, io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight.Builder.class); } private int bitField0_; private int hostRewriteSpecifierCase_ = 0; @SuppressWarnings("serial") private java.lang.Object hostRewriteSpecifier_; public enum HostRewriteSpecifierCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { HOST_REWRITE_LITERAL(11), HOSTREWRITESPECIFIER_NOT_SET(0); private final int value; private HostRewriteSpecifierCase(int value) { this.value = value; } /** * @param value The number of the enum to look for. * @return The enum associated with the given number. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static HostRewriteSpecifierCase valueOf(int value) { return forNumber(value); } public static HostRewriteSpecifierCase forNumber(int value) { switch (value) { case 11: return HOST_REWRITE_LITERAL; case 0: return HOSTREWRITESPECIFIER_NOT_SET; default: return null; } } public int getNumber() { return this.value; } }; public HostRewriteSpecifierCase getHostRewriteSpecifierCase() { return HostRewriteSpecifierCase.forNumber( hostRewriteSpecifierCase_); } public static final int NAME_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; /** *
     * Only one of ``name`` and ``cluster_header`` may be specified.
     * [#next-major-version: Need to add back the validation rule: (validate.rules).string = {min_len: 1}]
     * Name of the upstream cluster. The cluster must exist in the
     * :ref:`cluster manager configuration <config_cluster_manager>`.
     * 
* * string name = 1 [(.udpa.annotations.field_migrate) = { ... } * @return The name. */ @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } } /** *
     * Only one of ``name`` and ``cluster_header`` may be specified.
     * [#next-major-version: Need to add back the validation rule: (validate.rules).string = {min_len: 1}]
     * Name of the upstream cluster. The cluster must exist in the
     * :ref:`cluster manager configuration <config_cluster_manager>`.
     * 
* * string name = 1 [(.udpa.annotations.field_migrate) = { ... } * @return The bytes for name. */ @java.lang.Override public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int CLUSTER_HEADER_FIELD_NUMBER = 12; @SuppressWarnings("serial") private volatile java.lang.Object clusterHeader_ = ""; /** *
     * Only one of ``name`` and ``cluster_header`` may be specified.
     * [#next-major-version: Need to add back the validation rule: (validate.rules).string = {min_len: 1 }]
     * Envoy will determine the cluster to route to by reading the value of the
     * HTTP header named by cluster_header from the request headers. If the
     * header is not found or the referenced cluster does not exist, Envoy will
     * return a 404 response.
     *
     * .. attention::
     *
     *   Internally, Envoy always uses the HTTP/2 ``:authority`` header to represent the HTTP/1
     *   ``Host`` header. Thus, if attempting to match on ``Host``, match on ``:authority`` instead.
     *
     * .. note::
     *
     *   If the header appears multiple times only the first value is used.
     * 
* * string cluster_header = 12 [(.validate.rules) = { ... } * @return The clusterHeader. */ @java.lang.Override public java.lang.String getClusterHeader() { java.lang.Object ref = clusterHeader_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); clusterHeader_ = s; return s; } } /** *
     * Only one of ``name`` and ``cluster_header`` may be specified.
     * [#next-major-version: Need to add back the validation rule: (validate.rules).string = {min_len: 1 }]
     * Envoy will determine the cluster to route to by reading the value of the
     * HTTP header named by cluster_header from the request headers. If the
     * header is not found or the referenced cluster does not exist, Envoy will
     * return a 404 response.
     *
     * .. attention::
     *
     *   Internally, Envoy always uses the HTTP/2 ``:authority`` header to represent the HTTP/1
     *   ``Host`` header. Thus, if attempting to match on ``Host``, match on ``:authority`` instead.
     *
     * .. note::
     *
     *   If the header appears multiple times only the first value is used.
     * 
* * string cluster_header = 12 [(.validate.rules) = { ... } * @return The bytes for clusterHeader. */ @java.lang.Override public com.google.protobuf.ByteString getClusterHeaderBytes() { java.lang.Object ref = clusterHeader_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); clusterHeader_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int WEIGHT_FIELD_NUMBER = 2; private com.google.protobuf.UInt32Value weight_; /** *
     * The weight of the cluster. This value is relative to the other clusters'
     * weights. When a request matches the route, the choice of an upstream cluster
     * is determined by its weight. The sum of weights across all
     * entries in the clusters array must be greater than 0, and must not exceed
     * uint32_t maximal value (4294967295).
     * 
* * .google.protobuf.UInt32Value weight = 2; * @return Whether the weight field is set. */ @java.lang.Override public boolean hasWeight() { return ((bitField0_ & 0x00000001) != 0); } /** *
     * The weight of the cluster. This value is relative to the other clusters'
     * weights. When a request matches the route, the choice of an upstream cluster
     * is determined by its weight. The sum of weights across all
     * entries in the clusters array must be greater than 0, and must not exceed
     * uint32_t maximal value (4294967295).
     * 
* * .google.protobuf.UInt32Value weight = 2; * @return The weight. */ @java.lang.Override public com.google.protobuf.UInt32Value getWeight() { return weight_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : weight_; } /** *
     * The weight of the cluster. This value is relative to the other clusters'
     * weights. When a request matches the route, the choice of an upstream cluster
     * is determined by its weight. The sum of weights across all
     * entries in the clusters array must be greater than 0, and must not exceed
     * uint32_t maximal value (4294967295).
     * 
* * .google.protobuf.UInt32Value weight = 2; */ @java.lang.Override public com.google.protobuf.UInt32ValueOrBuilder getWeightOrBuilder() { return weight_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : weight_; } public static final int METADATA_MATCH_FIELD_NUMBER = 3; private io.envoyproxy.envoy.config.core.v3.Metadata metadataMatch_; /** *
     * Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints in
     * the upstream cluster with metadata matching what is set in this field will be considered for
     * load balancing. Note that this will be merged with what's provided in
     * :ref:`RouteAction.metadata_match <envoy_v3_api_field_config.route.v3.RouteAction.metadata_match>`, with
     * values here taking precedence. The filter name should be specified as ``envoy.lb``.
     * 
* * .envoy.config.core.v3.Metadata metadata_match = 3; * @return Whether the metadataMatch field is set. */ @java.lang.Override public boolean hasMetadataMatch() { return ((bitField0_ & 0x00000002) != 0); } /** *
     * Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints in
     * the upstream cluster with metadata matching what is set in this field will be considered for
     * load balancing. Note that this will be merged with what's provided in
     * :ref:`RouteAction.metadata_match <envoy_v3_api_field_config.route.v3.RouteAction.metadata_match>`, with
     * values here taking precedence. The filter name should be specified as ``envoy.lb``.
     * 
* * .envoy.config.core.v3.Metadata metadata_match = 3; * @return The metadataMatch. */ @java.lang.Override public io.envoyproxy.envoy.config.core.v3.Metadata getMetadataMatch() { return metadataMatch_ == null ? io.envoyproxy.envoy.config.core.v3.Metadata.getDefaultInstance() : metadataMatch_; } /** *
     * Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints in
     * the upstream cluster with metadata matching what is set in this field will be considered for
     * load balancing. Note that this will be merged with what's provided in
     * :ref:`RouteAction.metadata_match <envoy_v3_api_field_config.route.v3.RouteAction.metadata_match>`, with
     * values here taking precedence. The filter name should be specified as ``envoy.lb``.
     * 
* * .envoy.config.core.v3.Metadata metadata_match = 3; */ @java.lang.Override public io.envoyproxy.envoy.config.core.v3.MetadataOrBuilder getMetadataMatchOrBuilder() { return metadataMatch_ == null ? io.envoyproxy.envoy.config.core.v3.Metadata.getDefaultInstance() : metadataMatch_; } public static final int REQUEST_HEADERS_TO_ADD_FIELD_NUMBER = 4; @SuppressWarnings("serial") private java.util.List requestHeadersToAdd_; /** *
     * Specifies a list of headers to be added to requests when this cluster is selected
     * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
     * Headers specified at this level are applied before headers from the enclosing
     * :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and
     * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
     * header value syntax, see the documentation on :ref:`custom request headers
     * <config_http_conn_man_headers_custom_request_headers>`.
     * 
* * repeated .envoy.config.core.v3.HeaderValueOption request_headers_to_add = 4 [(.validate.rules) = { ... } */ @java.lang.Override public java.util.List getRequestHeadersToAddList() { return requestHeadersToAdd_; } /** *
     * Specifies a list of headers to be added to requests when this cluster is selected
     * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
     * Headers specified at this level are applied before headers from the enclosing
     * :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and
     * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
     * header value syntax, see the documentation on :ref:`custom request headers
     * <config_http_conn_man_headers_custom_request_headers>`.
     * 
* * repeated .envoy.config.core.v3.HeaderValueOption request_headers_to_add = 4 [(.validate.rules) = { ... } */ @java.lang.Override public java.util.List getRequestHeadersToAddOrBuilderList() { return requestHeadersToAdd_; } /** *
     * Specifies a list of headers to be added to requests when this cluster is selected
     * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
     * Headers specified at this level are applied before headers from the enclosing
     * :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and
     * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
     * header value syntax, see the documentation on :ref:`custom request headers
     * <config_http_conn_man_headers_custom_request_headers>`.
     * 
* * repeated .envoy.config.core.v3.HeaderValueOption request_headers_to_add = 4 [(.validate.rules) = { ... } */ @java.lang.Override public int getRequestHeadersToAddCount() { return requestHeadersToAdd_.size(); } /** *
     * Specifies a list of headers to be added to requests when this cluster is selected
     * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
     * Headers specified at this level are applied before headers from the enclosing
     * :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and
     * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
     * header value syntax, see the documentation on :ref:`custom request headers
     * <config_http_conn_man_headers_custom_request_headers>`.
     * 
* * repeated .envoy.config.core.v3.HeaderValueOption request_headers_to_add = 4 [(.validate.rules) = { ... } */ @java.lang.Override public io.envoyproxy.envoy.config.core.v3.HeaderValueOption getRequestHeadersToAdd(int index) { return requestHeadersToAdd_.get(index); } /** *
     * Specifies a list of headers to be added to requests when this cluster is selected
     * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
     * Headers specified at this level are applied before headers from the enclosing
     * :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and
     * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
     * header value syntax, see the documentation on :ref:`custom request headers
     * <config_http_conn_man_headers_custom_request_headers>`.
     * 
* * repeated .envoy.config.core.v3.HeaderValueOption request_headers_to_add = 4 [(.validate.rules) = { ... } */ @java.lang.Override public io.envoyproxy.envoy.config.core.v3.HeaderValueOptionOrBuilder getRequestHeadersToAddOrBuilder( int index) { return requestHeadersToAdd_.get(index); } public static final int REQUEST_HEADERS_TO_REMOVE_FIELD_NUMBER = 9; @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList requestHeadersToRemove_ = com.google.protobuf.LazyStringArrayList.emptyList(); /** *
     * Specifies a list of HTTP headers that should be removed from each request when
     * this cluster is selected through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
     * 
* * repeated string request_headers_to_remove = 9 [(.validate.rules) = { ... } * @return A list containing the requestHeadersToRemove. */ public com.google.protobuf.ProtocolStringList getRequestHeadersToRemoveList() { return requestHeadersToRemove_; } /** *
     * Specifies a list of HTTP headers that should be removed from each request when
     * this cluster is selected through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
     * 
* * repeated string request_headers_to_remove = 9 [(.validate.rules) = { ... } * @return The count of requestHeadersToRemove. */ public int getRequestHeadersToRemoveCount() { return requestHeadersToRemove_.size(); } /** *
     * Specifies a list of HTTP headers that should be removed from each request when
     * this cluster is selected through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
     * 
* * repeated string request_headers_to_remove = 9 [(.validate.rules) = { ... } * @param index The index of the element to return. * @return The requestHeadersToRemove at the given index. */ public java.lang.String getRequestHeadersToRemove(int index) { return requestHeadersToRemove_.get(index); } /** *
     * Specifies a list of HTTP headers that should be removed from each request when
     * this cluster is selected through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
     * 
* * repeated string request_headers_to_remove = 9 [(.validate.rules) = { ... } * @param index The index of the value to return. * @return The bytes of the requestHeadersToRemove at the given index. */ public com.google.protobuf.ByteString getRequestHeadersToRemoveBytes(int index) { return requestHeadersToRemove_.getByteString(index); } public static final int RESPONSE_HEADERS_TO_ADD_FIELD_NUMBER = 5; @SuppressWarnings("serial") private java.util.List responseHeadersToAdd_; /** *
     * Specifies a list of headers to be added to responses when this cluster is selected
     * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
     * Headers specified at this level are applied before headers from the enclosing
     * :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and
     * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
     * header value syntax, see the documentation on :ref:`custom request headers
     * <config_http_conn_man_headers_custom_request_headers>`.
     * 
* * repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 5 [(.validate.rules) = { ... } */ @java.lang.Override public java.util.List getResponseHeadersToAddList() { return responseHeadersToAdd_; } /** *
     * Specifies a list of headers to be added to responses when this cluster is selected
     * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
     * Headers specified at this level are applied before headers from the enclosing
     * :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and
     * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
     * header value syntax, see the documentation on :ref:`custom request headers
     * <config_http_conn_man_headers_custom_request_headers>`.
     * 
* * repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 5 [(.validate.rules) = { ... } */ @java.lang.Override public java.util.List getResponseHeadersToAddOrBuilderList() { return responseHeadersToAdd_; } /** *
     * Specifies a list of headers to be added to responses when this cluster is selected
     * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
     * Headers specified at this level are applied before headers from the enclosing
     * :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and
     * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
     * header value syntax, see the documentation on :ref:`custom request headers
     * <config_http_conn_man_headers_custom_request_headers>`.
     * 
* * repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 5 [(.validate.rules) = { ... } */ @java.lang.Override public int getResponseHeadersToAddCount() { return responseHeadersToAdd_.size(); } /** *
     * Specifies a list of headers to be added to responses when this cluster is selected
     * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
     * Headers specified at this level are applied before headers from the enclosing
     * :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and
     * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
     * header value syntax, see the documentation on :ref:`custom request headers
     * <config_http_conn_man_headers_custom_request_headers>`.
     * 
* * repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 5 [(.validate.rules) = { ... } */ @java.lang.Override public io.envoyproxy.envoy.config.core.v3.HeaderValueOption getResponseHeadersToAdd(int index) { return responseHeadersToAdd_.get(index); } /** *
     * Specifies a list of headers to be added to responses when this cluster is selected
     * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
     * Headers specified at this level are applied before headers from the enclosing
     * :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and
     * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
     * header value syntax, see the documentation on :ref:`custom request headers
     * <config_http_conn_man_headers_custom_request_headers>`.
     * 
* * repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 5 [(.validate.rules) = { ... } */ @java.lang.Override public io.envoyproxy.envoy.config.core.v3.HeaderValueOptionOrBuilder getResponseHeadersToAddOrBuilder( int index) { return responseHeadersToAdd_.get(index); } public static final int RESPONSE_HEADERS_TO_REMOVE_FIELD_NUMBER = 6; @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList responseHeadersToRemove_ = com.google.protobuf.LazyStringArrayList.emptyList(); /** *
     * Specifies a list of headers to be removed from responses when this cluster is selected
     * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
     * 
* * repeated string response_headers_to_remove = 6 [(.validate.rules) = { ... } * @return A list containing the responseHeadersToRemove. */ public com.google.protobuf.ProtocolStringList getResponseHeadersToRemoveList() { return responseHeadersToRemove_; } /** *
     * Specifies a list of headers to be removed from responses when this cluster is selected
     * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
     * 
* * repeated string response_headers_to_remove = 6 [(.validate.rules) = { ... } * @return The count of responseHeadersToRemove. */ public int getResponseHeadersToRemoveCount() { return responseHeadersToRemove_.size(); } /** *
     * Specifies a list of headers to be removed from responses when this cluster is selected
     * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
     * 
* * repeated string response_headers_to_remove = 6 [(.validate.rules) = { ... } * @param index The index of the element to return. * @return The responseHeadersToRemove at the given index. */ public java.lang.String getResponseHeadersToRemove(int index) { return responseHeadersToRemove_.get(index); } /** *
     * Specifies a list of headers to be removed from responses when this cluster is selected
     * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
     * 
* * repeated string response_headers_to_remove = 6 [(.validate.rules) = { ... } * @param index The index of the value to return. * @return The bytes of the responseHeadersToRemove at the given index. */ public com.google.protobuf.ByteString getResponseHeadersToRemoveBytes(int index) { return responseHeadersToRemove_.getByteString(index); } public static final int TYPED_PER_FILTER_CONFIG_FIELD_NUMBER = 10; private static final class TypedPerFilterConfigDefaultEntryHolder { static final com.google.protobuf.MapEntry< java.lang.String, com.google.protobuf.Any> defaultEntry = com.google.protobuf.MapEntry .newDefaultInstance( io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.MESSAGE, com.google.protobuf.Any.getDefaultInstance()); } @SuppressWarnings("serial") private com.google.protobuf.MapField< java.lang.String, com.google.protobuf.Any> typedPerFilterConfig_; private com.google.protobuf.MapField internalGetTypedPerFilterConfig() { if (typedPerFilterConfig_ == null) { return com.google.protobuf.MapField.emptyMapField( TypedPerFilterConfigDefaultEntryHolder.defaultEntry); } return typedPerFilterConfig_; } public int getTypedPerFilterConfigCount() { return internalGetTypedPerFilterConfig().getMap().size(); } /** *
     * This field can be used to provide weighted cluster specific per filter config. The key should match the
     * :ref:`filter config name
     * <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpFilter.name>`.
     * See :ref:`Http filter route specific config <arch_overview_http_filters_per_filter_config>`
     * for details.
     * [#comment: An entry's value may be wrapped in a
     * :ref:`FilterConfig<envoy_v3_api_msg_config.route.v3.FilterConfig>`
     * message to specify additional options.]
     * 
* * map<string, .google.protobuf.Any> typed_per_filter_config = 10; */ @java.lang.Override public boolean containsTypedPerFilterConfig( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetTypedPerFilterConfig().getMap().containsKey(key); } /** * Use {@link #getTypedPerFilterConfigMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getTypedPerFilterConfig() { return getTypedPerFilterConfigMap(); } /** *
     * This field can be used to provide weighted cluster specific per filter config. The key should match the
     * :ref:`filter config name
     * <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpFilter.name>`.
     * See :ref:`Http filter route specific config <arch_overview_http_filters_per_filter_config>`
     * for details.
     * [#comment: An entry's value may be wrapped in a
     * :ref:`FilterConfig<envoy_v3_api_msg_config.route.v3.FilterConfig>`
     * message to specify additional options.]
     * 
* * map<string, .google.protobuf.Any> typed_per_filter_config = 10; */ @java.lang.Override public java.util.Map getTypedPerFilterConfigMap() { return internalGetTypedPerFilterConfig().getMap(); } /** *
     * This field can be used to provide weighted cluster specific per filter config. The key should match the
     * :ref:`filter config name
     * <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpFilter.name>`.
     * See :ref:`Http filter route specific config <arch_overview_http_filters_per_filter_config>`
     * for details.
     * [#comment: An entry's value may be wrapped in a
     * :ref:`FilterConfig<envoy_v3_api_msg_config.route.v3.FilterConfig>`
     * message to specify additional options.]
     * 
* * map<string, .google.protobuf.Any> typed_per_filter_config = 10; */ @java.lang.Override public /* nullable */ com.google.protobuf.Any getTypedPerFilterConfigOrDefault( java.lang.String key, /* nullable */ com.google.protobuf.Any defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetTypedPerFilterConfig().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** *
     * This field can be used to provide weighted cluster specific per filter config. The key should match the
     * :ref:`filter config name
     * <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpFilter.name>`.
     * See :ref:`Http filter route specific config <arch_overview_http_filters_per_filter_config>`
     * for details.
     * [#comment: An entry's value may be wrapped in a
     * :ref:`FilterConfig<envoy_v3_api_msg_config.route.v3.FilterConfig>`
     * message to specify additional options.]
     * 
* * map<string, .google.protobuf.Any> typed_per_filter_config = 10; */ @java.lang.Override public com.google.protobuf.Any getTypedPerFilterConfigOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetTypedPerFilterConfig().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public static final int HOST_REWRITE_LITERAL_FIELD_NUMBER = 11; /** *
     * Indicates that during forwarding, the host header will be swapped with
     * this value.
     * 
* * string host_rewrite_literal = 11 [(.validate.rules) = { ... } * @return Whether the hostRewriteLiteral field is set. */ public boolean hasHostRewriteLiteral() { return hostRewriteSpecifierCase_ == 11; } /** *
     * Indicates that during forwarding, the host header will be swapped with
     * this value.
     * 
* * string host_rewrite_literal = 11 [(.validate.rules) = { ... } * @return The hostRewriteLiteral. */ public java.lang.String getHostRewriteLiteral() { java.lang.Object ref = ""; if (hostRewriteSpecifierCase_ == 11) { ref = hostRewriteSpecifier_; } if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (hostRewriteSpecifierCase_ == 11) { hostRewriteSpecifier_ = s; } return s; } } /** *
     * Indicates that during forwarding, the host header will be swapped with
     * this value.
     * 
* * string host_rewrite_literal = 11 [(.validate.rules) = { ... } * @return The bytes for hostRewriteLiteral. */ public com.google.protobuf.ByteString getHostRewriteLiteralBytes() { java.lang.Object ref = ""; if (hostRewriteSpecifierCase_ == 11) { ref = hostRewriteSpecifier_; } if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); if (hostRewriteSpecifierCase_ == 11) { hostRewriteSpecifier_ = b; } return b; } else { return (com.google.protobuf.ByteString) ref; } } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getWeight()); } if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(3, getMetadataMatch()); } for (int i = 0; i < requestHeadersToAdd_.size(); i++) { output.writeMessage(4, requestHeadersToAdd_.get(i)); } for (int i = 0; i < responseHeadersToAdd_.size(); i++) { output.writeMessage(5, responseHeadersToAdd_.get(i)); } for (int i = 0; i < responseHeadersToRemove_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, responseHeadersToRemove_.getRaw(i)); } for (int i = 0; i < requestHeadersToRemove_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 9, requestHeadersToRemove_.getRaw(i)); } com.google.protobuf.GeneratedMessageV3 .serializeStringMapTo( output, internalGetTypedPerFilterConfig(), TypedPerFilterConfigDefaultEntryHolder.defaultEntry, 10); if (hostRewriteSpecifierCase_ == 11) { com.google.protobuf.GeneratedMessageV3.writeString(output, 11, hostRewriteSpecifier_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterHeader_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 12, clusterHeader_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getWeight()); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, getMetadataMatch()); } for (int i = 0; i < requestHeadersToAdd_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, requestHeadersToAdd_.get(i)); } for (int i = 0; i < responseHeadersToAdd_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, responseHeadersToAdd_.get(i)); } { int dataSize = 0; for (int i = 0; i < responseHeadersToRemove_.size(); i++) { dataSize += computeStringSizeNoTag(responseHeadersToRemove_.getRaw(i)); } size += dataSize; size += 1 * getResponseHeadersToRemoveList().size(); } { int dataSize = 0; for (int i = 0; i < requestHeadersToRemove_.size(); i++) { dataSize += computeStringSizeNoTag(requestHeadersToRemove_.getRaw(i)); } size += dataSize; size += 1 * getRequestHeadersToRemoveList().size(); } for (java.util.Map.Entry entry : internalGetTypedPerFilterConfig().getMap().entrySet()) { com.google.protobuf.MapEntry typedPerFilterConfig__ = TypedPerFilterConfigDefaultEntryHolder.defaultEntry.newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream .computeMessageSize(10, typedPerFilterConfig__); } if (hostRewriteSpecifierCase_ == 11) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, hostRewriteSpecifier_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterHeader_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, clusterHeader_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight)) { return super.equals(obj); } io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight other = (io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight) obj; if (!getName() .equals(other.getName())) return false; if (!getClusterHeader() .equals(other.getClusterHeader())) return false; if (hasWeight() != other.hasWeight()) return false; if (hasWeight()) { if (!getWeight() .equals(other.getWeight())) return false; } if (hasMetadataMatch() != other.hasMetadataMatch()) return false; if (hasMetadataMatch()) { if (!getMetadataMatch() .equals(other.getMetadataMatch())) return false; } if (!getRequestHeadersToAddList() .equals(other.getRequestHeadersToAddList())) return false; if (!getRequestHeadersToRemoveList() .equals(other.getRequestHeadersToRemoveList())) return false; if (!getResponseHeadersToAddList() .equals(other.getResponseHeadersToAddList())) return false; if (!getResponseHeadersToRemoveList() .equals(other.getResponseHeadersToRemoveList())) return false; if (!internalGetTypedPerFilterConfig().equals( other.internalGetTypedPerFilterConfig())) return false; if (!getHostRewriteSpecifierCase().equals(other.getHostRewriteSpecifierCase())) return false; switch (hostRewriteSpecifierCase_) { case 11: if (!getHostRewriteLiteral() .equals(other.getHostRewriteLiteral())) return false; break; case 0: default: } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + CLUSTER_HEADER_FIELD_NUMBER; hash = (53 * hash) + getClusterHeader().hashCode(); if (hasWeight()) { hash = (37 * hash) + WEIGHT_FIELD_NUMBER; hash = (53 * hash) + getWeight().hashCode(); } if (hasMetadataMatch()) { hash = (37 * hash) + METADATA_MATCH_FIELD_NUMBER; hash = (53 * hash) + getMetadataMatch().hashCode(); } if (getRequestHeadersToAddCount() > 0) { hash = (37 * hash) + REQUEST_HEADERS_TO_ADD_FIELD_NUMBER; hash = (53 * hash) + getRequestHeadersToAddList().hashCode(); } if (getRequestHeadersToRemoveCount() > 0) { hash = (37 * hash) + REQUEST_HEADERS_TO_REMOVE_FIELD_NUMBER; hash = (53 * hash) + getRequestHeadersToRemoveList().hashCode(); } if (getResponseHeadersToAddCount() > 0) { hash = (37 * hash) + RESPONSE_HEADERS_TO_ADD_FIELD_NUMBER; hash = (53 * hash) + getResponseHeadersToAddList().hashCode(); } if (getResponseHeadersToRemoveCount() > 0) { hash = (37 * hash) + RESPONSE_HEADERS_TO_REMOVE_FIELD_NUMBER; hash = (53 * hash) + getResponseHeadersToRemoveList().hashCode(); } if (!internalGetTypedPerFilterConfig().getMap().isEmpty()) { hash = (37 * hash) + TYPED_PER_FILTER_CONFIG_FIELD_NUMBER; hash = (53 * hash) + internalGetTypedPerFilterConfig().hashCode(); } switch (hostRewriteSpecifierCase_) { case 11: hash = (37 * hash) + HOST_REWRITE_LITERAL_FIELD_NUMBER; hash = (53 * hash) + getHostRewriteLiteral().hashCode(); break; case 0: default: } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
     * [#next-free-field: 13]
     * 
* * Protobuf type {@code envoy.config.route.v3.WeightedCluster.ClusterWeight} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:envoy.config.route.v3.WeightedCluster.ClusterWeight) io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeightOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_WeightedCluster_ClusterWeight_descriptor; } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 10: return internalGetTypedPerFilterConfig(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( int number) { switch (number) { case 10: return internalGetMutableTypedPerFilterConfig(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_WeightedCluster_ClusterWeight_fieldAccessorTable .ensureFieldAccessorsInitialized( io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight.class, io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight.Builder.class); } // Construct using io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getWeightFieldBuilder(); getMetadataMatchFieldBuilder(); getRequestHeadersToAddFieldBuilder(); getResponseHeadersToAddFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; name_ = ""; clusterHeader_ = ""; weight_ = null; if (weightBuilder_ != null) { weightBuilder_.dispose(); weightBuilder_ = null; } metadataMatch_ = null; if (metadataMatchBuilder_ != null) { metadataMatchBuilder_.dispose(); metadataMatchBuilder_ = null; } if (requestHeadersToAddBuilder_ == null) { requestHeadersToAdd_ = java.util.Collections.emptyList(); } else { requestHeadersToAdd_ = null; requestHeadersToAddBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000010); requestHeadersToRemove_ = com.google.protobuf.LazyStringArrayList.emptyList(); if (responseHeadersToAddBuilder_ == null) { responseHeadersToAdd_ = java.util.Collections.emptyList(); } else { responseHeadersToAdd_ = null; responseHeadersToAddBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000040); responseHeadersToRemove_ = com.google.protobuf.LazyStringArrayList.emptyList(); internalGetMutableTypedPerFilterConfig().clear(); hostRewriteSpecifierCase_ = 0; hostRewriteSpecifier_ = null; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_WeightedCluster_ClusterWeight_descriptor; } @java.lang.Override public io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight getDefaultInstanceForType() { return io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight.getDefaultInstance(); } @java.lang.Override public io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight build() { io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight buildPartial() { io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight result = new io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } buildPartialOneofs(result); onBuilt(); return result; } private void buildPartialRepeatedFields(io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight result) { if (requestHeadersToAddBuilder_ == null) { if (((bitField0_ & 0x00000010) != 0)) { requestHeadersToAdd_ = java.util.Collections.unmodifiableList(requestHeadersToAdd_); bitField0_ = (bitField0_ & ~0x00000010); } result.requestHeadersToAdd_ = requestHeadersToAdd_; } else { result.requestHeadersToAdd_ = requestHeadersToAddBuilder_.build(); } if (responseHeadersToAddBuilder_ == null) { if (((bitField0_ & 0x00000040) != 0)) { responseHeadersToAdd_ = java.util.Collections.unmodifiableList(responseHeadersToAdd_); bitField0_ = (bitField0_ & ~0x00000040); } result.responseHeadersToAdd_ = responseHeadersToAdd_; } else { result.responseHeadersToAdd_ = responseHeadersToAddBuilder_.build(); } } private void buildPartial0(io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.name_ = name_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.clusterHeader_ = clusterHeader_; } int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000004) != 0)) { result.weight_ = weightBuilder_ == null ? weight_ : weightBuilder_.build(); to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000008) != 0)) { result.metadataMatch_ = metadataMatchBuilder_ == null ? metadataMatch_ : metadataMatchBuilder_.build(); to_bitField0_ |= 0x00000002; } if (((from_bitField0_ & 0x00000020) != 0)) { requestHeadersToRemove_.makeImmutable(); result.requestHeadersToRemove_ = requestHeadersToRemove_; } if (((from_bitField0_ & 0x00000080) != 0)) { responseHeadersToRemove_.makeImmutable(); result.responseHeadersToRemove_ = responseHeadersToRemove_; } if (((from_bitField0_ & 0x00000100) != 0)) { result.typedPerFilterConfig_ = internalGetTypedPerFilterConfig().build(TypedPerFilterConfigDefaultEntryHolder.defaultEntry); } result.bitField0_ |= to_bitField0_; } private void buildPartialOneofs(io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight result) { result.hostRewriteSpecifierCase_ = hostRewriteSpecifierCase_; result.hostRewriteSpecifier_ = this.hostRewriteSpecifier_; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight) { return mergeFrom((io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight other) { if (other == io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; bitField0_ |= 0x00000001; onChanged(); } if (!other.getClusterHeader().isEmpty()) { clusterHeader_ = other.clusterHeader_; bitField0_ |= 0x00000002; onChanged(); } if (other.hasWeight()) { mergeWeight(other.getWeight()); } if (other.hasMetadataMatch()) { mergeMetadataMatch(other.getMetadataMatch()); } if (requestHeadersToAddBuilder_ == null) { if (!other.requestHeadersToAdd_.isEmpty()) { if (requestHeadersToAdd_.isEmpty()) { requestHeadersToAdd_ = other.requestHeadersToAdd_; bitField0_ = (bitField0_ & ~0x00000010); } else { ensureRequestHeadersToAddIsMutable(); requestHeadersToAdd_.addAll(other.requestHeadersToAdd_); } onChanged(); } } else { if (!other.requestHeadersToAdd_.isEmpty()) { if (requestHeadersToAddBuilder_.isEmpty()) { requestHeadersToAddBuilder_.dispose(); requestHeadersToAddBuilder_ = null; requestHeadersToAdd_ = other.requestHeadersToAdd_; bitField0_ = (bitField0_ & ~0x00000010); requestHeadersToAddBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getRequestHeadersToAddFieldBuilder() : null; } else { requestHeadersToAddBuilder_.addAllMessages(other.requestHeadersToAdd_); } } } if (!other.requestHeadersToRemove_.isEmpty()) { if (requestHeadersToRemove_.isEmpty()) { requestHeadersToRemove_ = other.requestHeadersToRemove_; bitField0_ |= 0x00000020; } else { ensureRequestHeadersToRemoveIsMutable(); requestHeadersToRemove_.addAll(other.requestHeadersToRemove_); } onChanged(); } if (responseHeadersToAddBuilder_ == null) { if (!other.responseHeadersToAdd_.isEmpty()) { if (responseHeadersToAdd_.isEmpty()) { responseHeadersToAdd_ = other.responseHeadersToAdd_; bitField0_ = (bitField0_ & ~0x00000040); } else { ensureResponseHeadersToAddIsMutable(); responseHeadersToAdd_.addAll(other.responseHeadersToAdd_); } onChanged(); } } else { if (!other.responseHeadersToAdd_.isEmpty()) { if (responseHeadersToAddBuilder_.isEmpty()) { responseHeadersToAddBuilder_.dispose(); responseHeadersToAddBuilder_ = null; responseHeadersToAdd_ = other.responseHeadersToAdd_; bitField0_ = (bitField0_ & ~0x00000040); responseHeadersToAddBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getResponseHeadersToAddFieldBuilder() : null; } else { responseHeadersToAddBuilder_.addAllMessages(other.responseHeadersToAdd_); } } } if (!other.responseHeadersToRemove_.isEmpty()) { if (responseHeadersToRemove_.isEmpty()) { responseHeadersToRemove_ = other.responseHeadersToRemove_; bitField0_ |= 0x00000080; } else { ensureResponseHeadersToRemoveIsMutable(); responseHeadersToRemove_.addAll(other.responseHeadersToRemove_); } onChanged(); } internalGetMutableTypedPerFilterConfig().mergeFrom( other.internalGetTypedPerFilterConfig()); bitField0_ |= 0x00000100; switch (other.getHostRewriteSpecifierCase()) { case HOST_REWRITE_LITERAL: { hostRewriteSpecifierCase_ = 11; hostRewriteSpecifier_ = other.hostRewriteSpecifier_; onChanged(); break; } case HOSTREWRITESPECIFIER_NOT_SET: { break; } } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { name_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 18: { input.readMessage( getWeightFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 18 case 26: { input.readMessage( getMetadataMatchFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 26 case 34: { io.envoyproxy.envoy.config.core.v3.HeaderValueOption m = input.readMessage( io.envoyproxy.envoy.config.core.v3.HeaderValueOption.parser(), extensionRegistry); if (requestHeadersToAddBuilder_ == null) { ensureRequestHeadersToAddIsMutable(); requestHeadersToAdd_.add(m); } else { requestHeadersToAddBuilder_.addMessage(m); } break; } // case 34 case 42: { io.envoyproxy.envoy.config.core.v3.HeaderValueOption m = input.readMessage( io.envoyproxy.envoy.config.core.v3.HeaderValueOption.parser(), extensionRegistry); if (responseHeadersToAddBuilder_ == null) { ensureResponseHeadersToAddIsMutable(); responseHeadersToAdd_.add(m); } else { responseHeadersToAddBuilder_.addMessage(m); } break; } // case 42 case 50: { java.lang.String s = input.readStringRequireUtf8(); ensureResponseHeadersToRemoveIsMutable(); responseHeadersToRemove_.add(s); break; } // case 50 case 74: { java.lang.String s = input.readStringRequireUtf8(); ensureRequestHeadersToRemoveIsMutable(); requestHeadersToRemove_.add(s); break; } // case 74 case 82: { com.google.protobuf.MapEntry typedPerFilterConfig__ = input.readMessage( TypedPerFilterConfigDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); internalGetMutableTypedPerFilterConfig().ensureBuilderMap().put( typedPerFilterConfig__.getKey(), typedPerFilterConfig__.getValue()); bitField0_ |= 0x00000100; break; } // case 82 case 90: { java.lang.String s = input.readStringRequireUtf8(); hostRewriteSpecifierCase_ = 11; hostRewriteSpecifier_ = s; break; } // case 90 case 98: { clusterHeader_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case 98 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int hostRewriteSpecifierCase_ = 0; private java.lang.Object hostRewriteSpecifier_; public HostRewriteSpecifierCase getHostRewriteSpecifierCase() { return HostRewriteSpecifierCase.forNumber( hostRewriteSpecifierCase_); } public Builder clearHostRewriteSpecifier() { hostRewriteSpecifierCase_ = 0; hostRewriteSpecifier_ = null; onChanged(); return this; } private int bitField0_; private java.lang.Object name_ = ""; /** *
       * Only one of ``name`` and ``cluster_header`` may be specified.
       * [#next-major-version: Need to add back the validation rule: (validate.rules).string = {min_len: 1}]
       * Name of the upstream cluster. The cluster must exist in the
       * :ref:`cluster manager configuration <config_cluster_manager>`.
       * 
* * string name = 1 [(.udpa.annotations.field_migrate) = { ... } * @return The name. */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * Only one of ``name`` and ``cluster_header`` may be specified.
       * [#next-major-version: Need to add back the validation rule: (validate.rules).string = {min_len: 1}]
       * Name of the upstream cluster. The cluster must exist in the
       * :ref:`cluster manager configuration <config_cluster_manager>`.
       * 
* * string name = 1 [(.udpa.annotations.field_migrate) = { ... } * @return The bytes for name. */ public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * Only one of ``name`` and ``cluster_header`` may be specified.
       * [#next-major-version: Need to add back the validation rule: (validate.rules).string = {min_len: 1}]
       * Name of the upstream cluster. The cluster must exist in the
       * :ref:`cluster manager configuration <config_cluster_manager>`.
       * 
* * string name = 1 [(.udpa.annotations.field_migrate) = { ... } * @param value The name to set. * @return This builder for chaining. */ public Builder setName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } name_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** *
       * Only one of ``name`` and ``cluster_header`` may be specified.
       * [#next-major-version: Need to add back the validation rule: (validate.rules).string = {min_len: 1}]
       * Name of the upstream cluster. The cluster must exist in the
       * :ref:`cluster manager configuration <config_cluster_manager>`.
       * 
* * string name = 1 [(.udpa.annotations.field_migrate) = { ... } * @return This builder for chaining. */ public Builder clearName() { name_ = getDefaultInstance().getName(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** *
       * Only one of ``name`` and ``cluster_header`` may be specified.
       * [#next-major-version: Need to add back the validation rule: (validate.rules).string = {min_len: 1}]
       * Name of the upstream cluster. The cluster must exist in the
       * :ref:`cluster manager configuration <config_cluster_manager>`.
       * 
* * string name = 1 [(.udpa.annotations.field_migrate) = { ... } * @param value The bytes for name to set. * @return This builder for chaining. */ public Builder setNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); name_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } private java.lang.Object clusterHeader_ = ""; /** *
       * Only one of ``name`` and ``cluster_header`` may be specified.
       * [#next-major-version: Need to add back the validation rule: (validate.rules).string = {min_len: 1 }]
       * Envoy will determine the cluster to route to by reading the value of the
       * HTTP header named by cluster_header from the request headers. If the
       * header is not found or the referenced cluster does not exist, Envoy will
       * return a 404 response.
       *
       * .. attention::
       *
       *   Internally, Envoy always uses the HTTP/2 ``:authority`` header to represent the HTTP/1
       *   ``Host`` header. Thus, if attempting to match on ``Host``, match on ``:authority`` instead.
       *
       * .. note::
       *
       *   If the header appears multiple times only the first value is used.
       * 
* * string cluster_header = 12 [(.validate.rules) = { ... } * @return The clusterHeader. */ public java.lang.String getClusterHeader() { java.lang.Object ref = clusterHeader_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); clusterHeader_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * Only one of ``name`` and ``cluster_header`` may be specified.
       * [#next-major-version: Need to add back the validation rule: (validate.rules).string = {min_len: 1 }]
       * Envoy will determine the cluster to route to by reading the value of the
       * HTTP header named by cluster_header from the request headers. If the
       * header is not found or the referenced cluster does not exist, Envoy will
       * return a 404 response.
       *
       * .. attention::
       *
       *   Internally, Envoy always uses the HTTP/2 ``:authority`` header to represent the HTTP/1
       *   ``Host`` header. Thus, if attempting to match on ``Host``, match on ``:authority`` instead.
       *
       * .. note::
       *
       *   If the header appears multiple times only the first value is used.
       * 
* * string cluster_header = 12 [(.validate.rules) = { ... } * @return The bytes for clusterHeader. */ public com.google.protobuf.ByteString getClusterHeaderBytes() { java.lang.Object ref = clusterHeader_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); clusterHeader_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * Only one of ``name`` and ``cluster_header`` may be specified.
       * [#next-major-version: Need to add back the validation rule: (validate.rules).string = {min_len: 1 }]
       * Envoy will determine the cluster to route to by reading the value of the
       * HTTP header named by cluster_header from the request headers. If the
       * header is not found or the referenced cluster does not exist, Envoy will
       * return a 404 response.
       *
       * .. attention::
       *
       *   Internally, Envoy always uses the HTTP/2 ``:authority`` header to represent the HTTP/1
       *   ``Host`` header. Thus, if attempting to match on ``Host``, match on ``:authority`` instead.
       *
       * .. note::
       *
       *   If the header appears multiple times only the first value is used.
       * 
* * string cluster_header = 12 [(.validate.rules) = { ... } * @param value The clusterHeader to set. * @return This builder for chaining. */ public Builder setClusterHeader( java.lang.String value) { if (value == null) { throw new NullPointerException(); } clusterHeader_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** *
       * Only one of ``name`` and ``cluster_header`` may be specified.
       * [#next-major-version: Need to add back the validation rule: (validate.rules).string = {min_len: 1 }]
       * Envoy will determine the cluster to route to by reading the value of the
       * HTTP header named by cluster_header from the request headers. If the
       * header is not found or the referenced cluster does not exist, Envoy will
       * return a 404 response.
       *
       * .. attention::
       *
       *   Internally, Envoy always uses the HTTP/2 ``:authority`` header to represent the HTTP/1
       *   ``Host`` header. Thus, if attempting to match on ``Host``, match on ``:authority`` instead.
       *
       * .. note::
       *
       *   If the header appears multiple times only the first value is used.
       * 
* * string cluster_header = 12 [(.validate.rules) = { ... } * @return This builder for chaining. */ public Builder clearClusterHeader() { clusterHeader_ = getDefaultInstance().getClusterHeader(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** *
       * Only one of ``name`` and ``cluster_header`` may be specified.
       * [#next-major-version: Need to add back the validation rule: (validate.rules).string = {min_len: 1 }]
       * Envoy will determine the cluster to route to by reading the value of the
       * HTTP header named by cluster_header from the request headers. If the
       * header is not found or the referenced cluster does not exist, Envoy will
       * return a 404 response.
       *
       * .. attention::
       *
       *   Internally, Envoy always uses the HTTP/2 ``:authority`` header to represent the HTTP/1
       *   ``Host`` header. Thus, if attempting to match on ``Host``, match on ``:authority`` instead.
       *
       * .. note::
       *
       *   If the header appears multiple times only the first value is used.
       * 
* * string cluster_header = 12 [(.validate.rules) = { ... } * @param value The bytes for clusterHeader to set. * @return This builder for chaining. */ public Builder setClusterHeaderBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); clusterHeader_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } private com.google.protobuf.UInt32Value weight_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> weightBuilder_; /** *
       * The weight of the cluster. This value is relative to the other clusters'
       * weights. When a request matches the route, the choice of an upstream cluster
       * is determined by its weight. The sum of weights across all
       * entries in the clusters array must be greater than 0, and must not exceed
       * uint32_t maximal value (4294967295).
       * 
* * .google.protobuf.UInt32Value weight = 2; * @return Whether the weight field is set. */ public boolean hasWeight() { return ((bitField0_ & 0x00000004) != 0); } /** *
       * The weight of the cluster. This value is relative to the other clusters'
       * weights. When a request matches the route, the choice of an upstream cluster
       * is determined by its weight. The sum of weights across all
       * entries in the clusters array must be greater than 0, and must not exceed
       * uint32_t maximal value (4294967295).
       * 
* * .google.protobuf.UInt32Value weight = 2; * @return The weight. */ public com.google.protobuf.UInt32Value getWeight() { if (weightBuilder_ == null) { return weight_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : weight_; } else { return weightBuilder_.getMessage(); } } /** *
       * The weight of the cluster. This value is relative to the other clusters'
       * weights. When a request matches the route, the choice of an upstream cluster
       * is determined by its weight. The sum of weights across all
       * entries in the clusters array must be greater than 0, and must not exceed
       * uint32_t maximal value (4294967295).
       * 
* * .google.protobuf.UInt32Value weight = 2; */ public Builder setWeight(com.google.protobuf.UInt32Value value) { if (weightBuilder_ == null) { if (value == null) { throw new NullPointerException(); } weight_ = value; } else { weightBuilder_.setMessage(value); } bitField0_ |= 0x00000004; onChanged(); return this; } /** *
       * The weight of the cluster. This value is relative to the other clusters'
       * weights. When a request matches the route, the choice of an upstream cluster
       * is determined by its weight. The sum of weights across all
       * entries in the clusters array must be greater than 0, and must not exceed
       * uint32_t maximal value (4294967295).
       * 
* * .google.protobuf.UInt32Value weight = 2; */ public Builder setWeight( com.google.protobuf.UInt32Value.Builder builderForValue) { if (weightBuilder_ == null) { weight_ = builderForValue.build(); } else { weightBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000004; onChanged(); return this; } /** *
       * The weight of the cluster. This value is relative to the other clusters'
       * weights. When a request matches the route, the choice of an upstream cluster
       * is determined by its weight. The sum of weights across all
       * entries in the clusters array must be greater than 0, and must not exceed
       * uint32_t maximal value (4294967295).
       * 
* * .google.protobuf.UInt32Value weight = 2; */ public Builder mergeWeight(com.google.protobuf.UInt32Value value) { if (weightBuilder_ == null) { if (((bitField0_ & 0x00000004) != 0) && weight_ != null && weight_ != com.google.protobuf.UInt32Value.getDefaultInstance()) { getWeightBuilder().mergeFrom(value); } else { weight_ = value; } } else { weightBuilder_.mergeFrom(value); } if (weight_ != null) { bitField0_ |= 0x00000004; onChanged(); } return this; } /** *
       * The weight of the cluster. This value is relative to the other clusters'
       * weights. When a request matches the route, the choice of an upstream cluster
       * is determined by its weight. The sum of weights across all
       * entries in the clusters array must be greater than 0, and must not exceed
       * uint32_t maximal value (4294967295).
       * 
* * .google.protobuf.UInt32Value weight = 2; */ public Builder clearWeight() { bitField0_ = (bitField0_ & ~0x00000004); weight_ = null; if (weightBuilder_ != null) { weightBuilder_.dispose(); weightBuilder_ = null; } onChanged(); return this; } /** *
       * The weight of the cluster. This value is relative to the other clusters'
       * weights. When a request matches the route, the choice of an upstream cluster
       * is determined by its weight. The sum of weights across all
       * entries in the clusters array must be greater than 0, and must not exceed
       * uint32_t maximal value (4294967295).
       * 
* * .google.protobuf.UInt32Value weight = 2; */ public com.google.protobuf.UInt32Value.Builder getWeightBuilder() { bitField0_ |= 0x00000004; onChanged(); return getWeightFieldBuilder().getBuilder(); } /** *
       * The weight of the cluster. This value is relative to the other clusters'
       * weights. When a request matches the route, the choice of an upstream cluster
       * is determined by its weight. The sum of weights across all
       * entries in the clusters array must be greater than 0, and must not exceed
       * uint32_t maximal value (4294967295).
       * 
* * .google.protobuf.UInt32Value weight = 2; */ public com.google.protobuf.UInt32ValueOrBuilder getWeightOrBuilder() { if (weightBuilder_ != null) { return weightBuilder_.getMessageOrBuilder(); } else { return weight_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : weight_; } } /** *
       * The weight of the cluster. This value is relative to the other clusters'
       * weights. When a request matches the route, the choice of an upstream cluster
       * is determined by its weight. The sum of weights across all
       * entries in the clusters array must be greater than 0, and must not exceed
       * uint32_t maximal value (4294967295).
       * 
* * .google.protobuf.UInt32Value weight = 2; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> getWeightFieldBuilder() { if (weightBuilder_ == null) { weightBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>( getWeight(), getParentForChildren(), isClean()); weight_ = null; } return weightBuilder_; } private io.envoyproxy.envoy.config.core.v3.Metadata metadataMatch_; private com.google.protobuf.SingleFieldBuilderV3< io.envoyproxy.envoy.config.core.v3.Metadata, io.envoyproxy.envoy.config.core.v3.Metadata.Builder, io.envoyproxy.envoy.config.core.v3.MetadataOrBuilder> metadataMatchBuilder_; /** *
       * Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints in
       * the upstream cluster with metadata matching what is set in this field will be considered for
       * load balancing. Note that this will be merged with what's provided in
       * :ref:`RouteAction.metadata_match <envoy_v3_api_field_config.route.v3.RouteAction.metadata_match>`, with
       * values here taking precedence. The filter name should be specified as ``envoy.lb``.
       * 
* * .envoy.config.core.v3.Metadata metadata_match = 3; * @return Whether the metadataMatch field is set. */ public boolean hasMetadataMatch() { return ((bitField0_ & 0x00000008) != 0); } /** *
       * Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints in
       * the upstream cluster with metadata matching what is set in this field will be considered for
       * load balancing. Note that this will be merged with what's provided in
       * :ref:`RouteAction.metadata_match <envoy_v3_api_field_config.route.v3.RouteAction.metadata_match>`, with
       * values here taking precedence. The filter name should be specified as ``envoy.lb``.
       * 
* * .envoy.config.core.v3.Metadata metadata_match = 3; * @return The metadataMatch. */ public io.envoyproxy.envoy.config.core.v3.Metadata getMetadataMatch() { if (metadataMatchBuilder_ == null) { return metadataMatch_ == null ? io.envoyproxy.envoy.config.core.v3.Metadata.getDefaultInstance() : metadataMatch_; } else { return metadataMatchBuilder_.getMessage(); } } /** *
       * Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints in
       * the upstream cluster with metadata matching what is set in this field will be considered for
       * load balancing. Note that this will be merged with what's provided in
       * :ref:`RouteAction.metadata_match <envoy_v3_api_field_config.route.v3.RouteAction.metadata_match>`, with
       * values here taking precedence. The filter name should be specified as ``envoy.lb``.
       * 
* * .envoy.config.core.v3.Metadata metadata_match = 3; */ public Builder setMetadataMatch(io.envoyproxy.envoy.config.core.v3.Metadata value) { if (metadataMatchBuilder_ == null) { if (value == null) { throw new NullPointerException(); } metadataMatch_ = value; } else { metadataMatchBuilder_.setMessage(value); } bitField0_ |= 0x00000008; onChanged(); return this; } /** *
       * Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints in
       * the upstream cluster with metadata matching what is set in this field will be considered for
       * load balancing. Note that this will be merged with what's provided in
       * :ref:`RouteAction.metadata_match <envoy_v3_api_field_config.route.v3.RouteAction.metadata_match>`, with
       * values here taking precedence. The filter name should be specified as ``envoy.lb``.
       * 
* * .envoy.config.core.v3.Metadata metadata_match = 3; */ public Builder setMetadataMatch( io.envoyproxy.envoy.config.core.v3.Metadata.Builder builderForValue) { if (metadataMatchBuilder_ == null) { metadataMatch_ = builderForValue.build(); } else { metadataMatchBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000008; onChanged(); return this; } /** *
       * Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints in
       * the upstream cluster with metadata matching what is set in this field will be considered for
       * load balancing. Note that this will be merged with what's provided in
       * :ref:`RouteAction.metadata_match <envoy_v3_api_field_config.route.v3.RouteAction.metadata_match>`, with
       * values here taking precedence. The filter name should be specified as ``envoy.lb``.
       * 
* * .envoy.config.core.v3.Metadata metadata_match = 3; */ public Builder mergeMetadataMatch(io.envoyproxy.envoy.config.core.v3.Metadata value) { if (metadataMatchBuilder_ == null) { if (((bitField0_ & 0x00000008) != 0) && metadataMatch_ != null && metadataMatch_ != io.envoyproxy.envoy.config.core.v3.Metadata.getDefaultInstance()) { getMetadataMatchBuilder().mergeFrom(value); } else { metadataMatch_ = value; } } else { metadataMatchBuilder_.mergeFrom(value); } if (metadataMatch_ != null) { bitField0_ |= 0x00000008; onChanged(); } return this; } /** *
       * Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints in
       * the upstream cluster with metadata matching what is set in this field will be considered for
       * load balancing. Note that this will be merged with what's provided in
       * :ref:`RouteAction.metadata_match <envoy_v3_api_field_config.route.v3.RouteAction.metadata_match>`, with
       * values here taking precedence. The filter name should be specified as ``envoy.lb``.
       * 
* * .envoy.config.core.v3.Metadata metadata_match = 3; */ public Builder clearMetadataMatch() { bitField0_ = (bitField0_ & ~0x00000008); metadataMatch_ = null; if (metadataMatchBuilder_ != null) { metadataMatchBuilder_.dispose(); metadataMatchBuilder_ = null; } onChanged(); return this; } /** *
       * Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints in
       * the upstream cluster with metadata matching what is set in this field will be considered for
       * load balancing. Note that this will be merged with what's provided in
       * :ref:`RouteAction.metadata_match <envoy_v3_api_field_config.route.v3.RouteAction.metadata_match>`, with
       * values here taking precedence. The filter name should be specified as ``envoy.lb``.
       * 
* * .envoy.config.core.v3.Metadata metadata_match = 3; */ public io.envoyproxy.envoy.config.core.v3.Metadata.Builder getMetadataMatchBuilder() { bitField0_ |= 0x00000008; onChanged(); return getMetadataMatchFieldBuilder().getBuilder(); } /** *
       * Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints in
       * the upstream cluster with metadata matching what is set in this field will be considered for
       * load balancing. Note that this will be merged with what's provided in
       * :ref:`RouteAction.metadata_match <envoy_v3_api_field_config.route.v3.RouteAction.metadata_match>`, with
       * values here taking precedence. The filter name should be specified as ``envoy.lb``.
       * 
* * .envoy.config.core.v3.Metadata metadata_match = 3; */ public io.envoyproxy.envoy.config.core.v3.MetadataOrBuilder getMetadataMatchOrBuilder() { if (metadataMatchBuilder_ != null) { return metadataMatchBuilder_.getMessageOrBuilder(); } else { return metadataMatch_ == null ? io.envoyproxy.envoy.config.core.v3.Metadata.getDefaultInstance() : metadataMatch_; } } /** *
       * Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints in
       * the upstream cluster with metadata matching what is set in this field will be considered for
       * load balancing. Note that this will be merged with what's provided in
       * :ref:`RouteAction.metadata_match <envoy_v3_api_field_config.route.v3.RouteAction.metadata_match>`, with
       * values here taking precedence. The filter name should be specified as ``envoy.lb``.
       * 
* * .envoy.config.core.v3.Metadata metadata_match = 3; */ private com.google.protobuf.SingleFieldBuilderV3< io.envoyproxy.envoy.config.core.v3.Metadata, io.envoyproxy.envoy.config.core.v3.Metadata.Builder, io.envoyproxy.envoy.config.core.v3.MetadataOrBuilder> getMetadataMatchFieldBuilder() { if (metadataMatchBuilder_ == null) { metadataMatchBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.envoyproxy.envoy.config.core.v3.Metadata, io.envoyproxy.envoy.config.core.v3.Metadata.Builder, io.envoyproxy.envoy.config.core.v3.MetadataOrBuilder>( getMetadataMatch(), getParentForChildren(), isClean()); metadataMatch_ = null; } return metadataMatchBuilder_; } private java.util.List requestHeadersToAdd_ = java.util.Collections.emptyList(); private void ensureRequestHeadersToAddIsMutable() { if (!((bitField0_ & 0x00000010) != 0)) { requestHeadersToAdd_ = new java.util.ArrayList(requestHeadersToAdd_); bitField0_ |= 0x00000010; } } private com.google.protobuf.RepeatedFieldBuilderV3< io.envoyproxy.envoy.config.core.v3.HeaderValueOption, io.envoyproxy.envoy.config.core.v3.HeaderValueOption.Builder, io.envoyproxy.envoy.config.core.v3.HeaderValueOptionOrBuilder> requestHeadersToAddBuilder_; /** *
       * Specifies a list of headers to be added to requests when this cluster is selected
       * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
       * Headers specified at this level are applied before headers from the enclosing
       * :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and
       * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
       * header value syntax, see the documentation on :ref:`custom request headers
       * <config_http_conn_man_headers_custom_request_headers>`.
       * 
* * repeated .envoy.config.core.v3.HeaderValueOption request_headers_to_add = 4 [(.validate.rules) = { ... } */ public java.util.List getRequestHeadersToAddList() { if (requestHeadersToAddBuilder_ == null) { return java.util.Collections.unmodifiableList(requestHeadersToAdd_); } else { return requestHeadersToAddBuilder_.getMessageList(); } } /** *
       * Specifies a list of headers to be added to requests when this cluster is selected
       * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
       * Headers specified at this level are applied before headers from the enclosing
       * :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and
       * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
       * header value syntax, see the documentation on :ref:`custom request headers
       * <config_http_conn_man_headers_custom_request_headers>`.
       * 
* * repeated .envoy.config.core.v3.HeaderValueOption request_headers_to_add = 4 [(.validate.rules) = { ... } */ public int getRequestHeadersToAddCount() { if (requestHeadersToAddBuilder_ == null) { return requestHeadersToAdd_.size(); } else { return requestHeadersToAddBuilder_.getCount(); } } /** *
       * Specifies a list of headers to be added to requests when this cluster is selected
       * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
       * Headers specified at this level are applied before headers from the enclosing
       * :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and
       * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
       * header value syntax, see the documentation on :ref:`custom request headers
       * <config_http_conn_man_headers_custom_request_headers>`.
       * 
* * repeated .envoy.config.core.v3.HeaderValueOption request_headers_to_add = 4 [(.validate.rules) = { ... } */ public io.envoyproxy.envoy.config.core.v3.HeaderValueOption getRequestHeadersToAdd(int index) { if (requestHeadersToAddBuilder_ == null) { return requestHeadersToAdd_.get(index); } else { return requestHeadersToAddBuilder_.getMessage(index); } } /** *
       * Specifies a list of headers to be added to requests when this cluster is selected
       * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
       * Headers specified at this level are applied before headers from the enclosing
       * :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and
       * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
       * header value syntax, see the documentation on :ref:`custom request headers
       * <config_http_conn_man_headers_custom_request_headers>`.
       * 
* * repeated .envoy.config.core.v3.HeaderValueOption request_headers_to_add = 4 [(.validate.rules) = { ... } */ public Builder setRequestHeadersToAdd( int index, io.envoyproxy.envoy.config.core.v3.HeaderValueOption value) { if (requestHeadersToAddBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureRequestHeadersToAddIsMutable(); requestHeadersToAdd_.set(index, value); onChanged(); } else { requestHeadersToAddBuilder_.setMessage(index, value); } return this; } /** *
       * Specifies a list of headers to be added to requests when this cluster is selected
       * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
       * Headers specified at this level are applied before headers from the enclosing
       * :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and
       * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
       * header value syntax, see the documentation on :ref:`custom request headers
       * <config_http_conn_man_headers_custom_request_headers>`.
       * 
* * repeated .envoy.config.core.v3.HeaderValueOption request_headers_to_add = 4 [(.validate.rules) = { ... } */ public Builder setRequestHeadersToAdd( int index, io.envoyproxy.envoy.config.core.v3.HeaderValueOption.Builder builderForValue) { if (requestHeadersToAddBuilder_ == null) { ensureRequestHeadersToAddIsMutable(); requestHeadersToAdd_.set(index, builderForValue.build()); onChanged(); } else { requestHeadersToAddBuilder_.setMessage(index, builderForValue.build()); } return this; } /** *
       * Specifies a list of headers to be added to requests when this cluster is selected
       * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
       * Headers specified at this level are applied before headers from the enclosing
       * :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and
       * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
       * header value syntax, see the documentation on :ref:`custom request headers
       * <config_http_conn_man_headers_custom_request_headers>`.
       * 
* * repeated .envoy.config.core.v3.HeaderValueOption request_headers_to_add = 4 [(.validate.rules) = { ... } */ public Builder addRequestHeadersToAdd(io.envoyproxy.envoy.config.core.v3.HeaderValueOption value) { if (requestHeadersToAddBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureRequestHeadersToAddIsMutable(); requestHeadersToAdd_.add(value); onChanged(); } else { requestHeadersToAddBuilder_.addMessage(value); } return this; } /** *
       * Specifies a list of headers to be added to requests when this cluster is selected
       * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
       * Headers specified at this level are applied before headers from the enclosing
       * :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and
       * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
       * header value syntax, see the documentation on :ref:`custom request headers
       * <config_http_conn_man_headers_custom_request_headers>`.
       * 
* * repeated .envoy.config.core.v3.HeaderValueOption request_headers_to_add = 4 [(.validate.rules) = { ... } */ public Builder addRequestHeadersToAdd( int index, io.envoyproxy.envoy.config.core.v3.HeaderValueOption value) { if (requestHeadersToAddBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureRequestHeadersToAddIsMutable(); requestHeadersToAdd_.add(index, value); onChanged(); } else { requestHeadersToAddBuilder_.addMessage(index, value); } return this; } /** *
       * Specifies a list of headers to be added to requests when this cluster is selected
       * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
       * Headers specified at this level are applied before headers from the enclosing
       * :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and
       * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
       * header value syntax, see the documentation on :ref:`custom request headers
       * <config_http_conn_man_headers_custom_request_headers>`.
       * 
* * repeated .envoy.config.core.v3.HeaderValueOption request_headers_to_add = 4 [(.validate.rules) = { ... } */ public Builder addRequestHeadersToAdd( io.envoyproxy.envoy.config.core.v3.HeaderValueOption.Builder builderForValue) { if (requestHeadersToAddBuilder_ == null) { ensureRequestHeadersToAddIsMutable(); requestHeadersToAdd_.add(builderForValue.build()); onChanged(); } else { requestHeadersToAddBuilder_.addMessage(builderForValue.build()); } return this; } /** *
       * Specifies a list of headers to be added to requests when this cluster is selected
       * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
       * Headers specified at this level are applied before headers from the enclosing
       * :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and
       * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
       * header value syntax, see the documentation on :ref:`custom request headers
       * <config_http_conn_man_headers_custom_request_headers>`.
       * 
* * repeated .envoy.config.core.v3.HeaderValueOption request_headers_to_add = 4 [(.validate.rules) = { ... } */ public Builder addRequestHeadersToAdd( int index, io.envoyproxy.envoy.config.core.v3.HeaderValueOption.Builder builderForValue) { if (requestHeadersToAddBuilder_ == null) { ensureRequestHeadersToAddIsMutable(); requestHeadersToAdd_.add(index, builderForValue.build()); onChanged(); } else { requestHeadersToAddBuilder_.addMessage(index, builderForValue.build()); } return this; } /** *
       * Specifies a list of headers to be added to requests when this cluster is selected
       * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
       * Headers specified at this level are applied before headers from the enclosing
       * :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and
       * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
       * header value syntax, see the documentation on :ref:`custom request headers
       * <config_http_conn_man_headers_custom_request_headers>`.
       * 
* * repeated .envoy.config.core.v3.HeaderValueOption request_headers_to_add = 4 [(.validate.rules) = { ... } */ public Builder addAllRequestHeadersToAdd( java.lang.Iterable values) { if (requestHeadersToAddBuilder_ == null) { ensureRequestHeadersToAddIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, requestHeadersToAdd_); onChanged(); } else { requestHeadersToAddBuilder_.addAllMessages(values); } return this; } /** *
       * Specifies a list of headers to be added to requests when this cluster is selected
       * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
       * Headers specified at this level are applied before headers from the enclosing
       * :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and
       * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
       * header value syntax, see the documentation on :ref:`custom request headers
       * <config_http_conn_man_headers_custom_request_headers>`.
       * 
* * repeated .envoy.config.core.v3.HeaderValueOption request_headers_to_add = 4 [(.validate.rules) = { ... } */ public Builder clearRequestHeadersToAdd() { if (requestHeadersToAddBuilder_ == null) { requestHeadersToAdd_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000010); onChanged(); } else { requestHeadersToAddBuilder_.clear(); } return this; } /** *
       * Specifies a list of headers to be added to requests when this cluster is selected
       * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
       * Headers specified at this level are applied before headers from the enclosing
       * :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and
       * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
       * header value syntax, see the documentation on :ref:`custom request headers
       * <config_http_conn_man_headers_custom_request_headers>`.
       * 
* * repeated .envoy.config.core.v3.HeaderValueOption request_headers_to_add = 4 [(.validate.rules) = { ... } */ public Builder removeRequestHeadersToAdd(int index) { if (requestHeadersToAddBuilder_ == null) { ensureRequestHeadersToAddIsMutable(); requestHeadersToAdd_.remove(index); onChanged(); } else { requestHeadersToAddBuilder_.remove(index); } return this; } /** *
       * Specifies a list of headers to be added to requests when this cluster is selected
       * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
       * Headers specified at this level are applied before headers from the enclosing
       * :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and
       * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
       * header value syntax, see the documentation on :ref:`custom request headers
       * <config_http_conn_man_headers_custom_request_headers>`.
       * 
* * repeated .envoy.config.core.v3.HeaderValueOption request_headers_to_add = 4 [(.validate.rules) = { ... } */ public io.envoyproxy.envoy.config.core.v3.HeaderValueOption.Builder getRequestHeadersToAddBuilder( int index) { return getRequestHeadersToAddFieldBuilder().getBuilder(index); } /** *
       * Specifies a list of headers to be added to requests when this cluster is selected
       * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
       * Headers specified at this level are applied before headers from the enclosing
       * :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and
       * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
       * header value syntax, see the documentation on :ref:`custom request headers
       * <config_http_conn_man_headers_custom_request_headers>`.
       * 
* * repeated .envoy.config.core.v3.HeaderValueOption request_headers_to_add = 4 [(.validate.rules) = { ... } */ public io.envoyproxy.envoy.config.core.v3.HeaderValueOptionOrBuilder getRequestHeadersToAddOrBuilder( int index) { if (requestHeadersToAddBuilder_ == null) { return requestHeadersToAdd_.get(index); } else { return requestHeadersToAddBuilder_.getMessageOrBuilder(index); } } /** *
       * Specifies a list of headers to be added to requests when this cluster is selected
       * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
       * Headers specified at this level are applied before headers from the enclosing
       * :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and
       * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
       * header value syntax, see the documentation on :ref:`custom request headers
       * <config_http_conn_man_headers_custom_request_headers>`.
       * 
* * repeated .envoy.config.core.v3.HeaderValueOption request_headers_to_add = 4 [(.validate.rules) = { ... } */ public java.util.List getRequestHeadersToAddOrBuilderList() { if (requestHeadersToAddBuilder_ != null) { return requestHeadersToAddBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(requestHeadersToAdd_); } } /** *
       * Specifies a list of headers to be added to requests when this cluster is selected
       * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
       * Headers specified at this level are applied before headers from the enclosing
       * :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and
       * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
       * header value syntax, see the documentation on :ref:`custom request headers
       * <config_http_conn_man_headers_custom_request_headers>`.
       * 
* * repeated .envoy.config.core.v3.HeaderValueOption request_headers_to_add = 4 [(.validate.rules) = { ... } */ public io.envoyproxy.envoy.config.core.v3.HeaderValueOption.Builder addRequestHeadersToAddBuilder() { return getRequestHeadersToAddFieldBuilder().addBuilder( io.envoyproxy.envoy.config.core.v3.HeaderValueOption.getDefaultInstance()); } /** *
       * Specifies a list of headers to be added to requests when this cluster is selected
       * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
       * Headers specified at this level are applied before headers from the enclosing
       * :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and
       * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
       * header value syntax, see the documentation on :ref:`custom request headers
       * <config_http_conn_man_headers_custom_request_headers>`.
       * 
* * repeated .envoy.config.core.v3.HeaderValueOption request_headers_to_add = 4 [(.validate.rules) = { ... } */ public io.envoyproxy.envoy.config.core.v3.HeaderValueOption.Builder addRequestHeadersToAddBuilder( int index) { return getRequestHeadersToAddFieldBuilder().addBuilder( index, io.envoyproxy.envoy.config.core.v3.HeaderValueOption.getDefaultInstance()); } /** *
       * Specifies a list of headers to be added to requests when this cluster is selected
       * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
       * Headers specified at this level are applied before headers from the enclosing
       * :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and
       * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
       * header value syntax, see the documentation on :ref:`custom request headers
       * <config_http_conn_man_headers_custom_request_headers>`.
       * 
* * repeated .envoy.config.core.v3.HeaderValueOption request_headers_to_add = 4 [(.validate.rules) = { ... } */ public java.util.List getRequestHeadersToAddBuilderList() { return getRequestHeadersToAddFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< io.envoyproxy.envoy.config.core.v3.HeaderValueOption, io.envoyproxy.envoy.config.core.v3.HeaderValueOption.Builder, io.envoyproxy.envoy.config.core.v3.HeaderValueOptionOrBuilder> getRequestHeadersToAddFieldBuilder() { if (requestHeadersToAddBuilder_ == null) { requestHeadersToAddBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< io.envoyproxy.envoy.config.core.v3.HeaderValueOption, io.envoyproxy.envoy.config.core.v3.HeaderValueOption.Builder, io.envoyproxy.envoy.config.core.v3.HeaderValueOptionOrBuilder>( requestHeadersToAdd_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); requestHeadersToAdd_ = null; } return requestHeadersToAddBuilder_; } private com.google.protobuf.LazyStringArrayList requestHeadersToRemove_ = com.google.protobuf.LazyStringArrayList.emptyList(); private void ensureRequestHeadersToRemoveIsMutable() { if (!requestHeadersToRemove_.isModifiable()) { requestHeadersToRemove_ = new com.google.protobuf.LazyStringArrayList(requestHeadersToRemove_); } bitField0_ |= 0x00000020; } /** *
       * Specifies a list of HTTP headers that should be removed from each request when
       * this cluster is selected through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
       * 
* * repeated string request_headers_to_remove = 9 [(.validate.rules) = { ... } * @return A list containing the requestHeadersToRemove. */ public com.google.protobuf.ProtocolStringList getRequestHeadersToRemoveList() { requestHeadersToRemove_.makeImmutable(); return requestHeadersToRemove_; } /** *
       * Specifies a list of HTTP headers that should be removed from each request when
       * this cluster is selected through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
       * 
* * repeated string request_headers_to_remove = 9 [(.validate.rules) = { ... } * @return The count of requestHeadersToRemove. */ public int getRequestHeadersToRemoveCount() { return requestHeadersToRemove_.size(); } /** *
       * Specifies a list of HTTP headers that should be removed from each request when
       * this cluster is selected through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
       * 
* * repeated string request_headers_to_remove = 9 [(.validate.rules) = { ... } * @param index The index of the element to return. * @return The requestHeadersToRemove at the given index. */ public java.lang.String getRequestHeadersToRemove(int index) { return requestHeadersToRemove_.get(index); } /** *
       * Specifies a list of HTTP headers that should be removed from each request when
       * this cluster is selected through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
       * 
* * repeated string request_headers_to_remove = 9 [(.validate.rules) = { ... } * @param index The index of the value to return. * @return The bytes of the requestHeadersToRemove at the given index. */ public com.google.protobuf.ByteString getRequestHeadersToRemoveBytes(int index) { return requestHeadersToRemove_.getByteString(index); } /** *
       * Specifies a list of HTTP headers that should be removed from each request when
       * this cluster is selected through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
       * 
* * repeated string request_headers_to_remove = 9 [(.validate.rules) = { ... } * @param index The index to set the value at. * @param value The requestHeadersToRemove to set. * @return This builder for chaining. */ public Builder setRequestHeadersToRemove( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureRequestHeadersToRemoveIsMutable(); requestHeadersToRemove_.set(index, value); bitField0_ |= 0x00000020; onChanged(); return this; } /** *
       * Specifies a list of HTTP headers that should be removed from each request when
       * this cluster is selected through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
       * 
* * repeated string request_headers_to_remove = 9 [(.validate.rules) = { ... } * @param value The requestHeadersToRemove to add. * @return This builder for chaining. */ public Builder addRequestHeadersToRemove( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureRequestHeadersToRemoveIsMutable(); requestHeadersToRemove_.add(value); bitField0_ |= 0x00000020; onChanged(); return this; } /** *
       * Specifies a list of HTTP headers that should be removed from each request when
       * this cluster is selected through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
       * 
* * repeated string request_headers_to_remove = 9 [(.validate.rules) = { ... } * @param values The requestHeadersToRemove to add. * @return This builder for chaining. */ public Builder addAllRequestHeadersToRemove( java.lang.Iterable values) { ensureRequestHeadersToRemoveIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, requestHeadersToRemove_); bitField0_ |= 0x00000020; onChanged(); return this; } /** *
       * Specifies a list of HTTP headers that should be removed from each request when
       * this cluster is selected through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
       * 
* * repeated string request_headers_to_remove = 9 [(.validate.rules) = { ... } * @return This builder for chaining. */ public Builder clearRequestHeadersToRemove() { requestHeadersToRemove_ = com.google.protobuf.LazyStringArrayList.emptyList(); bitField0_ = (bitField0_ & ~0x00000020);; onChanged(); return this; } /** *
       * Specifies a list of HTTP headers that should be removed from each request when
       * this cluster is selected through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
       * 
* * repeated string request_headers_to_remove = 9 [(.validate.rules) = { ... } * @param value The bytes of the requestHeadersToRemove to add. * @return This builder for chaining. */ public Builder addRequestHeadersToRemoveBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureRequestHeadersToRemoveIsMutable(); requestHeadersToRemove_.add(value); bitField0_ |= 0x00000020; onChanged(); return this; } private java.util.List responseHeadersToAdd_ = java.util.Collections.emptyList(); private void ensureResponseHeadersToAddIsMutable() { if (!((bitField0_ & 0x00000040) != 0)) { responseHeadersToAdd_ = new java.util.ArrayList(responseHeadersToAdd_); bitField0_ |= 0x00000040; } } private com.google.protobuf.RepeatedFieldBuilderV3< io.envoyproxy.envoy.config.core.v3.HeaderValueOption, io.envoyproxy.envoy.config.core.v3.HeaderValueOption.Builder, io.envoyproxy.envoy.config.core.v3.HeaderValueOptionOrBuilder> responseHeadersToAddBuilder_; /** *
       * Specifies a list of headers to be added to responses when this cluster is selected
       * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
       * Headers specified at this level are applied before headers from the enclosing
       * :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and
       * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
       * header value syntax, see the documentation on :ref:`custom request headers
       * <config_http_conn_man_headers_custom_request_headers>`.
       * 
* * repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 5 [(.validate.rules) = { ... } */ public java.util.List getResponseHeadersToAddList() { if (responseHeadersToAddBuilder_ == null) { return java.util.Collections.unmodifiableList(responseHeadersToAdd_); } else { return responseHeadersToAddBuilder_.getMessageList(); } } /** *
       * Specifies a list of headers to be added to responses when this cluster is selected
       * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
       * Headers specified at this level are applied before headers from the enclosing
       * :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and
       * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
       * header value syntax, see the documentation on :ref:`custom request headers
       * <config_http_conn_man_headers_custom_request_headers>`.
       * 
* * repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 5 [(.validate.rules) = { ... } */ public int getResponseHeadersToAddCount() { if (responseHeadersToAddBuilder_ == null) { return responseHeadersToAdd_.size(); } else { return responseHeadersToAddBuilder_.getCount(); } } /** *
       * Specifies a list of headers to be added to responses when this cluster is selected
       * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
       * Headers specified at this level are applied before headers from the enclosing
       * :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and
       * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
       * header value syntax, see the documentation on :ref:`custom request headers
       * <config_http_conn_man_headers_custom_request_headers>`.
       * 
* * repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 5 [(.validate.rules) = { ... } */ public io.envoyproxy.envoy.config.core.v3.HeaderValueOption getResponseHeadersToAdd(int index) { if (responseHeadersToAddBuilder_ == null) { return responseHeadersToAdd_.get(index); } else { return responseHeadersToAddBuilder_.getMessage(index); } } /** *
       * Specifies a list of headers to be added to responses when this cluster is selected
       * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
       * Headers specified at this level are applied before headers from the enclosing
       * :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and
       * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
       * header value syntax, see the documentation on :ref:`custom request headers
       * <config_http_conn_man_headers_custom_request_headers>`.
       * 
* * repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 5 [(.validate.rules) = { ... } */ public Builder setResponseHeadersToAdd( int index, io.envoyproxy.envoy.config.core.v3.HeaderValueOption value) { if (responseHeadersToAddBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureResponseHeadersToAddIsMutable(); responseHeadersToAdd_.set(index, value); onChanged(); } else { responseHeadersToAddBuilder_.setMessage(index, value); } return this; } /** *
       * Specifies a list of headers to be added to responses when this cluster is selected
       * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
       * Headers specified at this level are applied before headers from the enclosing
       * :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and
       * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
       * header value syntax, see the documentation on :ref:`custom request headers
       * <config_http_conn_man_headers_custom_request_headers>`.
       * 
* * repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 5 [(.validate.rules) = { ... } */ public Builder setResponseHeadersToAdd( int index, io.envoyproxy.envoy.config.core.v3.HeaderValueOption.Builder builderForValue) { if (responseHeadersToAddBuilder_ == null) { ensureResponseHeadersToAddIsMutable(); responseHeadersToAdd_.set(index, builderForValue.build()); onChanged(); } else { responseHeadersToAddBuilder_.setMessage(index, builderForValue.build()); } return this; } /** *
       * Specifies a list of headers to be added to responses when this cluster is selected
       * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
       * Headers specified at this level are applied before headers from the enclosing
       * :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and
       * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
       * header value syntax, see the documentation on :ref:`custom request headers
       * <config_http_conn_man_headers_custom_request_headers>`.
       * 
* * repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 5 [(.validate.rules) = { ... } */ public Builder addResponseHeadersToAdd(io.envoyproxy.envoy.config.core.v3.HeaderValueOption value) { if (responseHeadersToAddBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureResponseHeadersToAddIsMutable(); responseHeadersToAdd_.add(value); onChanged(); } else { responseHeadersToAddBuilder_.addMessage(value); } return this; } /** *
       * Specifies a list of headers to be added to responses when this cluster is selected
       * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
       * Headers specified at this level are applied before headers from the enclosing
       * :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and
       * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
       * header value syntax, see the documentation on :ref:`custom request headers
       * <config_http_conn_man_headers_custom_request_headers>`.
       * 
* * repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 5 [(.validate.rules) = { ... } */ public Builder addResponseHeadersToAdd( int index, io.envoyproxy.envoy.config.core.v3.HeaderValueOption value) { if (responseHeadersToAddBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureResponseHeadersToAddIsMutable(); responseHeadersToAdd_.add(index, value); onChanged(); } else { responseHeadersToAddBuilder_.addMessage(index, value); } return this; } /** *
       * Specifies a list of headers to be added to responses when this cluster is selected
       * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
       * Headers specified at this level are applied before headers from the enclosing
       * :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and
       * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
       * header value syntax, see the documentation on :ref:`custom request headers
       * <config_http_conn_man_headers_custom_request_headers>`.
       * 
* * repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 5 [(.validate.rules) = { ... } */ public Builder addResponseHeadersToAdd( io.envoyproxy.envoy.config.core.v3.HeaderValueOption.Builder builderForValue) { if (responseHeadersToAddBuilder_ == null) { ensureResponseHeadersToAddIsMutable(); responseHeadersToAdd_.add(builderForValue.build()); onChanged(); } else { responseHeadersToAddBuilder_.addMessage(builderForValue.build()); } return this; } /** *
       * Specifies a list of headers to be added to responses when this cluster is selected
       * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
       * Headers specified at this level are applied before headers from the enclosing
       * :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and
       * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
       * header value syntax, see the documentation on :ref:`custom request headers
       * <config_http_conn_man_headers_custom_request_headers>`.
       * 
* * repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 5 [(.validate.rules) = { ... } */ public Builder addResponseHeadersToAdd( int index, io.envoyproxy.envoy.config.core.v3.HeaderValueOption.Builder builderForValue) { if (responseHeadersToAddBuilder_ == null) { ensureResponseHeadersToAddIsMutable(); responseHeadersToAdd_.add(index, builderForValue.build()); onChanged(); } else { responseHeadersToAddBuilder_.addMessage(index, builderForValue.build()); } return this; } /** *
       * Specifies a list of headers to be added to responses when this cluster is selected
       * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
       * Headers specified at this level are applied before headers from the enclosing
       * :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and
       * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
       * header value syntax, see the documentation on :ref:`custom request headers
       * <config_http_conn_man_headers_custom_request_headers>`.
       * 
* * repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 5 [(.validate.rules) = { ... } */ public Builder addAllResponseHeadersToAdd( java.lang.Iterable values) { if (responseHeadersToAddBuilder_ == null) { ensureResponseHeadersToAddIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, responseHeadersToAdd_); onChanged(); } else { responseHeadersToAddBuilder_.addAllMessages(values); } return this; } /** *
       * Specifies a list of headers to be added to responses when this cluster is selected
       * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
       * Headers specified at this level are applied before headers from the enclosing
       * :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and
       * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
       * header value syntax, see the documentation on :ref:`custom request headers
       * <config_http_conn_man_headers_custom_request_headers>`.
       * 
* * repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 5 [(.validate.rules) = { ... } */ public Builder clearResponseHeadersToAdd() { if (responseHeadersToAddBuilder_ == null) { responseHeadersToAdd_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000040); onChanged(); } else { responseHeadersToAddBuilder_.clear(); } return this; } /** *
       * Specifies a list of headers to be added to responses when this cluster is selected
       * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
       * Headers specified at this level are applied before headers from the enclosing
       * :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and
       * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
       * header value syntax, see the documentation on :ref:`custom request headers
       * <config_http_conn_man_headers_custom_request_headers>`.
       * 
* * repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 5 [(.validate.rules) = { ... } */ public Builder removeResponseHeadersToAdd(int index) { if (responseHeadersToAddBuilder_ == null) { ensureResponseHeadersToAddIsMutable(); responseHeadersToAdd_.remove(index); onChanged(); } else { responseHeadersToAddBuilder_.remove(index); } return this; } /** *
       * Specifies a list of headers to be added to responses when this cluster is selected
       * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
       * Headers specified at this level are applied before headers from the enclosing
       * :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and
       * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
       * header value syntax, see the documentation on :ref:`custom request headers
       * <config_http_conn_man_headers_custom_request_headers>`.
       * 
* * repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 5 [(.validate.rules) = { ... } */ public io.envoyproxy.envoy.config.core.v3.HeaderValueOption.Builder getResponseHeadersToAddBuilder( int index) { return getResponseHeadersToAddFieldBuilder().getBuilder(index); } /** *
       * Specifies a list of headers to be added to responses when this cluster is selected
       * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
       * Headers specified at this level are applied before headers from the enclosing
       * :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and
       * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
       * header value syntax, see the documentation on :ref:`custom request headers
       * <config_http_conn_man_headers_custom_request_headers>`.
       * 
* * repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 5 [(.validate.rules) = { ... } */ public io.envoyproxy.envoy.config.core.v3.HeaderValueOptionOrBuilder getResponseHeadersToAddOrBuilder( int index) { if (responseHeadersToAddBuilder_ == null) { return responseHeadersToAdd_.get(index); } else { return responseHeadersToAddBuilder_.getMessageOrBuilder(index); } } /** *
       * Specifies a list of headers to be added to responses when this cluster is selected
       * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
       * Headers specified at this level are applied before headers from the enclosing
       * :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and
       * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
       * header value syntax, see the documentation on :ref:`custom request headers
       * <config_http_conn_man_headers_custom_request_headers>`.
       * 
* * repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 5 [(.validate.rules) = { ... } */ public java.util.List getResponseHeadersToAddOrBuilderList() { if (responseHeadersToAddBuilder_ != null) { return responseHeadersToAddBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(responseHeadersToAdd_); } } /** *
       * Specifies a list of headers to be added to responses when this cluster is selected
       * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
       * Headers specified at this level are applied before headers from the enclosing
       * :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and
       * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
       * header value syntax, see the documentation on :ref:`custom request headers
       * <config_http_conn_man_headers_custom_request_headers>`.
       * 
* * repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 5 [(.validate.rules) = { ... } */ public io.envoyproxy.envoy.config.core.v3.HeaderValueOption.Builder addResponseHeadersToAddBuilder() { return getResponseHeadersToAddFieldBuilder().addBuilder( io.envoyproxy.envoy.config.core.v3.HeaderValueOption.getDefaultInstance()); } /** *
       * Specifies a list of headers to be added to responses when this cluster is selected
       * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
       * Headers specified at this level are applied before headers from the enclosing
       * :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and
       * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
       * header value syntax, see the documentation on :ref:`custom request headers
       * <config_http_conn_man_headers_custom_request_headers>`.
       * 
* * repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 5 [(.validate.rules) = { ... } */ public io.envoyproxy.envoy.config.core.v3.HeaderValueOption.Builder addResponseHeadersToAddBuilder( int index) { return getResponseHeadersToAddFieldBuilder().addBuilder( index, io.envoyproxy.envoy.config.core.v3.HeaderValueOption.getDefaultInstance()); } /** *
       * Specifies a list of headers to be added to responses when this cluster is selected
       * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
       * Headers specified at this level are applied before headers from the enclosing
       * :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and
       * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
       * header value syntax, see the documentation on :ref:`custom request headers
       * <config_http_conn_man_headers_custom_request_headers>`.
       * 
* * repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 5 [(.validate.rules) = { ... } */ public java.util.List getResponseHeadersToAddBuilderList() { return getResponseHeadersToAddFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< io.envoyproxy.envoy.config.core.v3.HeaderValueOption, io.envoyproxy.envoy.config.core.v3.HeaderValueOption.Builder, io.envoyproxy.envoy.config.core.v3.HeaderValueOptionOrBuilder> getResponseHeadersToAddFieldBuilder() { if (responseHeadersToAddBuilder_ == null) { responseHeadersToAddBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< io.envoyproxy.envoy.config.core.v3.HeaderValueOption, io.envoyproxy.envoy.config.core.v3.HeaderValueOption.Builder, io.envoyproxy.envoy.config.core.v3.HeaderValueOptionOrBuilder>( responseHeadersToAdd_, ((bitField0_ & 0x00000040) != 0), getParentForChildren(), isClean()); responseHeadersToAdd_ = null; } return responseHeadersToAddBuilder_; } private com.google.protobuf.LazyStringArrayList responseHeadersToRemove_ = com.google.protobuf.LazyStringArrayList.emptyList(); private void ensureResponseHeadersToRemoveIsMutable() { if (!responseHeadersToRemove_.isModifiable()) { responseHeadersToRemove_ = new com.google.protobuf.LazyStringArrayList(responseHeadersToRemove_); } bitField0_ |= 0x00000080; } /** *
       * Specifies a list of headers to be removed from responses when this cluster is selected
       * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
       * 
* * repeated string response_headers_to_remove = 6 [(.validate.rules) = { ... } * @return A list containing the responseHeadersToRemove. */ public com.google.protobuf.ProtocolStringList getResponseHeadersToRemoveList() { responseHeadersToRemove_.makeImmutable(); return responseHeadersToRemove_; } /** *
       * Specifies a list of headers to be removed from responses when this cluster is selected
       * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
       * 
* * repeated string response_headers_to_remove = 6 [(.validate.rules) = { ... } * @return The count of responseHeadersToRemove. */ public int getResponseHeadersToRemoveCount() { return responseHeadersToRemove_.size(); } /** *
       * Specifies a list of headers to be removed from responses when this cluster is selected
       * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
       * 
* * repeated string response_headers_to_remove = 6 [(.validate.rules) = { ... } * @param index The index of the element to return. * @return The responseHeadersToRemove at the given index. */ public java.lang.String getResponseHeadersToRemove(int index) { return responseHeadersToRemove_.get(index); } /** *
       * Specifies a list of headers to be removed from responses when this cluster is selected
       * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
       * 
* * repeated string response_headers_to_remove = 6 [(.validate.rules) = { ... } * @param index The index of the value to return. * @return The bytes of the responseHeadersToRemove at the given index. */ public com.google.protobuf.ByteString getResponseHeadersToRemoveBytes(int index) { return responseHeadersToRemove_.getByteString(index); } /** *
       * Specifies a list of headers to be removed from responses when this cluster is selected
       * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
       * 
* * repeated string response_headers_to_remove = 6 [(.validate.rules) = { ... } * @param index The index to set the value at. * @param value The responseHeadersToRemove to set. * @return This builder for chaining. */ public Builder setResponseHeadersToRemove( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureResponseHeadersToRemoveIsMutable(); responseHeadersToRemove_.set(index, value); bitField0_ |= 0x00000080; onChanged(); return this; } /** *
       * Specifies a list of headers to be removed from responses when this cluster is selected
       * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
       * 
* * repeated string response_headers_to_remove = 6 [(.validate.rules) = { ... } * @param value The responseHeadersToRemove to add. * @return This builder for chaining. */ public Builder addResponseHeadersToRemove( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureResponseHeadersToRemoveIsMutable(); responseHeadersToRemove_.add(value); bitField0_ |= 0x00000080; onChanged(); return this; } /** *
       * Specifies a list of headers to be removed from responses when this cluster is selected
       * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
       * 
* * repeated string response_headers_to_remove = 6 [(.validate.rules) = { ... } * @param values The responseHeadersToRemove to add. * @return This builder for chaining. */ public Builder addAllResponseHeadersToRemove( java.lang.Iterable values) { ensureResponseHeadersToRemoveIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, responseHeadersToRemove_); bitField0_ |= 0x00000080; onChanged(); return this; } /** *
       * Specifies a list of headers to be removed from responses when this cluster is selected
       * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
       * 
* * repeated string response_headers_to_remove = 6 [(.validate.rules) = { ... } * @return This builder for chaining. */ public Builder clearResponseHeadersToRemove() { responseHeadersToRemove_ = com.google.protobuf.LazyStringArrayList.emptyList(); bitField0_ = (bitField0_ & ~0x00000080);; onChanged(); return this; } /** *
       * Specifies a list of headers to be removed from responses when this cluster is selected
       * through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
       * 
* * repeated string response_headers_to_remove = 6 [(.validate.rules) = { ... } * @param value The bytes of the responseHeadersToRemove to add. * @return This builder for chaining. */ public Builder addResponseHeadersToRemoveBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureResponseHeadersToRemoveIsMutable(); responseHeadersToRemove_.add(value); bitField0_ |= 0x00000080; onChanged(); return this; } private static final class TypedPerFilterConfigConverter implements com.google.protobuf.MapFieldBuilder.Converter { @java.lang.Override public com.google.protobuf.Any build(com.google.protobuf.AnyOrBuilder val) { if (val instanceof com.google.protobuf.Any) { return (com.google.protobuf.Any) val; } return ((com.google.protobuf.Any.Builder) val).build(); } @java.lang.Override public com.google.protobuf.MapEntry defaultEntry() { return TypedPerFilterConfigDefaultEntryHolder.defaultEntry; } }; private static final TypedPerFilterConfigConverter typedPerFilterConfigConverter = new TypedPerFilterConfigConverter(); private com.google.protobuf.MapFieldBuilder< java.lang.String, com.google.protobuf.AnyOrBuilder, com.google.protobuf.Any, com.google.protobuf.Any.Builder> typedPerFilterConfig_; private com.google.protobuf.MapFieldBuilder internalGetTypedPerFilterConfig() { if (typedPerFilterConfig_ == null) { return new com.google.protobuf.MapFieldBuilder<>(typedPerFilterConfigConverter); } return typedPerFilterConfig_; } private com.google.protobuf.MapFieldBuilder internalGetMutableTypedPerFilterConfig() { if (typedPerFilterConfig_ == null) { typedPerFilterConfig_ = new com.google.protobuf.MapFieldBuilder<>(typedPerFilterConfigConverter); } bitField0_ |= 0x00000100; onChanged(); return typedPerFilterConfig_; } public int getTypedPerFilterConfigCount() { return internalGetTypedPerFilterConfig().ensureBuilderMap().size(); } /** *
       * This field can be used to provide weighted cluster specific per filter config. The key should match the
       * :ref:`filter config name
       * <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpFilter.name>`.
       * See :ref:`Http filter route specific config <arch_overview_http_filters_per_filter_config>`
       * for details.
       * [#comment: An entry's value may be wrapped in a
       * :ref:`FilterConfig<envoy_v3_api_msg_config.route.v3.FilterConfig>`
       * message to specify additional options.]
       * 
* * map<string, .google.protobuf.Any> typed_per_filter_config = 10; */ @java.lang.Override public boolean containsTypedPerFilterConfig( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetTypedPerFilterConfig().ensureBuilderMap().containsKey(key); } /** * Use {@link #getTypedPerFilterConfigMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getTypedPerFilterConfig() { return getTypedPerFilterConfigMap(); } /** *
       * This field can be used to provide weighted cluster specific per filter config. The key should match the
       * :ref:`filter config name
       * <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpFilter.name>`.
       * See :ref:`Http filter route specific config <arch_overview_http_filters_per_filter_config>`
       * for details.
       * [#comment: An entry's value may be wrapped in a
       * :ref:`FilterConfig<envoy_v3_api_msg_config.route.v3.FilterConfig>`
       * message to specify additional options.]
       * 
* * map<string, .google.protobuf.Any> typed_per_filter_config = 10; */ @java.lang.Override public java.util.Map getTypedPerFilterConfigMap() { return internalGetTypedPerFilterConfig().getImmutableMap(); } /** *
       * This field can be used to provide weighted cluster specific per filter config. The key should match the
       * :ref:`filter config name
       * <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpFilter.name>`.
       * See :ref:`Http filter route specific config <arch_overview_http_filters_per_filter_config>`
       * for details.
       * [#comment: An entry's value may be wrapped in a
       * :ref:`FilterConfig<envoy_v3_api_msg_config.route.v3.FilterConfig>`
       * message to specify additional options.]
       * 
* * map<string, .google.protobuf.Any> typed_per_filter_config = 10; */ @java.lang.Override public /* nullable */ com.google.protobuf.Any getTypedPerFilterConfigOrDefault( java.lang.String key, /* nullable */ com.google.protobuf.Any defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetMutableTypedPerFilterConfig().ensureBuilderMap(); return map.containsKey(key) ? typedPerFilterConfigConverter.build(map.get(key)) : defaultValue; } /** *
       * This field can be used to provide weighted cluster specific per filter config. The key should match the
       * :ref:`filter config name
       * <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpFilter.name>`.
       * See :ref:`Http filter route specific config <arch_overview_http_filters_per_filter_config>`
       * for details.
       * [#comment: An entry's value may be wrapped in a
       * :ref:`FilterConfig<envoy_v3_api_msg_config.route.v3.FilterConfig>`
       * message to specify additional options.]
       * 
* * map<string, .google.protobuf.Any> typed_per_filter_config = 10; */ @java.lang.Override public com.google.protobuf.Any getTypedPerFilterConfigOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetMutableTypedPerFilterConfig().ensureBuilderMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return typedPerFilterConfigConverter.build(map.get(key)); } public Builder clearTypedPerFilterConfig() { bitField0_ = (bitField0_ & ~0x00000100); internalGetMutableTypedPerFilterConfig().clear(); return this; } /** *
       * This field can be used to provide weighted cluster specific per filter config. The key should match the
       * :ref:`filter config name
       * <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpFilter.name>`.
       * See :ref:`Http filter route specific config <arch_overview_http_filters_per_filter_config>`
       * for details.
       * [#comment: An entry's value may be wrapped in a
       * :ref:`FilterConfig<envoy_v3_api_msg_config.route.v3.FilterConfig>`
       * message to specify additional options.]
       * 
* * map<string, .google.protobuf.Any> typed_per_filter_config = 10; */ public Builder removeTypedPerFilterConfig( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } internalGetMutableTypedPerFilterConfig().ensureBuilderMap() .remove(key); return this; } /** * Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableTypedPerFilterConfig() { bitField0_ |= 0x00000100; return internalGetMutableTypedPerFilterConfig().ensureMessageMap(); } /** *
       * This field can be used to provide weighted cluster specific per filter config. The key should match the
       * :ref:`filter config name
       * <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpFilter.name>`.
       * See :ref:`Http filter route specific config <arch_overview_http_filters_per_filter_config>`
       * for details.
       * [#comment: An entry's value may be wrapped in a
       * :ref:`FilterConfig<envoy_v3_api_msg_config.route.v3.FilterConfig>`
       * message to specify additional options.]
       * 
* * map<string, .google.protobuf.Any> typed_per_filter_config = 10; */ public Builder putTypedPerFilterConfig( java.lang.String key, com.google.protobuf.Any value) { if (key == null) { throw new NullPointerException("map key"); } if (value == null) { throw new NullPointerException("map value"); } internalGetMutableTypedPerFilterConfig().ensureBuilderMap() .put(key, value); bitField0_ |= 0x00000100; return this; } /** *
       * This field can be used to provide weighted cluster specific per filter config. The key should match the
       * :ref:`filter config name
       * <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpFilter.name>`.
       * See :ref:`Http filter route specific config <arch_overview_http_filters_per_filter_config>`
       * for details.
       * [#comment: An entry's value may be wrapped in a
       * :ref:`FilterConfig<envoy_v3_api_msg_config.route.v3.FilterConfig>`
       * message to specify additional options.]
       * 
* * map<string, .google.protobuf.Any> typed_per_filter_config = 10; */ public Builder putAllTypedPerFilterConfig( java.util.Map values) { for (java.util.Map.Entry e : values.entrySet()) { if (e.getKey() == null || e.getValue() == null) { throw new NullPointerException(); } } internalGetMutableTypedPerFilterConfig().ensureBuilderMap() .putAll(values); bitField0_ |= 0x00000100; return this; } /** *
       * This field can be used to provide weighted cluster specific per filter config. The key should match the
       * :ref:`filter config name
       * <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpFilter.name>`.
       * See :ref:`Http filter route specific config <arch_overview_http_filters_per_filter_config>`
       * for details.
       * [#comment: An entry's value may be wrapped in a
       * :ref:`FilterConfig<envoy_v3_api_msg_config.route.v3.FilterConfig>`
       * message to specify additional options.]
       * 
* * map<string, .google.protobuf.Any> typed_per_filter_config = 10; */ public com.google.protobuf.Any.Builder putTypedPerFilterConfigBuilderIfAbsent( java.lang.String key) { java.util.Map builderMap = internalGetMutableTypedPerFilterConfig().ensureBuilderMap(); com.google.protobuf.AnyOrBuilder entry = builderMap.get(key); if (entry == null) { entry = com.google.protobuf.Any.newBuilder(); builderMap.put(key, entry); } if (entry instanceof com.google.protobuf.Any) { entry = ((com.google.protobuf.Any) entry).toBuilder(); builderMap.put(key, entry); } return (com.google.protobuf.Any.Builder) entry; } /** *
       * Indicates that during forwarding, the host header will be swapped with
       * this value.
       * 
* * string host_rewrite_literal = 11 [(.validate.rules) = { ... } * @return Whether the hostRewriteLiteral field is set. */ @java.lang.Override public boolean hasHostRewriteLiteral() { return hostRewriteSpecifierCase_ == 11; } /** *
       * Indicates that during forwarding, the host header will be swapped with
       * this value.
       * 
* * string host_rewrite_literal = 11 [(.validate.rules) = { ... } * @return The hostRewriteLiteral. */ @java.lang.Override public java.lang.String getHostRewriteLiteral() { java.lang.Object ref = ""; if (hostRewriteSpecifierCase_ == 11) { ref = hostRewriteSpecifier_; } if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (hostRewriteSpecifierCase_ == 11) { hostRewriteSpecifier_ = s; } return s; } else { return (java.lang.String) ref; } } /** *
       * Indicates that during forwarding, the host header will be swapped with
       * this value.
       * 
* * string host_rewrite_literal = 11 [(.validate.rules) = { ... } * @return The bytes for hostRewriteLiteral. */ @java.lang.Override public com.google.protobuf.ByteString getHostRewriteLiteralBytes() { java.lang.Object ref = ""; if (hostRewriteSpecifierCase_ == 11) { ref = hostRewriteSpecifier_; } if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); if (hostRewriteSpecifierCase_ == 11) { hostRewriteSpecifier_ = b; } return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * Indicates that during forwarding, the host header will be swapped with
       * this value.
       * 
* * string host_rewrite_literal = 11 [(.validate.rules) = { ... } * @param value The hostRewriteLiteral to set. * @return This builder for chaining. */ public Builder setHostRewriteLiteral( java.lang.String value) { if (value == null) { throw new NullPointerException(); } hostRewriteSpecifierCase_ = 11; hostRewriteSpecifier_ = value; onChanged(); return this; } /** *
       * Indicates that during forwarding, the host header will be swapped with
       * this value.
       * 
* * string host_rewrite_literal = 11 [(.validate.rules) = { ... } * @return This builder for chaining. */ public Builder clearHostRewriteLiteral() { if (hostRewriteSpecifierCase_ == 11) { hostRewriteSpecifierCase_ = 0; hostRewriteSpecifier_ = null; onChanged(); } return this; } /** *
       * Indicates that during forwarding, the host header will be swapped with
       * this value.
       * 
* * string host_rewrite_literal = 11 [(.validate.rules) = { ... } * @param value The bytes for hostRewriteLiteral to set. * @return This builder for chaining. */ public Builder setHostRewriteLiteralBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); hostRewriteSpecifierCase_ = 11; hostRewriteSpecifier_ = value; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:envoy.config.route.v3.WeightedCluster.ClusterWeight) } // @@protoc_insertion_point(class_scope:envoy.config.route.v3.WeightedCluster.ClusterWeight) private static final io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight(); } public static io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public ClusterWeight parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } private int bitField0_; private int randomValueSpecifierCase_ = 0; @SuppressWarnings("serial") private java.lang.Object randomValueSpecifier_; public enum RandomValueSpecifierCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { HEADER_NAME(4), RANDOMVALUESPECIFIER_NOT_SET(0); private final int value; private RandomValueSpecifierCase(int value) { this.value = value; } /** * @param value The number of the enum to look for. * @return The enum associated with the given number. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static RandomValueSpecifierCase valueOf(int value) { return forNumber(value); } public static RandomValueSpecifierCase forNumber(int value) { switch (value) { case 4: return HEADER_NAME; case 0: return RANDOMVALUESPECIFIER_NOT_SET; default: return null; } } public int getNumber() { return this.value; } }; public RandomValueSpecifierCase getRandomValueSpecifierCase() { return RandomValueSpecifierCase.forNumber( randomValueSpecifierCase_); } public static final int CLUSTERS_FIELD_NUMBER = 1; @SuppressWarnings("serial") private java.util.List clusters_; /** *
   * Specifies one or more upstream clusters associated with the route.
   * 
* * repeated .envoy.config.route.v3.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... } */ @java.lang.Override public java.util.List getClustersList() { return clusters_; } /** *
   * Specifies one or more upstream clusters associated with the route.
   * 
* * repeated .envoy.config.route.v3.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... } */ @java.lang.Override public java.util.List getClustersOrBuilderList() { return clusters_; } /** *
   * Specifies one or more upstream clusters associated with the route.
   * 
* * repeated .envoy.config.route.v3.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... } */ @java.lang.Override public int getClustersCount() { return clusters_.size(); } /** *
   * Specifies one or more upstream clusters associated with the route.
   * 
* * repeated .envoy.config.route.v3.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... } */ @java.lang.Override public io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight getClusters(int index) { return clusters_.get(index); } /** *
   * Specifies one or more upstream clusters associated with the route.
   * 
* * repeated .envoy.config.route.v3.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... } */ @java.lang.Override public io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeightOrBuilder getClustersOrBuilder( int index) { return clusters_.get(index); } public static final int TOTAL_WEIGHT_FIELD_NUMBER = 3; private com.google.protobuf.UInt32Value totalWeight_; /** *
   * Specifies the total weight across all clusters. The sum of all cluster weights must equal this
   * value, if this is greater than 0.
   * This field is now deprecated, and the client will use the sum of all
   * cluster weights. It is up to the management server to supply the correct weights.
   * 
* * .google.protobuf.UInt32Value total_weight = 3 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"]; * @deprecated envoy.config.route.v3.WeightedCluster.total_weight is deprecated. * See envoy/config/route/v3/route_components.proto;l=475 * @return Whether the totalWeight field is set. */ @java.lang.Override @java.lang.Deprecated public boolean hasTotalWeight() { return ((bitField0_ & 0x00000001) != 0); } /** *
   * Specifies the total weight across all clusters. The sum of all cluster weights must equal this
   * value, if this is greater than 0.
   * This field is now deprecated, and the client will use the sum of all
   * cluster weights. It is up to the management server to supply the correct weights.
   * 
* * .google.protobuf.UInt32Value total_weight = 3 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"]; * @deprecated envoy.config.route.v3.WeightedCluster.total_weight is deprecated. * See envoy/config/route/v3/route_components.proto;l=475 * @return The totalWeight. */ @java.lang.Override @java.lang.Deprecated public com.google.protobuf.UInt32Value getTotalWeight() { return totalWeight_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : totalWeight_; } /** *
   * Specifies the total weight across all clusters. The sum of all cluster weights must equal this
   * value, if this is greater than 0.
   * This field is now deprecated, and the client will use the sum of all
   * cluster weights. It is up to the management server to supply the correct weights.
   * 
* * .google.protobuf.UInt32Value total_weight = 3 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"]; */ @java.lang.Override @java.lang.Deprecated public com.google.protobuf.UInt32ValueOrBuilder getTotalWeightOrBuilder() { return totalWeight_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : totalWeight_; } public static final int RUNTIME_KEY_PREFIX_FIELD_NUMBER = 2; @SuppressWarnings("serial") private volatile java.lang.Object runtimeKeyPrefix_ = ""; /** *
   * Specifies the runtime key prefix that should be used to construct the
   * runtime keys associated with each cluster. When the ``runtime_key_prefix`` is
   * specified, the router will look for weights associated with each upstream
   * cluster under the key ``runtime_key_prefix`` + ``.`` + ``cluster[i].name`` where
   * ``cluster[i]`` denotes an entry in the clusters array field. If the runtime
   * key for the cluster does not exist, the value specified in the
   * configuration file will be used as the default weight. See the :ref:`runtime documentation
   * <operations_runtime>` for how key names map to the underlying implementation.
   * 
* * string runtime_key_prefix = 2; * @return The runtimeKeyPrefix. */ @java.lang.Override public java.lang.String getRuntimeKeyPrefix() { java.lang.Object ref = runtimeKeyPrefix_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); runtimeKeyPrefix_ = s; return s; } } /** *
   * Specifies the runtime key prefix that should be used to construct the
   * runtime keys associated with each cluster. When the ``runtime_key_prefix`` is
   * specified, the router will look for weights associated with each upstream
   * cluster under the key ``runtime_key_prefix`` + ``.`` + ``cluster[i].name`` where
   * ``cluster[i]`` denotes an entry in the clusters array field. If the runtime
   * key for the cluster does not exist, the value specified in the
   * configuration file will be used as the default weight. See the :ref:`runtime documentation
   * <operations_runtime>` for how key names map to the underlying implementation.
   * 
* * string runtime_key_prefix = 2; * @return The bytes for runtimeKeyPrefix. */ @java.lang.Override public com.google.protobuf.ByteString getRuntimeKeyPrefixBytes() { java.lang.Object ref = runtimeKeyPrefix_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); runtimeKeyPrefix_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int HEADER_NAME_FIELD_NUMBER = 4; /** *
   * Specifies the header name that is used to look up the random value passed in the request header.
   * This is used to ensure consistent cluster picking across multiple proxy levels for weighted traffic.
   * If header is not present or invalid, Envoy will fall back to use the internally generated random value.
   * This header is expected to be single-valued header as we only want to have one selected value throughout
   * the process for the consistency. And the value is a unsigned number between 0 and UINT64_MAX.
   * 
* * string header_name = 4 [(.validate.rules) = { ... } * @return Whether the headerName field is set. */ public boolean hasHeaderName() { return randomValueSpecifierCase_ == 4; } /** *
   * Specifies the header name that is used to look up the random value passed in the request header.
   * This is used to ensure consistent cluster picking across multiple proxy levels for weighted traffic.
   * If header is not present or invalid, Envoy will fall back to use the internally generated random value.
   * This header is expected to be single-valued header as we only want to have one selected value throughout
   * the process for the consistency. And the value is a unsigned number between 0 and UINT64_MAX.
   * 
* * string header_name = 4 [(.validate.rules) = { ... } * @return The headerName. */ public java.lang.String getHeaderName() { java.lang.Object ref = ""; if (randomValueSpecifierCase_ == 4) { ref = randomValueSpecifier_; } if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (randomValueSpecifierCase_ == 4) { randomValueSpecifier_ = s; } return s; } } /** *
   * Specifies the header name that is used to look up the random value passed in the request header.
   * This is used to ensure consistent cluster picking across multiple proxy levels for weighted traffic.
   * If header is not present or invalid, Envoy will fall back to use the internally generated random value.
   * This header is expected to be single-valued header as we only want to have one selected value throughout
   * the process for the consistency. And the value is a unsigned number between 0 and UINT64_MAX.
   * 
* * string header_name = 4 [(.validate.rules) = { ... } * @return The bytes for headerName. */ public com.google.protobuf.ByteString getHeaderNameBytes() { java.lang.Object ref = ""; if (randomValueSpecifierCase_ == 4) { ref = randomValueSpecifier_; } if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); if (randomValueSpecifierCase_ == 4) { randomValueSpecifier_ = b; } return b; } else { return (com.google.protobuf.ByteString) ref; } } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { for (int i = 0; i < clusters_.size(); i++) { output.writeMessage(1, clusters_.get(i)); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(runtimeKeyPrefix_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, runtimeKeyPrefix_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(3, getTotalWeight()); } if (randomValueSpecifierCase_ == 4) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, randomValueSpecifier_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; for (int i = 0; i < clusters_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, clusters_.get(i)); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(runtimeKeyPrefix_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, runtimeKeyPrefix_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, getTotalWeight()); } if (randomValueSpecifierCase_ == 4) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, randomValueSpecifier_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof io.envoyproxy.envoy.config.route.v3.WeightedCluster)) { return super.equals(obj); } io.envoyproxy.envoy.config.route.v3.WeightedCluster other = (io.envoyproxy.envoy.config.route.v3.WeightedCluster) obj; if (!getClustersList() .equals(other.getClustersList())) return false; if (hasTotalWeight() != other.hasTotalWeight()) return false; if (hasTotalWeight()) { if (!getTotalWeight() .equals(other.getTotalWeight())) return false; } if (!getRuntimeKeyPrefix() .equals(other.getRuntimeKeyPrefix())) return false; if (!getRandomValueSpecifierCase().equals(other.getRandomValueSpecifierCase())) return false; switch (randomValueSpecifierCase_) { case 4: if (!getHeaderName() .equals(other.getHeaderName())) return false; break; case 0: default: } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (getClustersCount() > 0) { hash = (37 * hash) + CLUSTERS_FIELD_NUMBER; hash = (53 * hash) + getClustersList().hashCode(); } if (hasTotalWeight()) { hash = (37 * hash) + TOTAL_WEIGHT_FIELD_NUMBER; hash = (53 * hash) + getTotalWeight().hashCode(); } hash = (37 * hash) + RUNTIME_KEY_PREFIX_FIELD_NUMBER; hash = (53 * hash) + getRuntimeKeyPrefix().hashCode(); switch (randomValueSpecifierCase_) { case 4: hash = (37 * hash) + HEADER_NAME_FIELD_NUMBER; hash = (53 * hash) + getHeaderName().hashCode(); break; case 0: default: } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static io.envoyproxy.envoy.config.route.v3.WeightedCluster parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.config.route.v3.WeightedCluster parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.envoyproxy.envoy.config.route.v3.WeightedCluster parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.config.route.v3.WeightedCluster parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.envoyproxy.envoy.config.route.v3.WeightedCluster parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.config.route.v3.WeightedCluster parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.envoyproxy.envoy.config.route.v3.WeightedCluster parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.envoyproxy.envoy.config.route.v3.WeightedCluster parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static io.envoyproxy.envoy.config.route.v3.WeightedCluster parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static io.envoyproxy.envoy.config.route.v3.WeightedCluster parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static io.envoyproxy.envoy.config.route.v3.WeightedCluster parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.envoyproxy.envoy.config.route.v3.WeightedCluster parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(io.envoyproxy.envoy.config.route.v3.WeightedCluster prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
   * Compared to the :ref:`cluster <envoy_v3_api_field_config.route.v3.RouteAction.cluster>` field that specifies a
   * single upstream cluster as the target of a request, the :ref:`weighted_clusters
   * <envoy_v3_api_field_config.route.v3.RouteAction.weighted_clusters>` option allows for specification of
   * multiple upstream clusters along with weights that indicate the percentage of
   * traffic to be forwarded to each cluster. The router selects an upstream cluster based on the
   * weights.
   * 
* * Protobuf type {@code envoy.config.route.v3.WeightedCluster} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:envoy.config.route.v3.WeightedCluster) io.envoyproxy.envoy.config.route.v3.WeightedClusterOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_WeightedCluster_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_WeightedCluster_fieldAccessorTable .ensureFieldAccessorsInitialized( io.envoyproxy.envoy.config.route.v3.WeightedCluster.class, io.envoyproxy.envoy.config.route.v3.WeightedCluster.Builder.class); } // Construct using io.envoyproxy.envoy.config.route.v3.WeightedCluster.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getClustersFieldBuilder(); getTotalWeightFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; if (clustersBuilder_ == null) { clusters_ = java.util.Collections.emptyList(); } else { clusters_ = null; clustersBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000001); totalWeight_ = null; if (totalWeightBuilder_ != null) { totalWeightBuilder_.dispose(); totalWeightBuilder_ = null; } runtimeKeyPrefix_ = ""; randomValueSpecifierCase_ = 0; randomValueSpecifier_ = null; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_WeightedCluster_descriptor; } @java.lang.Override public io.envoyproxy.envoy.config.route.v3.WeightedCluster getDefaultInstanceForType() { return io.envoyproxy.envoy.config.route.v3.WeightedCluster.getDefaultInstance(); } @java.lang.Override public io.envoyproxy.envoy.config.route.v3.WeightedCluster build() { io.envoyproxy.envoy.config.route.v3.WeightedCluster result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public io.envoyproxy.envoy.config.route.v3.WeightedCluster buildPartial() { io.envoyproxy.envoy.config.route.v3.WeightedCluster result = new io.envoyproxy.envoy.config.route.v3.WeightedCluster(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } buildPartialOneofs(result); onBuilt(); return result; } private void buildPartialRepeatedFields(io.envoyproxy.envoy.config.route.v3.WeightedCluster result) { if (clustersBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { clusters_ = java.util.Collections.unmodifiableList(clusters_); bitField0_ = (bitField0_ & ~0x00000001); } result.clusters_ = clusters_; } else { result.clusters_ = clustersBuilder_.build(); } } private void buildPartial0(io.envoyproxy.envoy.config.route.v3.WeightedCluster result) { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000002) != 0)) { result.totalWeight_ = totalWeightBuilder_ == null ? totalWeight_ : totalWeightBuilder_.build(); to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000004) != 0)) { result.runtimeKeyPrefix_ = runtimeKeyPrefix_; } result.bitField0_ |= to_bitField0_; } private void buildPartialOneofs(io.envoyproxy.envoy.config.route.v3.WeightedCluster result) { result.randomValueSpecifierCase_ = randomValueSpecifierCase_; result.randomValueSpecifier_ = this.randomValueSpecifier_; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof io.envoyproxy.envoy.config.route.v3.WeightedCluster) { return mergeFrom((io.envoyproxy.envoy.config.route.v3.WeightedCluster)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(io.envoyproxy.envoy.config.route.v3.WeightedCluster other) { if (other == io.envoyproxy.envoy.config.route.v3.WeightedCluster.getDefaultInstance()) return this; if (clustersBuilder_ == null) { if (!other.clusters_.isEmpty()) { if (clusters_.isEmpty()) { clusters_ = other.clusters_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureClustersIsMutable(); clusters_.addAll(other.clusters_); } onChanged(); } } else { if (!other.clusters_.isEmpty()) { if (clustersBuilder_.isEmpty()) { clustersBuilder_.dispose(); clustersBuilder_ = null; clusters_ = other.clusters_; bitField0_ = (bitField0_ & ~0x00000001); clustersBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getClustersFieldBuilder() : null; } else { clustersBuilder_.addAllMessages(other.clusters_); } } } if (other.hasTotalWeight()) { mergeTotalWeight(other.getTotalWeight()); } if (!other.getRuntimeKeyPrefix().isEmpty()) { runtimeKeyPrefix_ = other.runtimeKeyPrefix_; bitField0_ |= 0x00000004; onChanged(); } switch (other.getRandomValueSpecifierCase()) { case HEADER_NAME: { randomValueSpecifierCase_ = 4; randomValueSpecifier_ = other.randomValueSpecifier_; onChanged(); break; } case RANDOMVALUESPECIFIER_NOT_SET: { break; } } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight m = input.readMessage( io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight.parser(), extensionRegistry); if (clustersBuilder_ == null) { ensureClustersIsMutable(); clusters_.add(m); } else { clustersBuilder_.addMessage(m); } break; } // case 10 case 18: { runtimeKeyPrefix_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000004; break; } // case 18 case 26: { input.readMessage( getTotalWeightFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 26 case 34: { java.lang.String s = input.readStringRequireUtf8(); randomValueSpecifierCase_ = 4; randomValueSpecifier_ = s; break; } // case 34 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int randomValueSpecifierCase_ = 0; private java.lang.Object randomValueSpecifier_; public RandomValueSpecifierCase getRandomValueSpecifierCase() { return RandomValueSpecifierCase.forNumber( randomValueSpecifierCase_); } public Builder clearRandomValueSpecifier() { randomValueSpecifierCase_ = 0; randomValueSpecifier_ = null; onChanged(); return this; } private int bitField0_; private java.util.List clusters_ = java.util.Collections.emptyList(); private void ensureClustersIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { clusters_ = new java.util.ArrayList(clusters_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight, io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight.Builder, io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeightOrBuilder> clustersBuilder_; /** *
     * Specifies one or more upstream clusters associated with the route.
     * 
* * repeated .envoy.config.route.v3.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... } */ public java.util.List getClustersList() { if (clustersBuilder_ == null) { return java.util.Collections.unmodifiableList(clusters_); } else { return clustersBuilder_.getMessageList(); } } /** *
     * Specifies one or more upstream clusters associated with the route.
     * 
* * repeated .envoy.config.route.v3.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... } */ public int getClustersCount() { if (clustersBuilder_ == null) { return clusters_.size(); } else { return clustersBuilder_.getCount(); } } /** *
     * Specifies one or more upstream clusters associated with the route.
     * 
* * repeated .envoy.config.route.v3.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... } */ public io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight getClusters(int index) { if (clustersBuilder_ == null) { return clusters_.get(index); } else { return clustersBuilder_.getMessage(index); } } /** *
     * Specifies one or more upstream clusters associated with the route.
     * 
* * repeated .envoy.config.route.v3.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... } */ public Builder setClusters( int index, io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight value) { if (clustersBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureClustersIsMutable(); clusters_.set(index, value); onChanged(); } else { clustersBuilder_.setMessage(index, value); } return this; } /** *
     * Specifies one or more upstream clusters associated with the route.
     * 
* * repeated .envoy.config.route.v3.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... } */ public Builder setClusters( int index, io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight.Builder builderForValue) { if (clustersBuilder_ == null) { ensureClustersIsMutable(); clusters_.set(index, builderForValue.build()); onChanged(); } else { clustersBuilder_.setMessage(index, builderForValue.build()); } return this; } /** *
     * Specifies one or more upstream clusters associated with the route.
     * 
* * repeated .envoy.config.route.v3.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... } */ public Builder addClusters(io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight value) { if (clustersBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureClustersIsMutable(); clusters_.add(value); onChanged(); } else { clustersBuilder_.addMessage(value); } return this; } /** *
     * Specifies one or more upstream clusters associated with the route.
     * 
* * repeated .envoy.config.route.v3.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... } */ public Builder addClusters( int index, io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight value) { if (clustersBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureClustersIsMutable(); clusters_.add(index, value); onChanged(); } else { clustersBuilder_.addMessage(index, value); } return this; } /** *
     * Specifies one or more upstream clusters associated with the route.
     * 
* * repeated .envoy.config.route.v3.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... } */ public Builder addClusters( io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight.Builder builderForValue) { if (clustersBuilder_ == null) { ensureClustersIsMutable(); clusters_.add(builderForValue.build()); onChanged(); } else { clustersBuilder_.addMessage(builderForValue.build()); } return this; } /** *
     * Specifies one or more upstream clusters associated with the route.
     * 
* * repeated .envoy.config.route.v3.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... } */ public Builder addClusters( int index, io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight.Builder builderForValue) { if (clustersBuilder_ == null) { ensureClustersIsMutable(); clusters_.add(index, builderForValue.build()); onChanged(); } else { clustersBuilder_.addMessage(index, builderForValue.build()); } return this; } /** *
     * Specifies one or more upstream clusters associated with the route.
     * 
* * repeated .envoy.config.route.v3.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... } */ public Builder addAllClusters( java.lang.Iterable values) { if (clustersBuilder_ == null) { ensureClustersIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, clusters_); onChanged(); } else { clustersBuilder_.addAllMessages(values); } return this; } /** *
     * Specifies one or more upstream clusters associated with the route.
     * 
* * repeated .envoy.config.route.v3.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... } */ public Builder clearClusters() { if (clustersBuilder_ == null) { clusters_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { clustersBuilder_.clear(); } return this; } /** *
     * Specifies one or more upstream clusters associated with the route.
     * 
* * repeated .envoy.config.route.v3.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... } */ public Builder removeClusters(int index) { if (clustersBuilder_ == null) { ensureClustersIsMutable(); clusters_.remove(index); onChanged(); } else { clustersBuilder_.remove(index); } return this; } /** *
     * Specifies one or more upstream clusters associated with the route.
     * 
* * repeated .envoy.config.route.v3.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... } */ public io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight.Builder getClustersBuilder( int index) { return getClustersFieldBuilder().getBuilder(index); } /** *
     * Specifies one or more upstream clusters associated with the route.
     * 
* * repeated .envoy.config.route.v3.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... } */ public io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeightOrBuilder getClustersOrBuilder( int index) { if (clustersBuilder_ == null) { return clusters_.get(index); } else { return clustersBuilder_.getMessageOrBuilder(index); } } /** *
     * Specifies one or more upstream clusters associated with the route.
     * 
* * repeated .envoy.config.route.v3.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... } */ public java.util.List getClustersOrBuilderList() { if (clustersBuilder_ != null) { return clustersBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(clusters_); } } /** *
     * Specifies one or more upstream clusters associated with the route.
     * 
* * repeated .envoy.config.route.v3.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... } */ public io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight.Builder addClustersBuilder() { return getClustersFieldBuilder().addBuilder( io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight.getDefaultInstance()); } /** *
     * Specifies one or more upstream clusters associated with the route.
     * 
* * repeated .envoy.config.route.v3.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... } */ public io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight.Builder addClustersBuilder( int index) { return getClustersFieldBuilder().addBuilder( index, io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight.getDefaultInstance()); } /** *
     * Specifies one or more upstream clusters associated with the route.
     * 
* * repeated .envoy.config.route.v3.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... } */ public java.util.List getClustersBuilderList() { return getClustersFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight, io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight.Builder, io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeightOrBuilder> getClustersFieldBuilder() { if (clustersBuilder_ == null) { clustersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight, io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeight.Builder, io.envoyproxy.envoy.config.route.v3.WeightedCluster.ClusterWeightOrBuilder>( clusters_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); clusters_ = null; } return clustersBuilder_; } private com.google.protobuf.UInt32Value totalWeight_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> totalWeightBuilder_; /** *
     * Specifies the total weight across all clusters. The sum of all cluster weights must equal this
     * value, if this is greater than 0.
     * This field is now deprecated, and the client will use the sum of all
     * cluster weights. It is up to the management server to supply the correct weights.
     * 
* * .google.protobuf.UInt32Value total_weight = 3 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"]; * @deprecated envoy.config.route.v3.WeightedCluster.total_weight is deprecated. * See envoy/config/route/v3/route_components.proto;l=475 * @return Whether the totalWeight field is set. */ @java.lang.Deprecated public boolean hasTotalWeight() { return ((bitField0_ & 0x00000002) != 0); } /** *
     * Specifies the total weight across all clusters. The sum of all cluster weights must equal this
     * value, if this is greater than 0.
     * This field is now deprecated, and the client will use the sum of all
     * cluster weights. It is up to the management server to supply the correct weights.
     * 
* * .google.protobuf.UInt32Value total_weight = 3 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"]; * @deprecated envoy.config.route.v3.WeightedCluster.total_weight is deprecated. * See envoy/config/route/v3/route_components.proto;l=475 * @return The totalWeight. */ @java.lang.Deprecated public com.google.protobuf.UInt32Value getTotalWeight() { if (totalWeightBuilder_ == null) { return totalWeight_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : totalWeight_; } else { return totalWeightBuilder_.getMessage(); } } /** *
     * Specifies the total weight across all clusters. The sum of all cluster weights must equal this
     * value, if this is greater than 0.
     * This field is now deprecated, and the client will use the sum of all
     * cluster weights. It is up to the management server to supply the correct weights.
     * 
* * .google.protobuf.UInt32Value total_weight = 3 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"]; */ @java.lang.Deprecated public Builder setTotalWeight(com.google.protobuf.UInt32Value value) { if (totalWeightBuilder_ == null) { if (value == null) { throw new NullPointerException(); } totalWeight_ = value; } else { totalWeightBuilder_.setMessage(value); } bitField0_ |= 0x00000002; onChanged(); return this; } /** *
     * Specifies the total weight across all clusters. The sum of all cluster weights must equal this
     * value, if this is greater than 0.
     * This field is now deprecated, and the client will use the sum of all
     * cluster weights. It is up to the management server to supply the correct weights.
     * 
* * .google.protobuf.UInt32Value total_weight = 3 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"]; */ @java.lang.Deprecated public Builder setTotalWeight( com.google.protobuf.UInt32Value.Builder builderForValue) { if (totalWeightBuilder_ == null) { totalWeight_ = builderForValue.build(); } else { totalWeightBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000002; onChanged(); return this; } /** *
     * Specifies the total weight across all clusters. The sum of all cluster weights must equal this
     * value, if this is greater than 0.
     * This field is now deprecated, and the client will use the sum of all
     * cluster weights. It is up to the management server to supply the correct weights.
     * 
* * .google.protobuf.UInt32Value total_weight = 3 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"]; */ @java.lang.Deprecated public Builder mergeTotalWeight(com.google.protobuf.UInt32Value value) { if (totalWeightBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0) && totalWeight_ != null && totalWeight_ != com.google.protobuf.UInt32Value.getDefaultInstance()) { getTotalWeightBuilder().mergeFrom(value); } else { totalWeight_ = value; } } else { totalWeightBuilder_.mergeFrom(value); } if (totalWeight_ != null) { bitField0_ |= 0x00000002; onChanged(); } return this; } /** *
     * Specifies the total weight across all clusters. The sum of all cluster weights must equal this
     * value, if this is greater than 0.
     * This field is now deprecated, and the client will use the sum of all
     * cluster weights. It is up to the management server to supply the correct weights.
     * 
* * .google.protobuf.UInt32Value total_weight = 3 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"]; */ @java.lang.Deprecated public Builder clearTotalWeight() { bitField0_ = (bitField0_ & ~0x00000002); totalWeight_ = null; if (totalWeightBuilder_ != null) { totalWeightBuilder_.dispose(); totalWeightBuilder_ = null; } onChanged(); return this; } /** *
     * Specifies the total weight across all clusters. The sum of all cluster weights must equal this
     * value, if this is greater than 0.
     * This field is now deprecated, and the client will use the sum of all
     * cluster weights. It is up to the management server to supply the correct weights.
     * 
* * .google.protobuf.UInt32Value total_weight = 3 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"]; */ @java.lang.Deprecated public com.google.protobuf.UInt32Value.Builder getTotalWeightBuilder() { bitField0_ |= 0x00000002; onChanged(); return getTotalWeightFieldBuilder().getBuilder(); } /** *
     * Specifies the total weight across all clusters. The sum of all cluster weights must equal this
     * value, if this is greater than 0.
     * This field is now deprecated, and the client will use the sum of all
     * cluster weights. It is up to the management server to supply the correct weights.
     * 
* * .google.protobuf.UInt32Value total_weight = 3 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"]; */ @java.lang.Deprecated public com.google.protobuf.UInt32ValueOrBuilder getTotalWeightOrBuilder() { if (totalWeightBuilder_ != null) { return totalWeightBuilder_.getMessageOrBuilder(); } else { return totalWeight_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : totalWeight_; } } /** *
     * Specifies the total weight across all clusters. The sum of all cluster weights must equal this
     * value, if this is greater than 0.
     * This field is now deprecated, and the client will use the sum of all
     * cluster weights. It is up to the management server to supply the correct weights.
     * 
* * .google.protobuf.UInt32Value total_weight = 3 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"]; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> getTotalWeightFieldBuilder() { if (totalWeightBuilder_ == null) { totalWeightBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>( getTotalWeight(), getParentForChildren(), isClean()); totalWeight_ = null; } return totalWeightBuilder_; } private java.lang.Object runtimeKeyPrefix_ = ""; /** *
     * Specifies the runtime key prefix that should be used to construct the
     * runtime keys associated with each cluster. When the ``runtime_key_prefix`` is
     * specified, the router will look for weights associated with each upstream
     * cluster under the key ``runtime_key_prefix`` + ``.`` + ``cluster[i].name`` where
     * ``cluster[i]`` denotes an entry in the clusters array field. If the runtime
     * key for the cluster does not exist, the value specified in the
     * configuration file will be used as the default weight. See the :ref:`runtime documentation
     * <operations_runtime>` for how key names map to the underlying implementation.
     * 
* * string runtime_key_prefix = 2; * @return The runtimeKeyPrefix. */ public java.lang.String getRuntimeKeyPrefix() { java.lang.Object ref = runtimeKeyPrefix_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); runtimeKeyPrefix_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * Specifies the runtime key prefix that should be used to construct the
     * runtime keys associated with each cluster. When the ``runtime_key_prefix`` is
     * specified, the router will look for weights associated with each upstream
     * cluster under the key ``runtime_key_prefix`` + ``.`` + ``cluster[i].name`` where
     * ``cluster[i]`` denotes an entry in the clusters array field. If the runtime
     * key for the cluster does not exist, the value specified in the
     * configuration file will be used as the default weight. See the :ref:`runtime documentation
     * <operations_runtime>` for how key names map to the underlying implementation.
     * 
* * string runtime_key_prefix = 2; * @return The bytes for runtimeKeyPrefix. */ public com.google.protobuf.ByteString getRuntimeKeyPrefixBytes() { java.lang.Object ref = runtimeKeyPrefix_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); runtimeKeyPrefix_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * Specifies the runtime key prefix that should be used to construct the
     * runtime keys associated with each cluster. When the ``runtime_key_prefix`` is
     * specified, the router will look for weights associated with each upstream
     * cluster under the key ``runtime_key_prefix`` + ``.`` + ``cluster[i].name`` where
     * ``cluster[i]`` denotes an entry in the clusters array field. If the runtime
     * key for the cluster does not exist, the value specified in the
     * configuration file will be used as the default weight. See the :ref:`runtime documentation
     * <operations_runtime>` for how key names map to the underlying implementation.
     * 
* * string runtime_key_prefix = 2; * @param value The runtimeKeyPrefix to set. * @return This builder for chaining. */ public Builder setRuntimeKeyPrefix( java.lang.String value) { if (value == null) { throw new NullPointerException(); } runtimeKeyPrefix_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** *
     * Specifies the runtime key prefix that should be used to construct the
     * runtime keys associated with each cluster. When the ``runtime_key_prefix`` is
     * specified, the router will look for weights associated with each upstream
     * cluster under the key ``runtime_key_prefix`` + ``.`` + ``cluster[i].name`` where
     * ``cluster[i]`` denotes an entry in the clusters array field. If the runtime
     * key for the cluster does not exist, the value specified in the
     * configuration file will be used as the default weight. See the :ref:`runtime documentation
     * <operations_runtime>` for how key names map to the underlying implementation.
     * 
* * string runtime_key_prefix = 2; * @return This builder for chaining. */ public Builder clearRuntimeKeyPrefix() { runtimeKeyPrefix_ = getDefaultInstance().getRuntimeKeyPrefix(); bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } /** *
     * Specifies the runtime key prefix that should be used to construct the
     * runtime keys associated with each cluster. When the ``runtime_key_prefix`` is
     * specified, the router will look for weights associated with each upstream
     * cluster under the key ``runtime_key_prefix`` + ``.`` + ``cluster[i].name`` where
     * ``cluster[i]`` denotes an entry in the clusters array field. If the runtime
     * key for the cluster does not exist, the value specified in the
     * configuration file will be used as the default weight. See the :ref:`runtime documentation
     * <operations_runtime>` for how key names map to the underlying implementation.
     * 
* * string runtime_key_prefix = 2; * @param value The bytes for runtimeKeyPrefix to set. * @return This builder for chaining. */ public Builder setRuntimeKeyPrefixBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); runtimeKeyPrefix_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** *
     * Specifies the header name that is used to look up the random value passed in the request header.
     * This is used to ensure consistent cluster picking across multiple proxy levels for weighted traffic.
     * If header is not present or invalid, Envoy will fall back to use the internally generated random value.
     * This header is expected to be single-valued header as we only want to have one selected value throughout
     * the process for the consistency. And the value is a unsigned number between 0 and UINT64_MAX.
     * 
* * string header_name = 4 [(.validate.rules) = { ... } * @return Whether the headerName field is set. */ @java.lang.Override public boolean hasHeaderName() { return randomValueSpecifierCase_ == 4; } /** *
     * Specifies the header name that is used to look up the random value passed in the request header.
     * This is used to ensure consistent cluster picking across multiple proxy levels for weighted traffic.
     * If header is not present or invalid, Envoy will fall back to use the internally generated random value.
     * This header is expected to be single-valued header as we only want to have one selected value throughout
     * the process for the consistency. And the value is a unsigned number between 0 and UINT64_MAX.
     * 
* * string header_name = 4 [(.validate.rules) = { ... } * @return The headerName. */ @java.lang.Override public java.lang.String getHeaderName() { java.lang.Object ref = ""; if (randomValueSpecifierCase_ == 4) { ref = randomValueSpecifier_; } if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (randomValueSpecifierCase_ == 4) { randomValueSpecifier_ = s; } return s; } else { return (java.lang.String) ref; } } /** *
     * Specifies the header name that is used to look up the random value passed in the request header.
     * This is used to ensure consistent cluster picking across multiple proxy levels for weighted traffic.
     * If header is not present or invalid, Envoy will fall back to use the internally generated random value.
     * This header is expected to be single-valued header as we only want to have one selected value throughout
     * the process for the consistency. And the value is a unsigned number between 0 and UINT64_MAX.
     * 
* * string header_name = 4 [(.validate.rules) = { ... } * @return The bytes for headerName. */ @java.lang.Override public com.google.protobuf.ByteString getHeaderNameBytes() { java.lang.Object ref = ""; if (randomValueSpecifierCase_ == 4) { ref = randomValueSpecifier_; } if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); if (randomValueSpecifierCase_ == 4) { randomValueSpecifier_ = b; } return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * Specifies the header name that is used to look up the random value passed in the request header.
     * This is used to ensure consistent cluster picking across multiple proxy levels for weighted traffic.
     * If header is not present or invalid, Envoy will fall back to use the internally generated random value.
     * This header is expected to be single-valued header as we only want to have one selected value throughout
     * the process for the consistency. And the value is a unsigned number between 0 and UINT64_MAX.
     * 
* * string header_name = 4 [(.validate.rules) = { ... } * @param value The headerName to set. * @return This builder for chaining. */ public Builder setHeaderName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } randomValueSpecifierCase_ = 4; randomValueSpecifier_ = value; onChanged(); return this; } /** *
     * Specifies the header name that is used to look up the random value passed in the request header.
     * This is used to ensure consistent cluster picking across multiple proxy levels for weighted traffic.
     * If header is not present or invalid, Envoy will fall back to use the internally generated random value.
     * This header is expected to be single-valued header as we only want to have one selected value throughout
     * the process for the consistency. And the value is a unsigned number between 0 and UINT64_MAX.
     * 
* * string header_name = 4 [(.validate.rules) = { ... } * @return This builder for chaining. */ public Builder clearHeaderName() { if (randomValueSpecifierCase_ == 4) { randomValueSpecifierCase_ = 0; randomValueSpecifier_ = null; onChanged(); } return this; } /** *
     * Specifies the header name that is used to look up the random value passed in the request header.
     * This is used to ensure consistent cluster picking across multiple proxy levels for weighted traffic.
     * If header is not present or invalid, Envoy will fall back to use the internally generated random value.
     * This header is expected to be single-valued header as we only want to have one selected value throughout
     * the process for the consistency. And the value is a unsigned number between 0 and UINT64_MAX.
     * 
* * string header_name = 4 [(.validate.rules) = { ... } * @param value The bytes for headerName to set. * @return This builder for chaining. */ public Builder setHeaderNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); randomValueSpecifierCase_ = 4; randomValueSpecifier_ = value; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:envoy.config.route.v3.WeightedCluster) } // @@protoc_insertion_point(class_scope:envoy.config.route.v3.WeightedCluster) private static final io.envoyproxy.envoy.config.route.v3.WeightedCluster DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new io.envoyproxy.envoy.config.route.v3.WeightedCluster(); } public static io.envoyproxy.envoy.config.route.v3.WeightedCluster getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public WeightedCluster parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public io.envoyproxy.envoy.config.route.v3.WeightedCluster getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy