![JAR search and dependency download from the Maven repository](/logo.png)
io.envoyproxy.envoy.api.v2.route.VirtualHost 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;
/**
*
* The top level element in the routing configuration is a virtual host. Each virtual host has
* a logical name as well as a set of domains that get routed to it based on the incoming request's
* host header. This allows a single listener to service multiple top level domain path trees. Once
* a virtual host is selected based on the domain, the routes are processed in order to see which
* upstream cluster to route to or whether to perform a redirect.
* [#next-free-field: 21]
*
*
* Protobuf type {@code envoy.api.v2.route.VirtualHost}
*/
public final class VirtualHost extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.api.v2.route.VirtualHost)
VirtualHostOrBuilder {
private static final long serialVersionUID = 0L;
// Use VirtualHost.newBuilder() to construct.
private VirtualHost(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private VirtualHost() {
name_ = "";
domains_ = com.google.protobuf.LazyStringArrayList.EMPTY;
routes_ = java.util.Collections.emptyList();
requireTls_ = 0;
virtualClusters_ = java.util.Collections.emptyList();
rateLimits_ = java.util.Collections.emptyList();
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 VirtualHost();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private VirtualHost(
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: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
domains_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000001;
}
domains_.add(s);
break;
}
case 26: {
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
routes_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000002;
}
routes_.add(
input.readMessage(io.envoyproxy.envoy.api.v2.route.Route.parser(), extensionRegistry));
break;
}
case 32: {
int rawValue = input.readEnum();
requireTls_ = rawValue;
break;
}
case 42: {
if (!((mutable_bitField0_ & 0x00000004) != 0)) {
virtualClusters_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000004;
}
virtualClusters_.add(
input.readMessage(io.envoyproxy.envoy.api.v2.route.VirtualCluster.parser(), extensionRegistry));
break;
}
case 50: {
if (!((mutable_bitField0_ & 0x00000008) != 0)) {
rateLimits_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000008;
}
rateLimits_.add(
input.readMessage(io.envoyproxy.envoy.api.v2.route.RateLimit.parser(), extensionRegistry));
break;
}
case 58: {
if (!((mutable_bitField0_ & 0x00000010) != 0)) {
requestHeadersToAdd_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000010;
}
requestHeadersToAdd_.add(
input.readMessage(io.envoyproxy.envoy.api.v2.core.HeaderValueOption.parser(), extensionRegistry));
break;
}
case 66: {
io.envoyproxy.envoy.api.v2.route.CorsPolicy.Builder subBuilder = null;
if (cors_ != null) {
subBuilder = cors_.toBuilder();
}
cors_ = input.readMessage(io.envoyproxy.envoy.api.v2.route.CorsPolicy.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(cors_);
cors_ = subBuilder.buildPartial();
}
break;
}
case 82: {
if (!((mutable_bitField0_ & 0x00000040) != 0)) {
responseHeadersToAdd_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000040;
}
responseHeadersToAdd_.add(
input.readMessage(io.envoyproxy.envoy.api.v2.core.HeaderValueOption.parser(), extensionRegistry));
break;
}
case 90: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000080) != 0)) {
responseHeadersToRemove_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000080;
}
responseHeadersToRemove_.add(s);
break;
}
case 98: {
if (!((mutable_bitField0_ & 0x00000100) != 0)) {
perFilterConfig_ = com.google.protobuf.MapField.newMapField(
PerFilterConfigDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000100;
}
com.google.protobuf.MapEntry
perFilterConfig__ = input.readMessage(
PerFilterConfigDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
perFilterConfig_.getMutableMap().put(
perFilterConfig__.getKey(), perFilterConfig__.getValue());
break;
}
case 106: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000020) != 0)) {
requestHeadersToRemove_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000020;
}
requestHeadersToRemove_.add(s);
break;
}
case 112: {
includeRequestAttemptCount_ = input.readBool();
break;
}
case 122: {
if (!((mutable_bitField0_ & 0x00000200) != 0)) {
typedPerFilterConfig_ = com.google.protobuf.MapField.newMapField(
TypedPerFilterConfigDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000200;
}
com.google.protobuf.MapEntry
typedPerFilterConfig__ = input.readMessage(
TypedPerFilterConfigDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
typedPerFilterConfig_.getMutableMap().put(
typedPerFilterConfig__.getKey(), typedPerFilterConfig__.getValue());
break;
}
case 130: {
io.envoyproxy.envoy.api.v2.route.RetryPolicy.Builder subBuilder = null;
if (retryPolicy_ != null) {
subBuilder = retryPolicy_.toBuilder();
}
retryPolicy_ = input.readMessage(io.envoyproxy.envoy.api.v2.route.RetryPolicy.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(retryPolicy_);
retryPolicy_ = subBuilder.buildPartial();
}
break;
}
case 138: {
io.envoyproxy.envoy.api.v2.route.HedgePolicy.Builder subBuilder = null;
if (hedgePolicy_ != null) {
subBuilder = hedgePolicy_.toBuilder();
}
hedgePolicy_ = input.readMessage(io.envoyproxy.envoy.api.v2.route.HedgePolicy.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(hedgePolicy_);
hedgePolicy_ = subBuilder.buildPartial();
}
break;
}
case 146: {
com.google.protobuf.UInt32Value.Builder subBuilder = null;
if (perRequestBufferLimitBytes_ != null) {
subBuilder = perRequestBufferLimitBytes_.toBuilder();
}
perRequestBufferLimitBytes_ = input.readMessage(com.google.protobuf.UInt32Value.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(perRequestBufferLimitBytes_);
perRequestBufferLimitBytes_ = subBuilder.buildPartial();
}
break;
}
case 152: {
includeAttemptCountInResponse_ = input.readBool();
break;
}
case 162: {
com.google.protobuf.Any.Builder subBuilder = null;
if (retryPolicyTypedConfig_ != null) {
subBuilder = retryPolicyTypedConfig_.toBuilder();
}
retryPolicyTypedConfig_ = input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(retryPolicyTypedConfig_);
retryPolicyTypedConfig_ = 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)) {
domains_ = domains_.getUnmodifiableView();
}
if (((mutable_bitField0_ & 0x00000002) != 0)) {
routes_ = java.util.Collections.unmodifiableList(routes_);
}
if (((mutable_bitField0_ & 0x00000004) != 0)) {
virtualClusters_ = java.util.Collections.unmodifiableList(virtualClusters_);
}
if (((mutable_bitField0_ & 0x00000008) != 0)) {
rateLimits_ = java.util.Collections.unmodifiableList(rateLimits_);
}
if (((mutable_bitField0_ & 0x00000010) != 0)) {
requestHeadersToAdd_ = java.util.Collections.unmodifiableList(requestHeadersToAdd_);
}
if (((mutable_bitField0_ & 0x00000040) != 0)) {
responseHeadersToAdd_ = java.util.Collections.unmodifiableList(responseHeadersToAdd_);
}
if (((mutable_bitField0_ & 0x00000080) != 0)) {
responseHeadersToRemove_ = responseHeadersToRemove_.getUnmodifiableView();
}
if (((mutable_bitField0_ & 0x00000020) != 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_VirtualHost_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 12:
return internalGetPerFilterConfig();
case 15:
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_VirtualHost_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.api.v2.route.VirtualHost.class, io.envoyproxy.envoy.api.v2.route.VirtualHost.Builder.class);
}
/**
* Protobuf enum {@code envoy.api.v2.route.VirtualHost.TlsRequirementType}
*/
public enum TlsRequirementType
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
* No TLS requirement for the virtual host.
*
*
* NONE = 0;
*/
NONE(0),
/**
*
* External requests must use TLS. If a request is external and it is not
* using TLS, a 301 redirect will be sent telling the client to use HTTPS.
*
*
* EXTERNAL_ONLY = 1;
*/
EXTERNAL_ONLY(1),
/**
*
* All requests must use TLS. If a request is not using TLS, a 301 redirect
* will be sent telling the client to use HTTPS.
*
*
* ALL = 2;
*/
ALL(2),
UNRECOGNIZED(-1),
;
/**
*
* No TLS requirement for the virtual host.
*
*
* NONE = 0;
*/
public static final int NONE_VALUE = 0;
/**
*
* External requests must use TLS. If a request is external and it is not
* using TLS, a 301 redirect will be sent telling the client to use HTTPS.
*
*
* EXTERNAL_ONLY = 1;
*/
public static final int EXTERNAL_ONLY_VALUE = 1;
/**
*
* All requests must use TLS. If a request is not using TLS, a 301 redirect
* will be sent telling the client to use HTTPS.
*
*
* ALL = 2;
*/
public static final int ALL_VALUE = 2;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static TlsRequirementType valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static TlsRequirementType forNumber(int value) {
switch (value) {
case 0: return NONE;
case 1: return EXTERNAL_ONLY;
case 2: return ALL;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
TlsRequirementType> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public TlsRequirementType findValueByNumber(int number) {
return TlsRequirementType.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return io.envoyproxy.envoy.api.v2.route.VirtualHost.getDescriptor().getEnumTypes().get(0);
}
private static final TlsRequirementType[] VALUES = values();
public static TlsRequirementType valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private TlsRequirementType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:envoy.api.v2.route.VirtualHost.TlsRequirementType)
}
public static final int NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object name_;
/**
*
* The logical name of the virtual host. This is used when emitting certain
* statistics but is not relevant for routing.
*
*
* 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;
}
}
/**
*
* The logical name of the virtual host. This is used when emitting certain
* statistics but is not relevant for routing.
*
*
* 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 DOMAINS_FIELD_NUMBER = 2;
private com.google.protobuf.LazyStringList domains_;
/**
*
* A list of domains (host/authority header) that will be matched to this
* virtual host. Wildcard hosts are supported in the suffix or prefix form.
* Domain search order:
* 1. Exact domain names: ``www.foo.com``.
* 2. Suffix domain wildcards: ``*.foo.com`` or ``*-bar.foo.com``.
* 3. Prefix domain wildcards: ``foo.*`` or ``foo-*``.
* 4. Special wildcard ``*`` matching any domain.
* .. note::
* The wildcard will not match the empty string.
* e.g. ``*-bar.foo.com`` will match ``baz-bar.foo.com`` but not ``-bar.foo.com``.
* The longest wildcards match first.
* Only a single virtual host in the entire route configuration can match on ``*``. A domain
* must be unique across all virtual hosts or the config will fail to load.
* Domains cannot contain control characters. This is validated by the well_known_regex HTTP_HEADER_VALUE.
*
*
* repeated string domains = 2 [(.validate.rules) = { ... }
* @return A list containing the domains.
*/
public com.google.protobuf.ProtocolStringList
getDomainsList() {
return domains_;
}
/**
*
* A list of domains (host/authority header) that will be matched to this
* virtual host. Wildcard hosts are supported in the suffix or prefix form.
* Domain search order:
* 1. Exact domain names: ``www.foo.com``.
* 2. Suffix domain wildcards: ``*.foo.com`` or ``*-bar.foo.com``.
* 3. Prefix domain wildcards: ``foo.*`` or ``foo-*``.
* 4. Special wildcard ``*`` matching any domain.
* .. note::
* The wildcard will not match the empty string.
* e.g. ``*-bar.foo.com`` will match ``baz-bar.foo.com`` but not ``-bar.foo.com``.
* The longest wildcards match first.
* Only a single virtual host in the entire route configuration can match on ``*``. A domain
* must be unique across all virtual hosts or the config will fail to load.
* Domains cannot contain control characters. This is validated by the well_known_regex HTTP_HEADER_VALUE.
*
*
* repeated string domains = 2 [(.validate.rules) = { ... }
* @return The count of domains.
*/
public int getDomainsCount() {
return domains_.size();
}
/**
*
* A list of domains (host/authority header) that will be matched to this
* virtual host. Wildcard hosts are supported in the suffix or prefix form.
* Domain search order:
* 1. Exact domain names: ``www.foo.com``.
* 2. Suffix domain wildcards: ``*.foo.com`` or ``*-bar.foo.com``.
* 3. Prefix domain wildcards: ``foo.*`` or ``foo-*``.
* 4. Special wildcard ``*`` matching any domain.
* .. note::
* The wildcard will not match the empty string.
* e.g. ``*-bar.foo.com`` will match ``baz-bar.foo.com`` but not ``-bar.foo.com``.
* The longest wildcards match first.
* Only a single virtual host in the entire route configuration can match on ``*``. A domain
* must be unique across all virtual hosts or the config will fail to load.
* Domains cannot contain control characters. This is validated by the well_known_regex HTTP_HEADER_VALUE.
*
*
* repeated string domains = 2 [(.validate.rules) = { ... }
* @param index The index of the element to return.
* @return The domains at the given index.
*/
public java.lang.String getDomains(int index) {
return domains_.get(index);
}
/**
*
* A list of domains (host/authority header) that will be matched to this
* virtual host. Wildcard hosts are supported in the suffix or prefix form.
* Domain search order:
* 1. Exact domain names: ``www.foo.com``.
* 2. Suffix domain wildcards: ``*.foo.com`` or ``*-bar.foo.com``.
* 3. Prefix domain wildcards: ``foo.*`` or ``foo-*``.
* 4. Special wildcard ``*`` matching any domain.
* .. note::
* The wildcard will not match the empty string.
* e.g. ``*-bar.foo.com`` will match ``baz-bar.foo.com`` but not ``-bar.foo.com``.
* The longest wildcards match first.
* Only a single virtual host in the entire route configuration can match on ``*``. A domain
* must be unique across all virtual hosts or the config will fail to load.
* Domains cannot contain control characters. This is validated by the well_known_regex HTTP_HEADER_VALUE.
*
*
* repeated string domains = 2 [(.validate.rules) = { ... }
* @param index The index of the value to return.
* @return The bytes of the domains at the given index.
*/
public com.google.protobuf.ByteString
getDomainsBytes(int index) {
return domains_.getByteString(index);
}
public static final int ROUTES_FIELD_NUMBER = 3;
private java.util.List routes_;
/**
*
* The list of routes that will be matched, in order, for incoming requests.
* The first route that matches will be used.
*
*
* repeated .envoy.api.v2.route.Route routes = 3;
*/
@java.lang.Override
public java.util.List getRoutesList() {
return routes_;
}
/**
*
* The list of routes that will be matched, in order, for incoming requests.
* The first route that matches will be used.
*
*
* repeated .envoy.api.v2.route.Route routes = 3;
*/
@java.lang.Override
public java.util.List extends io.envoyproxy.envoy.api.v2.route.RouteOrBuilder>
getRoutesOrBuilderList() {
return routes_;
}
/**
*
* The list of routes that will be matched, in order, for incoming requests.
* The first route that matches will be used.
*
*
* repeated .envoy.api.v2.route.Route routes = 3;
*/
@java.lang.Override
public int getRoutesCount() {
return routes_.size();
}
/**
*
* The list of routes that will be matched, in order, for incoming requests.
* The first route that matches will be used.
*
*
* repeated .envoy.api.v2.route.Route routes = 3;
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.Route getRoutes(int index) {
return routes_.get(index);
}
/**
*
* The list of routes that will be matched, in order, for incoming requests.
* The first route that matches will be used.
*
*
* repeated .envoy.api.v2.route.Route routes = 3;
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.RouteOrBuilder getRoutesOrBuilder(
int index) {
return routes_.get(index);
}
public static final int REQUIRE_TLS_FIELD_NUMBER = 4;
private int requireTls_;
/**
*
* Specifies the type of TLS enforcement the virtual host expects. If this option is not
* specified, there is no TLS requirement for the virtual host.
*
*
* .envoy.api.v2.route.VirtualHost.TlsRequirementType require_tls = 4 [(.validate.rules) = { ... }
* @return The enum numeric value on the wire for requireTls.
*/
@java.lang.Override public int getRequireTlsValue() {
return requireTls_;
}
/**
*
* Specifies the type of TLS enforcement the virtual host expects. If this option is not
* specified, there is no TLS requirement for the virtual host.
*
*
* .envoy.api.v2.route.VirtualHost.TlsRequirementType require_tls = 4 [(.validate.rules) = { ... }
* @return The requireTls.
*/
@java.lang.Override public io.envoyproxy.envoy.api.v2.route.VirtualHost.TlsRequirementType getRequireTls() {
@SuppressWarnings("deprecation")
io.envoyproxy.envoy.api.v2.route.VirtualHost.TlsRequirementType result = io.envoyproxy.envoy.api.v2.route.VirtualHost.TlsRequirementType.valueOf(requireTls_);
return result == null ? io.envoyproxy.envoy.api.v2.route.VirtualHost.TlsRequirementType.UNRECOGNIZED : result;
}
public static final int VIRTUAL_CLUSTERS_FIELD_NUMBER = 5;
private java.util.List virtualClusters_;
/**
*
* A list of virtual clusters defined for this virtual host. Virtual clusters
* are used for additional statistics gathering.
*
*
* repeated .envoy.api.v2.route.VirtualCluster virtual_clusters = 5;
*/
@java.lang.Override
public java.util.List getVirtualClustersList() {
return virtualClusters_;
}
/**
*
* A list of virtual clusters defined for this virtual host. Virtual clusters
* are used for additional statistics gathering.
*
*
* repeated .envoy.api.v2.route.VirtualCluster virtual_clusters = 5;
*/
@java.lang.Override
public java.util.List extends io.envoyproxy.envoy.api.v2.route.VirtualClusterOrBuilder>
getVirtualClustersOrBuilderList() {
return virtualClusters_;
}
/**
*
* A list of virtual clusters defined for this virtual host. Virtual clusters
* are used for additional statistics gathering.
*
*
* repeated .envoy.api.v2.route.VirtualCluster virtual_clusters = 5;
*/
@java.lang.Override
public int getVirtualClustersCount() {
return virtualClusters_.size();
}
/**
*
* A list of virtual clusters defined for this virtual host. Virtual clusters
* are used for additional statistics gathering.
*
*
* repeated .envoy.api.v2.route.VirtualCluster virtual_clusters = 5;
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.VirtualCluster getVirtualClusters(int index) {
return virtualClusters_.get(index);
}
/**
*
* A list of virtual clusters defined for this virtual host. Virtual clusters
* are used for additional statistics gathering.
*
*
* repeated .envoy.api.v2.route.VirtualCluster virtual_clusters = 5;
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.VirtualClusterOrBuilder getVirtualClustersOrBuilder(
int index) {
return virtualClusters_.get(index);
}
public static final int RATE_LIMITS_FIELD_NUMBER = 6;
private java.util.List rateLimits_;
/**
*
* Specifies a set of rate limit configurations that will be applied to the
* virtual host.
*
*
* repeated .envoy.api.v2.route.RateLimit rate_limits = 6;
*/
@java.lang.Override
public java.util.List getRateLimitsList() {
return rateLimits_;
}
/**
*
* Specifies a set of rate limit configurations that will be applied to the
* virtual host.
*
*
* repeated .envoy.api.v2.route.RateLimit rate_limits = 6;
*/
@java.lang.Override
public java.util.List extends io.envoyproxy.envoy.api.v2.route.RateLimitOrBuilder>
getRateLimitsOrBuilderList() {
return rateLimits_;
}
/**
*
* Specifies a set of rate limit configurations that will be applied to the
* virtual host.
*
*
* repeated .envoy.api.v2.route.RateLimit rate_limits = 6;
*/
@java.lang.Override
public int getRateLimitsCount() {
return rateLimits_.size();
}
/**
*
* Specifies a set of rate limit configurations that will be applied to the
* virtual host.
*
*
* repeated .envoy.api.v2.route.RateLimit rate_limits = 6;
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.RateLimit getRateLimits(int index) {
return rateLimits_.get(index);
}
/**
*
* Specifies a set of rate limit configurations that will be applied to the
* virtual host.
*
*
* repeated .envoy.api.v2.route.RateLimit rate_limits = 6;
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.RateLimitOrBuilder getRateLimitsOrBuilder(
int index) {
return rateLimits_.get(index);
}
public static final int REQUEST_HEADERS_TO_ADD_FIELD_NUMBER = 7;
private java.util.List requestHeadersToAdd_;
/**
*
* Specifies a list of HTTP headers that should be added to each request
* handled by this virtual host. Headers specified at this level are applied
* after headers from enclosed :ref:`envoy_api_msg_route.Route` and before headers from the
* enclosing :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 = 7 [(.validate.rules) = { ... }
*/
@java.lang.Override
public java.util.List getRequestHeadersToAddList() {
return requestHeadersToAdd_;
}
/**
*
* Specifies a list of HTTP headers that should be added to each request
* handled by this virtual host. Headers specified at this level are applied
* after headers from enclosed :ref:`envoy_api_msg_route.Route` and before headers from the
* enclosing :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 = 7 [(.validate.rules) = { ... }
*/
@java.lang.Override
public java.util.List extends io.envoyproxy.envoy.api.v2.core.HeaderValueOptionOrBuilder>
getRequestHeadersToAddOrBuilderList() {
return requestHeadersToAdd_;
}
/**
*
* Specifies a list of HTTP headers that should be added to each request
* handled by this virtual host. Headers specified at this level are applied
* after headers from enclosed :ref:`envoy_api_msg_route.Route` and before headers from the
* enclosing :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 = 7 [(.validate.rules) = { ... }
*/
@java.lang.Override
public int getRequestHeadersToAddCount() {
return requestHeadersToAdd_.size();
}
/**
*
* Specifies a list of HTTP headers that should be added to each request
* handled by this virtual host. Headers specified at this level are applied
* after headers from enclosed :ref:`envoy_api_msg_route.Route` and before headers from the
* enclosing :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 = 7 [(.validate.rules) = { ... }
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.core.HeaderValueOption getRequestHeadersToAdd(int index) {
return requestHeadersToAdd_.get(index);
}
/**
*
* Specifies a list of HTTP headers that should be added to each request
* handled by this virtual host. Headers specified at this level are applied
* after headers from enclosed :ref:`envoy_api_msg_route.Route` and before headers from the
* enclosing :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 = 7 [(.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 = 13;
private com.google.protobuf.LazyStringList requestHeadersToRemove_;
/**
*
* Specifies a list of HTTP headers that should be removed from each request
* handled by this virtual host.
*
*
* repeated string request_headers_to_remove = 13;
* @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
* handled by this virtual host.
*
*
* repeated string request_headers_to_remove = 13;
* @return The count of requestHeadersToRemove.
*/
public int getRequestHeadersToRemoveCount() {
return requestHeadersToRemove_.size();
}
/**
*
* Specifies a list of HTTP headers that should be removed from each request
* handled by this virtual host.
*
*
* repeated string request_headers_to_remove = 13;
* @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
* handled by this virtual host.
*
*
* repeated string request_headers_to_remove = 13;
* @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 = 10;
private java.util.List responseHeadersToAdd_;
/**
*
* Specifies a list of HTTP headers that should be added to each response
* handled by this virtual host. Headers specified at this level are applied
* after headers from enclosed :ref:`envoy_api_msg_route.Route` and before headers from the
* enclosing :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 = 10 [(.validate.rules) = { ... }
*/
@java.lang.Override
public java.util.List getResponseHeadersToAddList() {
return responseHeadersToAdd_;
}
/**
*
* Specifies a list of HTTP headers that should be added to each response
* handled by this virtual host. Headers specified at this level are applied
* after headers from enclosed :ref:`envoy_api_msg_route.Route` and before headers from the
* enclosing :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 = 10 [(.validate.rules) = { ... }
*/
@java.lang.Override
public java.util.List extends io.envoyproxy.envoy.api.v2.core.HeaderValueOptionOrBuilder>
getResponseHeadersToAddOrBuilderList() {
return responseHeadersToAdd_;
}
/**
*
* Specifies a list of HTTP headers that should be added to each response
* handled by this virtual host. Headers specified at this level are applied
* after headers from enclosed :ref:`envoy_api_msg_route.Route` and before headers from the
* enclosing :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 = 10 [(.validate.rules) = { ... }
*/
@java.lang.Override
public int getResponseHeadersToAddCount() {
return responseHeadersToAdd_.size();
}
/**
*
* Specifies a list of HTTP headers that should be added to each response
* handled by this virtual host. Headers specified at this level are applied
* after headers from enclosed :ref:`envoy_api_msg_route.Route` and before headers from the
* enclosing :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 = 10 [(.validate.rules) = { ... }
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.core.HeaderValueOption getResponseHeadersToAdd(int index) {
return responseHeadersToAdd_.get(index);
}
/**
*
* Specifies a list of HTTP headers that should be added to each response
* handled by this virtual host. Headers specified at this level are applied
* after headers from enclosed :ref:`envoy_api_msg_route.Route` and before headers from the
* enclosing :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 = 10 [(.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 = 11;
private com.google.protobuf.LazyStringList responseHeadersToRemove_;
/**
*
* Specifies a list of HTTP headers that should be removed from each response
* handled by this virtual host.
*
*
* repeated string response_headers_to_remove = 11;
* @return A list containing the responseHeadersToRemove.
*/
public com.google.protobuf.ProtocolStringList
getResponseHeadersToRemoveList() {
return responseHeadersToRemove_;
}
/**
*
* Specifies a list of HTTP headers that should be removed from each response
* handled by this virtual host.
*
*
* repeated string response_headers_to_remove = 11;
* @return The count of responseHeadersToRemove.
*/
public int getResponseHeadersToRemoveCount() {
return responseHeadersToRemove_.size();
}
/**
*
* Specifies a list of HTTP headers that should be removed from each response
* handled by this virtual host.
*
*
* repeated string response_headers_to_remove = 11;
* @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 HTTP headers that should be removed from each response
* handled by this virtual host.
*
*
* repeated string response_headers_to_remove = 11;
* @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 CORS_FIELD_NUMBER = 8;
private io.envoyproxy.envoy.api.v2.route.CorsPolicy cors_;
/**
*
* Indicates that the virtual host has a CORS policy.
*
*
* .envoy.api.v2.route.CorsPolicy cors = 8;
* @return Whether the cors field is set.
*/
@java.lang.Override
public boolean hasCors() {
return cors_ != null;
}
/**
*
* Indicates that the virtual host has a CORS policy.
*
*
* .envoy.api.v2.route.CorsPolicy cors = 8;
* @return The cors.
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.CorsPolicy getCors() {
return cors_ == null ? io.envoyproxy.envoy.api.v2.route.CorsPolicy.getDefaultInstance() : cors_;
}
/**
*
* Indicates that the virtual host has a CORS policy.
*
*
* .envoy.api.v2.route.CorsPolicy cors = 8;
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.CorsPolicyOrBuilder getCorsOrBuilder() {
return getCors();
}
public static final int PER_FILTER_CONFIG_FIELD_NUMBER = 12;
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_VirtualHost_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 virtual host-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 = 12 [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 virtual host-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 = 12 [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 virtual host-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 = 12 [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 virtual host-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 = 12 [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 = 15;
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_VirtualHost_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 virtual host-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 = 15;
*/
@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 virtual host-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 = 15;
*/
@java.lang.Override
public java.util.Map getTypedPerFilterConfigMap() {
return internalGetTypedPerFilterConfig().getMap();
}
/**
*
* The per_filter_config field can be used to provide virtual host-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 = 15;
*/
@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 virtual host-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 = 15;
*/
@java.lang.Override
public com.google.protobuf.Any getTypedPerFilterConfigOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetTypedPerFilterConfig().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int INCLUDE_REQUEST_ATTEMPT_COUNT_FIELD_NUMBER = 14;
private boolean includeRequestAttemptCount_;
/**
*
* Decides whether the :ref:`x-envoy-attempt-count
* <config_http_filters_router_x-envoy-attempt-count>` header should be included
* in the upstream request. Setting this option will cause it to override any existing header
* value, so in the case of two Envoys on the request path with this option enabled, the upstream
* will see the attempt count as perceived by the second Envoy. Defaults to false.
* This header is unaffected by the
* :ref:`suppress_envoy_headers
* <envoy_api_field_config.filter.http.router.v2.Router.suppress_envoy_headers>` flag.
* [#next-major-version: rename to include_attempt_count_in_request.]
*
*
* bool include_request_attempt_count = 14;
* @return The includeRequestAttemptCount.
*/
@java.lang.Override
public boolean getIncludeRequestAttemptCount() {
return includeRequestAttemptCount_;
}
public static final int INCLUDE_ATTEMPT_COUNT_IN_RESPONSE_FIELD_NUMBER = 19;
private boolean includeAttemptCountInResponse_;
/**
*
* Decides whether the :ref:`x-envoy-attempt-count
* <config_http_filters_router_x-envoy-attempt-count>` header should be included
* in the downstream response. Setting this option will cause the router to override any existing header
* value, so in the case of two Envoys on the request path with this option enabled, the downstream
* will see the attempt count as perceived by the Envoy closest upstream from itself. Defaults to false.
* This header is unaffected by the
* :ref:`suppress_envoy_headers
* <envoy_api_field_config.filter.http.router.v2.Router.suppress_envoy_headers>` flag.
*
*
* bool include_attempt_count_in_response = 19;
* @return The includeAttemptCountInResponse.
*/
@java.lang.Override
public boolean getIncludeAttemptCountInResponse() {
return includeAttemptCountInResponse_;
}
public static final int RETRY_POLICY_FIELD_NUMBER = 16;
private io.envoyproxy.envoy.api.v2.route.RetryPolicy retryPolicy_;
/**
*
* Indicates the retry policy for all routes in this virtual host. Note that setting a
* route level entry will take precedence over this config and it'll be treated
* independently (e.g.: values are not inherited).
*
*
* .envoy.api.v2.route.RetryPolicy retry_policy = 16;
* @return Whether the retryPolicy field is set.
*/
@java.lang.Override
public boolean hasRetryPolicy() {
return retryPolicy_ != null;
}
/**
*
* Indicates the retry policy for all routes in this virtual host. Note that setting a
* route level entry will take precedence over this config and it'll be treated
* independently (e.g.: values are not inherited).
*
*
* .envoy.api.v2.route.RetryPolicy retry_policy = 16;
* @return The retryPolicy.
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.RetryPolicy getRetryPolicy() {
return retryPolicy_ == null ? io.envoyproxy.envoy.api.v2.route.RetryPolicy.getDefaultInstance() : retryPolicy_;
}
/**
*
* Indicates the retry policy for all routes in this virtual host. Note that setting a
* route level entry will take precedence over this config and it'll be treated
* independently (e.g.: values are not inherited).
*
*
* .envoy.api.v2.route.RetryPolicy retry_policy = 16;
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.RetryPolicyOrBuilder getRetryPolicyOrBuilder() {
return getRetryPolicy();
}
public static final int RETRY_POLICY_TYPED_CONFIG_FIELD_NUMBER = 20;
private com.google.protobuf.Any retryPolicyTypedConfig_;
/**
*
* [#not-implemented-hide:]
* Specifies the configuration for retry policy extension. Note that setting a route level entry
* will take precedence over this config and it'll be treated independently (e.g.: values are not
* inherited). :ref:`Retry policy <envoy_api_field_route.VirtualHost.retry_policy>` should not be
* set if this field is used.
*
*
* .google.protobuf.Any retry_policy_typed_config = 20;
* @return Whether the retryPolicyTypedConfig field is set.
*/
@java.lang.Override
public boolean hasRetryPolicyTypedConfig() {
return retryPolicyTypedConfig_ != null;
}
/**
*
* [#not-implemented-hide:]
* Specifies the configuration for retry policy extension. Note that setting a route level entry
* will take precedence over this config and it'll be treated independently (e.g.: values are not
* inherited). :ref:`Retry policy <envoy_api_field_route.VirtualHost.retry_policy>` should not be
* set if this field is used.
*
*
* .google.protobuf.Any retry_policy_typed_config = 20;
* @return The retryPolicyTypedConfig.
*/
@java.lang.Override
public com.google.protobuf.Any getRetryPolicyTypedConfig() {
return retryPolicyTypedConfig_ == null ? com.google.protobuf.Any.getDefaultInstance() : retryPolicyTypedConfig_;
}
/**
*
* [#not-implemented-hide:]
* Specifies the configuration for retry policy extension. Note that setting a route level entry
* will take precedence over this config and it'll be treated independently (e.g.: values are not
* inherited). :ref:`Retry policy <envoy_api_field_route.VirtualHost.retry_policy>` should not be
* set if this field is used.
*
*
* .google.protobuf.Any retry_policy_typed_config = 20;
*/
@java.lang.Override
public com.google.protobuf.AnyOrBuilder getRetryPolicyTypedConfigOrBuilder() {
return getRetryPolicyTypedConfig();
}
public static final int HEDGE_POLICY_FIELD_NUMBER = 17;
private io.envoyproxy.envoy.api.v2.route.HedgePolicy hedgePolicy_;
/**
*
* Indicates the hedge policy for all routes in this virtual host. Note that setting a
* route level entry will take precedence over this config and it'll be treated
* independently (e.g.: values are not inherited).
*
*
* .envoy.api.v2.route.HedgePolicy hedge_policy = 17;
* @return Whether the hedgePolicy field is set.
*/
@java.lang.Override
public boolean hasHedgePolicy() {
return hedgePolicy_ != null;
}
/**
*
* Indicates the hedge policy for all routes in this virtual host. Note that setting a
* route level entry will take precedence over this config and it'll be treated
* independently (e.g.: values are not inherited).
*
*
* .envoy.api.v2.route.HedgePolicy hedge_policy = 17;
* @return The hedgePolicy.
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.HedgePolicy getHedgePolicy() {
return hedgePolicy_ == null ? io.envoyproxy.envoy.api.v2.route.HedgePolicy.getDefaultInstance() : hedgePolicy_;
}
/**
*
* Indicates the hedge policy for all routes in this virtual host. Note that setting a
* route level entry will take precedence over this config and it'll be treated
* independently (e.g.: values are not inherited).
*
*
* .envoy.api.v2.route.HedgePolicy hedge_policy = 17;
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.HedgePolicyOrBuilder getHedgePolicyOrBuilder() {
return getHedgePolicy();
}
public static final int PER_REQUEST_BUFFER_LIMIT_BYTES_FIELD_NUMBER = 18;
private com.google.protobuf.UInt32Value perRequestBufferLimitBytes_;
/**
*
* The maximum bytes which will be buffered for retries and shadowing.
* If set and a route-specific limit is not set, the bytes actually buffered will be the minimum
* value of this and the listener per_connection_buffer_limit_bytes.
*
*
* .google.protobuf.UInt32Value per_request_buffer_limit_bytes = 18;
* @return Whether the perRequestBufferLimitBytes field is set.
*/
@java.lang.Override
public boolean hasPerRequestBufferLimitBytes() {
return perRequestBufferLimitBytes_ != null;
}
/**
*
* The maximum bytes which will be buffered for retries and shadowing.
* If set and a route-specific limit is not set, the bytes actually buffered will be the minimum
* value of this and the listener per_connection_buffer_limit_bytes.
*
*
* .google.protobuf.UInt32Value per_request_buffer_limit_bytes = 18;
* @return The perRequestBufferLimitBytes.
*/
@java.lang.Override
public com.google.protobuf.UInt32Value getPerRequestBufferLimitBytes() {
return perRequestBufferLimitBytes_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : perRequestBufferLimitBytes_;
}
/**
*
* The maximum bytes which will be buffered for retries and shadowing.
* If set and a route-specific limit is not set, the bytes actually buffered will be the minimum
* value of this and the listener per_connection_buffer_limit_bytes.
*
*
* .google.protobuf.UInt32Value per_request_buffer_limit_bytes = 18;
*/
@java.lang.Override
public com.google.protobuf.UInt32ValueOrBuilder getPerRequestBufferLimitBytesOrBuilder() {
return getPerRequestBufferLimitBytes();
}
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_);
}
for (int i = 0; i < domains_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, domains_.getRaw(i));
}
for (int i = 0; i < routes_.size(); i++) {
output.writeMessage(3, routes_.get(i));
}
if (requireTls_ != io.envoyproxy.envoy.api.v2.route.VirtualHost.TlsRequirementType.NONE.getNumber()) {
output.writeEnum(4, requireTls_);
}
for (int i = 0; i < virtualClusters_.size(); i++) {
output.writeMessage(5, virtualClusters_.get(i));
}
for (int i = 0; i < rateLimits_.size(); i++) {
output.writeMessage(6, rateLimits_.get(i));
}
for (int i = 0; i < requestHeadersToAdd_.size(); i++) {
output.writeMessage(7, requestHeadersToAdd_.get(i));
}
if (cors_ != null) {
output.writeMessage(8, getCors());
}
for (int i = 0; i < responseHeadersToAdd_.size(); i++) {
output.writeMessage(10, responseHeadersToAdd_.get(i));
}
for (int i = 0; i < responseHeadersToRemove_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 11, responseHeadersToRemove_.getRaw(i));
}
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetPerFilterConfig(),
PerFilterConfigDefaultEntryHolder.defaultEntry,
12);
for (int i = 0; i < requestHeadersToRemove_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 13, requestHeadersToRemove_.getRaw(i));
}
if (includeRequestAttemptCount_ != false) {
output.writeBool(14, includeRequestAttemptCount_);
}
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetTypedPerFilterConfig(),
TypedPerFilterConfigDefaultEntryHolder.defaultEntry,
15);
if (retryPolicy_ != null) {
output.writeMessage(16, getRetryPolicy());
}
if (hedgePolicy_ != null) {
output.writeMessage(17, getHedgePolicy());
}
if (perRequestBufferLimitBytes_ != null) {
output.writeMessage(18, getPerRequestBufferLimitBytes());
}
if (includeAttemptCountInResponse_ != false) {
output.writeBool(19, includeAttemptCountInResponse_);
}
if (retryPolicyTypedConfig_ != null) {
output.writeMessage(20, getRetryPolicyTypedConfig());
}
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_);
}
{
int dataSize = 0;
for (int i = 0; i < domains_.size(); i++) {
dataSize += computeStringSizeNoTag(domains_.getRaw(i));
}
size += dataSize;
size += 1 * getDomainsList().size();
}
for (int i = 0; i < routes_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, routes_.get(i));
}
if (requireTls_ != io.envoyproxy.envoy.api.v2.route.VirtualHost.TlsRequirementType.NONE.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(4, requireTls_);
}
for (int i = 0; i < virtualClusters_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, virtualClusters_.get(i));
}
for (int i = 0; i < rateLimits_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, rateLimits_.get(i));
}
for (int i = 0; i < requestHeadersToAdd_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, requestHeadersToAdd_.get(i));
}
if (cors_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(8, getCors());
}
for (int i = 0; i < responseHeadersToAdd_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(10, 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(12, perFilterConfig__);
}
{
int dataSize = 0;
for (int i = 0; i < requestHeadersToRemove_.size(); i++) {
dataSize += computeStringSizeNoTag(requestHeadersToRemove_.getRaw(i));
}
size += dataSize;
size += 1 * getRequestHeadersToRemoveList().size();
}
if (includeRequestAttemptCount_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(14, includeRequestAttemptCount_);
}
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(15, typedPerFilterConfig__);
}
if (retryPolicy_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(16, getRetryPolicy());
}
if (hedgePolicy_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(17, getHedgePolicy());
}
if (perRequestBufferLimitBytes_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(18, getPerRequestBufferLimitBytes());
}
if (includeAttemptCountInResponse_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(19, includeAttemptCountInResponse_);
}
if (retryPolicyTypedConfig_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(20, getRetryPolicyTypedConfig());
}
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.VirtualHost)) {
return super.equals(obj);
}
io.envoyproxy.envoy.api.v2.route.VirtualHost other = (io.envoyproxy.envoy.api.v2.route.VirtualHost) obj;
if (!getName()
.equals(other.getName())) return false;
if (!getDomainsList()
.equals(other.getDomainsList())) return false;
if (!getRoutesList()
.equals(other.getRoutesList())) return false;
if (requireTls_ != other.requireTls_) return false;
if (!getVirtualClustersList()
.equals(other.getVirtualClustersList())) return false;
if (!getRateLimitsList()
.equals(other.getRateLimitsList())) 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 (hasCors() != other.hasCors()) return false;
if (hasCors()) {
if (!getCors()
.equals(other.getCors())) return false;
}
if (!internalGetPerFilterConfig().equals(
other.internalGetPerFilterConfig())) return false;
if (!internalGetTypedPerFilterConfig().equals(
other.internalGetTypedPerFilterConfig())) return false;
if (getIncludeRequestAttemptCount()
!= other.getIncludeRequestAttemptCount()) return false;
if (getIncludeAttemptCountInResponse()
!= other.getIncludeAttemptCountInResponse()) return false;
if (hasRetryPolicy() != other.hasRetryPolicy()) return false;
if (hasRetryPolicy()) {
if (!getRetryPolicy()
.equals(other.getRetryPolicy())) return false;
}
if (hasRetryPolicyTypedConfig() != other.hasRetryPolicyTypedConfig()) return false;
if (hasRetryPolicyTypedConfig()) {
if (!getRetryPolicyTypedConfig()
.equals(other.getRetryPolicyTypedConfig())) return false;
}
if (hasHedgePolicy() != other.hasHedgePolicy()) return false;
if (hasHedgePolicy()) {
if (!getHedgePolicy()
.equals(other.getHedgePolicy())) return false;
}
if (hasPerRequestBufferLimitBytes() != other.hasPerRequestBufferLimitBytes()) return false;
if (hasPerRequestBufferLimitBytes()) {
if (!getPerRequestBufferLimitBytes()
.equals(other.getPerRequestBufferLimitBytes())) 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 (getDomainsCount() > 0) {
hash = (37 * hash) + DOMAINS_FIELD_NUMBER;
hash = (53 * hash) + getDomainsList().hashCode();
}
if (getRoutesCount() > 0) {
hash = (37 * hash) + ROUTES_FIELD_NUMBER;
hash = (53 * hash) + getRoutesList().hashCode();
}
hash = (37 * hash) + REQUIRE_TLS_FIELD_NUMBER;
hash = (53 * hash) + requireTls_;
if (getVirtualClustersCount() > 0) {
hash = (37 * hash) + VIRTUAL_CLUSTERS_FIELD_NUMBER;
hash = (53 * hash) + getVirtualClustersList().hashCode();
}
if (getRateLimitsCount() > 0) {
hash = (37 * hash) + RATE_LIMITS_FIELD_NUMBER;
hash = (53 * hash) + getRateLimitsList().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 (hasCors()) {
hash = (37 * hash) + CORS_FIELD_NUMBER;
hash = (53 * hash) + getCors().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 = (37 * hash) + INCLUDE_REQUEST_ATTEMPT_COUNT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getIncludeRequestAttemptCount());
hash = (37 * hash) + INCLUDE_ATTEMPT_COUNT_IN_RESPONSE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getIncludeAttemptCountInResponse());
if (hasRetryPolicy()) {
hash = (37 * hash) + RETRY_POLICY_FIELD_NUMBER;
hash = (53 * hash) + getRetryPolicy().hashCode();
}
if (hasRetryPolicyTypedConfig()) {
hash = (37 * hash) + RETRY_POLICY_TYPED_CONFIG_FIELD_NUMBER;
hash = (53 * hash) + getRetryPolicyTypedConfig().hashCode();
}
if (hasHedgePolicy()) {
hash = (37 * hash) + HEDGE_POLICY_FIELD_NUMBER;
hash = (53 * hash) + getHedgePolicy().hashCode();
}
if (hasPerRequestBufferLimitBytes()) {
hash = (37 * hash) + PER_REQUEST_BUFFER_LIMIT_BYTES_FIELD_NUMBER;
hash = (53 * hash) + getPerRequestBufferLimitBytes().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.api.v2.route.VirtualHost parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.api.v2.route.VirtualHost 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.VirtualHost parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.api.v2.route.VirtualHost 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.VirtualHost parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.api.v2.route.VirtualHost 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.VirtualHost 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.VirtualHost 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.VirtualHost 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.VirtualHost 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.VirtualHost 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.VirtualHost 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.VirtualHost 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;
}
/**
*
* The top level element in the routing configuration is a virtual host. Each virtual host has
* a logical name as well as a set of domains that get routed to it based on the incoming request's
* host header. This allows a single listener to service multiple top level domain path trees. Once
* a virtual host is selected based on the domain, the routes are processed in order to see which
* upstream cluster to route to or whether to perform a redirect.
* [#next-free-field: 21]
*
*
* Protobuf type {@code envoy.api.v2.route.VirtualHost}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.api.v2.route.VirtualHost)
io.envoyproxy.envoy.api.v2.route.VirtualHostOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.api.v2.route.RouteComponentsProto.internal_static_envoy_api_v2_route_VirtualHost_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 12:
return internalGetPerFilterConfig();
case 15:
return internalGetTypedPerFilterConfig();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
int number) {
switch (number) {
case 12:
return internalGetMutablePerFilterConfig();
case 15:
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_VirtualHost_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.api.v2.route.VirtualHost.class, io.envoyproxy.envoy.api.v2.route.VirtualHost.Builder.class);
}
// Construct using io.envoyproxy.envoy.api.v2.route.VirtualHost.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getRoutesFieldBuilder();
getVirtualClustersFieldBuilder();
getRateLimitsFieldBuilder();
getRequestHeadersToAddFieldBuilder();
getResponseHeadersToAddFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
name_ = "";
domains_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
if (routesBuilder_ == null) {
routes_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
} else {
routesBuilder_.clear();
}
requireTls_ = 0;
if (virtualClustersBuilder_ == null) {
virtualClusters_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
} else {
virtualClustersBuilder_.clear();
}
if (rateLimitsBuilder_ == null) {
rateLimits_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
} else {
rateLimitsBuilder_.clear();
}
if (requestHeadersToAddBuilder_ == null) {
requestHeadersToAdd_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000010);
} else {
requestHeadersToAddBuilder_.clear();
}
requestHeadersToRemove_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000020);
if (responseHeadersToAddBuilder_ == null) {
responseHeadersToAdd_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000040);
} else {
responseHeadersToAddBuilder_.clear();
}
responseHeadersToRemove_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000080);
if (corsBuilder_ == null) {
cors_ = null;
} else {
cors_ = null;
corsBuilder_ = null;
}
internalGetMutablePerFilterConfig().clear();
internalGetMutableTypedPerFilterConfig().clear();
includeRequestAttemptCount_ = false;
includeAttemptCountInResponse_ = false;
if (retryPolicyBuilder_ == null) {
retryPolicy_ = null;
} else {
retryPolicy_ = null;
retryPolicyBuilder_ = null;
}
if (retryPolicyTypedConfigBuilder_ == null) {
retryPolicyTypedConfig_ = null;
} else {
retryPolicyTypedConfig_ = null;
retryPolicyTypedConfigBuilder_ = null;
}
if (hedgePolicyBuilder_ == null) {
hedgePolicy_ = null;
} else {
hedgePolicy_ = null;
hedgePolicyBuilder_ = null;
}
if (perRequestBufferLimitBytesBuilder_ == null) {
perRequestBufferLimitBytes_ = null;
} else {
perRequestBufferLimitBytes_ = null;
perRequestBufferLimitBytesBuilder_ = null;
}
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_VirtualHost_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.VirtualHost getDefaultInstanceForType() {
return io.envoyproxy.envoy.api.v2.route.VirtualHost.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.VirtualHost build() {
io.envoyproxy.envoy.api.v2.route.VirtualHost result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.VirtualHost buildPartial() {
io.envoyproxy.envoy.api.v2.route.VirtualHost result = new io.envoyproxy.envoy.api.v2.route.VirtualHost(this);
int from_bitField0_ = bitField0_;
result.name_ = name_;
if (((bitField0_ & 0x00000001) != 0)) {
domains_ = domains_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000001);
}
result.domains_ = domains_;
if (routesBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
routes_ = java.util.Collections.unmodifiableList(routes_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.routes_ = routes_;
} else {
result.routes_ = routesBuilder_.build();
}
result.requireTls_ = requireTls_;
if (virtualClustersBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0)) {
virtualClusters_ = java.util.Collections.unmodifiableList(virtualClusters_);
bitField0_ = (bitField0_ & ~0x00000004);
}
result.virtualClusters_ = virtualClusters_;
} else {
result.virtualClusters_ = virtualClustersBuilder_.build();
}
if (rateLimitsBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0)) {
rateLimits_ = java.util.Collections.unmodifiableList(rateLimits_);
bitField0_ = (bitField0_ & ~0x00000008);
}
result.rateLimits_ = rateLimits_;
} else {
result.rateLimits_ = rateLimitsBuilder_.build();
}
if (requestHeadersToAddBuilder_ == null) {
if (((bitField0_ & 0x00000010) != 0)) {
requestHeadersToAdd_ = java.util.Collections.unmodifiableList(requestHeadersToAdd_);
bitField0_ = (bitField0_ & ~0x00000010);
}
result.requestHeadersToAdd_ = requestHeadersToAdd_;
} else {
result.requestHeadersToAdd_ = requestHeadersToAddBuilder_.build();
}
if (((bitField0_ & 0x00000020) != 0)) {
requestHeadersToRemove_ = requestHeadersToRemove_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000020);
}
result.requestHeadersToRemove_ = requestHeadersToRemove_;
if (responseHeadersToAddBuilder_ == null) {
if (((bitField0_ & 0x00000040) != 0)) {
responseHeadersToAdd_ = java.util.Collections.unmodifiableList(responseHeadersToAdd_);
bitField0_ = (bitField0_ & ~0x00000040);
}
result.responseHeadersToAdd_ = responseHeadersToAdd_;
} else {
result.responseHeadersToAdd_ = responseHeadersToAddBuilder_.build();
}
if (((bitField0_ & 0x00000080) != 0)) {
responseHeadersToRemove_ = responseHeadersToRemove_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000080);
}
result.responseHeadersToRemove_ = responseHeadersToRemove_;
if (corsBuilder_ == null) {
result.cors_ = cors_;
} else {
result.cors_ = corsBuilder_.build();
}
result.perFilterConfig_ = internalGetPerFilterConfig();
result.perFilterConfig_.makeImmutable();
result.typedPerFilterConfig_ = internalGetTypedPerFilterConfig();
result.typedPerFilterConfig_.makeImmutable();
result.includeRequestAttemptCount_ = includeRequestAttemptCount_;
result.includeAttemptCountInResponse_ = includeAttemptCountInResponse_;
if (retryPolicyBuilder_ == null) {
result.retryPolicy_ = retryPolicy_;
} else {
result.retryPolicy_ = retryPolicyBuilder_.build();
}
if (retryPolicyTypedConfigBuilder_ == null) {
result.retryPolicyTypedConfig_ = retryPolicyTypedConfig_;
} else {
result.retryPolicyTypedConfig_ = retryPolicyTypedConfigBuilder_.build();
}
if (hedgePolicyBuilder_ == null) {
result.hedgePolicy_ = hedgePolicy_;
} else {
result.hedgePolicy_ = hedgePolicyBuilder_.build();
}
if (perRequestBufferLimitBytesBuilder_ == null) {
result.perRequestBufferLimitBytes_ = perRequestBufferLimitBytes_;
} else {
result.perRequestBufferLimitBytes_ = perRequestBufferLimitBytesBuilder_.build();
}
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.VirtualHost) {
return mergeFrom((io.envoyproxy.envoy.api.v2.route.VirtualHost)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.api.v2.route.VirtualHost other) {
if (other == io.envoyproxy.envoy.api.v2.route.VirtualHost.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
onChanged();
}
if (!other.domains_.isEmpty()) {
if (domains_.isEmpty()) {
domains_ = other.domains_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureDomainsIsMutable();
domains_.addAll(other.domains_);
}
onChanged();
}
if (routesBuilder_ == null) {
if (!other.routes_.isEmpty()) {
if (routes_.isEmpty()) {
routes_ = other.routes_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureRoutesIsMutable();
routes_.addAll(other.routes_);
}
onChanged();
}
} else {
if (!other.routes_.isEmpty()) {
if (routesBuilder_.isEmpty()) {
routesBuilder_.dispose();
routesBuilder_ = null;
routes_ = other.routes_;
bitField0_ = (bitField0_ & ~0x00000002);
routesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getRoutesFieldBuilder() : null;
} else {
routesBuilder_.addAllMessages(other.routes_);
}
}
}
if (other.requireTls_ != 0) {
setRequireTlsValue(other.getRequireTlsValue());
}
if (virtualClustersBuilder_ == null) {
if (!other.virtualClusters_.isEmpty()) {
if (virtualClusters_.isEmpty()) {
virtualClusters_ = other.virtualClusters_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureVirtualClustersIsMutable();
virtualClusters_.addAll(other.virtualClusters_);
}
onChanged();
}
} else {
if (!other.virtualClusters_.isEmpty()) {
if (virtualClustersBuilder_.isEmpty()) {
virtualClustersBuilder_.dispose();
virtualClustersBuilder_ = null;
virtualClusters_ = other.virtualClusters_;
bitField0_ = (bitField0_ & ~0x00000004);
virtualClustersBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getVirtualClustersFieldBuilder() : null;
} else {
virtualClustersBuilder_.addAllMessages(other.virtualClusters_);
}
}
}
if (rateLimitsBuilder_ == null) {
if (!other.rateLimits_.isEmpty()) {
if (rateLimits_.isEmpty()) {
rateLimits_ = other.rateLimits_;
bitField0_ = (bitField0_ & ~0x00000008);
} else {
ensureRateLimitsIsMutable();
rateLimits_.addAll(other.rateLimits_);
}
onChanged();
}
} else {
if (!other.rateLimits_.isEmpty()) {
if (rateLimitsBuilder_.isEmpty()) {
rateLimitsBuilder_.dispose();
rateLimitsBuilder_ = null;
rateLimits_ = other.rateLimits_;
bitField0_ = (bitField0_ & ~0x00000008);
rateLimitsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getRateLimitsFieldBuilder() : null;
} else {
rateLimitsBuilder_.addAllMessages(other.rateLimits_);
}
}
}
if (requestHeadersToAddBuilder_ == null) {
if (!other.requestHeadersToAdd_.isEmpty()) {
if (requestHeadersToAdd_.isEmpty()) {
requestHeadersToAdd_ = other.requestHeadersToAdd_;
bitField0_ = (bitField0_ & ~0x00000010);
} else {
ensureRequestHeadersToAddIsMutable();
requestHeadersToAdd_.addAll(other.requestHeadersToAdd_);
}
onChanged();
}
} else {
if (!other.requestHeadersToAdd_.isEmpty()) {
if (requestHeadersToAddBuilder_.isEmpty()) {
requestHeadersToAddBuilder_.dispose();
requestHeadersToAddBuilder_ = null;
requestHeadersToAdd_ = other.requestHeadersToAdd_;
bitField0_ = (bitField0_ & ~0x00000010);
requestHeadersToAddBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getRequestHeadersToAddFieldBuilder() : null;
} else {
requestHeadersToAddBuilder_.addAllMessages(other.requestHeadersToAdd_);
}
}
}
if (!other.requestHeadersToRemove_.isEmpty()) {
if (requestHeadersToRemove_.isEmpty()) {
requestHeadersToRemove_ = other.requestHeadersToRemove_;
bitField0_ = (bitField0_ & ~0x00000020);
} else {
ensureRequestHeadersToRemoveIsMutable();
requestHeadersToRemove_.addAll(other.requestHeadersToRemove_);
}
onChanged();
}
if (responseHeadersToAddBuilder_ == null) {
if (!other.responseHeadersToAdd_.isEmpty()) {
if (responseHeadersToAdd_.isEmpty()) {
responseHeadersToAdd_ = other.responseHeadersToAdd_;
bitField0_ = (bitField0_ & ~0x00000040);
} else {
ensureResponseHeadersToAddIsMutable();
responseHeadersToAdd_.addAll(other.responseHeadersToAdd_);
}
onChanged();
}
} else {
if (!other.responseHeadersToAdd_.isEmpty()) {
if (responseHeadersToAddBuilder_.isEmpty()) {
responseHeadersToAddBuilder_.dispose();
responseHeadersToAddBuilder_ = null;
responseHeadersToAdd_ = other.responseHeadersToAdd_;
bitField0_ = (bitField0_ & ~0x00000040);
responseHeadersToAddBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getResponseHeadersToAddFieldBuilder() : null;
} else {
responseHeadersToAddBuilder_.addAllMessages(other.responseHeadersToAdd_);
}
}
}
if (!other.responseHeadersToRemove_.isEmpty()) {
if (responseHeadersToRemove_.isEmpty()) {
responseHeadersToRemove_ = other.responseHeadersToRemove_;
bitField0_ = (bitField0_ & ~0x00000080);
} else {
ensureResponseHeadersToRemoveIsMutable();
responseHeadersToRemove_.addAll(other.responseHeadersToRemove_);
}
onChanged();
}
if (other.hasCors()) {
mergeCors(other.getCors());
}
internalGetMutablePerFilterConfig().mergeFrom(
other.internalGetPerFilterConfig());
internalGetMutableTypedPerFilterConfig().mergeFrom(
other.internalGetTypedPerFilterConfig());
if (other.getIncludeRequestAttemptCount() != false) {
setIncludeRequestAttemptCount(other.getIncludeRequestAttemptCount());
}
if (other.getIncludeAttemptCountInResponse() != false) {
setIncludeAttemptCountInResponse(other.getIncludeAttemptCountInResponse());
}
if (other.hasRetryPolicy()) {
mergeRetryPolicy(other.getRetryPolicy());
}
if (other.hasRetryPolicyTypedConfig()) {
mergeRetryPolicyTypedConfig(other.getRetryPolicyTypedConfig());
}
if (other.hasHedgePolicy()) {
mergeHedgePolicy(other.getHedgePolicy());
}
if (other.hasPerRequestBufferLimitBytes()) {
mergePerRequestBufferLimitBytes(other.getPerRequestBufferLimitBytes());
}
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.VirtualHost parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.api.v2.route.VirtualHost) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object name_ = "";
/**
*
* The logical name of the virtual host. This is used when emitting certain
* statistics but is not relevant for routing.
*
*
* 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;
}
}
/**
*
* The logical name of the virtual host. This is used when emitting certain
* statistics but is not relevant for routing.
*
*
* 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;
}
}
/**
*
* The logical name of the virtual host. This is used when emitting certain
* statistics but is not relevant for routing.
*
*
* 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;
}
/**
*
* The logical name of the virtual host. This is used when emitting certain
* statistics but is not relevant for routing.
*
*
* string name = 1 [(.validate.rules) = { ... }
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
*
* The logical name of the virtual host. This is used when emitting certain
* statistics but is not relevant for routing.
*
*
* 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.LazyStringList domains_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureDomainsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
domains_ = new com.google.protobuf.LazyStringArrayList(domains_);
bitField0_ |= 0x00000001;
}
}
/**
*
* A list of domains (host/authority header) that will be matched to this
* virtual host. Wildcard hosts are supported in the suffix or prefix form.
* Domain search order:
* 1. Exact domain names: ``www.foo.com``.
* 2. Suffix domain wildcards: ``*.foo.com`` or ``*-bar.foo.com``.
* 3. Prefix domain wildcards: ``foo.*`` or ``foo-*``.
* 4. Special wildcard ``*`` matching any domain.
* .. note::
* The wildcard will not match the empty string.
* e.g. ``*-bar.foo.com`` will match ``baz-bar.foo.com`` but not ``-bar.foo.com``.
* The longest wildcards match first.
* Only a single virtual host in the entire route configuration can match on ``*``. A domain
* must be unique across all virtual hosts or the config will fail to load.
* Domains cannot contain control characters. This is validated by the well_known_regex HTTP_HEADER_VALUE.
*
*
* repeated string domains = 2 [(.validate.rules) = { ... }
* @return A list containing the domains.
*/
public com.google.protobuf.ProtocolStringList
getDomainsList() {
return domains_.getUnmodifiableView();
}
/**
*
* A list of domains (host/authority header) that will be matched to this
* virtual host. Wildcard hosts are supported in the suffix or prefix form.
* Domain search order:
* 1. Exact domain names: ``www.foo.com``.
* 2. Suffix domain wildcards: ``*.foo.com`` or ``*-bar.foo.com``.
* 3. Prefix domain wildcards: ``foo.*`` or ``foo-*``.
* 4. Special wildcard ``*`` matching any domain.
* .. note::
* The wildcard will not match the empty string.
* e.g. ``*-bar.foo.com`` will match ``baz-bar.foo.com`` but not ``-bar.foo.com``.
* The longest wildcards match first.
* Only a single virtual host in the entire route configuration can match on ``*``. A domain
* must be unique across all virtual hosts or the config will fail to load.
* Domains cannot contain control characters. This is validated by the well_known_regex HTTP_HEADER_VALUE.
*
*
* repeated string domains = 2 [(.validate.rules) = { ... }
* @return The count of domains.
*/
public int getDomainsCount() {
return domains_.size();
}
/**
*
* A list of domains (host/authority header) that will be matched to this
* virtual host. Wildcard hosts are supported in the suffix or prefix form.
* Domain search order:
* 1. Exact domain names: ``www.foo.com``.
* 2. Suffix domain wildcards: ``*.foo.com`` or ``*-bar.foo.com``.
* 3. Prefix domain wildcards: ``foo.*`` or ``foo-*``.
* 4. Special wildcard ``*`` matching any domain.
* .. note::
* The wildcard will not match the empty string.
* e.g. ``*-bar.foo.com`` will match ``baz-bar.foo.com`` but not ``-bar.foo.com``.
* The longest wildcards match first.
* Only a single virtual host in the entire route configuration can match on ``*``. A domain
* must be unique across all virtual hosts or the config will fail to load.
* Domains cannot contain control characters. This is validated by the well_known_regex HTTP_HEADER_VALUE.
*
*
* repeated string domains = 2 [(.validate.rules) = { ... }
* @param index The index of the element to return.
* @return The domains at the given index.
*/
public java.lang.String getDomains(int index) {
return domains_.get(index);
}
/**
*
* A list of domains (host/authority header) that will be matched to this
* virtual host. Wildcard hosts are supported in the suffix or prefix form.
* Domain search order:
* 1. Exact domain names: ``www.foo.com``.
* 2. Suffix domain wildcards: ``*.foo.com`` or ``*-bar.foo.com``.
* 3. Prefix domain wildcards: ``foo.*`` or ``foo-*``.
* 4. Special wildcard ``*`` matching any domain.
* .. note::
* The wildcard will not match the empty string.
* e.g. ``*-bar.foo.com`` will match ``baz-bar.foo.com`` but not ``-bar.foo.com``.
* The longest wildcards match first.
* Only a single virtual host in the entire route configuration can match on ``*``. A domain
* must be unique across all virtual hosts or the config will fail to load.
* Domains cannot contain control characters. This is validated by the well_known_regex HTTP_HEADER_VALUE.
*
*
* repeated string domains = 2 [(.validate.rules) = { ... }
* @param index The index of the value to return.
* @return The bytes of the domains at the given index.
*/
public com.google.protobuf.ByteString
getDomainsBytes(int index) {
return domains_.getByteString(index);
}
/**
*
* A list of domains (host/authority header) that will be matched to this
* virtual host. Wildcard hosts are supported in the suffix or prefix form.
* Domain search order:
* 1. Exact domain names: ``www.foo.com``.
* 2. Suffix domain wildcards: ``*.foo.com`` or ``*-bar.foo.com``.
* 3. Prefix domain wildcards: ``foo.*`` or ``foo-*``.
* 4. Special wildcard ``*`` matching any domain.
* .. note::
* The wildcard will not match the empty string.
* e.g. ``*-bar.foo.com`` will match ``baz-bar.foo.com`` but not ``-bar.foo.com``.
* The longest wildcards match first.
* Only a single virtual host in the entire route configuration can match on ``*``. A domain
* must be unique across all virtual hosts or the config will fail to load.
* Domains cannot contain control characters. This is validated by the well_known_regex HTTP_HEADER_VALUE.
*
*
* repeated string domains = 2 [(.validate.rules) = { ... }
* @param index The index to set the value at.
* @param value The domains to set.
* @return This builder for chaining.
*/
public Builder setDomains(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureDomainsIsMutable();
domains_.set(index, value);
onChanged();
return this;
}
/**
*
* A list of domains (host/authority header) that will be matched to this
* virtual host. Wildcard hosts are supported in the suffix or prefix form.
* Domain search order:
* 1. Exact domain names: ``www.foo.com``.
* 2. Suffix domain wildcards: ``*.foo.com`` or ``*-bar.foo.com``.
* 3. Prefix domain wildcards: ``foo.*`` or ``foo-*``.
* 4. Special wildcard ``*`` matching any domain.
* .. note::
* The wildcard will not match the empty string.
* e.g. ``*-bar.foo.com`` will match ``baz-bar.foo.com`` but not ``-bar.foo.com``.
* The longest wildcards match first.
* Only a single virtual host in the entire route configuration can match on ``*``. A domain
* must be unique across all virtual hosts or the config will fail to load.
* Domains cannot contain control characters. This is validated by the well_known_regex HTTP_HEADER_VALUE.
*
*
* repeated string domains = 2 [(.validate.rules) = { ... }
* @param value The domains to add.
* @return This builder for chaining.
*/
public Builder addDomains(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureDomainsIsMutable();
domains_.add(value);
onChanged();
return this;
}
/**
*
* A list of domains (host/authority header) that will be matched to this
* virtual host. Wildcard hosts are supported in the suffix or prefix form.
* Domain search order:
* 1. Exact domain names: ``www.foo.com``.
* 2. Suffix domain wildcards: ``*.foo.com`` or ``*-bar.foo.com``.
* 3. Prefix domain wildcards: ``foo.*`` or ``foo-*``.
* 4. Special wildcard ``*`` matching any domain.
* .. note::
* The wildcard will not match the empty string.
* e.g. ``*-bar.foo.com`` will match ``baz-bar.foo.com`` but not ``-bar.foo.com``.
* The longest wildcards match first.
* Only a single virtual host in the entire route configuration can match on ``*``. A domain
* must be unique across all virtual hosts or the config will fail to load.
* Domains cannot contain control characters. This is validated by the well_known_regex HTTP_HEADER_VALUE.
*
*
* repeated string domains = 2 [(.validate.rules) = { ... }
* @param values The domains to add.
* @return This builder for chaining.
*/
public Builder addAllDomains(
java.lang.Iterable values) {
ensureDomainsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, domains_);
onChanged();
return this;
}
/**
*
* A list of domains (host/authority header) that will be matched to this
* virtual host. Wildcard hosts are supported in the suffix or prefix form.
* Domain search order:
* 1. Exact domain names: ``www.foo.com``.
* 2. Suffix domain wildcards: ``*.foo.com`` or ``*-bar.foo.com``.
* 3. Prefix domain wildcards: ``foo.*`` or ``foo-*``.
* 4. Special wildcard ``*`` matching any domain.
* .. note::
* The wildcard will not match the empty string.
* e.g. ``*-bar.foo.com`` will match ``baz-bar.foo.com`` but not ``-bar.foo.com``.
* The longest wildcards match first.
* Only a single virtual host in the entire route configuration can match on ``*``. A domain
* must be unique across all virtual hosts or the config will fail to load.
* Domains cannot contain control characters. This is validated by the well_known_regex HTTP_HEADER_VALUE.
*
*
* repeated string domains = 2 [(.validate.rules) = { ... }
* @return This builder for chaining.
*/
public Builder clearDomains() {
domains_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* A list of domains (host/authority header) that will be matched to this
* virtual host. Wildcard hosts are supported in the suffix or prefix form.
* Domain search order:
* 1. Exact domain names: ``www.foo.com``.
* 2. Suffix domain wildcards: ``*.foo.com`` or ``*-bar.foo.com``.
* 3. Prefix domain wildcards: ``foo.*`` or ``foo-*``.
* 4. Special wildcard ``*`` matching any domain.
* .. note::
* The wildcard will not match the empty string.
* e.g. ``*-bar.foo.com`` will match ``baz-bar.foo.com`` but not ``-bar.foo.com``.
* The longest wildcards match first.
* Only a single virtual host in the entire route configuration can match on ``*``. A domain
* must be unique across all virtual hosts or the config will fail to load.
* Domains cannot contain control characters. This is validated by the well_known_regex HTTP_HEADER_VALUE.
*
*
* repeated string domains = 2 [(.validate.rules) = { ... }
* @param value The bytes of the domains to add.
* @return This builder for chaining.
*/
public Builder addDomainsBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureDomainsIsMutable();
domains_.add(value);
onChanged();
return this;
}
private java.util.List routes_ =
java.util.Collections.emptyList();
private void ensureRoutesIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
routes_ = new java.util.ArrayList(routes_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.api.v2.route.Route, io.envoyproxy.envoy.api.v2.route.Route.Builder, io.envoyproxy.envoy.api.v2.route.RouteOrBuilder> routesBuilder_;
/**
*
* The list of routes that will be matched, in order, for incoming requests.
* The first route that matches will be used.
*
*
* repeated .envoy.api.v2.route.Route routes = 3;
*/
public java.util.List getRoutesList() {
if (routesBuilder_ == null) {
return java.util.Collections.unmodifiableList(routes_);
} else {
return routesBuilder_.getMessageList();
}
}
/**
*
* The list of routes that will be matched, in order, for incoming requests.
* The first route that matches will be used.
*
*
* repeated .envoy.api.v2.route.Route routes = 3;
*/
public int getRoutesCount() {
if (routesBuilder_ == null) {
return routes_.size();
} else {
return routesBuilder_.getCount();
}
}
/**
*
* The list of routes that will be matched, in order, for incoming requests.
* The first route that matches will be used.
*
*
* repeated .envoy.api.v2.route.Route routes = 3;
*/
public io.envoyproxy.envoy.api.v2.route.Route getRoutes(int index) {
if (routesBuilder_ == null) {
return routes_.get(index);
} else {
return routesBuilder_.getMessage(index);
}
}
/**
*
* The list of routes that will be matched, in order, for incoming requests.
* The first route that matches will be used.
*
*
* repeated .envoy.api.v2.route.Route routes = 3;
*/
public Builder setRoutes(
int index, io.envoyproxy.envoy.api.v2.route.Route value) {
if (routesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRoutesIsMutable();
routes_.set(index, value);
onChanged();
} else {
routesBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* The list of routes that will be matched, in order, for incoming requests.
* The first route that matches will be used.
*
*
* repeated .envoy.api.v2.route.Route routes = 3;
*/
public Builder setRoutes(
int index, io.envoyproxy.envoy.api.v2.route.Route.Builder builderForValue) {
if (routesBuilder_ == null) {
ensureRoutesIsMutable();
routes_.set(index, builderForValue.build());
onChanged();
} else {
routesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* The list of routes that will be matched, in order, for incoming requests.
* The first route that matches will be used.
*
*
* repeated .envoy.api.v2.route.Route routes = 3;
*/
public Builder addRoutes(io.envoyproxy.envoy.api.v2.route.Route value) {
if (routesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRoutesIsMutable();
routes_.add(value);
onChanged();
} else {
routesBuilder_.addMessage(value);
}
return this;
}
/**
*
* The list of routes that will be matched, in order, for incoming requests.
* The first route that matches will be used.
*
*
* repeated .envoy.api.v2.route.Route routes = 3;
*/
public Builder addRoutes(
int index, io.envoyproxy.envoy.api.v2.route.Route value) {
if (routesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRoutesIsMutable();
routes_.add(index, value);
onChanged();
} else {
routesBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* The list of routes that will be matched, in order, for incoming requests.
* The first route that matches will be used.
*
*
* repeated .envoy.api.v2.route.Route routes = 3;
*/
public Builder addRoutes(
io.envoyproxy.envoy.api.v2.route.Route.Builder builderForValue) {
if (routesBuilder_ == null) {
ensureRoutesIsMutable();
routes_.add(builderForValue.build());
onChanged();
} else {
routesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* The list of routes that will be matched, in order, for incoming requests.
* The first route that matches will be used.
*
*
* repeated .envoy.api.v2.route.Route routes = 3;
*/
public Builder addRoutes(
int index, io.envoyproxy.envoy.api.v2.route.Route.Builder builderForValue) {
if (routesBuilder_ == null) {
ensureRoutesIsMutable();
routes_.add(index, builderForValue.build());
onChanged();
} else {
routesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* The list of routes that will be matched, in order, for incoming requests.
* The first route that matches will be used.
*
*
* repeated .envoy.api.v2.route.Route routes = 3;
*/
public Builder addAllRoutes(
java.lang.Iterable extends io.envoyproxy.envoy.api.v2.route.Route> values) {
if (routesBuilder_ == null) {
ensureRoutesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, routes_);
onChanged();
} else {
routesBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* The list of routes that will be matched, in order, for incoming requests.
* The first route that matches will be used.
*
*
* repeated .envoy.api.v2.route.Route routes = 3;
*/
public Builder clearRoutes() {
if (routesBuilder_ == null) {
routes_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
routesBuilder_.clear();
}
return this;
}
/**
*
* The list of routes that will be matched, in order, for incoming requests.
* The first route that matches will be used.
*
*
* repeated .envoy.api.v2.route.Route routes = 3;
*/
public Builder removeRoutes(int index) {
if (routesBuilder_ == null) {
ensureRoutesIsMutable();
routes_.remove(index);
onChanged();
} else {
routesBuilder_.remove(index);
}
return this;
}
/**
*
* The list of routes that will be matched, in order, for incoming requests.
* The first route that matches will be used.
*
*
* repeated .envoy.api.v2.route.Route routes = 3;
*/
public io.envoyproxy.envoy.api.v2.route.Route.Builder getRoutesBuilder(
int index) {
return getRoutesFieldBuilder().getBuilder(index);
}
/**
*
* The list of routes that will be matched, in order, for incoming requests.
* The first route that matches will be used.
*
*
* repeated .envoy.api.v2.route.Route routes = 3;
*/
public io.envoyproxy.envoy.api.v2.route.RouteOrBuilder getRoutesOrBuilder(
int index) {
if (routesBuilder_ == null) {
return routes_.get(index); } else {
return routesBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* The list of routes that will be matched, in order, for incoming requests.
* The first route that matches will be used.
*
*
* repeated .envoy.api.v2.route.Route routes = 3;
*/
public java.util.List extends io.envoyproxy.envoy.api.v2.route.RouteOrBuilder>
getRoutesOrBuilderList() {
if (routesBuilder_ != null) {
return routesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(routes_);
}
}
/**
*
* The list of routes that will be matched, in order, for incoming requests.
* The first route that matches will be used.
*
*
* repeated .envoy.api.v2.route.Route routes = 3;
*/
public io.envoyproxy.envoy.api.v2.route.Route.Builder addRoutesBuilder() {
return getRoutesFieldBuilder().addBuilder(
io.envoyproxy.envoy.api.v2.route.Route.getDefaultInstance());
}
/**
*
* The list of routes that will be matched, in order, for incoming requests.
* The first route that matches will be used.
*
*
* repeated .envoy.api.v2.route.Route routes = 3;
*/
public io.envoyproxy.envoy.api.v2.route.Route.Builder addRoutesBuilder(
int index) {
return getRoutesFieldBuilder().addBuilder(
index, io.envoyproxy.envoy.api.v2.route.Route.getDefaultInstance());
}
/**
*
* The list of routes that will be matched, in order, for incoming requests.
* The first route that matches will be used.
*
*
* repeated .envoy.api.v2.route.Route routes = 3;
*/
public java.util.List
getRoutesBuilderList() {
return getRoutesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.api.v2.route.Route, io.envoyproxy.envoy.api.v2.route.Route.Builder, io.envoyproxy.envoy.api.v2.route.RouteOrBuilder>
getRoutesFieldBuilder() {
if (routesBuilder_ == null) {
routesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.api.v2.route.Route, io.envoyproxy.envoy.api.v2.route.Route.Builder, io.envoyproxy.envoy.api.v2.route.RouteOrBuilder>(
routes_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
routes_ = null;
}
return routesBuilder_;
}
private int requireTls_ = 0;
/**
*
* Specifies the type of TLS enforcement the virtual host expects. If this option is not
* specified, there is no TLS requirement for the virtual host.
*
*
* .envoy.api.v2.route.VirtualHost.TlsRequirementType require_tls = 4 [(.validate.rules) = { ... }
* @return The enum numeric value on the wire for requireTls.
*/
@java.lang.Override public int getRequireTlsValue() {
return requireTls_;
}
/**
*
* Specifies the type of TLS enforcement the virtual host expects. If this option is not
* specified, there is no TLS requirement for the virtual host.
*
*
* .envoy.api.v2.route.VirtualHost.TlsRequirementType require_tls = 4 [(.validate.rules) = { ... }
* @param value The enum numeric value on the wire for requireTls to set.
* @return This builder for chaining.
*/
public Builder setRequireTlsValue(int value) {
requireTls_ = value;
onChanged();
return this;
}
/**
*
* Specifies the type of TLS enforcement the virtual host expects. If this option is not
* specified, there is no TLS requirement for the virtual host.
*
*
* .envoy.api.v2.route.VirtualHost.TlsRequirementType require_tls = 4 [(.validate.rules) = { ... }
* @return The requireTls.
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.VirtualHost.TlsRequirementType getRequireTls() {
@SuppressWarnings("deprecation")
io.envoyproxy.envoy.api.v2.route.VirtualHost.TlsRequirementType result = io.envoyproxy.envoy.api.v2.route.VirtualHost.TlsRequirementType.valueOf(requireTls_);
return result == null ? io.envoyproxy.envoy.api.v2.route.VirtualHost.TlsRequirementType.UNRECOGNIZED : result;
}
/**
*
* Specifies the type of TLS enforcement the virtual host expects. If this option is not
* specified, there is no TLS requirement for the virtual host.
*
*
* .envoy.api.v2.route.VirtualHost.TlsRequirementType require_tls = 4 [(.validate.rules) = { ... }
* @param value The requireTls to set.
* @return This builder for chaining.
*/
public Builder setRequireTls(io.envoyproxy.envoy.api.v2.route.VirtualHost.TlsRequirementType value) {
if (value == null) {
throw new NullPointerException();
}
requireTls_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Specifies the type of TLS enforcement the virtual host expects. If this option is not
* specified, there is no TLS requirement for the virtual host.
*
*
* .envoy.api.v2.route.VirtualHost.TlsRequirementType require_tls = 4 [(.validate.rules) = { ... }
* @return This builder for chaining.
*/
public Builder clearRequireTls() {
requireTls_ = 0;
onChanged();
return this;
}
private java.util.List virtualClusters_ =
java.util.Collections.emptyList();
private void ensureVirtualClustersIsMutable() {
if (!((bitField0_ & 0x00000004) != 0)) {
virtualClusters_ = new java.util.ArrayList(virtualClusters_);
bitField0_ |= 0x00000004;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.api.v2.route.VirtualCluster, io.envoyproxy.envoy.api.v2.route.VirtualCluster.Builder, io.envoyproxy.envoy.api.v2.route.VirtualClusterOrBuilder> virtualClustersBuilder_;
/**
*
* A list of virtual clusters defined for this virtual host. Virtual clusters
* are used for additional statistics gathering.
*
*
* repeated .envoy.api.v2.route.VirtualCluster virtual_clusters = 5;
*/
public java.util.List getVirtualClustersList() {
if (virtualClustersBuilder_ == null) {
return java.util.Collections.unmodifiableList(virtualClusters_);
} else {
return virtualClustersBuilder_.getMessageList();
}
}
/**
*
* A list of virtual clusters defined for this virtual host. Virtual clusters
* are used for additional statistics gathering.
*
*
* repeated .envoy.api.v2.route.VirtualCluster virtual_clusters = 5;
*/
public int getVirtualClustersCount() {
if (virtualClustersBuilder_ == null) {
return virtualClusters_.size();
} else {
return virtualClustersBuilder_.getCount();
}
}
/**
*
* A list of virtual clusters defined for this virtual host. Virtual clusters
* are used for additional statistics gathering.
*
*
* repeated .envoy.api.v2.route.VirtualCluster virtual_clusters = 5;
*/
public io.envoyproxy.envoy.api.v2.route.VirtualCluster getVirtualClusters(int index) {
if (virtualClustersBuilder_ == null) {
return virtualClusters_.get(index);
} else {
return virtualClustersBuilder_.getMessage(index);
}
}
/**
*
* A list of virtual clusters defined for this virtual host. Virtual clusters
* are used for additional statistics gathering.
*
*
* repeated .envoy.api.v2.route.VirtualCluster virtual_clusters = 5;
*/
public Builder setVirtualClusters(
int index, io.envoyproxy.envoy.api.v2.route.VirtualCluster value) {
if (virtualClustersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureVirtualClustersIsMutable();
virtualClusters_.set(index, value);
onChanged();
} else {
virtualClustersBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* A list of virtual clusters defined for this virtual host. Virtual clusters
* are used for additional statistics gathering.
*
*
* repeated .envoy.api.v2.route.VirtualCluster virtual_clusters = 5;
*/
public Builder setVirtualClusters(
int index, io.envoyproxy.envoy.api.v2.route.VirtualCluster.Builder builderForValue) {
if (virtualClustersBuilder_ == null) {
ensureVirtualClustersIsMutable();
virtualClusters_.set(index, builderForValue.build());
onChanged();
} else {
virtualClustersBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* A list of virtual clusters defined for this virtual host. Virtual clusters
* are used for additional statistics gathering.
*
*
* repeated .envoy.api.v2.route.VirtualCluster virtual_clusters = 5;
*/
public Builder addVirtualClusters(io.envoyproxy.envoy.api.v2.route.VirtualCluster value) {
if (virtualClustersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureVirtualClustersIsMutable();
virtualClusters_.add(value);
onChanged();
} else {
virtualClustersBuilder_.addMessage(value);
}
return this;
}
/**
*
* A list of virtual clusters defined for this virtual host. Virtual clusters
* are used for additional statistics gathering.
*
*
* repeated .envoy.api.v2.route.VirtualCluster virtual_clusters = 5;
*/
public Builder addVirtualClusters(
int index, io.envoyproxy.envoy.api.v2.route.VirtualCluster value) {
if (virtualClustersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureVirtualClustersIsMutable();
virtualClusters_.add(index, value);
onChanged();
} else {
virtualClustersBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* A list of virtual clusters defined for this virtual host. Virtual clusters
* are used for additional statistics gathering.
*
*
* repeated .envoy.api.v2.route.VirtualCluster virtual_clusters = 5;
*/
public Builder addVirtualClusters(
io.envoyproxy.envoy.api.v2.route.VirtualCluster.Builder builderForValue) {
if (virtualClustersBuilder_ == null) {
ensureVirtualClustersIsMutable();
virtualClusters_.add(builderForValue.build());
onChanged();
} else {
virtualClustersBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* A list of virtual clusters defined for this virtual host. Virtual clusters
* are used for additional statistics gathering.
*
*
* repeated .envoy.api.v2.route.VirtualCluster virtual_clusters = 5;
*/
public Builder addVirtualClusters(
int index, io.envoyproxy.envoy.api.v2.route.VirtualCluster.Builder builderForValue) {
if (virtualClustersBuilder_ == null) {
ensureVirtualClustersIsMutable();
virtualClusters_.add(index, builderForValue.build());
onChanged();
} else {
virtualClustersBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* A list of virtual clusters defined for this virtual host. Virtual clusters
* are used for additional statistics gathering.
*
*
* repeated .envoy.api.v2.route.VirtualCluster virtual_clusters = 5;
*/
public Builder addAllVirtualClusters(
java.lang.Iterable extends io.envoyproxy.envoy.api.v2.route.VirtualCluster> values) {
if (virtualClustersBuilder_ == null) {
ensureVirtualClustersIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, virtualClusters_);
onChanged();
} else {
virtualClustersBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* A list of virtual clusters defined for this virtual host. Virtual clusters
* are used for additional statistics gathering.
*
*
* repeated .envoy.api.v2.route.VirtualCluster virtual_clusters = 5;
*/
public Builder clearVirtualClusters() {
if (virtualClustersBuilder_ == null) {
virtualClusters_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
} else {
virtualClustersBuilder_.clear();
}
return this;
}
/**
*
* A list of virtual clusters defined for this virtual host. Virtual clusters
* are used for additional statistics gathering.
*
*
* repeated .envoy.api.v2.route.VirtualCluster virtual_clusters = 5;
*/
public Builder removeVirtualClusters(int index) {
if (virtualClustersBuilder_ == null) {
ensureVirtualClustersIsMutable();
virtualClusters_.remove(index);
onChanged();
} else {
virtualClustersBuilder_.remove(index);
}
return this;
}
/**
*
* A list of virtual clusters defined for this virtual host. Virtual clusters
* are used for additional statistics gathering.
*
*
* repeated .envoy.api.v2.route.VirtualCluster virtual_clusters = 5;
*/
public io.envoyproxy.envoy.api.v2.route.VirtualCluster.Builder getVirtualClustersBuilder(
int index) {
return getVirtualClustersFieldBuilder().getBuilder(index);
}
/**
*
* A list of virtual clusters defined for this virtual host. Virtual clusters
* are used for additional statistics gathering.
*
*
* repeated .envoy.api.v2.route.VirtualCluster virtual_clusters = 5;
*/
public io.envoyproxy.envoy.api.v2.route.VirtualClusterOrBuilder getVirtualClustersOrBuilder(
int index) {
if (virtualClustersBuilder_ == null) {
return virtualClusters_.get(index); } else {
return virtualClustersBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* A list of virtual clusters defined for this virtual host. Virtual clusters
* are used for additional statistics gathering.
*
*
* repeated .envoy.api.v2.route.VirtualCluster virtual_clusters = 5;
*/
public java.util.List extends io.envoyproxy.envoy.api.v2.route.VirtualClusterOrBuilder>
getVirtualClustersOrBuilderList() {
if (virtualClustersBuilder_ != null) {
return virtualClustersBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(virtualClusters_);
}
}
/**
*
* A list of virtual clusters defined for this virtual host. Virtual clusters
* are used for additional statistics gathering.
*
*
* repeated .envoy.api.v2.route.VirtualCluster virtual_clusters = 5;
*/
public io.envoyproxy.envoy.api.v2.route.VirtualCluster.Builder addVirtualClustersBuilder() {
return getVirtualClustersFieldBuilder().addBuilder(
io.envoyproxy.envoy.api.v2.route.VirtualCluster.getDefaultInstance());
}
/**
*
* A list of virtual clusters defined for this virtual host. Virtual clusters
* are used for additional statistics gathering.
*
*
* repeated .envoy.api.v2.route.VirtualCluster virtual_clusters = 5;
*/
public io.envoyproxy.envoy.api.v2.route.VirtualCluster.Builder addVirtualClustersBuilder(
int index) {
return getVirtualClustersFieldBuilder().addBuilder(
index, io.envoyproxy.envoy.api.v2.route.VirtualCluster.getDefaultInstance());
}
/**
*
* A list of virtual clusters defined for this virtual host. Virtual clusters
* are used for additional statistics gathering.
*
*
* repeated .envoy.api.v2.route.VirtualCluster virtual_clusters = 5;
*/
public java.util.List
getVirtualClustersBuilderList() {
return getVirtualClustersFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.api.v2.route.VirtualCluster, io.envoyproxy.envoy.api.v2.route.VirtualCluster.Builder, io.envoyproxy.envoy.api.v2.route.VirtualClusterOrBuilder>
getVirtualClustersFieldBuilder() {
if (virtualClustersBuilder_ == null) {
virtualClustersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.api.v2.route.VirtualCluster, io.envoyproxy.envoy.api.v2.route.VirtualCluster.Builder, io.envoyproxy.envoy.api.v2.route.VirtualClusterOrBuilder>(
virtualClusters_,
((bitField0_ & 0x00000004) != 0),
getParentForChildren(),
isClean());
virtualClusters_ = null;
}
return virtualClustersBuilder_;
}
private java.util.List rateLimits_ =
java.util.Collections.emptyList();
private void ensureRateLimitsIsMutable() {
if (!((bitField0_ & 0x00000008) != 0)) {
rateLimits_ = new java.util.ArrayList(rateLimits_);
bitField0_ |= 0x00000008;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.api.v2.route.RateLimit, io.envoyproxy.envoy.api.v2.route.RateLimit.Builder, io.envoyproxy.envoy.api.v2.route.RateLimitOrBuilder> rateLimitsBuilder_;
/**
*
* Specifies a set of rate limit configurations that will be applied to the
* virtual host.
*
*
* repeated .envoy.api.v2.route.RateLimit rate_limits = 6;
*/
public java.util.List getRateLimitsList() {
if (rateLimitsBuilder_ == null) {
return java.util.Collections.unmodifiableList(rateLimits_);
} else {
return rateLimitsBuilder_.getMessageList();
}
}
/**
*
* Specifies a set of rate limit configurations that will be applied to the
* virtual host.
*
*
* repeated .envoy.api.v2.route.RateLimit rate_limits = 6;
*/
public int getRateLimitsCount() {
if (rateLimitsBuilder_ == null) {
return rateLimits_.size();
} else {
return rateLimitsBuilder_.getCount();
}
}
/**
*
* Specifies a set of rate limit configurations that will be applied to the
* virtual host.
*
*
* repeated .envoy.api.v2.route.RateLimit rate_limits = 6;
*/
public io.envoyproxy.envoy.api.v2.route.RateLimit getRateLimits(int index) {
if (rateLimitsBuilder_ == null) {
return rateLimits_.get(index);
} else {
return rateLimitsBuilder_.getMessage(index);
}
}
/**
*
* Specifies a set of rate limit configurations that will be applied to the
* virtual host.
*
*
* repeated .envoy.api.v2.route.RateLimit rate_limits = 6;
*/
public Builder setRateLimits(
int index, io.envoyproxy.envoy.api.v2.route.RateLimit value) {
if (rateLimitsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRateLimitsIsMutable();
rateLimits_.set(index, value);
onChanged();
} else {
rateLimitsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Specifies a set of rate limit configurations that will be applied to the
* virtual host.
*
*
* repeated .envoy.api.v2.route.RateLimit rate_limits = 6;
*/
public Builder setRateLimits(
int index, io.envoyproxy.envoy.api.v2.route.RateLimit.Builder builderForValue) {
if (rateLimitsBuilder_ == null) {
ensureRateLimitsIsMutable();
rateLimits_.set(index, builderForValue.build());
onChanged();
} else {
rateLimitsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Specifies a set of rate limit configurations that will be applied to the
* virtual host.
*
*
* repeated .envoy.api.v2.route.RateLimit rate_limits = 6;
*/
public Builder addRateLimits(io.envoyproxy.envoy.api.v2.route.RateLimit value) {
if (rateLimitsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRateLimitsIsMutable();
rateLimits_.add(value);
onChanged();
} else {
rateLimitsBuilder_.addMessage(value);
}
return this;
}
/**
*
* Specifies a set of rate limit configurations that will be applied to the
* virtual host.
*
*
* repeated .envoy.api.v2.route.RateLimit rate_limits = 6;
*/
public Builder addRateLimits(
int index, io.envoyproxy.envoy.api.v2.route.RateLimit value) {
if (rateLimitsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRateLimitsIsMutable();
rateLimits_.add(index, value);
onChanged();
} else {
rateLimitsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Specifies a set of rate limit configurations that will be applied to the
* virtual host.
*
*
* repeated .envoy.api.v2.route.RateLimit rate_limits = 6;
*/
public Builder addRateLimits(
io.envoyproxy.envoy.api.v2.route.RateLimit.Builder builderForValue) {
if (rateLimitsBuilder_ == null) {
ensureRateLimitsIsMutable();
rateLimits_.add(builderForValue.build());
onChanged();
} else {
rateLimitsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Specifies a set of rate limit configurations that will be applied to the
* virtual host.
*
*
* repeated .envoy.api.v2.route.RateLimit rate_limits = 6;
*/
public Builder addRateLimits(
int index, io.envoyproxy.envoy.api.v2.route.RateLimit.Builder builderForValue) {
if (rateLimitsBuilder_ == null) {
ensureRateLimitsIsMutable();
rateLimits_.add(index, builderForValue.build());
onChanged();
} else {
rateLimitsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Specifies a set of rate limit configurations that will be applied to the
* virtual host.
*
*
* repeated .envoy.api.v2.route.RateLimit rate_limits = 6;
*/
public Builder addAllRateLimits(
java.lang.Iterable extends io.envoyproxy.envoy.api.v2.route.RateLimit> values) {
if (rateLimitsBuilder_ == null) {
ensureRateLimitsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, rateLimits_);
onChanged();
} else {
rateLimitsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Specifies a set of rate limit configurations that will be applied to the
* virtual host.
*
*
* repeated .envoy.api.v2.route.RateLimit rate_limits = 6;
*/
public Builder clearRateLimits() {
if (rateLimitsBuilder_ == null) {
rateLimits_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
} else {
rateLimitsBuilder_.clear();
}
return this;
}
/**
*
* Specifies a set of rate limit configurations that will be applied to the
* virtual host.
*
*
* repeated .envoy.api.v2.route.RateLimit rate_limits = 6;
*/
public Builder removeRateLimits(int index) {
if (rateLimitsBuilder_ == null) {
ensureRateLimitsIsMutable();
rateLimits_.remove(index);
onChanged();
} else {
rateLimitsBuilder_.remove(index);
}
return this;
}
/**
*
* Specifies a set of rate limit configurations that will be applied to the
* virtual host.
*
*
* repeated .envoy.api.v2.route.RateLimit rate_limits = 6;
*/
public io.envoyproxy.envoy.api.v2.route.RateLimit.Builder getRateLimitsBuilder(
int index) {
return getRateLimitsFieldBuilder().getBuilder(index);
}
/**
*
* Specifies a set of rate limit configurations that will be applied to the
* virtual host.
*
*
* repeated .envoy.api.v2.route.RateLimit rate_limits = 6;
*/
public io.envoyproxy.envoy.api.v2.route.RateLimitOrBuilder getRateLimitsOrBuilder(
int index) {
if (rateLimitsBuilder_ == null) {
return rateLimits_.get(index); } else {
return rateLimitsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Specifies a set of rate limit configurations that will be applied to the
* virtual host.
*
*
* repeated .envoy.api.v2.route.RateLimit rate_limits = 6;
*/
public java.util.List extends io.envoyproxy.envoy.api.v2.route.RateLimitOrBuilder>
getRateLimitsOrBuilderList() {
if (rateLimitsBuilder_ != null) {
return rateLimitsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(rateLimits_);
}
}
/**
*
* Specifies a set of rate limit configurations that will be applied to the
* virtual host.
*
*
* repeated .envoy.api.v2.route.RateLimit rate_limits = 6;
*/
public io.envoyproxy.envoy.api.v2.route.RateLimit.Builder addRateLimitsBuilder() {
return getRateLimitsFieldBuilder().addBuilder(
io.envoyproxy.envoy.api.v2.route.RateLimit.getDefaultInstance());
}
/**
*
* Specifies a set of rate limit configurations that will be applied to the
* virtual host.
*
*
* repeated .envoy.api.v2.route.RateLimit rate_limits = 6;
*/
public io.envoyproxy.envoy.api.v2.route.RateLimit.Builder addRateLimitsBuilder(
int index) {
return getRateLimitsFieldBuilder().addBuilder(
index, io.envoyproxy.envoy.api.v2.route.RateLimit.getDefaultInstance());
}
/**
*
* Specifies a set of rate limit configurations that will be applied to the
* virtual host.
*
*
* repeated .envoy.api.v2.route.RateLimit rate_limits = 6;
*/
public java.util.List
getRateLimitsBuilderList() {
return getRateLimitsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.api.v2.route.RateLimit, io.envoyproxy.envoy.api.v2.route.RateLimit.Builder, io.envoyproxy.envoy.api.v2.route.RateLimitOrBuilder>
getRateLimitsFieldBuilder() {
if (rateLimitsBuilder_ == null) {
rateLimitsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.api.v2.route.RateLimit, io.envoyproxy.envoy.api.v2.route.RateLimit.Builder, io.envoyproxy.envoy.api.v2.route.RateLimitOrBuilder>(
rateLimits_,
((bitField0_ & 0x00000008) != 0),
getParentForChildren(),
isClean());
rateLimits_ = null;
}
return rateLimitsBuilder_;
}
private java.util.List requestHeadersToAdd_ =
java.util.Collections.emptyList();
private void ensureRequestHeadersToAddIsMutable() {
if (!((bitField0_ & 0x00000010) != 0)) {
requestHeadersToAdd_ = new java.util.ArrayList(requestHeadersToAdd_);
bitField0_ |= 0x00000010;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.api.v2.core.HeaderValueOption, io.envoyproxy.envoy.api.v2.core.HeaderValueOption.Builder, io.envoyproxy.envoy.api.v2.core.HeaderValueOptionOrBuilder> requestHeadersToAddBuilder_;
/**
*
* Specifies a list of HTTP headers that should be added to each request
* handled by this virtual host. Headers specified at this level are applied
* after headers from enclosed :ref:`envoy_api_msg_route.Route` and before headers from the
* enclosing :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 = 7 [(.validate.rules) = { ... }
*/
public java.util.List getRequestHeadersToAddList() {
if (requestHeadersToAddBuilder_ == null) {
return java.util.Collections.unmodifiableList(requestHeadersToAdd_);
} else {
return requestHeadersToAddBuilder_.getMessageList();
}
}
/**
*
* Specifies a list of HTTP headers that should be added to each request
* handled by this virtual host. Headers specified at this level are applied
* after headers from enclosed :ref:`envoy_api_msg_route.Route` and before headers from the
* enclosing :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 = 7 [(.validate.rules) = { ... }
*/
public int getRequestHeadersToAddCount() {
if (requestHeadersToAddBuilder_ == null) {
return requestHeadersToAdd_.size();
} else {
return requestHeadersToAddBuilder_.getCount();
}
}
/**
*
* Specifies a list of HTTP headers that should be added to each request
* handled by this virtual host. Headers specified at this level are applied
* after headers from enclosed :ref:`envoy_api_msg_route.Route` and before headers from the
* enclosing :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 = 7 [(.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 HTTP headers that should be added to each request
* handled by this virtual host. Headers specified at this level are applied
* after headers from enclosed :ref:`envoy_api_msg_route.Route` and before headers from the
* enclosing :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 = 7 [(.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 HTTP headers that should be added to each request
* handled by this virtual host. Headers specified at this level are applied
* after headers from enclosed :ref:`envoy_api_msg_route.Route` and before headers from the
* enclosing :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 = 7 [(.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 HTTP headers that should be added to each request
* handled by this virtual host. Headers specified at this level are applied
* after headers from enclosed :ref:`envoy_api_msg_route.Route` and before headers from the
* enclosing :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 = 7 [(.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 HTTP headers that should be added to each request
* handled by this virtual host. Headers specified at this level are applied
* after headers from enclosed :ref:`envoy_api_msg_route.Route` and before headers from the
* enclosing :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 = 7 [(.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 HTTP headers that should be added to each request
* handled by this virtual host. Headers specified at this level are applied
* after headers from enclosed :ref:`envoy_api_msg_route.Route` and before headers from the
* enclosing :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 = 7 [(.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 HTTP headers that should be added to each request
* handled by this virtual host. Headers specified at this level are applied
* after headers from enclosed :ref:`envoy_api_msg_route.Route` and before headers from the
* enclosing :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 = 7 [(.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 HTTP headers that should be added to each request
* handled by this virtual host. Headers specified at this level are applied
* after headers from enclosed :ref:`envoy_api_msg_route.Route` and before headers from the
* enclosing :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 = 7 [(.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 HTTP headers that should be added to each request
* handled by this virtual host. Headers specified at this level are applied
* after headers from enclosed :ref:`envoy_api_msg_route.Route` and before headers from the
* enclosing :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 = 7 [(.validate.rules) = { ... }
*/
public Builder clearRequestHeadersToAdd() {
if (requestHeadersToAddBuilder_ == null) {
requestHeadersToAdd_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
} else {
requestHeadersToAddBuilder_.clear();
}
return this;
}
/**
*
* Specifies a list of HTTP headers that should be added to each request
* handled by this virtual host. Headers specified at this level are applied
* after headers from enclosed :ref:`envoy_api_msg_route.Route` and before headers from the
* enclosing :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 = 7 [(.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 HTTP headers that should be added to each request
* handled by this virtual host. Headers specified at this level are applied
* after headers from enclosed :ref:`envoy_api_msg_route.Route` and before headers from the
* enclosing :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 = 7 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.api.v2.core.HeaderValueOption.Builder getRequestHeadersToAddBuilder(
int index) {
return getRequestHeadersToAddFieldBuilder().getBuilder(index);
}
/**
*
* Specifies a list of HTTP headers that should be added to each request
* handled by this virtual host. Headers specified at this level are applied
* after headers from enclosed :ref:`envoy_api_msg_route.Route` and before headers from the
* enclosing :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 = 7 [(.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 HTTP headers that should be added to each request
* handled by this virtual host. Headers specified at this level are applied
* after headers from enclosed :ref:`envoy_api_msg_route.Route` and before headers from the
* enclosing :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 = 7 [(.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 HTTP headers that should be added to each request
* handled by this virtual host. Headers specified at this level are applied
* after headers from enclosed :ref:`envoy_api_msg_route.Route` and before headers from the
* enclosing :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 = 7 [(.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 HTTP headers that should be added to each request
* handled by this virtual host. Headers specified at this level are applied
* after headers from enclosed :ref:`envoy_api_msg_route.Route` and before headers from the
* enclosing :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 = 7 [(.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 HTTP headers that should be added to each request
* handled by this virtual host. Headers specified at this level are applied
* after headers from enclosed :ref:`envoy_api_msg_route.Route` and before headers from the
* enclosing :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 = 7 [(.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_ & 0x00000010) != 0),
getParentForChildren(),
isClean());
requestHeadersToAdd_ = null;
}
return requestHeadersToAddBuilder_;
}
private com.google.protobuf.LazyStringList requestHeadersToRemove_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureRequestHeadersToRemoveIsMutable() {
if (!((bitField0_ & 0x00000020) != 0)) {
requestHeadersToRemove_ = new com.google.protobuf.LazyStringArrayList(requestHeadersToRemove_);
bitField0_ |= 0x00000020;
}
}
/**
*
* Specifies a list of HTTP headers that should be removed from each request
* handled by this virtual host.
*
*
* repeated string request_headers_to_remove = 13;
* @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
* handled by this virtual host.
*
*
* repeated string request_headers_to_remove = 13;
* @return The count of requestHeadersToRemove.
*/
public int getRequestHeadersToRemoveCount() {
return requestHeadersToRemove_.size();
}
/**
*
* Specifies a list of HTTP headers that should be removed from each request
* handled by this virtual host.
*
*
* repeated string request_headers_to_remove = 13;
* @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
* handled by this virtual host.
*
*
* repeated string request_headers_to_remove = 13;
* @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
* handled by this virtual host.
*
*
* repeated string request_headers_to_remove = 13;
* @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
* handled by this virtual host.
*
*
* repeated string request_headers_to_remove = 13;
* @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
* handled by this virtual host.
*
*
* repeated string request_headers_to_remove = 13;
* @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
* handled by this virtual host.
*
*
* repeated string request_headers_to_remove = 13;
* @return This builder for chaining.
*/
public Builder clearRequestHeadersToRemove() {
requestHeadersToRemove_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000020);
onChanged();
return this;
}
/**
*
* Specifies a list of HTTP headers that should be removed from each request
* handled by this virtual host.
*
*
* repeated string request_headers_to_remove = 13;
* @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_ & 0x00000040) != 0)) {
responseHeadersToAdd_ = new java.util.ArrayList(responseHeadersToAdd_);
bitField0_ |= 0x00000040;
}
}
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 HTTP headers that should be added to each response
* handled by this virtual host. Headers specified at this level are applied
* after headers from enclosed :ref:`envoy_api_msg_route.Route` and before headers from the
* enclosing :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 = 10 [(.validate.rules) = { ... }
*/
public java.util.List getResponseHeadersToAddList() {
if (responseHeadersToAddBuilder_ == null) {
return java.util.Collections.unmodifiableList(responseHeadersToAdd_);
} else {
return responseHeadersToAddBuilder_.getMessageList();
}
}
/**
*
* Specifies a list of HTTP headers that should be added to each response
* handled by this virtual host. Headers specified at this level are applied
* after headers from enclosed :ref:`envoy_api_msg_route.Route` and before headers from the
* enclosing :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 = 10 [(.validate.rules) = { ... }
*/
public int getResponseHeadersToAddCount() {
if (responseHeadersToAddBuilder_ == null) {
return responseHeadersToAdd_.size();
} else {
return responseHeadersToAddBuilder_.getCount();
}
}
/**
*
* Specifies a list of HTTP headers that should be added to each response
* handled by this virtual host. Headers specified at this level are applied
* after headers from enclosed :ref:`envoy_api_msg_route.Route` and before headers from the
* enclosing :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 = 10 [(.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 HTTP headers that should be added to each response
* handled by this virtual host. Headers specified at this level are applied
* after headers from enclosed :ref:`envoy_api_msg_route.Route` and before headers from the
* enclosing :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 = 10 [(.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 HTTP headers that should be added to each response
* handled by this virtual host. Headers specified at this level are applied
* after headers from enclosed :ref:`envoy_api_msg_route.Route` and before headers from the
* enclosing :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 = 10 [(.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 HTTP headers that should be added to each response
* handled by this virtual host. Headers specified at this level are applied
* after headers from enclosed :ref:`envoy_api_msg_route.Route` and before headers from the
* enclosing :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 = 10 [(.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 HTTP headers that should be added to each response
* handled by this virtual host. Headers specified at this level are applied
* after headers from enclosed :ref:`envoy_api_msg_route.Route` and before headers from the
* enclosing :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 = 10 [(.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 HTTP headers that should be added to each response
* handled by this virtual host. Headers specified at this level are applied
* after headers from enclosed :ref:`envoy_api_msg_route.Route` and before headers from the
* enclosing :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 = 10 [(.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 HTTP headers that should be added to each response
* handled by this virtual host. Headers specified at this level are applied
* after headers from enclosed :ref:`envoy_api_msg_route.Route` and before headers from the
* enclosing :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 = 10 [(.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 HTTP headers that should be added to each response
* handled by this virtual host. Headers specified at this level are applied
* after headers from enclosed :ref:`envoy_api_msg_route.Route` and before headers from the
* enclosing :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 = 10 [(.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 HTTP headers that should be added to each response
* handled by this virtual host. Headers specified at this level are applied
* after headers from enclosed :ref:`envoy_api_msg_route.Route` and before headers from the
* enclosing :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 = 10 [(.validate.rules) = { ... }
*/
public Builder clearResponseHeadersToAdd() {
if (responseHeadersToAddBuilder_ == null) {
responseHeadersToAdd_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000040);
onChanged();
} else {
responseHeadersToAddBuilder_.clear();
}
return this;
}
/**
*
* Specifies a list of HTTP headers that should be added to each response
* handled by this virtual host. Headers specified at this level are applied
* after headers from enclosed :ref:`envoy_api_msg_route.Route` and before headers from the
* enclosing :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 = 10 [(.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 HTTP headers that should be added to each response
* handled by this virtual host. Headers specified at this level are applied
* after headers from enclosed :ref:`envoy_api_msg_route.Route` and before headers from the
* enclosing :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 = 10 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.api.v2.core.HeaderValueOption.Builder getResponseHeadersToAddBuilder(
int index) {
return getResponseHeadersToAddFieldBuilder().getBuilder(index);
}
/**
*
* Specifies a list of HTTP headers that should be added to each response
* handled by this virtual host. Headers specified at this level are applied
* after headers from enclosed :ref:`envoy_api_msg_route.Route` and before headers from the
* enclosing :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 = 10 [(.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 HTTP headers that should be added to each response
* handled by this virtual host. Headers specified at this level are applied
* after headers from enclosed :ref:`envoy_api_msg_route.Route` and before headers from the
* enclosing :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 = 10 [(.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 HTTP headers that should be added to each response
* handled by this virtual host. Headers specified at this level are applied
* after headers from enclosed :ref:`envoy_api_msg_route.Route` and before headers from the
* enclosing :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 = 10 [(.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 HTTP headers that should be added to each response
* handled by this virtual host. Headers specified at this level are applied
* after headers from enclosed :ref:`envoy_api_msg_route.Route` and before headers from the
* enclosing :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 = 10 [(.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 HTTP headers that should be added to each response
* handled by this virtual host. Headers specified at this level are applied
* after headers from enclosed :ref:`envoy_api_msg_route.Route` and before headers from the
* enclosing :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 = 10 [(.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_ & 0x00000040) != 0),
getParentForChildren(),
isClean());
responseHeadersToAdd_ = null;
}
return responseHeadersToAddBuilder_;
}
private com.google.protobuf.LazyStringList responseHeadersToRemove_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureResponseHeadersToRemoveIsMutable() {
if (!((bitField0_ & 0x00000080) != 0)) {
responseHeadersToRemove_ = new com.google.protobuf.LazyStringArrayList(responseHeadersToRemove_);
bitField0_ |= 0x00000080;
}
}
/**
*
* Specifies a list of HTTP headers that should be removed from each response
* handled by this virtual host.
*
*
* repeated string response_headers_to_remove = 11;
* @return A list containing the responseHeadersToRemove.
*/
public com.google.protobuf.ProtocolStringList
getResponseHeadersToRemoveList() {
return responseHeadersToRemove_.getUnmodifiableView();
}
/**
*
* Specifies a list of HTTP headers that should be removed from each response
* handled by this virtual host.
*
*
* repeated string response_headers_to_remove = 11;
* @return The count of responseHeadersToRemove.
*/
public int getResponseHeadersToRemoveCount() {
return responseHeadersToRemove_.size();
}
/**
*
* Specifies a list of HTTP headers that should be removed from each response
* handled by this virtual host.
*
*
* repeated string response_headers_to_remove = 11;
* @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 HTTP headers that should be removed from each response
* handled by this virtual host.
*
*
* repeated string response_headers_to_remove = 11;
* @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 HTTP headers that should be removed from each response
* handled by this virtual host.
*
*
* repeated string response_headers_to_remove = 11;
* @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 HTTP headers that should be removed from each response
* handled by this virtual host.
*
*
* repeated string response_headers_to_remove = 11;
* @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 HTTP headers that should be removed from each response
* handled by this virtual host.
*
*
* repeated string response_headers_to_remove = 11;
* @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 HTTP headers that should be removed from each response
* handled by this virtual host.
*
*
* repeated string response_headers_to_remove = 11;
* @return This builder for chaining.
*/
public Builder clearResponseHeadersToRemove() {
responseHeadersToRemove_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000080);
onChanged();
return this;
}
/**
*
* Specifies a list of HTTP headers that should be removed from each response
* handled by this virtual host.
*
*
* repeated string response_headers_to_remove = 11;
* @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 io.envoyproxy.envoy.api.v2.route.CorsPolicy cors_;
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.api.v2.route.CorsPolicy, io.envoyproxy.envoy.api.v2.route.CorsPolicy.Builder, io.envoyproxy.envoy.api.v2.route.CorsPolicyOrBuilder> corsBuilder_;
/**
*
* Indicates that the virtual host has a CORS policy.
*
*
* .envoy.api.v2.route.CorsPolicy cors = 8;
* @return Whether the cors field is set.
*/
public boolean hasCors() {
return corsBuilder_ != null || cors_ != null;
}
/**
*
* Indicates that the virtual host has a CORS policy.
*
*
* .envoy.api.v2.route.CorsPolicy cors = 8;
* @return The cors.
*/
public io.envoyproxy.envoy.api.v2.route.CorsPolicy getCors() {
if (corsBuilder_ == null) {
return cors_ == null ? io.envoyproxy.envoy.api.v2.route.CorsPolicy.getDefaultInstance() : cors_;
} else {
return corsBuilder_.getMessage();
}
}
/**
*
* Indicates that the virtual host has a CORS policy.
*
*
* .envoy.api.v2.route.CorsPolicy cors = 8;
*/
public Builder setCors(io.envoyproxy.envoy.api.v2.route.CorsPolicy value) {
if (corsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
cors_ = value;
onChanged();
} else {
corsBuilder_.setMessage(value);
}
return this;
}
/**
*
* Indicates that the virtual host has a CORS policy.
*
*
* .envoy.api.v2.route.CorsPolicy cors = 8;
*/
public Builder setCors(
io.envoyproxy.envoy.api.v2.route.CorsPolicy.Builder builderForValue) {
if (corsBuilder_ == null) {
cors_ = builderForValue.build();
onChanged();
} else {
corsBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Indicates that the virtual host has a CORS policy.
*
*
* .envoy.api.v2.route.CorsPolicy cors = 8;
*/
public Builder mergeCors(io.envoyproxy.envoy.api.v2.route.CorsPolicy value) {
if (corsBuilder_ == null) {
if (cors_ != null) {
cors_ =
io.envoyproxy.envoy.api.v2.route.CorsPolicy.newBuilder(cors_).mergeFrom(value).buildPartial();
} else {
cors_ = value;
}
onChanged();
} else {
corsBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Indicates that the virtual host has a CORS policy.
*
*
* .envoy.api.v2.route.CorsPolicy cors = 8;
*/
public Builder clearCors() {
if (corsBuilder_ == null) {
cors_ = null;
onChanged();
} else {
cors_ = null;
corsBuilder_ = null;
}
return this;
}
/**
*
* Indicates that the virtual host has a CORS policy.
*
*
* .envoy.api.v2.route.CorsPolicy cors = 8;
*/
public io.envoyproxy.envoy.api.v2.route.CorsPolicy.Builder getCorsBuilder() {
onChanged();
return getCorsFieldBuilder().getBuilder();
}
/**
*
* Indicates that the virtual host has a CORS policy.
*
*
* .envoy.api.v2.route.CorsPolicy cors = 8;
*/
public io.envoyproxy.envoy.api.v2.route.CorsPolicyOrBuilder getCorsOrBuilder() {
if (corsBuilder_ != null) {
return corsBuilder_.getMessageOrBuilder();
} else {
return cors_ == null ?
io.envoyproxy.envoy.api.v2.route.CorsPolicy.getDefaultInstance() : cors_;
}
}
/**
*
* Indicates that the virtual host has a CORS policy.
*
*
* .envoy.api.v2.route.CorsPolicy cors = 8;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.api.v2.route.CorsPolicy, io.envoyproxy.envoy.api.v2.route.CorsPolicy.Builder, io.envoyproxy.envoy.api.v2.route.CorsPolicyOrBuilder>
getCorsFieldBuilder() {
if (corsBuilder_ == null) {
corsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.api.v2.route.CorsPolicy, io.envoyproxy.envoy.api.v2.route.CorsPolicy.Builder, io.envoyproxy.envoy.api.v2.route.CorsPolicyOrBuilder>(
getCors(),
getParentForChildren(),
isClean());
cors_ = null;
}
return corsBuilder_;
}
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 virtual host-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 = 12 [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 virtual host-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 = 12 [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 virtual host-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 = 12 [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 virtual host-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 = 12 [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 virtual host-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 = 12 [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 virtual host-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 = 12 [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 virtual host-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 = 12 [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 virtual host-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 = 15;
*/
@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 virtual host-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 = 15;
*/
@java.lang.Override
public java.util.Map getTypedPerFilterConfigMap() {
return internalGetTypedPerFilterConfig().getMap();
}
/**
*
* The per_filter_config field can be used to provide virtual host-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 = 15;
*/
@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 virtual host-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 = 15;
*/
@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 virtual host-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 = 15;
*/
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 virtual host-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 = 15;
*/
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 virtual host-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 = 15;
*/
public Builder putAllTypedPerFilterConfig(
java.util.Map values) {
internalGetMutableTypedPerFilterConfig().getMutableMap()
.putAll(values);
return this;
}
private boolean includeRequestAttemptCount_ ;
/**
*
* Decides whether the :ref:`x-envoy-attempt-count
* <config_http_filters_router_x-envoy-attempt-count>` header should be included
* in the upstream request. Setting this option will cause it to override any existing header
* value, so in the case of two Envoys on the request path with this option enabled, the upstream
* will see the attempt count as perceived by the second Envoy. Defaults to false.
* This header is unaffected by the
* :ref:`suppress_envoy_headers
* <envoy_api_field_config.filter.http.router.v2.Router.suppress_envoy_headers>` flag.
* [#next-major-version: rename to include_attempt_count_in_request.]
*
*
* bool include_request_attempt_count = 14;
* @return The includeRequestAttemptCount.
*/
@java.lang.Override
public boolean getIncludeRequestAttemptCount() {
return includeRequestAttemptCount_;
}
/**
*
* Decides whether the :ref:`x-envoy-attempt-count
* <config_http_filters_router_x-envoy-attempt-count>` header should be included
* in the upstream request. Setting this option will cause it to override any existing header
* value, so in the case of two Envoys on the request path with this option enabled, the upstream
* will see the attempt count as perceived by the second Envoy. Defaults to false.
* This header is unaffected by the
* :ref:`suppress_envoy_headers
* <envoy_api_field_config.filter.http.router.v2.Router.suppress_envoy_headers>` flag.
* [#next-major-version: rename to include_attempt_count_in_request.]
*
*
* bool include_request_attempt_count = 14;
* @param value The includeRequestAttemptCount to set.
* @return This builder for chaining.
*/
public Builder setIncludeRequestAttemptCount(boolean value) {
includeRequestAttemptCount_ = value;
onChanged();
return this;
}
/**
*
* Decides whether the :ref:`x-envoy-attempt-count
* <config_http_filters_router_x-envoy-attempt-count>` header should be included
* in the upstream request. Setting this option will cause it to override any existing header
* value, so in the case of two Envoys on the request path with this option enabled, the upstream
* will see the attempt count as perceived by the second Envoy. Defaults to false.
* This header is unaffected by the
* :ref:`suppress_envoy_headers
* <envoy_api_field_config.filter.http.router.v2.Router.suppress_envoy_headers>` flag.
* [#next-major-version: rename to include_attempt_count_in_request.]
*
*
* bool include_request_attempt_count = 14;
* @return This builder for chaining.
*/
public Builder clearIncludeRequestAttemptCount() {
includeRequestAttemptCount_ = false;
onChanged();
return this;
}
private boolean includeAttemptCountInResponse_ ;
/**
*
* Decides whether the :ref:`x-envoy-attempt-count
* <config_http_filters_router_x-envoy-attempt-count>` header should be included
* in the downstream response. Setting this option will cause the router to override any existing header
* value, so in the case of two Envoys on the request path with this option enabled, the downstream
* will see the attempt count as perceived by the Envoy closest upstream from itself. Defaults to false.
* This header is unaffected by the
* :ref:`suppress_envoy_headers
* <envoy_api_field_config.filter.http.router.v2.Router.suppress_envoy_headers>` flag.
*
*
* bool include_attempt_count_in_response = 19;
* @return The includeAttemptCountInResponse.
*/
@java.lang.Override
public boolean getIncludeAttemptCountInResponse() {
return includeAttemptCountInResponse_;
}
/**
*
* Decides whether the :ref:`x-envoy-attempt-count
* <config_http_filters_router_x-envoy-attempt-count>` header should be included
* in the downstream response. Setting this option will cause the router to override any existing header
* value, so in the case of two Envoys on the request path with this option enabled, the downstream
* will see the attempt count as perceived by the Envoy closest upstream from itself. Defaults to false.
* This header is unaffected by the
* :ref:`suppress_envoy_headers
* <envoy_api_field_config.filter.http.router.v2.Router.suppress_envoy_headers>` flag.
*
*
* bool include_attempt_count_in_response = 19;
* @param value The includeAttemptCountInResponse to set.
* @return This builder for chaining.
*/
public Builder setIncludeAttemptCountInResponse(boolean value) {
includeAttemptCountInResponse_ = value;
onChanged();
return this;
}
/**
*
* Decides whether the :ref:`x-envoy-attempt-count
* <config_http_filters_router_x-envoy-attempt-count>` header should be included
* in the downstream response. Setting this option will cause the router to override any existing header
* value, so in the case of two Envoys on the request path with this option enabled, the downstream
* will see the attempt count as perceived by the Envoy closest upstream from itself. Defaults to false.
* This header is unaffected by the
* :ref:`suppress_envoy_headers
* <envoy_api_field_config.filter.http.router.v2.Router.suppress_envoy_headers>` flag.
*
*
* bool include_attempt_count_in_response = 19;
* @return This builder for chaining.
*/
public Builder clearIncludeAttemptCountInResponse() {
includeAttemptCountInResponse_ = false;
onChanged();
return this;
}
private io.envoyproxy.envoy.api.v2.route.RetryPolicy retryPolicy_;
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.api.v2.route.RetryPolicy, io.envoyproxy.envoy.api.v2.route.RetryPolicy.Builder, io.envoyproxy.envoy.api.v2.route.RetryPolicyOrBuilder> retryPolicyBuilder_;
/**
*
* Indicates the retry policy for all routes in this virtual host. Note that setting a
* route level entry will take precedence over this config and it'll be treated
* independently (e.g.: values are not inherited).
*
*
* .envoy.api.v2.route.RetryPolicy retry_policy = 16;
* @return Whether the retryPolicy field is set.
*/
public boolean hasRetryPolicy() {
return retryPolicyBuilder_ != null || retryPolicy_ != null;
}
/**
*
* Indicates the retry policy for all routes in this virtual host. Note that setting a
* route level entry will take precedence over this config and it'll be treated
* independently (e.g.: values are not inherited).
*
*
* .envoy.api.v2.route.RetryPolicy retry_policy = 16;
* @return The retryPolicy.
*/
public io.envoyproxy.envoy.api.v2.route.RetryPolicy getRetryPolicy() {
if (retryPolicyBuilder_ == null) {
return retryPolicy_ == null ? io.envoyproxy.envoy.api.v2.route.RetryPolicy.getDefaultInstance() : retryPolicy_;
} else {
return retryPolicyBuilder_.getMessage();
}
}
/**
*
* Indicates the retry policy for all routes in this virtual host. Note that setting a
* route level entry will take precedence over this config and it'll be treated
* independently (e.g.: values are not inherited).
*
*
* .envoy.api.v2.route.RetryPolicy retry_policy = 16;
*/
public Builder setRetryPolicy(io.envoyproxy.envoy.api.v2.route.RetryPolicy value) {
if (retryPolicyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
retryPolicy_ = value;
onChanged();
} else {
retryPolicyBuilder_.setMessage(value);
}
return this;
}
/**
*
* Indicates the retry policy for all routes in this virtual host. Note that setting a
* route level entry will take precedence over this config and it'll be treated
* independently (e.g.: values are not inherited).
*
*
* .envoy.api.v2.route.RetryPolicy retry_policy = 16;
*/
public Builder setRetryPolicy(
io.envoyproxy.envoy.api.v2.route.RetryPolicy.Builder builderForValue) {
if (retryPolicyBuilder_ == null) {
retryPolicy_ = builderForValue.build();
onChanged();
} else {
retryPolicyBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Indicates the retry policy for all routes in this virtual host. Note that setting a
* route level entry will take precedence over this config and it'll be treated
* independently (e.g.: values are not inherited).
*
*
* .envoy.api.v2.route.RetryPolicy retry_policy = 16;
*/
public Builder mergeRetryPolicy(io.envoyproxy.envoy.api.v2.route.RetryPolicy value) {
if (retryPolicyBuilder_ == null) {
if (retryPolicy_ != null) {
retryPolicy_ =
io.envoyproxy.envoy.api.v2.route.RetryPolicy.newBuilder(retryPolicy_).mergeFrom(value).buildPartial();
} else {
retryPolicy_ = value;
}
onChanged();
} else {
retryPolicyBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Indicates the retry policy for all routes in this virtual host. Note that setting a
* route level entry will take precedence over this config and it'll be treated
* independently (e.g.: values are not inherited).
*
*
* .envoy.api.v2.route.RetryPolicy retry_policy = 16;
*/
public Builder clearRetryPolicy() {
if (retryPolicyBuilder_ == null) {
retryPolicy_ = null;
onChanged();
} else {
retryPolicy_ = null;
retryPolicyBuilder_ = null;
}
return this;
}
/**
*
* Indicates the retry policy for all routes in this virtual host. Note that setting a
* route level entry will take precedence over this config and it'll be treated
* independently (e.g.: values are not inherited).
*
*
* .envoy.api.v2.route.RetryPolicy retry_policy = 16;
*/
public io.envoyproxy.envoy.api.v2.route.RetryPolicy.Builder getRetryPolicyBuilder() {
onChanged();
return getRetryPolicyFieldBuilder().getBuilder();
}
/**
*
* Indicates the retry policy for all routes in this virtual host. Note that setting a
* route level entry will take precedence over this config and it'll be treated
* independently (e.g.: values are not inherited).
*
*
* .envoy.api.v2.route.RetryPolicy retry_policy = 16;
*/
public io.envoyproxy.envoy.api.v2.route.RetryPolicyOrBuilder getRetryPolicyOrBuilder() {
if (retryPolicyBuilder_ != null) {
return retryPolicyBuilder_.getMessageOrBuilder();
} else {
return retryPolicy_ == null ?
io.envoyproxy.envoy.api.v2.route.RetryPolicy.getDefaultInstance() : retryPolicy_;
}
}
/**
*
* Indicates the retry policy for all routes in this virtual host. Note that setting a
* route level entry will take precedence over this config and it'll be treated
* independently (e.g.: values are not inherited).
*
*
* .envoy.api.v2.route.RetryPolicy retry_policy = 16;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.api.v2.route.RetryPolicy, io.envoyproxy.envoy.api.v2.route.RetryPolicy.Builder, io.envoyproxy.envoy.api.v2.route.RetryPolicyOrBuilder>
getRetryPolicyFieldBuilder() {
if (retryPolicyBuilder_ == null) {
retryPolicyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.api.v2.route.RetryPolicy, io.envoyproxy.envoy.api.v2.route.RetryPolicy.Builder, io.envoyproxy.envoy.api.v2.route.RetryPolicyOrBuilder>(
getRetryPolicy(),
getParentForChildren(),
isClean());
retryPolicy_ = null;
}
return retryPolicyBuilder_;
}
private com.google.protobuf.Any retryPolicyTypedConfig_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> retryPolicyTypedConfigBuilder_;
/**
*
* [#not-implemented-hide:]
* Specifies the configuration for retry policy extension. Note that setting a route level entry
* will take precedence over this config and it'll be treated independently (e.g.: values are not
* inherited). :ref:`Retry policy <envoy_api_field_route.VirtualHost.retry_policy>` should not be
* set if this field is used.
*
*
* .google.protobuf.Any retry_policy_typed_config = 20;
* @return Whether the retryPolicyTypedConfig field is set.
*/
public boolean hasRetryPolicyTypedConfig() {
return retryPolicyTypedConfigBuilder_ != null || retryPolicyTypedConfig_ != null;
}
/**
*
* [#not-implemented-hide:]
* Specifies the configuration for retry policy extension. Note that setting a route level entry
* will take precedence over this config and it'll be treated independently (e.g.: values are not
* inherited). :ref:`Retry policy <envoy_api_field_route.VirtualHost.retry_policy>` should not be
* set if this field is used.
*
*
* .google.protobuf.Any retry_policy_typed_config = 20;
* @return The retryPolicyTypedConfig.
*/
public com.google.protobuf.Any getRetryPolicyTypedConfig() {
if (retryPolicyTypedConfigBuilder_ == null) {
return retryPolicyTypedConfig_ == null ? com.google.protobuf.Any.getDefaultInstance() : retryPolicyTypedConfig_;
} else {
return retryPolicyTypedConfigBuilder_.getMessage();
}
}
/**
*
* [#not-implemented-hide:]
* Specifies the configuration for retry policy extension. Note that setting a route level entry
* will take precedence over this config and it'll be treated independently (e.g.: values are not
* inherited). :ref:`Retry policy <envoy_api_field_route.VirtualHost.retry_policy>` should not be
* set if this field is used.
*
*
* .google.protobuf.Any retry_policy_typed_config = 20;
*/
public Builder setRetryPolicyTypedConfig(com.google.protobuf.Any value) {
if (retryPolicyTypedConfigBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
retryPolicyTypedConfig_ = value;
onChanged();
} else {
retryPolicyTypedConfigBuilder_.setMessage(value);
}
return this;
}
/**
*
* [#not-implemented-hide:]
* Specifies the configuration for retry policy extension. Note that setting a route level entry
* will take precedence over this config and it'll be treated independently (e.g.: values are not
* inherited). :ref:`Retry policy <envoy_api_field_route.VirtualHost.retry_policy>` should not be
* set if this field is used.
*
*
* .google.protobuf.Any retry_policy_typed_config = 20;
*/
public Builder setRetryPolicyTypedConfig(
com.google.protobuf.Any.Builder builderForValue) {
if (retryPolicyTypedConfigBuilder_ == null) {
retryPolicyTypedConfig_ = builderForValue.build();
onChanged();
} else {
retryPolicyTypedConfigBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* [#not-implemented-hide:]
* Specifies the configuration for retry policy extension. Note that setting a route level entry
* will take precedence over this config and it'll be treated independently (e.g.: values are not
* inherited). :ref:`Retry policy <envoy_api_field_route.VirtualHost.retry_policy>` should not be
* set if this field is used.
*
*
* .google.protobuf.Any retry_policy_typed_config = 20;
*/
public Builder mergeRetryPolicyTypedConfig(com.google.protobuf.Any value) {
if (retryPolicyTypedConfigBuilder_ == null) {
if (retryPolicyTypedConfig_ != null) {
retryPolicyTypedConfig_ =
com.google.protobuf.Any.newBuilder(retryPolicyTypedConfig_).mergeFrom(value).buildPartial();
} else {
retryPolicyTypedConfig_ = value;
}
onChanged();
} else {
retryPolicyTypedConfigBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* [#not-implemented-hide:]
* Specifies the configuration for retry policy extension. Note that setting a route level entry
* will take precedence over this config and it'll be treated independently (e.g.: values are not
* inherited). :ref:`Retry policy <envoy_api_field_route.VirtualHost.retry_policy>` should not be
* set if this field is used.
*
*
* .google.protobuf.Any retry_policy_typed_config = 20;
*/
public Builder clearRetryPolicyTypedConfig() {
if (retryPolicyTypedConfigBuilder_ == null) {
retryPolicyTypedConfig_ = null;
onChanged();
} else {
retryPolicyTypedConfig_ = null;
retryPolicyTypedConfigBuilder_ = null;
}
return this;
}
/**
*
* [#not-implemented-hide:]
* Specifies the configuration for retry policy extension. Note that setting a route level entry
* will take precedence over this config and it'll be treated independently (e.g.: values are not
* inherited). :ref:`Retry policy <envoy_api_field_route.VirtualHost.retry_policy>` should not be
* set if this field is used.
*
*
* .google.protobuf.Any retry_policy_typed_config = 20;
*/
public com.google.protobuf.Any.Builder getRetryPolicyTypedConfigBuilder() {
onChanged();
return getRetryPolicyTypedConfigFieldBuilder().getBuilder();
}
/**
*
* [#not-implemented-hide:]
* Specifies the configuration for retry policy extension. Note that setting a route level entry
* will take precedence over this config and it'll be treated independently (e.g.: values are not
* inherited). :ref:`Retry policy <envoy_api_field_route.VirtualHost.retry_policy>` should not be
* set if this field is used.
*
*
* .google.protobuf.Any retry_policy_typed_config = 20;
*/
public com.google.protobuf.AnyOrBuilder getRetryPolicyTypedConfigOrBuilder() {
if (retryPolicyTypedConfigBuilder_ != null) {
return retryPolicyTypedConfigBuilder_.getMessageOrBuilder();
} else {
return retryPolicyTypedConfig_ == null ?
com.google.protobuf.Any.getDefaultInstance() : retryPolicyTypedConfig_;
}
}
/**
*
* [#not-implemented-hide:]
* Specifies the configuration for retry policy extension. Note that setting a route level entry
* will take precedence over this config and it'll be treated independently (e.g.: values are not
* inherited). :ref:`Retry policy <envoy_api_field_route.VirtualHost.retry_policy>` should not be
* set if this field is used.
*
*
* .google.protobuf.Any retry_policy_typed_config = 20;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>
getRetryPolicyTypedConfigFieldBuilder() {
if (retryPolicyTypedConfigBuilder_ == null) {
retryPolicyTypedConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>(
getRetryPolicyTypedConfig(),
getParentForChildren(),
isClean());
retryPolicyTypedConfig_ = null;
}
return retryPolicyTypedConfigBuilder_;
}
private io.envoyproxy.envoy.api.v2.route.HedgePolicy hedgePolicy_;
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.api.v2.route.HedgePolicy, io.envoyproxy.envoy.api.v2.route.HedgePolicy.Builder, io.envoyproxy.envoy.api.v2.route.HedgePolicyOrBuilder> hedgePolicyBuilder_;
/**
*
* Indicates the hedge policy for all routes in this virtual host. Note that setting a
* route level entry will take precedence over this config and it'll be treated
* independently (e.g.: values are not inherited).
*
*
* .envoy.api.v2.route.HedgePolicy hedge_policy = 17;
* @return Whether the hedgePolicy field is set.
*/
public boolean hasHedgePolicy() {
return hedgePolicyBuilder_ != null || hedgePolicy_ != null;
}
/**
*
* Indicates the hedge policy for all routes in this virtual host. Note that setting a
* route level entry will take precedence over this config and it'll be treated
* independently (e.g.: values are not inherited).
*
*
* .envoy.api.v2.route.HedgePolicy hedge_policy = 17;
* @return The hedgePolicy.
*/
public io.envoyproxy.envoy.api.v2.route.HedgePolicy getHedgePolicy() {
if (hedgePolicyBuilder_ == null) {
return hedgePolicy_ == null ? io.envoyproxy.envoy.api.v2.route.HedgePolicy.getDefaultInstance() : hedgePolicy_;
} else {
return hedgePolicyBuilder_.getMessage();
}
}
/**
*
* Indicates the hedge policy for all routes in this virtual host. Note that setting a
* route level entry will take precedence over this config and it'll be treated
* independently (e.g.: values are not inherited).
*
*
* .envoy.api.v2.route.HedgePolicy hedge_policy = 17;
*/
public Builder setHedgePolicy(io.envoyproxy.envoy.api.v2.route.HedgePolicy value) {
if (hedgePolicyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
hedgePolicy_ = value;
onChanged();
} else {
hedgePolicyBuilder_.setMessage(value);
}
return this;
}
/**
*
* Indicates the hedge policy for all routes in this virtual host. Note that setting a
* route level entry will take precedence over this config and it'll be treated
* independently (e.g.: values are not inherited).
*
*
* .envoy.api.v2.route.HedgePolicy hedge_policy = 17;
*/
public Builder setHedgePolicy(
io.envoyproxy.envoy.api.v2.route.HedgePolicy.Builder builderForValue) {
if (hedgePolicyBuilder_ == null) {
hedgePolicy_ = builderForValue.build();
onChanged();
} else {
hedgePolicyBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Indicates the hedge policy for all routes in this virtual host. Note that setting a
* route level entry will take precedence over this config and it'll be treated
* independently (e.g.: values are not inherited).
*
*
* .envoy.api.v2.route.HedgePolicy hedge_policy = 17;
*/
public Builder mergeHedgePolicy(io.envoyproxy.envoy.api.v2.route.HedgePolicy value) {
if (hedgePolicyBuilder_ == null) {
if (hedgePolicy_ != null) {
hedgePolicy_ =
io.envoyproxy.envoy.api.v2.route.HedgePolicy.newBuilder(hedgePolicy_).mergeFrom(value).buildPartial();
} else {
hedgePolicy_ = value;
}
onChanged();
} else {
hedgePolicyBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Indicates the hedge policy for all routes in this virtual host. Note that setting a
* route level entry will take precedence over this config and it'll be treated
* independently (e.g.: values are not inherited).
*
*
* .envoy.api.v2.route.HedgePolicy hedge_policy = 17;
*/
public Builder clearHedgePolicy() {
if (hedgePolicyBuilder_ == null) {
hedgePolicy_ = null;
onChanged();
} else {
hedgePolicy_ = null;
hedgePolicyBuilder_ = null;
}
return this;
}
/**
*
* Indicates the hedge policy for all routes in this virtual host. Note that setting a
* route level entry will take precedence over this config and it'll be treated
* independently (e.g.: values are not inherited).
*
*
* .envoy.api.v2.route.HedgePolicy hedge_policy = 17;
*/
public io.envoyproxy.envoy.api.v2.route.HedgePolicy.Builder getHedgePolicyBuilder() {
onChanged();
return getHedgePolicyFieldBuilder().getBuilder();
}
/**
*
* Indicates the hedge policy for all routes in this virtual host. Note that setting a
* route level entry will take precedence over this config and it'll be treated
* independently (e.g.: values are not inherited).
*
*
* .envoy.api.v2.route.HedgePolicy hedge_policy = 17;
*/
public io.envoyproxy.envoy.api.v2.route.HedgePolicyOrBuilder getHedgePolicyOrBuilder() {
if (hedgePolicyBuilder_ != null) {
return hedgePolicyBuilder_.getMessageOrBuilder();
} else {
return hedgePolicy_ == null ?
io.envoyproxy.envoy.api.v2.route.HedgePolicy.getDefaultInstance() : hedgePolicy_;
}
}
/**
*
* Indicates the hedge policy for all routes in this virtual host. Note that setting a
* route level entry will take precedence over this config and it'll be treated
* independently (e.g.: values are not inherited).
*
*
* .envoy.api.v2.route.HedgePolicy hedge_policy = 17;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.api.v2.route.HedgePolicy, io.envoyproxy.envoy.api.v2.route.HedgePolicy.Builder, io.envoyproxy.envoy.api.v2.route.HedgePolicyOrBuilder>
getHedgePolicyFieldBuilder() {
if (hedgePolicyBuilder_ == null) {
hedgePolicyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.api.v2.route.HedgePolicy, io.envoyproxy.envoy.api.v2.route.HedgePolicy.Builder, io.envoyproxy.envoy.api.v2.route.HedgePolicyOrBuilder>(
getHedgePolicy(),
getParentForChildren(),
isClean());
hedgePolicy_ = null;
}
return hedgePolicyBuilder_;
}
private com.google.protobuf.UInt32Value perRequestBufferLimitBytes_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> perRequestBufferLimitBytesBuilder_;
/**
*
* The maximum bytes which will be buffered for retries and shadowing.
* If set and a route-specific limit is not set, the bytes actually buffered will be the minimum
* value of this and the listener per_connection_buffer_limit_bytes.
*
*
* .google.protobuf.UInt32Value per_request_buffer_limit_bytes = 18;
* @return Whether the perRequestBufferLimitBytes field is set.
*/
public boolean hasPerRequestBufferLimitBytes() {
return perRequestBufferLimitBytesBuilder_ != null || perRequestBufferLimitBytes_ != null;
}
/**
*
* The maximum bytes which will be buffered for retries and shadowing.
* If set and a route-specific limit is not set, the bytes actually buffered will be the minimum
* value of this and the listener per_connection_buffer_limit_bytes.
*
*
* .google.protobuf.UInt32Value per_request_buffer_limit_bytes = 18;
* @return The perRequestBufferLimitBytes.
*/
public com.google.protobuf.UInt32Value getPerRequestBufferLimitBytes() {
if (perRequestBufferLimitBytesBuilder_ == null) {
return perRequestBufferLimitBytes_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : perRequestBufferLimitBytes_;
} else {
return perRequestBufferLimitBytesBuilder_.getMessage();
}
}
/**
*
* The maximum bytes which will be buffered for retries and shadowing.
* If set and a route-specific limit is not set, the bytes actually buffered will be the minimum
* value of this and the listener per_connection_buffer_limit_bytes.
*
*
* .google.protobuf.UInt32Value per_request_buffer_limit_bytes = 18;
*/
public Builder setPerRequestBufferLimitBytes(com.google.protobuf.UInt32Value value) {
if (perRequestBufferLimitBytesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
perRequestBufferLimitBytes_ = value;
onChanged();
} else {
perRequestBufferLimitBytesBuilder_.setMessage(value);
}
return this;
}
/**
*
* The maximum bytes which will be buffered for retries and shadowing.
* If set and a route-specific limit is not set, the bytes actually buffered will be the minimum
* value of this and the listener per_connection_buffer_limit_bytes.
*
*
* .google.protobuf.UInt32Value per_request_buffer_limit_bytes = 18;
*/
public Builder setPerRequestBufferLimitBytes(
com.google.protobuf.UInt32Value.Builder builderForValue) {
if (perRequestBufferLimitBytesBuilder_ == null) {
perRequestBufferLimitBytes_ = builderForValue.build();
onChanged();
} else {
perRequestBufferLimitBytesBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* The maximum bytes which will be buffered for retries and shadowing.
* If set and a route-specific limit is not set, the bytes actually buffered will be the minimum
* value of this and the listener per_connection_buffer_limit_bytes.
*
*
* .google.protobuf.UInt32Value per_request_buffer_limit_bytes = 18;
*/
public Builder mergePerRequestBufferLimitBytes(com.google.protobuf.UInt32Value value) {
if (perRequestBufferLimitBytesBuilder_ == null) {
if (perRequestBufferLimitBytes_ != null) {
perRequestBufferLimitBytes_ =
com.google.protobuf.UInt32Value.newBuilder(perRequestBufferLimitBytes_).mergeFrom(value).buildPartial();
} else {
perRequestBufferLimitBytes_ = value;
}
onChanged();
} else {
perRequestBufferLimitBytesBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* The maximum bytes which will be buffered for retries and shadowing.
* If set and a route-specific limit is not set, the bytes actually buffered will be the minimum
* value of this and the listener per_connection_buffer_limit_bytes.
*
*
* .google.protobuf.UInt32Value per_request_buffer_limit_bytes = 18;
*/
public Builder clearPerRequestBufferLimitBytes() {
if (perRequestBufferLimitBytesBuilder_ == null) {
perRequestBufferLimitBytes_ = null;
onChanged();
} else {
perRequestBufferLimitBytes_ = null;
perRequestBufferLimitBytesBuilder_ = null;
}
return this;
}
/**
*
* The maximum bytes which will be buffered for retries and shadowing.
* If set and a route-specific limit is not set, the bytes actually buffered will be the minimum
* value of this and the listener per_connection_buffer_limit_bytes.
*
*
* .google.protobuf.UInt32Value per_request_buffer_limit_bytes = 18;
*/
public com.google.protobuf.UInt32Value.Builder getPerRequestBufferLimitBytesBuilder() {
onChanged();
return getPerRequestBufferLimitBytesFieldBuilder().getBuilder();
}
/**
*
* The maximum bytes which will be buffered for retries and shadowing.
* If set and a route-specific limit is not set, the bytes actually buffered will be the minimum
* value of this and the listener per_connection_buffer_limit_bytes.
*
*
* .google.protobuf.UInt32Value per_request_buffer_limit_bytes = 18;
*/
public com.google.protobuf.UInt32ValueOrBuilder getPerRequestBufferLimitBytesOrBuilder() {
if (perRequestBufferLimitBytesBuilder_ != null) {
return perRequestBufferLimitBytesBuilder_.getMessageOrBuilder();
} else {
return perRequestBufferLimitBytes_ == null ?
com.google.protobuf.UInt32Value.getDefaultInstance() : perRequestBufferLimitBytes_;
}
}
/**
*
* The maximum bytes which will be buffered for retries and shadowing.
* If set and a route-specific limit is not set, the bytes actually buffered will be the minimum
* value of this and the listener per_connection_buffer_limit_bytes.
*
*
* .google.protobuf.UInt32Value per_request_buffer_limit_bytes = 18;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>
getPerRequestBufferLimitBytesFieldBuilder() {
if (perRequestBufferLimitBytesBuilder_ == null) {
perRequestBufferLimitBytesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>(
getPerRequestBufferLimitBytes(),
getParentForChildren(),
isClean());
perRequestBufferLimitBytes_ = null;
}
return perRequestBufferLimitBytesBuilder_;
}
@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.VirtualHost)
}
// @@protoc_insertion_point(class_scope:envoy.api.v2.route.VirtualHost)
private static final io.envoyproxy.envoy.api.v2.route.VirtualHost DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.api.v2.route.VirtualHost();
}
public static io.envoyproxy.envoy.api.v2.route.VirtualHost getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public VirtualHost parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new VirtualHost(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.VirtualHost getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy