
io.envoyproxy.envoy.api.v2.route.WeightedCluster Maven / Gradle / Ivy
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: envoy/api/v2/route/route_components.proto
package io.envoyproxy.envoy.api.v2.route;
/**
*
* Compared to the :ref:`cluster <envoy_api_field_route.RouteAction.cluster>` field that specifies a
* single upstream cluster as the target of a request, the :ref:`weighted_clusters
* <envoy_api_field_route.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.api.v2.route.WeightedCluster}
*/
public final class WeightedCluster extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.api.v2.route.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();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private WeightedCluster(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
clusters_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
clusters_.add(
input.readMessage(io.envoyproxy.envoy.api.v2.route.WeightedCluster.ClusterWeight.parser(), extensionRegistry));
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
runtimeKeyPrefix_ = s;
break;
}
case 26: {
com.google.protobuf.UInt32Value.Builder subBuilder = null;
if (totalWeight_ != null) {
subBuilder = totalWeight_.toBuilder();
}
totalWeight_ = input.readMessage(com.google.protobuf.UInt32Value.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(totalWeight_);
totalWeight_ = subBuilder.buildPartial();
}
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
clusters_ = java.util.Collections.unmodifiableList(clusters_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.api.v2.route.RouteComponentsProto.internal_static_envoy_api_v2_route_WeightedCluster_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.api.v2.route.RouteComponentsProto.internal_static_envoy_api_v2_route_WeightedCluster_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.api.v2.route.WeightedCluster.class, io.envoyproxy.envoy.api.v2.route.WeightedCluster.Builder.class);
}
public interface ClusterWeightOrBuilder extends
// @@protoc_insertion_point(interface_extends:envoy.api.v2.route.WeightedCluster.ClusterWeight)
com.google.protobuf.MessageOrBuilder {
/**
*
* Name of the upstream cluster. The cluster must exist in the
* :ref:`cluster manager configuration <config_cluster_manager>`.
*
*
* string name = 1 [(.validate.rules) = { ... }
* @return The name.
*/
java.lang.String getName();
/**
*
* Name of the upstream cluster. The cluster must exist in the
* :ref:`cluster manager configuration <config_cluster_manager>`.
*
*
* string name = 1 [(.validate.rules) = { ... }
* @return The bytes for name.
*/
com.google.protobuf.ByteString
getNameBytes();
/**
*
* An integer between 0 and :ref:`total_weight
* <envoy_api_field_route.WeightedCluster.total_weight>`. 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 add up to the total_weight, if total_weight is greater than 0.
*
*
* .google.protobuf.UInt32Value weight = 2;
* @return Whether the weight field is set.
*/
boolean hasWeight();
/**
*
* An integer between 0 and :ref:`total_weight
* <envoy_api_field_route.WeightedCluster.total_weight>`. 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 add up to the total_weight, if total_weight is greater than 0.
*
*
* .google.protobuf.UInt32Value weight = 2;
* @return The weight.
*/
com.google.protobuf.UInt32Value getWeight();
/**
*
* An integer between 0 and :ref:`total_weight
* <envoy_api_field_route.WeightedCluster.total_weight>`. 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 add up to the total_weight, if total_weight is greater than 0.
*
*
* .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_api_field_route.RouteAction.metadata_match>`, with
* values here taking precedence. The filter name should be specified as *envoy.lb*.
*
*
* .envoy.api.v2.core.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_api_field_route.RouteAction.metadata_match>`, with
* values here taking precedence. The filter name should be specified as *envoy.lb*.
*
*
* .envoy.api.v2.core.Metadata metadata_match = 3;
* @return The metadataMatch.
*/
io.envoyproxy.envoy.api.v2.core.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_api_field_route.RouteAction.metadata_match>`, with
* values here taking precedence. The filter name should be specified as *envoy.lb*.
*
*
* .envoy.api.v2.core.Metadata metadata_match = 3;
*/
io.envoyproxy.envoy.api.v2.core.MetadataOrBuilder getMetadataMatchOrBuilder();
/**
*
* Specifies a list of headers to be added to requests when this cluster is selected
* through the enclosing :ref:`envoy_api_msg_route.RouteAction`.
* Headers specified at this level are applied before headers from the enclosing
* :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and
* :ref:`envoy_api_msg_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.api.v2.core.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_api_msg_route.RouteAction`.
* Headers specified at this level are applied before headers from the enclosing
* :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and
* :ref:`envoy_api_msg_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.api.v2.core.HeaderValueOption request_headers_to_add = 4 [(.validate.rules) = { ... }
*/
io.envoyproxy.envoy.api.v2.core.HeaderValueOption getRequestHeadersToAdd(int index);
/**
*
* Specifies a list of headers to be added to requests when this cluster is selected
* through the enclosing :ref:`envoy_api_msg_route.RouteAction`.
* Headers specified at this level are applied before headers from the enclosing
* :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and
* :ref:`envoy_api_msg_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.api.v2.core.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_api_msg_route.RouteAction`.
* Headers specified at this level are applied before headers from the enclosing
* :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and
* :ref:`envoy_api_msg_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.api.v2.core.HeaderValueOption request_headers_to_add = 4 [(.validate.rules) = { ... }
*/
java.util.List extends io.envoyproxy.envoy.api.v2.core.HeaderValueOptionOrBuilder>
getRequestHeadersToAddOrBuilderList();
/**
*
* Specifies a list of headers to be added to requests when this cluster is selected
* through the enclosing :ref:`envoy_api_msg_route.RouteAction`.
* Headers specified at this level are applied before headers from the enclosing
* :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and
* :ref:`envoy_api_msg_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.api.v2.core.HeaderValueOption request_headers_to_add = 4 [(.validate.rules) = { ... }
*/
io.envoyproxy.envoy.api.v2.core.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_api_msg_route.RouteAction`.
*
*
* repeated string request_headers_to_remove = 9;
* @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_api_msg_route.RouteAction`.
*
*
* repeated string request_headers_to_remove = 9;
* @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_api_msg_route.RouteAction`.
*
*
* repeated string request_headers_to_remove = 9;
* @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_api_msg_route.RouteAction`.
*
*
* repeated string request_headers_to_remove = 9;
* @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_api_msg_route.RouteAction`.
* Headers specified at this level are applied before headers from the enclosing
* :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and
* :ref:`envoy_api_msg_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.api.v2.core.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_api_msg_route.RouteAction`.
* Headers specified at this level are applied before headers from the enclosing
* :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and
* :ref:`envoy_api_msg_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.api.v2.core.HeaderValueOption response_headers_to_add = 5 [(.validate.rules) = { ... }
*/
io.envoyproxy.envoy.api.v2.core.HeaderValueOption getResponseHeadersToAdd(int index);
/**
*
* Specifies a list of headers to be added to responses when this cluster is selected
* through the enclosing :ref:`envoy_api_msg_route.RouteAction`.
* Headers specified at this level are applied before headers from the enclosing
* :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and
* :ref:`envoy_api_msg_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.api.v2.core.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_api_msg_route.RouteAction`.
* Headers specified at this level are applied before headers from the enclosing
* :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and
* :ref:`envoy_api_msg_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.api.v2.core.HeaderValueOption response_headers_to_add = 5 [(.validate.rules) = { ... }
*/
java.util.List extends io.envoyproxy.envoy.api.v2.core.HeaderValueOptionOrBuilder>
getResponseHeadersToAddOrBuilderList();
/**
*
* Specifies a list of headers to be added to responses when this cluster is selected
* through the enclosing :ref:`envoy_api_msg_route.RouteAction`.
* Headers specified at this level are applied before headers from the enclosing
* :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and
* :ref:`envoy_api_msg_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.api.v2.core.HeaderValueOption response_headers_to_add = 5 [(.validate.rules) = { ... }
*/
io.envoyproxy.envoy.api.v2.core.HeaderValueOptionOrBuilder getResponseHeadersToAddOrBuilder(
int index);
/**
*
* Specifies a list of headers to be removed from responses when this cluster is selected
* through the enclosing :ref:`envoy_api_msg_route.RouteAction`.
*
*
* repeated string response_headers_to_remove = 6;
* @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_api_msg_route.RouteAction`.
*
*
* repeated string response_headers_to_remove = 6;
* @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_api_msg_route.RouteAction`.
*
*
* repeated string response_headers_to_remove = 6;
* @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_api_msg_route.RouteAction`.
*
*
* repeated string response_headers_to_remove = 6;
* @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);
/**
*
* The per_filter_config field can be used to provide weighted cluster-specific
* configurations for filters. The key should match the filter name, such as
* *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter
* specific; see the :ref:`HTTP filter documentation <config_http_filters>`
* for if and how it is utilized.
*
*
* map<string, .google.protobuf.Struct> per_filter_config = 8 [deprecated = true];
*/
@java.lang.Deprecated int getPerFilterConfigCount();
/**
*
* The per_filter_config field can be used to provide weighted cluster-specific
* configurations for filters. The key should match the filter name, such as
* *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter
* specific; see the :ref:`HTTP filter documentation <config_http_filters>`
* for if and how it is utilized.
*
*
* map<string, .google.protobuf.Struct> per_filter_config = 8 [deprecated = true];
*/
@java.lang.Deprecated boolean containsPerFilterConfig(
java.lang.String key);
/**
* Use {@link #getPerFilterConfigMap()} instead.
*/
@java.lang.Deprecated
java.util.Map
getPerFilterConfig();
/**
*
* The per_filter_config field can be used to provide weighted cluster-specific
* configurations for filters. The key should match the filter name, such as
* *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter
* specific; see the :ref:`HTTP filter documentation <config_http_filters>`
* for if and how it is utilized.
*
*
* map<string, .google.protobuf.Struct> per_filter_config = 8 [deprecated = true];
*/
@java.lang.Deprecated java.util.Map
getPerFilterConfigMap();
/**
*
* The per_filter_config field can be used to provide weighted cluster-specific
* configurations for filters. The key should match the filter name, such as
* *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter
* specific; see the :ref:`HTTP filter documentation <config_http_filters>`
* for if and how it is utilized.
*
*
* map<string, .google.protobuf.Struct> per_filter_config = 8 [deprecated = true];
*/
@java.lang.Deprecated
/* nullable */
com.google.protobuf.Struct getPerFilterConfigOrDefault(
java.lang.String key,
/* nullable */
com.google.protobuf.Struct defaultValue);
/**
*
* The per_filter_config field can be used to provide weighted cluster-specific
* configurations for filters. The key should match the filter name, such as
* *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter
* specific; see the :ref:`HTTP filter documentation <config_http_filters>`
* for if and how it is utilized.
*
*
* map<string, .google.protobuf.Struct> per_filter_config = 8 [deprecated = true];
*/
@java.lang.Deprecated
com.google.protobuf.Struct getPerFilterConfigOrThrow(
java.lang.String key);
/**
*
* The per_filter_config field can be used to provide weighted cluster-specific
* configurations for filters. The key should match the filter name, such as
* *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter
* specific; see the :ref:`HTTP filter documentation <config_http_filters>`
* for if and how it is utilized.
*
*
* map<string, .google.protobuf.Any> typed_per_filter_config = 10;
*/
int getTypedPerFilterConfigCount();
/**
*
* The per_filter_config field can be used to provide weighted cluster-specific
* configurations for filters. The key should match the filter name, such as
* *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter
* specific; see the :ref:`HTTP filter documentation <config_http_filters>`
* for if and how it is utilized.
*
*
* 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();
/**
*
* The per_filter_config field can be used to provide weighted cluster-specific
* configurations for filters. The key should match the filter name, such as
* *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter
* specific; see the :ref:`HTTP filter documentation <config_http_filters>`
* for if and how it is utilized.
*
*
* map<string, .google.protobuf.Any> typed_per_filter_config = 10;
*/
java.util.Map
getTypedPerFilterConfigMap();
/**
*
* The per_filter_config field can be used to provide weighted cluster-specific
* configurations for filters. The key should match the filter name, such as
* *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter
* specific; see the :ref:`HTTP filter documentation <config_http_filters>`
* for if and how it is utilized.
*
*
* 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);
/**
*
* The per_filter_config field can be used to provide weighted cluster-specific
* configurations for filters. The key should match the filter name, such as
* *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter
* specific; see the :ref:`HTTP filter documentation <config_http_filters>`
* for if and how it is utilized.
*
*
* map<string, .google.protobuf.Any> typed_per_filter_config = 10;
*/
com.google.protobuf.Any getTypedPerFilterConfigOrThrow(
java.lang.String key);
}
/**
*
* [#next-free-field: 11]
*
*
* Protobuf type {@code envoy.api.v2.route.WeightedCluster.ClusterWeight}
*/
public static final class ClusterWeight extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.api.v2.route.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_ = "";
requestHeadersToAdd_ = java.util.Collections.emptyList();
requestHeadersToRemove_ = com.google.protobuf.LazyStringArrayList.EMPTY;
responseHeadersToAdd_ = java.util.Collections.emptyList();
responseHeadersToRemove_ = com.google.protobuf.LazyStringArrayList.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ClusterWeight();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ClusterWeight(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
name_ = s;
break;
}
case 18: {
com.google.protobuf.UInt32Value.Builder subBuilder = null;
if (weight_ != null) {
subBuilder = weight_.toBuilder();
}
weight_ = input.readMessage(com.google.protobuf.UInt32Value.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(weight_);
weight_ = subBuilder.buildPartial();
}
break;
}
case 26: {
io.envoyproxy.envoy.api.v2.core.Metadata.Builder subBuilder = null;
if (metadataMatch_ != null) {
subBuilder = metadataMatch_.toBuilder();
}
metadataMatch_ = input.readMessage(io.envoyproxy.envoy.api.v2.core.Metadata.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(metadataMatch_);
metadataMatch_ = subBuilder.buildPartial();
}
break;
}
case 34: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
requestHeadersToAdd_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
requestHeadersToAdd_.add(
input.readMessage(io.envoyproxy.envoy.api.v2.core.HeaderValueOption.parser(), extensionRegistry));
break;
}
case 42: {
if (!((mutable_bitField0_ & 0x00000004) != 0)) {
responseHeadersToAdd_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000004;
}
responseHeadersToAdd_.add(
input.readMessage(io.envoyproxy.envoy.api.v2.core.HeaderValueOption.parser(), extensionRegistry));
break;
}
case 50: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000008) != 0)) {
responseHeadersToRemove_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000008;
}
responseHeadersToRemove_.add(s);
break;
}
case 66: {
if (!((mutable_bitField0_ & 0x00000010) != 0)) {
perFilterConfig_ = com.google.protobuf.MapField.newMapField(
PerFilterConfigDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000010;
}
com.google.protobuf.MapEntry
perFilterConfig__ = input.readMessage(
PerFilterConfigDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
perFilterConfig_.getMutableMap().put(
perFilterConfig__.getKey(), perFilterConfig__.getValue());
break;
}
case 74: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
requestHeadersToRemove_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000002;
}
requestHeadersToRemove_.add(s);
break;
}
case 82: {
if (!((mutable_bitField0_ & 0x00000020) != 0)) {
typedPerFilterConfig_ = com.google.protobuf.MapField.newMapField(
TypedPerFilterConfigDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000020;
}
com.google.protobuf.MapEntry
typedPerFilterConfig__ = input.readMessage(
TypedPerFilterConfigDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
typedPerFilterConfig_.getMutableMap().put(
typedPerFilterConfig__.getKey(), typedPerFilterConfig__.getValue());
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
requestHeadersToAdd_ = java.util.Collections.unmodifiableList(requestHeadersToAdd_);
}
if (((mutable_bitField0_ & 0x00000004) != 0)) {
responseHeadersToAdd_ = java.util.Collections.unmodifiableList(responseHeadersToAdd_);
}
if (((mutable_bitField0_ & 0x00000008) != 0)) {
responseHeadersToRemove_ = responseHeadersToRemove_.getUnmodifiableView();
}
if (((mutable_bitField0_ & 0x00000002) != 0)) {
requestHeadersToRemove_ = requestHeadersToRemove_.getUnmodifiableView();
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.api.v2.route.RouteComponentsProto.internal_static_envoy_api_v2_route_WeightedCluster_ClusterWeight_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 8:
return internalGetPerFilterConfig();
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.api.v2.route.RouteComponentsProto.internal_static_envoy_api_v2_route_WeightedCluster_ClusterWeight_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.api.v2.route.WeightedCluster.ClusterWeight.class, io.envoyproxy.envoy.api.v2.route.WeightedCluster.ClusterWeight.Builder.class);
}
public static final int NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object name_;
/**
*
* Name of the upstream cluster. The cluster must exist in the
* :ref:`cluster manager configuration <config_cluster_manager>`.
*
*
* string name = 1 [(.validate.rules) = { ... }
* @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;
}
}
/**
*
* Name of the upstream cluster. The cluster must exist in the
* :ref:`cluster manager configuration <config_cluster_manager>`.
*
*
* string name = 1 [(.validate.rules) = { ... }
* @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 WEIGHT_FIELD_NUMBER = 2;
private com.google.protobuf.UInt32Value weight_;
/**
*
* An integer between 0 and :ref:`total_weight
* <envoy_api_field_route.WeightedCluster.total_weight>`. 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 add up to the total_weight, if total_weight is greater than 0.
*
*
* .google.protobuf.UInt32Value weight = 2;
* @return Whether the weight field is set.
*/
@java.lang.Override
public boolean hasWeight() {
return weight_ != null;
}
/**
*
* An integer between 0 and :ref:`total_weight
* <envoy_api_field_route.WeightedCluster.total_weight>`. 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 add up to the total_weight, if total_weight is greater than 0.
*
*
* .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_;
}
/**
*
* An integer between 0 and :ref:`total_weight
* <envoy_api_field_route.WeightedCluster.total_weight>`. 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 add up to the total_weight, if total_weight is greater than 0.
*
*
* .google.protobuf.UInt32Value weight = 2;
*/
@java.lang.Override
public com.google.protobuf.UInt32ValueOrBuilder getWeightOrBuilder() {
return getWeight();
}
public static final int METADATA_MATCH_FIELD_NUMBER = 3;
private io.envoyproxy.envoy.api.v2.core.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_api_field_route.RouteAction.metadata_match>`, with
* values here taking precedence. The filter name should be specified as *envoy.lb*.
*
*
* .envoy.api.v2.core.Metadata metadata_match = 3;
* @return Whether the metadataMatch field is set.
*/
@java.lang.Override
public boolean hasMetadataMatch() {
return metadataMatch_ != null;
}
/**
*
* 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_api_field_route.RouteAction.metadata_match>`, with
* values here taking precedence. The filter name should be specified as *envoy.lb*.
*
*
* .envoy.api.v2.core.Metadata metadata_match = 3;
* @return The metadataMatch.
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.core.Metadata getMetadataMatch() {
return metadataMatch_ == null ? io.envoyproxy.envoy.api.v2.core.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_api_field_route.RouteAction.metadata_match>`, with
* values here taking precedence. The filter name should be specified as *envoy.lb*.
*
*
* .envoy.api.v2.core.Metadata metadata_match = 3;
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.core.MetadataOrBuilder getMetadataMatchOrBuilder() {
return getMetadataMatch();
}
public static final int REQUEST_HEADERS_TO_ADD_FIELD_NUMBER = 4;
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_api_msg_route.RouteAction`.
* Headers specified at this level are applied before headers from the enclosing
* :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and
* :ref:`envoy_api_msg_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.api.v2.core.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_api_msg_route.RouteAction`.
* Headers specified at this level are applied before headers from the enclosing
* :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and
* :ref:`envoy_api_msg_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.api.v2.core.HeaderValueOption request_headers_to_add = 4 [(.validate.rules) = { ... }
*/
@java.lang.Override
public java.util.List extends io.envoyproxy.envoy.api.v2.core.HeaderValueOptionOrBuilder>
getRequestHeadersToAddOrBuilderList() {
return requestHeadersToAdd_;
}
/**
*
* Specifies a list of headers to be added to requests when this cluster is selected
* through the enclosing :ref:`envoy_api_msg_route.RouteAction`.
* Headers specified at this level are applied before headers from the enclosing
* :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and
* :ref:`envoy_api_msg_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.api.v2.core.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_api_msg_route.RouteAction`.
* Headers specified at this level are applied before headers from the enclosing
* :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and
* :ref:`envoy_api_msg_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.api.v2.core.HeaderValueOption request_headers_to_add = 4 [(.validate.rules) = { ... }
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.core.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_api_msg_route.RouteAction`.
* Headers specified at this level are applied before headers from the enclosing
* :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and
* :ref:`envoy_api_msg_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.api.v2.core.HeaderValueOption request_headers_to_add = 4 [(.validate.rules) = { ... }
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.core.HeaderValueOptionOrBuilder getRequestHeadersToAddOrBuilder(
int index) {
return requestHeadersToAdd_.get(index);
}
public static final int REQUEST_HEADERS_TO_REMOVE_FIELD_NUMBER = 9;
private com.google.protobuf.LazyStringList requestHeadersToRemove_;
/**
*
* Specifies a list of HTTP headers that should be removed from each request when
* this cluster is selected through the enclosing :ref:`envoy_api_msg_route.RouteAction`.
*
*
* repeated string request_headers_to_remove = 9;
* @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_api_msg_route.RouteAction`.
*
*
* repeated string request_headers_to_remove = 9;
* @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_api_msg_route.RouteAction`.
*
*
* repeated string request_headers_to_remove = 9;
* @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_api_msg_route.RouteAction`.
*
*
* repeated string request_headers_to_remove = 9;
* @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;
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_api_msg_route.RouteAction`.
* Headers specified at this level are applied before headers from the enclosing
* :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and
* :ref:`envoy_api_msg_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.api.v2.core.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_api_msg_route.RouteAction`.
* Headers specified at this level are applied before headers from the enclosing
* :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and
* :ref:`envoy_api_msg_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.api.v2.core.HeaderValueOption response_headers_to_add = 5 [(.validate.rules) = { ... }
*/
@java.lang.Override
public java.util.List extends io.envoyproxy.envoy.api.v2.core.HeaderValueOptionOrBuilder>
getResponseHeadersToAddOrBuilderList() {
return responseHeadersToAdd_;
}
/**
*
* Specifies a list of headers to be added to responses when this cluster is selected
* through the enclosing :ref:`envoy_api_msg_route.RouteAction`.
* Headers specified at this level are applied before headers from the enclosing
* :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and
* :ref:`envoy_api_msg_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.api.v2.core.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_api_msg_route.RouteAction`.
* Headers specified at this level are applied before headers from the enclosing
* :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and
* :ref:`envoy_api_msg_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.api.v2.core.HeaderValueOption response_headers_to_add = 5 [(.validate.rules) = { ... }
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.core.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_api_msg_route.RouteAction`.
* Headers specified at this level are applied before headers from the enclosing
* :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and
* :ref:`envoy_api_msg_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.api.v2.core.HeaderValueOption response_headers_to_add = 5 [(.validate.rules) = { ... }
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.core.HeaderValueOptionOrBuilder getResponseHeadersToAddOrBuilder(
int index) {
return responseHeadersToAdd_.get(index);
}
public static final int RESPONSE_HEADERS_TO_REMOVE_FIELD_NUMBER = 6;
private com.google.protobuf.LazyStringList responseHeadersToRemove_;
/**
*
* Specifies a list of headers to be removed from responses when this cluster is selected
* through the enclosing :ref:`envoy_api_msg_route.RouteAction`.
*
*
* repeated string response_headers_to_remove = 6;
* @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_api_msg_route.RouteAction`.
*
*
* repeated string response_headers_to_remove = 6;
* @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_api_msg_route.RouteAction`.
*
*
* repeated string response_headers_to_remove = 6;
* @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_api_msg_route.RouteAction`.
*
*
* repeated string response_headers_to_remove = 6;
* @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 PER_FILTER_CONFIG_FIELD_NUMBER = 8;
private static final class PerFilterConfigDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, com.google.protobuf.Struct> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
io.envoyproxy.envoy.api.v2.route.RouteComponentsProto.internal_static_envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.MESSAGE,
com.google.protobuf.Struct.getDefaultInstance());
}
private com.google.protobuf.MapField<
java.lang.String, com.google.protobuf.Struct> perFilterConfig_;
private com.google.protobuf.MapField
internalGetPerFilterConfig() {
if (perFilterConfig_ == null) {
return com.google.protobuf.MapField.emptyMapField(
PerFilterConfigDefaultEntryHolder.defaultEntry);
}
return perFilterConfig_;
}
@java.lang.Deprecated
public int getPerFilterConfigCount() {
return internalGetPerFilterConfig().getMap().size();
}
/**
*
* The per_filter_config field can be used to provide weighted cluster-specific
* configurations for filters. The key should match the filter name, such as
* *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter
* specific; see the :ref:`HTTP filter documentation <config_http_filters>`
* for if and how it is utilized.
*
*
* map<string, .google.protobuf.Struct> per_filter_config = 8 [deprecated = true];
*/
@java.lang.Deprecated
@java.lang.Override
public boolean containsPerFilterConfig(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetPerFilterConfig().getMap().containsKey(key);
}
/**
* Use {@link #getPerFilterConfigMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getPerFilterConfig() {
return getPerFilterConfigMap();
}
/**
*
* The per_filter_config field can be used to provide weighted cluster-specific
* configurations for filters. The key should match the filter name, such as
* *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter
* specific; see the :ref:`HTTP filter documentation <config_http_filters>`
* for if and how it is utilized.
*
*
* map<string, .google.protobuf.Struct> per_filter_config = 8 [deprecated = true];
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getPerFilterConfigMap() {
return internalGetPerFilterConfig().getMap();
}
/**
*
* The per_filter_config field can be used to provide weighted cluster-specific
* configurations for filters. The key should match the filter name, such as
* *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter
* specific; see the :ref:`HTTP filter documentation <config_http_filters>`
* for if and how it is utilized.
*
*
* map<string, .google.protobuf.Struct> per_filter_config = 8 [deprecated = true];
*/
@java.lang.Override
@java.lang.Deprecated
public com.google.protobuf.Struct getPerFilterConfigOrDefault(
java.lang.String key,
com.google.protobuf.Struct defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetPerFilterConfig().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* The per_filter_config field can be used to provide weighted cluster-specific
* configurations for filters. The key should match the filter name, such as
* *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter
* specific; see the :ref:`HTTP filter documentation <config_http_filters>`
* for if and how it is utilized.
*
*
* map<string, .google.protobuf.Struct> per_filter_config = 8 [deprecated = true];
*/
@java.lang.Override
@java.lang.Deprecated
public com.google.protobuf.Struct getPerFilterConfigOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetPerFilterConfig().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
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.api.v2.route.RouteComponentsProto.internal_static_envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.MESSAGE,
com.google.protobuf.Any.getDefaultInstance());
}
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();
}
/**
*
* The per_filter_config field can be used to provide weighted cluster-specific
* configurations for filters. The key should match the filter name, such as
* *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter
* specific; see the :ref:`HTTP filter documentation <config_http_filters>`
* for if and how it is utilized.
*
*
* 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();
}
/**
*
* The per_filter_config field can be used to provide weighted cluster-specific
* configurations for filters. The key should match the filter name, such as
* *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter
* specific; see the :ref:`HTTP filter documentation <config_http_filters>`
* for if and how it is utilized.
*
*
* map<string, .google.protobuf.Any> typed_per_filter_config = 10;
*/
@java.lang.Override
public java.util.Map getTypedPerFilterConfigMap() {
return internalGetTypedPerFilterConfig().getMap();
}
/**
*
* The per_filter_config field can be used to provide weighted cluster-specific
* configurations for filters. The key should match the filter name, such as
* *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter
* specific; see the :ref:`HTTP filter documentation <config_http_filters>`
* for if and how it is utilized.
*
*
* map<string, .google.protobuf.Any> typed_per_filter_config = 10;
*/
@java.lang.Override
public com.google.protobuf.Any getTypedPerFilterConfigOrDefault(
java.lang.String key,
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;
}
/**
*
* The per_filter_config field can be used to provide weighted cluster-specific
* configurations for filters. The key should match the filter name, such as
* *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter
* specific; see the :ref:`HTTP filter documentation <config_http_filters>`
* for if and how it is utilized.
*
*
* 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);
}
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 (weight_ != null) {
output.writeMessage(2, getWeight());
}
if (metadataMatch_ != null) {
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));
}
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetPerFilterConfig(),
PerFilterConfigDefaultEntryHolder.defaultEntry,
8);
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);
unknownFields.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 (weight_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getWeight());
}
if (metadataMatch_ != null) {
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();
}
for (java.util.Map.Entry entry
: internalGetPerFilterConfig().getMap().entrySet()) {
com.google.protobuf.MapEntry
perFilterConfig__ = PerFilterConfigDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(8, perFilterConfig__);
}
{
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__);
}
size += unknownFields.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.api.v2.route.WeightedCluster.ClusterWeight)) {
return super.equals(obj);
}
io.envoyproxy.envoy.api.v2.route.WeightedCluster.ClusterWeight other = (io.envoyproxy.envoy.api.v2.route.WeightedCluster.ClusterWeight) obj;
if (!getName()
.equals(other.getName())) 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 (!internalGetPerFilterConfig().equals(
other.internalGetPerFilterConfig())) return false;
if (!internalGetTypedPerFilterConfig().equals(
other.internalGetTypedPerFilterConfig())) return false;
if (!unknownFields.equals(other.unknownFields)) 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();
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 (!internalGetPerFilterConfig().getMap().isEmpty()) {
hash = (37 * hash) + PER_FILTER_CONFIG_FIELD_NUMBER;
hash = (53 * hash) + internalGetPerFilterConfig().hashCode();
}
if (!internalGetTypedPerFilterConfig().getMap().isEmpty()) {
hash = (37 * hash) + TYPED_PER_FILTER_CONFIG_FIELD_NUMBER;
hash = (53 * hash) + internalGetTypedPerFilterConfig().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.api.v2.route.WeightedCluster.ClusterWeight parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.api.v2.route.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.api.v2.route.WeightedCluster.ClusterWeight parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.api.v2.route.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.api.v2.route.WeightedCluster.ClusterWeight parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.api.v2.route.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.api.v2.route.WeightedCluster.ClusterWeight parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.api.v2.route.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.api.v2.route.WeightedCluster.ClusterWeight parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.api.v2.route.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.api.v2.route.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.api.v2.route.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.api.v2.route.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: 11]
*
*
* Protobuf type {@code envoy.api.v2.route.WeightedCluster.ClusterWeight}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.api.v2.route.WeightedCluster.ClusterWeight)
io.envoyproxy.envoy.api.v2.route.WeightedCluster.ClusterWeightOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.api.v2.route.RouteComponentsProto.internal_static_envoy_api_v2_route_WeightedCluster_ClusterWeight_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 8:
return internalGetPerFilterConfig();
case 10:
return internalGetTypedPerFilterConfig();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
int number) {
switch (number) {
case 8:
return internalGetMutablePerFilterConfig();
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.api.v2.route.RouteComponentsProto.internal_static_envoy_api_v2_route_WeightedCluster_ClusterWeight_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.api.v2.route.WeightedCluster.ClusterWeight.class, io.envoyproxy.envoy.api.v2.route.WeightedCluster.ClusterWeight.Builder.class);
}
// Construct using io.envoyproxy.envoy.api.v2.route.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) {
getRequestHeadersToAddFieldBuilder();
getResponseHeadersToAddFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
name_ = "";
if (weightBuilder_ == null) {
weight_ = null;
} else {
weight_ = null;
weightBuilder_ = null;
}
if (metadataMatchBuilder_ == null) {
metadataMatch_ = null;
} else {
metadataMatch_ = null;
metadataMatchBuilder_ = null;
}
if (requestHeadersToAddBuilder_ == null) {
requestHeadersToAdd_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
requestHeadersToAddBuilder_.clear();
}
requestHeadersToRemove_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000002);
if (responseHeadersToAddBuilder_ == null) {
responseHeadersToAdd_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
} else {
responseHeadersToAddBuilder_.clear();
}
responseHeadersToRemove_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000008);
internalGetMutablePerFilterConfig().clear();
internalGetMutableTypedPerFilterConfig().clear();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.api.v2.route.RouteComponentsProto.internal_static_envoy_api_v2_route_WeightedCluster_ClusterWeight_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.WeightedCluster.ClusterWeight getDefaultInstanceForType() {
return io.envoyproxy.envoy.api.v2.route.WeightedCluster.ClusterWeight.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.WeightedCluster.ClusterWeight build() {
io.envoyproxy.envoy.api.v2.route.WeightedCluster.ClusterWeight result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.WeightedCluster.ClusterWeight buildPartial() {
io.envoyproxy.envoy.api.v2.route.WeightedCluster.ClusterWeight result = new io.envoyproxy.envoy.api.v2.route.WeightedCluster.ClusterWeight(this);
int from_bitField0_ = bitField0_;
result.name_ = name_;
if (weightBuilder_ == null) {
result.weight_ = weight_;
} else {
result.weight_ = weightBuilder_.build();
}
if (metadataMatchBuilder_ == null) {
result.metadataMatch_ = metadataMatch_;
} else {
result.metadataMatch_ = metadataMatchBuilder_.build();
}
if (requestHeadersToAddBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
requestHeadersToAdd_ = java.util.Collections.unmodifiableList(requestHeadersToAdd_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.requestHeadersToAdd_ = requestHeadersToAdd_;
} else {
result.requestHeadersToAdd_ = requestHeadersToAddBuilder_.build();
}
if (((bitField0_ & 0x00000002) != 0)) {
requestHeadersToRemove_ = requestHeadersToRemove_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000002);
}
result.requestHeadersToRemove_ = requestHeadersToRemove_;
if (responseHeadersToAddBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0)) {
responseHeadersToAdd_ = java.util.Collections.unmodifiableList(responseHeadersToAdd_);
bitField0_ = (bitField0_ & ~0x00000004);
}
result.responseHeadersToAdd_ = responseHeadersToAdd_;
} else {
result.responseHeadersToAdd_ = responseHeadersToAddBuilder_.build();
}
if (((bitField0_ & 0x00000008) != 0)) {
responseHeadersToRemove_ = responseHeadersToRemove_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000008);
}
result.responseHeadersToRemove_ = responseHeadersToRemove_;
result.perFilterConfig_ = internalGetPerFilterConfig();
result.perFilterConfig_.makeImmutable();
result.typedPerFilterConfig_ = internalGetTypedPerFilterConfig();
result.typedPerFilterConfig_.makeImmutable();
onBuilt();
return result;
}
@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.api.v2.route.WeightedCluster.ClusterWeight) {
return mergeFrom((io.envoyproxy.envoy.api.v2.route.WeightedCluster.ClusterWeight)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.api.v2.route.WeightedCluster.ClusterWeight other) {
if (other == io.envoyproxy.envoy.api.v2.route.WeightedCluster.ClusterWeight.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
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_ & ~0x00000001);
} else {
ensureRequestHeadersToAddIsMutable();
requestHeadersToAdd_.addAll(other.requestHeadersToAdd_);
}
onChanged();
}
} else {
if (!other.requestHeadersToAdd_.isEmpty()) {
if (requestHeadersToAddBuilder_.isEmpty()) {
requestHeadersToAddBuilder_.dispose();
requestHeadersToAddBuilder_ = null;
requestHeadersToAdd_ = other.requestHeadersToAdd_;
bitField0_ = (bitField0_ & ~0x00000001);
requestHeadersToAddBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getRequestHeadersToAddFieldBuilder() : null;
} else {
requestHeadersToAddBuilder_.addAllMessages(other.requestHeadersToAdd_);
}
}
}
if (!other.requestHeadersToRemove_.isEmpty()) {
if (requestHeadersToRemove_.isEmpty()) {
requestHeadersToRemove_ = other.requestHeadersToRemove_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureRequestHeadersToRemoveIsMutable();
requestHeadersToRemove_.addAll(other.requestHeadersToRemove_);
}
onChanged();
}
if (responseHeadersToAddBuilder_ == null) {
if (!other.responseHeadersToAdd_.isEmpty()) {
if (responseHeadersToAdd_.isEmpty()) {
responseHeadersToAdd_ = other.responseHeadersToAdd_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureResponseHeadersToAddIsMutable();
responseHeadersToAdd_.addAll(other.responseHeadersToAdd_);
}
onChanged();
}
} else {
if (!other.responseHeadersToAdd_.isEmpty()) {
if (responseHeadersToAddBuilder_.isEmpty()) {
responseHeadersToAddBuilder_.dispose();
responseHeadersToAddBuilder_ = null;
responseHeadersToAdd_ = other.responseHeadersToAdd_;
bitField0_ = (bitField0_ & ~0x00000004);
responseHeadersToAddBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getResponseHeadersToAddFieldBuilder() : null;
} else {
responseHeadersToAddBuilder_.addAllMessages(other.responseHeadersToAdd_);
}
}
}
if (!other.responseHeadersToRemove_.isEmpty()) {
if (responseHeadersToRemove_.isEmpty()) {
responseHeadersToRemove_ = other.responseHeadersToRemove_;
bitField0_ = (bitField0_ & ~0x00000008);
} else {
ensureResponseHeadersToRemoveIsMutable();
responseHeadersToRemove_.addAll(other.responseHeadersToRemove_);
}
onChanged();
}
internalGetMutablePerFilterConfig().mergeFrom(
other.internalGetPerFilterConfig());
internalGetMutableTypedPerFilterConfig().mergeFrom(
other.internalGetTypedPerFilterConfig());
this.mergeUnknownFields(other.unknownFields);
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 {
io.envoyproxy.envoy.api.v2.route.WeightedCluster.ClusterWeight parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.api.v2.route.WeightedCluster.ClusterWeight) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object name_ = "";
/**
*
* Name of the upstream cluster. The cluster must exist in the
* :ref:`cluster manager configuration <config_cluster_manager>`.
*
*
* string name = 1 [(.validate.rules) = { ... }
* @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;
}
}
/**
*
* Name of the upstream cluster. The cluster must exist in the
* :ref:`cluster manager configuration <config_cluster_manager>`.
*
*
* string name = 1 [(.validate.rules) = { ... }
* @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;
}
}
/**
*
* Name of the upstream cluster. The cluster must exist in the
* :ref:`cluster manager configuration <config_cluster_manager>`.
*
*
* string name = 1 [(.validate.rules) = { ... }
* @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;
onChanged();
return this;
}
/**
*
* Name of the upstream cluster. The cluster must exist in the
* :ref:`cluster manager configuration <config_cluster_manager>`.
*
*
* string name = 1 [(.validate.rules) = { ... }
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
*
* Name of the upstream cluster. The cluster must exist in the
* :ref:`cluster manager configuration <config_cluster_manager>`.
*
*
* string name = 1 [(.validate.rules) = { ... }
* @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;
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_;
/**
*
* An integer between 0 and :ref:`total_weight
* <envoy_api_field_route.WeightedCluster.total_weight>`. 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 add up to the total_weight, if total_weight is greater than 0.
*
*
* .google.protobuf.UInt32Value weight = 2;
* @return Whether the weight field is set.
*/
public boolean hasWeight() {
return weightBuilder_ != null || weight_ != null;
}
/**
*
* An integer between 0 and :ref:`total_weight
* <envoy_api_field_route.WeightedCluster.total_weight>`. 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 add up to the total_weight, if total_weight is greater than 0.
*
*
* .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();
}
}
/**
*
* An integer between 0 and :ref:`total_weight
* <envoy_api_field_route.WeightedCluster.total_weight>`. 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 add up to the total_weight, if total_weight is greater than 0.
*
*
* .google.protobuf.UInt32Value weight = 2;
*/
public Builder setWeight(com.google.protobuf.UInt32Value value) {
if (weightBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
weight_ = value;
onChanged();
} else {
weightBuilder_.setMessage(value);
}
return this;
}
/**
*
* An integer between 0 and :ref:`total_weight
* <envoy_api_field_route.WeightedCluster.total_weight>`. 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 add up to the total_weight, if total_weight is greater than 0.
*
*
* .google.protobuf.UInt32Value weight = 2;
*/
public Builder setWeight(
com.google.protobuf.UInt32Value.Builder builderForValue) {
if (weightBuilder_ == null) {
weight_ = builderForValue.build();
onChanged();
} else {
weightBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* An integer between 0 and :ref:`total_weight
* <envoy_api_field_route.WeightedCluster.total_weight>`. 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 add up to the total_weight, if total_weight is greater than 0.
*
*
* .google.protobuf.UInt32Value weight = 2;
*/
public Builder mergeWeight(com.google.protobuf.UInt32Value value) {
if (weightBuilder_ == null) {
if (weight_ != null) {
weight_ =
com.google.protobuf.UInt32Value.newBuilder(weight_).mergeFrom(value).buildPartial();
} else {
weight_ = value;
}
onChanged();
} else {
weightBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* An integer between 0 and :ref:`total_weight
* <envoy_api_field_route.WeightedCluster.total_weight>`. 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 add up to the total_weight, if total_weight is greater than 0.
*
*
* .google.protobuf.UInt32Value weight = 2;
*/
public Builder clearWeight() {
if (weightBuilder_ == null) {
weight_ = null;
onChanged();
} else {
weight_ = null;
weightBuilder_ = null;
}
return this;
}
/**
*
* An integer between 0 and :ref:`total_weight
* <envoy_api_field_route.WeightedCluster.total_weight>`. 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 add up to the total_weight, if total_weight is greater than 0.
*
*
* .google.protobuf.UInt32Value weight = 2;
*/
public com.google.protobuf.UInt32Value.Builder getWeightBuilder() {
onChanged();
return getWeightFieldBuilder().getBuilder();
}
/**
*
* An integer between 0 and :ref:`total_weight
* <envoy_api_field_route.WeightedCluster.total_weight>`. 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 add up to the total_weight, if total_weight is greater than 0.
*
*
* .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_;
}
}
/**
*
* An integer between 0 and :ref:`total_weight
* <envoy_api_field_route.WeightedCluster.total_weight>`. 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 add up to the total_weight, if total_weight is greater than 0.
*
*
* .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.api.v2.core.Metadata metadataMatch_;
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.api.v2.core.Metadata, io.envoyproxy.envoy.api.v2.core.Metadata.Builder, io.envoyproxy.envoy.api.v2.core.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_api_field_route.RouteAction.metadata_match>`, with
* values here taking precedence. The filter name should be specified as *envoy.lb*.
*
*
* .envoy.api.v2.core.Metadata metadata_match = 3;
* @return Whether the metadataMatch field is set.
*/
public boolean hasMetadataMatch() {
return metadataMatchBuilder_ != null || metadataMatch_ != null;
}
/**
*
* 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_api_field_route.RouteAction.metadata_match>`, with
* values here taking precedence. The filter name should be specified as *envoy.lb*.
*
*
* .envoy.api.v2.core.Metadata metadata_match = 3;
* @return The metadataMatch.
*/
public io.envoyproxy.envoy.api.v2.core.Metadata getMetadataMatch() {
if (metadataMatchBuilder_ == null) {
return metadataMatch_ == null ? io.envoyproxy.envoy.api.v2.core.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_api_field_route.RouteAction.metadata_match>`, with
* values here taking precedence. The filter name should be specified as *envoy.lb*.
*
*
* .envoy.api.v2.core.Metadata metadata_match = 3;
*/
public Builder setMetadataMatch(io.envoyproxy.envoy.api.v2.core.Metadata value) {
if (metadataMatchBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
metadataMatch_ = value;
onChanged();
} else {
metadataMatchBuilder_.setMessage(value);
}
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_api_field_route.RouteAction.metadata_match>`, with
* values here taking precedence. The filter name should be specified as *envoy.lb*.
*
*
* .envoy.api.v2.core.Metadata metadata_match = 3;
*/
public Builder setMetadataMatch(
io.envoyproxy.envoy.api.v2.core.Metadata.Builder builderForValue) {
if (metadataMatchBuilder_ == null) {
metadataMatch_ = builderForValue.build();
onChanged();
} else {
metadataMatchBuilder_.setMessage(builderForValue.build());
}
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_api_field_route.RouteAction.metadata_match>`, with
* values here taking precedence. The filter name should be specified as *envoy.lb*.
*
*
* .envoy.api.v2.core.Metadata metadata_match = 3;
*/
public Builder mergeMetadataMatch(io.envoyproxy.envoy.api.v2.core.Metadata value) {
if (metadataMatchBuilder_ == null) {
if (metadataMatch_ != null) {
metadataMatch_ =
io.envoyproxy.envoy.api.v2.core.Metadata.newBuilder(metadataMatch_).mergeFrom(value).buildPartial();
} else {
metadataMatch_ = value;
}
onChanged();
} else {
metadataMatchBuilder_.mergeFrom(value);
}
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_api_field_route.RouteAction.metadata_match>`, with
* values here taking precedence. The filter name should be specified as *envoy.lb*.
*
*
* .envoy.api.v2.core.Metadata metadata_match = 3;
*/
public Builder clearMetadataMatch() {
if (metadataMatchBuilder_ == null) {
metadataMatch_ = null;
onChanged();
} else {
metadataMatch_ = null;
metadataMatchBuilder_ = null;
}
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_api_field_route.RouteAction.metadata_match>`, with
* values here taking precedence. The filter name should be specified as *envoy.lb*.
*
*
* .envoy.api.v2.core.Metadata metadata_match = 3;
*/
public io.envoyproxy.envoy.api.v2.core.Metadata.Builder getMetadataMatchBuilder() {
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_api_field_route.RouteAction.metadata_match>`, with
* values here taking precedence. The filter name should be specified as *envoy.lb*.
*
*
* .envoy.api.v2.core.Metadata metadata_match = 3;
*/
public io.envoyproxy.envoy.api.v2.core.MetadataOrBuilder getMetadataMatchOrBuilder() {
if (metadataMatchBuilder_ != null) {
return metadataMatchBuilder_.getMessageOrBuilder();
} else {
return metadataMatch_ == null ?
io.envoyproxy.envoy.api.v2.core.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_api_field_route.RouteAction.metadata_match>`, with
* values here taking precedence. The filter name should be specified as *envoy.lb*.
*
*
* .envoy.api.v2.core.Metadata metadata_match = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.api.v2.core.Metadata, io.envoyproxy.envoy.api.v2.core.Metadata.Builder, io.envoyproxy.envoy.api.v2.core.MetadataOrBuilder>
getMetadataMatchFieldBuilder() {
if (metadataMatchBuilder_ == null) {
metadataMatchBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.api.v2.core.Metadata, io.envoyproxy.envoy.api.v2.core.Metadata.Builder, io.envoyproxy.envoy.api.v2.core.MetadataOrBuilder>(
getMetadataMatch(),
getParentForChildren(),
isClean());
metadataMatch_ = null;
}
return metadataMatchBuilder_;
}
private java.util.List requestHeadersToAdd_ =
java.util.Collections.emptyList();
private void ensureRequestHeadersToAddIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
requestHeadersToAdd_ = new java.util.ArrayList(requestHeadersToAdd_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.api.v2.core.HeaderValueOption, io.envoyproxy.envoy.api.v2.core.HeaderValueOption.Builder, io.envoyproxy.envoy.api.v2.core.HeaderValueOptionOrBuilder> requestHeadersToAddBuilder_;
/**
*
* Specifies a list of headers to be added to requests when this cluster is selected
* through the enclosing :ref:`envoy_api_msg_route.RouteAction`.
* Headers specified at this level are applied before headers from the enclosing
* :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and
* :ref:`envoy_api_msg_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.api.v2.core.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_api_msg_route.RouteAction`.
* Headers specified at this level are applied before headers from the enclosing
* :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and
* :ref:`envoy_api_msg_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.api.v2.core.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_api_msg_route.RouteAction`.
* Headers specified at this level are applied before headers from the enclosing
* :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and
* :ref:`envoy_api_msg_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.api.v2.core.HeaderValueOption request_headers_to_add = 4 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.api.v2.core.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_api_msg_route.RouteAction`.
* Headers specified at this level are applied before headers from the enclosing
* :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and
* :ref:`envoy_api_msg_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.api.v2.core.HeaderValueOption request_headers_to_add = 4 [(.validate.rules) = { ... }
*/
public Builder setRequestHeadersToAdd(
int index, io.envoyproxy.envoy.api.v2.core.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_api_msg_route.RouteAction`.
* Headers specified at this level are applied before headers from the enclosing
* :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and
* :ref:`envoy_api_msg_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.api.v2.core.HeaderValueOption request_headers_to_add = 4 [(.validate.rules) = { ... }
*/
public Builder setRequestHeadersToAdd(
int index, io.envoyproxy.envoy.api.v2.core.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_api_msg_route.RouteAction`.
* Headers specified at this level are applied before headers from the enclosing
* :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and
* :ref:`envoy_api_msg_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.api.v2.core.HeaderValueOption request_headers_to_add = 4 [(.validate.rules) = { ... }
*/
public Builder addRequestHeadersToAdd(io.envoyproxy.envoy.api.v2.core.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_api_msg_route.RouteAction`.
* Headers specified at this level are applied before headers from the enclosing
* :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and
* :ref:`envoy_api_msg_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.api.v2.core.HeaderValueOption request_headers_to_add = 4 [(.validate.rules) = { ... }
*/
public Builder addRequestHeadersToAdd(
int index, io.envoyproxy.envoy.api.v2.core.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_api_msg_route.RouteAction`.
* Headers specified at this level are applied before headers from the enclosing
* :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and
* :ref:`envoy_api_msg_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.api.v2.core.HeaderValueOption request_headers_to_add = 4 [(.validate.rules) = { ... }
*/
public Builder addRequestHeadersToAdd(
io.envoyproxy.envoy.api.v2.core.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_api_msg_route.RouteAction`.
* Headers specified at this level are applied before headers from the enclosing
* :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and
* :ref:`envoy_api_msg_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.api.v2.core.HeaderValueOption request_headers_to_add = 4 [(.validate.rules) = { ... }
*/
public Builder addRequestHeadersToAdd(
int index, io.envoyproxy.envoy.api.v2.core.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_api_msg_route.RouteAction`.
* Headers specified at this level are applied before headers from the enclosing
* :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and
* :ref:`envoy_api_msg_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.api.v2.core.HeaderValueOption request_headers_to_add = 4 [(.validate.rules) = { ... }
*/
public Builder addAllRequestHeadersToAdd(
java.lang.Iterable extends io.envoyproxy.envoy.api.v2.core.HeaderValueOption> 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_api_msg_route.RouteAction`.
* Headers specified at this level are applied before headers from the enclosing
* :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and
* :ref:`envoy_api_msg_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.api.v2.core.HeaderValueOption request_headers_to_add = 4 [(.validate.rules) = { ... }
*/
public Builder clearRequestHeadersToAdd() {
if (requestHeadersToAddBuilder_ == null) {
requestHeadersToAdd_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
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_api_msg_route.RouteAction`.
* Headers specified at this level are applied before headers from the enclosing
* :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and
* :ref:`envoy_api_msg_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.api.v2.core.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_api_msg_route.RouteAction`.
* Headers specified at this level are applied before headers from the enclosing
* :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and
* :ref:`envoy_api_msg_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.api.v2.core.HeaderValueOption request_headers_to_add = 4 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.api.v2.core.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_api_msg_route.RouteAction`.
* Headers specified at this level are applied before headers from the enclosing
* :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and
* :ref:`envoy_api_msg_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.api.v2.core.HeaderValueOption request_headers_to_add = 4 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.api.v2.core.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_api_msg_route.RouteAction`.
* Headers specified at this level are applied before headers from the enclosing
* :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and
* :ref:`envoy_api_msg_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.api.v2.core.HeaderValueOption request_headers_to_add = 4 [(.validate.rules) = { ... }
*/
public java.util.List extends io.envoyproxy.envoy.api.v2.core.HeaderValueOptionOrBuilder>
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_api_msg_route.RouteAction`.
* Headers specified at this level are applied before headers from the enclosing
* :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and
* :ref:`envoy_api_msg_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.api.v2.core.HeaderValueOption request_headers_to_add = 4 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.api.v2.core.HeaderValueOption.Builder addRequestHeadersToAddBuilder() {
return getRequestHeadersToAddFieldBuilder().addBuilder(
io.envoyproxy.envoy.api.v2.core.HeaderValueOption.getDefaultInstance());
}
/**
*
* Specifies a list of headers to be added to requests when this cluster is selected
* through the enclosing :ref:`envoy_api_msg_route.RouteAction`.
* Headers specified at this level are applied before headers from the enclosing
* :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and
* :ref:`envoy_api_msg_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.api.v2.core.HeaderValueOption request_headers_to_add = 4 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.api.v2.core.HeaderValueOption.Builder addRequestHeadersToAddBuilder(
int index) {
return getRequestHeadersToAddFieldBuilder().addBuilder(
index, io.envoyproxy.envoy.api.v2.core.HeaderValueOption.getDefaultInstance());
}
/**
*
* Specifies a list of headers to be added to requests when this cluster is selected
* through the enclosing :ref:`envoy_api_msg_route.RouteAction`.
* Headers specified at this level are applied before headers from the enclosing
* :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and
* :ref:`envoy_api_msg_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.api.v2.core.HeaderValueOption request_headers_to_add = 4 [(.validate.rules) = { ... }
*/
public java.util.List
getRequestHeadersToAddBuilderList() {
return getRequestHeadersToAddFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.api.v2.core.HeaderValueOption, io.envoyproxy.envoy.api.v2.core.HeaderValueOption.Builder, io.envoyproxy.envoy.api.v2.core.HeaderValueOptionOrBuilder>
getRequestHeadersToAddFieldBuilder() {
if (requestHeadersToAddBuilder_ == null) {
requestHeadersToAddBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.api.v2.core.HeaderValueOption, io.envoyproxy.envoy.api.v2.core.HeaderValueOption.Builder, io.envoyproxy.envoy.api.v2.core.HeaderValueOptionOrBuilder>(
requestHeadersToAdd_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
requestHeadersToAdd_ = null;
}
return requestHeadersToAddBuilder_;
}
private com.google.protobuf.LazyStringList requestHeadersToRemove_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureRequestHeadersToRemoveIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
requestHeadersToRemove_ = new com.google.protobuf.LazyStringArrayList(requestHeadersToRemove_);
bitField0_ |= 0x00000002;
}
}
/**
*
* Specifies a list of HTTP headers that should be removed from each request when
* this cluster is selected through the enclosing :ref:`envoy_api_msg_route.RouteAction`.
*
*
* repeated string request_headers_to_remove = 9;
* @return A list containing the requestHeadersToRemove.
*/
public com.google.protobuf.ProtocolStringList
getRequestHeadersToRemoveList() {
return requestHeadersToRemove_.getUnmodifiableView();
}
/**
*
* Specifies a list of HTTP headers that should be removed from each request when
* this cluster is selected through the enclosing :ref:`envoy_api_msg_route.RouteAction`.
*
*
* repeated string request_headers_to_remove = 9;
* @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_api_msg_route.RouteAction`.
*
*
* repeated string request_headers_to_remove = 9;
* @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_api_msg_route.RouteAction`.
*
*
* repeated string request_headers_to_remove = 9;
* @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_api_msg_route.RouteAction`.
*
*
* repeated string request_headers_to_remove = 9;
* @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);
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_api_msg_route.RouteAction`.
*
*
* repeated string request_headers_to_remove = 9;
* @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);
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_api_msg_route.RouteAction`.
*
*
* repeated string request_headers_to_remove = 9;
* @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_);
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_api_msg_route.RouteAction`.
*
*
* repeated string request_headers_to_remove = 9;
* @return This builder for chaining.
*/
public Builder clearRequestHeadersToRemove() {
requestHeadersToRemove_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000002);
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_api_msg_route.RouteAction`.
*
*
* repeated string request_headers_to_remove = 9;
* @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);
onChanged();
return this;
}
private java.util.List responseHeadersToAdd_ =
java.util.Collections.emptyList();
private void ensureResponseHeadersToAddIsMutable() {
if (!((bitField0_ & 0x00000004) != 0)) {
responseHeadersToAdd_ = new java.util.ArrayList(responseHeadersToAdd_);
bitField0_ |= 0x00000004;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.api.v2.core.HeaderValueOption, io.envoyproxy.envoy.api.v2.core.HeaderValueOption.Builder, io.envoyproxy.envoy.api.v2.core.HeaderValueOptionOrBuilder> responseHeadersToAddBuilder_;
/**
*
* Specifies a list of headers to be added to responses when this cluster is selected
* through the enclosing :ref:`envoy_api_msg_route.RouteAction`.
* Headers specified at this level are applied before headers from the enclosing
* :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and
* :ref:`envoy_api_msg_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.api.v2.core.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_api_msg_route.RouteAction`.
* Headers specified at this level are applied before headers from the enclosing
* :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and
* :ref:`envoy_api_msg_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.api.v2.core.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_api_msg_route.RouteAction`.
* Headers specified at this level are applied before headers from the enclosing
* :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and
* :ref:`envoy_api_msg_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.api.v2.core.HeaderValueOption response_headers_to_add = 5 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.api.v2.core.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_api_msg_route.RouteAction`.
* Headers specified at this level are applied before headers from the enclosing
* :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and
* :ref:`envoy_api_msg_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.api.v2.core.HeaderValueOption response_headers_to_add = 5 [(.validate.rules) = { ... }
*/
public Builder setResponseHeadersToAdd(
int index, io.envoyproxy.envoy.api.v2.core.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_api_msg_route.RouteAction`.
* Headers specified at this level are applied before headers from the enclosing
* :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and
* :ref:`envoy_api_msg_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.api.v2.core.HeaderValueOption response_headers_to_add = 5 [(.validate.rules) = { ... }
*/
public Builder setResponseHeadersToAdd(
int index, io.envoyproxy.envoy.api.v2.core.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_api_msg_route.RouteAction`.
* Headers specified at this level are applied before headers from the enclosing
* :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and
* :ref:`envoy_api_msg_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.api.v2.core.HeaderValueOption response_headers_to_add = 5 [(.validate.rules) = { ... }
*/
public Builder addResponseHeadersToAdd(io.envoyproxy.envoy.api.v2.core.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_api_msg_route.RouteAction`.
* Headers specified at this level are applied before headers from the enclosing
* :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and
* :ref:`envoy_api_msg_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.api.v2.core.HeaderValueOption response_headers_to_add = 5 [(.validate.rules) = { ... }
*/
public Builder addResponseHeadersToAdd(
int index, io.envoyproxy.envoy.api.v2.core.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_api_msg_route.RouteAction`.
* Headers specified at this level are applied before headers from the enclosing
* :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and
* :ref:`envoy_api_msg_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.api.v2.core.HeaderValueOption response_headers_to_add = 5 [(.validate.rules) = { ... }
*/
public Builder addResponseHeadersToAdd(
io.envoyproxy.envoy.api.v2.core.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_api_msg_route.RouteAction`.
* Headers specified at this level are applied before headers from the enclosing
* :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and
* :ref:`envoy_api_msg_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.api.v2.core.HeaderValueOption response_headers_to_add = 5 [(.validate.rules) = { ... }
*/
public Builder addResponseHeadersToAdd(
int index, io.envoyproxy.envoy.api.v2.core.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_api_msg_route.RouteAction`.
* Headers specified at this level are applied before headers from the enclosing
* :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and
* :ref:`envoy_api_msg_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.api.v2.core.HeaderValueOption response_headers_to_add = 5 [(.validate.rules) = { ... }
*/
public Builder addAllResponseHeadersToAdd(
java.lang.Iterable extends io.envoyproxy.envoy.api.v2.core.HeaderValueOption> 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_api_msg_route.RouteAction`.
* Headers specified at this level are applied before headers from the enclosing
* :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and
* :ref:`envoy_api_msg_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.api.v2.core.HeaderValueOption response_headers_to_add = 5 [(.validate.rules) = { ... }
*/
public Builder clearResponseHeadersToAdd() {
if (responseHeadersToAddBuilder_ == null) {
responseHeadersToAdd_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
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_api_msg_route.RouteAction`.
* Headers specified at this level are applied before headers from the enclosing
* :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and
* :ref:`envoy_api_msg_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.api.v2.core.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_api_msg_route.RouteAction`.
* Headers specified at this level are applied before headers from the enclosing
* :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and
* :ref:`envoy_api_msg_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.api.v2.core.HeaderValueOption response_headers_to_add = 5 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.api.v2.core.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_api_msg_route.RouteAction`.
* Headers specified at this level are applied before headers from the enclosing
* :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and
* :ref:`envoy_api_msg_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.api.v2.core.HeaderValueOption response_headers_to_add = 5 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.api.v2.core.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_api_msg_route.RouteAction`.
* Headers specified at this level are applied before headers from the enclosing
* :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and
* :ref:`envoy_api_msg_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.api.v2.core.HeaderValueOption response_headers_to_add = 5 [(.validate.rules) = { ... }
*/
public java.util.List extends io.envoyproxy.envoy.api.v2.core.HeaderValueOptionOrBuilder>
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_api_msg_route.RouteAction`.
* Headers specified at this level are applied before headers from the enclosing
* :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and
* :ref:`envoy_api_msg_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.api.v2.core.HeaderValueOption response_headers_to_add = 5 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.api.v2.core.HeaderValueOption.Builder addResponseHeadersToAddBuilder() {
return getResponseHeadersToAddFieldBuilder().addBuilder(
io.envoyproxy.envoy.api.v2.core.HeaderValueOption.getDefaultInstance());
}
/**
*
* Specifies a list of headers to be added to responses when this cluster is selected
* through the enclosing :ref:`envoy_api_msg_route.RouteAction`.
* Headers specified at this level are applied before headers from the enclosing
* :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and
* :ref:`envoy_api_msg_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.api.v2.core.HeaderValueOption response_headers_to_add = 5 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.api.v2.core.HeaderValueOption.Builder addResponseHeadersToAddBuilder(
int index) {
return getResponseHeadersToAddFieldBuilder().addBuilder(
index, io.envoyproxy.envoy.api.v2.core.HeaderValueOption.getDefaultInstance());
}
/**
*
* Specifies a list of headers to be added to responses when this cluster is selected
* through the enclosing :ref:`envoy_api_msg_route.RouteAction`.
* Headers specified at this level are applied before headers from the enclosing
* :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and
* :ref:`envoy_api_msg_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.api.v2.core.HeaderValueOption response_headers_to_add = 5 [(.validate.rules) = { ... }
*/
public java.util.List
getResponseHeadersToAddBuilderList() {
return getResponseHeadersToAddFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.api.v2.core.HeaderValueOption, io.envoyproxy.envoy.api.v2.core.HeaderValueOption.Builder, io.envoyproxy.envoy.api.v2.core.HeaderValueOptionOrBuilder>
getResponseHeadersToAddFieldBuilder() {
if (responseHeadersToAddBuilder_ == null) {
responseHeadersToAddBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.api.v2.core.HeaderValueOption, io.envoyproxy.envoy.api.v2.core.HeaderValueOption.Builder, io.envoyproxy.envoy.api.v2.core.HeaderValueOptionOrBuilder>(
responseHeadersToAdd_,
((bitField0_ & 0x00000004) != 0),
getParentForChildren(),
isClean());
responseHeadersToAdd_ = null;
}
return responseHeadersToAddBuilder_;
}
private com.google.protobuf.LazyStringList responseHeadersToRemove_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureResponseHeadersToRemoveIsMutable() {
if (!((bitField0_ & 0x00000008) != 0)) {
responseHeadersToRemove_ = new com.google.protobuf.LazyStringArrayList(responseHeadersToRemove_);
bitField0_ |= 0x00000008;
}
}
/**
*
* Specifies a list of headers to be removed from responses when this cluster is selected
* through the enclosing :ref:`envoy_api_msg_route.RouteAction`.
*
*
* repeated string response_headers_to_remove = 6;
* @return A list containing the responseHeadersToRemove.
*/
public com.google.protobuf.ProtocolStringList
getResponseHeadersToRemoveList() {
return responseHeadersToRemove_.getUnmodifiableView();
}
/**
*
* Specifies a list of headers to be removed from responses when this cluster is selected
* through the enclosing :ref:`envoy_api_msg_route.RouteAction`.
*
*
* repeated string response_headers_to_remove = 6;
* @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_api_msg_route.RouteAction`.
*
*
* repeated string response_headers_to_remove = 6;
* @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_api_msg_route.RouteAction`.
*
*
* repeated string response_headers_to_remove = 6;
* @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_api_msg_route.RouteAction`.
*
*
* repeated string response_headers_to_remove = 6;
* @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);
onChanged();
return this;
}
/**
*
* Specifies a list of headers to be removed from responses when this cluster is selected
* through the enclosing :ref:`envoy_api_msg_route.RouteAction`.
*
*
* repeated string response_headers_to_remove = 6;
* @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);
onChanged();
return this;
}
/**
*
* Specifies a list of headers to be removed from responses when this cluster is selected
* through the enclosing :ref:`envoy_api_msg_route.RouteAction`.
*
*
* repeated string response_headers_to_remove = 6;
* @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_);
onChanged();
return this;
}
/**
*
* Specifies a list of headers to be removed from responses when this cluster is selected
* through the enclosing :ref:`envoy_api_msg_route.RouteAction`.
*
*
* repeated string response_headers_to_remove = 6;
* @return This builder for chaining.
*/
public Builder clearResponseHeadersToRemove() {
responseHeadersToRemove_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
return this;
}
/**
*
* Specifies a list of headers to be removed from responses when this cluster is selected
* through the enclosing :ref:`envoy_api_msg_route.RouteAction`.
*
*
* repeated string response_headers_to_remove = 6;
* @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);
onChanged();
return this;
}
private com.google.protobuf.MapField<
java.lang.String, com.google.protobuf.Struct> perFilterConfig_;
private com.google.protobuf.MapField
internalGetPerFilterConfig() {
if (perFilterConfig_ == null) {
return com.google.protobuf.MapField.emptyMapField(
PerFilterConfigDefaultEntryHolder.defaultEntry);
}
return perFilterConfig_;
}
private com.google.protobuf.MapField
internalGetMutablePerFilterConfig() {
onChanged();;
if (perFilterConfig_ == null) {
perFilterConfig_ = com.google.protobuf.MapField.newMapField(
PerFilterConfigDefaultEntryHolder.defaultEntry);
}
if (!perFilterConfig_.isMutable()) {
perFilterConfig_ = perFilterConfig_.copy();
}
return perFilterConfig_;
}
@java.lang.Deprecated
public int getPerFilterConfigCount() {
return internalGetPerFilterConfig().getMap().size();
}
/**
*
* The per_filter_config field can be used to provide weighted cluster-specific
* configurations for filters. The key should match the filter name, such as
* *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter
* specific; see the :ref:`HTTP filter documentation <config_http_filters>`
* for if and how it is utilized.
*
*
* map<string, .google.protobuf.Struct> per_filter_config = 8 [deprecated = true];
*/
@java.lang.Deprecated
@java.lang.Override
public boolean containsPerFilterConfig(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetPerFilterConfig().getMap().containsKey(key);
}
/**
* Use {@link #getPerFilterConfigMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getPerFilterConfig() {
return getPerFilterConfigMap();
}
/**
*
* The per_filter_config field can be used to provide weighted cluster-specific
* configurations for filters. The key should match the filter name, such as
* *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter
* specific; see the :ref:`HTTP filter documentation <config_http_filters>`
* for if and how it is utilized.
*
*
* map<string, .google.protobuf.Struct> per_filter_config = 8 [deprecated = true];
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getPerFilterConfigMap() {
return internalGetPerFilterConfig().getMap();
}
/**
*
* The per_filter_config field can be used to provide weighted cluster-specific
* configurations for filters. The key should match the filter name, such as
* *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter
* specific; see the :ref:`HTTP filter documentation <config_http_filters>`
* for if and how it is utilized.
*
*
* map<string, .google.protobuf.Struct> per_filter_config = 8 [deprecated = true];
*/
@java.lang.Override
@java.lang.Deprecated
public com.google.protobuf.Struct getPerFilterConfigOrDefault(
java.lang.String key,
com.google.protobuf.Struct defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetPerFilterConfig().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* The per_filter_config field can be used to provide weighted cluster-specific
* configurations for filters. The key should match the filter name, such as
* *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter
* specific; see the :ref:`HTTP filter documentation <config_http_filters>`
* for if and how it is utilized.
*
*
* map<string, .google.protobuf.Struct> per_filter_config = 8 [deprecated = true];
*/
@java.lang.Override
@java.lang.Deprecated
public com.google.protobuf.Struct getPerFilterConfigOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetPerFilterConfig().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
@java.lang.Deprecated
public Builder clearPerFilterConfig() {
internalGetMutablePerFilterConfig().getMutableMap()
.clear();
return this;
}
/**
*
* The per_filter_config field can be used to provide weighted cluster-specific
* configurations for filters. The key should match the filter name, such as
* *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter
* specific; see the :ref:`HTTP filter documentation <config_http_filters>`
* for if and how it is utilized.
*
*
* map<string, .google.protobuf.Struct> per_filter_config = 8 [deprecated = true];
*/
@java.lang.Deprecated
public Builder removePerFilterConfig(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
internalGetMutablePerFilterConfig().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutablePerFilterConfig() {
return internalGetMutablePerFilterConfig().getMutableMap();
}
/**
*
* The per_filter_config field can be used to provide weighted cluster-specific
* configurations for filters. The key should match the filter name, such as
* *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter
* specific; see the :ref:`HTTP filter documentation <config_http_filters>`
* for if and how it is utilized.
*
*
* map<string, .google.protobuf.Struct> per_filter_config = 8 [deprecated = true];
*/
@java.lang.Deprecated public Builder putPerFilterConfig(
java.lang.String key,
com.google.protobuf.Struct value) {
if (key == null) { throw new NullPointerException("map key"); }
if (value == null) {
throw new NullPointerException("map value");
}
internalGetMutablePerFilterConfig().getMutableMap()
.put(key, value);
return this;
}
/**
*
* The per_filter_config field can be used to provide weighted cluster-specific
* configurations for filters. The key should match the filter name, such as
* *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter
* specific; see the :ref:`HTTP filter documentation <config_http_filters>`
* for if and how it is utilized.
*
*
* map<string, .google.protobuf.Struct> per_filter_config = 8 [deprecated = true];
*/
@java.lang.Deprecated
public Builder putAllPerFilterConfig(
java.util.Map values) {
internalGetMutablePerFilterConfig().getMutableMap()
.putAll(values);
return this;
}
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_;
}
private com.google.protobuf.MapField
internalGetMutableTypedPerFilterConfig() {
onChanged();;
if (typedPerFilterConfig_ == null) {
typedPerFilterConfig_ = com.google.protobuf.MapField.newMapField(
TypedPerFilterConfigDefaultEntryHolder.defaultEntry);
}
if (!typedPerFilterConfig_.isMutable()) {
typedPerFilterConfig_ = typedPerFilterConfig_.copy();
}
return typedPerFilterConfig_;
}
public int getTypedPerFilterConfigCount() {
return internalGetTypedPerFilterConfig().getMap().size();
}
/**
*
* The per_filter_config field can be used to provide weighted cluster-specific
* configurations for filters. The key should match the filter name, such as
* *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter
* specific; see the :ref:`HTTP filter documentation <config_http_filters>`
* for if and how it is utilized.
*
*
* 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();
}
/**
*
* The per_filter_config field can be used to provide weighted cluster-specific
* configurations for filters. The key should match the filter name, such as
* *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter
* specific; see the :ref:`HTTP filter documentation <config_http_filters>`
* for if and how it is utilized.
*
*
* map<string, .google.protobuf.Any> typed_per_filter_config = 10;
*/
@java.lang.Override
public java.util.Map getTypedPerFilterConfigMap() {
return internalGetTypedPerFilterConfig().getMap();
}
/**
*
* The per_filter_config field can be used to provide weighted cluster-specific
* configurations for filters. The key should match the filter name, such as
* *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter
* specific; see the :ref:`HTTP filter documentation <config_http_filters>`
* for if and how it is utilized.
*
*
* map<string, .google.protobuf.Any> typed_per_filter_config = 10;
*/
@java.lang.Override
public com.google.protobuf.Any getTypedPerFilterConfigOrDefault(
java.lang.String key,
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;
}
/**
*
* The per_filter_config field can be used to provide weighted cluster-specific
* configurations for filters. The key should match the filter name, such as
* *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter
* specific; see the :ref:`HTTP filter documentation <config_http_filters>`
* for if and how it is utilized.
*
*
* 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 Builder clearTypedPerFilterConfig() {
internalGetMutableTypedPerFilterConfig().getMutableMap()
.clear();
return this;
}
/**
*
* The per_filter_config field can be used to provide weighted cluster-specific
* configurations for filters. The key should match the filter name, such as
* *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter
* specific; see the :ref:`HTTP filter documentation <config_http_filters>`
* for if and how it is utilized.
*
*
* 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().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableTypedPerFilterConfig() {
return internalGetMutableTypedPerFilterConfig().getMutableMap();
}
/**
*
* The per_filter_config field can be used to provide weighted cluster-specific
* configurations for filters. The key should match the filter name, such as
* *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter
* specific; see the :ref:`HTTP filter documentation <config_http_filters>`
* for if and how it is utilized.
*
*
* 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().getMutableMap()
.put(key, value);
return this;
}
/**
*
* The per_filter_config field can be used to provide weighted cluster-specific
* configurations for filters. The key should match the filter name, such as
* *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter
* specific; see the :ref:`HTTP filter documentation <config_http_filters>`
* for if and how it is utilized.
*
*
* map<string, .google.protobuf.Any> typed_per_filter_config = 10;
*/
public Builder putAllTypedPerFilterConfig(
java.util.Map values) {
internalGetMutableTypedPerFilterConfig().getMutableMap()
.putAll(values);
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.api.v2.route.WeightedCluster.ClusterWeight)
}
// @@protoc_insertion_point(class_scope:envoy.api.v2.route.WeightedCluster.ClusterWeight)
private static final io.envoyproxy.envoy.api.v2.route.WeightedCluster.ClusterWeight DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.api.v2.route.WeightedCluster.ClusterWeight();
}
public static io.envoyproxy.envoy.api.v2.route.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 {
return new ClusterWeight(input, extensionRegistry);
}
};
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.api.v2.route.WeightedCluster.ClusterWeight getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int CLUSTERS_FIELD_NUMBER = 1;
private java.util.List clusters_;
/**
*
* Specifies one or more upstream clusters associated with the route.
*
*
* repeated .envoy.api.v2.route.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.api.v2.route.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... }
*/
@java.lang.Override
public java.util.List extends io.envoyproxy.envoy.api.v2.route.WeightedCluster.ClusterWeightOrBuilder>
getClustersOrBuilderList() {
return clusters_;
}
/**
*
* Specifies one or more upstream clusters associated with the route.
*
*
* repeated .envoy.api.v2.route.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.api.v2.route.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... }
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.WeightedCluster.ClusterWeight getClusters(int index) {
return clusters_.get(index);
}
/**
*
* Specifies one or more upstream clusters associated with the route.
*
*
* repeated .envoy.api.v2.route.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... }
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.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, which must be greater than 0. Defaults to 100.
*
*
* .google.protobuf.UInt32Value total_weight = 3 [(.validate.rules) = { ... }
* @return Whether the totalWeight field is set.
*/
@java.lang.Override
public boolean hasTotalWeight() {
return totalWeight_ != null;
}
/**
*
* Specifies the total weight across all clusters. The sum of all cluster weights must equal this
* value, which must be greater than 0. Defaults to 100.
*
*
* .google.protobuf.UInt32Value total_weight = 3 [(.validate.rules) = { ... }
* @return The totalWeight.
*/
@java.lang.Override
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, which must be greater than 0. Defaults to 100.
*
*
* .google.protobuf.UInt32Value total_weight = 3 [(.validate.rules) = { ... }
*/
@java.lang.Override
public com.google.protobuf.UInt32ValueOrBuilder getTotalWeightOrBuilder() {
return getTotalWeight();
}
public static final int RUNTIME_KEY_PREFIX_FIELD_NUMBER = 2;
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;
}
}
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 (totalWeight_ != null) {
output.writeMessage(3, getTotalWeight());
}
unknownFields.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 (totalWeight_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getTotalWeight());
}
size += unknownFields.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.api.v2.route.WeightedCluster)) {
return super.equals(obj);
}
io.envoyproxy.envoy.api.v2.route.WeightedCluster other = (io.envoyproxy.envoy.api.v2.route.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 (!unknownFields.equals(other.unknownFields)) 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();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.api.v2.route.WeightedCluster parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.api.v2.route.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.api.v2.route.WeightedCluster parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.api.v2.route.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.api.v2.route.WeightedCluster parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.api.v2.route.WeightedCluster parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.api.v2.route.WeightedCluster parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.api.v2.route.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.api.v2.route.WeightedCluster parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.api.v2.route.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.api.v2.route.WeightedCluster parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.api.v2.route.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.api.v2.route.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_api_field_route.RouteAction.cluster>` field that specifies a
* single upstream cluster as the target of a request, the :ref:`weighted_clusters
* <envoy_api_field_route.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.api.v2.route.WeightedCluster}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.api.v2.route.WeightedCluster)
io.envoyproxy.envoy.api.v2.route.WeightedClusterOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.api.v2.route.RouteComponentsProto.internal_static_envoy_api_v2_route_WeightedCluster_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.api.v2.route.RouteComponentsProto.internal_static_envoy_api_v2_route_WeightedCluster_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.api.v2.route.WeightedCluster.class, io.envoyproxy.envoy.api.v2.route.WeightedCluster.Builder.class);
}
// Construct using io.envoyproxy.envoy.api.v2.route.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();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (clustersBuilder_ == null) {
clusters_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
clustersBuilder_.clear();
}
if (totalWeightBuilder_ == null) {
totalWeight_ = null;
} else {
totalWeight_ = null;
totalWeightBuilder_ = null;
}
runtimeKeyPrefix_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.api.v2.route.RouteComponentsProto.internal_static_envoy_api_v2_route_WeightedCluster_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.WeightedCluster getDefaultInstanceForType() {
return io.envoyproxy.envoy.api.v2.route.WeightedCluster.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.WeightedCluster build() {
io.envoyproxy.envoy.api.v2.route.WeightedCluster result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.WeightedCluster buildPartial() {
io.envoyproxy.envoy.api.v2.route.WeightedCluster result = new io.envoyproxy.envoy.api.v2.route.WeightedCluster(this);
int from_bitField0_ = bitField0_;
if (clustersBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
clusters_ = java.util.Collections.unmodifiableList(clusters_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.clusters_ = clusters_;
} else {
result.clusters_ = clustersBuilder_.build();
}
if (totalWeightBuilder_ == null) {
result.totalWeight_ = totalWeight_;
} else {
result.totalWeight_ = totalWeightBuilder_.build();
}
result.runtimeKeyPrefix_ = runtimeKeyPrefix_;
onBuilt();
return result;
}
@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.api.v2.route.WeightedCluster) {
return mergeFrom((io.envoyproxy.envoy.api.v2.route.WeightedCluster)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.api.v2.route.WeightedCluster other) {
if (other == io.envoyproxy.envoy.api.v2.route.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_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
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 {
io.envoyproxy.envoy.api.v2.route.WeightedCluster parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.api.v2.route.WeightedCluster) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
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.api.v2.route.WeightedCluster.ClusterWeight, io.envoyproxy.envoy.api.v2.route.WeightedCluster.ClusterWeight.Builder, io.envoyproxy.envoy.api.v2.route.WeightedCluster.ClusterWeightOrBuilder> clustersBuilder_;
/**
*
* Specifies one or more upstream clusters associated with the route.
*
*
* repeated .envoy.api.v2.route.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.api.v2.route.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.api.v2.route.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.api.v2.route.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.api.v2.route.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... }
*/
public Builder setClusters(
int index, io.envoyproxy.envoy.api.v2.route.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.api.v2.route.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... }
*/
public Builder setClusters(
int index, io.envoyproxy.envoy.api.v2.route.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.api.v2.route.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... }
*/
public Builder addClusters(io.envoyproxy.envoy.api.v2.route.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.api.v2.route.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... }
*/
public Builder addClusters(
int index, io.envoyproxy.envoy.api.v2.route.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.api.v2.route.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... }
*/
public Builder addClusters(
io.envoyproxy.envoy.api.v2.route.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.api.v2.route.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... }
*/
public Builder addClusters(
int index, io.envoyproxy.envoy.api.v2.route.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.api.v2.route.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... }
*/
public Builder addAllClusters(
java.lang.Iterable extends io.envoyproxy.envoy.api.v2.route.WeightedCluster.ClusterWeight> 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.api.v2.route.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.api.v2.route.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.api.v2.route.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.api.v2.route.WeightedCluster.ClusterWeight.Builder getClustersBuilder(
int index) {
return getClustersFieldBuilder().getBuilder(index);
}
/**
*
* Specifies one or more upstream clusters associated with the route.
*
*
* repeated .envoy.api.v2.route.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.api.v2.route.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.api.v2.route.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... }
*/
public java.util.List extends io.envoyproxy.envoy.api.v2.route.WeightedCluster.ClusterWeightOrBuilder>
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.api.v2.route.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.api.v2.route.WeightedCluster.ClusterWeight.Builder addClustersBuilder() {
return getClustersFieldBuilder().addBuilder(
io.envoyproxy.envoy.api.v2.route.WeightedCluster.ClusterWeight.getDefaultInstance());
}
/**
*
* Specifies one or more upstream clusters associated with the route.
*
*
* repeated .envoy.api.v2.route.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.api.v2.route.WeightedCluster.ClusterWeight.Builder addClustersBuilder(
int index) {
return getClustersFieldBuilder().addBuilder(
index, io.envoyproxy.envoy.api.v2.route.WeightedCluster.ClusterWeight.getDefaultInstance());
}
/**
*
* Specifies one or more upstream clusters associated with the route.
*
*
* repeated .envoy.api.v2.route.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... }
*/
public java.util.List
getClustersBuilderList() {
return getClustersFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.api.v2.route.WeightedCluster.ClusterWeight, io.envoyproxy.envoy.api.v2.route.WeightedCluster.ClusterWeight.Builder, io.envoyproxy.envoy.api.v2.route.WeightedCluster.ClusterWeightOrBuilder>
getClustersFieldBuilder() {
if (clustersBuilder_ == null) {
clustersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.api.v2.route.WeightedCluster.ClusterWeight, io.envoyproxy.envoy.api.v2.route.WeightedCluster.ClusterWeight.Builder, io.envoyproxy.envoy.api.v2.route.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, which must be greater than 0. Defaults to 100.
*
*
* .google.protobuf.UInt32Value total_weight = 3 [(.validate.rules) = { ... }
* @return Whether the totalWeight field is set.
*/
public boolean hasTotalWeight() {
return totalWeightBuilder_ != null || totalWeight_ != null;
}
/**
*
* Specifies the total weight across all clusters. The sum of all cluster weights must equal this
* value, which must be greater than 0. Defaults to 100.
*
*
* .google.protobuf.UInt32Value total_weight = 3 [(.validate.rules) = { ... }
* @return The totalWeight.
*/
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, which must be greater than 0. Defaults to 100.
*
*
* .google.protobuf.UInt32Value total_weight = 3 [(.validate.rules) = { ... }
*/
public Builder setTotalWeight(com.google.protobuf.UInt32Value value) {
if (totalWeightBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
totalWeight_ = value;
onChanged();
} else {
totalWeightBuilder_.setMessage(value);
}
return this;
}
/**
*
* Specifies the total weight across all clusters. The sum of all cluster weights must equal this
* value, which must be greater than 0. Defaults to 100.
*
*
* .google.protobuf.UInt32Value total_weight = 3 [(.validate.rules) = { ... }
*/
public Builder setTotalWeight(
com.google.protobuf.UInt32Value.Builder builderForValue) {
if (totalWeightBuilder_ == null) {
totalWeight_ = builderForValue.build();
onChanged();
} else {
totalWeightBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Specifies the total weight across all clusters. The sum of all cluster weights must equal this
* value, which must be greater than 0. Defaults to 100.
*
*
* .google.protobuf.UInt32Value total_weight = 3 [(.validate.rules) = { ... }
*/
public Builder mergeTotalWeight(com.google.protobuf.UInt32Value value) {
if (totalWeightBuilder_ == null) {
if (totalWeight_ != null) {
totalWeight_ =
com.google.protobuf.UInt32Value.newBuilder(totalWeight_).mergeFrom(value).buildPartial();
} else {
totalWeight_ = value;
}
onChanged();
} else {
totalWeightBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Specifies the total weight across all clusters. The sum of all cluster weights must equal this
* value, which must be greater than 0. Defaults to 100.
*
*
* .google.protobuf.UInt32Value total_weight = 3 [(.validate.rules) = { ... }
*/
public Builder clearTotalWeight() {
if (totalWeightBuilder_ == null) {
totalWeight_ = null;
onChanged();
} else {
totalWeight_ = null;
totalWeightBuilder_ = null;
}
return this;
}
/**
*
* Specifies the total weight across all clusters. The sum of all cluster weights must equal this
* value, which must be greater than 0. Defaults to 100.
*
*
* .google.protobuf.UInt32Value total_weight = 3 [(.validate.rules) = { ... }
*/
public com.google.protobuf.UInt32Value.Builder getTotalWeightBuilder() {
onChanged();
return getTotalWeightFieldBuilder().getBuilder();
}
/**
*
* Specifies the total weight across all clusters. The sum of all cluster weights must equal this
* value, which must be greater than 0. Defaults to 100.
*
*
* .google.protobuf.UInt32Value total_weight = 3 [(.validate.rules) = { ... }
*/
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, which must be greater than 0. Defaults to 100.
*
*
* .google.protobuf.UInt32Value total_weight = 3 [(.validate.rules) = { ... }
*/
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;
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();
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;
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.api.v2.route.WeightedCluster)
}
// @@protoc_insertion_point(class_scope:envoy.api.v2.route.WeightedCluster)
private static final io.envoyproxy.envoy.api.v2.route.WeightedCluster DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.api.v2.route.WeightedCluster();
}
public static io.envoyproxy.envoy.api.v2.route.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 {
return new WeightedCluster(input, extensionRegistry);
}
};
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.api.v2.route.WeightedCluster getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy