Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: envoy/config/route/v3/route_components.proto
package io.envoyproxy.envoy.config.route.v3;
/**
*
* [#next-free-field: 42]
*
*
* Protobuf type {@code envoy.config.route.v3.RouteAction}
*/
public final class RouteAction extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.config.route.v3.RouteAction)
RouteActionOrBuilder {
private static final long serialVersionUID = 0L;
// Use RouteAction.newBuilder() to construct.
private RouteAction(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private RouteAction() {
clusterNotFoundResponseCode_ = 0;
prefixRewrite_ = "";
requestMirrorPolicies_ = java.util.Collections.emptyList();
priority_ = 0;
rateLimits_ = java.util.Collections.emptyList();
hashPolicy_ = java.util.Collections.emptyList();
upgradeConfigs_ = java.util.Collections.emptyList();
internalRedirectAction_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new RouteAction();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private RouteAction(
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();
clusterSpecifierCase_ = 1;
clusterSpecifier_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
clusterSpecifierCase_ = 2;
clusterSpecifier_ = s;
break;
}
case 26: {
io.envoyproxy.envoy.config.route.v3.WeightedCluster.Builder subBuilder = null;
if (clusterSpecifierCase_ == 3) {
subBuilder = ((io.envoyproxy.envoy.config.route.v3.WeightedCluster) clusterSpecifier_).toBuilder();
}
clusterSpecifier_ =
input.readMessage(io.envoyproxy.envoy.config.route.v3.WeightedCluster.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((io.envoyproxy.envoy.config.route.v3.WeightedCluster) clusterSpecifier_);
clusterSpecifier_ = subBuilder.buildPartial();
}
clusterSpecifierCase_ = 3;
break;
}
case 34: {
io.envoyproxy.envoy.config.core.v3.Metadata.Builder subBuilder = null;
if (metadataMatch_ != null) {
subBuilder = metadataMatch_.toBuilder();
}
metadataMatch_ = input.readMessage(io.envoyproxy.envoy.config.core.v3.Metadata.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(metadataMatch_);
metadataMatch_ = subBuilder.buildPartial();
}
break;
}
case 42: {
java.lang.String s = input.readStringRequireUtf8();
prefixRewrite_ = s;
break;
}
case 50: {
java.lang.String s = input.readStringRequireUtf8();
hostRewriteSpecifierCase_ = 6;
hostRewriteSpecifier_ = s;
break;
}
case 58: {
com.google.protobuf.BoolValue.Builder subBuilder = null;
if (hostRewriteSpecifierCase_ == 7) {
subBuilder = ((com.google.protobuf.BoolValue) hostRewriteSpecifier_).toBuilder();
}
hostRewriteSpecifier_ =
input.readMessage(com.google.protobuf.BoolValue.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.google.protobuf.BoolValue) hostRewriteSpecifier_);
hostRewriteSpecifier_ = subBuilder.buildPartial();
}
hostRewriteSpecifierCase_ = 7;
break;
}
case 66: {
com.google.protobuf.Duration.Builder subBuilder = null;
if (timeout_ != null) {
subBuilder = timeout_.toBuilder();
}
timeout_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(timeout_);
timeout_ = subBuilder.buildPartial();
}
break;
}
case 74: {
io.envoyproxy.envoy.config.route.v3.RetryPolicy.Builder subBuilder = null;
if (retryPolicy_ != null) {
subBuilder = retryPolicy_.toBuilder();
}
retryPolicy_ = input.readMessage(io.envoyproxy.envoy.config.route.v3.RetryPolicy.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(retryPolicy_);
retryPolicy_ = subBuilder.buildPartial();
}
break;
}
case 88: {
int rawValue = input.readEnum();
priority_ = rawValue;
break;
}
case 106: {
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
rateLimits_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000002;
}
rateLimits_.add(
input.readMessage(io.envoyproxy.envoy.config.route.v3.RateLimit.parser(), extensionRegistry));
break;
}
case 114: {
com.google.protobuf.BoolValue.Builder subBuilder = null;
if (includeVhRateLimits_ != null) {
subBuilder = includeVhRateLimits_.toBuilder();
}
includeVhRateLimits_ = input.readMessage(com.google.protobuf.BoolValue.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(includeVhRateLimits_);
includeVhRateLimits_ = subBuilder.buildPartial();
}
break;
}
case 122: {
if (!((mutable_bitField0_ & 0x00000004) != 0)) {
hashPolicy_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000004;
}
hashPolicy_.add(
input.readMessage(io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.parser(), extensionRegistry));
break;
}
case 138: {
io.envoyproxy.envoy.config.route.v3.CorsPolicy.Builder subBuilder = null;
if (cors_ != null) {
subBuilder = cors_.toBuilder();
}
cors_ = input.readMessage(io.envoyproxy.envoy.config.route.v3.CorsPolicy.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(cors_);
cors_ = subBuilder.buildPartial();
}
break;
}
case 160: {
int rawValue = input.readEnum();
clusterNotFoundResponseCode_ = rawValue;
break;
}
case 186: {
com.google.protobuf.Duration.Builder subBuilder = null;
if (maxGrpcTimeout_ != null) {
subBuilder = maxGrpcTimeout_.toBuilder();
}
maxGrpcTimeout_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(maxGrpcTimeout_);
maxGrpcTimeout_ = subBuilder.buildPartial();
}
break;
}
case 194: {
com.google.protobuf.Duration.Builder subBuilder = null;
if (idleTimeout_ != null) {
subBuilder = idleTimeout_.toBuilder();
}
idleTimeout_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(idleTimeout_);
idleTimeout_ = subBuilder.buildPartial();
}
break;
}
case 202: {
if (!((mutable_bitField0_ & 0x00000008) != 0)) {
upgradeConfigs_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000008;
}
upgradeConfigs_.add(
input.readMessage(io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.parser(), extensionRegistry));
break;
}
case 208: {
int rawValue = input.readEnum();
internalRedirectAction_ = rawValue;
break;
}
case 218: {
io.envoyproxy.envoy.config.route.v3.HedgePolicy.Builder subBuilder = null;
if (hedgePolicy_ != null) {
subBuilder = hedgePolicy_.toBuilder();
}
hedgePolicy_ = input.readMessage(io.envoyproxy.envoy.config.route.v3.HedgePolicy.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(hedgePolicy_);
hedgePolicy_ = subBuilder.buildPartial();
}
break;
}
case 226: {
com.google.protobuf.Duration.Builder subBuilder = null;
if (grpcTimeoutOffset_ != null) {
subBuilder = grpcTimeoutOffset_.toBuilder();
}
grpcTimeoutOffset_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(grpcTimeoutOffset_);
grpcTimeoutOffset_ = subBuilder.buildPartial();
}
break;
}
case 234: {
java.lang.String s = input.readStringRequireUtf8();
hostRewriteSpecifierCase_ = 29;
hostRewriteSpecifier_ = s;
break;
}
case 242: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
requestMirrorPolicies_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
requestMirrorPolicies_.add(
input.readMessage(io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy.parser(), extensionRegistry));
break;
}
case 250: {
com.google.protobuf.UInt32Value.Builder subBuilder = null;
if (maxInternalRedirects_ != null) {
subBuilder = maxInternalRedirects_.toBuilder();
}
maxInternalRedirects_ = input.readMessage(com.google.protobuf.UInt32Value.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(maxInternalRedirects_);
maxInternalRedirects_ = subBuilder.buildPartial();
}
break;
}
case 258: {
io.envoyproxy.envoy.type.matcher.v3.RegexMatchAndSubstitute.Builder subBuilder = null;
if (regexRewrite_ != null) {
subBuilder = regexRewrite_.toBuilder();
}
regexRewrite_ = input.readMessage(io.envoyproxy.envoy.type.matcher.v3.RegexMatchAndSubstitute.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(regexRewrite_);
regexRewrite_ = subBuilder.buildPartial();
}
break;
}
case 266: {
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;
}
case 274: {
io.envoyproxy.envoy.config.route.v3.InternalRedirectPolicy.Builder subBuilder = null;
if (internalRedirectPolicy_ != null) {
subBuilder = internalRedirectPolicy_.toBuilder();
}
internalRedirectPolicy_ = input.readMessage(io.envoyproxy.envoy.config.route.v3.InternalRedirectPolicy.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(internalRedirectPolicy_);
internalRedirectPolicy_ = subBuilder.buildPartial();
}
break;
}
case 282: {
io.envoyproxy.envoy.type.matcher.v3.RegexMatchAndSubstitute.Builder subBuilder = null;
if (hostRewriteSpecifierCase_ == 35) {
subBuilder = ((io.envoyproxy.envoy.type.matcher.v3.RegexMatchAndSubstitute) hostRewriteSpecifier_).toBuilder();
}
hostRewriteSpecifier_ =
input.readMessage(io.envoyproxy.envoy.type.matcher.v3.RegexMatchAndSubstitute.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((io.envoyproxy.envoy.type.matcher.v3.RegexMatchAndSubstitute) hostRewriteSpecifier_);
hostRewriteSpecifier_ = subBuilder.buildPartial();
}
hostRewriteSpecifierCase_ = 35;
break;
}
case 290: {
io.envoyproxy.envoy.config.route.v3.RouteAction.MaxStreamDuration.Builder subBuilder = null;
if (maxStreamDuration_ != null) {
subBuilder = maxStreamDuration_.toBuilder();
}
maxStreamDuration_ = input.readMessage(io.envoyproxy.envoy.config.route.v3.RouteAction.MaxStreamDuration.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(maxStreamDuration_);
maxStreamDuration_ = subBuilder.buildPartial();
}
break;
}
case 298: {
java.lang.String s = input.readStringRequireUtf8();
clusterSpecifierCase_ = 37;
clusterSpecifier_ = s;
break;
}
case 304: {
appendXForwardedHost_ = input.readBool();
break;
}
case 314: {
io.envoyproxy.envoy.config.route.v3.ClusterSpecifierPlugin.Builder subBuilder = null;
if (clusterSpecifierCase_ == 39) {
subBuilder = ((io.envoyproxy.envoy.config.route.v3.ClusterSpecifierPlugin) clusterSpecifier_).toBuilder();
}
clusterSpecifier_ =
input.readMessage(io.envoyproxy.envoy.config.route.v3.ClusterSpecifierPlugin.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((io.envoyproxy.envoy.config.route.v3.ClusterSpecifierPlugin) clusterSpecifier_);
clusterSpecifier_ = subBuilder.buildPartial();
}
clusterSpecifierCase_ = 39;
break;
}
case 322: {
io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig.Builder subBuilder = null;
if (earlyDataPolicy_ != null) {
subBuilder = earlyDataPolicy_.toBuilder();
}
earlyDataPolicy_ = input.readMessage(io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(earlyDataPolicy_);
earlyDataPolicy_ = subBuilder.buildPartial();
}
break;
}
case 330: {
io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig.Builder subBuilder = null;
if (pathRewritePolicy_ != null) {
subBuilder = pathRewritePolicy_.toBuilder();
}
pathRewritePolicy_ = input.readMessage(io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(pathRewritePolicy_);
pathRewritePolicy_ = 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_ & 0x00000002) != 0)) {
rateLimits_ = java.util.Collections.unmodifiableList(rateLimits_);
}
if (((mutable_bitField0_ & 0x00000004) != 0)) {
hashPolicy_ = java.util.Collections.unmodifiableList(hashPolicy_);
}
if (((mutable_bitField0_ & 0x00000008) != 0)) {
upgradeConfigs_ = java.util.Collections.unmodifiableList(upgradeConfigs_);
}
if (((mutable_bitField0_ & 0x00000001) != 0)) {
requestMirrorPolicies_ = java.util.Collections.unmodifiableList(requestMirrorPolicies_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.route.v3.RouteAction.class, io.envoyproxy.envoy.config.route.v3.RouteAction.Builder.class);
}
/**
* Protobuf enum {@code envoy.config.route.v3.RouteAction.ClusterNotFoundResponseCode}
*/
public enum ClusterNotFoundResponseCode
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
* SERVICE_UNAVAILABLE = 0;
*/
public static final int SERVICE_UNAVAILABLE_VALUE = 0;
/**
*
* HTTP status code - 404 Not Found.
*
*
* NOT_FOUND = 1;
*/
public static final int NOT_FOUND_VALUE = 1;
/**
*
* HTTP status code - 500 Internal Server Error.
*
*
* INTERNAL_SERVER_ERROR = 2;
*/
public static final int INTERNAL_SERVER_ERROR_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 ClusterNotFoundResponseCode 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 ClusterNotFoundResponseCode forNumber(int value) {
switch (value) {
case 0: return SERVICE_UNAVAILABLE;
case 1: return NOT_FOUND;
case 2: return INTERNAL_SERVER_ERROR;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
ClusterNotFoundResponseCode> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public ClusterNotFoundResponseCode findValueByNumber(int number) {
return ClusterNotFoundResponseCode.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.config.route.v3.RouteAction.getDescriptor().getEnumTypes().get(0);
}
private static final ClusterNotFoundResponseCode[] VALUES = values();
public static ClusterNotFoundResponseCode 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 ClusterNotFoundResponseCode(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:envoy.config.route.v3.RouteAction.ClusterNotFoundResponseCode)
}
/**
*
* Configures :ref:`internal redirect <arch_overview_internal_redirects>` behavior.
* [#next-major-version: remove this definition - it's defined in the InternalRedirectPolicy message.]
*
*
* Protobuf enum {@code envoy.config.route.v3.RouteAction.InternalRedirectAction}
*/
@java.lang.Deprecated public enum InternalRedirectAction
implements com.google.protobuf.ProtocolMessageEnum {
/**
* PASS_THROUGH_INTERNAL_REDIRECT = 0;
*/
PASS_THROUGH_INTERNAL_REDIRECT(0),
/**
* HANDLE_INTERNAL_REDIRECT = 1;
*/
HANDLE_INTERNAL_REDIRECT(1),
UNRECOGNIZED(-1),
;
/**
* PASS_THROUGH_INTERNAL_REDIRECT = 0;
*/
public static final int PASS_THROUGH_INTERNAL_REDIRECT_VALUE = 0;
/**
* HANDLE_INTERNAL_REDIRECT = 1;
*/
public static final int HANDLE_INTERNAL_REDIRECT_VALUE = 1;
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 InternalRedirectAction 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 InternalRedirectAction forNumber(int value) {
switch (value) {
case 0: return PASS_THROUGH_INTERNAL_REDIRECT;
case 1: return HANDLE_INTERNAL_REDIRECT;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
InternalRedirectAction> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public InternalRedirectAction findValueByNumber(int number) {
return InternalRedirectAction.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.config.route.v3.RouteAction.getDescriptor().getEnumTypes().get(1);
}
private static final InternalRedirectAction[] VALUES = values();
public static InternalRedirectAction 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 InternalRedirectAction(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:envoy.config.route.v3.RouteAction.InternalRedirectAction)
}
public interface RequestMirrorPolicyOrBuilder extends
// @@protoc_insertion_point(interface_extends:envoy.config.route.v3.RouteAction.RequestMirrorPolicy)
com.google.protobuf.MessageOrBuilder {
/**
*
* Only one of ``cluster`` and ``cluster_header`` can be specified.
* [#next-major-version: Need to add back the validation rule: (validate.rules).string = {min_len: 1}]
* Specifies the cluster that requests will be mirrored to. The cluster must
* exist in the cluster manager configuration.
*
* Only one of ``cluster`` and ``cluster_header`` can be specified.
* [#next-major-version: Need to add back the validation rule: (validate.rules).string = {min_len: 1}]
* Specifies the cluster that requests will be mirrored to. The cluster must
* exist in the cluster manager configuration.
*
* Only one of ``cluster`` and ``cluster_header`` can be specified.
* Envoy will determine the cluster to route to by reading the value of the
* HTTP header named by cluster_header from the request headers. Only the first value in header is used,
* and no shadow request will happen if the value is not found in headers. Envoy will not wait for
* the shadow cluster to respond before returning the response from the primary cluster.
* .. attention::
* Internally, Envoy always uses the HTTP/2 ``:authority`` header to represent the HTTP/1
* ``Host`` header. Thus, if attempting to match on ``Host``, match on ``:authority`` instead.
* .. note::
* If the header appears multiple times only the first value is used.
*
* Only one of ``cluster`` and ``cluster_header`` can be specified.
* Envoy will determine the cluster to route to by reading the value of the
* HTTP header named by cluster_header from the request headers. Only the first value in header is used,
* and no shadow request will happen if the value is not found in headers. Envoy will not wait for
* the shadow cluster to respond before returning the response from the primary cluster.
* .. attention::
* Internally, Envoy always uses the HTTP/2 ``:authority`` header to represent the HTTP/1
* ``Host`` header. Thus, if attempting to match on ``Host``, match on ``:authority`` instead.
* .. note::
* If the header appears multiple times only the first value is used.
*
* If not specified, all requests to the target cluster will be mirrored.
* If specified, this field takes precedence over the ``runtime_key`` field and requests must also
* fall under the percentage of matches indicated by this field.
* For some fraction N/D, a random number in the range [0,D) is selected. If the
* number is <= the value of the numerator N, or if the key is not present, the default
* value, the request will be mirrored.
*
*
* .envoy.config.core.v3.RuntimeFractionalPercent runtime_fraction = 3;
* @return Whether the runtimeFraction field is set.
*/
boolean hasRuntimeFraction();
/**
*
* If not specified, all requests to the target cluster will be mirrored.
* If specified, this field takes precedence over the ``runtime_key`` field and requests must also
* fall under the percentage of matches indicated by this field.
* For some fraction N/D, a random number in the range [0,D) is selected. If the
* number is <= the value of the numerator N, or if the key is not present, the default
* value, the request will be mirrored.
*
* If not specified, all requests to the target cluster will be mirrored.
* If specified, this field takes precedence over the ``runtime_key`` field and requests must also
* fall under the percentage of matches indicated by this field.
* For some fraction N/D, a random number in the range [0,D) is selected. If the
* number is <= the value of the numerator N, or if the key is not present, the default
* value, the request will be mirrored.
*
* The router is capable of shadowing traffic from one cluster to another. The current
* implementation is "fire and forget," meaning Envoy will not wait for the shadow cluster to
* respond before returning the response from the primary cluster. All normal statistics are
* collected for the shadow cluster making this feature useful for testing.
* During shadowing, the host/authority header is altered such that ``-shadow`` is appended. This is
* useful for logging. For example, ``cluster1`` becomes ``cluster1-shadow``.
* .. note::
* Shadowing will not be triggered if the primary cluster does not exist.
* .. note::
* Shadowing doesn't support Http CONNECT and upgrades.
* [#next-free-field: 6]
*
*
* Protobuf type {@code envoy.config.route.v3.RouteAction.RequestMirrorPolicy}
*/
public static final class RequestMirrorPolicy extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.config.route.v3.RouteAction.RequestMirrorPolicy)
RequestMirrorPolicyOrBuilder {
private static final long serialVersionUID = 0L;
// Use RequestMirrorPolicy.newBuilder() to construct.
private RequestMirrorPolicy(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private RequestMirrorPolicy() {
cluster_ = "";
clusterHeader_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new RequestMirrorPolicy();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private RequestMirrorPolicy(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
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();
cluster_ = s;
break;
}
case 26: {
io.envoyproxy.envoy.config.core.v3.RuntimeFractionalPercent.Builder subBuilder = null;
if (runtimeFraction_ != null) {
subBuilder = runtimeFraction_.toBuilder();
}
runtimeFraction_ = input.readMessage(io.envoyproxy.envoy.config.core.v3.RuntimeFractionalPercent.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(runtimeFraction_);
runtimeFraction_ = subBuilder.buildPartial();
}
break;
}
case 34: {
com.google.protobuf.BoolValue.Builder subBuilder = null;
if (traceSampled_ != null) {
subBuilder = traceSampled_.toBuilder();
}
traceSampled_ = input.readMessage(com.google.protobuf.BoolValue.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(traceSampled_);
traceSampled_ = subBuilder.buildPartial();
}
break;
}
case 42: {
java.lang.String s = input.readStringRequireUtf8();
clusterHeader_ = s;
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 {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_RequestMirrorPolicy_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_RequestMirrorPolicy_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy.class, io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy.Builder.class);
}
public static final int CLUSTER_FIELD_NUMBER = 1;
private volatile java.lang.Object cluster_;
/**
*
* Only one of ``cluster`` and ``cluster_header`` can be specified.
* [#next-major-version: Need to add back the validation rule: (validate.rules).string = {min_len: 1}]
* Specifies the cluster that requests will be mirrored to. The cluster must
* exist in the cluster manager configuration.
*
* Only one of ``cluster`` and ``cluster_header`` can be specified.
* [#next-major-version: Need to add back the validation rule: (validate.rules).string = {min_len: 1}]
* Specifies the cluster that requests will be mirrored to. The cluster must
* exist in the cluster manager configuration.
*
*
* string cluster = 1 [(.udpa.annotations.field_migrate) = { ... }
* @return The bytes for cluster.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getClusterBytes() {
java.lang.Object ref = cluster_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
cluster_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CLUSTER_HEADER_FIELD_NUMBER = 5;
private volatile java.lang.Object clusterHeader_;
/**
*
* Only one of ``cluster`` and ``cluster_header`` can be specified.
* Envoy will determine the cluster to route to by reading the value of the
* HTTP header named by cluster_header from the request headers. Only the first value in header is used,
* and no shadow request will happen if the value is not found in headers. Envoy will not wait for
* the shadow cluster to respond before returning the response from the primary cluster.
* .. attention::
* Internally, Envoy always uses the HTTP/2 ``:authority`` header to represent the HTTP/1
* ``Host`` header. Thus, if attempting to match on ``Host``, match on ``:authority`` instead.
* .. note::
* If the header appears multiple times only the first value is used.
*
* Only one of ``cluster`` and ``cluster_header`` can be specified.
* Envoy will determine the cluster to route to by reading the value of the
* HTTP header named by cluster_header from the request headers. Only the first value in header is used,
* and no shadow request will happen if the value is not found in headers. Envoy will not wait for
* the shadow cluster to respond before returning the response from the primary cluster.
* .. attention::
* Internally, Envoy always uses the HTTP/2 ``:authority`` header to represent the HTTP/1
* ``Host`` header. Thus, if attempting to match on ``Host``, match on ``:authority`` instead.
* .. note::
* If the header appears multiple times only the first value is used.
*
*
* string cluster_header = 5 [(.validate.rules) = { ... }
* @return The bytes for clusterHeader.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getClusterHeaderBytes() {
java.lang.Object ref = clusterHeader_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
clusterHeader_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int RUNTIME_FRACTION_FIELD_NUMBER = 3;
private io.envoyproxy.envoy.config.core.v3.RuntimeFractionalPercent runtimeFraction_;
/**
*
* If not specified, all requests to the target cluster will be mirrored.
* If specified, this field takes precedence over the ``runtime_key`` field and requests must also
* fall under the percentage of matches indicated by this field.
* For some fraction N/D, a random number in the range [0,D) is selected. If the
* number is <= the value of the numerator N, or if the key is not present, the default
* value, the request will be mirrored.
*
*
* .envoy.config.core.v3.RuntimeFractionalPercent runtime_fraction = 3;
* @return Whether the runtimeFraction field is set.
*/
@java.lang.Override
public boolean hasRuntimeFraction() {
return runtimeFraction_ != null;
}
/**
*
* If not specified, all requests to the target cluster will be mirrored.
* If specified, this field takes precedence over the ``runtime_key`` field and requests must also
* fall under the percentage of matches indicated by this field.
* For some fraction N/D, a random number in the range [0,D) is selected. If the
* number is <= the value of the numerator N, or if the key is not present, the default
* value, the request will be mirrored.
*
* If not specified, all requests to the target cluster will be mirrored.
* If specified, this field takes precedence over the ``runtime_key`` field and requests must also
* fall under the percentage of matches indicated by this field.
* For some fraction N/D, a random number in the range [0,D) is selected. If the
* number is <= the value of the numerator N, or if the key is not present, the default
* value, the request will be mirrored.
*
*
* .envoy.config.core.v3.RuntimeFractionalPercent runtime_fraction = 3;
*/
@java.lang.Override
public io.envoyproxy.envoy.config.core.v3.RuntimeFractionalPercentOrBuilder getRuntimeFractionOrBuilder() {
return getRuntimeFraction();
}
public static final int TRACE_SAMPLED_FIELD_NUMBER = 4;
private com.google.protobuf.BoolValue traceSampled_;
/**
*
* Determines if the trace span should be sampled. Defaults to true.
*
*
* .google.protobuf.BoolValue trace_sampled = 4;
* @return Whether the traceSampled field is set.
*/
@java.lang.Override
public boolean hasTraceSampled() {
return traceSampled_ != null;
}
/**
*
* Determines if the trace span should be sampled. Defaults to true.
*
* Determines if the trace span should be sampled. Defaults to true.
*
*
* .google.protobuf.BoolValue trace_sampled = 4;
*/
@java.lang.Override
public com.google.protobuf.BoolValueOrBuilder getTraceSampledOrBuilder() {
return getTraceSampled();
}
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(cluster_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cluster_);
}
if (runtimeFraction_ != null) {
output.writeMessage(3, getRuntimeFraction());
}
if (traceSampled_ != null) {
output.writeMessage(4, getTraceSampled());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterHeader_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, clusterHeader_);
}
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(cluster_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cluster_);
}
if (runtimeFraction_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getRuntimeFraction());
}
if (traceSampled_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getTraceSampled());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterHeader_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, clusterHeader_);
}
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.config.route.v3.RouteAction.RequestMirrorPolicy)) {
return super.equals(obj);
}
io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy other = (io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy) obj;
if (!getCluster()
.equals(other.getCluster())) return false;
if (!getClusterHeader()
.equals(other.getClusterHeader())) return false;
if (hasRuntimeFraction() != other.hasRuntimeFraction()) return false;
if (hasRuntimeFraction()) {
if (!getRuntimeFraction()
.equals(other.getRuntimeFraction())) return false;
}
if (hasTraceSampled() != other.hasTraceSampled()) return false;
if (hasTraceSampled()) {
if (!getTraceSampled()
.equals(other.getTraceSampled())) 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) + CLUSTER_FIELD_NUMBER;
hash = (53 * hash) + getCluster().hashCode();
hash = (37 * hash) + CLUSTER_HEADER_FIELD_NUMBER;
hash = (53 * hash) + getClusterHeader().hashCode();
if (hasRuntimeFraction()) {
hash = (37 * hash) + RUNTIME_FRACTION_FIELD_NUMBER;
hash = (53 * hash) + getRuntimeFraction().hashCode();
}
if (hasTraceSampled()) {
hash = (37 * hash) + TRACE_SAMPLED_FIELD_NUMBER;
hash = (53 * hash) + getTraceSampled().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy 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 router is capable of shadowing traffic from one cluster to another. The current
* implementation is "fire and forget," meaning Envoy will not wait for the shadow cluster to
* respond before returning the response from the primary cluster. All normal statistics are
* collected for the shadow cluster making this feature useful for testing.
* During shadowing, the host/authority header is altered such that ``-shadow`` is appended. This is
* useful for logging. For example, ``cluster1`` becomes ``cluster1-shadow``.
* .. note::
* Shadowing will not be triggered if the primary cluster does not exist.
* .. note::
* Shadowing doesn't support Http CONNECT and upgrades.
* [#next-free-field: 6]
*
*
* Protobuf type {@code envoy.config.route.v3.RouteAction.RequestMirrorPolicy}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.config.route.v3.RouteAction.RequestMirrorPolicy)
io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicyOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_RequestMirrorPolicy_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_RequestMirrorPolicy_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy.class, io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy.Builder.class);
}
// Construct using io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
cluster_ = "";
clusterHeader_ = "";
if (runtimeFractionBuilder_ == null) {
runtimeFraction_ = null;
} else {
runtimeFraction_ = null;
runtimeFractionBuilder_ = null;
}
if (traceSampledBuilder_ == null) {
traceSampled_ = null;
} else {
traceSampled_ = null;
traceSampledBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_RequestMirrorPolicy_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy getDefaultInstanceForType() {
return io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy build() {
io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy buildPartial() {
io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy result = new io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy(this);
result.cluster_ = cluster_;
result.clusterHeader_ = clusterHeader_;
if (runtimeFractionBuilder_ == null) {
result.runtimeFraction_ = runtimeFraction_;
} else {
result.runtimeFraction_ = runtimeFractionBuilder_.build();
}
if (traceSampledBuilder_ == null) {
result.traceSampled_ = traceSampled_;
} else {
result.traceSampled_ = traceSampledBuilder_.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.config.route.v3.RouteAction.RequestMirrorPolicy) {
return mergeFrom((io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy other) {
if (other == io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy.getDefaultInstance()) return this;
if (!other.getCluster().isEmpty()) {
cluster_ = other.cluster_;
onChanged();
}
if (!other.getClusterHeader().isEmpty()) {
clusterHeader_ = other.clusterHeader_;
onChanged();
}
if (other.hasRuntimeFraction()) {
mergeRuntimeFraction(other.getRuntimeFraction());
}
if (other.hasTraceSampled()) {
mergeTraceSampled(other.getTraceSampled());
}
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.config.route.v3.RouteAction.RequestMirrorPolicy parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object cluster_ = "";
/**
*
* Only one of ``cluster`` and ``cluster_header`` can be specified.
* [#next-major-version: Need to add back the validation rule: (validate.rules).string = {min_len: 1}]
* Specifies the cluster that requests will be mirrored to. The cluster must
* exist in the cluster manager configuration.
*
* Only one of ``cluster`` and ``cluster_header`` can be specified.
* [#next-major-version: Need to add back the validation rule: (validate.rules).string = {min_len: 1}]
* Specifies the cluster that requests will be mirrored to. The cluster must
* exist in the cluster manager configuration.
*
* Only one of ``cluster`` and ``cluster_header`` can be specified.
* [#next-major-version: Need to add back the validation rule: (validate.rules).string = {min_len: 1}]
* Specifies the cluster that requests will be mirrored to. The cluster must
* exist in the cluster manager configuration.
*
*
* string cluster = 1 [(.udpa.annotations.field_migrate) = { ... }
* @param value The cluster to set.
* @return This builder for chaining.
*/
public Builder setCluster(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
cluster_ = value;
onChanged();
return this;
}
/**
*
* Only one of ``cluster`` and ``cluster_header`` can be specified.
* [#next-major-version: Need to add back the validation rule: (validate.rules).string = {min_len: 1}]
* Specifies the cluster that requests will be mirrored to. The cluster must
* exist in the cluster manager configuration.
*
* Only one of ``cluster`` and ``cluster_header`` can be specified.
* [#next-major-version: Need to add back the validation rule: (validate.rules).string = {min_len: 1}]
* Specifies the cluster that requests will be mirrored to. The cluster must
* exist in the cluster manager configuration.
*
*
* string cluster = 1 [(.udpa.annotations.field_migrate) = { ... }
* @param value The bytes for cluster to set.
* @return This builder for chaining.
*/
public Builder setClusterBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
cluster_ = value;
onChanged();
return this;
}
private java.lang.Object clusterHeader_ = "";
/**
*
* Only one of ``cluster`` and ``cluster_header`` can be specified.
* Envoy will determine the cluster to route to by reading the value of the
* HTTP header named by cluster_header from the request headers. Only the first value in header is used,
* and no shadow request will happen if the value is not found in headers. Envoy will not wait for
* the shadow cluster to respond before returning the response from the primary cluster.
* .. attention::
* Internally, Envoy always uses the HTTP/2 ``:authority`` header to represent the HTTP/1
* ``Host`` header. Thus, if attempting to match on ``Host``, match on ``:authority`` instead.
* .. note::
* If the header appears multiple times only the first value is used.
*
* Only one of ``cluster`` and ``cluster_header`` can be specified.
* Envoy will determine the cluster to route to by reading the value of the
* HTTP header named by cluster_header from the request headers. Only the first value in header is used,
* and no shadow request will happen if the value is not found in headers. Envoy will not wait for
* the shadow cluster to respond before returning the response from the primary cluster.
* .. attention::
* Internally, Envoy always uses the HTTP/2 ``:authority`` header to represent the HTTP/1
* ``Host`` header. Thus, if attempting to match on ``Host``, match on ``:authority`` instead.
* .. note::
* If the header appears multiple times only the first value is used.
*
* Only one of ``cluster`` and ``cluster_header`` can be specified.
* Envoy will determine the cluster to route to by reading the value of the
* HTTP header named by cluster_header from the request headers. Only the first value in header is used,
* and no shadow request will happen if the value is not found in headers. Envoy will not wait for
* the shadow cluster to respond before returning the response from the primary cluster.
* .. attention::
* Internally, Envoy always uses the HTTP/2 ``:authority`` header to represent the HTTP/1
* ``Host`` header. Thus, if attempting to match on ``Host``, match on ``:authority`` instead.
* .. note::
* If the header appears multiple times only the first value is used.
*
*
* string cluster_header = 5 [(.validate.rules) = { ... }
* @param value The clusterHeader to set.
* @return This builder for chaining.
*/
public Builder setClusterHeader(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
clusterHeader_ = value;
onChanged();
return this;
}
/**
*
* Only one of ``cluster`` and ``cluster_header`` can be specified.
* Envoy will determine the cluster to route to by reading the value of the
* HTTP header named by cluster_header from the request headers. Only the first value in header is used,
* and no shadow request will happen if the value is not found in headers. Envoy will not wait for
* the shadow cluster to respond before returning the response from the primary cluster.
* .. attention::
* Internally, Envoy always uses the HTTP/2 ``:authority`` header to represent the HTTP/1
* ``Host`` header. Thus, if attempting to match on ``Host``, match on ``:authority`` instead.
* .. note::
* If the header appears multiple times only the first value is used.
*
* Only one of ``cluster`` and ``cluster_header`` can be specified.
* Envoy will determine the cluster to route to by reading the value of the
* HTTP header named by cluster_header from the request headers. Only the first value in header is used,
* and no shadow request will happen if the value is not found in headers. Envoy will not wait for
* the shadow cluster to respond before returning the response from the primary cluster.
* .. attention::
* Internally, Envoy always uses the HTTP/2 ``:authority`` header to represent the HTTP/1
* ``Host`` header. Thus, if attempting to match on ``Host``, match on ``:authority`` instead.
* .. note::
* If the header appears multiple times only the first value is used.
*
*
* string cluster_header = 5 [(.validate.rules) = { ... }
* @param value The bytes for clusterHeader to set.
* @return This builder for chaining.
*/
public Builder setClusterHeaderBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
clusterHeader_ = value;
onChanged();
return this;
}
private io.envoyproxy.envoy.config.core.v3.RuntimeFractionalPercent runtimeFraction_;
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.core.v3.RuntimeFractionalPercent, io.envoyproxy.envoy.config.core.v3.RuntimeFractionalPercent.Builder, io.envoyproxy.envoy.config.core.v3.RuntimeFractionalPercentOrBuilder> runtimeFractionBuilder_;
/**
*
* If not specified, all requests to the target cluster will be mirrored.
* If specified, this field takes precedence over the ``runtime_key`` field and requests must also
* fall under the percentage of matches indicated by this field.
* For some fraction N/D, a random number in the range [0,D) is selected. If the
* number is <= the value of the numerator N, or if the key is not present, the default
* value, the request will be mirrored.
*
*
* .envoy.config.core.v3.RuntimeFractionalPercent runtime_fraction = 3;
* @return Whether the runtimeFraction field is set.
*/
public boolean hasRuntimeFraction() {
return runtimeFractionBuilder_ != null || runtimeFraction_ != null;
}
/**
*
* If not specified, all requests to the target cluster will be mirrored.
* If specified, this field takes precedence over the ``runtime_key`` field and requests must also
* fall under the percentage of matches indicated by this field.
* For some fraction N/D, a random number in the range [0,D) is selected. If the
* number is <= the value of the numerator N, or if the key is not present, the default
* value, the request will be mirrored.
*
* If not specified, all requests to the target cluster will be mirrored.
* If specified, this field takes precedence over the ``runtime_key`` field and requests must also
* fall under the percentage of matches indicated by this field.
* For some fraction N/D, a random number in the range [0,D) is selected. If the
* number is <= the value of the numerator N, or if the key is not present, the default
* value, the request will be mirrored.
*
*
* .envoy.config.core.v3.RuntimeFractionalPercent runtime_fraction = 3;
*/
public Builder setRuntimeFraction(io.envoyproxy.envoy.config.core.v3.RuntimeFractionalPercent value) {
if (runtimeFractionBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
runtimeFraction_ = value;
onChanged();
} else {
runtimeFractionBuilder_.setMessage(value);
}
return this;
}
/**
*
* If not specified, all requests to the target cluster will be mirrored.
* If specified, this field takes precedence over the ``runtime_key`` field and requests must also
* fall under the percentage of matches indicated by this field.
* For some fraction N/D, a random number in the range [0,D) is selected. If the
* number is <= the value of the numerator N, or if the key is not present, the default
* value, the request will be mirrored.
*
* If not specified, all requests to the target cluster will be mirrored.
* If specified, this field takes precedence over the ``runtime_key`` field and requests must also
* fall under the percentage of matches indicated by this field.
* For some fraction N/D, a random number in the range [0,D) is selected. If the
* number is <= the value of the numerator N, or if the key is not present, the default
* value, the request will be mirrored.
*
* If not specified, all requests to the target cluster will be mirrored.
* If specified, this field takes precedence over the ``runtime_key`` field and requests must also
* fall under the percentage of matches indicated by this field.
* For some fraction N/D, a random number in the range [0,D) is selected. If the
* number is <= the value of the numerator N, or if the key is not present, the default
* value, the request will be mirrored.
*
* If not specified, all requests to the target cluster will be mirrored.
* If specified, this field takes precedence over the ``runtime_key`` field and requests must also
* fall under the percentage of matches indicated by this field.
* For some fraction N/D, a random number in the range [0,D) is selected. If the
* number is <= the value of the numerator N, or if the key is not present, the default
* value, the request will be mirrored.
*
* If not specified, all requests to the target cluster will be mirrored.
* If specified, this field takes precedence over the ``runtime_key`` field and requests must also
* fall under the percentage of matches indicated by this field.
* For some fraction N/D, a random number in the range [0,D) is selected. If the
* number is <= the value of the numerator N, or if the key is not present, the default
* value, the request will be mirrored.
*
* If not specified, all requests to the target cluster will be mirrored.
* If specified, this field takes precedence over the ``runtime_key`` field and requests must also
* fall under the percentage of matches indicated by this field.
* For some fraction N/D, a random number in the range [0,D) is selected. If the
* number is <= the value of the numerator N, or if the key is not present, the default
* value, the request will be mirrored.
*
* The flag that short-circuits the hash computing. This field provides a
* 'fallback' style of configuration: "if a terminal policy doesn't work,
* fallback to rest of the policy list", it saves time when the terminal
* policy works.
* If true, and there is already a hash computed, ignore rest of the
* list of hash polices.
* For example, if the following hash methods are configured:
* ========= ========
* specifier terminal
* ========= ========
* Header A true
* Header B false
* Header C false
* ========= ========
* The generateHash process ends if policy "header A" generates a hash, as
* it's a terminal policy.
*
*
* bool terminal = 4;
* @return The terminal.
*/
boolean getTerminal();
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.PolicySpecifierCase getPolicySpecifierCase();
}
/**
*
* Specifies the route's hashing policy if the upstream cluster uses a hashing :ref:`load balancer
* <arch_overview_load_balancing_types>`.
* [#next-free-field: 7]
*
*
* Protobuf type {@code envoy.config.route.v3.RouteAction.HashPolicy}
*/
public static final class HashPolicy extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.config.route.v3.RouteAction.HashPolicy)
HashPolicyOrBuilder {
private static final long serialVersionUID = 0L;
// Use HashPolicy.newBuilder() to construct.
private HashPolicy(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private HashPolicy() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new HashPolicy();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private HashPolicy(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
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: {
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header.Builder subBuilder = null;
if (policySpecifierCase_ == 1) {
subBuilder = ((io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header) policySpecifier_).toBuilder();
}
policySpecifier_ =
input.readMessage(io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header) policySpecifier_);
policySpecifier_ = subBuilder.buildPartial();
}
policySpecifierCase_ = 1;
break;
}
case 18: {
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie.Builder subBuilder = null;
if (policySpecifierCase_ == 2) {
subBuilder = ((io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie) policySpecifier_).toBuilder();
}
policySpecifier_ =
input.readMessage(io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie) policySpecifier_);
policySpecifier_ = subBuilder.buildPartial();
}
policySpecifierCase_ = 2;
break;
}
case 26: {
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties.Builder subBuilder = null;
if (policySpecifierCase_ == 3) {
subBuilder = ((io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties) policySpecifier_).toBuilder();
}
policySpecifier_ =
input.readMessage(io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties) policySpecifier_);
policySpecifier_ = subBuilder.buildPartial();
}
policySpecifierCase_ = 3;
break;
}
case 32: {
terminal_ = input.readBool();
break;
}
case 42: {
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter.Builder subBuilder = null;
if (policySpecifierCase_ == 5) {
subBuilder = ((io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter) policySpecifier_).toBuilder();
}
policySpecifier_ =
input.readMessage(io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter) policySpecifier_);
policySpecifier_ = subBuilder.buildPartial();
}
policySpecifierCase_ = 5;
break;
}
case 50: {
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.FilterState.Builder subBuilder = null;
if (policySpecifierCase_ == 6) {
subBuilder = ((io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.FilterState) policySpecifier_).toBuilder();
}
policySpecifier_ =
input.readMessage(io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.FilterState.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.FilterState) policySpecifier_);
policySpecifier_ = subBuilder.buildPartial();
}
policySpecifierCase_ = 6;
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 {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_HashPolicy_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_HashPolicy_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.class, io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Builder.class);
}
public interface HeaderOrBuilder extends
// @@protoc_insertion_point(interface_extends:envoy.config.route.v3.RouteAction.HashPolicy.Header)
com.google.protobuf.MessageOrBuilder {
/**
*
* The name of the request header that will be used to obtain the hash
* key. If the request header is not present, no hash will be produced.
*
*
* 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 name of the cookie attribute.
*
*
* 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 name of the cookie attribute.
*
*
* string name = 1 [(.validate.rules) = { ... }
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
*
* The name of the cookie attribute.
*
*
* 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 java.lang.Object value_ = "";
/**
*
*
* string value = 2 [(.validate.rules) = { ... }
* @return The bytes for value.
*/
public com.google.protobuf.ByteString
getValueBytes() {
java.lang.Object ref = value_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
value_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The optional value of the cookie attribute.
*
*
* string value = 2 [(.validate.rules) = { ... }
* @param value The value to set.
* @return This builder for chaining.
*/
public Builder setValue(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
value_ = value;
onChanged();
return this;
}
/**
*
* The optional value of the cookie attribute.
*
*
* string value = 2 [(.validate.rules) = { ... }
* @return This builder for chaining.
*/
public Builder clearValue() {
value_ = getDefaultInstance().getValue();
onChanged();
return this;
}
/**
*
* The optional value of the cookie attribute.
*
*
* string value = 2 [(.validate.rules) = { ... }
* @param value The bytes for value to set.
* @return This builder for chaining.
*/
public Builder setValueBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
value_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:envoy.config.route.v3.RouteAction.HashPolicy.CookieAttribute)
}
// @@protoc_insertion_point(class_scope:envoy.config.route.v3.RouteAction.HashPolicy.CookieAttribute)
private static final io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.CookieAttribute DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.CookieAttribute();
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.CookieAttribute getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public CookieAttribute parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new CookieAttribute(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.config.route.v3.RouteAction.HashPolicy.CookieAttribute getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface CookieOrBuilder extends
// @@protoc_insertion_point(interface_extends:envoy.config.route.v3.RouteAction.HashPolicy.Cookie)
com.google.protobuf.MessageOrBuilder {
/**
*
* The name of the cookie that will be used to obtain the hash key. If the
* cookie is not present and ttl below is not set, no hash will be
* produced.
*
*
* string name = 1 [(.validate.rules) = { ... }
* @return The name.
*/
java.lang.String getName();
/**
*
* The name of the cookie that will be used to obtain the hash key. If the
* cookie is not present and ttl below is not set, no hash will be
* produced.
*
*
* string name = 1 [(.validate.rules) = { ... }
* @return The bytes for name.
*/
com.google.protobuf.ByteString
getNameBytes();
/**
*
* If specified, a cookie with the TTL will be generated if the cookie is
* not present. If the TTL is present and zero, the generated cookie will
* be a session cookie.
*
*
* .google.protobuf.Duration ttl = 2;
* @return Whether the ttl field is set.
*/
boolean hasTtl();
/**
*
* If specified, a cookie with the TTL will be generated if the cookie is
* not present. If the TTL is present and zero, the generated cookie will
* be a session cookie.
*
* If specified, a cookie with the TTL will be generated if the cookie is
* not present. If the TTL is present and zero, the generated cookie will
* be a session cookie.
*
* Envoy supports two types of cookie affinity:
* 1. Passive. Envoy takes a cookie that's present in the cookies header and
* hashes on its value.
* 2. Generated. Envoy generates and sets a cookie with an expiration (TTL)
* on the first request from the client in its response to the client,
* based on the endpoint the request gets sent to. The client then
* presents this on the next and all subsequent requests. The hash of
* this is sufficient to ensure these requests get sent to the same
* endpoint. The cookie is generated by hashing the source and
* destination ports and addresses so that multiple independent HTTP2
* streams on the same connection will independently receive the same
* cookie, even if they arrive at the Envoy simultaneously.
*
*
* Protobuf type {@code envoy.config.route.v3.RouteAction.HashPolicy.Cookie}
*/
public static final class Cookie extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.config.route.v3.RouteAction.HashPolicy.Cookie)
CookieOrBuilder {
private static final long serialVersionUID = 0L;
// Use Cookie.newBuilder() to construct.
private Cookie(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Cookie() {
name_ = "";
path_ = "";
attributes_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Cookie();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Cookie(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
name_ = s;
break;
}
case 18: {
com.google.protobuf.Duration.Builder subBuilder = null;
if (ttl_ != null) {
subBuilder = ttl_.toBuilder();
}
ttl_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(ttl_);
ttl_ = subBuilder.buildPartial();
}
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
path_ = s;
break;
}
case 34: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
attributes_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
attributes_.add(
input.readMessage(io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.CookieAttribute.parser(), extensionRegistry));
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)) {
attributes_ = java.util.Collections.unmodifiableList(attributes_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_HashPolicy_Cookie_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_HashPolicy_Cookie_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie.class, io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie.Builder.class);
}
public static final int NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object name_;
/**
*
* The name of the cookie that will be used to obtain the hash key. If the
* cookie is not present and ttl below is not set, no hash will be
* produced.
*
* The name of the cookie that will be used to obtain the hash key. If the
* cookie is not present and ttl below is not set, no hash will be
* produced.
*
*
* 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 TTL_FIELD_NUMBER = 2;
private com.google.protobuf.Duration ttl_;
/**
*
* If specified, a cookie with the TTL will be generated if the cookie is
* not present. If the TTL is present and zero, the generated cookie will
* be a session cookie.
*
*
* .google.protobuf.Duration ttl = 2;
* @return Whether the ttl field is set.
*/
@java.lang.Override
public boolean hasTtl() {
return ttl_ != null;
}
/**
*
* If specified, a cookie with the TTL will be generated if the cookie is
* not present. If the TTL is present and zero, the generated cookie will
* be a session cookie.
*
* If specified, a cookie with the TTL will be generated if the cookie is
* not present. If the TTL is present and zero, the generated cookie will
* be a session cookie.
*
*
* .google.protobuf.Duration ttl = 2;
*/
@java.lang.Override
public com.google.protobuf.DurationOrBuilder getTtlOrBuilder() {
return getTtl();
}
public static final int PATH_FIELD_NUMBER = 3;
private volatile java.lang.Object path_;
/**
*
* The name of the path for the cookie. If no path is specified here, no path
* will be set for the cookie.
*
* Additional attributes for the cookie. They will be used when generating a new cookie.
*
*
* repeated .envoy.config.route.v3.RouteAction.HashPolicy.CookieAttribute attributes = 4;
*/
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.CookieAttributeOrBuilder getAttributesOrBuilder(
int index) {
return attributes_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (ttl_ != null) {
output.writeMessage(2, getTtl());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, path_);
}
for (int i = 0; i < attributes_.size(); i++) {
output.writeMessage(4, attributes_.get(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
if (ttl_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getTtl());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, path_);
}
for (int i = 0; i < attributes_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, attributes_.get(i));
}
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.config.route.v3.RouteAction.HashPolicy.Cookie)) {
return super.equals(obj);
}
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie other = (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie) obj;
if (!getName()
.equals(other.getName())) return false;
if (hasTtl() != other.hasTtl()) return false;
if (hasTtl()) {
if (!getTtl()
.equals(other.getTtl())) return false;
}
if (!getPath()
.equals(other.getPath())) return false;
if (!getAttributesList()
.equals(other.getAttributesList())) 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 (hasTtl()) {
hash = (37 * hash) + TTL_FIELD_NUMBER;
hash = (53 * hash) + getTtl().hashCode();
}
hash = (37 * hash) + PATH_FIELD_NUMBER;
hash = (53 * hash) + getPath().hashCode();
if (getAttributesCount() > 0) {
hash = (37 * hash) + ATTRIBUTES_FIELD_NUMBER;
hash = (53 * hash) + getAttributesList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie 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;
}
/**
*
* Envoy supports two types of cookie affinity:
* 1. Passive. Envoy takes a cookie that's present in the cookies header and
* hashes on its value.
* 2. Generated. Envoy generates and sets a cookie with an expiration (TTL)
* on the first request from the client in its response to the client,
* based on the endpoint the request gets sent to. The client then
* presents this on the next and all subsequent requests. The hash of
* this is sufficient to ensure these requests get sent to the same
* endpoint. The cookie is generated by hashing the source and
* destination ports and addresses so that multiple independent HTTP2
* streams on the same connection will independently receive the same
* cookie, even if they arrive at the Envoy simultaneously.
*
* The name of the cookie that will be used to obtain the hash key. If the
* cookie is not present and ttl below is not set, no hash will be
* produced.
*
* The name of the cookie that will be used to obtain the hash key. If the
* cookie is not present and ttl below is not set, no hash will be
* produced.
*
*
* 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 name of the cookie that will be used to obtain the hash key. If the
* cookie is not present and ttl below is not set, no hash will be
* produced.
*
*
* 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 name of the cookie that will be used to obtain the hash key. If the
* cookie is not present and ttl below is not set, no hash will be
* produced.
*
*
* string name = 1 [(.validate.rules) = { ... }
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
*
* The name of the cookie that will be used to obtain the hash key. If the
* cookie is not present and ttl below is not set, no hash will be
* produced.
*
*
* 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.Duration ttl_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> ttlBuilder_;
/**
*
* If specified, a cookie with the TTL will be generated if the cookie is
* not present. If the TTL is present and zero, the generated cookie will
* be a session cookie.
*
*
* .google.protobuf.Duration ttl = 2;
* @return Whether the ttl field is set.
*/
public boolean hasTtl() {
return ttlBuilder_ != null || ttl_ != null;
}
/**
*
* If specified, a cookie with the TTL will be generated if the cookie is
* not present. If the TTL is present and zero, the generated cookie will
* be a session cookie.
*
* If specified, a cookie with the TTL will be generated if the cookie is
* not present. If the TTL is present and zero, the generated cookie will
* be a session cookie.
*
*
* .google.protobuf.Duration ttl = 2;
*/
public Builder setTtl(com.google.protobuf.Duration value) {
if (ttlBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ttl_ = value;
onChanged();
} else {
ttlBuilder_.setMessage(value);
}
return this;
}
/**
*
* If specified, a cookie with the TTL will be generated if the cookie is
* not present. If the TTL is present and zero, the generated cookie will
* be a session cookie.
*
* If specified, a cookie with the TTL will be generated if the cookie is
* not present. If the TTL is present and zero, the generated cookie will
* be a session cookie.
*
* If specified, a cookie with the TTL will be generated if the cookie is
* not present. If the TTL is present and zero, the generated cookie will
* be a session cookie.
*
* If specified, a cookie with the TTL will be generated if the cookie is
* not present. If the TTL is present and zero, the generated cookie will
* be a session cookie.
*
* If specified, a cookie with the TTL will be generated if the cookie is
* not present. If the TTL is present and zero, the generated cookie will
* be a session cookie.
*
* If specified, a cookie with the TTL will be generated if the cookie is
* not present. If the TTL is present and zero, the generated cookie will
* be a session cookie.
*
*
* bool source_ip = 1;
* @param value The sourceIp to set.
* @return This builder for chaining.
*/
public Builder setSourceIp(boolean value) {
sourceIp_ = value;
onChanged();
return this;
}
/**
*
* Hash on source IP address.
*
*
* bool source_ip = 1;
* @return This builder for chaining.
*/
public Builder clearSourceIp() {
sourceIp_ = false;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties)
}
// @@protoc_insertion_point(class_scope:envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties)
private static final io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties();
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ConnectionProperties parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ConnectionProperties(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.config.route.v3.RouteAction.HashPolicy.ConnectionProperties getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface QueryParameterOrBuilder extends
// @@protoc_insertion_point(interface_extends:envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter)
com.google.protobuf.MessageOrBuilder {
/**
*
* The name of the URL query parameter that will be used to obtain the hash
* key. If the parameter is not present, no hash will be produced. Query
* parameter names are case-sensitive. If query parameters are repeated, only
* the first value will be considered.
*
*
* string name = 1 [(.validate.rules) = { ... }
* @return The name.
*/
java.lang.String getName();
/**
*
* The name of the URL query parameter that will be used to obtain the hash
* key. If the parameter is not present, no hash will be produced. Query
* parameter names are case-sensitive. If query parameters are repeated, only
* the first value will be considered.
*
*
* string name = 1 [(.validate.rules) = { ... }
* @return The bytes for name.
*/
com.google.protobuf.ByteString
getNameBytes();
}
/**
* Protobuf type {@code envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter}
*/
public static final class QueryParameter extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter)
QueryParameterOrBuilder {
private static final long serialVersionUID = 0L;
// Use QueryParameter.newBuilder() to construct.
private QueryParameter(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private QueryParameter() {
name_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new QueryParameter();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private QueryParameter(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
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;
}
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 {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_HashPolicy_QueryParameter_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_HashPolicy_QueryParameter_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter.class, io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter.Builder.class);
}
public static final int NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object name_;
/**
*
* The name of the URL query parameter that will be used to obtain the hash
* key. If the parameter is not present, no hash will be produced. Query
* parameter names are case-sensitive. If query parameters are repeated, only
* the first value will be considered.
*
* The name of the URL query parameter that will be used to obtain the hash
* key. If the parameter is not present, no hash will be produced. Query
* parameter names are case-sensitive. If query parameters are repeated, only
* the first value will be considered.
*
*
* 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;
}
}
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_);
}
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_);
}
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.config.route.v3.RouteAction.HashPolicy.QueryParameter)) {
return super.equals(obj);
}
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter other = (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter) obj;
if (!getName()
.equals(other.getName())) 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();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter 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;
}
/**
* Protobuf type {@code envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter)
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameterOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_HashPolicy_QueryParameter_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_HashPolicy_QueryParameter_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter.class, io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter.Builder.class);
}
// Construct using io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
name_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_HashPolicy_QueryParameter_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter getDefaultInstanceForType() {
return io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter build() {
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter buildPartial() {
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter result = new io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter(this);
result.name_ = name_;
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.config.route.v3.RouteAction.HashPolicy.QueryParameter) {
return mergeFrom((io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter other) {
if (other == io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object name_ = "";
/**
*
* The name of the URL query parameter that will be used to obtain the hash
* key. If the parameter is not present, no hash will be produced. Query
* parameter names are case-sensitive. If query parameters are repeated, only
* the first value will be considered.
*
* The name of the URL query parameter that will be used to obtain the hash
* key. If the parameter is not present, no hash will be produced. Query
* parameter names are case-sensitive. If query parameters are repeated, only
* the first value will be considered.
*
*
* 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 name of the URL query parameter that will be used to obtain the hash
* key. If the parameter is not present, no hash will be produced. Query
* parameter names are case-sensitive. If query parameters are repeated, only
* the first value will be considered.
*
*
* 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 name of the URL query parameter that will be used to obtain the hash
* key. If the parameter is not present, no hash will be produced. Query
* parameter names are case-sensitive. If query parameters are repeated, only
* the first value will be considered.
*
*
* string name = 1 [(.validate.rules) = { ... }
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
*
* The name of the URL query parameter that will be used to obtain the hash
* key. If the parameter is not present, no hash will be produced. Query
* parameter names are case-sensitive. If query parameters are repeated, only
* the first value will be considered.
*
*
* 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;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter)
}
// @@protoc_insertion_point(class_scope:envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter)
private static final io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter();
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public QueryParameter parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new QueryParameter(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.config.route.v3.RouteAction.HashPolicy.QueryParameter getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface FilterStateOrBuilder extends
// @@protoc_insertion_point(interface_extends:envoy.config.route.v3.RouteAction.HashPolicy.FilterState)
com.google.protobuf.MessageOrBuilder {
/**
*
* The name of the Object in the per-request filterState, which is an
* Envoy::Hashable object. If there is no data associated with the key,
* or the stored object is not Envoy::Hashable, no hash will be produced.
*
* The name of the Object in the per-request filterState, which is an
* Envoy::Hashable object. If there is no data associated with the key,
* or the stored object is not Envoy::Hashable, no hash will be produced.
*
*
* string key = 1 [(.validate.rules) = { ... }
* @return The bytes for key.
*/
com.google.protobuf.ByteString
getKeyBytes();
}
/**
* Protobuf type {@code envoy.config.route.v3.RouteAction.HashPolicy.FilterState}
*/
public static final class FilterState extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.config.route.v3.RouteAction.HashPolicy.FilterState)
FilterStateOrBuilder {
private static final long serialVersionUID = 0L;
// Use FilterState.newBuilder() to construct.
private FilterState(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private FilterState() {
key_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new FilterState();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private FilterState(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
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();
key_ = s;
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 {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_HashPolicy_FilterState_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_HashPolicy_FilterState_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.FilterState.class, io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.FilterState.Builder.class);
}
public static final int KEY_FIELD_NUMBER = 1;
private volatile java.lang.Object key_;
/**
*
* The name of the Object in the per-request filterState, which is an
* Envoy::Hashable object. If there is no data associated with the key,
* or the stored object is not Envoy::Hashable, no hash will be produced.
*
* The name of the Object in the per-request filterState, which is an
* Envoy::Hashable object. If there is no data associated with the key,
* or the stored object is not Envoy::Hashable, no hash will be produced.
*
*
* string key = 1 [(.validate.rules) = { ... }
* @return The bytes for key.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getKeyBytes() {
java.lang.Object ref = key_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
key_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_);
}
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(key_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_);
}
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.config.route.v3.RouteAction.HashPolicy.FilterState)) {
return super.equals(obj);
}
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.FilterState other = (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.FilterState) obj;
if (!getKey()
.equals(other.getKey())) 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) + KEY_FIELD_NUMBER;
hash = (53 * hash) + getKey().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.FilterState parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.FilterState parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.FilterState parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.FilterState parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.FilterState parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.FilterState parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.FilterState parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.FilterState parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.FilterState parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.FilterState parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.FilterState parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.FilterState parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.FilterState 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;
}
/**
* Protobuf type {@code envoy.config.route.v3.RouteAction.HashPolicy.FilterState}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.config.route.v3.RouteAction.HashPolicy.FilterState)
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.FilterStateOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_HashPolicy_FilterState_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_HashPolicy_FilterState_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.FilterState.class, io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.FilterState.Builder.class);
}
// Construct using io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.FilterState.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
key_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_HashPolicy_FilterState_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.FilterState getDefaultInstanceForType() {
return io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.FilterState.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.FilterState build() {
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.FilterState result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.FilterState buildPartial() {
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.FilterState result = new io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.FilterState(this);
result.key_ = key_;
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.config.route.v3.RouteAction.HashPolicy.FilterState) {
return mergeFrom((io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.FilterState)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.FilterState other) {
if (other == io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.FilterState.getDefaultInstance()) return this;
if (!other.getKey().isEmpty()) {
key_ = other.key_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.FilterState parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.FilterState) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object key_ = "";
/**
*
* The name of the Object in the per-request filterState, which is an
* Envoy::Hashable object. If there is no data associated with the key,
* or the stored object is not Envoy::Hashable, no hash will be produced.
*
* The name of the Object in the per-request filterState, which is an
* Envoy::Hashable object. If there is no data associated with the key,
* or the stored object is not Envoy::Hashable, no hash will be produced.
*
* The name of the Object in the per-request filterState, which is an
* Envoy::Hashable object. If there is no data associated with the key,
* or the stored object is not Envoy::Hashable, no hash will be produced.
*
*
* string key = 1 [(.validate.rules) = { ... }
* @param value The key to set.
* @return This builder for chaining.
*/
public Builder setKey(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
key_ = value;
onChanged();
return this;
}
/**
*
* The name of the Object in the per-request filterState, which is an
* Envoy::Hashable object. If there is no data associated with the key,
* or the stored object is not Envoy::Hashable, no hash will be produced.
*
* The name of the Object in the per-request filterState, which is an
* Envoy::Hashable object. If there is no data associated with the key,
* or the stored object is not Envoy::Hashable, no hash will be produced.
*
*
* string key = 1 [(.validate.rules) = { ... }
* @param value The bytes for key to set.
* @return This builder for chaining.
*/
public Builder setKeyBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
key_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:envoy.config.route.v3.RouteAction.HashPolicy.FilterState)
}
// @@protoc_insertion_point(class_scope:envoy.config.route.v3.RouteAction.HashPolicy.FilterState)
private static final io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.FilterState DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.FilterState();
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.FilterState getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public FilterState parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new FilterState(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.config.route.v3.RouteAction.HashPolicy.FilterState getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int policySpecifierCase_ = 0;
private java.lang.Object policySpecifier_;
public enum PolicySpecifierCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
HEADER(1),
COOKIE(2),
CONNECTION_PROPERTIES(3),
QUERY_PARAMETER(5),
FILTER_STATE(6),
POLICYSPECIFIER_NOT_SET(0);
private final int value;
private PolicySpecifierCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static PolicySpecifierCase valueOf(int value) {
return forNumber(value);
}
public static PolicySpecifierCase forNumber(int value) {
switch (value) {
case 1: return HEADER;
case 2: return COOKIE;
case 3: return CONNECTION_PROPERTIES;
case 5: return QUERY_PARAMETER;
case 6: return FILTER_STATE;
case 0: return POLICYSPECIFIER_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public PolicySpecifierCase
getPolicySpecifierCase() {
return PolicySpecifierCase.forNumber(
policySpecifierCase_);
}
public static final int HEADER_FIELD_NUMBER = 1;
/**
*
* Header hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.Header header = 1;
* @return Whether the header field is set.
*/
@java.lang.Override
public boolean hasHeader() {
return policySpecifierCase_ == 1;
}
/**
*
* Header hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.Header header = 1;
* @return The header.
*/
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header getHeader() {
if (policySpecifierCase_ == 1) {
return (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header) policySpecifier_;
}
return io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header.getDefaultInstance();
}
/**
*
* Header hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.Header header = 1;
*/
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.HeaderOrBuilder getHeaderOrBuilder() {
if (policySpecifierCase_ == 1) {
return (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header) policySpecifier_;
}
return io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header.getDefaultInstance();
}
public static final int COOKIE_FIELD_NUMBER = 2;
/**
*
* Cookie hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.Cookie cookie = 2;
* @return Whether the cookie field is set.
*/
@java.lang.Override
public boolean hasCookie() {
return policySpecifierCase_ == 2;
}
/**
*
* Cookie hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.Cookie cookie = 2;
* @return The cookie.
*/
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie getCookie() {
if (policySpecifierCase_ == 2) {
return (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie) policySpecifier_;
}
return io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie.getDefaultInstance();
}
/**
*
* Cookie hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.Cookie cookie = 2;
*/
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.CookieOrBuilder getCookieOrBuilder() {
if (policySpecifierCase_ == 2) {
return (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie) policySpecifier_;
}
return io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie.getDefaultInstance();
}
public static final int CONNECTION_PROPERTIES_FIELD_NUMBER = 3;
/**
*
* Connection properties hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties connection_properties = 3;
* @return Whether the connectionProperties field is set.
*/
@java.lang.Override
public boolean hasConnectionProperties() {
return policySpecifierCase_ == 3;
}
/**
*
* Connection properties hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties connection_properties = 3;
* @return The connectionProperties.
*/
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties getConnectionProperties() {
if (policySpecifierCase_ == 3) {
return (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties) policySpecifier_;
}
return io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties.getDefaultInstance();
}
/**
*
* Connection properties hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties connection_properties = 3;
*/
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionPropertiesOrBuilder getConnectionPropertiesOrBuilder() {
if (policySpecifierCase_ == 3) {
return (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties) policySpecifier_;
}
return io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties.getDefaultInstance();
}
public static final int QUERY_PARAMETER_FIELD_NUMBER = 5;
/**
*
* Query parameter hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter query_parameter = 5;
* @return Whether the queryParameter field is set.
*/
@java.lang.Override
public boolean hasQueryParameter() {
return policySpecifierCase_ == 5;
}
/**
*
* Query parameter hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter query_parameter = 5;
* @return The queryParameter.
*/
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter getQueryParameter() {
if (policySpecifierCase_ == 5) {
return (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter) policySpecifier_;
}
return io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter.getDefaultInstance();
}
/**
*
* Query parameter hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter query_parameter = 5;
*/
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameterOrBuilder getQueryParameterOrBuilder() {
if (policySpecifierCase_ == 5) {
return (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter) policySpecifier_;
}
return io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter.getDefaultInstance();
}
public static final int FILTER_STATE_FIELD_NUMBER = 6;
/**
*
* Filter state hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.FilterState filter_state = 6;
* @return Whether the filterState field is set.
*/
@java.lang.Override
public boolean hasFilterState() {
return policySpecifierCase_ == 6;
}
/**
*
* Filter state hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.FilterState filter_state = 6;
* @return The filterState.
*/
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.FilterState getFilterState() {
if (policySpecifierCase_ == 6) {
return (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.FilterState) policySpecifier_;
}
return io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.FilterState.getDefaultInstance();
}
/**
*
* Filter state hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.FilterState filter_state = 6;
*/
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.FilterStateOrBuilder getFilterStateOrBuilder() {
if (policySpecifierCase_ == 6) {
return (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.FilterState) policySpecifier_;
}
return io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.FilterState.getDefaultInstance();
}
public static final int TERMINAL_FIELD_NUMBER = 4;
private boolean terminal_;
/**
*
* The flag that short-circuits the hash computing. This field provides a
* 'fallback' style of configuration: "if a terminal policy doesn't work,
* fallback to rest of the policy list", it saves time when the terminal
* policy works.
* If true, and there is already a hash computed, ignore rest of the
* list of hash polices.
* For example, if the following hash methods are configured:
* ========= ========
* specifier terminal
* ========= ========
* Header A true
* Header B false
* Header C false
* ========= ========
* The generateHash process ends if policy "header A" generates a hash, as
* it's a terminal policy.
*
*
* bool terminal = 4;
* @return The terminal.
*/
@java.lang.Override
public boolean getTerminal() {
return terminal_;
}
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 (policySpecifierCase_ == 1) {
output.writeMessage(1, (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header) policySpecifier_);
}
if (policySpecifierCase_ == 2) {
output.writeMessage(2, (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie) policySpecifier_);
}
if (policySpecifierCase_ == 3) {
output.writeMessage(3, (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties) policySpecifier_);
}
if (terminal_ != false) {
output.writeBool(4, terminal_);
}
if (policySpecifierCase_ == 5) {
output.writeMessage(5, (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter) policySpecifier_);
}
if (policySpecifierCase_ == 6) {
output.writeMessage(6, (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.FilterState) policySpecifier_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (policySpecifierCase_ == 1) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header) policySpecifier_);
}
if (policySpecifierCase_ == 2) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie) policySpecifier_);
}
if (policySpecifierCase_ == 3) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties) policySpecifier_);
}
if (terminal_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(4, terminal_);
}
if (policySpecifierCase_ == 5) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter) policySpecifier_);
}
if (policySpecifierCase_ == 6) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.FilterState) policySpecifier_);
}
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.config.route.v3.RouteAction.HashPolicy)) {
return super.equals(obj);
}
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy other = (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy) obj;
if (getTerminal()
!= other.getTerminal()) return false;
if (!getPolicySpecifierCase().equals(other.getPolicySpecifierCase())) return false;
switch (policySpecifierCase_) {
case 1:
if (!getHeader()
.equals(other.getHeader())) return false;
break;
case 2:
if (!getCookie()
.equals(other.getCookie())) return false;
break;
case 3:
if (!getConnectionProperties()
.equals(other.getConnectionProperties())) return false;
break;
case 5:
if (!getQueryParameter()
.equals(other.getQueryParameter())) return false;
break;
case 6:
if (!getFilterState()
.equals(other.getFilterState())) return false;
break;
case 0:
default:
}
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) + TERMINAL_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getTerminal());
switch (policySpecifierCase_) {
case 1:
hash = (37 * hash) + HEADER_FIELD_NUMBER;
hash = (53 * hash) + getHeader().hashCode();
break;
case 2:
hash = (37 * hash) + COOKIE_FIELD_NUMBER;
hash = (53 * hash) + getCookie().hashCode();
break;
case 3:
hash = (37 * hash) + CONNECTION_PROPERTIES_FIELD_NUMBER;
hash = (53 * hash) + getConnectionProperties().hashCode();
break;
case 5:
hash = (37 * hash) + QUERY_PARAMETER_FIELD_NUMBER;
hash = (53 * hash) + getQueryParameter().hashCode();
break;
case 6:
hash = (37 * hash) + FILTER_STATE_FIELD_NUMBER;
hash = (53 * hash) + getFilterState().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy 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;
}
/**
*
* Specifies the route's hashing policy if the upstream cluster uses a hashing :ref:`load balancer
* <arch_overview_load_balancing_types>`.
* [#next-free-field: 7]
*
*
* Protobuf type {@code envoy.config.route.v3.RouteAction.HashPolicy}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.config.route.v3.RouteAction.HashPolicy)
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicyOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_HashPolicy_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_HashPolicy_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.class, io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Builder.class);
}
// Construct using io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
terminal_ = false;
policySpecifierCase_ = 0;
policySpecifier_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_HashPolicy_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy getDefaultInstanceForType() {
return io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy build() {
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy buildPartial() {
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy result = new io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy(this);
if (policySpecifierCase_ == 1) {
if (headerBuilder_ == null) {
result.policySpecifier_ = policySpecifier_;
} else {
result.policySpecifier_ = headerBuilder_.build();
}
}
if (policySpecifierCase_ == 2) {
if (cookieBuilder_ == null) {
result.policySpecifier_ = policySpecifier_;
} else {
result.policySpecifier_ = cookieBuilder_.build();
}
}
if (policySpecifierCase_ == 3) {
if (connectionPropertiesBuilder_ == null) {
result.policySpecifier_ = policySpecifier_;
} else {
result.policySpecifier_ = connectionPropertiesBuilder_.build();
}
}
if (policySpecifierCase_ == 5) {
if (queryParameterBuilder_ == null) {
result.policySpecifier_ = policySpecifier_;
} else {
result.policySpecifier_ = queryParameterBuilder_.build();
}
}
if (policySpecifierCase_ == 6) {
if (filterStateBuilder_ == null) {
result.policySpecifier_ = policySpecifier_;
} else {
result.policySpecifier_ = filterStateBuilder_.build();
}
}
result.terminal_ = terminal_;
result.policySpecifierCase_ = policySpecifierCase_;
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.config.route.v3.RouteAction.HashPolicy) {
return mergeFrom((io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy other) {
if (other == io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.getDefaultInstance()) return this;
if (other.getTerminal() != false) {
setTerminal(other.getTerminal());
}
switch (other.getPolicySpecifierCase()) {
case HEADER: {
mergeHeader(other.getHeader());
break;
}
case COOKIE: {
mergeCookie(other.getCookie());
break;
}
case CONNECTION_PROPERTIES: {
mergeConnectionProperties(other.getConnectionProperties());
break;
}
case QUERY_PARAMETER: {
mergeQueryParameter(other.getQueryParameter());
break;
}
case FILTER_STATE: {
mergeFilterState(other.getFilterState());
break;
}
case POLICYSPECIFIER_NOT_SET: {
break;
}
}
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.config.route.v3.RouteAction.HashPolicy parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int policySpecifierCase_ = 0;
private java.lang.Object policySpecifier_;
public PolicySpecifierCase
getPolicySpecifierCase() {
return PolicySpecifierCase.forNumber(
policySpecifierCase_);
}
public Builder clearPolicySpecifier() {
policySpecifierCase_ = 0;
policySpecifier_ = null;
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header, io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header.Builder, io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.HeaderOrBuilder> headerBuilder_;
/**
*
* Header hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.Header header = 1;
* @return Whether the header field is set.
*/
@java.lang.Override
public boolean hasHeader() {
return policySpecifierCase_ == 1;
}
/**
*
* Header hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.Header header = 1;
* @return The header.
*/
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header getHeader() {
if (headerBuilder_ == null) {
if (policySpecifierCase_ == 1) {
return (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header) policySpecifier_;
}
return io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header.getDefaultInstance();
} else {
if (policySpecifierCase_ == 1) {
return headerBuilder_.getMessage();
}
return io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header.getDefaultInstance();
}
}
/**
*
* The flag that short-circuits the hash computing. This field provides a
* 'fallback' style of configuration: "if a terminal policy doesn't work,
* fallback to rest of the policy list", it saves time when the terminal
* policy works.
* If true, and there is already a hash computed, ignore rest of the
* list of hash polices.
* For example, if the following hash methods are configured:
* ========= ========
* specifier terminal
* ========= ========
* Header A true
* Header B false
* Header C false
* ========= ========
* The generateHash process ends if policy "header A" generates a hash, as
* it's a terminal policy.
*
* The flag that short-circuits the hash computing. This field provides a
* 'fallback' style of configuration: "if a terminal policy doesn't work,
* fallback to rest of the policy list", it saves time when the terminal
* policy works.
* If true, and there is already a hash computed, ignore rest of the
* list of hash polices.
* For example, if the following hash methods are configured:
* ========= ========
* specifier terminal
* ========= ========
* Header A true
* Header B false
* Header C false
* ========= ========
* The generateHash process ends if policy "header A" generates a hash, as
* it's a terminal policy.
*
*
* bool terminal = 4;
* @param value The terminal to set.
* @return This builder for chaining.
*/
public Builder setTerminal(boolean value) {
terminal_ = value;
onChanged();
return this;
}
/**
*
* The flag that short-circuits the hash computing. This field provides a
* 'fallback' style of configuration: "if a terminal policy doesn't work,
* fallback to rest of the policy list", it saves time when the terminal
* policy works.
* If true, and there is already a hash computed, ignore rest of the
* list of hash polices.
* For example, if the following hash methods are configured:
* ========= ========
* specifier terminal
* ========= ========
* Header A true
* Header B false
* Header C false
* ========= ========
* The generateHash process ends if policy "header A" generates a hash, as
* it's a terminal policy.
*
*
* bool terminal = 4;
* @return This builder for chaining.
*/
public Builder clearTerminal() {
terminal_ = false;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:envoy.config.route.v3.RouteAction.HashPolicy)
}
// @@protoc_insertion_point(class_scope:envoy.config.route.v3.RouteAction.HashPolicy)
private static final io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy();
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public HashPolicy parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new HashPolicy(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.config.route.v3.RouteAction.HashPolicy getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface UpgradeConfigOrBuilder extends
// @@protoc_insertion_point(interface_extends:envoy.config.route.v3.RouteAction.UpgradeConfig)
com.google.protobuf.MessageOrBuilder {
/**
*
* The case-insensitive name of this upgrade, e.g. "websocket".
* For each upgrade type present in upgrade_configs, requests with
* Upgrade: [upgrade_type] will be proxied upstream.
*
* The case-insensitive name of this upgrade, e.g. "websocket".
* For each upgrade type present in upgrade_configs, requests with
* Upgrade: [upgrade_type] will be proxied upstream.
*
* Configuration for sending data upstream as a raw data payload. This is used for
* CONNECT requests, when forwarding CONNECT payload as raw TCP.
* Note that CONNECT support is currently considered alpha in Envoy.
* [#comment: TODO(htuch): Replace the above comment with an alpha tag.]
*
*
* .envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig connect_config = 3;
* @return Whether the connectConfig field is set.
*/
boolean hasConnectConfig();
/**
*
* Configuration for sending data upstream as a raw data payload. This is used for
* CONNECT requests, when forwarding CONNECT payload as raw TCP.
* Note that CONNECT support is currently considered alpha in Envoy.
* [#comment: TODO(htuch): Replace the above comment with an alpha tag.]
*
* Configuration for sending data upstream as a raw data payload. This is used for
* CONNECT requests, when forwarding CONNECT payload as raw TCP.
* Note that CONNECT support is currently considered alpha in Envoy.
* [#comment: TODO(htuch): Replace the above comment with an alpha tag.]
*
* Allows enabling and disabling upgrades on a per-route basis.
* This overrides any enabled/disabled upgrade filter chain specified in the
* HttpConnectionManager
* :ref:`upgrade_configs
* <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.upgrade_configs>`
* but does not affect any custom filter chain specified there.
*
*
* Protobuf type {@code envoy.config.route.v3.RouteAction.UpgradeConfig}
*/
public static final class UpgradeConfig extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.config.route.v3.RouteAction.UpgradeConfig)
UpgradeConfigOrBuilder {
private static final long serialVersionUID = 0L;
// Use UpgradeConfig.newBuilder() to construct.
private UpgradeConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private UpgradeConfig() {
upgradeType_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new UpgradeConfig();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private UpgradeConfig(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
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();
upgradeType_ = s;
break;
}
case 18: {
com.google.protobuf.BoolValue.Builder subBuilder = null;
if (enabled_ != null) {
subBuilder = enabled_.toBuilder();
}
enabled_ = input.readMessage(com.google.protobuf.BoolValue.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(enabled_);
enabled_ = subBuilder.buildPartial();
}
break;
}
case 26: {
io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig.Builder subBuilder = null;
if (connectConfig_ != null) {
subBuilder = connectConfig_.toBuilder();
}
connectConfig_ = input.readMessage(io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(connectConfig_);
connectConfig_ = 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 {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_UpgradeConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_UpgradeConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.class, io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.Builder.class);
}
public interface ConnectConfigOrBuilder extends
// @@protoc_insertion_point(interface_extends:envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig)
com.google.protobuf.MessageOrBuilder {
/**
*
* If present, the proxy protocol header will be prepended to the CONNECT payload sent upstream.
*
*
* .envoy.config.core.v3.ProxyProtocolConfig proxy_protocol_config = 1;
* @return Whether the proxyProtocolConfig field is set.
*/
boolean hasProxyProtocolConfig();
/**
*
* If present, the proxy protocol header will be prepended to the CONNECT payload sent upstream.
*
* Configuration for sending data upstream as a raw data payload. This is used for
* CONNECT or POST requests, when forwarding request payload as raw TCP.
*
*
* Protobuf type {@code envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig}
*/
public static final class ConnectConfig extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig)
ConnectConfigOrBuilder {
private static final long serialVersionUID = 0L;
// Use ConnectConfig.newBuilder() to construct.
private ConnectConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ConnectConfig() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ConnectConfig();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ConnectConfig(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
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: {
io.envoyproxy.envoy.config.core.v3.ProxyProtocolConfig.Builder subBuilder = null;
if (proxyProtocolConfig_ != null) {
subBuilder = proxyProtocolConfig_.toBuilder();
}
proxyProtocolConfig_ = input.readMessage(io.envoyproxy.envoy.config.core.v3.ProxyProtocolConfig.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(proxyProtocolConfig_);
proxyProtocolConfig_ = subBuilder.buildPartial();
}
break;
}
case 16: {
allowPost_ = input.readBool();
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 {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_UpgradeConfig_ConnectConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_UpgradeConfig_ConnectConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig.class, io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig.Builder.class);
}
public static final int PROXY_PROTOCOL_CONFIG_FIELD_NUMBER = 1;
private io.envoyproxy.envoy.config.core.v3.ProxyProtocolConfig proxyProtocolConfig_;
/**
*
* If present, the proxy protocol header will be prepended to the CONNECT payload sent upstream.
*
*
* .envoy.config.core.v3.ProxyProtocolConfig proxy_protocol_config = 1;
* @return Whether the proxyProtocolConfig field is set.
*/
@java.lang.Override
public boolean hasProxyProtocolConfig() {
return proxyProtocolConfig_ != null;
}
/**
*
* If present, the proxy protocol header will be prepended to the CONNECT payload sent upstream.
*
* If present, the proxy protocol header will be prepended to the CONNECT payload sent upstream.
*
*
* .envoy.config.core.v3.ProxyProtocolConfig proxy_protocol_config = 1;
*/
@java.lang.Override
public io.envoyproxy.envoy.config.core.v3.ProxyProtocolConfigOrBuilder getProxyProtocolConfigOrBuilder() {
return getProxyProtocolConfig();
}
public static final int ALLOW_POST_FIELD_NUMBER = 2;
private boolean allowPost_;
/**
*
* If set, the route will also allow forwarding POST payload as raw TCP.
*
*
* bool allow_post = 2;
* @return The allowPost.
*/
@java.lang.Override
public boolean getAllowPost() {
return allowPost_;
}
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 (proxyProtocolConfig_ != null) {
output.writeMessage(1, getProxyProtocolConfig());
}
if (allowPost_ != false) {
output.writeBool(2, allowPost_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (proxyProtocolConfig_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getProxyProtocolConfig());
}
if (allowPost_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(2, allowPost_);
}
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.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig)) {
return super.equals(obj);
}
io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig other = (io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig) obj;
if (hasProxyProtocolConfig() != other.hasProxyProtocolConfig()) return false;
if (hasProxyProtocolConfig()) {
if (!getProxyProtocolConfig()
.equals(other.getProxyProtocolConfig())) return false;
}
if (getAllowPost()
!= other.getAllowPost()) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasProxyProtocolConfig()) {
hash = (37 * hash) + PROXY_PROTOCOL_CONFIG_FIELD_NUMBER;
hash = (53 * hash) + getProxyProtocolConfig().hashCode();
}
hash = (37 * hash) + ALLOW_POST_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getAllowPost());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig 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;
}
/**
*
* Configuration for sending data upstream as a raw data payload. This is used for
* CONNECT or POST requests, when forwarding request payload as raw TCP.
*
*
* Protobuf type {@code envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig)
io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfigOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_UpgradeConfig_ConnectConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_UpgradeConfig_ConnectConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig.class, io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig.Builder.class);
}
// Construct using io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (proxyProtocolConfigBuilder_ == null) {
proxyProtocolConfig_ = null;
} else {
proxyProtocolConfig_ = null;
proxyProtocolConfigBuilder_ = null;
}
allowPost_ = false;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_UpgradeConfig_ConnectConfig_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig getDefaultInstanceForType() {
return io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig build() {
io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig buildPartial() {
io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig result = new io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig(this);
if (proxyProtocolConfigBuilder_ == null) {
result.proxyProtocolConfig_ = proxyProtocolConfig_;
} else {
result.proxyProtocolConfig_ = proxyProtocolConfigBuilder_.build();
}
result.allowPost_ = allowPost_;
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.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig) {
return mergeFrom((io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig other) {
if (other == io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig.getDefaultInstance()) return this;
if (other.hasProxyProtocolConfig()) {
mergeProxyProtocolConfig(other.getProxyProtocolConfig());
}
if (other.getAllowPost() != false) {
setAllowPost(other.getAllowPost());
}
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.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private io.envoyproxy.envoy.config.core.v3.ProxyProtocolConfig proxyProtocolConfig_;
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.core.v3.ProxyProtocolConfig, io.envoyproxy.envoy.config.core.v3.ProxyProtocolConfig.Builder, io.envoyproxy.envoy.config.core.v3.ProxyProtocolConfigOrBuilder> proxyProtocolConfigBuilder_;
/**
*
* If present, the proxy protocol header will be prepended to the CONNECT payload sent upstream.
*
*
* .envoy.config.core.v3.ProxyProtocolConfig proxy_protocol_config = 1;
* @return Whether the proxyProtocolConfig field is set.
*/
public boolean hasProxyProtocolConfig() {
return proxyProtocolConfigBuilder_ != null || proxyProtocolConfig_ != null;
}
/**
*
* If present, the proxy protocol header will be prepended to the CONNECT payload sent upstream.
*
* If set, the route will also allow forwarding POST payload as raw TCP.
*
*
* bool allow_post = 2;
* @param value The allowPost to set.
* @return This builder for chaining.
*/
public Builder setAllowPost(boolean value) {
allowPost_ = value;
onChanged();
return this;
}
/**
*
* If set, the route will also allow forwarding POST payload as raw TCP.
*
*
* bool allow_post = 2;
* @return This builder for chaining.
*/
public Builder clearAllowPost() {
allowPost_ = false;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig)
}
// @@protoc_insertion_point(class_scope:envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig)
private static final io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig();
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ConnectConfig parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ConnectConfig(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.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int UPGRADE_TYPE_FIELD_NUMBER = 1;
private volatile java.lang.Object upgradeType_;
/**
*
* The case-insensitive name of this upgrade, e.g. "websocket".
* For each upgrade type present in upgrade_configs, requests with
* Upgrade: [upgrade_type] will be proxied upstream.
*
* The case-insensitive name of this upgrade, e.g. "websocket".
* For each upgrade type present in upgrade_configs, requests with
* Upgrade: [upgrade_type] will be proxied upstream.
*
*
* string upgrade_type = 1 [(.validate.rules) = { ... }
* @return The bytes for upgradeType.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getUpgradeTypeBytes() {
java.lang.Object ref = upgradeType_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
upgradeType_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ENABLED_FIELD_NUMBER = 2;
private com.google.protobuf.BoolValue enabled_;
/**
*
* Determines if upgrades are available on this route. Defaults to true.
*
*
* .google.protobuf.BoolValue enabled = 2;
* @return Whether the enabled field is set.
*/
@java.lang.Override
public boolean hasEnabled() {
return enabled_ != null;
}
/**
*
* Determines if upgrades are available on this route. Defaults to true.
*
* Determines if upgrades are available on this route. Defaults to true.
*
*
* .google.protobuf.BoolValue enabled = 2;
*/
@java.lang.Override
public com.google.protobuf.BoolValueOrBuilder getEnabledOrBuilder() {
return getEnabled();
}
public static final int CONNECT_CONFIG_FIELD_NUMBER = 3;
private io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig connectConfig_;
/**
*
* Configuration for sending data upstream as a raw data payload. This is used for
* CONNECT requests, when forwarding CONNECT payload as raw TCP.
* Note that CONNECT support is currently considered alpha in Envoy.
* [#comment: TODO(htuch): Replace the above comment with an alpha tag.]
*
*
* .envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig connect_config = 3;
* @return Whether the connectConfig field is set.
*/
@java.lang.Override
public boolean hasConnectConfig() {
return connectConfig_ != null;
}
/**
*
* Configuration for sending data upstream as a raw data payload. This is used for
* CONNECT requests, when forwarding CONNECT payload as raw TCP.
* Note that CONNECT support is currently considered alpha in Envoy.
* [#comment: TODO(htuch): Replace the above comment with an alpha tag.]
*
* Configuration for sending data upstream as a raw data payload. This is used for
* CONNECT requests, when forwarding CONNECT payload as raw TCP.
* Note that CONNECT support is currently considered alpha in Envoy.
* [#comment: TODO(htuch): Replace the above comment with an alpha tag.]
*
*
* .envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig connect_config = 3;
*/
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfigOrBuilder getConnectConfigOrBuilder() {
return getConnectConfig();
}
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(upgradeType_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, upgradeType_);
}
if (enabled_ != null) {
output.writeMessage(2, getEnabled());
}
if (connectConfig_ != null) {
output.writeMessage(3, getConnectConfig());
}
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(upgradeType_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, upgradeType_);
}
if (enabled_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getEnabled());
}
if (connectConfig_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getConnectConfig());
}
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.config.route.v3.RouteAction.UpgradeConfig)) {
return super.equals(obj);
}
io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig other = (io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig) obj;
if (!getUpgradeType()
.equals(other.getUpgradeType())) return false;
if (hasEnabled() != other.hasEnabled()) return false;
if (hasEnabled()) {
if (!getEnabled()
.equals(other.getEnabled())) return false;
}
if (hasConnectConfig() != other.hasConnectConfig()) return false;
if (hasConnectConfig()) {
if (!getConnectConfig()
.equals(other.getConnectConfig())) 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) + UPGRADE_TYPE_FIELD_NUMBER;
hash = (53 * hash) + getUpgradeType().hashCode();
if (hasEnabled()) {
hash = (37 * hash) + ENABLED_FIELD_NUMBER;
hash = (53 * hash) + getEnabled().hashCode();
}
if (hasConnectConfig()) {
hash = (37 * hash) + CONNECT_CONFIG_FIELD_NUMBER;
hash = (53 * hash) + getConnectConfig().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig 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;
}
/**
*
* Allows enabling and disabling upgrades on a per-route basis.
* This overrides any enabled/disabled upgrade filter chain specified in the
* HttpConnectionManager
* :ref:`upgrade_configs
* <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.upgrade_configs>`
* but does not affect any custom filter chain specified there.
*
*
* Protobuf type {@code envoy.config.route.v3.RouteAction.UpgradeConfig}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.config.route.v3.RouteAction.UpgradeConfig)
io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfigOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_UpgradeConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_UpgradeConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.class, io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.Builder.class);
}
// Construct using io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
upgradeType_ = "";
if (enabledBuilder_ == null) {
enabled_ = null;
} else {
enabled_ = null;
enabledBuilder_ = null;
}
if (connectConfigBuilder_ == null) {
connectConfig_ = null;
} else {
connectConfig_ = null;
connectConfigBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_UpgradeConfig_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig getDefaultInstanceForType() {
return io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig build() {
io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig buildPartial() {
io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig result = new io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig(this);
result.upgradeType_ = upgradeType_;
if (enabledBuilder_ == null) {
result.enabled_ = enabled_;
} else {
result.enabled_ = enabledBuilder_.build();
}
if (connectConfigBuilder_ == null) {
result.connectConfig_ = connectConfig_;
} else {
result.connectConfig_ = connectConfigBuilder_.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.config.route.v3.RouteAction.UpgradeConfig) {
return mergeFrom((io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig other) {
if (other == io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.getDefaultInstance()) return this;
if (!other.getUpgradeType().isEmpty()) {
upgradeType_ = other.upgradeType_;
onChanged();
}
if (other.hasEnabled()) {
mergeEnabled(other.getEnabled());
}
if (other.hasConnectConfig()) {
mergeConnectConfig(other.getConnectConfig());
}
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.config.route.v3.RouteAction.UpgradeConfig parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object upgradeType_ = "";
/**
*
* The case-insensitive name of this upgrade, e.g. "websocket".
* For each upgrade type present in upgrade_configs, requests with
* Upgrade: [upgrade_type] will be proxied upstream.
*
* The case-insensitive name of this upgrade, e.g. "websocket".
* For each upgrade type present in upgrade_configs, requests with
* Upgrade: [upgrade_type] will be proxied upstream.
*
* The case-insensitive name of this upgrade, e.g. "websocket".
* For each upgrade type present in upgrade_configs, requests with
* Upgrade: [upgrade_type] will be proxied upstream.
*
*
* string upgrade_type = 1 [(.validate.rules) = { ... }
* @param value The upgradeType to set.
* @return This builder for chaining.
*/
public Builder setUpgradeType(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
upgradeType_ = value;
onChanged();
return this;
}
/**
*
* The case-insensitive name of this upgrade, e.g. "websocket".
* For each upgrade type present in upgrade_configs, requests with
* Upgrade: [upgrade_type] will be proxied upstream.
*
* The case-insensitive name of this upgrade, e.g. "websocket".
* For each upgrade type present in upgrade_configs, requests with
* Upgrade: [upgrade_type] will be proxied upstream.
*
*
* string upgrade_type = 1 [(.validate.rules) = { ... }
* @param value The bytes for upgradeType to set.
* @return This builder for chaining.
*/
public Builder setUpgradeTypeBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
upgradeType_ = value;
onChanged();
return this;
}
private com.google.protobuf.BoolValue enabled_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> enabledBuilder_;
/**
*
* Determines if upgrades are available on this route. Defaults to true.
*
*
* .google.protobuf.BoolValue enabled = 2;
* @return Whether the enabled field is set.
*/
public boolean hasEnabled() {
return enabledBuilder_ != null || enabled_ != null;
}
/**
*
* Determines if upgrades are available on this route. Defaults to true.
*
* Configuration for sending data upstream as a raw data payload. This is used for
* CONNECT requests, when forwarding CONNECT payload as raw TCP.
* Note that CONNECT support is currently considered alpha in Envoy.
* [#comment: TODO(htuch): Replace the above comment with an alpha tag.]
*
*
* .envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig connect_config = 3;
* @return Whether the connectConfig field is set.
*/
public boolean hasConnectConfig() {
return connectConfigBuilder_ != null || connectConfig_ != null;
}
/**
*
* Configuration for sending data upstream as a raw data payload. This is used for
* CONNECT requests, when forwarding CONNECT payload as raw TCP.
* Note that CONNECT support is currently considered alpha in Envoy.
* [#comment: TODO(htuch): Replace the above comment with an alpha tag.]
*
* Configuration for sending data upstream as a raw data payload. This is used for
* CONNECT requests, when forwarding CONNECT payload as raw TCP.
* Note that CONNECT support is currently considered alpha in Envoy.
* [#comment: TODO(htuch): Replace the above comment with an alpha tag.]
*
*
* .envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig connect_config = 3;
*/
public Builder setConnectConfig(io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig value) {
if (connectConfigBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
connectConfig_ = value;
onChanged();
} else {
connectConfigBuilder_.setMessage(value);
}
return this;
}
/**
*
* Configuration for sending data upstream as a raw data payload. This is used for
* CONNECT requests, when forwarding CONNECT payload as raw TCP.
* Note that CONNECT support is currently considered alpha in Envoy.
* [#comment: TODO(htuch): Replace the above comment with an alpha tag.]
*
* Configuration for sending data upstream as a raw data payload. This is used for
* CONNECT requests, when forwarding CONNECT payload as raw TCP.
* Note that CONNECT support is currently considered alpha in Envoy.
* [#comment: TODO(htuch): Replace the above comment with an alpha tag.]
*
* Configuration for sending data upstream as a raw data payload. This is used for
* CONNECT requests, when forwarding CONNECT payload as raw TCP.
* Note that CONNECT support is currently considered alpha in Envoy.
* [#comment: TODO(htuch): Replace the above comment with an alpha tag.]
*
* Configuration for sending data upstream as a raw data payload. This is used for
* CONNECT requests, when forwarding CONNECT payload as raw TCP.
* Note that CONNECT support is currently considered alpha in Envoy.
* [#comment: TODO(htuch): Replace the above comment with an alpha tag.]
*
* Configuration for sending data upstream as a raw data payload. This is used for
* CONNECT requests, when forwarding CONNECT payload as raw TCP.
* Note that CONNECT support is currently considered alpha in Envoy.
* [#comment: TODO(htuch): Replace the above comment with an alpha tag.]
*
* Configuration for sending data upstream as a raw data payload. This is used for
* CONNECT requests, when forwarding CONNECT payload as raw TCP.
* Note that CONNECT support is currently considered alpha in Envoy.
* [#comment: TODO(htuch): Replace the above comment with an alpha tag.]
*
*
* .envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig connect_config = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig, io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig.Builder, io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfigOrBuilder>
getConnectConfigFieldBuilder() {
if (connectConfigBuilder_ == null) {
connectConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig, io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig.Builder, io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfigOrBuilder>(
getConnectConfig(),
getParentForChildren(),
isClean());
connectConfig_ = null;
}
return connectConfigBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:envoy.config.route.v3.RouteAction.UpgradeConfig)
}
// @@protoc_insertion_point(class_scope:envoy.config.route.v3.RouteAction.UpgradeConfig)
private static final io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig();
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public UpgradeConfig parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new UpgradeConfig(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.config.route.v3.RouteAction.UpgradeConfig getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface MaxStreamDurationOrBuilder extends
// @@protoc_insertion_point(interface_extends:envoy.config.route.v3.RouteAction.MaxStreamDuration)
com.google.protobuf.MessageOrBuilder {
/**
*
* Specifies the maximum duration allowed for streams on the route. If not specified, the value
* from the :ref:`max_stream_duration
* <envoy_v3_api_field_config.core.v3.HttpProtocolOptions.max_stream_duration>` field in
* :ref:`HttpConnectionManager.common_http_protocol_options
* <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.common_http_protocol_options>`
* is used. If this field is set explicitly to zero, any
* HttpConnectionManager max_stream_duration timeout will be disabled for
* this route.
*
*
* .google.protobuf.Duration max_stream_duration = 1;
* @return Whether the maxStreamDuration field is set.
*/
boolean hasMaxStreamDuration();
/**
*
* Specifies the maximum duration allowed for streams on the route. If not specified, the value
* from the :ref:`max_stream_duration
* <envoy_v3_api_field_config.core.v3.HttpProtocolOptions.max_stream_duration>` field in
* :ref:`HttpConnectionManager.common_http_protocol_options
* <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.common_http_protocol_options>`
* is used. If this field is set explicitly to zero, any
* HttpConnectionManager max_stream_duration timeout will be disabled for
* this route.
*
* Specifies the maximum duration allowed for streams on the route. If not specified, the value
* from the :ref:`max_stream_duration
* <envoy_v3_api_field_config.core.v3.HttpProtocolOptions.max_stream_duration>` field in
* :ref:`HttpConnectionManager.common_http_protocol_options
* <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.common_http_protocol_options>`
* is used. If this field is set explicitly to zero, any
* HttpConnectionManager max_stream_duration timeout will be disabled for
* this route.
*
* If present, and the request contains a `grpc-timeout header
* <https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md>`_, use that value as the
* ``max_stream_duration``, but limit the applied timeout to the maximum value specified here.
* If set to 0, the ``grpc-timeout`` header is used without modification.
*
*
* .google.protobuf.Duration grpc_timeout_header_max = 2;
* @return Whether the grpcTimeoutHeaderMax field is set.
*/
boolean hasGrpcTimeoutHeaderMax();
/**
*
* If present, and the request contains a `grpc-timeout header
* <https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md>`_, use that value as the
* ``max_stream_duration``, but limit the applied timeout to the maximum value specified here.
* If set to 0, the ``grpc-timeout`` header is used without modification.
*
* If present, and the request contains a `grpc-timeout header
* <https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md>`_, use that value as the
* ``max_stream_duration``, but limit the applied timeout to the maximum value specified here.
* If set to 0, the ``grpc-timeout`` header is used without modification.
*
* If present, Envoy will adjust the timeout provided by the ``grpc-timeout`` header by
* subtracting the provided duration from the header. This is useful for allowing Envoy to set
* its global timeout to be less than that of the deadline imposed by the calling client, which
* makes it more likely that Envoy will handle the timeout instead of having the call canceled
* by the client. If, after applying the offset, the resulting timeout is zero or negative,
* the stream will timeout immediately.
*
*
* .google.protobuf.Duration grpc_timeout_header_offset = 3;
* @return Whether the grpcTimeoutHeaderOffset field is set.
*/
boolean hasGrpcTimeoutHeaderOffset();
/**
*
* If present, Envoy will adjust the timeout provided by the ``grpc-timeout`` header by
* subtracting the provided duration from the header. This is useful for allowing Envoy to set
* its global timeout to be less than that of the deadline imposed by the calling client, which
* makes it more likely that Envoy will handle the timeout instead of having the call canceled
* by the client. If, after applying the offset, the resulting timeout is zero or negative,
* the stream will timeout immediately.
*
* If present, Envoy will adjust the timeout provided by the ``grpc-timeout`` header by
* subtracting the provided duration from the header. This is useful for allowing Envoy to set
* its global timeout to be less than that of the deadline imposed by the calling client, which
* makes it more likely that Envoy will handle the timeout instead of having the call canceled
* by the client. If, after applying the offset, the resulting timeout is zero or negative,
* the stream will timeout immediately.
*
*
* .google.protobuf.Duration grpc_timeout_header_offset = 3;
*/
com.google.protobuf.DurationOrBuilder getGrpcTimeoutHeaderOffsetOrBuilder();
}
/**
* Protobuf type {@code envoy.config.route.v3.RouteAction.MaxStreamDuration}
*/
public static final class MaxStreamDuration extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.config.route.v3.RouteAction.MaxStreamDuration)
MaxStreamDurationOrBuilder {
private static final long serialVersionUID = 0L;
// Use MaxStreamDuration.newBuilder() to construct.
private MaxStreamDuration(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private MaxStreamDuration() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new MaxStreamDuration();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private MaxStreamDuration(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
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: {
com.google.protobuf.Duration.Builder subBuilder = null;
if (maxStreamDuration_ != null) {
subBuilder = maxStreamDuration_.toBuilder();
}
maxStreamDuration_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(maxStreamDuration_);
maxStreamDuration_ = subBuilder.buildPartial();
}
break;
}
case 18: {
com.google.protobuf.Duration.Builder subBuilder = null;
if (grpcTimeoutHeaderMax_ != null) {
subBuilder = grpcTimeoutHeaderMax_.toBuilder();
}
grpcTimeoutHeaderMax_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(grpcTimeoutHeaderMax_);
grpcTimeoutHeaderMax_ = subBuilder.buildPartial();
}
break;
}
case 26: {
com.google.protobuf.Duration.Builder subBuilder = null;
if (grpcTimeoutHeaderOffset_ != null) {
subBuilder = grpcTimeoutHeaderOffset_.toBuilder();
}
grpcTimeoutHeaderOffset_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(grpcTimeoutHeaderOffset_);
grpcTimeoutHeaderOffset_ = 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 {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_MaxStreamDuration_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_MaxStreamDuration_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.route.v3.RouteAction.MaxStreamDuration.class, io.envoyproxy.envoy.config.route.v3.RouteAction.MaxStreamDuration.Builder.class);
}
public static final int MAX_STREAM_DURATION_FIELD_NUMBER = 1;
private com.google.protobuf.Duration maxStreamDuration_;
/**
*
* Specifies the maximum duration allowed for streams on the route. If not specified, the value
* from the :ref:`max_stream_duration
* <envoy_v3_api_field_config.core.v3.HttpProtocolOptions.max_stream_duration>` field in
* :ref:`HttpConnectionManager.common_http_protocol_options
* <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.common_http_protocol_options>`
* is used. If this field is set explicitly to zero, any
* HttpConnectionManager max_stream_duration timeout will be disabled for
* this route.
*
*
* .google.protobuf.Duration max_stream_duration = 1;
* @return Whether the maxStreamDuration field is set.
*/
@java.lang.Override
public boolean hasMaxStreamDuration() {
return maxStreamDuration_ != null;
}
/**
*
* Specifies the maximum duration allowed for streams on the route. If not specified, the value
* from the :ref:`max_stream_duration
* <envoy_v3_api_field_config.core.v3.HttpProtocolOptions.max_stream_duration>` field in
* :ref:`HttpConnectionManager.common_http_protocol_options
* <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.common_http_protocol_options>`
* is used. If this field is set explicitly to zero, any
* HttpConnectionManager max_stream_duration timeout will be disabled for
* this route.
*
* Specifies the maximum duration allowed for streams on the route. If not specified, the value
* from the :ref:`max_stream_duration
* <envoy_v3_api_field_config.core.v3.HttpProtocolOptions.max_stream_duration>` field in
* :ref:`HttpConnectionManager.common_http_protocol_options
* <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.common_http_protocol_options>`
* is used. If this field is set explicitly to zero, any
* HttpConnectionManager max_stream_duration timeout will be disabled for
* this route.
*
*
* .google.protobuf.Duration max_stream_duration = 1;
*/
@java.lang.Override
public com.google.protobuf.DurationOrBuilder getMaxStreamDurationOrBuilder() {
return getMaxStreamDuration();
}
public static final int GRPC_TIMEOUT_HEADER_MAX_FIELD_NUMBER = 2;
private com.google.protobuf.Duration grpcTimeoutHeaderMax_;
/**
*
* If present, and the request contains a `grpc-timeout header
* <https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md>`_, use that value as the
* ``max_stream_duration``, but limit the applied timeout to the maximum value specified here.
* If set to 0, the ``grpc-timeout`` header is used without modification.
*
*
* .google.protobuf.Duration grpc_timeout_header_max = 2;
* @return Whether the grpcTimeoutHeaderMax field is set.
*/
@java.lang.Override
public boolean hasGrpcTimeoutHeaderMax() {
return grpcTimeoutHeaderMax_ != null;
}
/**
*
* If present, and the request contains a `grpc-timeout header
* <https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md>`_, use that value as the
* ``max_stream_duration``, but limit the applied timeout to the maximum value specified here.
* If set to 0, the ``grpc-timeout`` header is used without modification.
*
* If present, and the request contains a `grpc-timeout header
* <https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md>`_, use that value as the
* ``max_stream_duration``, but limit the applied timeout to the maximum value specified here.
* If set to 0, the ``grpc-timeout`` header is used without modification.
*
*
* .google.protobuf.Duration grpc_timeout_header_max = 2;
*/
@java.lang.Override
public com.google.protobuf.DurationOrBuilder getGrpcTimeoutHeaderMaxOrBuilder() {
return getGrpcTimeoutHeaderMax();
}
public static final int GRPC_TIMEOUT_HEADER_OFFSET_FIELD_NUMBER = 3;
private com.google.protobuf.Duration grpcTimeoutHeaderOffset_;
/**
*
* If present, Envoy will adjust the timeout provided by the ``grpc-timeout`` header by
* subtracting the provided duration from the header. This is useful for allowing Envoy to set
* its global timeout to be less than that of the deadline imposed by the calling client, which
* makes it more likely that Envoy will handle the timeout instead of having the call canceled
* by the client. If, after applying the offset, the resulting timeout is zero or negative,
* the stream will timeout immediately.
*
*
* .google.protobuf.Duration grpc_timeout_header_offset = 3;
* @return Whether the grpcTimeoutHeaderOffset field is set.
*/
@java.lang.Override
public boolean hasGrpcTimeoutHeaderOffset() {
return grpcTimeoutHeaderOffset_ != null;
}
/**
*
* If present, Envoy will adjust the timeout provided by the ``grpc-timeout`` header by
* subtracting the provided duration from the header. This is useful for allowing Envoy to set
* its global timeout to be less than that of the deadline imposed by the calling client, which
* makes it more likely that Envoy will handle the timeout instead of having the call canceled
* by the client. If, after applying the offset, the resulting timeout is zero or negative,
* the stream will timeout immediately.
*
* If present, Envoy will adjust the timeout provided by the ``grpc-timeout`` header by
* subtracting the provided duration from the header. This is useful for allowing Envoy to set
* its global timeout to be less than that of the deadline imposed by the calling client, which
* makes it more likely that Envoy will handle the timeout instead of having the call canceled
* by the client. If, after applying the offset, the resulting timeout is zero or negative,
* the stream will timeout immediately.
*
*
* .google.protobuf.Duration grpc_timeout_header_offset = 3;
*/
@java.lang.Override
public com.google.protobuf.DurationOrBuilder getGrpcTimeoutHeaderOffsetOrBuilder() {
return getGrpcTimeoutHeaderOffset();
}
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 (maxStreamDuration_ != null) {
output.writeMessage(1, getMaxStreamDuration());
}
if (grpcTimeoutHeaderMax_ != null) {
output.writeMessage(2, getGrpcTimeoutHeaderMax());
}
if (grpcTimeoutHeaderOffset_ != null) {
output.writeMessage(3, getGrpcTimeoutHeaderOffset());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (maxStreamDuration_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getMaxStreamDuration());
}
if (grpcTimeoutHeaderMax_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getGrpcTimeoutHeaderMax());
}
if (grpcTimeoutHeaderOffset_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getGrpcTimeoutHeaderOffset());
}
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.config.route.v3.RouteAction.MaxStreamDuration)) {
return super.equals(obj);
}
io.envoyproxy.envoy.config.route.v3.RouteAction.MaxStreamDuration other = (io.envoyproxy.envoy.config.route.v3.RouteAction.MaxStreamDuration) obj;
if (hasMaxStreamDuration() != other.hasMaxStreamDuration()) return false;
if (hasMaxStreamDuration()) {
if (!getMaxStreamDuration()
.equals(other.getMaxStreamDuration())) return false;
}
if (hasGrpcTimeoutHeaderMax() != other.hasGrpcTimeoutHeaderMax()) return false;
if (hasGrpcTimeoutHeaderMax()) {
if (!getGrpcTimeoutHeaderMax()
.equals(other.getGrpcTimeoutHeaderMax())) return false;
}
if (hasGrpcTimeoutHeaderOffset() != other.hasGrpcTimeoutHeaderOffset()) return false;
if (hasGrpcTimeoutHeaderOffset()) {
if (!getGrpcTimeoutHeaderOffset()
.equals(other.getGrpcTimeoutHeaderOffset())) return false;
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasMaxStreamDuration()) {
hash = (37 * hash) + MAX_STREAM_DURATION_FIELD_NUMBER;
hash = (53 * hash) + getMaxStreamDuration().hashCode();
}
if (hasGrpcTimeoutHeaderMax()) {
hash = (37 * hash) + GRPC_TIMEOUT_HEADER_MAX_FIELD_NUMBER;
hash = (53 * hash) + getGrpcTimeoutHeaderMax().hashCode();
}
if (hasGrpcTimeoutHeaderOffset()) {
hash = (37 * hash) + GRPC_TIMEOUT_HEADER_OFFSET_FIELD_NUMBER;
hash = (53 * hash) + getGrpcTimeoutHeaderOffset().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.MaxStreamDuration parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.MaxStreamDuration parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.MaxStreamDuration parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.MaxStreamDuration parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.MaxStreamDuration parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.MaxStreamDuration parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.MaxStreamDuration parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.MaxStreamDuration parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.MaxStreamDuration parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.MaxStreamDuration parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.MaxStreamDuration parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.MaxStreamDuration parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.envoyproxy.envoy.config.route.v3.RouteAction.MaxStreamDuration 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;
}
/**
* Protobuf type {@code envoy.config.route.v3.RouteAction.MaxStreamDuration}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.config.route.v3.RouteAction.MaxStreamDuration)
io.envoyproxy.envoy.config.route.v3.RouteAction.MaxStreamDurationOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_MaxStreamDuration_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_MaxStreamDuration_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.route.v3.RouteAction.MaxStreamDuration.class, io.envoyproxy.envoy.config.route.v3.RouteAction.MaxStreamDuration.Builder.class);
}
// Construct using io.envoyproxy.envoy.config.route.v3.RouteAction.MaxStreamDuration.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (maxStreamDurationBuilder_ == null) {
maxStreamDuration_ = null;
} else {
maxStreamDuration_ = null;
maxStreamDurationBuilder_ = null;
}
if (grpcTimeoutHeaderMaxBuilder_ == null) {
grpcTimeoutHeaderMax_ = null;
} else {
grpcTimeoutHeaderMax_ = null;
grpcTimeoutHeaderMaxBuilder_ = null;
}
if (grpcTimeoutHeaderOffsetBuilder_ == null) {
grpcTimeoutHeaderOffset_ = null;
} else {
grpcTimeoutHeaderOffset_ = null;
grpcTimeoutHeaderOffsetBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_MaxStreamDuration_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.MaxStreamDuration getDefaultInstanceForType() {
return io.envoyproxy.envoy.config.route.v3.RouteAction.MaxStreamDuration.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.MaxStreamDuration build() {
io.envoyproxy.envoy.config.route.v3.RouteAction.MaxStreamDuration result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.MaxStreamDuration buildPartial() {
io.envoyproxy.envoy.config.route.v3.RouteAction.MaxStreamDuration result = new io.envoyproxy.envoy.config.route.v3.RouteAction.MaxStreamDuration(this);
if (maxStreamDurationBuilder_ == null) {
result.maxStreamDuration_ = maxStreamDuration_;
} else {
result.maxStreamDuration_ = maxStreamDurationBuilder_.build();
}
if (grpcTimeoutHeaderMaxBuilder_ == null) {
result.grpcTimeoutHeaderMax_ = grpcTimeoutHeaderMax_;
} else {
result.grpcTimeoutHeaderMax_ = grpcTimeoutHeaderMaxBuilder_.build();
}
if (grpcTimeoutHeaderOffsetBuilder_ == null) {
result.grpcTimeoutHeaderOffset_ = grpcTimeoutHeaderOffset_;
} else {
result.grpcTimeoutHeaderOffset_ = grpcTimeoutHeaderOffsetBuilder_.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.config.route.v3.RouteAction.MaxStreamDuration) {
return mergeFrom((io.envoyproxy.envoy.config.route.v3.RouteAction.MaxStreamDuration)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.config.route.v3.RouteAction.MaxStreamDuration other) {
if (other == io.envoyproxy.envoy.config.route.v3.RouteAction.MaxStreamDuration.getDefaultInstance()) return this;
if (other.hasMaxStreamDuration()) {
mergeMaxStreamDuration(other.getMaxStreamDuration());
}
if (other.hasGrpcTimeoutHeaderMax()) {
mergeGrpcTimeoutHeaderMax(other.getGrpcTimeoutHeaderMax());
}
if (other.hasGrpcTimeoutHeaderOffset()) {
mergeGrpcTimeoutHeaderOffset(other.getGrpcTimeoutHeaderOffset());
}
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.config.route.v3.RouteAction.MaxStreamDuration parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.config.route.v3.RouteAction.MaxStreamDuration) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private com.google.protobuf.Duration maxStreamDuration_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> maxStreamDurationBuilder_;
/**
*
* Specifies the maximum duration allowed for streams on the route. If not specified, the value
* from the :ref:`max_stream_duration
* <envoy_v3_api_field_config.core.v3.HttpProtocolOptions.max_stream_duration>` field in
* :ref:`HttpConnectionManager.common_http_protocol_options
* <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.common_http_protocol_options>`
* is used. If this field is set explicitly to zero, any
* HttpConnectionManager max_stream_duration timeout will be disabled for
* this route.
*
*
* .google.protobuf.Duration max_stream_duration = 1;
* @return Whether the maxStreamDuration field is set.
*/
public boolean hasMaxStreamDuration() {
return maxStreamDurationBuilder_ != null || maxStreamDuration_ != null;
}
/**
*
* Specifies the maximum duration allowed for streams on the route. If not specified, the value
* from the :ref:`max_stream_duration
* <envoy_v3_api_field_config.core.v3.HttpProtocolOptions.max_stream_duration>` field in
* :ref:`HttpConnectionManager.common_http_protocol_options
* <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.common_http_protocol_options>`
* is used. If this field is set explicitly to zero, any
* HttpConnectionManager max_stream_duration timeout will be disabled for
* this route.
*
* Specifies the maximum duration allowed for streams on the route. If not specified, the value
* from the :ref:`max_stream_duration
* <envoy_v3_api_field_config.core.v3.HttpProtocolOptions.max_stream_duration>` field in
* :ref:`HttpConnectionManager.common_http_protocol_options
* <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.common_http_protocol_options>`
* is used. If this field is set explicitly to zero, any
* HttpConnectionManager max_stream_duration timeout will be disabled for
* this route.
*
*
* .google.protobuf.Duration max_stream_duration = 1;
*/
public Builder setMaxStreamDuration(com.google.protobuf.Duration value) {
if (maxStreamDurationBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
maxStreamDuration_ = value;
onChanged();
} else {
maxStreamDurationBuilder_.setMessage(value);
}
return this;
}
/**
*
* Specifies the maximum duration allowed for streams on the route. If not specified, the value
* from the :ref:`max_stream_duration
* <envoy_v3_api_field_config.core.v3.HttpProtocolOptions.max_stream_duration>` field in
* :ref:`HttpConnectionManager.common_http_protocol_options
* <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.common_http_protocol_options>`
* is used. If this field is set explicitly to zero, any
* HttpConnectionManager max_stream_duration timeout will be disabled for
* this route.
*
* Specifies the maximum duration allowed for streams on the route. If not specified, the value
* from the :ref:`max_stream_duration
* <envoy_v3_api_field_config.core.v3.HttpProtocolOptions.max_stream_duration>` field in
* :ref:`HttpConnectionManager.common_http_protocol_options
* <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.common_http_protocol_options>`
* is used. If this field is set explicitly to zero, any
* HttpConnectionManager max_stream_duration timeout will be disabled for
* this route.
*
* Specifies the maximum duration allowed for streams on the route. If not specified, the value
* from the :ref:`max_stream_duration
* <envoy_v3_api_field_config.core.v3.HttpProtocolOptions.max_stream_duration>` field in
* :ref:`HttpConnectionManager.common_http_protocol_options
* <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.common_http_protocol_options>`
* is used. If this field is set explicitly to zero, any
* HttpConnectionManager max_stream_duration timeout will be disabled for
* this route.
*
* Specifies the maximum duration allowed for streams on the route. If not specified, the value
* from the :ref:`max_stream_duration
* <envoy_v3_api_field_config.core.v3.HttpProtocolOptions.max_stream_duration>` field in
* :ref:`HttpConnectionManager.common_http_protocol_options
* <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.common_http_protocol_options>`
* is used. If this field is set explicitly to zero, any
* HttpConnectionManager max_stream_duration timeout will be disabled for
* this route.
*
* Specifies the maximum duration allowed for streams on the route. If not specified, the value
* from the :ref:`max_stream_duration
* <envoy_v3_api_field_config.core.v3.HttpProtocolOptions.max_stream_duration>` field in
* :ref:`HttpConnectionManager.common_http_protocol_options
* <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.common_http_protocol_options>`
* is used. If this field is set explicitly to zero, any
* HttpConnectionManager max_stream_duration timeout will be disabled for
* this route.
*
* Specifies the maximum duration allowed for streams on the route. If not specified, the value
* from the :ref:`max_stream_duration
* <envoy_v3_api_field_config.core.v3.HttpProtocolOptions.max_stream_duration>` field in
* :ref:`HttpConnectionManager.common_http_protocol_options
* <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.common_http_protocol_options>`
* is used. If this field is set explicitly to zero, any
* HttpConnectionManager max_stream_duration timeout will be disabled for
* this route.
*
* If present, and the request contains a `grpc-timeout header
* <https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md>`_, use that value as the
* ``max_stream_duration``, but limit the applied timeout to the maximum value specified here.
* If set to 0, the ``grpc-timeout`` header is used without modification.
*
*
* .google.protobuf.Duration grpc_timeout_header_max = 2;
* @return Whether the grpcTimeoutHeaderMax field is set.
*/
public boolean hasGrpcTimeoutHeaderMax() {
return grpcTimeoutHeaderMaxBuilder_ != null || grpcTimeoutHeaderMax_ != null;
}
/**
*
* If present, and the request contains a `grpc-timeout header
* <https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md>`_, use that value as the
* ``max_stream_duration``, but limit the applied timeout to the maximum value specified here.
* If set to 0, the ``grpc-timeout`` header is used without modification.
*
* If present, and the request contains a `grpc-timeout header
* <https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md>`_, use that value as the
* ``max_stream_duration``, but limit the applied timeout to the maximum value specified here.
* If set to 0, the ``grpc-timeout`` header is used without modification.
*
*
* .google.protobuf.Duration grpc_timeout_header_max = 2;
*/
public Builder setGrpcTimeoutHeaderMax(com.google.protobuf.Duration value) {
if (grpcTimeoutHeaderMaxBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
grpcTimeoutHeaderMax_ = value;
onChanged();
} else {
grpcTimeoutHeaderMaxBuilder_.setMessage(value);
}
return this;
}
/**
*
* If present, and the request contains a `grpc-timeout header
* <https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md>`_, use that value as the
* ``max_stream_duration``, but limit the applied timeout to the maximum value specified here.
* If set to 0, the ``grpc-timeout`` header is used without modification.
*
* If present, and the request contains a `grpc-timeout header
* <https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md>`_, use that value as the
* ``max_stream_duration``, but limit the applied timeout to the maximum value specified here.
* If set to 0, the ``grpc-timeout`` header is used without modification.
*
* If present, and the request contains a `grpc-timeout header
* <https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md>`_, use that value as the
* ``max_stream_duration``, but limit the applied timeout to the maximum value specified here.
* If set to 0, the ``grpc-timeout`` header is used without modification.
*
* If present, and the request contains a `grpc-timeout header
* <https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md>`_, use that value as the
* ``max_stream_duration``, but limit the applied timeout to the maximum value specified here.
* If set to 0, the ``grpc-timeout`` header is used without modification.
*
* If present, and the request contains a `grpc-timeout header
* <https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md>`_, use that value as the
* ``max_stream_duration``, but limit the applied timeout to the maximum value specified here.
* If set to 0, the ``grpc-timeout`` header is used without modification.
*
* If present, and the request contains a `grpc-timeout header
* <https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md>`_, use that value as the
* ``max_stream_duration``, but limit the applied timeout to the maximum value specified here.
* If set to 0, the ``grpc-timeout`` header is used without modification.
*
* If present, Envoy will adjust the timeout provided by the ``grpc-timeout`` header by
* subtracting the provided duration from the header. This is useful for allowing Envoy to set
* its global timeout to be less than that of the deadline imposed by the calling client, which
* makes it more likely that Envoy will handle the timeout instead of having the call canceled
* by the client. If, after applying the offset, the resulting timeout is zero or negative,
* the stream will timeout immediately.
*
*
* .google.protobuf.Duration grpc_timeout_header_offset = 3;
* @return Whether the grpcTimeoutHeaderOffset field is set.
*/
public boolean hasGrpcTimeoutHeaderOffset() {
return grpcTimeoutHeaderOffsetBuilder_ != null || grpcTimeoutHeaderOffset_ != null;
}
/**
*
* If present, Envoy will adjust the timeout provided by the ``grpc-timeout`` header by
* subtracting the provided duration from the header. This is useful for allowing Envoy to set
* its global timeout to be less than that of the deadline imposed by the calling client, which
* makes it more likely that Envoy will handle the timeout instead of having the call canceled
* by the client. If, after applying the offset, the resulting timeout is zero or negative,
* the stream will timeout immediately.
*
* If present, Envoy will adjust the timeout provided by the ``grpc-timeout`` header by
* subtracting the provided duration from the header. This is useful for allowing Envoy to set
* its global timeout to be less than that of the deadline imposed by the calling client, which
* makes it more likely that Envoy will handle the timeout instead of having the call canceled
* by the client. If, after applying the offset, the resulting timeout is zero or negative,
* the stream will timeout immediately.
*
*
* .google.protobuf.Duration grpc_timeout_header_offset = 3;
*/
public Builder setGrpcTimeoutHeaderOffset(com.google.protobuf.Duration value) {
if (grpcTimeoutHeaderOffsetBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
grpcTimeoutHeaderOffset_ = value;
onChanged();
} else {
grpcTimeoutHeaderOffsetBuilder_.setMessage(value);
}
return this;
}
/**
*
* If present, Envoy will adjust the timeout provided by the ``grpc-timeout`` header by
* subtracting the provided duration from the header. This is useful for allowing Envoy to set
* its global timeout to be less than that of the deadline imposed by the calling client, which
* makes it more likely that Envoy will handle the timeout instead of having the call canceled
* by the client. If, after applying the offset, the resulting timeout is zero or negative,
* the stream will timeout immediately.
*
* If present, Envoy will adjust the timeout provided by the ``grpc-timeout`` header by
* subtracting the provided duration from the header. This is useful for allowing Envoy to set
* its global timeout to be less than that of the deadline imposed by the calling client, which
* makes it more likely that Envoy will handle the timeout instead of having the call canceled
* by the client. If, after applying the offset, the resulting timeout is zero or negative,
* the stream will timeout immediately.
*
* If present, Envoy will adjust the timeout provided by the ``grpc-timeout`` header by
* subtracting the provided duration from the header. This is useful for allowing Envoy to set
* its global timeout to be less than that of the deadline imposed by the calling client, which
* makes it more likely that Envoy will handle the timeout instead of having the call canceled
* by the client. If, after applying the offset, the resulting timeout is zero or negative,
* the stream will timeout immediately.
*
* If present, Envoy will adjust the timeout provided by the ``grpc-timeout`` header by
* subtracting the provided duration from the header. This is useful for allowing Envoy to set
* its global timeout to be less than that of the deadline imposed by the calling client, which
* makes it more likely that Envoy will handle the timeout instead of having the call canceled
* by the client. If, after applying the offset, the resulting timeout is zero or negative,
* the stream will timeout immediately.
*
* If present, Envoy will adjust the timeout provided by the ``grpc-timeout`` header by
* subtracting the provided duration from the header. This is useful for allowing Envoy to set
* its global timeout to be less than that of the deadline imposed by the calling client, which
* makes it more likely that Envoy will handle the timeout instead of having the call canceled
* by the client. If, after applying the offset, the resulting timeout is zero or negative,
* the stream will timeout immediately.
*
* If present, Envoy will adjust the timeout provided by the ``grpc-timeout`` header by
* subtracting the provided duration from the header. This is useful for allowing Envoy to set
* its global timeout to be less than that of the deadline imposed by the calling client, which
* makes it more likely that Envoy will handle the timeout instead of having the call canceled
* by the client. If, after applying the offset, the resulting timeout is zero or negative,
* the stream will timeout immediately.
*
*
* .google.protobuf.Duration grpc_timeout_header_offset = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>
getGrpcTimeoutHeaderOffsetFieldBuilder() {
if (grpcTimeoutHeaderOffsetBuilder_ == null) {
grpcTimeoutHeaderOffsetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>(
getGrpcTimeoutHeaderOffset(),
getParentForChildren(),
isClean());
grpcTimeoutHeaderOffset_ = null;
}
return grpcTimeoutHeaderOffsetBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:envoy.config.route.v3.RouteAction.MaxStreamDuration)
}
// @@protoc_insertion_point(class_scope:envoy.config.route.v3.RouteAction.MaxStreamDuration)
private static final io.envoyproxy.envoy.config.route.v3.RouteAction.MaxStreamDuration DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.config.route.v3.RouteAction.MaxStreamDuration();
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.MaxStreamDuration getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public MaxStreamDuration parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new MaxStreamDuration(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.config.route.v3.RouteAction.MaxStreamDuration getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int clusterSpecifierCase_ = 0;
private java.lang.Object clusterSpecifier_;
public enum ClusterSpecifierCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
CLUSTER(1),
CLUSTER_HEADER(2),
WEIGHTED_CLUSTERS(3),
CLUSTER_SPECIFIER_PLUGIN(37),
INLINE_CLUSTER_SPECIFIER_PLUGIN(39),
CLUSTERSPECIFIER_NOT_SET(0);
private final int value;
private ClusterSpecifierCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static ClusterSpecifierCase valueOf(int value) {
return forNumber(value);
}
public static ClusterSpecifierCase forNumber(int value) {
switch (value) {
case 1: return CLUSTER;
case 2: return CLUSTER_HEADER;
case 3: return WEIGHTED_CLUSTERS;
case 37: return CLUSTER_SPECIFIER_PLUGIN;
case 39: return INLINE_CLUSTER_SPECIFIER_PLUGIN;
case 0: return CLUSTERSPECIFIER_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public ClusterSpecifierCase
getClusterSpecifierCase() {
return ClusterSpecifierCase.forNumber(
clusterSpecifierCase_);
}
private int hostRewriteSpecifierCase_ = 0;
private java.lang.Object hostRewriteSpecifier_;
public enum HostRewriteSpecifierCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
HOST_REWRITE_LITERAL(6),
AUTO_HOST_REWRITE(7),
HOST_REWRITE_HEADER(29),
HOST_REWRITE_PATH_REGEX(35),
HOSTREWRITESPECIFIER_NOT_SET(0);
private final int value;
private HostRewriteSpecifierCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static HostRewriteSpecifierCase valueOf(int value) {
return forNumber(value);
}
public static HostRewriteSpecifierCase forNumber(int value) {
switch (value) {
case 6: return HOST_REWRITE_LITERAL;
case 7: return AUTO_HOST_REWRITE;
case 29: return HOST_REWRITE_HEADER;
case 35: return HOST_REWRITE_PATH_REGEX;
case 0: return HOSTREWRITESPECIFIER_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public HostRewriteSpecifierCase
getHostRewriteSpecifierCase() {
return HostRewriteSpecifierCase.forNumber(
hostRewriteSpecifierCase_);
}
public static final int CLUSTER_FIELD_NUMBER = 1;
/**
*
* Indicates the upstream cluster to which the request should be routed
* to.
*
*
* string cluster = 1 [(.validate.rules) = { ... }
* @return Whether the cluster field is set.
*/
public boolean hasCluster() {
return clusterSpecifierCase_ == 1;
}
/**
*
* Indicates the upstream cluster to which the request should be routed
* to.
*
* Indicates the upstream cluster to which the request should be routed
* to.
*
*
* string cluster = 1 [(.validate.rules) = { ... }
* @return The bytes for cluster.
*/
public com.google.protobuf.ByteString
getClusterBytes() {
java.lang.Object ref = "";
if (clusterSpecifierCase_ == 1) {
ref = clusterSpecifier_;
}
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (clusterSpecifierCase_ == 1) {
clusterSpecifier_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CLUSTER_HEADER_FIELD_NUMBER = 2;
/**
*
* Envoy will determine the cluster to route to by reading the value of the
* HTTP header named by cluster_header from the request headers. If the
* header is not found or the referenced cluster does not exist, Envoy will
* return a 404 response.
* .. attention::
* Internally, Envoy always uses the HTTP/2 ``:authority`` header to represent the HTTP/1
* ``Host`` header. Thus, if attempting to match on ``Host``, match on ``:authority`` instead.
* .. note::
* If the header appears multiple times only the first value is used.
*
*
* string cluster_header = 2 [(.validate.rules) = { ... }
* @return Whether the clusterHeader field is set.
*/
public boolean hasClusterHeader() {
return clusterSpecifierCase_ == 2;
}
/**
*
* Envoy will determine the cluster to route to by reading the value of the
* HTTP header named by cluster_header from the request headers. If the
* header is not found or the referenced cluster does not exist, Envoy will
* return a 404 response.
* .. attention::
* Internally, Envoy always uses the HTTP/2 ``:authority`` header to represent the HTTP/1
* ``Host`` header. Thus, if attempting to match on ``Host``, match on ``:authority`` instead.
* .. note::
* If the header appears multiple times only the first value is used.
*
* Envoy will determine the cluster to route to by reading the value of the
* HTTP header named by cluster_header from the request headers. If the
* header is not found or the referenced cluster does not exist, Envoy will
* return a 404 response.
* .. attention::
* Internally, Envoy always uses the HTTP/2 ``:authority`` header to represent the HTTP/1
* ``Host`` header. Thus, if attempting to match on ``Host``, match on ``:authority`` instead.
* .. note::
* If the header appears multiple times only the first value is used.
*
*
* string cluster_header = 2 [(.validate.rules) = { ... }
* @return The bytes for clusterHeader.
*/
public com.google.protobuf.ByteString
getClusterHeaderBytes() {
java.lang.Object ref = "";
if (clusterSpecifierCase_ == 2) {
ref = clusterSpecifier_;
}
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (clusterSpecifierCase_ == 2) {
clusterSpecifier_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int WEIGHTED_CLUSTERS_FIELD_NUMBER = 3;
/**
*
* Multiple upstream clusters can be specified for a given route. The
* request is routed to one of the upstream clusters based on weights
* assigned to each cluster. See
* :ref:`traffic splitting <config_http_conn_man_route_table_traffic_splitting_split>`
* for additional documentation.
*
*
* .envoy.config.route.v3.WeightedCluster weighted_clusters = 3;
* @return Whether the weightedClusters field is set.
*/
@java.lang.Override
public boolean hasWeightedClusters() {
return clusterSpecifierCase_ == 3;
}
/**
*
* Multiple upstream clusters can be specified for a given route. The
* request is routed to one of the upstream clusters based on weights
* assigned to each cluster. See
* :ref:`traffic splitting <config_http_conn_man_route_table_traffic_splitting_split>`
* for additional documentation.
*
*
* .envoy.config.route.v3.WeightedCluster weighted_clusters = 3;
* @return The weightedClusters.
*/
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.WeightedCluster getWeightedClusters() {
if (clusterSpecifierCase_ == 3) {
return (io.envoyproxy.envoy.config.route.v3.WeightedCluster) clusterSpecifier_;
}
return io.envoyproxy.envoy.config.route.v3.WeightedCluster.getDefaultInstance();
}
/**
*
* Multiple upstream clusters can be specified for a given route. The
* request is routed to one of the upstream clusters based on weights
* assigned to each cluster. See
* :ref:`traffic splitting <config_http_conn_man_route_table_traffic_splitting_split>`
* for additional documentation.
*
*
* .envoy.config.route.v3.WeightedCluster weighted_clusters = 3;
*/
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.WeightedClusterOrBuilder getWeightedClustersOrBuilder() {
if (clusterSpecifierCase_ == 3) {
return (io.envoyproxy.envoy.config.route.v3.WeightedCluster) clusterSpecifier_;
}
return io.envoyproxy.envoy.config.route.v3.WeightedCluster.getDefaultInstance();
}
public static final int CLUSTER_SPECIFIER_PLUGIN_FIELD_NUMBER = 37;
/**
*
* Name of the cluster specifier plugin to use to determine the cluster for requests on this route.
* The cluster specifier plugin name must be defined in the associated
* :ref:`cluster specifier plugins <envoy_v3_api_field_config.route.v3.RouteConfiguration.cluster_specifier_plugins>`
* in the :ref:`name <envoy_v3_api_field_config.core.v3.TypedExtensionConfig.name>` field.
*
*
* string cluster_specifier_plugin = 37;
* @return Whether the clusterSpecifierPlugin field is set.
*/
public boolean hasClusterSpecifierPlugin() {
return clusterSpecifierCase_ == 37;
}
/**
*
* Name of the cluster specifier plugin to use to determine the cluster for requests on this route.
* The cluster specifier plugin name must be defined in the associated
* :ref:`cluster specifier plugins <envoy_v3_api_field_config.route.v3.RouteConfiguration.cluster_specifier_plugins>`
* in the :ref:`name <envoy_v3_api_field_config.core.v3.TypedExtensionConfig.name>` field.
*
* Name of the cluster specifier plugin to use to determine the cluster for requests on this route.
* The cluster specifier plugin name must be defined in the associated
* :ref:`cluster specifier plugins <envoy_v3_api_field_config.route.v3.RouteConfiguration.cluster_specifier_plugins>`
* in the :ref:`name <envoy_v3_api_field_config.core.v3.TypedExtensionConfig.name>` field.
*
*
* string cluster_specifier_plugin = 37;
* @return The bytes for clusterSpecifierPlugin.
*/
public com.google.protobuf.ByteString
getClusterSpecifierPluginBytes() {
java.lang.Object ref = "";
if (clusterSpecifierCase_ == 37) {
ref = clusterSpecifier_;
}
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (clusterSpecifierCase_ == 37) {
clusterSpecifier_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int INLINE_CLUSTER_SPECIFIER_PLUGIN_FIELD_NUMBER = 39;
/**
*
* Custom cluster specifier plugin configuration to use to determine the cluster for requests
* on this route.
*
*
* .envoy.config.route.v3.ClusterSpecifierPlugin inline_cluster_specifier_plugin = 39;
* @return Whether the inlineClusterSpecifierPlugin field is set.
*/
@java.lang.Override
public boolean hasInlineClusterSpecifierPlugin() {
return clusterSpecifierCase_ == 39;
}
/**
*
* Custom cluster specifier plugin configuration to use to determine the cluster for requests
* on this route.
*
*
* .envoy.config.route.v3.ClusterSpecifierPlugin inline_cluster_specifier_plugin = 39;
* @return The inlineClusterSpecifierPlugin.
*/
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.ClusterSpecifierPlugin getInlineClusterSpecifierPlugin() {
if (clusterSpecifierCase_ == 39) {
return (io.envoyproxy.envoy.config.route.v3.ClusterSpecifierPlugin) clusterSpecifier_;
}
return io.envoyproxy.envoy.config.route.v3.ClusterSpecifierPlugin.getDefaultInstance();
}
/**
*
* Custom cluster specifier plugin configuration to use to determine the cluster for requests
* on this route.
*
*
* .envoy.config.route.v3.ClusterSpecifierPlugin inline_cluster_specifier_plugin = 39;
*/
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.ClusterSpecifierPluginOrBuilder getInlineClusterSpecifierPluginOrBuilder() {
if (clusterSpecifierCase_ == 39) {
return (io.envoyproxy.envoy.config.route.v3.ClusterSpecifierPlugin) clusterSpecifier_;
}
return io.envoyproxy.envoy.config.route.v3.ClusterSpecifierPlugin.getDefaultInstance();
}
public static final int CLUSTER_NOT_FOUND_RESPONSE_CODE_FIELD_NUMBER = 20;
private int clusterNotFoundResponseCode_;
/**
*
* The HTTP status code to use when configured cluster is not found.
* The default response code is 503 Service Unavailable.
*
*
* .envoy.config.route.v3.RouteAction.ClusterNotFoundResponseCode cluster_not_found_response_code = 20 [(.validate.rules) = { ... }
* @return The enum numeric value on the wire for clusterNotFoundResponseCode.
*/
@java.lang.Override public int getClusterNotFoundResponseCodeValue() {
return clusterNotFoundResponseCode_;
}
/**
*
* The HTTP status code to use when configured cluster is not found.
* The default response code is 503 Service Unavailable.
*
*
* .envoy.config.route.v3.RouteAction.ClusterNotFoundResponseCode cluster_not_found_response_code = 20 [(.validate.rules) = { ... }
* @return The clusterNotFoundResponseCode.
*/
@java.lang.Override public io.envoyproxy.envoy.config.route.v3.RouteAction.ClusterNotFoundResponseCode getClusterNotFoundResponseCode() {
@SuppressWarnings("deprecation")
io.envoyproxy.envoy.config.route.v3.RouteAction.ClusterNotFoundResponseCode result = io.envoyproxy.envoy.config.route.v3.RouteAction.ClusterNotFoundResponseCode.valueOf(clusterNotFoundResponseCode_);
return result == null ? io.envoyproxy.envoy.config.route.v3.RouteAction.ClusterNotFoundResponseCode.UNRECOGNIZED : result;
}
public static final int METADATA_MATCH_FIELD_NUMBER = 4;
private io.envoyproxy.envoy.config.core.v3.Metadata metadataMatch_;
/**
*
* Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints
* in the upstream cluster with metadata matching what's set in this field will be considered
* for load balancing. If using :ref:`weighted_clusters
* <envoy_v3_api_field_config.route.v3.RouteAction.weighted_clusters>`, metadata will be merged, with values
* provided there taking precedence. The filter name should be specified as ``envoy.lb``.
*
*
* .envoy.config.core.v3.Metadata metadata_match = 4;
* @return Whether the metadataMatch field is set.
*/
@java.lang.Override
public boolean hasMetadataMatch() {
return metadataMatch_ != null;
}
/**
*
* Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints
* in the upstream cluster with metadata matching what's set in this field will be considered
* for load balancing. If using :ref:`weighted_clusters
* <envoy_v3_api_field_config.route.v3.RouteAction.weighted_clusters>`, metadata will be merged, with values
* provided there taking precedence. The filter name should be specified as ``envoy.lb``.
*
* Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints
* in the upstream cluster with metadata matching what's set in this field will be considered
* for load balancing. If using :ref:`weighted_clusters
* <envoy_v3_api_field_config.route.v3.RouteAction.weighted_clusters>`, metadata will be merged, with values
* provided there taking precedence. The filter name should be specified as ``envoy.lb``.
*
*
* .envoy.config.core.v3.Metadata metadata_match = 4;
*/
@java.lang.Override
public io.envoyproxy.envoy.config.core.v3.MetadataOrBuilder getMetadataMatchOrBuilder() {
return getMetadataMatch();
}
public static final int PREFIX_REWRITE_FIELD_NUMBER = 5;
private volatile java.lang.Object prefixRewrite_;
/**
*
* Indicates that during forwarding, the matched prefix (or path) should be
* swapped with this value. This option allows application URLs to be rooted
* at a different path from those exposed at the reverse proxy layer. The router filter will
* place the original path before rewrite into the :ref:`x-envoy-original-path
* <config_http_filters_router_x-envoy-original-path>` header.
* Only one of :ref:`regex_rewrite <envoy_v3_api_field_config.route.v3.RouteAction.regex_rewrite>`
* :ref:`path_rewrite_policy <envoy_v3_api_field_config.route.v3.RouteAction.path_rewrite_policy>`,
* or :ref:`prefix_rewrite <envoy_v3_api_field_config.route.v3.RouteAction.prefix_rewrite>` may be specified.
* .. attention::
* Pay careful attention to the use of trailing slashes in the
* :ref:`route's match <envoy_v3_api_field_config.route.v3.Route.match>` prefix value.
* Stripping a prefix from a path requires multiple Routes to handle all cases. For example,
* rewriting ``/prefix`` to ``/`` and ``/prefix/etc`` to ``/etc`` cannot be done in a single
* :ref:`Route <envoy_v3_api_msg_config.route.v3.Route>`, as shown by the below config entries:
* .. code-block:: yaml
* - match:
* prefix: "/prefix/"
* route:
* prefix_rewrite: "/"
* - match:
* prefix: "/prefix"
* route:
* prefix_rewrite: "/"
* Having above entries in the config, requests to ``/prefix`` will be stripped to ``/``, while
* requests to ``/prefix/etc`` will be stripped to ``/etc``.
*
* Indicates that during forwarding, the matched prefix (or path) should be
* swapped with this value. This option allows application URLs to be rooted
* at a different path from those exposed at the reverse proxy layer. The router filter will
* place the original path before rewrite into the :ref:`x-envoy-original-path
* <config_http_filters_router_x-envoy-original-path>` header.
* Only one of :ref:`regex_rewrite <envoy_v3_api_field_config.route.v3.RouteAction.regex_rewrite>`
* :ref:`path_rewrite_policy <envoy_v3_api_field_config.route.v3.RouteAction.path_rewrite_policy>`,
* or :ref:`prefix_rewrite <envoy_v3_api_field_config.route.v3.RouteAction.prefix_rewrite>` may be specified.
* .. attention::
* Pay careful attention to the use of trailing slashes in the
* :ref:`route's match <envoy_v3_api_field_config.route.v3.Route.match>` prefix value.
* Stripping a prefix from a path requires multiple Routes to handle all cases. For example,
* rewriting ``/prefix`` to ``/`` and ``/prefix/etc`` to ``/etc`` cannot be done in a single
* :ref:`Route <envoy_v3_api_msg_config.route.v3.Route>`, as shown by the below config entries:
* .. code-block:: yaml
* - match:
* prefix: "/prefix/"
* route:
* prefix_rewrite: "/"
* - match:
* prefix: "/prefix"
* route:
* prefix_rewrite: "/"
* Having above entries in the config, requests to ``/prefix`` will be stripped to ``/``, while
* requests to ``/prefix/etc`` will be stripped to ``/etc``.
*
*
* string prefix_rewrite = 5 [(.validate.rules) = { ... }
* @return The bytes for prefixRewrite.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getPrefixRewriteBytes() {
java.lang.Object ref = prefixRewrite_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
prefixRewrite_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int REGEX_REWRITE_FIELD_NUMBER = 32;
private io.envoyproxy.envoy.type.matcher.v3.RegexMatchAndSubstitute regexRewrite_;
/**
*
* Indicates that during forwarding, portions of the path that match the
* pattern should be rewritten, even allowing the substitution of capture
* groups from the pattern into the new path as specified by the rewrite
* substitution string. This is useful to allow application paths to be
* rewritten in a way that is aware of segments with variable content like
* identifiers. The router filter will place the original path as it was
* before the rewrite into the :ref:`x-envoy-original-path
* <config_http_filters_router_x-envoy-original-path>` header.
* Only one of :ref:`regex_rewrite <envoy_v3_api_field_config.route.v3.RouteAction.regex_rewrite>`,
* :ref:`prefix_rewrite <envoy_v3_api_field_config.route.v3.RouteAction.prefix_rewrite>`, or
* :ref:`path_rewrite_policy <envoy_v3_api_field_config.route.v3.RouteAction.path_rewrite_policy>`]
* may be specified.
* Examples using Google's `RE2 <https://github.com/google/re2>`_ engine:
* * The path pattern ``^/service/([^/]+)(/.*)$`` paired with a substitution
* string of ``\2/instance/\1`` would transform ``/service/foo/v1/api``
* into ``/v1/api/instance/foo``.
* * The pattern ``one`` paired with a substitution string of ``two`` would
* transform ``/xxx/one/yyy/one/zzz`` into ``/xxx/two/yyy/two/zzz``.
* * The pattern ``^(.*?)one(.*)$`` paired with a substitution string of
* ``\1two\2`` would replace only the first occurrence of ``one``,
* transforming path ``/xxx/one/yyy/one/zzz`` into ``/xxx/two/yyy/one/zzz``.
* * The pattern ``(?i)/xxx/`` paired with a substitution string of ``/yyy/``
* would do a case-insensitive match and transform path ``/aaa/XxX/bbb`` to
* ``/aaa/yyy/bbb``.
*
*
* .envoy.type.matcher.v3.RegexMatchAndSubstitute regex_rewrite = 32;
* @return Whether the regexRewrite field is set.
*/
@java.lang.Override
public boolean hasRegexRewrite() {
return regexRewrite_ != null;
}
/**
*
* Indicates that during forwarding, portions of the path that match the
* pattern should be rewritten, even allowing the substitution of capture
* groups from the pattern into the new path as specified by the rewrite
* substitution string. This is useful to allow application paths to be
* rewritten in a way that is aware of segments with variable content like
* identifiers. The router filter will place the original path as it was
* before the rewrite into the :ref:`x-envoy-original-path
* <config_http_filters_router_x-envoy-original-path>` header.
* Only one of :ref:`regex_rewrite <envoy_v3_api_field_config.route.v3.RouteAction.regex_rewrite>`,
* :ref:`prefix_rewrite <envoy_v3_api_field_config.route.v3.RouteAction.prefix_rewrite>`, or
* :ref:`path_rewrite_policy <envoy_v3_api_field_config.route.v3.RouteAction.path_rewrite_policy>`]
* may be specified.
* Examples using Google's `RE2 <https://github.com/google/re2>`_ engine:
* * The path pattern ``^/service/([^/]+)(/.*)$`` paired with a substitution
* string of ``\2/instance/\1`` would transform ``/service/foo/v1/api``
* into ``/v1/api/instance/foo``.
* * The pattern ``one`` paired with a substitution string of ``two`` would
* transform ``/xxx/one/yyy/one/zzz`` into ``/xxx/two/yyy/two/zzz``.
* * The pattern ``^(.*?)one(.*)$`` paired with a substitution string of
* ``\1two\2`` would replace only the first occurrence of ``one``,
* transforming path ``/xxx/one/yyy/one/zzz`` into ``/xxx/two/yyy/one/zzz``.
* * The pattern ``(?i)/xxx/`` paired with a substitution string of ``/yyy/``
* would do a case-insensitive match and transform path ``/aaa/XxX/bbb`` to
* ``/aaa/yyy/bbb``.
*
* Indicates that during forwarding, portions of the path that match the
* pattern should be rewritten, even allowing the substitution of capture
* groups from the pattern into the new path as specified by the rewrite
* substitution string. This is useful to allow application paths to be
* rewritten in a way that is aware of segments with variable content like
* identifiers. The router filter will place the original path as it was
* before the rewrite into the :ref:`x-envoy-original-path
* <config_http_filters_router_x-envoy-original-path>` header.
* Only one of :ref:`regex_rewrite <envoy_v3_api_field_config.route.v3.RouteAction.regex_rewrite>`,
* :ref:`prefix_rewrite <envoy_v3_api_field_config.route.v3.RouteAction.prefix_rewrite>`, or
* :ref:`path_rewrite_policy <envoy_v3_api_field_config.route.v3.RouteAction.path_rewrite_policy>`]
* may be specified.
* Examples using Google's `RE2 <https://github.com/google/re2>`_ engine:
* * The path pattern ``^/service/([^/]+)(/.*)$`` paired with a substitution
* string of ``\2/instance/\1`` would transform ``/service/foo/v1/api``
* into ``/v1/api/instance/foo``.
* * The pattern ``one`` paired with a substitution string of ``two`` would
* transform ``/xxx/one/yyy/one/zzz`` into ``/xxx/two/yyy/two/zzz``.
* * The pattern ``^(.*?)one(.*)$`` paired with a substitution string of
* ``\1two\2`` would replace only the first occurrence of ``one``,
* transforming path ``/xxx/one/yyy/one/zzz`` into ``/xxx/two/yyy/one/zzz``.
* * The pattern ``(?i)/xxx/`` paired with a substitution string of ``/yyy/``
* would do a case-insensitive match and transform path ``/aaa/XxX/bbb`` to
* ``/aaa/yyy/bbb``.
*
*
* .envoy.type.matcher.v3.RegexMatchAndSubstitute regex_rewrite = 32;
*/
@java.lang.Override
public io.envoyproxy.envoy.type.matcher.v3.RegexMatchAndSubstituteOrBuilder getRegexRewriteOrBuilder() {
return getRegexRewrite();
}
public static final int PATH_REWRITE_POLICY_FIELD_NUMBER = 41;
private io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig pathRewritePolicy_;
/**
*
* [#extension-category: envoy.path.rewrite]
*
*
* .envoy.config.core.v3.TypedExtensionConfig path_rewrite_policy = 41;
* @return Whether the pathRewritePolicy field is set.
*/
@java.lang.Override
public boolean hasPathRewritePolicy() {
return pathRewritePolicy_ != null;
}
/**
*
*
* .envoy.config.core.v3.TypedExtensionConfig path_rewrite_policy = 41;
*/
@java.lang.Override
public io.envoyproxy.envoy.config.core.v3.TypedExtensionConfigOrBuilder getPathRewritePolicyOrBuilder() {
return getPathRewritePolicy();
}
public static final int HOST_REWRITE_LITERAL_FIELD_NUMBER = 6;
/**
*
* Indicates that during forwarding, the host header will be swapped with
* this value. Using this option will append the
* :ref:`config_http_conn_man_headers_x-forwarded-host` header if
* :ref:`append_x_forwarded_host <envoy_v3_api_field_config.route.v3.RouteAction.append_x_forwarded_host>`
* is set.
*
*
* string host_rewrite_literal = 6 [(.validate.rules) = { ... }
* @return Whether the hostRewriteLiteral field is set.
*/
public boolean hasHostRewriteLiteral() {
return hostRewriteSpecifierCase_ == 6;
}
/**
*
* Indicates that during forwarding, the host header will be swapped with
* this value. Using this option will append the
* :ref:`config_http_conn_man_headers_x-forwarded-host` header if
* :ref:`append_x_forwarded_host <envoy_v3_api_field_config.route.v3.RouteAction.append_x_forwarded_host>`
* is set.
*
* Indicates that during forwarding, the host header will be swapped with
* this value. Using this option will append the
* :ref:`config_http_conn_man_headers_x-forwarded-host` header if
* :ref:`append_x_forwarded_host <envoy_v3_api_field_config.route.v3.RouteAction.append_x_forwarded_host>`
* is set.
*
*
* string host_rewrite_literal = 6 [(.validate.rules) = { ... }
* @return The bytes for hostRewriteLiteral.
*/
public com.google.protobuf.ByteString
getHostRewriteLiteralBytes() {
java.lang.Object ref = "";
if (hostRewriteSpecifierCase_ == 6) {
ref = hostRewriteSpecifier_;
}
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (hostRewriteSpecifierCase_ == 6) {
hostRewriteSpecifier_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int AUTO_HOST_REWRITE_FIELD_NUMBER = 7;
/**
*
* Indicates that during forwarding, the host header will be swapped with
* the hostname of the upstream host chosen by the cluster manager. This
* option is applicable only when the destination cluster for a route is of
* type ``strict_dns`` or ``logical_dns``,
* or when :ref:`hostname <envoy_v3_api_field_config.endpoint.v3.Endpoint.hostname>`
* field is not empty. Setting this to true with other cluster types
* has no effect. Using this option will append the
* :ref:`config_http_conn_man_headers_x-forwarded-host` header if
* :ref:`append_x_forwarded_host <envoy_v3_api_field_config.route.v3.RouteAction.append_x_forwarded_host>`
* is set.
*
*
* .google.protobuf.BoolValue auto_host_rewrite = 7;
* @return Whether the autoHostRewrite field is set.
*/
@java.lang.Override
public boolean hasAutoHostRewrite() {
return hostRewriteSpecifierCase_ == 7;
}
/**
*
* Indicates that during forwarding, the host header will be swapped with
* the hostname of the upstream host chosen by the cluster manager. This
* option is applicable only when the destination cluster for a route is of
* type ``strict_dns`` or ``logical_dns``,
* or when :ref:`hostname <envoy_v3_api_field_config.endpoint.v3.Endpoint.hostname>`
* field is not empty. Setting this to true with other cluster types
* has no effect. Using this option will append the
* :ref:`config_http_conn_man_headers_x-forwarded-host` header if
* :ref:`append_x_forwarded_host <envoy_v3_api_field_config.route.v3.RouteAction.append_x_forwarded_host>`
* is set.
*
*
* .google.protobuf.BoolValue auto_host_rewrite = 7;
* @return The autoHostRewrite.
*/
@java.lang.Override
public com.google.protobuf.BoolValue getAutoHostRewrite() {
if (hostRewriteSpecifierCase_ == 7) {
return (com.google.protobuf.BoolValue) hostRewriteSpecifier_;
}
return com.google.protobuf.BoolValue.getDefaultInstance();
}
/**
*
* Indicates that during forwarding, the host header will be swapped with
* the hostname of the upstream host chosen by the cluster manager. This
* option is applicable only when the destination cluster for a route is of
* type ``strict_dns`` or ``logical_dns``,
* or when :ref:`hostname <envoy_v3_api_field_config.endpoint.v3.Endpoint.hostname>`
* field is not empty. Setting this to true with other cluster types
* has no effect. Using this option will append the
* :ref:`config_http_conn_man_headers_x-forwarded-host` header if
* :ref:`append_x_forwarded_host <envoy_v3_api_field_config.route.v3.RouteAction.append_x_forwarded_host>`
* is set.
*
*
* .google.protobuf.BoolValue auto_host_rewrite = 7;
*/
@java.lang.Override
public com.google.protobuf.BoolValueOrBuilder getAutoHostRewriteOrBuilder() {
if (hostRewriteSpecifierCase_ == 7) {
return (com.google.protobuf.BoolValue) hostRewriteSpecifier_;
}
return com.google.protobuf.BoolValue.getDefaultInstance();
}
public static final int HOST_REWRITE_HEADER_FIELD_NUMBER = 29;
/**
*
* Indicates that during forwarding, the host header will be swapped with the content of given
* downstream or :ref:`custom <config_http_conn_man_headers_custom_request_headers>` header.
* If header value is empty, host header is left intact. Using this option will append the
* :ref:`config_http_conn_man_headers_x-forwarded-host` header if
* :ref:`append_x_forwarded_host <envoy_v3_api_field_config.route.v3.RouteAction.append_x_forwarded_host>`
* is set.
* .. attention::
* Pay attention to the potential security implications of using this option. Provided header
* must come from trusted source.
* .. note::
* If the header appears multiple times only the first value is used.
*
*
* string host_rewrite_header = 29 [(.validate.rules) = { ... }
* @return Whether the hostRewriteHeader field is set.
*/
public boolean hasHostRewriteHeader() {
return hostRewriteSpecifierCase_ == 29;
}
/**
*
* Indicates that during forwarding, the host header will be swapped with the content of given
* downstream or :ref:`custom <config_http_conn_man_headers_custom_request_headers>` header.
* If header value is empty, host header is left intact. Using this option will append the
* :ref:`config_http_conn_man_headers_x-forwarded-host` header if
* :ref:`append_x_forwarded_host <envoy_v3_api_field_config.route.v3.RouteAction.append_x_forwarded_host>`
* is set.
* .. attention::
* Pay attention to the potential security implications of using this option. Provided header
* must come from trusted source.
* .. note::
* If the header appears multiple times only the first value is used.
*
* Indicates that during forwarding, the host header will be swapped with the content of given
* downstream or :ref:`custom <config_http_conn_man_headers_custom_request_headers>` header.
* If header value is empty, host header is left intact. Using this option will append the
* :ref:`config_http_conn_man_headers_x-forwarded-host` header if
* :ref:`append_x_forwarded_host <envoy_v3_api_field_config.route.v3.RouteAction.append_x_forwarded_host>`
* is set.
* .. attention::
* Pay attention to the potential security implications of using this option. Provided header
* must come from trusted source.
* .. note::
* If the header appears multiple times only the first value is used.
*
*
* string host_rewrite_header = 29 [(.validate.rules) = { ... }
* @return The bytes for hostRewriteHeader.
*/
public com.google.protobuf.ByteString
getHostRewriteHeaderBytes() {
java.lang.Object ref = "";
if (hostRewriteSpecifierCase_ == 29) {
ref = hostRewriteSpecifier_;
}
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (hostRewriteSpecifierCase_ == 29) {
hostRewriteSpecifier_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int HOST_REWRITE_PATH_REGEX_FIELD_NUMBER = 35;
/**
*
* Indicates that during forwarding, the host header will be swapped with
* the result of the regex substitution executed on path value with query and fragment removed.
* This is useful for transitioning variable content between path segment and subdomain.
* Using this option will append the
* :ref:`config_http_conn_man_headers_x-forwarded-host` header if
* :ref:`append_x_forwarded_host <envoy_v3_api_field_config.route.v3.RouteAction.append_x_forwarded_host>`
* is set.
* For example with the following config:
* .. code-block:: yaml
* host_rewrite_path_regex:
* pattern:
* google_re2: {}
* regex: "^/(.+)/.+$"
* substitution: \1
* Would rewrite the host header to ``envoyproxy.io`` given the path ``/envoyproxy.io/some/path``.
*
*
* .envoy.type.matcher.v3.RegexMatchAndSubstitute host_rewrite_path_regex = 35;
* @return Whether the hostRewritePathRegex field is set.
*/
@java.lang.Override
public boolean hasHostRewritePathRegex() {
return hostRewriteSpecifierCase_ == 35;
}
/**
*
* Indicates that during forwarding, the host header will be swapped with
* the result of the regex substitution executed on path value with query and fragment removed.
* This is useful for transitioning variable content between path segment and subdomain.
* Using this option will append the
* :ref:`config_http_conn_man_headers_x-forwarded-host` header if
* :ref:`append_x_forwarded_host <envoy_v3_api_field_config.route.v3.RouteAction.append_x_forwarded_host>`
* is set.
* For example with the following config:
* .. code-block:: yaml
* host_rewrite_path_regex:
* pattern:
* google_re2: {}
* regex: "^/(.+)/.+$"
* substitution: \1
* Would rewrite the host header to ``envoyproxy.io`` given the path ``/envoyproxy.io/some/path``.
*
*
* .envoy.type.matcher.v3.RegexMatchAndSubstitute host_rewrite_path_regex = 35;
* @return The hostRewritePathRegex.
*/
@java.lang.Override
public io.envoyproxy.envoy.type.matcher.v3.RegexMatchAndSubstitute getHostRewritePathRegex() {
if (hostRewriteSpecifierCase_ == 35) {
return (io.envoyproxy.envoy.type.matcher.v3.RegexMatchAndSubstitute) hostRewriteSpecifier_;
}
return io.envoyproxy.envoy.type.matcher.v3.RegexMatchAndSubstitute.getDefaultInstance();
}
/**
*
* Indicates that during forwarding, the host header will be swapped with
* the result of the regex substitution executed on path value with query and fragment removed.
* This is useful for transitioning variable content between path segment and subdomain.
* Using this option will append the
* :ref:`config_http_conn_man_headers_x-forwarded-host` header if
* :ref:`append_x_forwarded_host <envoy_v3_api_field_config.route.v3.RouteAction.append_x_forwarded_host>`
* is set.
* For example with the following config:
* .. code-block:: yaml
* host_rewrite_path_regex:
* pattern:
* google_re2: {}
* regex: "^/(.+)/.+$"
* substitution: \1
* Would rewrite the host header to ``envoyproxy.io`` given the path ``/envoyproxy.io/some/path``.
*
*
* .envoy.type.matcher.v3.RegexMatchAndSubstitute host_rewrite_path_regex = 35;
*/
@java.lang.Override
public io.envoyproxy.envoy.type.matcher.v3.RegexMatchAndSubstituteOrBuilder getHostRewritePathRegexOrBuilder() {
if (hostRewriteSpecifierCase_ == 35) {
return (io.envoyproxy.envoy.type.matcher.v3.RegexMatchAndSubstitute) hostRewriteSpecifier_;
}
return io.envoyproxy.envoy.type.matcher.v3.RegexMatchAndSubstitute.getDefaultInstance();
}
public static final int APPEND_X_FORWARDED_HOST_FIELD_NUMBER = 38;
private boolean appendXForwardedHost_;
/**
*
* If set, then a host rewrite action (one of
* :ref:`host_rewrite_literal <envoy_v3_api_field_config.route.v3.RouteAction.host_rewrite_literal>`,
* :ref:`auto_host_rewrite <envoy_v3_api_field_config.route.v3.RouteAction.auto_host_rewrite>`,
* :ref:`host_rewrite_header <envoy_v3_api_field_config.route.v3.RouteAction.host_rewrite_header>`, or
* :ref:`host_rewrite_path_regex <envoy_v3_api_field_config.route.v3.RouteAction.host_rewrite_path_regex>`)
* causes the original value of the host header, if any, to be appended to the
* :ref:`config_http_conn_man_headers_x-forwarded-host` HTTP header if it is different to the last value appended.
* This can be disabled by setting the runtime guard ``envoy_reloadable_features_append_xfh_idempotent`` to false.
*
*
* bool append_x_forwarded_host = 38;
* @return The appendXForwardedHost.
*/
@java.lang.Override
public boolean getAppendXForwardedHost() {
return appendXForwardedHost_;
}
public static final int TIMEOUT_FIELD_NUMBER = 8;
private com.google.protobuf.Duration timeout_;
/**
*
* Specifies the upstream timeout for the route. If not specified, the default is 15s. This
* spans between the point at which the entire downstream request (i.e. end-of-stream) has been
* processed and when the upstream response has been completely processed. A value of 0 will
* disable the route's timeout.
* .. note::
* This timeout includes all retries. See also
* :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`,
* :ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms`, and the
* :ref:`retry overview <arch_overview_http_routing_retry>`.
*
*
* .google.protobuf.Duration timeout = 8;
* @return Whether the timeout field is set.
*/
@java.lang.Override
public boolean hasTimeout() {
return timeout_ != null;
}
/**
*
* Specifies the upstream timeout for the route. If not specified, the default is 15s. This
* spans between the point at which the entire downstream request (i.e. end-of-stream) has been
* processed and when the upstream response has been completely processed. A value of 0 will
* disable the route's timeout.
* .. note::
* This timeout includes all retries. See also
* :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`,
* :ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms`, and the
* :ref:`retry overview <arch_overview_http_routing_retry>`.
*
* Specifies the upstream timeout for the route. If not specified, the default is 15s. This
* spans between the point at which the entire downstream request (i.e. end-of-stream) has been
* processed and when the upstream response has been completely processed. A value of 0 will
* disable the route's timeout.
* .. note::
* This timeout includes all retries. See also
* :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`,
* :ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms`, and the
* :ref:`retry overview <arch_overview_http_routing_retry>`.
*
*
* .google.protobuf.Duration timeout = 8;
*/
@java.lang.Override
public com.google.protobuf.DurationOrBuilder getTimeoutOrBuilder() {
return getTimeout();
}
public static final int IDLE_TIMEOUT_FIELD_NUMBER = 24;
private com.google.protobuf.Duration idleTimeout_;
/**
*
* Specifies the idle timeout for the route. If not specified, there is no per-route idle timeout,
* although the connection manager wide :ref:`stream_idle_timeout
* <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.stream_idle_timeout>`
* will still apply. A value of 0 will completely disable the route's idle timeout, even if a
* connection manager stream idle timeout is configured.
* The idle timeout is distinct to :ref:`timeout
* <envoy_v3_api_field_config.route.v3.RouteAction.timeout>`, which provides an upper bound
* on the upstream response time; :ref:`idle_timeout
* <envoy_v3_api_field_config.route.v3.RouteAction.idle_timeout>` instead bounds the amount
* of time the request's stream may be idle.
* After header decoding, the idle timeout will apply on downstream and
* upstream request events. Each time an encode/decode event for headers or
* data is processed for the stream, the timer will be reset. If the timeout
* fires, the stream is terminated with a 408 Request Timeout error code if no
* upstream response header has been received, otherwise a stream reset
* occurs.
* If the :ref:`overload action <config_overload_manager_overload_actions>` "envoy.overload_actions.reduce_timeouts"
* is configured, this timeout is scaled according to the value for
* :ref:`HTTP_DOWNSTREAM_STREAM_IDLE <envoy_v3_api_enum_value_config.overload.v3.ScaleTimersOverloadActionConfig.TimerType.HTTP_DOWNSTREAM_STREAM_IDLE>`.
*
*
* .google.protobuf.Duration idle_timeout = 24;
* @return Whether the idleTimeout field is set.
*/
@java.lang.Override
public boolean hasIdleTimeout() {
return idleTimeout_ != null;
}
/**
*
* Specifies the idle timeout for the route. If not specified, there is no per-route idle timeout,
* although the connection manager wide :ref:`stream_idle_timeout
* <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.stream_idle_timeout>`
* will still apply. A value of 0 will completely disable the route's idle timeout, even if a
* connection manager stream idle timeout is configured.
* The idle timeout is distinct to :ref:`timeout
* <envoy_v3_api_field_config.route.v3.RouteAction.timeout>`, which provides an upper bound
* on the upstream response time; :ref:`idle_timeout
* <envoy_v3_api_field_config.route.v3.RouteAction.idle_timeout>` instead bounds the amount
* of time the request's stream may be idle.
* After header decoding, the idle timeout will apply on downstream and
* upstream request events. Each time an encode/decode event for headers or
* data is processed for the stream, the timer will be reset. If the timeout
* fires, the stream is terminated with a 408 Request Timeout error code if no
* upstream response header has been received, otherwise a stream reset
* occurs.
* If the :ref:`overload action <config_overload_manager_overload_actions>` "envoy.overload_actions.reduce_timeouts"
* is configured, this timeout is scaled according to the value for
* :ref:`HTTP_DOWNSTREAM_STREAM_IDLE <envoy_v3_api_enum_value_config.overload.v3.ScaleTimersOverloadActionConfig.TimerType.HTTP_DOWNSTREAM_STREAM_IDLE>`.
*
* Specifies the idle timeout for the route. If not specified, there is no per-route idle timeout,
* although the connection manager wide :ref:`stream_idle_timeout
* <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.stream_idle_timeout>`
* will still apply. A value of 0 will completely disable the route's idle timeout, even if a
* connection manager stream idle timeout is configured.
* The idle timeout is distinct to :ref:`timeout
* <envoy_v3_api_field_config.route.v3.RouteAction.timeout>`, which provides an upper bound
* on the upstream response time; :ref:`idle_timeout
* <envoy_v3_api_field_config.route.v3.RouteAction.idle_timeout>` instead bounds the amount
* of time the request's stream may be idle.
* After header decoding, the idle timeout will apply on downstream and
* upstream request events. Each time an encode/decode event for headers or
* data is processed for the stream, the timer will be reset. If the timeout
* fires, the stream is terminated with a 408 Request Timeout error code if no
* upstream response header has been received, otherwise a stream reset
* occurs.
* If the :ref:`overload action <config_overload_manager_overload_actions>` "envoy.overload_actions.reduce_timeouts"
* is configured, this timeout is scaled according to the value for
* :ref:`HTTP_DOWNSTREAM_STREAM_IDLE <envoy_v3_api_enum_value_config.overload.v3.ScaleTimersOverloadActionConfig.TimerType.HTTP_DOWNSTREAM_STREAM_IDLE>`.
*
*
* .google.protobuf.Duration idle_timeout = 24;
*/
@java.lang.Override
public com.google.protobuf.DurationOrBuilder getIdleTimeoutOrBuilder() {
return getIdleTimeout();
}
public static final int EARLY_DATA_POLICY_FIELD_NUMBER = 40;
private io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig earlyDataPolicy_;
/**
*
* Specifies how to send request over TLS early data.
* If absent, allows `safe HTTP requests <https://www.rfc-editor.org/rfc/rfc7231#section-4.2.1>`_ to be sent on early data.
* [#extension-category: envoy.route.early_data_policy]
*
*
* .envoy.config.core.v3.TypedExtensionConfig early_data_policy = 40;
* @return Whether the earlyDataPolicy field is set.
*/
@java.lang.Override
public boolean hasEarlyDataPolicy() {
return earlyDataPolicy_ != null;
}
/**
*
* Specifies how to send request over TLS early data.
* If absent, allows `safe HTTP requests <https://www.rfc-editor.org/rfc/rfc7231#section-4.2.1>`_ to be sent on early data.
* [#extension-category: envoy.route.early_data_policy]
*
* Specifies how to send request over TLS early data.
* If absent, allows `safe HTTP requests <https://www.rfc-editor.org/rfc/rfc7231#section-4.2.1>`_ to be sent on early data.
* [#extension-category: envoy.route.early_data_policy]
*
*
* .envoy.config.core.v3.TypedExtensionConfig early_data_policy = 40;
*/
@java.lang.Override
public io.envoyproxy.envoy.config.core.v3.TypedExtensionConfigOrBuilder getEarlyDataPolicyOrBuilder() {
return getEarlyDataPolicy();
}
public static final int RETRY_POLICY_FIELD_NUMBER = 9;
private io.envoyproxy.envoy.config.route.v3.RetryPolicy retryPolicy_;
/**
*
* Indicates that the route has a retry policy. Note that if this is set,
* it'll take precedence over the virtual host level retry policy entirely
* (e.g.: policies are not merged, most internal one becomes the enforced policy).
*
*
* .envoy.config.route.v3.RetryPolicy retry_policy = 9;
* @return Whether the retryPolicy field is set.
*/
@java.lang.Override
public boolean hasRetryPolicy() {
return retryPolicy_ != null;
}
/**
*
* Indicates that the route has a retry policy. Note that if this is set,
* it'll take precedence over the virtual host level retry policy entirely
* (e.g.: policies are not merged, most internal one becomes the enforced policy).
*
* Indicates that the route has a retry policy. Note that if this is set,
* it'll take precedence over the virtual host level retry policy entirely
* (e.g.: policies are not merged, most internal one becomes the enforced policy).
*
*
* .envoy.config.route.v3.RetryPolicy retry_policy = 9;
*/
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RetryPolicyOrBuilder getRetryPolicyOrBuilder() {
return getRetryPolicy();
}
public static final int RETRY_POLICY_TYPED_CONFIG_FIELD_NUMBER = 33;
private com.google.protobuf.Any retryPolicyTypedConfig_;
/**
*
* [#not-implemented-hide:]
* Specifies the configuration for retry policy extension. Note that if this is set, it'll take
* precedence over the virtual host level retry policy entirely (e.g.: policies are not merged,
* most internal one becomes the enforced policy). :ref:`Retry policy <envoy_v3_api_field_config.route.v3.VirtualHost.retry_policy>`
* should not be set if this field is used.
*
*
* .google.protobuf.Any retry_policy_typed_config = 33;
* @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 if this is set, it'll take
* precedence over the virtual host level retry policy entirely (e.g.: policies are not merged,
* most internal one becomes the enforced policy). :ref:`Retry policy <envoy_v3_api_field_config.route.v3.VirtualHost.retry_policy>`
* should not be set if this field is used.
*
* [#not-implemented-hide:]
* Specifies the configuration for retry policy extension. Note that if this is set, it'll take
* precedence over the virtual host level retry policy entirely (e.g.: policies are not merged,
* most internal one becomes the enforced policy). :ref:`Retry policy <envoy_v3_api_field_config.route.v3.VirtualHost.retry_policy>`
* should not be set if this field is used.
*
*
* .google.protobuf.Any retry_policy_typed_config = 33;
*/
@java.lang.Override
public com.google.protobuf.AnyOrBuilder getRetryPolicyTypedConfigOrBuilder() {
return getRetryPolicyTypedConfig();
}
public static final int REQUEST_MIRROR_POLICIES_FIELD_NUMBER = 30;
private java.util.List requestMirrorPolicies_;
/**
*
* Specify a set of route request mirroring policies.
* It takes precedence over the virtual host and route config mirror policy entirely.
* That is, policies are not merged, the most specific non-empty one becomes the mirror policies.
*
* Specify a set of route request mirroring policies.
* It takes precedence over the virtual host and route config mirror policy entirely.
* That is, policies are not merged, the most specific non-empty one becomes the mirror policies.
*
* Specify a set of route request mirroring policies.
* It takes precedence over the virtual host and route config mirror policy entirely.
* That is, policies are not merged, the most specific non-empty one becomes the mirror policies.
*
*
* repeated .envoy.config.route.v3.RouteAction.RequestMirrorPolicy request_mirror_policies = 30;
*/
@java.lang.Override
public int getRequestMirrorPoliciesCount() {
return requestMirrorPolicies_.size();
}
/**
*
* Specify a set of route request mirroring policies.
* It takes precedence over the virtual host and route config mirror policy entirely.
* That is, policies are not merged, the most specific non-empty one becomes the mirror policies.
*
* Specify a set of route request mirroring policies.
* It takes precedence over the virtual host and route config mirror policy entirely.
* That is, policies are not merged, the most specific non-empty one becomes the mirror policies.
*
*
* repeated .envoy.config.route.v3.RouteAction.RequestMirrorPolicy request_mirror_policies = 30;
*/
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicyOrBuilder getRequestMirrorPoliciesOrBuilder(
int index) {
return requestMirrorPolicies_.get(index);
}
public static final int PRIORITY_FIELD_NUMBER = 11;
private int priority_;
/**
*
* Optionally specifies the :ref:`routing priority <arch_overview_http_routing_priority>`.
*
*
* .envoy.config.core.v3.RoutingPriority priority = 11 [(.validate.rules) = { ... }
* @return The enum numeric value on the wire for priority.
*/
@java.lang.Override public int getPriorityValue() {
return priority_;
}
/**
*
* Optionally specifies the :ref:`routing priority <arch_overview_http_routing_priority>`.
*
*
* .envoy.config.core.v3.RoutingPriority priority = 11 [(.validate.rules) = { ... }
* @return The priority.
*/
@java.lang.Override public io.envoyproxy.envoy.config.core.v3.RoutingPriority getPriority() {
@SuppressWarnings("deprecation")
io.envoyproxy.envoy.config.core.v3.RoutingPriority result = io.envoyproxy.envoy.config.core.v3.RoutingPriority.valueOf(priority_);
return result == null ? io.envoyproxy.envoy.config.core.v3.RoutingPriority.UNRECOGNIZED : result;
}
public static final int RATE_LIMITS_FIELD_NUMBER = 13;
private java.util.List rateLimits_;
/**
*
* Specifies a set of rate limit configurations that could be applied to the
* route.
*
* Specifies a set of rate limit configurations that could be applied to the
* route.
*
*
* repeated .envoy.config.route.v3.RateLimit rate_limits = 13;
*/
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RateLimitOrBuilder getRateLimitsOrBuilder(
int index) {
return rateLimits_.get(index);
}
public static final int INCLUDE_VH_RATE_LIMITS_FIELD_NUMBER = 14;
private com.google.protobuf.BoolValue includeVhRateLimits_;
/**
*
* Specifies if the rate limit filter should include the virtual host rate
* limits. By default, if the route configured rate limits, the virtual host
* :ref:`rate_limits <envoy_v3_api_field_config.route.v3.VirtualHost.rate_limits>` are not applied to the
* request.
* This field is deprecated. Please use :ref:`vh_rate_limits <envoy_v3_api_field_extensions.filters.http.ratelimit.v3.RateLimitPerRoute.vh_rate_limits>`
*
*
* .google.protobuf.BoolValue include_vh_rate_limits = 14 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"];
* @deprecated envoy.config.route.v3.RouteAction.include_vh_rate_limits is deprecated.
* See envoy/config/route/v3/route_components.proto;l=1288
* @return Whether the includeVhRateLimits field is set.
*/
@java.lang.Override
@java.lang.Deprecated public boolean hasIncludeVhRateLimits() {
return includeVhRateLimits_ != null;
}
/**
*
* Specifies if the rate limit filter should include the virtual host rate
* limits. By default, if the route configured rate limits, the virtual host
* :ref:`rate_limits <envoy_v3_api_field_config.route.v3.VirtualHost.rate_limits>` are not applied to the
* request.
* This field is deprecated. Please use :ref:`vh_rate_limits <envoy_v3_api_field_extensions.filters.http.ratelimit.v3.RateLimitPerRoute.vh_rate_limits>`
*
* Specifies if the rate limit filter should include the virtual host rate
* limits. By default, if the route configured rate limits, the virtual host
* :ref:`rate_limits <envoy_v3_api_field_config.route.v3.VirtualHost.rate_limits>` are not applied to the
* request.
* This field is deprecated. Please use :ref:`vh_rate_limits <envoy_v3_api_field_extensions.filters.http.ratelimit.v3.RateLimitPerRoute.vh_rate_limits>`
*
*
* .google.protobuf.BoolValue include_vh_rate_limits = 14 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"];
*/
@java.lang.Override
@java.lang.Deprecated public com.google.protobuf.BoolValueOrBuilder getIncludeVhRateLimitsOrBuilder() {
return getIncludeVhRateLimits();
}
public static final int HASH_POLICY_FIELD_NUMBER = 15;
private java.util.List hashPolicy_;
/**
*
* Specifies a list of hash policies to use for ring hash load balancing. Each
* hash policy is evaluated individually and the combined result is used to
* route the request. The method of combination is deterministic such that
* identical lists of hash policies will produce the same hash. Since a hash
* policy examines specific parts of a request, it can fail to produce a hash
* (i.e. if the hashed header is not present). If (and only if) all configured
* hash policies fail to generate a hash, no hash will be produced for
* the route. In this case, the behavior is the same as if no hash policies
* were specified (i.e. the ring hash load balancer will choose a random
* backend). If a hash policy has the "terminal" attribute set to true, and
* there is already a hash generated, the hash is returned immediately,
* ignoring the rest of the hash policy list.
*
* Specifies a list of hash policies to use for ring hash load balancing. Each
* hash policy is evaluated individually and the combined result is used to
* route the request. The method of combination is deterministic such that
* identical lists of hash policies will produce the same hash. Since a hash
* policy examines specific parts of a request, it can fail to produce a hash
* (i.e. if the hashed header is not present). If (and only if) all configured
* hash policies fail to generate a hash, no hash will be produced for
* the route. In this case, the behavior is the same as if no hash policies
* were specified (i.e. the ring hash load balancer will choose a random
* backend). If a hash policy has the "terminal" attribute set to true, and
* there is already a hash generated, the hash is returned immediately,
* ignoring the rest of the hash policy list.
*
* Specifies a list of hash policies to use for ring hash load balancing. Each
* hash policy is evaluated individually and the combined result is used to
* route the request. The method of combination is deterministic such that
* identical lists of hash policies will produce the same hash. Since a hash
* policy examines specific parts of a request, it can fail to produce a hash
* (i.e. if the hashed header is not present). If (and only if) all configured
* hash policies fail to generate a hash, no hash will be produced for
* the route. In this case, the behavior is the same as if no hash policies
* were specified (i.e. the ring hash load balancer will choose a random
* backend). If a hash policy has the "terminal" attribute set to true, and
* there is already a hash generated, the hash is returned immediately,
* ignoring the rest of the hash policy list.
*
*
* repeated .envoy.config.route.v3.RouteAction.HashPolicy hash_policy = 15;
*/
@java.lang.Override
public int getHashPolicyCount() {
return hashPolicy_.size();
}
/**
*
* Specifies a list of hash policies to use for ring hash load balancing. Each
* hash policy is evaluated individually and the combined result is used to
* route the request. The method of combination is deterministic such that
* identical lists of hash policies will produce the same hash. Since a hash
* policy examines specific parts of a request, it can fail to produce a hash
* (i.e. if the hashed header is not present). If (and only if) all configured
* hash policies fail to generate a hash, no hash will be produced for
* the route. In this case, the behavior is the same as if no hash policies
* were specified (i.e. the ring hash load balancer will choose a random
* backend). If a hash policy has the "terminal" attribute set to true, and
* there is already a hash generated, the hash is returned immediately,
* ignoring the rest of the hash policy list.
*
* Specifies a list of hash policies to use for ring hash load balancing. Each
* hash policy is evaluated individually and the combined result is used to
* route the request. The method of combination is deterministic such that
* identical lists of hash policies will produce the same hash. Since a hash
* policy examines specific parts of a request, it can fail to produce a hash
* (i.e. if the hashed header is not present). If (and only if) all configured
* hash policies fail to generate a hash, no hash will be produced for
* the route. In this case, the behavior is the same as if no hash policies
* were specified (i.e. the ring hash load balancer will choose a random
* backend). If a hash policy has the "terminal" attribute set to true, and
* there is already a hash generated, the hash is returned immediately,
* ignoring the rest of the hash policy list.
*
*
* repeated .envoy.config.route.v3.RouteAction.HashPolicy hash_policy = 15;
*/
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicyOrBuilder getHashPolicyOrBuilder(
int index) {
return hashPolicy_.get(index);
}
public static final int CORS_FIELD_NUMBER = 17;
private io.envoyproxy.envoy.config.route.v3.CorsPolicy cors_;
/**
*
* Indicates that the route has a CORS policy. This field is ignored if related cors policy is
* found in the :ref:`Route.typed_per_filter_config<envoy_v3_api_field_config.route.v3.Route.typed_per_filter_config>` or
* :ref:`WeightedCluster.ClusterWeight.typed_per_filter_config<envoy_v3_api_field_config.route.v3.WeightedCluster.ClusterWeight.typed_per_filter_config>`.
* .. attention::
* This option has been deprecated. Please use
* :ref:`Route.typed_per_filter_config<envoy_v3_api_field_config.route.v3.Route.typed_per_filter_config>` or
* :ref:`WeightedCluster.ClusterWeight.typed_per_filter_config<envoy_v3_api_field_config.route.v3.WeightedCluster.ClusterWeight.typed_per_filter_config>`
* to configure the CORS HTTP filter.
*
*
* .envoy.config.route.v3.CorsPolicy cors = 17 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"];
* @deprecated envoy.config.route.v3.RouteAction.cors is deprecated.
* See envoy/config/route/v3/route_components.proto;l=1315
* @return Whether the cors field is set.
*/
@java.lang.Override
@java.lang.Deprecated public boolean hasCors() {
return cors_ != null;
}
/**
*
* Indicates that the route has a CORS policy. This field is ignored if related cors policy is
* found in the :ref:`Route.typed_per_filter_config<envoy_v3_api_field_config.route.v3.Route.typed_per_filter_config>` or
* :ref:`WeightedCluster.ClusterWeight.typed_per_filter_config<envoy_v3_api_field_config.route.v3.WeightedCluster.ClusterWeight.typed_per_filter_config>`.
* .. attention::
* This option has been deprecated. Please use
* :ref:`Route.typed_per_filter_config<envoy_v3_api_field_config.route.v3.Route.typed_per_filter_config>` or
* :ref:`WeightedCluster.ClusterWeight.typed_per_filter_config<envoy_v3_api_field_config.route.v3.WeightedCluster.ClusterWeight.typed_per_filter_config>`
* to configure the CORS HTTP filter.
*
*
* .envoy.config.route.v3.CorsPolicy cors = 17 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"];
* @deprecated envoy.config.route.v3.RouteAction.cors is deprecated.
* See envoy/config/route/v3/route_components.proto;l=1315
* @return The cors.
*/
@java.lang.Override
@java.lang.Deprecated public io.envoyproxy.envoy.config.route.v3.CorsPolicy getCors() {
return cors_ == null ? io.envoyproxy.envoy.config.route.v3.CorsPolicy.getDefaultInstance() : cors_;
}
/**
*
* Indicates that the route has a CORS policy. This field is ignored if related cors policy is
* found in the :ref:`Route.typed_per_filter_config<envoy_v3_api_field_config.route.v3.Route.typed_per_filter_config>` or
* :ref:`WeightedCluster.ClusterWeight.typed_per_filter_config<envoy_v3_api_field_config.route.v3.WeightedCluster.ClusterWeight.typed_per_filter_config>`.
* .. attention::
* This option has been deprecated. Please use
* :ref:`Route.typed_per_filter_config<envoy_v3_api_field_config.route.v3.Route.typed_per_filter_config>` or
* :ref:`WeightedCluster.ClusterWeight.typed_per_filter_config<envoy_v3_api_field_config.route.v3.WeightedCluster.ClusterWeight.typed_per_filter_config>`
* to configure the CORS HTTP filter.
*
*
* .envoy.config.route.v3.CorsPolicy cors = 17 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"];
*/
@java.lang.Override
@java.lang.Deprecated public io.envoyproxy.envoy.config.route.v3.CorsPolicyOrBuilder getCorsOrBuilder() {
return getCors();
}
public static final int MAX_GRPC_TIMEOUT_FIELD_NUMBER = 23;
private com.google.protobuf.Duration maxGrpcTimeout_;
/**
*
* Deprecated by :ref:`grpc_timeout_header_max <envoy_v3_api_field_config.route.v3.RouteAction.MaxStreamDuration.grpc_timeout_header_max>`
* If present, and the request is a gRPC request, use the
* `grpc-timeout header <https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md>`_,
* or its default value (infinity) instead of
* :ref:`timeout <envoy_v3_api_field_config.route.v3.RouteAction.timeout>`, but limit the applied timeout
* to the maximum value specified here. If configured as 0, the maximum allowed timeout for
* gRPC requests is infinity. If not configured at all, the ``grpc-timeout`` header is not used
* and gRPC requests time out like any other requests using
* :ref:`timeout <envoy_v3_api_field_config.route.v3.RouteAction.timeout>` or its default.
* This can be used to prevent unexpected upstream request timeouts due to potentially long
* time gaps between gRPC request and response in gRPC streaming mode.
* .. note::
* If a timeout is specified using :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`, it takes
* precedence over `grpc-timeout header <https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md>`_, when
* both are present. See also
* :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`,
* :ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms`, and the
* :ref:`retry overview <arch_overview_http_routing_retry>`.
*
*
* .google.protobuf.Duration max_grpc_timeout = 23 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"];
* @deprecated envoy.config.route.v3.RouteAction.max_grpc_timeout is deprecated.
* See envoy/config/route/v3/route_components.proto;l=1337
* @return Whether the maxGrpcTimeout field is set.
*/
@java.lang.Override
@java.lang.Deprecated public boolean hasMaxGrpcTimeout() {
return maxGrpcTimeout_ != null;
}
/**
*
* Deprecated by :ref:`grpc_timeout_header_max <envoy_v3_api_field_config.route.v3.RouteAction.MaxStreamDuration.grpc_timeout_header_max>`
* If present, and the request is a gRPC request, use the
* `grpc-timeout header <https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md>`_,
* or its default value (infinity) instead of
* :ref:`timeout <envoy_v3_api_field_config.route.v3.RouteAction.timeout>`, but limit the applied timeout
* to the maximum value specified here. If configured as 0, the maximum allowed timeout for
* gRPC requests is infinity. If not configured at all, the ``grpc-timeout`` header is not used
* and gRPC requests time out like any other requests using
* :ref:`timeout <envoy_v3_api_field_config.route.v3.RouteAction.timeout>` or its default.
* This can be used to prevent unexpected upstream request timeouts due to potentially long
* time gaps between gRPC request and response in gRPC streaming mode.
* .. note::
* If a timeout is specified using :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`, it takes
* precedence over `grpc-timeout header <https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md>`_, when
* both are present. See also
* :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`,
* :ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms`, and the
* :ref:`retry overview <arch_overview_http_routing_retry>`.
*
* Deprecated by :ref:`grpc_timeout_header_max <envoy_v3_api_field_config.route.v3.RouteAction.MaxStreamDuration.grpc_timeout_header_max>`
* If present, and the request is a gRPC request, use the
* `grpc-timeout header <https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md>`_,
* or its default value (infinity) instead of
* :ref:`timeout <envoy_v3_api_field_config.route.v3.RouteAction.timeout>`, but limit the applied timeout
* to the maximum value specified here. If configured as 0, the maximum allowed timeout for
* gRPC requests is infinity. If not configured at all, the ``grpc-timeout`` header is not used
* and gRPC requests time out like any other requests using
* :ref:`timeout <envoy_v3_api_field_config.route.v3.RouteAction.timeout>` or its default.
* This can be used to prevent unexpected upstream request timeouts due to potentially long
* time gaps between gRPC request and response in gRPC streaming mode.
* .. note::
* If a timeout is specified using :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`, it takes
* precedence over `grpc-timeout header <https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md>`_, when
* both are present. See also
* :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`,
* :ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms`, and the
* :ref:`retry overview <arch_overview_http_routing_retry>`.
*
*
* .google.protobuf.Duration max_grpc_timeout = 23 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"];
*/
@java.lang.Override
@java.lang.Deprecated public com.google.protobuf.DurationOrBuilder getMaxGrpcTimeoutOrBuilder() {
return getMaxGrpcTimeout();
}
public static final int GRPC_TIMEOUT_OFFSET_FIELD_NUMBER = 28;
private com.google.protobuf.Duration grpcTimeoutOffset_;
/**
*
* Deprecated by :ref:`grpc_timeout_header_offset <envoy_v3_api_field_config.route.v3.RouteAction.MaxStreamDuration.grpc_timeout_header_offset>`.
* If present, Envoy will adjust the timeout provided by the ``grpc-timeout`` header by subtracting
* the provided duration from the header. This is useful in allowing Envoy to set its global
* timeout to be less than that of the deadline imposed by the calling client, which makes it more
* likely that Envoy will handle the timeout instead of having the call canceled by the client.
* The offset will only be applied if the provided grpc_timeout is greater than the offset. This
* ensures that the offset will only ever decrease the timeout and never set it to 0 (meaning
* infinity).
*
*
* .google.protobuf.Duration grpc_timeout_offset = 28 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"];
* @deprecated envoy.config.route.v3.RouteAction.grpc_timeout_offset is deprecated.
* See envoy/config/route/v3/route_components.proto;l=1348
* @return Whether the grpcTimeoutOffset field is set.
*/
@java.lang.Override
@java.lang.Deprecated public boolean hasGrpcTimeoutOffset() {
return grpcTimeoutOffset_ != null;
}
/**
*
* Deprecated by :ref:`grpc_timeout_header_offset <envoy_v3_api_field_config.route.v3.RouteAction.MaxStreamDuration.grpc_timeout_header_offset>`.
* If present, Envoy will adjust the timeout provided by the ``grpc-timeout`` header by subtracting
* the provided duration from the header. This is useful in allowing Envoy to set its global
* timeout to be less than that of the deadline imposed by the calling client, which makes it more
* likely that Envoy will handle the timeout instead of having the call canceled by the client.
* The offset will only be applied if the provided grpc_timeout is greater than the offset. This
* ensures that the offset will only ever decrease the timeout and never set it to 0 (meaning
* infinity).
*
* Deprecated by :ref:`grpc_timeout_header_offset <envoy_v3_api_field_config.route.v3.RouteAction.MaxStreamDuration.grpc_timeout_header_offset>`.
* If present, Envoy will adjust the timeout provided by the ``grpc-timeout`` header by subtracting
* the provided duration from the header. This is useful in allowing Envoy to set its global
* timeout to be less than that of the deadline imposed by the calling client, which makes it more
* likely that Envoy will handle the timeout instead of having the call canceled by the client.
* The offset will only be applied if the provided grpc_timeout is greater than the offset. This
* ensures that the offset will only ever decrease the timeout and never set it to 0 (meaning
* infinity).
*
*
* .google.protobuf.Duration grpc_timeout_offset = 28 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"];
*/
@java.lang.Override
@java.lang.Deprecated public com.google.protobuf.DurationOrBuilder getGrpcTimeoutOffsetOrBuilder() {
return getGrpcTimeoutOffset();
}
public static final int UPGRADE_CONFIGS_FIELD_NUMBER = 25;
private java.util.List upgradeConfigs_;
/**
* repeated .envoy.config.route.v3.RouteAction.UpgradeConfig upgrade_configs = 25;
*/
@java.lang.Override
public java.util.List getUpgradeConfigsList() {
return upgradeConfigs_;
}
/**
* repeated .envoy.config.route.v3.RouteAction.UpgradeConfig upgrade_configs = 25;
*/
@java.lang.Override
public java.util.List extends io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfigOrBuilder>
getUpgradeConfigsOrBuilderList() {
return upgradeConfigs_;
}
/**
* repeated .envoy.config.route.v3.RouteAction.UpgradeConfig upgrade_configs = 25;
*/
@java.lang.Override
public int getUpgradeConfigsCount() {
return upgradeConfigs_.size();
}
/**
* repeated .envoy.config.route.v3.RouteAction.UpgradeConfig upgrade_configs = 25;
*/
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig getUpgradeConfigs(int index) {
return upgradeConfigs_.get(index);
}
/**
* repeated .envoy.config.route.v3.RouteAction.UpgradeConfig upgrade_configs = 25;
*/
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfigOrBuilder getUpgradeConfigsOrBuilder(
int index) {
return upgradeConfigs_.get(index);
}
public static final int INTERNAL_REDIRECT_POLICY_FIELD_NUMBER = 34;
private io.envoyproxy.envoy.config.route.v3.InternalRedirectPolicy internalRedirectPolicy_;
/**
*
* If present, Envoy will try to follow an upstream redirect response instead of proxying the
* response back to the downstream. An upstream redirect response is defined
* by :ref:`redirect_response_codes
* <envoy_v3_api_field_config.route.v3.InternalRedirectPolicy.redirect_response_codes>`.
*
*
* .envoy.config.route.v3.InternalRedirectPolicy internal_redirect_policy = 34;
* @return Whether the internalRedirectPolicy field is set.
*/
@java.lang.Override
public boolean hasInternalRedirectPolicy() {
return internalRedirectPolicy_ != null;
}
/**
*
* If present, Envoy will try to follow an upstream redirect response instead of proxying the
* response back to the downstream. An upstream redirect response is defined
* by :ref:`redirect_response_codes
* <envoy_v3_api_field_config.route.v3.InternalRedirectPolicy.redirect_response_codes>`.
*
* If present, Envoy will try to follow an upstream redirect response instead of proxying the
* response back to the downstream. An upstream redirect response is defined
* by :ref:`redirect_response_codes
* <envoy_v3_api_field_config.route.v3.InternalRedirectPolicy.redirect_response_codes>`.
*
*
* .envoy.config.route.v3.InternalRedirectPolicy internal_redirect_policy = 34;
*/
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.InternalRedirectPolicyOrBuilder getInternalRedirectPolicyOrBuilder() {
return getInternalRedirectPolicy();
}
public static final int INTERNAL_REDIRECT_ACTION_FIELD_NUMBER = 26;
private int internalRedirectAction_;
/**
* .envoy.config.route.v3.RouteAction.InternalRedirectAction internal_redirect_action = 26 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"];
* @deprecated envoy.config.route.v3.RouteAction.internal_redirect_action is deprecated.
* See envoy/config/route/v3/route_components.proto;l=1359
* @return The enum numeric value on the wire for internalRedirectAction.
*/
@java.lang.Override @java.lang.Deprecated public int getInternalRedirectActionValue() {
return internalRedirectAction_;
}
/**
* .envoy.config.route.v3.RouteAction.InternalRedirectAction internal_redirect_action = 26 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"];
* @deprecated envoy.config.route.v3.RouteAction.internal_redirect_action is deprecated.
* See envoy/config/route/v3/route_components.proto;l=1359
* @return The internalRedirectAction.
*/
@java.lang.Override @java.lang.Deprecated public io.envoyproxy.envoy.config.route.v3.RouteAction.InternalRedirectAction getInternalRedirectAction() {
@SuppressWarnings("deprecation")
io.envoyproxy.envoy.config.route.v3.RouteAction.InternalRedirectAction result = io.envoyproxy.envoy.config.route.v3.RouteAction.InternalRedirectAction.valueOf(internalRedirectAction_);
return result == null ? io.envoyproxy.envoy.config.route.v3.RouteAction.InternalRedirectAction.UNRECOGNIZED : result;
}
public static final int MAX_INTERNAL_REDIRECTS_FIELD_NUMBER = 31;
private com.google.protobuf.UInt32Value maxInternalRedirects_;
/**
*
* An internal redirect is handled, iff the number of previous internal redirects that a
* downstream request has encountered is lower than this value, and
* :ref:`internal_redirect_action <envoy_v3_api_field_config.route.v3.RouteAction.internal_redirect_action>`
* is set to :ref:`HANDLE_INTERNAL_REDIRECT
* <envoy_v3_api_enum_value_config.route.v3.RouteAction.InternalRedirectAction.HANDLE_INTERNAL_REDIRECT>`
* In the case where a downstream request is bounced among multiple routes by internal redirect,
* the first route that hits this threshold, or has
* :ref:`internal_redirect_action <envoy_v3_api_field_config.route.v3.RouteAction.internal_redirect_action>`
* set to
* :ref:`PASS_THROUGH_INTERNAL_REDIRECT
* <envoy_v3_api_enum_value_config.route.v3.RouteAction.InternalRedirectAction.PASS_THROUGH_INTERNAL_REDIRECT>`
* will pass the redirect back to downstream.
* If not specified, at most one redirect will be followed.
*
*
* .google.protobuf.UInt32Value max_internal_redirects = 31 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"];
* @deprecated envoy.config.route.v3.RouteAction.max_internal_redirects is deprecated.
* See envoy/config/route/v3/route_components.proto;l=1376
* @return Whether the maxInternalRedirects field is set.
*/
@java.lang.Override
@java.lang.Deprecated public boolean hasMaxInternalRedirects() {
return maxInternalRedirects_ != null;
}
/**
*
* An internal redirect is handled, iff the number of previous internal redirects that a
* downstream request has encountered is lower than this value, and
* :ref:`internal_redirect_action <envoy_v3_api_field_config.route.v3.RouteAction.internal_redirect_action>`
* is set to :ref:`HANDLE_INTERNAL_REDIRECT
* <envoy_v3_api_enum_value_config.route.v3.RouteAction.InternalRedirectAction.HANDLE_INTERNAL_REDIRECT>`
* In the case where a downstream request is bounced among multiple routes by internal redirect,
* the first route that hits this threshold, or has
* :ref:`internal_redirect_action <envoy_v3_api_field_config.route.v3.RouteAction.internal_redirect_action>`
* set to
* :ref:`PASS_THROUGH_INTERNAL_REDIRECT
* <envoy_v3_api_enum_value_config.route.v3.RouteAction.InternalRedirectAction.PASS_THROUGH_INTERNAL_REDIRECT>`
* will pass the redirect back to downstream.
* If not specified, at most one redirect will be followed.
*
* An internal redirect is handled, iff the number of previous internal redirects that a
* downstream request has encountered is lower than this value, and
* :ref:`internal_redirect_action <envoy_v3_api_field_config.route.v3.RouteAction.internal_redirect_action>`
* is set to :ref:`HANDLE_INTERNAL_REDIRECT
* <envoy_v3_api_enum_value_config.route.v3.RouteAction.InternalRedirectAction.HANDLE_INTERNAL_REDIRECT>`
* In the case where a downstream request is bounced among multiple routes by internal redirect,
* the first route that hits this threshold, or has
* :ref:`internal_redirect_action <envoy_v3_api_field_config.route.v3.RouteAction.internal_redirect_action>`
* set to
* :ref:`PASS_THROUGH_INTERNAL_REDIRECT
* <envoy_v3_api_enum_value_config.route.v3.RouteAction.InternalRedirectAction.PASS_THROUGH_INTERNAL_REDIRECT>`
* will pass the redirect back to downstream.
* If not specified, at most one redirect will be followed.
*
*
* .google.protobuf.UInt32Value max_internal_redirects = 31 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"];
*/
@java.lang.Override
@java.lang.Deprecated public com.google.protobuf.UInt32ValueOrBuilder getMaxInternalRedirectsOrBuilder() {
return getMaxInternalRedirects();
}
public static final int HEDGE_POLICY_FIELD_NUMBER = 27;
private io.envoyproxy.envoy.config.route.v3.HedgePolicy hedgePolicy_;
/**
*
* Indicates that the route has a hedge policy. Note that if this is set,
* it'll take precedence over the virtual host level hedge policy entirely
* (e.g.: policies are not merged, most internal one becomes the enforced policy).
*
*
* .envoy.config.route.v3.HedgePolicy hedge_policy = 27;
* @return Whether the hedgePolicy field is set.
*/
@java.lang.Override
public boolean hasHedgePolicy() {
return hedgePolicy_ != null;
}
/**
*
* Indicates that the route has a hedge policy. Note that if this is set,
* it'll take precedence over the virtual host level hedge policy entirely
* (e.g.: policies are not merged, most internal one becomes the enforced policy).
*
* Indicates that the route has a hedge policy. Note that if this is set,
* it'll take precedence over the virtual host level hedge policy entirely
* (e.g.: policies are not merged, most internal one becomes the enforced policy).
*
*
* .envoy.config.route.v3.HedgePolicy hedge_policy = 27;
*/
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.HedgePolicyOrBuilder getHedgePolicyOrBuilder() {
return getHedgePolicy();
}
public static final int MAX_STREAM_DURATION_FIELD_NUMBER = 36;
private io.envoyproxy.envoy.config.route.v3.RouteAction.MaxStreamDuration maxStreamDuration_;
/**
*
* Specifies the maximum stream duration for this route.
*
*
* .envoy.config.route.v3.RouteAction.MaxStreamDuration max_stream_duration = 36;
* @return Whether the maxStreamDuration field is set.
*/
@java.lang.Override
public boolean hasMaxStreamDuration() {
return maxStreamDuration_ != null;
}
/**
*
* Specifies the maximum stream duration for this route.
*
* Indicates the upstream cluster to which the request should be routed
* to.
*
*
* string cluster = 1 [(.validate.rules) = { ... }
* @return The bytes for cluster.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getClusterBytes() {
java.lang.Object ref = "";
if (clusterSpecifierCase_ == 1) {
ref = clusterSpecifier_;
}
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (clusterSpecifierCase_ == 1) {
clusterSpecifier_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Indicates the upstream cluster to which the request should be routed
* to.
*
*
* string cluster = 1 [(.validate.rules) = { ... }
* @param value The cluster to set.
* @return This builder for chaining.
*/
public Builder setCluster(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
clusterSpecifierCase_ = 1;
clusterSpecifier_ = value;
onChanged();
return this;
}
/**
*
* Indicates the upstream cluster to which the request should be routed
* to.
*
*
* string cluster = 1 [(.validate.rules) = { ... }
* @return This builder for chaining.
*/
public Builder clearCluster() {
if (clusterSpecifierCase_ == 1) {
clusterSpecifierCase_ = 0;
clusterSpecifier_ = null;
onChanged();
}
return this;
}
/**
*
* Indicates the upstream cluster to which the request should be routed
* to.
*
*
* string cluster = 1 [(.validate.rules) = { ... }
* @param value The bytes for cluster to set.
* @return This builder for chaining.
*/
public Builder setClusterBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
clusterSpecifierCase_ = 1;
clusterSpecifier_ = value;
onChanged();
return this;
}
/**
*
* Envoy will determine the cluster to route to by reading the value of the
* HTTP header named by cluster_header from the request headers. If the
* header is not found or the referenced cluster does not exist, Envoy will
* return a 404 response.
* .. attention::
* Internally, Envoy always uses the HTTP/2 ``:authority`` header to represent the HTTP/1
* ``Host`` header. Thus, if attempting to match on ``Host``, match on ``:authority`` instead.
* .. note::
* If the header appears multiple times only the first value is used.
*
*
* string cluster_header = 2 [(.validate.rules) = { ... }
* @return Whether the clusterHeader field is set.
*/
@java.lang.Override
public boolean hasClusterHeader() {
return clusterSpecifierCase_ == 2;
}
/**
*
* Envoy will determine the cluster to route to by reading the value of the
* HTTP header named by cluster_header from the request headers. If the
* header is not found or the referenced cluster does not exist, Envoy will
* return a 404 response.
* .. attention::
* Internally, Envoy always uses the HTTP/2 ``:authority`` header to represent the HTTP/1
* ``Host`` header. Thus, if attempting to match on ``Host``, match on ``:authority`` instead.
* .. note::
* If the header appears multiple times only the first value is used.
*
* Envoy will determine the cluster to route to by reading the value of the
* HTTP header named by cluster_header from the request headers. If the
* header is not found or the referenced cluster does not exist, Envoy will
* return a 404 response.
* .. attention::
* Internally, Envoy always uses the HTTP/2 ``:authority`` header to represent the HTTP/1
* ``Host`` header. Thus, if attempting to match on ``Host``, match on ``:authority`` instead.
* .. note::
* If the header appears multiple times only the first value is used.
*
*
* string cluster_header = 2 [(.validate.rules) = { ... }
* @return The bytes for clusterHeader.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getClusterHeaderBytes() {
java.lang.Object ref = "";
if (clusterSpecifierCase_ == 2) {
ref = clusterSpecifier_;
}
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (clusterSpecifierCase_ == 2) {
clusterSpecifier_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Envoy will determine the cluster to route to by reading the value of the
* HTTP header named by cluster_header from the request headers. If the
* header is not found or the referenced cluster does not exist, Envoy will
* return a 404 response.
* .. attention::
* Internally, Envoy always uses the HTTP/2 ``:authority`` header to represent the HTTP/1
* ``Host`` header. Thus, if attempting to match on ``Host``, match on ``:authority`` instead.
* .. note::
* If the header appears multiple times only the first value is used.
*
*
* string cluster_header = 2 [(.validate.rules) = { ... }
* @param value The clusterHeader to set.
* @return This builder for chaining.
*/
public Builder setClusterHeader(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
clusterSpecifierCase_ = 2;
clusterSpecifier_ = value;
onChanged();
return this;
}
/**
*
* Envoy will determine the cluster to route to by reading the value of the
* HTTP header named by cluster_header from the request headers. If the
* header is not found or the referenced cluster does not exist, Envoy will
* return a 404 response.
* .. attention::
* Internally, Envoy always uses the HTTP/2 ``:authority`` header to represent the HTTP/1
* ``Host`` header. Thus, if attempting to match on ``Host``, match on ``:authority`` instead.
* .. note::
* If the header appears multiple times only the first value is used.
*
*
* string cluster_header = 2 [(.validate.rules) = { ... }
* @return This builder for chaining.
*/
public Builder clearClusterHeader() {
if (clusterSpecifierCase_ == 2) {
clusterSpecifierCase_ = 0;
clusterSpecifier_ = null;
onChanged();
}
return this;
}
/**
*
* Envoy will determine the cluster to route to by reading the value of the
* HTTP header named by cluster_header from the request headers. If the
* header is not found or the referenced cluster does not exist, Envoy will
* return a 404 response.
* .. attention::
* Internally, Envoy always uses the HTTP/2 ``:authority`` header to represent the HTTP/1
* ``Host`` header. Thus, if attempting to match on ``Host``, match on ``:authority`` instead.
* .. note::
* If the header appears multiple times only the first value is used.
*
*
* string cluster_header = 2 [(.validate.rules) = { ... }
* @param value The bytes for clusterHeader to set.
* @return This builder for chaining.
*/
public Builder setClusterHeaderBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
clusterSpecifierCase_ = 2;
clusterSpecifier_ = value;
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.route.v3.WeightedCluster, io.envoyproxy.envoy.config.route.v3.WeightedCluster.Builder, io.envoyproxy.envoy.config.route.v3.WeightedClusterOrBuilder> weightedClustersBuilder_;
/**
*
* Multiple upstream clusters can be specified for a given route. The
* request is routed to one of the upstream clusters based on weights
* assigned to each cluster. See
* :ref:`traffic splitting <config_http_conn_man_route_table_traffic_splitting_split>`
* for additional documentation.
*
*
* .envoy.config.route.v3.WeightedCluster weighted_clusters = 3;
* @return Whether the weightedClusters field is set.
*/
@java.lang.Override
public boolean hasWeightedClusters() {
return clusterSpecifierCase_ == 3;
}
/**
*
* Multiple upstream clusters can be specified for a given route. The
* request is routed to one of the upstream clusters based on weights
* assigned to each cluster. See
* :ref:`traffic splitting <config_http_conn_man_route_table_traffic_splitting_split>`
* for additional documentation.
*
*
* .envoy.config.route.v3.WeightedCluster weighted_clusters = 3;
* @return The weightedClusters.
*/
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.WeightedCluster getWeightedClusters() {
if (weightedClustersBuilder_ == null) {
if (clusterSpecifierCase_ == 3) {
return (io.envoyproxy.envoy.config.route.v3.WeightedCluster) clusterSpecifier_;
}
return io.envoyproxy.envoy.config.route.v3.WeightedCluster.getDefaultInstance();
} else {
if (clusterSpecifierCase_ == 3) {
return weightedClustersBuilder_.getMessage();
}
return io.envoyproxy.envoy.config.route.v3.WeightedCluster.getDefaultInstance();
}
}
/**
*
* Multiple upstream clusters can be specified for a given route. The
* request is routed to one of the upstream clusters based on weights
* assigned to each cluster. See
* :ref:`traffic splitting <config_http_conn_man_route_table_traffic_splitting_split>`
* for additional documentation.
*
* Multiple upstream clusters can be specified for a given route. The
* request is routed to one of the upstream clusters based on weights
* assigned to each cluster. See
* :ref:`traffic splitting <config_http_conn_man_route_table_traffic_splitting_split>`
* for additional documentation.
*
* Multiple upstream clusters can be specified for a given route. The
* request is routed to one of the upstream clusters based on weights
* assigned to each cluster. See
* :ref:`traffic splitting <config_http_conn_man_route_table_traffic_splitting_split>`
* for additional documentation.
*
* Multiple upstream clusters can be specified for a given route. The
* request is routed to one of the upstream clusters based on weights
* assigned to each cluster. See
* :ref:`traffic splitting <config_http_conn_man_route_table_traffic_splitting_split>`
* for additional documentation.
*
* Multiple upstream clusters can be specified for a given route. The
* request is routed to one of the upstream clusters based on weights
* assigned to each cluster. See
* :ref:`traffic splitting <config_http_conn_man_route_table_traffic_splitting_split>`
* for additional documentation.
*
* Multiple upstream clusters can be specified for a given route. The
* request is routed to one of the upstream clusters based on weights
* assigned to each cluster. See
* :ref:`traffic splitting <config_http_conn_man_route_table_traffic_splitting_split>`
* for additional documentation.
*
* Multiple upstream clusters can be specified for a given route. The
* request is routed to one of the upstream clusters based on weights
* assigned to each cluster. See
* :ref:`traffic splitting <config_http_conn_man_route_table_traffic_splitting_split>`
* for additional documentation.
*
* Name of the cluster specifier plugin to use to determine the cluster for requests on this route.
* The cluster specifier plugin name must be defined in the associated
* :ref:`cluster specifier plugins <envoy_v3_api_field_config.route.v3.RouteConfiguration.cluster_specifier_plugins>`
* in the :ref:`name <envoy_v3_api_field_config.core.v3.TypedExtensionConfig.name>` field.
*
*
* string cluster_specifier_plugin = 37;
* @return Whether the clusterSpecifierPlugin field is set.
*/
@java.lang.Override
public boolean hasClusterSpecifierPlugin() {
return clusterSpecifierCase_ == 37;
}
/**
*
* Name of the cluster specifier plugin to use to determine the cluster for requests on this route.
* The cluster specifier plugin name must be defined in the associated
* :ref:`cluster specifier plugins <envoy_v3_api_field_config.route.v3.RouteConfiguration.cluster_specifier_plugins>`
* in the :ref:`name <envoy_v3_api_field_config.core.v3.TypedExtensionConfig.name>` field.
*
* Name of the cluster specifier plugin to use to determine the cluster for requests on this route.
* The cluster specifier plugin name must be defined in the associated
* :ref:`cluster specifier plugins <envoy_v3_api_field_config.route.v3.RouteConfiguration.cluster_specifier_plugins>`
* in the :ref:`name <envoy_v3_api_field_config.core.v3.TypedExtensionConfig.name>` field.
*
*
* string cluster_specifier_plugin = 37;
* @return The bytes for clusterSpecifierPlugin.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getClusterSpecifierPluginBytes() {
java.lang.Object ref = "";
if (clusterSpecifierCase_ == 37) {
ref = clusterSpecifier_;
}
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (clusterSpecifierCase_ == 37) {
clusterSpecifier_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Name of the cluster specifier plugin to use to determine the cluster for requests on this route.
* The cluster specifier plugin name must be defined in the associated
* :ref:`cluster specifier plugins <envoy_v3_api_field_config.route.v3.RouteConfiguration.cluster_specifier_plugins>`
* in the :ref:`name <envoy_v3_api_field_config.core.v3.TypedExtensionConfig.name>` field.
*
*
* string cluster_specifier_plugin = 37;
* @param value The clusterSpecifierPlugin to set.
* @return This builder for chaining.
*/
public Builder setClusterSpecifierPlugin(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
clusterSpecifierCase_ = 37;
clusterSpecifier_ = value;
onChanged();
return this;
}
/**
*
* Name of the cluster specifier plugin to use to determine the cluster for requests on this route.
* The cluster specifier plugin name must be defined in the associated
* :ref:`cluster specifier plugins <envoy_v3_api_field_config.route.v3.RouteConfiguration.cluster_specifier_plugins>`
* in the :ref:`name <envoy_v3_api_field_config.core.v3.TypedExtensionConfig.name>` field.
*
*
* string cluster_specifier_plugin = 37;
* @return This builder for chaining.
*/
public Builder clearClusterSpecifierPlugin() {
if (clusterSpecifierCase_ == 37) {
clusterSpecifierCase_ = 0;
clusterSpecifier_ = null;
onChanged();
}
return this;
}
/**
*
* Name of the cluster specifier plugin to use to determine the cluster for requests on this route.
* The cluster specifier plugin name must be defined in the associated
* :ref:`cluster specifier plugins <envoy_v3_api_field_config.route.v3.RouteConfiguration.cluster_specifier_plugins>`
* in the :ref:`name <envoy_v3_api_field_config.core.v3.TypedExtensionConfig.name>` field.
*
*
* string cluster_specifier_plugin = 37;
* @param value The bytes for clusterSpecifierPlugin to set.
* @return This builder for chaining.
*/
public Builder setClusterSpecifierPluginBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
clusterSpecifierCase_ = 37;
clusterSpecifier_ = value;
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.route.v3.ClusterSpecifierPlugin, io.envoyproxy.envoy.config.route.v3.ClusterSpecifierPlugin.Builder, io.envoyproxy.envoy.config.route.v3.ClusterSpecifierPluginOrBuilder> inlineClusterSpecifierPluginBuilder_;
/**
*
* Custom cluster specifier plugin configuration to use to determine the cluster for requests
* on this route.
*
*
* .envoy.config.route.v3.ClusterSpecifierPlugin inline_cluster_specifier_plugin = 39;
* @return Whether the inlineClusterSpecifierPlugin field is set.
*/
@java.lang.Override
public boolean hasInlineClusterSpecifierPlugin() {
return clusterSpecifierCase_ == 39;
}
/**
*
* Custom cluster specifier plugin configuration to use to determine the cluster for requests
* on this route.
*
*
* .envoy.config.route.v3.ClusterSpecifierPlugin inline_cluster_specifier_plugin = 39;
* @return The inlineClusterSpecifierPlugin.
*/
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.ClusterSpecifierPlugin getInlineClusterSpecifierPlugin() {
if (inlineClusterSpecifierPluginBuilder_ == null) {
if (clusterSpecifierCase_ == 39) {
return (io.envoyproxy.envoy.config.route.v3.ClusterSpecifierPlugin) clusterSpecifier_;
}
return io.envoyproxy.envoy.config.route.v3.ClusterSpecifierPlugin.getDefaultInstance();
} else {
if (clusterSpecifierCase_ == 39) {
return inlineClusterSpecifierPluginBuilder_.getMessage();
}
return io.envoyproxy.envoy.config.route.v3.ClusterSpecifierPlugin.getDefaultInstance();
}
}
/**
*
* Custom cluster specifier plugin configuration to use to determine the cluster for requests
* on this route.
*
* The HTTP status code to use when configured cluster is not found.
* The default response code is 503 Service Unavailable.
*
*
* .envoy.config.route.v3.RouteAction.ClusterNotFoundResponseCode cluster_not_found_response_code = 20 [(.validate.rules) = { ... }
* @return The enum numeric value on the wire for clusterNotFoundResponseCode.
*/
@java.lang.Override public int getClusterNotFoundResponseCodeValue() {
return clusterNotFoundResponseCode_;
}
/**
*
* The HTTP status code to use when configured cluster is not found.
* The default response code is 503 Service Unavailable.
*
*
* .envoy.config.route.v3.RouteAction.ClusterNotFoundResponseCode cluster_not_found_response_code = 20 [(.validate.rules) = { ... }
* @param value The enum numeric value on the wire for clusterNotFoundResponseCode to set.
* @return This builder for chaining.
*/
public Builder setClusterNotFoundResponseCodeValue(int value) {
clusterNotFoundResponseCode_ = value;
onChanged();
return this;
}
/**
*
* The HTTP status code to use when configured cluster is not found.
* The default response code is 503 Service Unavailable.
*
*
* .envoy.config.route.v3.RouteAction.ClusterNotFoundResponseCode cluster_not_found_response_code = 20 [(.validate.rules) = { ... }
* @return The clusterNotFoundResponseCode.
*/
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.ClusterNotFoundResponseCode getClusterNotFoundResponseCode() {
@SuppressWarnings("deprecation")
io.envoyproxy.envoy.config.route.v3.RouteAction.ClusterNotFoundResponseCode result = io.envoyproxy.envoy.config.route.v3.RouteAction.ClusterNotFoundResponseCode.valueOf(clusterNotFoundResponseCode_);
return result == null ? io.envoyproxy.envoy.config.route.v3.RouteAction.ClusterNotFoundResponseCode.UNRECOGNIZED : result;
}
/**
*
* The HTTP status code to use when configured cluster is not found.
* The default response code is 503 Service Unavailable.
*
*
* .envoy.config.route.v3.RouteAction.ClusterNotFoundResponseCode cluster_not_found_response_code = 20 [(.validate.rules) = { ... }
* @param value The clusterNotFoundResponseCode to set.
* @return This builder for chaining.
*/
public Builder setClusterNotFoundResponseCode(io.envoyproxy.envoy.config.route.v3.RouteAction.ClusterNotFoundResponseCode value) {
if (value == null) {
throw new NullPointerException();
}
clusterNotFoundResponseCode_ = value.getNumber();
onChanged();
return this;
}
/**
*
* The HTTP status code to use when configured cluster is not found.
* The default response code is 503 Service Unavailable.
*
* Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints
* in the upstream cluster with metadata matching what's set in this field will be considered
* for load balancing. If using :ref:`weighted_clusters
* <envoy_v3_api_field_config.route.v3.RouteAction.weighted_clusters>`, metadata will be merged, with values
* provided there taking precedence. The filter name should be specified as ``envoy.lb``.
*
*
* .envoy.config.core.v3.Metadata metadata_match = 4;
* @return Whether the metadataMatch field is set.
*/
public boolean hasMetadataMatch() {
return metadataMatchBuilder_ != null || metadataMatch_ != null;
}
/**
*
* Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints
* in the upstream cluster with metadata matching what's set in this field will be considered
* for load balancing. If using :ref:`weighted_clusters
* <envoy_v3_api_field_config.route.v3.RouteAction.weighted_clusters>`, metadata will be merged, with values
* provided there taking precedence. The filter name should be specified as ``envoy.lb``.
*
* Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints
* in the upstream cluster with metadata matching what's set in this field will be considered
* for load balancing. If using :ref:`weighted_clusters
* <envoy_v3_api_field_config.route.v3.RouteAction.weighted_clusters>`, metadata will be merged, with values
* provided there taking precedence. The filter name should be specified as ``envoy.lb``.
*
*
* .envoy.config.core.v3.Metadata metadata_match = 4;
*/
public Builder setMetadataMatch(io.envoyproxy.envoy.config.core.v3.Metadata value) {
if (metadataMatchBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
metadataMatch_ = value;
onChanged();
} else {
metadataMatchBuilder_.setMessage(value);
}
return this;
}
/**
*
* Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints
* in the upstream cluster with metadata matching what's set in this field will be considered
* for load balancing. If using :ref:`weighted_clusters
* <envoy_v3_api_field_config.route.v3.RouteAction.weighted_clusters>`, metadata will be merged, with values
* provided there taking precedence. The filter name should be specified as ``envoy.lb``.
*
* Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints
* in the upstream cluster with metadata matching what's set in this field will be considered
* for load balancing. If using :ref:`weighted_clusters
* <envoy_v3_api_field_config.route.v3.RouteAction.weighted_clusters>`, metadata will be merged, with values
* provided there taking precedence. The filter name should be specified as ``envoy.lb``.
*
* Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints
* in the upstream cluster with metadata matching what's set in this field will be considered
* for load balancing. If using :ref:`weighted_clusters
* <envoy_v3_api_field_config.route.v3.RouteAction.weighted_clusters>`, metadata will be merged, with values
* provided there taking precedence. The filter name should be specified as ``envoy.lb``.
*
* Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints
* in the upstream cluster with metadata matching what's set in this field will be considered
* for load balancing. If using :ref:`weighted_clusters
* <envoy_v3_api_field_config.route.v3.RouteAction.weighted_clusters>`, metadata will be merged, with values
* provided there taking precedence. The filter name should be specified as ``envoy.lb``.
*
* Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints
* in the upstream cluster with metadata matching what's set in this field will be considered
* for load balancing. If using :ref:`weighted_clusters
* <envoy_v3_api_field_config.route.v3.RouteAction.weighted_clusters>`, metadata will be merged, with values
* provided there taking precedence. The filter name should be specified as ``envoy.lb``.
*
* Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints
* in the upstream cluster with metadata matching what's set in this field will be considered
* for load balancing. If using :ref:`weighted_clusters
* <envoy_v3_api_field_config.route.v3.RouteAction.weighted_clusters>`, metadata will be merged, with values
* provided there taking precedence. The filter name should be specified as ``envoy.lb``.
*
* Indicates that during forwarding, the matched prefix (or path) should be
* swapped with this value. This option allows application URLs to be rooted
* at a different path from those exposed at the reverse proxy layer. The router filter will
* place the original path before rewrite into the :ref:`x-envoy-original-path
* <config_http_filters_router_x-envoy-original-path>` header.
* Only one of :ref:`regex_rewrite <envoy_v3_api_field_config.route.v3.RouteAction.regex_rewrite>`
* :ref:`path_rewrite_policy <envoy_v3_api_field_config.route.v3.RouteAction.path_rewrite_policy>`,
* or :ref:`prefix_rewrite <envoy_v3_api_field_config.route.v3.RouteAction.prefix_rewrite>` may be specified.
* .. attention::
* Pay careful attention to the use of trailing slashes in the
* :ref:`route's match <envoy_v3_api_field_config.route.v3.Route.match>` prefix value.
* Stripping a prefix from a path requires multiple Routes to handle all cases. For example,
* rewriting ``/prefix`` to ``/`` and ``/prefix/etc`` to ``/etc`` cannot be done in a single
* :ref:`Route <envoy_v3_api_msg_config.route.v3.Route>`, as shown by the below config entries:
* .. code-block:: yaml
* - match:
* prefix: "/prefix/"
* route:
* prefix_rewrite: "/"
* - match:
* prefix: "/prefix"
* route:
* prefix_rewrite: "/"
* Having above entries in the config, requests to ``/prefix`` will be stripped to ``/``, while
* requests to ``/prefix/etc`` will be stripped to ``/etc``.
*
* Indicates that during forwarding, the matched prefix (or path) should be
* swapped with this value. This option allows application URLs to be rooted
* at a different path from those exposed at the reverse proxy layer. The router filter will
* place the original path before rewrite into the :ref:`x-envoy-original-path
* <config_http_filters_router_x-envoy-original-path>` header.
* Only one of :ref:`regex_rewrite <envoy_v3_api_field_config.route.v3.RouteAction.regex_rewrite>`
* :ref:`path_rewrite_policy <envoy_v3_api_field_config.route.v3.RouteAction.path_rewrite_policy>`,
* or :ref:`prefix_rewrite <envoy_v3_api_field_config.route.v3.RouteAction.prefix_rewrite>` may be specified.
* .. attention::
* Pay careful attention to the use of trailing slashes in the
* :ref:`route's match <envoy_v3_api_field_config.route.v3.Route.match>` prefix value.
* Stripping a prefix from a path requires multiple Routes to handle all cases. For example,
* rewriting ``/prefix`` to ``/`` and ``/prefix/etc`` to ``/etc`` cannot be done in a single
* :ref:`Route <envoy_v3_api_msg_config.route.v3.Route>`, as shown by the below config entries:
* .. code-block:: yaml
* - match:
* prefix: "/prefix/"
* route:
* prefix_rewrite: "/"
* - match:
* prefix: "/prefix"
* route:
* prefix_rewrite: "/"
* Having above entries in the config, requests to ``/prefix`` will be stripped to ``/``, while
* requests to ``/prefix/etc`` will be stripped to ``/etc``.
*
* Indicates that during forwarding, the matched prefix (or path) should be
* swapped with this value. This option allows application URLs to be rooted
* at a different path from those exposed at the reverse proxy layer. The router filter will
* place the original path before rewrite into the :ref:`x-envoy-original-path
* <config_http_filters_router_x-envoy-original-path>` header.
* Only one of :ref:`regex_rewrite <envoy_v3_api_field_config.route.v3.RouteAction.regex_rewrite>`
* :ref:`path_rewrite_policy <envoy_v3_api_field_config.route.v3.RouteAction.path_rewrite_policy>`,
* or :ref:`prefix_rewrite <envoy_v3_api_field_config.route.v3.RouteAction.prefix_rewrite>` may be specified.
* .. attention::
* Pay careful attention to the use of trailing slashes in the
* :ref:`route's match <envoy_v3_api_field_config.route.v3.Route.match>` prefix value.
* Stripping a prefix from a path requires multiple Routes to handle all cases. For example,
* rewriting ``/prefix`` to ``/`` and ``/prefix/etc`` to ``/etc`` cannot be done in a single
* :ref:`Route <envoy_v3_api_msg_config.route.v3.Route>`, as shown by the below config entries:
* .. code-block:: yaml
* - match:
* prefix: "/prefix/"
* route:
* prefix_rewrite: "/"
* - match:
* prefix: "/prefix"
* route:
* prefix_rewrite: "/"
* Having above entries in the config, requests to ``/prefix`` will be stripped to ``/``, while
* requests to ``/prefix/etc`` will be stripped to ``/etc``.
*
*
* string prefix_rewrite = 5 [(.validate.rules) = { ... }
* @param value The prefixRewrite to set.
* @return This builder for chaining.
*/
public Builder setPrefixRewrite(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
prefixRewrite_ = value;
onChanged();
return this;
}
/**
*
* Indicates that during forwarding, the matched prefix (or path) should be
* swapped with this value. This option allows application URLs to be rooted
* at a different path from those exposed at the reverse proxy layer. The router filter will
* place the original path before rewrite into the :ref:`x-envoy-original-path
* <config_http_filters_router_x-envoy-original-path>` header.
* Only one of :ref:`regex_rewrite <envoy_v3_api_field_config.route.v3.RouteAction.regex_rewrite>`
* :ref:`path_rewrite_policy <envoy_v3_api_field_config.route.v3.RouteAction.path_rewrite_policy>`,
* or :ref:`prefix_rewrite <envoy_v3_api_field_config.route.v3.RouteAction.prefix_rewrite>` may be specified.
* .. attention::
* Pay careful attention to the use of trailing slashes in the
* :ref:`route's match <envoy_v3_api_field_config.route.v3.Route.match>` prefix value.
* Stripping a prefix from a path requires multiple Routes to handle all cases. For example,
* rewriting ``/prefix`` to ``/`` and ``/prefix/etc`` to ``/etc`` cannot be done in a single
* :ref:`Route <envoy_v3_api_msg_config.route.v3.Route>`, as shown by the below config entries:
* .. code-block:: yaml
* - match:
* prefix: "/prefix/"
* route:
* prefix_rewrite: "/"
* - match:
* prefix: "/prefix"
* route:
* prefix_rewrite: "/"
* Having above entries in the config, requests to ``/prefix`` will be stripped to ``/``, while
* requests to ``/prefix/etc`` will be stripped to ``/etc``.
*
* Indicates that during forwarding, the matched prefix (or path) should be
* swapped with this value. This option allows application URLs to be rooted
* at a different path from those exposed at the reverse proxy layer. The router filter will
* place the original path before rewrite into the :ref:`x-envoy-original-path
* <config_http_filters_router_x-envoy-original-path>` header.
* Only one of :ref:`regex_rewrite <envoy_v3_api_field_config.route.v3.RouteAction.regex_rewrite>`
* :ref:`path_rewrite_policy <envoy_v3_api_field_config.route.v3.RouteAction.path_rewrite_policy>`,
* or :ref:`prefix_rewrite <envoy_v3_api_field_config.route.v3.RouteAction.prefix_rewrite>` may be specified.
* .. attention::
* Pay careful attention to the use of trailing slashes in the
* :ref:`route's match <envoy_v3_api_field_config.route.v3.Route.match>` prefix value.
* Stripping a prefix from a path requires multiple Routes to handle all cases. For example,
* rewriting ``/prefix`` to ``/`` and ``/prefix/etc`` to ``/etc`` cannot be done in a single
* :ref:`Route <envoy_v3_api_msg_config.route.v3.Route>`, as shown by the below config entries:
* .. code-block:: yaml
* - match:
* prefix: "/prefix/"
* route:
* prefix_rewrite: "/"
* - match:
* prefix: "/prefix"
* route:
* prefix_rewrite: "/"
* Having above entries in the config, requests to ``/prefix`` will be stripped to ``/``, while
* requests to ``/prefix/etc`` will be stripped to ``/etc``.
*
*
* string prefix_rewrite = 5 [(.validate.rules) = { ... }
* @param value The bytes for prefixRewrite to set.
* @return This builder for chaining.
*/
public Builder setPrefixRewriteBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
prefixRewrite_ = value;
onChanged();
return this;
}
private io.envoyproxy.envoy.type.matcher.v3.RegexMatchAndSubstitute regexRewrite_;
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.type.matcher.v3.RegexMatchAndSubstitute, io.envoyproxy.envoy.type.matcher.v3.RegexMatchAndSubstitute.Builder, io.envoyproxy.envoy.type.matcher.v3.RegexMatchAndSubstituteOrBuilder> regexRewriteBuilder_;
/**
*
* Indicates that during forwarding, portions of the path that match the
* pattern should be rewritten, even allowing the substitution of capture
* groups from the pattern into the new path as specified by the rewrite
* substitution string. This is useful to allow application paths to be
* rewritten in a way that is aware of segments with variable content like
* identifiers. The router filter will place the original path as it was
* before the rewrite into the :ref:`x-envoy-original-path
* <config_http_filters_router_x-envoy-original-path>` header.
* Only one of :ref:`regex_rewrite <envoy_v3_api_field_config.route.v3.RouteAction.regex_rewrite>`,
* :ref:`prefix_rewrite <envoy_v3_api_field_config.route.v3.RouteAction.prefix_rewrite>`, or
* :ref:`path_rewrite_policy <envoy_v3_api_field_config.route.v3.RouteAction.path_rewrite_policy>`]
* may be specified.
* Examples using Google's `RE2 <https://github.com/google/re2>`_ engine:
* * The path pattern ``^/service/([^/]+)(/.*)$`` paired with a substitution
* string of ``\2/instance/\1`` would transform ``/service/foo/v1/api``
* into ``/v1/api/instance/foo``.
* * The pattern ``one`` paired with a substitution string of ``two`` would
* transform ``/xxx/one/yyy/one/zzz`` into ``/xxx/two/yyy/two/zzz``.
* * The pattern ``^(.*?)one(.*)$`` paired with a substitution string of
* ``\1two\2`` would replace only the first occurrence of ``one``,
* transforming path ``/xxx/one/yyy/one/zzz`` into ``/xxx/two/yyy/one/zzz``.
* * The pattern ``(?i)/xxx/`` paired with a substitution string of ``/yyy/``
* would do a case-insensitive match and transform path ``/aaa/XxX/bbb`` to
* ``/aaa/yyy/bbb``.
*
*
* .envoy.type.matcher.v3.RegexMatchAndSubstitute regex_rewrite = 32;
* @return Whether the regexRewrite field is set.
*/
public boolean hasRegexRewrite() {
return regexRewriteBuilder_ != null || regexRewrite_ != null;
}
/**
*
* Indicates that during forwarding, portions of the path that match the
* pattern should be rewritten, even allowing the substitution of capture
* groups from the pattern into the new path as specified by the rewrite
* substitution string. This is useful to allow application paths to be
* rewritten in a way that is aware of segments with variable content like
* identifiers. The router filter will place the original path as it was
* before the rewrite into the :ref:`x-envoy-original-path
* <config_http_filters_router_x-envoy-original-path>` header.
* Only one of :ref:`regex_rewrite <envoy_v3_api_field_config.route.v3.RouteAction.regex_rewrite>`,
* :ref:`prefix_rewrite <envoy_v3_api_field_config.route.v3.RouteAction.prefix_rewrite>`, or
* :ref:`path_rewrite_policy <envoy_v3_api_field_config.route.v3.RouteAction.path_rewrite_policy>`]
* may be specified.
* Examples using Google's `RE2 <https://github.com/google/re2>`_ engine:
* * The path pattern ``^/service/([^/]+)(/.*)$`` paired with a substitution
* string of ``\2/instance/\1`` would transform ``/service/foo/v1/api``
* into ``/v1/api/instance/foo``.
* * The pattern ``one`` paired with a substitution string of ``two`` would
* transform ``/xxx/one/yyy/one/zzz`` into ``/xxx/two/yyy/two/zzz``.
* * The pattern ``^(.*?)one(.*)$`` paired with a substitution string of
* ``\1two\2`` would replace only the first occurrence of ``one``,
* transforming path ``/xxx/one/yyy/one/zzz`` into ``/xxx/two/yyy/one/zzz``.
* * The pattern ``(?i)/xxx/`` paired with a substitution string of ``/yyy/``
* would do a case-insensitive match and transform path ``/aaa/XxX/bbb`` to
* ``/aaa/yyy/bbb``.
*
* Indicates that during forwarding, portions of the path that match the
* pattern should be rewritten, even allowing the substitution of capture
* groups from the pattern into the new path as specified by the rewrite
* substitution string. This is useful to allow application paths to be
* rewritten in a way that is aware of segments with variable content like
* identifiers. The router filter will place the original path as it was
* before the rewrite into the :ref:`x-envoy-original-path
* <config_http_filters_router_x-envoy-original-path>` header.
* Only one of :ref:`regex_rewrite <envoy_v3_api_field_config.route.v3.RouteAction.regex_rewrite>`,
* :ref:`prefix_rewrite <envoy_v3_api_field_config.route.v3.RouteAction.prefix_rewrite>`, or
* :ref:`path_rewrite_policy <envoy_v3_api_field_config.route.v3.RouteAction.path_rewrite_policy>`]
* may be specified.
* Examples using Google's `RE2 <https://github.com/google/re2>`_ engine:
* * The path pattern ``^/service/([^/]+)(/.*)$`` paired with a substitution
* string of ``\2/instance/\1`` would transform ``/service/foo/v1/api``
* into ``/v1/api/instance/foo``.
* * The pattern ``one`` paired with a substitution string of ``two`` would
* transform ``/xxx/one/yyy/one/zzz`` into ``/xxx/two/yyy/two/zzz``.
* * The pattern ``^(.*?)one(.*)$`` paired with a substitution string of
* ``\1two\2`` would replace only the first occurrence of ``one``,
* transforming path ``/xxx/one/yyy/one/zzz`` into ``/xxx/two/yyy/one/zzz``.
* * The pattern ``(?i)/xxx/`` paired with a substitution string of ``/yyy/``
* would do a case-insensitive match and transform path ``/aaa/XxX/bbb`` to
* ``/aaa/yyy/bbb``.
*
*
* .envoy.type.matcher.v3.RegexMatchAndSubstitute regex_rewrite = 32;
*/
public Builder setRegexRewrite(io.envoyproxy.envoy.type.matcher.v3.RegexMatchAndSubstitute value) {
if (regexRewriteBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
regexRewrite_ = value;
onChanged();
} else {
regexRewriteBuilder_.setMessage(value);
}
return this;
}
/**
*
* Indicates that during forwarding, portions of the path that match the
* pattern should be rewritten, even allowing the substitution of capture
* groups from the pattern into the new path as specified by the rewrite
* substitution string. This is useful to allow application paths to be
* rewritten in a way that is aware of segments with variable content like
* identifiers. The router filter will place the original path as it was
* before the rewrite into the :ref:`x-envoy-original-path
* <config_http_filters_router_x-envoy-original-path>` header.
* Only one of :ref:`regex_rewrite <envoy_v3_api_field_config.route.v3.RouteAction.regex_rewrite>`,
* :ref:`prefix_rewrite <envoy_v3_api_field_config.route.v3.RouteAction.prefix_rewrite>`, or
* :ref:`path_rewrite_policy <envoy_v3_api_field_config.route.v3.RouteAction.path_rewrite_policy>`]
* may be specified.
* Examples using Google's `RE2 <https://github.com/google/re2>`_ engine:
* * The path pattern ``^/service/([^/]+)(/.*)$`` paired with a substitution
* string of ``\2/instance/\1`` would transform ``/service/foo/v1/api``
* into ``/v1/api/instance/foo``.
* * The pattern ``one`` paired with a substitution string of ``two`` would
* transform ``/xxx/one/yyy/one/zzz`` into ``/xxx/two/yyy/two/zzz``.
* * The pattern ``^(.*?)one(.*)$`` paired with a substitution string of
* ``\1two\2`` would replace only the first occurrence of ``one``,
* transforming path ``/xxx/one/yyy/one/zzz`` into ``/xxx/two/yyy/one/zzz``.
* * The pattern ``(?i)/xxx/`` paired with a substitution string of ``/yyy/``
* would do a case-insensitive match and transform path ``/aaa/XxX/bbb`` to
* ``/aaa/yyy/bbb``.
*
* Indicates that during forwarding, portions of the path that match the
* pattern should be rewritten, even allowing the substitution of capture
* groups from the pattern into the new path as specified by the rewrite
* substitution string. This is useful to allow application paths to be
* rewritten in a way that is aware of segments with variable content like
* identifiers. The router filter will place the original path as it was
* before the rewrite into the :ref:`x-envoy-original-path
* <config_http_filters_router_x-envoy-original-path>` header.
* Only one of :ref:`regex_rewrite <envoy_v3_api_field_config.route.v3.RouteAction.regex_rewrite>`,
* :ref:`prefix_rewrite <envoy_v3_api_field_config.route.v3.RouteAction.prefix_rewrite>`, or
* :ref:`path_rewrite_policy <envoy_v3_api_field_config.route.v3.RouteAction.path_rewrite_policy>`]
* may be specified.
* Examples using Google's `RE2 <https://github.com/google/re2>`_ engine:
* * The path pattern ``^/service/([^/]+)(/.*)$`` paired with a substitution
* string of ``\2/instance/\1`` would transform ``/service/foo/v1/api``
* into ``/v1/api/instance/foo``.
* * The pattern ``one`` paired with a substitution string of ``two`` would
* transform ``/xxx/one/yyy/one/zzz`` into ``/xxx/two/yyy/two/zzz``.
* * The pattern ``^(.*?)one(.*)$`` paired with a substitution string of
* ``\1two\2`` would replace only the first occurrence of ``one``,
* transforming path ``/xxx/one/yyy/one/zzz`` into ``/xxx/two/yyy/one/zzz``.
* * The pattern ``(?i)/xxx/`` paired with a substitution string of ``/yyy/``
* would do a case-insensitive match and transform path ``/aaa/XxX/bbb`` to
* ``/aaa/yyy/bbb``.
*
* Indicates that during forwarding, portions of the path that match the
* pattern should be rewritten, even allowing the substitution of capture
* groups from the pattern into the new path as specified by the rewrite
* substitution string. This is useful to allow application paths to be
* rewritten in a way that is aware of segments with variable content like
* identifiers. The router filter will place the original path as it was
* before the rewrite into the :ref:`x-envoy-original-path
* <config_http_filters_router_x-envoy-original-path>` header.
* Only one of :ref:`regex_rewrite <envoy_v3_api_field_config.route.v3.RouteAction.regex_rewrite>`,
* :ref:`prefix_rewrite <envoy_v3_api_field_config.route.v3.RouteAction.prefix_rewrite>`, or
* :ref:`path_rewrite_policy <envoy_v3_api_field_config.route.v3.RouteAction.path_rewrite_policy>`]
* may be specified.
* Examples using Google's `RE2 <https://github.com/google/re2>`_ engine:
* * The path pattern ``^/service/([^/]+)(/.*)$`` paired with a substitution
* string of ``\2/instance/\1`` would transform ``/service/foo/v1/api``
* into ``/v1/api/instance/foo``.
* * The pattern ``one`` paired with a substitution string of ``two`` would
* transform ``/xxx/one/yyy/one/zzz`` into ``/xxx/two/yyy/two/zzz``.
* * The pattern ``^(.*?)one(.*)$`` paired with a substitution string of
* ``\1two\2`` would replace only the first occurrence of ``one``,
* transforming path ``/xxx/one/yyy/one/zzz`` into ``/xxx/two/yyy/one/zzz``.
* * The pattern ``(?i)/xxx/`` paired with a substitution string of ``/yyy/``
* would do a case-insensitive match and transform path ``/aaa/XxX/bbb`` to
* ``/aaa/yyy/bbb``.
*
* Indicates that during forwarding, portions of the path that match the
* pattern should be rewritten, even allowing the substitution of capture
* groups from the pattern into the new path as specified by the rewrite
* substitution string. This is useful to allow application paths to be
* rewritten in a way that is aware of segments with variable content like
* identifiers. The router filter will place the original path as it was
* before the rewrite into the :ref:`x-envoy-original-path
* <config_http_filters_router_x-envoy-original-path>` header.
* Only one of :ref:`regex_rewrite <envoy_v3_api_field_config.route.v3.RouteAction.regex_rewrite>`,
* :ref:`prefix_rewrite <envoy_v3_api_field_config.route.v3.RouteAction.prefix_rewrite>`, or
* :ref:`path_rewrite_policy <envoy_v3_api_field_config.route.v3.RouteAction.path_rewrite_policy>`]
* may be specified.
* Examples using Google's `RE2 <https://github.com/google/re2>`_ engine:
* * The path pattern ``^/service/([^/]+)(/.*)$`` paired with a substitution
* string of ``\2/instance/\1`` would transform ``/service/foo/v1/api``
* into ``/v1/api/instance/foo``.
* * The pattern ``one`` paired with a substitution string of ``two`` would
* transform ``/xxx/one/yyy/one/zzz`` into ``/xxx/two/yyy/two/zzz``.
* * The pattern ``^(.*?)one(.*)$`` paired with a substitution string of
* ``\1two\2`` would replace only the first occurrence of ``one``,
* transforming path ``/xxx/one/yyy/one/zzz`` into ``/xxx/two/yyy/one/zzz``.
* * The pattern ``(?i)/xxx/`` paired with a substitution string of ``/yyy/``
* would do a case-insensitive match and transform path ``/aaa/XxX/bbb`` to
* ``/aaa/yyy/bbb``.
*
* Indicates that during forwarding, portions of the path that match the
* pattern should be rewritten, even allowing the substitution of capture
* groups from the pattern into the new path as specified by the rewrite
* substitution string. This is useful to allow application paths to be
* rewritten in a way that is aware of segments with variable content like
* identifiers. The router filter will place the original path as it was
* before the rewrite into the :ref:`x-envoy-original-path
* <config_http_filters_router_x-envoy-original-path>` header.
* Only one of :ref:`regex_rewrite <envoy_v3_api_field_config.route.v3.RouteAction.regex_rewrite>`,
* :ref:`prefix_rewrite <envoy_v3_api_field_config.route.v3.RouteAction.prefix_rewrite>`, or
* :ref:`path_rewrite_policy <envoy_v3_api_field_config.route.v3.RouteAction.path_rewrite_policy>`]
* may be specified.
* Examples using Google's `RE2 <https://github.com/google/re2>`_ engine:
* * The path pattern ``^/service/([^/]+)(/.*)$`` paired with a substitution
* string of ``\2/instance/\1`` would transform ``/service/foo/v1/api``
* into ``/v1/api/instance/foo``.
* * The pattern ``one`` paired with a substitution string of ``two`` would
* transform ``/xxx/one/yyy/one/zzz`` into ``/xxx/two/yyy/two/zzz``.
* * The pattern ``^(.*?)one(.*)$`` paired with a substitution string of
* ``\1two\2`` would replace only the first occurrence of ``one``,
* transforming path ``/xxx/one/yyy/one/zzz`` into ``/xxx/two/yyy/one/zzz``.
* * The pattern ``(?i)/xxx/`` paired with a substitution string of ``/yyy/``
* would do a case-insensitive match and transform path ``/aaa/XxX/bbb`` to
* ``/aaa/yyy/bbb``.
*
* Indicates that during forwarding, portions of the path that match the
* pattern should be rewritten, even allowing the substitution of capture
* groups from the pattern into the new path as specified by the rewrite
* substitution string. This is useful to allow application paths to be
* rewritten in a way that is aware of segments with variable content like
* identifiers. The router filter will place the original path as it was
* before the rewrite into the :ref:`x-envoy-original-path
* <config_http_filters_router_x-envoy-original-path>` header.
* Only one of :ref:`regex_rewrite <envoy_v3_api_field_config.route.v3.RouteAction.regex_rewrite>`,
* :ref:`prefix_rewrite <envoy_v3_api_field_config.route.v3.RouteAction.prefix_rewrite>`, or
* :ref:`path_rewrite_policy <envoy_v3_api_field_config.route.v3.RouteAction.path_rewrite_policy>`]
* may be specified.
* Examples using Google's `RE2 <https://github.com/google/re2>`_ engine:
* * The path pattern ``^/service/([^/]+)(/.*)$`` paired with a substitution
* string of ``\2/instance/\1`` would transform ``/service/foo/v1/api``
* into ``/v1/api/instance/foo``.
* * The pattern ``one`` paired with a substitution string of ``two`` would
* transform ``/xxx/one/yyy/one/zzz`` into ``/xxx/two/yyy/two/zzz``.
* * The pattern ``^(.*?)one(.*)$`` paired with a substitution string of
* ``\1two\2`` would replace only the first occurrence of ``one``,
* transforming path ``/xxx/one/yyy/one/zzz`` into ``/xxx/two/yyy/one/zzz``.
* * The pattern ``(?i)/xxx/`` paired with a substitution string of ``/yyy/``
* would do a case-insensitive match and transform path ``/aaa/XxX/bbb`` to
* ``/aaa/yyy/bbb``.
*
* Indicates that during forwarding, the host header will be swapped with
* this value. Using this option will append the
* :ref:`config_http_conn_man_headers_x-forwarded-host` header if
* :ref:`append_x_forwarded_host <envoy_v3_api_field_config.route.v3.RouteAction.append_x_forwarded_host>`
* is set.
*
*
* string host_rewrite_literal = 6 [(.validate.rules) = { ... }
* @return Whether the hostRewriteLiteral field is set.
*/
@java.lang.Override
public boolean hasHostRewriteLiteral() {
return hostRewriteSpecifierCase_ == 6;
}
/**
*
* Indicates that during forwarding, the host header will be swapped with
* this value. Using this option will append the
* :ref:`config_http_conn_man_headers_x-forwarded-host` header if
* :ref:`append_x_forwarded_host <envoy_v3_api_field_config.route.v3.RouteAction.append_x_forwarded_host>`
* is set.
*
* Indicates that during forwarding, the host header will be swapped with
* this value. Using this option will append the
* :ref:`config_http_conn_man_headers_x-forwarded-host` header if
* :ref:`append_x_forwarded_host <envoy_v3_api_field_config.route.v3.RouteAction.append_x_forwarded_host>`
* is set.
*
*
* string host_rewrite_literal = 6 [(.validate.rules) = { ... }
* @return The bytes for hostRewriteLiteral.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getHostRewriteLiteralBytes() {
java.lang.Object ref = "";
if (hostRewriteSpecifierCase_ == 6) {
ref = hostRewriteSpecifier_;
}
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (hostRewriteSpecifierCase_ == 6) {
hostRewriteSpecifier_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Indicates that during forwarding, the host header will be swapped with
* this value. Using this option will append the
* :ref:`config_http_conn_man_headers_x-forwarded-host` header if
* :ref:`append_x_forwarded_host <envoy_v3_api_field_config.route.v3.RouteAction.append_x_forwarded_host>`
* is set.
*
*
* string host_rewrite_literal = 6 [(.validate.rules) = { ... }
* @param value The hostRewriteLiteral to set.
* @return This builder for chaining.
*/
public Builder setHostRewriteLiteral(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
hostRewriteSpecifierCase_ = 6;
hostRewriteSpecifier_ = value;
onChanged();
return this;
}
/**
*
* Indicates that during forwarding, the host header will be swapped with
* this value. Using this option will append the
* :ref:`config_http_conn_man_headers_x-forwarded-host` header if
* :ref:`append_x_forwarded_host <envoy_v3_api_field_config.route.v3.RouteAction.append_x_forwarded_host>`
* is set.
*
*
* string host_rewrite_literal = 6 [(.validate.rules) = { ... }
* @return This builder for chaining.
*/
public Builder clearHostRewriteLiteral() {
if (hostRewriteSpecifierCase_ == 6) {
hostRewriteSpecifierCase_ = 0;
hostRewriteSpecifier_ = null;
onChanged();
}
return this;
}
/**
*
* Indicates that during forwarding, the host header will be swapped with
* this value. Using this option will append the
* :ref:`config_http_conn_man_headers_x-forwarded-host` header if
* :ref:`append_x_forwarded_host <envoy_v3_api_field_config.route.v3.RouteAction.append_x_forwarded_host>`
* is set.
*
*
* string host_rewrite_literal = 6 [(.validate.rules) = { ... }
* @param value The bytes for hostRewriteLiteral to set.
* @return This builder for chaining.
*/
public Builder setHostRewriteLiteralBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
hostRewriteSpecifierCase_ = 6;
hostRewriteSpecifier_ = value;
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> autoHostRewriteBuilder_;
/**
*
* Indicates that during forwarding, the host header will be swapped with
* the hostname of the upstream host chosen by the cluster manager. This
* option is applicable only when the destination cluster for a route is of
* type ``strict_dns`` or ``logical_dns``,
* or when :ref:`hostname <envoy_v3_api_field_config.endpoint.v3.Endpoint.hostname>`
* field is not empty. Setting this to true with other cluster types
* has no effect. Using this option will append the
* :ref:`config_http_conn_man_headers_x-forwarded-host` header if
* :ref:`append_x_forwarded_host <envoy_v3_api_field_config.route.v3.RouteAction.append_x_forwarded_host>`
* is set.
*
*
* .google.protobuf.BoolValue auto_host_rewrite = 7;
* @return Whether the autoHostRewrite field is set.
*/
@java.lang.Override
public boolean hasAutoHostRewrite() {
return hostRewriteSpecifierCase_ == 7;
}
/**
*
* Indicates that during forwarding, the host header will be swapped with
* the hostname of the upstream host chosen by the cluster manager. This
* option is applicable only when the destination cluster for a route is of
* type ``strict_dns`` or ``logical_dns``,
* or when :ref:`hostname <envoy_v3_api_field_config.endpoint.v3.Endpoint.hostname>`
* field is not empty. Setting this to true with other cluster types
* has no effect. Using this option will append the
* :ref:`config_http_conn_man_headers_x-forwarded-host` header if
* :ref:`append_x_forwarded_host <envoy_v3_api_field_config.route.v3.RouteAction.append_x_forwarded_host>`
* is set.
*
*
* .google.protobuf.BoolValue auto_host_rewrite = 7;
* @return The autoHostRewrite.
*/
@java.lang.Override
public com.google.protobuf.BoolValue getAutoHostRewrite() {
if (autoHostRewriteBuilder_ == null) {
if (hostRewriteSpecifierCase_ == 7) {
return (com.google.protobuf.BoolValue) hostRewriteSpecifier_;
}
return com.google.protobuf.BoolValue.getDefaultInstance();
} else {
if (hostRewriteSpecifierCase_ == 7) {
return autoHostRewriteBuilder_.getMessage();
}
return com.google.protobuf.BoolValue.getDefaultInstance();
}
}
/**
*
* Indicates that during forwarding, the host header will be swapped with
* the hostname of the upstream host chosen by the cluster manager. This
* option is applicable only when the destination cluster for a route is of
* type ``strict_dns`` or ``logical_dns``,
* or when :ref:`hostname <envoy_v3_api_field_config.endpoint.v3.Endpoint.hostname>`
* field is not empty. Setting this to true with other cluster types
* has no effect. Using this option will append the
* :ref:`config_http_conn_man_headers_x-forwarded-host` header if
* :ref:`append_x_forwarded_host <envoy_v3_api_field_config.route.v3.RouteAction.append_x_forwarded_host>`
* is set.
*
* Indicates that during forwarding, the host header will be swapped with
* the hostname of the upstream host chosen by the cluster manager. This
* option is applicable only when the destination cluster for a route is of
* type ``strict_dns`` or ``logical_dns``,
* or when :ref:`hostname <envoy_v3_api_field_config.endpoint.v3.Endpoint.hostname>`
* field is not empty. Setting this to true with other cluster types
* has no effect. Using this option will append the
* :ref:`config_http_conn_man_headers_x-forwarded-host` header if
* :ref:`append_x_forwarded_host <envoy_v3_api_field_config.route.v3.RouteAction.append_x_forwarded_host>`
* is set.
*
* Indicates that during forwarding, the host header will be swapped with
* the hostname of the upstream host chosen by the cluster manager. This
* option is applicable only when the destination cluster for a route is of
* type ``strict_dns`` or ``logical_dns``,
* or when :ref:`hostname <envoy_v3_api_field_config.endpoint.v3.Endpoint.hostname>`
* field is not empty. Setting this to true with other cluster types
* has no effect. Using this option will append the
* :ref:`config_http_conn_man_headers_x-forwarded-host` header if
* :ref:`append_x_forwarded_host <envoy_v3_api_field_config.route.v3.RouteAction.append_x_forwarded_host>`
* is set.
*
* Indicates that during forwarding, the host header will be swapped with
* the hostname of the upstream host chosen by the cluster manager. This
* option is applicable only when the destination cluster for a route is of
* type ``strict_dns`` or ``logical_dns``,
* or when :ref:`hostname <envoy_v3_api_field_config.endpoint.v3.Endpoint.hostname>`
* field is not empty. Setting this to true with other cluster types
* has no effect. Using this option will append the
* :ref:`config_http_conn_man_headers_x-forwarded-host` header if
* :ref:`append_x_forwarded_host <envoy_v3_api_field_config.route.v3.RouteAction.append_x_forwarded_host>`
* is set.
*
* Indicates that during forwarding, the host header will be swapped with
* the hostname of the upstream host chosen by the cluster manager. This
* option is applicable only when the destination cluster for a route is of
* type ``strict_dns`` or ``logical_dns``,
* or when :ref:`hostname <envoy_v3_api_field_config.endpoint.v3.Endpoint.hostname>`
* field is not empty. Setting this to true with other cluster types
* has no effect. Using this option will append the
* :ref:`config_http_conn_man_headers_x-forwarded-host` header if
* :ref:`append_x_forwarded_host <envoy_v3_api_field_config.route.v3.RouteAction.append_x_forwarded_host>`
* is set.
*
* Indicates that during forwarding, the host header will be swapped with
* the hostname of the upstream host chosen by the cluster manager. This
* option is applicable only when the destination cluster for a route is of
* type ``strict_dns`` or ``logical_dns``,
* or when :ref:`hostname <envoy_v3_api_field_config.endpoint.v3.Endpoint.hostname>`
* field is not empty. Setting this to true with other cluster types
* has no effect. Using this option will append the
* :ref:`config_http_conn_man_headers_x-forwarded-host` header if
* :ref:`append_x_forwarded_host <envoy_v3_api_field_config.route.v3.RouteAction.append_x_forwarded_host>`
* is set.
*
* Indicates that during forwarding, the host header will be swapped with
* the hostname of the upstream host chosen by the cluster manager. This
* option is applicable only when the destination cluster for a route is of
* type ``strict_dns`` or ``logical_dns``,
* or when :ref:`hostname <envoy_v3_api_field_config.endpoint.v3.Endpoint.hostname>`
* field is not empty. Setting this to true with other cluster types
* has no effect. Using this option will append the
* :ref:`config_http_conn_man_headers_x-forwarded-host` header if
* :ref:`append_x_forwarded_host <envoy_v3_api_field_config.route.v3.RouteAction.append_x_forwarded_host>`
* is set.
*
* Indicates that during forwarding, the host header will be swapped with the content of given
* downstream or :ref:`custom <config_http_conn_man_headers_custom_request_headers>` header.
* If header value is empty, host header is left intact. Using this option will append the
* :ref:`config_http_conn_man_headers_x-forwarded-host` header if
* :ref:`append_x_forwarded_host <envoy_v3_api_field_config.route.v3.RouteAction.append_x_forwarded_host>`
* is set.
* .. attention::
* Pay attention to the potential security implications of using this option. Provided header
* must come from trusted source.
* .. note::
* If the header appears multiple times only the first value is used.
*
*
* string host_rewrite_header = 29 [(.validate.rules) = { ... }
* @return Whether the hostRewriteHeader field is set.
*/
@java.lang.Override
public boolean hasHostRewriteHeader() {
return hostRewriteSpecifierCase_ == 29;
}
/**
*
* Indicates that during forwarding, the host header will be swapped with the content of given
* downstream or :ref:`custom <config_http_conn_man_headers_custom_request_headers>` header.
* If header value is empty, host header is left intact. Using this option will append the
* :ref:`config_http_conn_man_headers_x-forwarded-host` header if
* :ref:`append_x_forwarded_host <envoy_v3_api_field_config.route.v3.RouteAction.append_x_forwarded_host>`
* is set.
* .. attention::
* Pay attention to the potential security implications of using this option. Provided header
* must come from trusted source.
* .. note::
* If the header appears multiple times only the first value is used.
*
* Indicates that during forwarding, the host header will be swapped with the content of given
* downstream or :ref:`custom <config_http_conn_man_headers_custom_request_headers>` header.
* If header value is empty, host header is left intact. Using this option will append the
* :ref:`config_http_conn_man_headers_x-forwarded-host` header if
* :ref:`append_x_forwarded_host <envoy_v3_api_field_config.route.v3.RouteAction.append_x_forwarded_host>`
* is set.
* .. attention::
* Pay attention to the potential security implications of using this option. Provided header
* must come from trusted source.
* .. note::
* If the header appears multiple times only the first value is used.
*
*
* string host_rewrite_header = 29 [(.validate.rules) = { ... }
* @return The bytes for hostRewriteHeader.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getHostRewriteHeaderBytes() {
java.lang.Object ref = "";
if (hostRewriteSpecifierCase_ == 29) {
ref = hostRewriteSpecifier_;
}
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (hostRewriteSpecifierCase_ == 29) {
hostRewriteSpecifier_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Indicates that during forwarding, the host header will be swapped with the content of given
* downstream or :ref:`custom <config_http_conn_man_headers_custom_request_headers>` header.
* If header value is empty, host header is left intact. Using this option will append the
* :ref:`config_http_conn_man_headers_x-forwarded-host` header if
* :ref:`append_x_forwarded_host <envoy_v3_api_field_config.route.v3.RouteAction.append_x_forwarded_host>`
* is set.
* .. attention::
* Pay attention to the potential security implications of using this option. Provided header
* must come from trusted source.
* .. note::
* If the header appears multiple times only the first value is used.
*
*
* string host_rewrite_header = 29 [(.validate.rules) = { ... }
* @param value The hostRewriteHeader to set.
* @return This builder for chaining.
*/
public Builder setHostRewriteHeader(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
hostRewriteSpecifierCase_ = 29;
hostRewriteSpecifier_ = value;
onChanged();
return this;
}
/**
*
* Indicates that during forwarding, the host header will be swapped with the content of given
* downstream or :ref:`custom <config_http_conn_man_headers_custom_request_headers>` header.
* If header value is empty, host header is left intact. Using this option will append the
* :ref:`config_http_conn_man_headers_x-forwarded-host` header if
* :ref:`append_x_forwarded_host <envoy_v3_api_field_config.route.v3.RouteAction.append_x_forwarded_host>`
* is set.
* .. attention::
* Pay attention to the potential security implications of using this option. Provided header
* must come from trusted source.
* .. note::
* If the header appears multiple times only the first value is used.
*
*
* string host_rewrite_header = 29 [(.validate.rules) = { ... }
* @return This builder for chaining.
*/
public Builder clearHostRewriteHeader() {
if (hostRewriteSpecifierCase_ == 29) {
hostRewriteSpecifierCase_ = 0;
hostRewriteSpecifier_ = null;
onChanged();
}
return this;
}
/**
*
* Indicates that during forwarding, the host header will be swapped with the content of given
* downstream or :ref:`custom <config_http_conn_man_headers_custom_request_headers>` header.
* If header value is empty, host header is left intact. Using this option will append the
* :ref:`config_http_conn_man_headers_x-forwarded-host` header if
* :ref:`append_x_forwarded_host <envoy_v3_api_field_config.route.v3.RouteAction.append_x_forwarded_host>`
* is set.
* .. attention::
* Pay attention to the potential security implications of using this option. Provided header
* must come from trusted source.
* .. note::
* If the header appears multiple times only the first value is used.
*
*
* string host_rewrite_header = 29 [(.validate.rules) = { ... }
* @param value The bytes for hostRewriteHeader to set.
* @return This builder for chaining.
*/
public Builder setHostRewriteHeaderBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
hostRewriteSpecifierCase_ = 29;
hostRewriteSpecifier_ = value;
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.type.matcher.v3.RegexMatchAndSubstitute, io.envoyproxy.envoy.type.matcher.v3.RegexMatchAndSubstitute.Builder, io.envoyproxy.envoy.type.matcher.v3.RegexMatchAndSubstituteOrBuilder> hostRewritePathRegexBuilder_;
/**
*
* Indicates that during forwarding, the host header will be swapped with
* the result of the regex substitution executed on path value with query and fragment removed.
* This is useful for transitioning variable content between path segment and subdomain.
* Using this option will append the
* :ref:`config_http_conn_man_headers_x-forwarded-host` header if
* :ref:`append_x_forwarded_host <envoy_v3_api_field_config.route.v3.RouteAction.append_x_forwarded_host>`
* is set.
* For example with the following config:
* .. code-block:: yaml
* host_rewrite_path_regex:
* pattern:
* google_re2: {}
* regex: "^/(.+)/.+$"
* substitution: \1
* Would rewrite the host header to ``envoyproxy.io`` given the path ``/envoyproxy.io/some/path``.
*
*
* .envoy.type.matcher.v3.RegexMatchAndSubstitute host_rewrite_path_regex = 35;
* @return Whether the hostRewritePathRegex field is set.
*/
@java.lang.Override
public boolean hasHostRewritePathRegex() {
return hostRewriteSpecifierCase_ == 35;
}
/**
*
* Indicates that during forwarding, the host header will be swapped with
* the result of the regex substitution executed on path value with query and fragment removed.
* This is useful for transitioning variable content between path segment and subdomain.
* Using this option will append the
* :ref:`config_http_conn_man_headers_x-forwarded-host` header if
* :ref:`append_x_forwarded_host <envoy_v3_api_field_config.route.v3.RouteAction.append_x_forwarded_host>`
* is set.
* For example with the following config:
* .. code-block:: yaml
* host_rewrite_path_regex:
* pattern:
* google_re2: {}
* regex: "^/(.+)/.+$"
* substitution: \1
* Would rewrite the host header to ``envoyproxy.io`` given the path ``/envoyproxy.io/some/path``.
*
*
* .envoy.type.matcher.v3.RegexMatchAndSubstitute host_rewrite_path_regex = 35;
* @return The hostRewritePathRegex.
*/
@java.lang.Override
public io.envoyproxy.envoy.type.matcher.v3.RegexMatchAndSubstitute getHostRewritePathRegex() {
if (hostRewritePathRegexBuilder_ == null) {
if (hostRewriteSpecifierCase_ == 35) {
return (io.envoyproxy.envoy.type.matcher.v3.RegexMatchAndSubstitute) hostRewriteSpecifier_;
}
return io.envoyproxy.envoy.type.matcher.v3.RegexMatchAndSubstitute.getDefaultInstance();
} else {
if (hostRewriteSpecifierCase_ == 35) {
return hostRewritePathRegexBuilder_.getMessage();
}
return io.envoyproxy.envoy.type.matcher.v3.RegexMatchAndSubstitute.getDefaultInstance();
}
}
/**
*
* Indicates that during forwarding, the host header will be swapped with
* the result of the regex substitution executed on path value with query and fragment removed.
* This is useful for transitioning variable content between path segment and subdomain.
* Using this option will append the
* :ref:`config_http_conn_man_headers_x-forwarded-host` header if
* :ref:`append_x_forwarded_host <envoy_v3_api_field_config.route.v3.RouteAction.append_x_forwarded_host>`
* is set.
* For example with the following config:
* .. code-block:: yaml
* host_rewrite_path_regex:
* pattern:
* google_re2: {}
* regex: "^/(.+)/.+$"
* substitution: \1
* Would rewrite the host header to ``envoyproxy.io`` given the path ``/envoyproxy.io/some/path``.
*
* Indicates that during forwarding, the host header will be swapped with
* the result of the regex substitution executed on path value with query and fragment removed.
* This is useful for transitioning variable content between path segment and subdomain.
* Using this option will append the
* :ref:`config_http_conn_man_headers_x-forwarded-host` header if
* :ref:`append_x_forwarded_host <envoy_v3_api_field_config.route.v3.RouteAction.append_x_forwarded_host>`
* is set.
* For example with the following config:
* .. code-block:: yaml
* host_rewrite_path_regex:
* pattern:
* google_re2: {}
* regex: "^/(.+)/.+$"
* substitution: \1
* Would rewrite the host header to ``envoyproxy.io`` given the path ``/envoyproxy.io/some/path``.
*
* Indicates that during forwarding, the host header will be swapped with
* the result of the regex substitution executed on path value with query and fragment removed.
* This is useful for transitioning variable content between path segment and subdomain.
* Using this option will append the
* :ref:`config_http_conn_man_headers_x-forwarded-host` header if
* :ref:`append_x_forwarded_host <envoy_v3_api_field_config.route.v3.RouteAction.append_x_forwarded_host>`
* is set.
* For example with the following config:
* .. code-block:: yaml
* host_rewrite_path_regex:
* pattern:
* google_re2: {}
* regex: "^/(.+)/.+$"
* substitution: \1
* Would rewrite the host header to ``envoyproxy.io`` given the path ``/envoyproxy.io/some/path``.
*
* Indicates that during forwarding, the host header will be swapped with
* the result of the regex substitution executed on path value with query and fragment removed.
* This is useful for transitioning variable content between path segment and subdomain.
* Using this option will append the
* :ref:`config_http_conn_man_headers_x-forwarded-host` header if
* :ref:`append_x_forwarded_host <envoy_v3_api_field_config.route.v3.RouteAction.append_x_forwarded_host>`
* is set.
* For example with the following config:
* .. code-block:: yaml
* host_rewrite_path_regex:
* pattern:
* google_re2: {}
* regex: "^/(.+)/.+$"
* substitution: \1
* Would rewrite the host header to ``envoyproxy.io`` given the path ``/envoyproxy.io/some/path``.
*
* Indicates that during forwarding, the host header will be swapped with
* the result of the regex substitution executed on path value with query and fragment removed.
* This is useful for transitioning variable content between path segment and subdomain.
* Using this option will append the
* :ref:`config_http_conn_man_headers_x-forwarded-host` header if
* :ref:`append_x_forwarded_host <envoy_v3_api_field_config.route.v3.RouteAction.append_x_forwarded_host>`
* is set.
* For example with the following config:
* .. code-block:: yaml
* host_rewrite_path_regex:
* pattern:
* google_re2: {}
* regex: "^/(.+)/.+$"
* substitution: \1
* Would rewrite the host header to ``envoyproxy.io`` given the path ``/envoyproxy.io/some/path``.
*
* Indicates that during forwarding, the host header will be swapped with
* the result of the regex substitution executed on path value with query and fragment removed.
* This is useful for transitioning variable content between path segment and subdomain.
* Using this option will append the
* :ref:`config_http_conn_man_headers_x-forwarded-host` header if
* :ref:`append_x_forwarded_host <envoy_v3_api_field_config.route.v3.RouteAction.append_x_forwarded_host>`
* is set.
* For example with the following config:
* .. code-block:: yaml
* host_rewrite_path_regex:
* pattern:
* google_re2: {}
* regex: "^/(.+)/.+$"
* substitution: \1
* Would rewrite the host header to ``envoyproxy.io`` given the path ``/envoyproxy.io/some/path``.
*
* Indicates that during forwarding, the host header will be swapped with
* the result of the regex substitution executed on path value with query and fragment removed.
* This is useful for transitioning variable content between path segment and subdomain.
* Using this option will append the
* :ref:`config_http_conn_man_headers_x-forwarded-host` header if
* :ref:`append_x_forwarded_host <envoy_v3_api_field_config.route.v3.RouteAction.append_x_forwarded_host>`
* is set.
* For example with the following config:
* .. code-block:: yaml
* host_rewrite_path_regex:
* pattern:
* google_re2: {}
* regex: "^/(.+)/.+$"
* substitution: \1
* Would rewrite the host header to ``envoyproxy.io`` given the path ``/envoyproxy.io/some/path``.
*
* If set, then a host rewrite action (one of
* :ref:`host_rewrite_literal <envoy_v3_api_field_config.route.v3.RouteAction.host_rewrite_literal>`,
* :ref:`auto_host_rewrite <envoy_v3_api_field_config.route.v3.RouteAction.auto_host_rewrite>`,
* :ref:`host_rewrite_header <envoy_v3_api_field_config.route.v3.RouteAction.host_rewrite_header>`, or
* :ref:`host_rewrite_path_regex <envoy_v3_api_field_config.route.v3.RouteAction.host_rewrite_path_regex>`)
* causes the original value of the host header, if any, to be appended to the
* :ref:`config_http_conn_man_headers_x-forwarded-host` HTTP header if it is different to the last value appended.
* This can be disabled by setting the runtime guard ``envoy_reloadable_features_append_xfh_idempotent`` to false.
*
* If set, then a host rewrite action (one of
* :ref:`host_rewrite_literal <envoy_v3_api_field_config.route.v3.RouteAction.host_rewrite_literal>`,
* :ref:`auto_host_rewrite <envoy_v3_api_field_config.route.v3.RouteAction.auto_host_rewrite>`,
* :ref:`host_rewrite_header <envoy_v3_api_field_config.route.v3.RouteAction.host_rewrite_header>`, or
* :ref:`host_rewrite_path_regex <envoy_v3_api_field_config.route.v3.RouteAction.host_rewrite_path_regex>`)
* causes the original value of the host header, if any, to be appended to the
* :ref:`config_http_conn_man_headers_x-forwarded-host` HTTP header if it is different to the last value appended.
* This can be disabled by setting the runtime guard ``envoy_reloadable_features_append_xfh_idempotent`` to false.
*
*
* bool append_x_forwarded_host = 38;
* @param value The appendXForwardedHost to set.
* @return This builder for chaining.
*/
public Builder setAppendXForwardedHost(boolean value) {
appendXForwardedHost_ = value;
onChanged();
return this;
}
/**
*
* If set, then a host rewrite action (one of
* :ref:`host_rewrite_literal <envoy_v3_api_field_config.route.v3.RouteAction.host_rewrite_literal>`,
* :ref:`auto_host_rewrite <envoy_v3_api_field_config.route.v3.RouteAction.auto_host_rewrite>`,
* :ref:`host_rewrite_header <envoy_v3_api_field_config.route.v3.RouteAction.host_rewrite_header>`, or
* :ref:`host_rewrite_path_regex <envoy_v3_api_field_config.route.v3.RouteAction.host_rewrite_path_regex>`)
* causes the original value of the host header, if any, to be appended to the
* :ref:`config_http_conn_man_headers_x-forwarded-host` HTTP header if it is different to the last value appended.
* This can be disabled by setting the runtime guard ``envoy_reloadable_features_append_xfh_idempotent`` to false.
*
* Specifies the upstream timeout for the route. If not specified, the default is 15s. This
* spans between the point at which the entire downstream request (i.e. end-of-stream) has been
* processed and when the upstream response has been completely processed. A value of 0 will
* disable the route's timeout.
* .. note::
* This timeout includes all retries. See also
* :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`,
* :ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms`, and the
* :ref:`retry overview <arch_overview_http_routing_retry>`.
*
*
* .google.protobuf.Duration timeout = 8;
* @return Whether the timeout field is set.
*/
public boolean hasTimeout() {
return timeoutBuilder_ != null || timeout_ != null;
}
/**
*
* Specifies the upstream timeout for the route. If not specified, the default is 15s. This
* spans between the point at which the entire downstream request (i.e. end-of-stream) has been
* processed and when the upstream response has been completely processed. A value of 0 will
* disable the route's timeout.
* .. note::
* This timeout includes all retries. See also
* :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`,
* :ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms`, and the
* :ref:`retry overview <arch_overview_http_routing_retry>`.
*
* Specifies the upstream timeout for the route. If not specified, the default is 15s. This
* spans between the point at which the entire downstream request (i.e. end-of-stream) has been
* processed and when the upstream response has been completely processed. A value of 0 will
* disable the route's timeout.
* .. note::
* This timeout includes all retries. See also
* :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`,
* :ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms`, and the
* :ref:`retry overview <arch_overview_http_routing_retry>`.
*
*
* .google.protobuf.Duration timeout = 8;
*/
public Builder setTimeout(com.google.protobuf.Duration value) {
if (timeoutBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
timeout_ = value;
onChanged();
} else {
timeoutBuilder_.setMessage(value);
}
return this;
}
/**
*
* Specifies the upstream timeout for the route. If not specified, the default is 15s. This
* spans between the point at which the entire downstream request (i.e. end-of-stream) has been
* processed and when the upstream response has been completely processed. A value of 0 will
* disable the route's timeout.
* .. note::
* This timeout includes all retries. See also
* :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`,
* :ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms`, and the
* :ref:`retry overview <arch_overview_http_routing_retry>`.
*
* Specifies the upstream timeout for the route. If not specified, the default is 15s. This
* spans between the point at which the entire downstream request (i.e. end-of-stream) has been
* processed and when the upstream response has been completely processed. A value of 0 will
* disable the route's timeout.
* .. note::
* This timeout includes all retries. See also
* :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`,
* :ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms`, and the
* :ref:`retry overview <arch_overview_http_routing_retry>`.
*
* Specifies the upstream timeout for the route. If not specified, the default is 15s. This
* spans between the point at which the entire downstream request (i.e. end-of-stream) has been
* processed and when the upstream response has been completely processed. A value of 0 will
* disable the route's timeout.
* .. note::
* This timeout includes all retries. See also
* :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`,
* :ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms`, and the
* :ref:`retry overview <arch_overview_http_routing_retry>`.
*
* Specifies the upstream timeout for the route. If not specified, the default is 15s. This
* spans between the point at which the entire downstream request (i.e. end-of-stream) has been
* processed and when the upstream response has been completely processed. A value of 0 will
* disable the route's timeout.
* .. note::
* This timeout includes all retries. See also
* :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`,
* :ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms`, and the
* :ref:`retry overview <arch_overview_http_routing_retry>`.
*
* Specifies the upstream timeout for the route. If not specified, the default is 15s. This
* spans between the point at which the entire downstream request (i.e. end-of-stream) has been
* processed and when the upstream response has been completely processed. A value of 0 will
* disable the route's timeout.
* .. note::
* This timeout includes all retries. See also
* :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`,
* :ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms`, and the
* :ref:`retry overview <arch_overview_http_routing_retry>`.
*
* Specifies the upstream timeout for the route. If not specified, the default is 15s. This
* spans between the point at which the entire downstream request (i.e. end-of-stream) has been
* processed and when the upstream response has been completely processed. A value of 0 will
* disable the route's timeout.
* .. note::
* This timeout includes all retries. See also
* :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`,
* :ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms`, and the
* :ref:`retry overview <arch_overview_http_routing_retry>`.
*
* Specifies the idle timeout for the route. If not specified, there is no per-route idle timeout,
* although the connection manager wide :ref:`stream_idle_timeout
* <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.stream_idle_timeout>`
* will still apply. A value of 0 will completely disable the route's idle timeout, even if a
* connection manager stream idle timeout is configured.
* The idle timeout is distinct to :ref:`timeout
* <envoy_v3_api_field_config.route.v3.RouteAction.timeout>`, which provides an upper bound
* on the upstream response time; :ref:`idle_timeout
* <envoy_v3_api_field_config.route.v3.RouteAction.idle_timeout>` instead bounds the amount
* of time the request's stream may be idle.
* After header decoding, the idle timeout will apply on downstream and
* upstream request events. Each time an encode/decode event for headers or
* data is processed for the stream, the timer will be reset. If the timeout
* fires, the stream is terminated with a 408 Request Timeout error code if no
* upstream response header has been received, otherwise a stream reset
* occurs.
* If the :ref:`overload action <config_overload_manager_overload_actions>` "envoy.overload_actions.reduce_timeouts"
* is configured, this timeout is scaled according to the value for
* :ref:`HTTP_DOWNSTREAM_STREAM_IDLE <envoy_v3_api_enum_value_config.overload.v3.ScaleTimersOverloadActionConfig.TimerType.HTTP_DOWNSTREAM_STREAM_IDLE>`.
*
*
* .google.protobuf.Duration idle_timeout = 24;
* @return Whether the idleTimeout field is set.
*/
public boolean hasIdleTimeout() {
return idleTimeoutBuilder_ != null || idleTimeout_ != null;
}
/**
*
* Specifies the idle timeout for the route. If not specified, there is no per-route idle timeout,
* although the connection manager wide :ref:`stream_idle_timeout
* <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.stream_idle_timeout>`
* will still apply. A value of 0 will completely disable the route's idle timeout, even if a
* connection manager stream idle timeout is configured.
* The idle timeout is distinct to :ref:`timeout
* <envoy_v3_api_field_config.route.v3.RouteAction.timeout>`, which provides an upper bound
* on the upstream response time; :ref:`idle_timeout
* <envoy_v3_api_field_config.route.v3.RouteAction.idle_timeout>` instead bounds the amount
* of time the request's stream may be idle.
* After header decoding, the idle timeout will apply on downstream and
* upstream request events. Each time an encode/decode event for headers or
* data is processed for the stream, the timer will be reset. If the timeout
* fires, the stream is terminated with a 408 Request Timeout error code if no
* upstream response header has been received, otherwise a stream reset
* occurs.
* If the :ref:`overload action <config_overload_manager_overload_actions>` "envoy.overload_actions.reduce_timeouts"
* is configured, this timeout is scaled according to the value for
* :ref:`HTTP_DOWNSTREAM_STREAM_IDLE <envoy_v3_api_enum_value_config.overload.v3.ScaleTimersOverloadActionConfig.TimerType.HTTP_DOWNSTREAM_STREAM_IDLE>`.
*
* Specifies the idle timeout for the route. If not specified, there is no per-route idle timeout,
* although the connection manager wide :ref:`stream_idle_timeout
* <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.stream_idle_timeout>`
* will still apply. A value of 0 will completely disable the route's idle timeout, even if a
* connection manager stream idle timeout is configured.
* The idle timeout is distinct to :ref:`timeout
* <envoy_v3_api_field_config.route.v3.RouteAction.timeout>`, which provides an upper bound
* on the upstream response time; :ref:`idle_timeout
* <envoy_v3_api_field_config.route.v3.RouteAction.idle_timeout>` instead bounds the amount
* of time the request's stream may be idle.
* After header decoding, the idle timeout will apply on downstream and
* upstream request events. Each time an encode/decode event for headers or
* data is processed for the stream, the timer will be reset. If the timeout
* fires, the stream is terminated with a 408 Request Timeout error code if no
* upstream response header has been received, otherwise a stream reset
* occurs.
* If the :ref:`overload action <config_overload_manager_overload_actions>` "envoy.overload_actions.reduce_timeouts"
* is configured, this timeout is scaled according to the value for
* :ref:`HTTP_DOWNSTREAM_STREAM_IDLE <envoy_v3_api_enum_value_config.overload.v3.ScaleTimersOverloadActionConfig.TimerType.HTTP_DOWNSTREAM_STREAM_IDLE>`.
*
*
* .google.protobuf.Duration idle_timeout = 24;
*/
public Builder setIdleTimeout(com.google.protobuf.Duration value) {
if (idleTimeoutBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
idleTimeout_ = value;
onChanged();
} else {
idleTimeoutBuilder_.setMessage(value);
}
return this;
}
/**
*
* Specifies the idle timeout for the route. If not specified, there is no per-route idle timeout,
* although the connection manager wide :ref:`stream_idle_timeout
* <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.stream_idle_timeout>`
* will still apply. A value of 0 will completely disable the route's idle timeout, even if a
* connection manager stream idle timeout is configured.
* The idle timeout is distinct to :ref:`timeout
* <envoy_v3_api_field_config.route.v3.RouteAction.timeout>`, which provides an upper bound
* on the upstream response time; :ref:`idle_timeout
* <envoy_v3_api_field_config.route.v3.RouteAction.idle_timeout>` instead bounds the amount
* of time the request's stream may be idle.
* After header decoding, the idle timeout will apply on downstream and
* upstream request events. Each time an encode/decode event for headers or
* data is processed for the stream, the timer will be reset. If the timeout
* fires, the stream is terminated with a 408 Request Timeout error code if no
* upstream response header has been received, otherwise a stream reset
* occurs.
* If the :ref:`overload action <config_overload_manager_overload_actions>` "envoy.overload_actions.reduce_timeouts"
* is configured, this timeout is scaled according to the value for
* :ref:`HTTP_DOWNSTREAM_STREAM_IDLE <envoy_v3_api_enum_value_config.overload.v3.ScaleTimersOverloadActionConfig.TimerType.HTTP_DOWNSTREAM_STREAM_IDLE>`.
*
* Specifies the idle timeout for the route. If not specified, there is no per-route idle timeout,
* although the connection manager wide :ref:`stream_idle_timeout
* <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.stream_idle_timeout>`
* will still apply. A value of 0 will completely disable the route's idle timeout, even if a
* connection manager stream idle timeout is configured.
* The idle timeout is distinct to :ref:`timeout
* <envoy_v3_api_field_config.route.v3.RouteAction.timeout>`, which provides an upper bound
* on the upstream response time; :ref:`idle_timeout
* <envoy_v3_api_field_config.route.v3.RouteAction.idle_timeout>` instead bounds the amount
* of time the request's stream may be idle.
* After header decoding, the idle timeout will apply on downstream and
* upstream request events. Each time an encode/decode event for headers or
* data is processed for the stream, the timer will be reset. If the timeout
* fires, the stream is terminated with a 408 Request Timeout error code if no
* upstream response header has been received, otherwise a stream reset
* occurs.
* If the :ref:`overload action <config_overload_manager_overload_actions>` "envoy.overload_actions.reduce_timeouts"
* is configured, this timeout is scaled according to the value for
* :ref:`HTTP_DOWNSTREAM_STREAM_IDLE <envoy_v3_api_enum_value_config.overload.v3.ScaleTimersOverloadActionConfig.TimerType.HTTP_DOWNSTREAM_STREAM_IDLE>`.
*
* Specifies the idle timeout for the route. If not specified, there is no per-route idle timeout,
* although the connection manager wide :ref:`stream_idle_timeout
* <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.stream_idle_timeout>`
* will still apply. A value of 0 will completely disable the route's idle timeout, even if a
* connection manager stream idle timeout is configured.
* The idle timeout is distinct to :ref:`timeout
* <envoy_v3_api_field_config.route.v3.RouteAction.timeout>`, which provides an upper bound
* on the upstream response time; :ref:`idle_timeout
* <envoy_v3_api_field_config.route.v3.RouteAction.idle_timeout>` instead bounds the amount
* of time the request's stream may be idle.
* After header decoding, the idle timeout will apply on downstream and
* upstream request events. Each time an encode/decode event for headers or
* data is processed for the stream, the timer will be reset. If the timeout
* fires, the stream is terminated with a 408 Request Timeout error code if no
* upstream response header has been received, otherwise a stream reset
* occurs.
* If the :ref:`overload action <config_overload_manager_overload_actions>` "envoy.overload_actions.reduce_timeouts"
* is configured, this timeout is scaled according to the value for
* :ref:`HTTP_DOWNSTREAM_STREAM_IDLE <envoy_v3_api_enum_value_config.overload.v3.ScaleTimersOverloadActionConfig.TimerType.HTTP_DOWNSTREAM_STREAM_IDLE>`.
*
* Specifies the idle timeout for the route. If not specified, there is no per-route idle timeout,
* although the connection manager wide :ref:`stream_idle_timeout
* <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.stream_idle_timeout>`
* will still apply. A value of 0 will completely disable the route's idle timeout, even if a
* connection manager stream idle timeout is configured.
* The idle timeout is distinct to :ref:`timeout
* <envoy_v3_api_field_config.route.v3.RouteAction.timeout>`, which provides an upper bound
* on the upstream response time; :ref:`idle_timeout
* <envoy_v3_api_field_config.route.v3.RouteAction.idle_timeout>` instead bounds the amount
* of time the request's stream may be idle.
* After header decoding, the idle timeout will apply on downstream and
* upstream request events. Each time an encode/decode event for headers or
* data is processed for the stream, the timer will be reset. If the timeout
* fires, the stream is terminated with a 408 Request Timeout error code if no
* upstream response header has been received, otherwise a stream reset
* occurs.
* If the :ref:`overload action <config_overload_manager_overload_actions>` "envoy.overload_actions.reduce_timeouts"
* is configured, this timeout is scaled according to the value for
* :ref:`HTTP_DOWNSTREAM_STREAM_IDLE <envoy_v3_api_enum_value_config.overload.v3.ScaleTimersOverloadActionConfig.TimerType.HTTP_DOWNSTREAM_STREAM_IDLE>`.
*
* Specifies the idle timeout for the route. If not specified, there is no per-route idle timeout,
* although the connection manager wide :ref:`stream_idle_timeout
* <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.stream_idle_timeout>`
* will still apply. A value of 0 will completely disable the route's idle timeout, even if a
* connection manager stream idle timeout is configured.
* The idle timeout is distinct to :ref:`timeout
* <envoy_v3_api_field_config.route.v3.RouteAction.timeout>`, which provides an upper bound
* on the upstream response time; :ref:`idle_timeout
* <envoy_v3_api_field_config.route.v3.RouteAction.idle_timeout>` instead bounds the amount
* of time the request's stream may be idle.
* After header decoding, the idle timeout will apply on downstream and
* upstream request events. Each time an encode/decode event for headers or
* data is processed for the stream, the timer will be reset. If the timeout
* fires, the stream is terminated with a 408 Request Timeout error code if no
* upstream response header has been received, otherwise a stream reset
* occurs.
* If the :ref:`overload action <config_overload_manager_overload_actions>` "envoy.overload_actions.reduce_timeouts"
* is configured, this timeout is scaled according to the value for
* :ref:`HTTP_DOWNSTREAM_STREAM_IDLE <envoy_v3_api_enum_value_config.overload.v3.ScaleTimersOverloadActionConfig.TimerType.HTTP_DOWNSTREAM_STREAM_IDLE>`.
*
* Specifies the idle timeout for the route. If not specified, there is no per-route idle timeout,
* although the connection manager wide :ref:`stream_idle_timeout
* <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.stream_idle_timeout>`
* will still apply. A value of 0 will completely disable the route's idle timeout, even if a
* connection manager stream idle timeout is configured.
* The idle timeout is distinct to :ref:`timeout
* <envoy_v3_api_field_config.route.v3.RouteAction.timeout>`, which provides an upper bound
* on the upstream response time; :ref:`idle_timeout
* <envoy_v3_api_field_config.route.v3.RouteAction.idle_timeout>` instead bounds the amount
* of time the request's stream may be idle.
* After header decoding, the idle timeout will apply on downstream and
* upstream request events. Each time an encode/decode event for headers or
* data is processed for the stream, the timer will be reset. If the timeout
* fires, the stream is terminated with a 408 Request Timeout error code if no
* upstream response header has been received, otherwise a stream reset
* occurs.
* If the :ref:`overload action <config_overload_manager_overload_actions>` "envoy.overload_actions.reduce_timeouts"
* is configured, this timeout is scaled according to the value for
* :ref:`HTTP_DOWNSTREAM_STREAM_IDLE <envoy_v3_api_enum_value_config.overload.v3.ScaleTimersOverloadActionConfig.TimerType.HTTP_DOWNSTREAM_STREAM_IDLE>`.
*
* Specifies how to send request over TLS early data.
* If absent, allows `safe HTTP requests <https://www.rfc-editor.org/rfc/rfc7231#section-4.2.1>`_ to be sent on early data.
* [#extension-category: envoy.route.early_data_policy]
*
*
* .envoy.config.core.v3.TypedExtensionConfig early_data_policy = 40;
* @return Whether the earlyDataPolicy field is set.
*/
public boolean hasEarlyDataPolicy() {
return earlyDataPolicyBuilder_ != null || earlyDataPolicy_ != null;
}
/**
*
* Specifies how to send request over TLS early data.
* If absent, allows `safe HTTP requests <https://www.rfc-editor.org/rfc/rfc7231#section-4.2.1>`_ to be sent on early data.
* [#extension-category: envoy.route.early_data_policy]
*
* Specifies how to send request over TLS early data.
* If absent, allows `safe HTTP requests <https://www.rfc-editor.org/rfc/rfc7231#section-4.2.1>`_ to be sent on early data.
* [#extension-category: envoy.route.early_data_policy]
*
*
* .envoy.config.core.v3.TypedExtensionConfig early_data_policy = 40;
*/
public Builder setEarlyDataPolicy(io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig value) {
if (earlyDataPolicyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
earlyDataPolicy_ = value;
onChanged();
} else {
earlyDataPolicyBuilder_.setMessage(value);
}
return this;
}
/**
*
* Specifies how to send request over TLS early data.
* If absent, allows `safe HTTP requests <https://www.rfc-editor.org/rfc/rfc7231#section-4.2.1>`_ to be sent on early data.
* [#extension-category: envoy.route.early_data_policy]
*
* Specifies how to send request over TLS early data.
* If absent, allows `safe HTTP requests <https://www.rfc-editor.org/rfc/rfc7231#section-4.2.1>`_ to be sent on early data.
* [#extension-category: envoy.route.early_data_policy]
*
* Specifies how to send request over TLS early data.
* If absent, allows `safe HTTP requests <https://www.rfc-editor.org/rfc/rfc7231#section-4.2.1>`_ to be sent on early data.
* [#extension-category: envoy.route.early_data_policy]
*
* Specifies how to send request over TLS early data.
* If absent, allows `safe HTTP requests <https://www.rfc-editor.org/rfc/rfc7231#section-4.2.1>`_ to be sent on early data.
* [#extension-category: envoy.route.early_data_policy]
*
* Specifies how to send request over TLS early data.
* If absent, allows `safe HTTP requests <https://www.rfc-editor.org/rfc/rfc7231#section-4.2.1>`_ to be sent on early data.
* [#extension-category: envoy.route.early_data_policy]
*
* Specifies how to send request over TLS early data.
* If absent, allows `safe HTTP requests <https://www.rfc-editor.org/rfc/rfc7231#section-4.2.1>`_ to be sent on early data.
* [#extension-category: envoy.route.early_data_policy]
*
* Indicates that the route has a retry policy. Note that if this is set,
* it'll take precedence over the virtual host level retry policy entirely
* (e.g.: policies are not merged, most internal one becomes the enforced policy).
*
*
* .envoy.config.route.v3.RetryPolicy retry_policy = 9;
* @return Whether the retryPolicy field is set.
*/
public boolean hasRetryPolicy() {
return retryPolicyBuilder_ != null || retryPolicy_ != null;
}
/**
*
* Indicates that the route has a retry policy. Note that if this is set,
* it'll take precedence over the virtual host level retry policy entirely
* (e.g.: policies are not merged, most internal one becomes the enforced policy).
*
* Indicates that the route has a retry policy. Note that if this is set,
* it'll take precedence over the virtual host level retry policy entirely
* (e.g.: policies are not merged, most internal one becomes the enforced policy).
*
*
* .envoy.config.route.v3.RetryPolicy retry_policy = 9;
*/
public Builder setRetryPolicy(io.envoyproxy.envoy.config.route.v3.RetryPolicy value) {
if (retryPolicyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
retryPolicy_ = value;
onChanged();
} else {
retryPolicyBuilder_.setMessage(value);
}
return this;
}
/**
*
* Indicates that the route has a retry policy. Note that if this is set,
* it'll take precedence over the virtual host level retry policy entirely
* (e.g.: policies are not merged, most internal one becomes the enforced policy).
*
* Indicates that the route has a retry policy. Note that if this is set,
* it'll take precedence over the virtual host level retry policy entirely
* (e.g.: policies are not merged, most internal one becomes the enforced policy).
*
* Indicates that the route has a retry policy. Note that if this is set,
* it'll take precedence over the virtual host level retry policy entirely
* (e.g.: policies are not merged, most internal one becomes the enforced policy).
*
* Indicates that the route has a retry policy. Note that if this is set,
* it'll take precedence over the virtual host level retry policy entirely
* (e.g.: policies are not merged, most internal one becomes the enforced policy).
*
* Indicates that the route has a retry policy. Note that if this is set,
* it'll take precedence over the virtual host level retry policy entirely
* (e.g.: policies are not merged, most internal one becomes the enforced policy).
*
* Indicates that the route has a retry policy. Note that if this is set,
* it'll take precedence over the virtual host level retry policy entirely
* (e.g.: policies are not merged, most internal one becomes the enforced policy).
*
* [#not-implemented-hide:]
* Specifies the configuration for retry policy extension. Note that if this is set, it'll take
* precedence over the virtual host level retry policy entirely (e.g.: policies are not merged,
* most internal one becomes the enforced policy). :ref:`Retry policy <envoy_v3_api_field_config.route.v3.VirtualHost.retry_policy>`
* should not be set if this field is used.
*
*
* .google.protobuf.Any retry_policy_typed_config = 33;
* @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 if this is set, it'll take
* precedence over the virtual host level retry policy entirely (e.g.: policies are not merged,
* most internal one becomes the enforced policy). :ref:`Retry policy <envoy_v3_api_field_config.route.v3.VirtualHost.retry_policy>`
* should not be set if this field is used.
*
* [#not-implemented-hide:]
* Specifies the configuration for retry policy extension. Note that if this is set, it'll take
* precedence over the virtual host level retry policy entirely (e.g.: policies are not merged,
* most internal one becomes the enforced policy). :ref:`Retry policy <envoy_v3_api_field_config.route.v3.VirtualHost.retry_policy>`
* should not be set if this field is used.
*
*
* .google.protobuf.Any retry_policy_typed_config = 33;
*/
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 if this is set, it'll take
* precedence over the virtual host level retry policy entirely (e.g.: policies are not merged,
* most internal one becomes the enforced policy). :ref:`Retry policy <envoy_v3_api_field_config.route.v3.VirtualHost.retry_policy>`
* should not be set if this field is used.
*
* [#not-implemented-hide:]
* Specifies the configuration for retry policy extension. Note that if this is set, it'll take
* precedence over the virtual host level retry policy entirely (e.g.: policies are not merged,
* most internal one becomes the enforced policy). :ref:`Retry policy <envoy_v3_api_field_config.route.v3.VirtualHost.retry_policy>`
* should not be set if this field is used.
*
* [#not-implemented-hide:]
* Specifies the configuration for retry policy extension. Note that if this is set, it'll take
* precedence over the virtual host level retry policy entirely (e.g.: policies are not merged,
* most internal one becomes the enforced policy). :ref:`Retry policy <envoy_v3_api_field_config.route.v3.VirtualHost.retry_policy>`
* should not be set if this field is used.
*
* [#not-implemented-hide:]
* Specifies the configuration for retry policy extension. Note that if this is set, it'll take
* precedence over the virtual host level retry policy entirely (e.g.: policies are not merged,
* most internal one becomes the enforced policy). :ref:`Retry policy <envoy_v3_api_field_config.route.v3.VirtualHost.retry_policy>`
* should not be set if this field is used.
*
* [#not-implemented-hide:]
* Specifies the configuration for retry policy extension. Note that if this is set, it'll take
* precedence over the virtual host level retry policy entirely (e.g.: policies are not merged,
* most internal one becomes the enforced policy). :ref:`Retry policy <envoy_v3_api_field_config.route.v3.VirtualHost.retry_policy>`
* should not be set if this field is used.
*
* [#not-implemented-hide:]
* Specifies the configuration for retry policy extension. Note that if this is set, it'll take
* precedence over the virtual host level retry policy entirely (e.g.: policies are not merged,
* most internal one becomes the enforced policy). :ref:`Retry policy <envoy_v3_api_field_config.route.v3.VirtualHost.retry_policy>`
* should not be set if this field is used.
*
* Specify a set of route request mirroring policies.
* It takes precedence over the virtual host and route config mirror policy entirely.
* That is, policies are not merged, the most specific non-empty one becomes the mirror policies.
*
* Specify a set of route request mirroring policies.
* It takes precedence over the virtual host and route config mirror policy entirely.
* That is, policies are not merged, the most specific non-empty one becomes the mirror policies.
*
*
* repeated .envoy.config.route.v3.RouteAction.RequestMirrorPolicy request_mirror_policies = 30;
*/
public int getRequestMirrorPoliciesCount() {
if (requestMirrorPoliciesBuilder_ == null) {
return requestMirrorPolicies_.size();
} else {
return requestMirrorPoliciesBuilder_.getCount();
}
}
/**
*
* Specify a set of route request mirroring policies.
* It takes precedence over the virtual host and route config mirror policy entirely.
* That is, policies are not merged, the most specific non-empty one becomes the mirror policies.
*
* Specify a set of route request mirroring policies.
* It takes precedence over the virtual host and route config mirror policy entirely.
* That is, policies are not merged, the most specific non-empty one becomes the mirror policies.
*
*
* repeated .envoy.config.route.v3.RouteAction.RequestMirrorPolicy request_mirror_policies = 30;
*/
public Builder setRequestMirrorPolicies(
int index, io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy value) {
if (requestMirrorPoliciesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRequestMirrorPoliciesIsMutable();
requestMirrorPolicies_.set(index, value);
onChanged();
} else {
requestMirrorPoliciesBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Specify a set of route request mirroring policies.
* It takes precedence over the virtual host and route config mirror policy entirely.
* That is, policies are not merged, the most specific non-empty one becomes the mirror policies.
*
* Specify a set of route request mirroring policies.
* It takes precedence over the virtual host and route config mirror policy entirely.
* That is, policies are not merged, the most specific non-empty one becomes the mirror policies.
*
*
* repeated .envoy.config.route.v3.RouteAction.RequestMirrorPolicy request_mirror_policies = 30;
*/
public Builder addRequestMirrorPolicies(io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy value) {
if (requestMirrorPoliciesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRequestMirrorPoliciesIsMutable();
requestMirrorPolicies_.add(value);
onChanged();
} else {
requestMirrorPoliciesBuilder_.addMessage(value);
}
return this;
}
/**
*
* Specify a set of route request mirroring policies.
* It takes precedence over the virtual host and route config mirror policy entirely.
* That is, policies are not merged, the most specific non-empty one becomes the mirror policies.
*
*
* repeated .envoy.config.route.v3.RouteAction.RequestMirrorPolicy request_mirror_policies = 30;
*/
public Builder addRequestMirrorPolicies(
int index, io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy value) {
if (requestMirrorPoliciesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRequestMirrorPoliciesIsMutable();
requestMirrorPolicies_.add(index, value);
onChanged();
} else {
requestMirrorPoliciesBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Specify a set of route request mirroring policies.
* It takes precedence over the virtual host and route config mirror policy entirely.
* That is, policies are not merged, the most specific non-empty one becomes the mirror policies.
*
* Specify a set of route request mirroring policies.
* It takes precedence over the virtual host and route config mirror policy entirely.
* That is, policies are not merged, the most specific non-empty one becomes the mirror policies.
*
* Specify a set of route request mirroring policies.
* It takes precedence over the virtual host and route config mirror policy entirely.
* That is, policies are not merged, the most specific non-empty one becomes the mirror policies.
*
* Specify a set of route request mirroring policies.
* It takes precedence over the virtual host and route config mirror policy entirely.
* That is, policies are not merged, the most specific non-empty one becomes the mirror policies.
*
* Specify a set of route request mirroring policies.
* It takes precedence over the virtual host and route config mirror policy entirely.
* That is, policies are not merged, the most specific non-empty one becomes the mirror policies.
*
* Specify a set of route request mirroring policies.
* It takes precedence over the virtual host and route config mirror policy entirely.
* That is, policies are not merged, the most specific non-empty one becomes the mirror policies.
*
*
* repeated .envoy.config.route.v3.RouteAction.RequestMirrorPolicy request_mirror_policies = 30;
*/
public io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy.Builder getRequestMirrorPoliciesBuilder(
int index) {
return getRequestMirrorPoliciesFieldBuilder().getBuilder(index);
}
/**
*
* Specify a set of route request mirroring policies.
* It takes precedence over the virtual host and route config mirror policy entirely.
* That is, policies are not merged, the most specific non-empty one becomes the mirror policies.
*
*
* repeated .envoy.config.route.v3.RouteAction.RequestMirrorPolicy request_mirror_policies = 30;
*/
public io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicyOrBuilder getRequestMirrorPoliciesOrBuilder(
int index) {
if (requestMirrorPoliciesBuilder_ == null) {
return requestMirrorPolicies_.get(index); } else {
return requestMirrorPoliciesBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Specify a set of route request mirroring policies.
* It takes precedence over the virtual host and route config mirror policy entirely.
* That is, policies are not merged, the most specific non-empty one becomes the mirror policies.
*
* Specify a set of route request mirroring policies.
* It takes precedence over the virtual host and route config mirror policy entirely.
* That is, policies are not merged, the most specific non-empty one becomes the mirror policies.
*
* Specify a set of route request mirroring policies.
* It takes precedence over the virtual host and route config mirror policy entirely.
* That is, policies are not merged, the most specific non-empty one becomes the mirror policies.
*
* Specify a set of route request mirroring policies.
* It takes precedence over the virtual host and route config mirror policy entirely.
* That is, policies are not merged, the most specific non-empty one becomes the mirror policies.
*
* Optionally specifies the :ref:`routing priority <arch_overview_http_routing_priority>`.
*
*
* .envoy.config.core.v3.RoutingPriority priority = 11 [(.validate.rules) = { ... }
* @return The enum numeric value on the wire for priority.
*/
@java.lang.Override public int getPriorityValue() {
return priority_;
}
/**
*
* Optionally specifies the :ref:`routing priority <arch_overview_http_routing_priority>`.
*
*
* .envoy.config.core.v3.RoutingPriority priority = 11 [(.validate.rules) = { ... }
* @param value The enum numeric value on the wire for priority to set.
* @return This builder for chaining.
*/
public Builder setPriorityValue(int value) {
priority_ = value;
onChanged();
return this;
}
/**
*
* Optionally specifies the :ref:`routing priority <arch_overview_http_routing_priority>`.
*
*
* .envoy.config.core.v3.RoutingPriority priority = 11 [(.validate.rules) = { ... }
* @return The priority.
*/
@java.lang.Override
public io.envoyproxy.envoy.config.core.v3.RoutingPriority getPriority() {
@SuppressWarnings("deprecation")
io.envoyproxy.envoy.config.core.v3.RoutingPriority result = io.envoyproxy.envoy.config.core.v3.RoutingPriority.valueOf(priority_);
return result == null ? io.envoyproxy.envoy.config.core.v3.RoutingPriority.UNRECOGNIZED : result;
}
/**
*
* Optionally specifies the :ref:`routing priority <arch_overview_http_routing_priority>`.
*
*
* .envoy.config.core.v3.RoutingPriority priority = 11 [(.validate.rules) = { ... }
* @param value The priority to set.
* @return This builder for chaining.
*/
public Builder setPriority(io.envoyproxy.envoy.config.core.v3.RoutingPriority value) {
if (value == null) {
throw new NullPointerException();
}
priority_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Optionally specifies the :ref:`routing priority <arch_overview_http_routing_priority>`.
*
* Specifies if the rate limit filter should include the virtual host rate
* limits. By default, if the route configured rate limits, the virtual host
* :ref:`rate_limits <envoy_v3_api_field_config.route.v3.VirtualHost.rate_limits>` are not applied to the
* request.
* This field is deprecated. Please use :ref:`vh_rate_limits <envoy_v3_api_field_extensions.filters.http.ratelimit.v3.RateLimitPerRoute.vh_rate_limits>`
*
*
* .google.protobuf.BoolValue include_vh_rate_limits = 14 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"];
* @deprecated envoy.config.route.v3.RouteAction.include_vh_rate_limits is deprecated.
* See envoy/config/route/v3/route_components.proto;l=1288
* @return Whether the includeVhRateLimits field is set.
*/
@java.lang.Deprecated public boolean hasIncludeVhRateLimits() {
return includeVhRateLimitsBuilder_ != null || includeVhRateLimits_ != null;
}
/**
*
* Specifies if the rate limit filter should include the virtual host rate
* limits. By default, if the route configured rate limits, the virtual host
* :ref:`rate_limits <envoy_v3_api_field_config.route.v3.VirtualHost.rate_limits>` are not applied to the
* request.
* This field is deprecated. Please use :ref:`vh_rate_limits <envoy_v3_api_field_extensions.filters.http.ratelimit.v3.RateLimitPerRoute.vh_rate_limits>`
*
* Specifies if the rate limit filter should include the virtual host rate
* limits. By default, if the route configured rate limits, the virtual host
* :ref:`rate_limits <envoy_v3_api_field_config.route.v3.VirtualHost.rate_limits>` are not applied to the
* request.
* This field is deprecated. Please use :ref:`vh_rate_limits <envoy_v3_api_field_extensions.filters.http.ratelimit.v3.RateLimitPerRoute.vh_rate_limits>`
*
* Specifies if the rate limit filter should include the virtual host rate
* limits. By default, if the route configured rate limits, the virtual host
* :ref:`rate_limits <envoy_v3_api_field_config.route.v3.VirtualHost.rate_limits>` are not applied to the
* request.
* This field is deprecated. Please use :ref:`vh_rate_limits <envoy_v3_api_field_extensions.filters.http.ratelimit.v3.RateLimitPerRoute.vh_rate_limits>`
*
* Specifies if the rate limit filter should include the virtual host rate
* limits. By default, if the route configured rate limits, the virtual host
* :ref:`rate_limits <envoy_v3_api_field_config.route.v3.VirtualHost.rate_limits>` are not applied to the
* request.
* This field is deprecated. Please use :ref:`vh_rate_limits <envoy_v3_api_field_extensions.filters.http.ratelimit.v3.RateLimitPerRoute.vh_rate_limits>`
*
* Specifies if the rate limit filter should include the virtual host rate
* limits. By default, if the route configured rate limits, the virtual host
* :ref:`rate_limits <envoy_v3_api_field_config.route.v3.VirtualHost.rate_limits>` are not applied to the
* request.
* This field is deprecated. Please use :ref:`vh_rate_limits <envoy_v3_api_field_extensions.filters.http.ratelimit.v3.RateLimitPerRoute.vh_rate_limits>`
*
* Specifies if the rate limit filter should include the virtual host rate
* limits. By default, if the route configured rate limits, the virtual host
* :ref:`rate_limits <envoy_v3_api_field_config.route.v3.VirtualHost.rate_limits>` are not applied to the
* request.
* This field is deprecated. Please use :ref:`vh_rate_limits <envoy_v3_api_field_extensions.filters.http.ratelimit.v3.RateLimitPerRoute.vh_rate_limits>`
*
* Specifies if the rate limit filter should include the virtual host rate
* limits. By default, if the route configured rate limits, the virtual host
* :ref:`rate_limits <envoy_v3_api_field_config.route.v3.VirtualHost.rate_limits>` are not applied to the
* request.
* This field is deprecated. Please use :ref:`vh_rate_limits <envoy_v3_api_field_extensions.filters.http.ratelimit.v3.RateLimitPerRoute.vh_rate_limits>`
*
* Specifies if the rate limit filter should include the virtual host rate
* limits. By default, if the route configured rate limits, the virtual host
* :ref:`rate_limits <envoy_v3_api_field_config.route.v3.VirtualHost.rate_limits>` are not applied to the
* request.
* This field is deprecated. Please use :ref:`vh_rate_limits <envoy_v3_api_field_extensions.filters.http.ratelimit.v3.RateLimitPerRoute.vh_rate_limits>`
*
* Specifies a list of hash policies to use for ring hash load balancing. Each
* hash policy is evaluated individually and the combined result is used to
* route the request. The method of combination is deterministic such that
* identical lists of hash policies will produce the same hash. Since a hash
* policy examines specific parts of a request, it can fail to produce a hash
* (i.e. if the hashed header is not present). If (and only if) all configured
* hash policies fail to generate a hash, no hash will be produced for
* the route. In this case, the behavior is the same as if no hash policies
* were specified (i.e. the ring hash load balancer will choose a random
* backend). If a hash policy has the "terminal" attribute set to true, and
* there is already a hash generated, the hash is returned immediately,
* ignoring the rest of the hash policy list.
*
* Specifies a list of hash policies to use for ring hash load balancing. Each
* hash policy is evaluated individually and the combined result is used to
* route the request. The method of combination is deterministic such that
* identical lists of hash policies will produce the same hash. Since a hash
* policy examines specific parts of a request, it can fail to produce a hash
* (i.e. if the hashed header is not present). If (and only if) all configured
* hash policies fail to generate a hash, no hash will be produced for
* the route. In this case, the behavior is the same as if no hash policies
* were specified (i.e. the ring hash load balancer will choose a random
* backend). If a hash policy has the "terminal" attribute set to true, and
* there is already a hash generated, the hash is returned immediately,
* ignoring the rest of the hash policy list.
*
*
* repeated .envoy.config.route.v3.RouteAction.HashPolicy hash_policy = 15;
*/
public int getHashPolicyCount() {
if (hashPolicyBuilder_ == null) {
return hashPolicy_.size();
} else {
return hashPolicyBuilder_.getCount();
}
}
/**
*
* Specifies a list of hash policies to use for ring hash load balancing. Each
* hash policy is evaluated individually and the combined result is used to
* route the request. The method of combination is deterministic such that
* identical lists of hash policies will produce the same hash. Since a hash
* policy examines specific parts of a request, it can fail to produce a hash
* (i.e. if the hashed header is not present). If (and only if) all configured
* hash policies fail to generate a hash, no hash will be produced for
* the route. In this case, the behavior is the same as if no hash policies
* were specified (i.e. the ring hash load balancer will choose a random
* backend). If a hash policy has the "terminal" attribute set to true, and
* there is already a hash generated, the hash is returned immediately,
* ignoring the rest of the hash policy list.
*
* Specifies a list of hash policies to use for ring hash load balancing. Each
* hash policy is evaluated individually and the combined result is used to
* route the request. The method of combination is deterministic such that
* identical lists of hash policies will produce the same hash. Since a hash
* policy examines specific parts of a request, it can fail to produce a hash
* (i.e. if the hashed header is not present). If (and only if) all configured
* hash policies fail to generate a hash, no hash will be produced for
* the route. In this case, the behavior is the same as if no hash policies
* were specified (i.e. the ring hash load balancer will choose a random
* backend). If a hash policy has the "terminal" attribute set to true, and
* there is already a hash generated, the hash is returned immediately,
* ignoring the rest of the hash policy list.
*
*
* repeated .envoy.config.route.v3.RouteAction.HashPolicy hash_policy = 15;
*/
public Builder setHashPolicy(
int index, io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy value) {
if (hashPolicyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureHashPolicyIsMutable();
hashPolicy_.set(index, value);
onChanged();
} else {
hashPolicyBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Specifies a list of hash policies to use for ring hash load balancing. Each
* hash policy is evaluated individually and the combined result is used to
* route the request. The method of combination is deterministic such that
* identical lists of hash policies will produce the same hash. Since a hash
* policy examines specific parts of a request, it can fail to produce a hash
* (i.e. if the hashed header is not present). If (and only if) all configured
* hash policies fail to generate a hash, no hash will be produced for
* the route. In this case, the behavior is the same as if no hash policies
* were specified (i.e. the ring hash load balancer will choose a random
* backend). If a hash policy has the "terminal" attribute set to true, and
* there is already a hash generated, the hash is returned immediately,
* ignoring the rest of the hash policy list.
*
* Specifies a list of hash policies to use for ring hash load balancing. Each
* hash policy is evaluated individually and the combined result is used to
* route the request. The method of combination is deterministic such that
* identical lists of hash policies will produce the same hash. Since a hash
* policy examines specific parts of a request, it can fail to produce a hash
* (i.e. if the hashed header is not present). If (and only if) all configured
* hash policies fail to generate a hash, no hash will be produced for
* the route. In this case, the behavior is the same as if no hash policies
* were specified (i.e. the ring hash load balancer will choose a random
* backend). If a hash policy has the "terminal" attribute set to true, and
* there is already a hash generated, the hash is returned immediately,
* ignoring the rest of the hash policy list.
*
*
* repeated .envoy.config.route.v3.RouteAction.HashPolicy hash_policy = 15;
*/
public Builder addHashPolicy(io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy value) {
if (hashPolicyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureHashPolicyIsMutable();
hashPolicy_.add(value);
onChanged();
} else {
hashPolicyBuilder_.addMessage(value);
}
return this;
}
/**
*
* Specifies a list of hash policies to use for ring hash load balancing. Each
* hash policy is evaluated individually and the combined result is used to
* route the request. The method of combination is deterministic such that
* identical lists of hash policies will produce the same hash. Since a hash
* policy examines specific parts of a request, it can fail to produce a hash
* (i.e. if the hashed header is not present). If (and only if) all configured
* hash policies fail to generate a hash, no hash will be produced for
* the route. In this case, the behavior is the same as if no hash policies
* were specified (i.e. the ring hash load balancer will choose a random
* backend). If a hash policy has the "terminal" attribute set to true, and
* there is already a hash generated, the hash is returned immediately,
* ignoring the rest of the hash policy list.
*
*
* repeated .envoy.config.route.v3.RouteAction.HashPolicy hash_policy = 15;
*/
public Builder addHashPolicy(
int index, io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy value) {
if (hashPolicyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureHashPolicyIsMutable();
hashPolicy_.add(index, value);
onChanged();
} else {
hashPolicyBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Specifies a list of hash policies to use for ring hash load balancing. Each
* hash policy is evaluated individually and the combined result is used to
* route the request. The method of combination is deterministic such that
* identical lists of hash policies will produce the same hash. Since a hash
* policy examines specific parts of a request, it can fail to produce a hash
* (i.e. if the hashed header is not present). If (and only if) all configured
* hash policies fail to generate a hash, no hash will be produced for
* the route. In this case, the behavior is the same as if no hash policies
* were specified (i.e. the ring hash load balancer will choose a random
* backend). If a hash policy has the "terminal" attribute set to true, and
* there is already a hash generated, the hash is returned immediately,
* ignoring the rest of the hash policy list.
*
* Specifies a list of hash policies to use for ring hash load balancing. Each
* hash policy is evaluated individually and the combined result is used to
* route the request. The method of combination is deterministic such that
* identical lists of hash policies will produce the same hash. Since a hash
* policy examines specific parts of a request, it can fail to produce a hash
* (i.e. if the hashed header is not present). If (and only if) all configured
* hash policies fail to generate a hash, no hash will be produced for
* the route. In this case, the behavior is the same as if no hash policies
* were specified (i.e. the ring hash load balancer will choose a random
* backend). If a hash policy has the "terminal" attribute set to true, and
* there is already a hash generated, the hash is returned immediately,
* ignoring the rest of the hash policy list.
*
* Specifies a list of hash policies to use for ring hash load balancing. Each
* hash policy is evaluated individually and the combined result is used to
* route the request. The method of combination is deterministic such that
* identical lists of hash policies will produce the same hash. Since a hash
* policy examines specific parts of a request, it can fail to produce a hash
* (i.e. if the hashed header is not present). If (and only if) all configured
* hash policies fail to generate a hash, no hash will be produced for
* the route. In this case, the behavior is the same as if no hash policies
* were specified (i.e. the ring hash load balancer will choose a random
* backend). If a hash policy has the "terminal" attribute set to true, and
* there is already a hash generated, the hash is returned immediately,
* ignoring the rest of the hash policy list.
*
* Specifies a list of hash policies to use for ring hash load balancing. Each
* hash policy is evaluated individually and the combined result is used to
* route the request. The method of combination is deterministic such that
* identical lists of hash policies will produce the same hash. Since a hash
* policy examines specific parts of a request, it can fail to produce a hash
* (i.e. if the hashed header is not present). If (and only if) all configured
* hash policies fail to generate a hash, no hash will be produced for
* the route. In this case, the behavior is the same as if no hash policies
* were specified (i.e. the ring hash load balancer will choose a random
* backend). If a hash policy has the "terminal" attribute set to true, and
* there is already a hash generated, the hash is returned immediately,
* ignoring the rest of the hash policy list.
*
* Specifies a list of hash policies to use for ring hash load balancing. Each
* hash policy is evaluated individually and the combined result is used to
* route the request. The method of combination is deterministic such that
* identical lists of hash policies will produce the same hash. Since a hash
* policy examines specific parts of a request, it can fail to produce a hash
* (i.e. if the hashed header is not present). If (and only if) all configured
* hash policies fail to generate a hash, no hash will be produced for
* the route. In this case, the behavior is the same as if no hash policies
* were specified (i.e. the ring hash load balancer will choose a random
* backend). If a hash policy has the "terminal" attribute set to true, and
* there is already a hash generated, the hash is returned immediately,
* ignoring the rest of the hash policy list.
*
* Specifies a list of hash policies to use for ring hash load balancing. Each
* hash policy is evaluated individually and the combined result is used to
* route the request. The method of combination is deterministic such that
* identical lists of hash policies will produce the same hash. Since a hash
* policy examines specific parts of a request, it can fail to produce a hash
* (i.e. if the hashed header is not present). If (and only if) all configured
* hash policies fail to generate a hash, no hash will be produced for
* the route. In this case, the behavior is the same as if no hash policies
* were specified (i.e. the ring hash load balancer will choose a random
* backend). If a hash policy has the "terminal" attribute set to true, and
* there is already a hash generated, the hash is returned immediately,
* ignoring the rest of the hash policy list.
*
*
* repeated .envoy.config.route.v3.RouteAction.HashPolicy hash_policy = 15;
*/
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Builder getHashPolicyBuilder(
int index) {
return getHashPolicyFieldBuilder().getBuilder(index);
}
/**
*
* Specifies a list of hash policies to use for ring hash load balancing. Each
* hash policy is evaluated individually and the combined result is used to
* route the request. The method of combination is deterministic such that
* identical lists of hash policies will produce the same hash. Since a hash
* policy examines specific parts of a request, it can fail to produce a hash
* (i.e. if the hashed header is not present). If (and only if) all configured
* hash policies fail to generate a hash, no hash will be produced for
* the route. In this case, the behavior is the same as if no hash policies
* were specified (i.e. the ring hash load balancer will choose a random
* backend). If a hash policy has the "terminal" attribute set to true, and
* there is already a hash generated, the hash is returned immediately,
* ignoring the rest of the hash policy list.
*
*
* repeated .envoy.config.route.v3.RouteAction.HashPolicy hash_policy = 15;
*/
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicyOrBuilder getHashPolicyOrBuilder(
int index) {
if (hashPolicyBuilder_ == null) {
return hashPolicy_.get(index); } else {
return hashPolicyBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Specifies a list of hash policies to use for ring hash load balancing. Each
* hash policy is evaluated individually and the combined result is used to
* route the request. The method of combination is deterministic such that
* identical lists of hash policies will produce the same hash. Since a hash
* policy examines specific parts of a request, it can fail to produce a hash
* (i.e. if the hashed header is not present). If (and only if) all configured
* hash policies fail to generate a hash, no hash will be produced for
* the route. In this case, the behavior is the same as if no hash policies
* were specified (i.e. the ring hash load balancer will choose a random
* backend). If a hash policy has the "terminal" attribute set to true, and
* there is already a hash generated, the hash is returned immediately,
* ignoring the rest of the hash policy list.
*
* Specifies a list of hash policies to use for ring hash load balancing. Each
* hash policy is evaluated individually and the combined result is used to
* route the request. The method of combination is deterministic such that
* identical lists of hash policies will produce the same hash. Since a hash
* policy examines specific parts of a request, it can fail to produce a hash
* (i.e. if the hashed header is not present). If (and only if) all configured
* hash policies fail to generate a hash, no hash will be produced for
* the route. In this case, the behavior is the same as if no hash policies
* were specified (i.e. the ring hash load balancer will choose a random
* backend). If a hash policy has the "terminal" attribute set to true, and
* there is already a hash generated, the hash is returned immediately,
* ignoring the rest of the hash policy list.
*
* Specifies a list of hash policies to use for ring hash load balancing. Each
* hash policy is evaluated individually and the combined result is used to
* route the request. The method of combination is deterministic such that
* identical lists of hash policies will produce the same hash. Since a hash
* policy examines specific parts of a request, it can fail to produce a hash
* (i.e. if the hashed header is not present). If (and only if) all configured
* hash policies fail to generate a hash, no hash will be produced for
* the route. In this case, the behavior is the same as if no hash policies
* were specified (i.e. the ring hash load balancer will choose a random
* backend). If a hash policy has the "terminal" attribute set to true, and
* there is already a hash generated, the hash is returned immediately,
* ignoring the rest of the hash policy list.
*
* Specifies a list of hash policies to use for ring hash load balancing. Each
* hash policy is evaluated individually and the combined result is used to
* route the request. The method of combination is deterministic such that
* identical lists of hash policies will produce the same hash. Since a hash
* policy examines specific parts of a request, it can fail to produce a hash
* (i.e. if the hashed header is not present). If (and only if) all configured
* hash policies fail to generate a hash, no hash will be produced for
* the route. In this case, the behavior is the same as if no hash policies
* were specified (i.e. the ring hash load balancer will choose a random
* backend). If a hash policy has the "terminal" attribute set to true, and
* there is already a hash generated, the hash is returned immediately,
* ignoring the rest of the hash policy list.
*
* Indicates that the route has a CORS policy. This field is ignored if related cors policy is
* found in the :ref:`Route.typed_per_filter_config<envoy_v3_api_field_config.route.v3.Route.typed_per_filter_config>` or
* :ref:`WeightedCluster.ClusterWeight.typed_per_filter_config<envoy_v3_api_field_config.route.v3.WeightedCluster.ClusterWeight.typed_per_filter_config>`.
* .. attention::
* This option has been deprecated. Please use
* :ref:`Route.typed_per_filter_config<envoy_v3_api_field_config.route.v3.Route.typed_per_filter_config>` or
* :ref:`WeightedCluster.ClusterWeight.typed_per_filter_config<envoy_v3_api_field_config.route.v3.WeightedCluster.ClusterWeight.typed_per_filter_config>`
* to configure the CORS HTTP filter.
*
*
* .envoy.config.route.v3.CorsPolicy cors = 17 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"];
* @deprecated envoy.config.route.v3.RouteAction.cors is deprecated.
* See envoy/config/route/v3/route_components.proto;l=1315
* @return Whether the cors field is set.
*/
@java.lang.Deprecated public boolean hasCors() {
return corsBuilder_ != null || cors_ != null;
}
/**
*
* Indicates that the route has a CORS policy. This field is ignored if related cors policy is
* found in the :ref:`Route.typed_per_filter_config<envoy_v3_api_field_config.route.v3.Route.typed_per_filter_config>` or
* :ref:`WeightedCluster.ClusterWeight.typed_per_filter_config<envoy_v3_api_field_config.route.v3.WeightedCluster.ClusterWeight.typed_per_filter_config>`.
* .. attention::
* This option has been deprecated. Please use
* :ref:`Route.typed_per_filter_config<envoy_v3_api_field_config.route.v3.Route.typed_per_filter_config>` or
* :ref:`WeightedCluster.ClusterWeight.typed_per_filter_config<envoy_v3_api_field_config.route.v3.WeightedCluster.ClusterWeight.typed_per_filter_config>`
* to configure the CORS HTTP filter.
*
*
* .envoy.config.route.v3.CorsPolicy cors = 17 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"];
* @deprecated envoy.config.route.v3.RouteAction.cors is deprecated.
* See envoy/config/route/v3/route_components.proto;l=1315
* @return The cors.
*/
@java.lang.Deprecated public io.envoyproxy.envoy.config.route.v3.CorsPolicy getCors() {
if (corsBuilder_ == null) {
return cors_ == null ? io.envoyproxy.envoy.config.route.v3.CorsPolicy.getDefaultInstance() : cors_;
} else {
return corsBuilder_.getMessage();
}
}
/**
*
* Indicates that the route has a CORS policy. This field is ignored if related cors policy is
* found in the :ref:`Route.typed_per_filter_config<envoy_v3_api_field_config.route.v3.Route.typed_per_filter_config>` or
* :ref:`WeightedCluster.ClusterWeight.typed_per_filter_config<envoy_v3_api_field_config.route.v3.WeightedCluster.ClusterWeight.typed_per_filter_config>`.
* .. attention::
* This option has been deprecated. Please use
* :ref:`Route.typed_per_filter_config<envoy_v3_api_field_config.route.v3.Route.typed_per_filter_config>` or
* :ref:`WeightedCluster.ClusterWeight.typed_per_filter_config<envoy_v3_api_field_config.route.v3.WeightedCluster.ClusterWeight.typed_per_filter_config>`
* to configure the CORS HTTP filter.
*
*
* .envoy.config.route.v3.CorsPolicy cors = 17 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"];
*/
@java.lang.Deprecated public Builder setCors(io.envoyproxy.envoy.config.route.v3.CorsPolicy value) {
if (corsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
cors_ = value;
onChanged();
} else {
corsBuilder_.setMessage(value);
}
return this;
}
/**
*
* Indicates that the route has a CORS policy. This field is ignored if related cors policy is
* found in the :ref:`Route.typed_per_filter_config<envoy_v3_api_field_config.route.v3.Route.typed_per_filter_config>` or
* :ref:`WeightedCluster.ClusterWeight.typed_per_filter_config<envoy_v3_api_field_config.route.v3.WeightedCluster.ClusterWeight.typed_per_filter_config>`.
* .. attention::
* This option has been deprecated. Please use
* :ref:`Route.typed_per_filter_config<envoy_v3_api_field_config.route.v3.Route.typed_per_filter_config>` or
* :ref:`WeightedCluster.ClusterWeight.typed_per_filter_config<envoy_v3_api_field_config.route.v3.WeightedCluster.ClusterWeight.typed_per_filter_config>`
* to configure the CORS HTTP filter.
*
* Indicates that the route has a CORS policy. This field is ignored if related cors policy is
* found in the :ref:`Route.typed_per_filter_config<envoy_v3_api_field_config.route.v3.Route.typed_per_filter_config>` or
* :ref:`WeightedCluster.ClusterWeight.typed_per_filter_config<envoy_v3_api_field_config.route.v3.WeightedCluster.ClusterWeight.typed_per_filter_config>`.
* .. attention::
* This option has been deprecated. Please use
* :ref:`Route.typed_per_filter_config<envoy_v3_api_field_config.route.v3.Route.typed_per_filter_config>` or
* :ref:`WeightedCluster.ClusterWeight.typed_per_filter_config<envoy_v3_api_field_config.route.v3.WeightedCluster.ClusterWeight.typed_per_filter_config>`
* to configure the CORS HTTP filter.
*
* Indicates that the route has a CORS policy. This field is ignored if related cors policy is
* found in the :ref:`Route.typed_per_filter_config<envoy_v3_api_field_config.route.v3.Route.typed_per_filter_config>` or
* :ref:`WeightedCluster.ClusterWeight.typed_per_filter_config<envoy_v3_api_field_config.route.v3.WeightedCluster.ClusterWeight.typed_per_filter_config>`.
* .. attention::
* This option has been deprecated. Please use
* :ref:`Route.typed_per_filter_config<envoy_v3_api_field_config.route.v3.Route.typed_per_filter_config>` or
* :ref:`WeightedCluster.ClusterWeight.typed_per_filter_config<envoy_v3_api_field_config.route.v3.WeightedCluster.ClusterWeight.typed_per_filter_config>`
* to configure the CORS HTTP filter.
*
* Indicates that the route has a CORS policy. This field is ignored if related cors policy is
* found in the :ref:`Route.typed_per_filter_config<envoy_v3_api_field_config.route.v3.Route.typed_per_filter_config>` or
* :ref:`WeightedCluster.ClusterWeight.typed_per_filter_config<envoy_v3_api_field_config.route.v3.WeightedCluster.ClusterWeight.typed_per_filter_config>`.
* .. attention::
* This option has been deprecated. Please use
* :ref:`Route.typed_per_filter_config<envoy_v3_api_field_config.route.v3.Route.typed_per_filter_config>` or
* :ref:`WeightedCluster.ClusterWeight.typed_per_filter_config<envoy_v3_api_field_config.route.v3.WeightedCluster.ClusterWeight.typed_per_filter_config>`
* to configure the CORS HTTP filter.
*
* Indicates that the route has a CORS policy. This field is ignored if related cors policy is
* found in the :ref:`Route.typed_per_filter_config<envoy_v3_api_field_config.route.v3.Route.typed_per_filter_config>` or
* :ref:`WeightedCluster.ClusterWeight.typed_per_filter_config<envoy_v3_api_field_config.route.v3.WeightedCluster.ClusterWeight.typed_per_filter_config>`.
* .. attention::
* This option has been deprecated. Please use
* :ref:`Route.typed_per_filter_config<envoy_v3_api_field_config.route.v3.Route.typed_per_filter_config>` or
* :ref:`WeightedCluster.ClusterWeight.typed_per_filter_config<envoy_v3_api_field_config.route.v3.WeightedCluster.ClusterWeight.typed_per_filter_config>`
* to configure the CORS HTTP filter.
*
* Indicates that the route has a CORS policy. This field is ignored if related cors policy is
* found in the :ref:`Route.typed_per_filter_config<envoy_v3_api_field_config.route.v3.Route.typed_per_filter_config>` or
* :ref:`WeightedCluster.ClusterWeight.typed_per_filter_config<envoy_v3_api_field_config.route.v3.WeightedCluster.ClusterWeight.typed_per_filter_config>`.
* .. attention::
* This option has been deprecated. Please use
* :ref:`Route.typed_per_filter_config<envoy_v3_api_field_config.route.v3.Route.typed_per_filter_config>` or
* :ref:`WeightedCluster.ClusterWeight.typed_per_filter_config<envoy_v3_api_field_config.route.v3.WeightedCluster.ClusterWeight.typed_per_filter_config>`
* to configure the CORS HTTP filter.
*
* Deprecated by :ref:`grpc_timeout_header_max <envoy_v3_api_field_config.route.v3.RouteAction.MaxStreamDuration.grpc_timeout_header_max>`
* If present, and the request is a gRPC request, use the
* `grpc-timeout header <https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md>`_,
* or its default value (infinity) instead of
* :ref:`timeout <envoy_v3_api_field_config.route.v3.RouteAction.timeout>`, but limit the applied timeout
* to the maximum value specified here. If configured as 0, the maximum allowed timeout for
* gRPC requests is infinity. If not configured at all, the ``grpc-timeout`` header is not used
* and gRPC requests time out like any other requests using
* :ref:`timeout <envoy_v3_api_field_config.route.v3.RouteAction.timeout>` or its default.
* This can be used to prevent unexpected upstream request timeouts due to potentially long
* time gaps between gRPC request and response in gRPC streaming mode.
* .. note::
* If a timeout is specified using :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`, it takes
* precedence over `grpc-timeout header <https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md>`_, when
* both are present. See also
* :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`,
* :ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms`, and the
* :ref:`retry overview <arch_overview_http_routing_retry>`.
*
*
* .google.protobuf.Duration max_grpc_timeout = 23 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"];
* @deprecated envoy.config.route.v3.RouteAction.max_grpc_timeout is deprecated.
* See envoy/config/route/v3/route_components.proto;l=1337
* @return Whether the maxGrpcTimeout field is set.
*/
@java.lang.Deprecated public boolean hasMaxGrpcTimeout() {
return maxGrpcTimeoutBuilder_ != null || maxGrpcTimeout_ != null;
}
/**
*
* Deprecated by :ref:`grpc_timeout_header_max <envoy_v3_api_field_config.route.v3.RouteAction.MaxStreamDuration.grpc_timeout_header_max>`
* If present, and the request is a gRPC request, use the
* `grpc-timeout header <https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md>`_,
* or its default value (infinity) instead of
* :ref:`timeout <envoy_v3_api_field_config.route.v3.RouteAction.timeout>`, but limit the applied timeout
* to the maximum value specified here. If configured as 0, the maximum allowed timeout for
* gRPC requests is infinity. If not configured at all, the ``grpc-timeout`` header is not used
* and gRPC requests time out like any other requests using
* :ref:`timeout <envoy_v3_api_field_config.route.v3.RouteAction.timeout>` or its default.
* This can be used to prevent unexpected upstream request timeouts due to potentially long
* time gaps between gRPC request and response in gRPC streaming mode.
* .. note::
* If a timeout is specified using :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`, it takes
* precedence over `grpc-timeout header <https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md>`_, when
* both are present. See also
* :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`,
* :ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms`, and the
* :ref:`retry overview <arch_overview_http_routing_retry>`.
*
* Deprecated by :ref:`grpc_timeout_header_max <envoy_v3_api_field_config.route.v3.RouteAction.MaxStreamDuration.grpc_timeout_header_max>`
* If present, and the request is a gRPC request, use the
* `grpc-timeout header <https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md>`_,
* or its default value (infinity) instead of
* :ref:`timeout <envoy_v3_api_field_config.route.v3.RouteAction.timeout>`, but limit the applied timeout
* to the maximum value specified here. If configured as 0, the maximum allowed timeout for
* gRPC requests is infinity. If not configured at all, the ``grpc-timeout`` header is not used
* and gRPC requests time out like any other requests using
* :ref:`timeout <envoy_v3_api_field_config.route.v3.RouteAction.timeout>` or its default.
* This can be used to prevent unexpected upstream request timeouts due to potentially long
* time gaps between gRPC request and response in gRPC streaming mode.
* .. note::
* If a timeout is specified using :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`, it takes
* precedence over `grpc-timeout header <https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md>`_, when
* both are present. See also
* :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`,
* :ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms`, and the
* :ref:`retry overview <arch_overview_http_routing_retry>`.
*
* Deprecated by :ref:`grpc_timeout_header_max <envoy_v3_api_field_config.route.v3.RouteAction.MaxStreamDuration.grpc_timeout_header_max>`
* If present, and the request is a gRPC request, use the
* `grpc-timeout header <https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md>`_,
* or its default value (infinity) instead of
* :ref:`timeout <envoy_v3_api_field_config.route.v3.RouteAction.timeout>`, but limit the applied timeout
* to the maximum value specified here. If configured as 0, the maximum allowed timeout for
* gRPC requests is infinity. If not configured at all, the ``grpc-timeout`` header is not used
* and gRPC requests time out like any other requests using
* :ref:`timeout <envoy_v3_api_field_config.route.v3.RouteAction.timeout>` or its default.
* This can be used to prevent unexpected upstream request timeouts due to potentially long
* time gaps between gRPC request and response in gRPC streaming mode.
* .. note::
* If a timeout is specified using :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`, it takes
* precedence over `grpc-timeout header <https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md>`_, when
* both are present. See also
* :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`,
* :ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms`, and the
* :ref:`retry overview <arch_overview_http_routing_retry>`.
*
* Deprecated by :ref:`grpc_timeout_header_max <envoy_v3_api_field_config.route.v3.RouteAction.MaxStreamDuration.grpc_timeout_header_max>`
* If present, and the request is a gRPC request, use the
* `grpc-timeout header <https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md>`_,
* or its default value (infinity) instead of
* :ref:`timeout <envoy_v3_api_field_config.route.v3.RouteAction.timeout>`, but limit the applied timeout
* to the maximum value specified here. If configured as 0, the maximum allowed timeout for
* gRPC requests is infinity. If not configured at all, the ``grpc-timeout`` header is not used
* and gRPC requests time out like any other requests using
* :ref:`timeout <envoy_v3_api_field_config.route.v3.RouteAction.timeout>` or its default.
* This can be used to prevent unexpected upstream request timeouts due to potentially long
* time gaps between gRPC request and response in gRPC streaming mode.
* .. note::
* If a timeout is specified using :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`, it takes
* precedence over `grpc-timeout header <https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md>`_, when
* both are present. See also
* :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`,
* :ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms`, and the
* :ref:`retry overview <arch_overview_http_routing_retry>`.
*
* Deprecated by :ref:`grpc_timeout_header_max <envoy_v3_api_field_config.route.v3.RouteAction.MaxStreamDuration.grpc_timeout_header_max>`
* If present, and the request is a gRPC request, use the
* `grpc-timeout header <https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md>`_,
* or its default value (infinity) instead of
* :ref:`timeout <envoy_v3_api_field_config.route.v3.RouteAction.timeout>`, but limit the applied timeout
* to the maximum value specified here. If configured as 0, the maximum allowed timeout for
* gRPC requests is infinity. If not configured at all, the ``grpc-timeout`` header is not used
* and gRPC requests time out like any other requests using
* :ref:`timeout <envoy_v3_api_field_config.route.v3.RouteAction.timeout>` or its default.
* This can be used to prevent unexpected upstream request timeouts due to potentially long
* time gaps between gRPC request and response in gRPC streaming mode.
* .. note::
* If a timeout is specified using :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`, it takes
* precedence over `grpc-timeout header <https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md>`_, when
* both are present. See also
* :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`,
* :ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms`, and the
* :ref:`retry overview <arch_overview_http_routing_retry>`.
*
* Deprecated by :ref:`grpc_timeout_header_max <envoy_v3_api_field_config.route.v3.RouteAction.MaxStreamDuration.grpc_timeout_header_max>`
* If present, and the request is a gRPC request, use the
* `grpc-timeout header <https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md>`_,
* or its default value (infinity) instead of
* :ref:`timeout <envoy_v3_api_field_config.route.v3.RouteAction.timeout>`, but limit the applied timeout
* to the maximum value specified here. If configured as 0, the maximum allowed timeout for
* gRPC requests is infinity. If not configured at all, the ``grpc-timeout`` header is not used
* and gRPC requests time out like any other requests using
* :ref:`timeout <envoy_v3_api_field_config.route.v3.RouteAction.timeout>` or its default.
* This can be used to prevent unexpected upstream request timeouts due to potentially long
* time gaps between gRPC request and response in gRPC streaming mode.
* .. note::
* If a timeout is specified using :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`, it takes
* precedence over `grpc-timeout header <https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md>`_, when
* both are present. See also
* :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`,
* :ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms`, and the
* :ref:`retry overview <arch_overview_http_routing_retry>`.
*
* Deprecated by :ref:`grpc_timeout_header_max <envoy_v3_api_field_config.route.v3.RouteAction.MaxStreamDuration.grpc_timeout_header_max>`
* If present, and the request is a gRPC request, use the
* `grpc-timeout header <https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md>`_,
* or its default value (infinity) instead of
* :ref:`timeout <envoy_v3_api_field_config.route.v3.RouteAction.timeout>`, but limit the applied timeout
* to the maximum value specified here. If configured as 0, the maximum allowed timeout for
* gRPC requests is infinity. If not configured at all, the ``grpc-timeout`` header is not used
* and gRPC requests time out like any other requests using
* :ref:`timeout <envoy_v3_api_field_config.route.v3.RouteAction.timeout>` or its default.
* This can be used to prevent unexpected upstream request timeouts due to potentially long
* time gaps between gRPC request and response in gRPC streaming mode.
* .. note::
* If a timeout is specified using :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`, it takes
* precedence over `grpc-timeout header <https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md>`_, when
* both are present. See also
* :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`,
* :ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms`, and the
* :ref:`retry overview <arch_overview_http_routing_retry>`.
*
* Deprecated by :ref:`grpc_timeout_header_max <envoy_v3_api_field_config.route.v3.RouteAction.MaxStreamDuration.grpc_timeout_header_max>`
* If present, and the request is a gRPC request, use the
* `grpc-timeout header <https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md>`_,
* or its default value (infinity) instead of
* :ref:`timeout <envoy_v3_api_field_config.route.v3.RouteAction.timeout>`, but limit the applied timeout
* to the maximum value specified here. If configured as 0, the maximum allowed timeout for
* gRPC requests is infinity. If not configured at all, the ``grpc-timeout`` header is not used
* and gRPC requests time out like any other requests using
* :ref:`timeout <envoy_v3_api_field_config.route.v3.RouteAction.timeout>` or its default.
* This can be used to prevent unexpected upstream request timeouts due to potentially long
* time gaps between gRPC request and response in gRPC streaming mode.
* .. note::
* If a timeout is specified using :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`, it takes
* precedence over `grpc-timeout header <https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md>`_, when
* both are present. See also
* :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`,
* :ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms`, and the
* :ref:`retry overview <arch_overview_http_routing_retry>`.
*
* Deprecated by :ref:`grpc_timeout_header_offset <envoy_v3_api_field_config.route.v3.RouteAction.MaxStreamDuration.grpc_timeout_header_offset>`.
* If present, Envoy will adjust the timeout provided by the ``grpc-timeout`` header by subtracting
* the provided duration from the header. This is useful in allowing Envoy to set its global
* timeout to be less than that of the deadline imposed by the calling client, which makes it more
* likely that Envoy will handle the timeout instead of having the call canceled by the client.
* The offset will only be applied if the provided grpc_timeout is greater than the offset. This
* ensures that the offset will only ever decrease the timeout and never set it to 0 (meaning
* infinity).
*
*
* .google.protobuf.Duration grpc_timeout_offset = 28 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"];
* @deprecated envoy.config.route.v3.RouteAction.grpc_timeout_offset is deprecated.
* See envoy/config/route/v3/route_components.proto;l=1348
* @return Whether the grpcTimeoutOffset field is set.
*/
@java.lang.Deprecated public boolean hasGrpcTimeoutOffset() {
return grpcTimeoutOffsetBuilder_ != null || grpcTimeoutOffset_ != null;
}
/**
*
* Deprecated by :ref:`grpc_timeout_header_offset <envoy_v3_api_field_config.route.v3.RouteAction.MaxStreamDuration.grpc_timeout_header_offset>`.
* If present, Envoy will adjust the timeout provided by the ``grpc-timeout`` header by subtracting
* the provided duration from the header. This is useful in allowing Envoy to set its global
* timeout to be less than that of the deadline imposed by the calling client, which makes it more
* likely that Envoy will handle the timeout instead of having the call canceled by the client.
* The offset will only be applied if the provided grpc_timeout is greater than the offset. This
* ensures that the offset will only ever decrease the timeout and never set it to 0 (meaning
* infinity).
*
* Deprecated by :ref:`grpc_timeout_header_offset <envoy_v3_api_field_config.route.v3.RouteAction.MaxStreamDuration.grpc_timeout_header_offset>`.
* If present, Envoy will adjust the timeout provided by the ``grpc-timeout`` header by subtracting
* the provided duration from the header. This is useful in allowing Envoy to set its global
* timeout to be less than that of the deadline imposed by the calling client, which makes it more
* likely that Envoy will handle the timeout instead of having the call canceled by the client.
* The offset will only be applied if the provided grpc_timeout is greater than the offset. This
* ensures that the offset will only ever decrease the timeout and never set it to 0 (meaning
* infinity).
*
* Deprecated by :ref:`grpc_timeout_header_offset <envoy_v3_api_field_config.route.v3.RouteAction.MaxStreamDuration.grpc_timeout_header_offset>`.
* If present, Envoy will adjust the timeout provided by the ``grpc-timeout`` header by subtracting
* the provided duration from the header. This is useful in allowing Envoy to set its global
* timeout to be less than that of the deadline imposed by the calling client, which makes it more
* likely that Envoy will handle the timeout instead of having the call canceled by the client.
* The offset will only be applied if the provided grpc_timeout is greater than the offset. This
* ensures that the offset will only ever decrease the timeout and never set it to 0 (meaning
* infinity).
*
* Deprecated by :ref:`grpc_timeout_header_offset <envoy_v3_api_field_config.route.v3.RouteAction.MaxStreamDuration.grpc_timeout_header_offset>`.
* If present, Envoy will adjust the timeout provided by the ``grpc-timeout`` header by subtracting
* the provided duration from the header. This is useful in allowing Envoy to set its global
* timeout to be less than that of the deadline imposed by the calling client, which makes it more
* likely that Envoy will handle the timeout instead of having the call canceled by the client.
* The offset will only be applied if the provided grpc_timeout is greater than the offset. This
* ensures that the offset will only ever decrease the timeout and never set it to 0 (meaning
* infinity).
*
* Deprecated by :ref:`grpc_timeout_header_offset <envoy_v3_api_field_config.route.v3.RouteAction.MaxStreamDuration.grpc_timeout_header_offset>`.
* If present, Envoy will adjust the timeout provided by the ``grpc-timeout`` header by subtracting
* the provided duration from the header. This is useful in allowing Envoy to set its global
* timeout to be less than that of the deadline imposed by the calling client, which makes it more
* likely that Envoy will handle the timeout instead of having the call canceled by the client.
* The offset will only be applied if the provided grpc_timeout is greater than the offset. This
* ensures that the offset will only ever decrease the timeout and never set it to 0 (meaning
* infinity).
*
* Deprecated by :ref:`grpc_timeout_header_offset <envoy_v3_api_field_config.route.v3.RouteAction.MaxStreamDuration.grpc_timeout_header_offset>`.
* If present, Envoy will adjust the timeout provided by the ``grpc-timeout`` header by subtracting
* the provided duration from the header. This is useful in allowing Envoy to set its global
* timeout to be less than that of the deadline imposed by the calling client, which makes it more
* likely that Envoy will handle the timeout instead of having the call canceled by the client.
* The offset will only be applied if the provided grpc_timeout is greater than the offset. This
* ensures that the offset will only ever decrease the timeout and never set it to 0 (meaning
* infinity).
*
* Deprecated by :ref:`grpc_timeout_header_offset <envoy_v3_api_field_config.route.v3.RouteAction.MaxStreamDuration.grpc_timeout_header_offset>`.
* If present, Envoy will adjust the timeout provided by the ``grpc-timeout`` header by subtracting
* the provided duration from the header. This is useful in allowing Envoy to set its global
* timeout to be less than that of the deadline imposed by the calling client, which makes it more
* likely that Envoy will handle the timeout instead of having the call canceled by the client.
* The offset will only be applied if the provided grpc_timeout is greater than the offset. This
* ensures that the offset will only ever decrease the timeout and never set it to 0 (meaning
* infinity).
*
* Deprecated by :ref:`grpc_timeout_header_offset <envoy_v3_api_field_config.route.v3.RouteAction.MaxStreamDuration.grpc_timeout_header_offset>`.
* If present, Envoy will adjust the timeout provided by the ``grpc-timeout`` header by subtracting
* the provided duration from the header. This is useful in allowing Envoy to set its global
* timeout to be less than that of the deadline imposed by the calling client, which makes it more
* likely that Envoy will handle the timeout instead of having the call canceled by the client.
* The offset will only be applied if the provided grpc_timeout is greater than the offset. This
* ensures that the offset will only ever decrease the timeout and never set it to 0 (meaning
* infinity).
*
* If present, Envoy will try to follow an upstream redirect response instead of proxying the
* response back to the downstream. An upstream redirect response is defined
* by :ref:`redirect_response_codes
* <envoy_v3_api_field_config.route.v3.InternalRedirectPolicy.redirect_response_codes>`.
*
*
* .envoy.config.route.v3.InternalRedirectPolicy internal_redirect_policy = 34;
* @return Whether the internalRedirectPolicy field is set.
*/
public boolean hasInternalRedirectPolicy() {
return internalRedirectPolicyBuilder_ != null || internalRedirectPolicy_ != null;
}
/**
*
* If present, Envoy will try to follow an upstream redirect response instead of proxying the
* response back to the downstream. An upstream redirect response is defined
* by :ref:`redirect_response_codes
* <envoy_v3_api_field_config.route.v3.InternalRedirectPolicy.redirect_response_codes>`.
*
* If present, Envoy will try to follow an upstream redirect response instead of proxying the
* response back to the downstream. An upstream redirect response is defined
* by :ref:`redirect_response_codes
* <envoy_v3_api_field_config.route.v3.InternalRedirectPolicy.redirect_response_codes>`.
*
*
* .envoy.config.route.v3.InternalRedirectPolicy internal_redirect_policy = 34;
*/
public Builder setInternalRedirectPolicy(io.envoyproxy.envoy.config.route.v3.InternalRedirectPolicy value) {
if (internalRedirectPolicyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
internalRedirectPolicy_ = value;
onChanged();
} else {
internalRedirectPolicyBuilder_.setMessage(value);
}
return this;
}
/**
*
* If present, Envoy will try to follow an upstream redirect response instead of proxying the
* response back to the downstream. An upstream redirect response is defined
* by :ref:`redirect_response_codes
* <envoy_v3_api_field_config.route.v3.InternalRedirectPolicy.redirect_response_codes>`.
*
* If present, Envoy will try to follow an upstream redirect response instead of proxying the
* response back to the downstream. An upstream redirect response is defined
* by :ref:`redirect_response_codes
* <envoy_v3_api_field_config.route.v3.InternalRedirectPolicy.redirect_response_codes>`.
*
* If present, Envoy will try to follow an upstream redirect response instead of proxying the
* response back to the downstream. An upstream redirect response is defined
* by :ref:`redirect_response_codes
* <envoy_v3_api_field_config.route.v3.InternalRedirectPolicy.redirect_response_codes>`.
*
* If present, Envoy will try to follow an upstream redirect response instead of proxying the
* response back to the downstream. An upstream redirect response is defined
* by :ref:`redirect_response_codes
* <envoy_v3_api_field_config.route.v3.InternalRedirectPolicy.redirect_response_codes>`.
*
* If present, Envoy will try to follow an upstream redirect response instead of proxying the
* response back to the downstream. An upstream redirect response is defined
* by :ref:`redirect_response_codes
* <envoy_v3_api_field_config.route.v3.InternalRedirectPolicy.redirect_response_codes>`.
*
* If present, Envoy will try to follow an upstream redirect response instead of proxying the
* response back to the downstream. An upstream redirect response is defined
* by :ref:`redirect_response_codes
* <envoy_v3_api_field_config.route.v3.InternalRedirectPolicy.redirect_response_codes>`.
*
*
* .envoy.config.route.v3.InternalRedirectPolicy internal_redirect_policy = 34;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.route.v3.InternalRedirectPolicy, io.envoyproxy.envoy.config.route.v3.InternalRedirectPolicy.Builder, io.envoyproxy.envoy.config.route.v3.InternalRedirectPolicyOrBuilder>
getInternalRedirectPolicyFieldBuilder() {
if (internalRedirectPolicyBuilder_ == null) {
internalRedirectPolicyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.route.v3.InternalRedirectPolicy, io.envoyproxy.envoy.config.route.v3.InternalRedirectPolicy.Builder, io.envoyproxy.envoy.config.route.v3.InternalRedirectPolicyOrBuilder>(
getInternalRedirectPolicy(),
getParentForChildren(),
isClean());
internalRedirectPolicy_ = null;
}
return internalRedirectPolicyBuilder_;
}
private int internalRedirectAction_ = 0;
/**
* .envoy.config.route.v3.RouteAction.InternalRedirectAction internal_redirect_action = 26 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"];
* @deprecated envoy.config.route.v3.RouteAction.internal_redirect_action is deprecated.
* See envoy/config/route/v3/route_components.proto;l=1359
* @return The enum numeric value on the wire for internalRedirectAction.
*/
@java.lang.Override @java.lang.Deprecated public int getInternalRedirectActionValue() {
return internalRedirectAction_;
}
/**
* .envoy.config.route.v3.RouteAction.InternalRedirectAction internal_redirect_action = 26 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"];
* @deprecated envoy.config.route.v3.RouteAction.internal_redirect_action is deprecated.
* See envoy/config/route/v3/route_components.proto;l=1359
* @param value The enum numeric value on the wire for internalRedirectAction to set.
* @return This builder for chaining.
*/
@java.lang.Deprecated public Builder setInternalRedirectActionValue(int value) {
internalRedirectAction_ = value;
onChanged();
return this;
}
/**
* .envoy.config.route.v3.RouteAction.InternalRedirectAction internal_redirect_action = 26 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"];
* @deprecated envoy.config.route.v3.RouteAction.internal_redirect_action is deprecated.
* See envoy/config/route/v3/route_components.proto;l=1359
* @return The internalRedirectAction.
*/
@java.lang.Override
@java.lang.Deprecated public io.envoyproxy.envoy.config.route.v3.RouteAction.InternalRedirectAction getInternalRedirectAction() {
@SuppressWarnings("deprecation")
io.envoyproxy.envoy.config.route.v3.RouteAction.InternalRedirectAction result = io.envoyproxy.envoy.config.route.v3.RouteAction.InternalRedirectAction.valueOf(internalRedirectAction_);
return result == null ? io.envoyproxy.envoy.config.route.v3.RouteAction.InternalRedirectAction.UNRECOGNIZED : result;
}
/**
* .envoy.config.route.v3.RouteAction.InternalRedirectAction internal_redirect_action = 26 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"];
* @deprecated envoy.config.route.v3.RouteAction.internal_redirect_action is deprecated.
* See envoy/config/route/v3/route_components.proto;l=1359
* @param value The internalRedirectAction to set.
* @return This builder for chaining.
*/
@java.lang.Deprecated public Builder setInternalRedirectAction(io.envoyproxy.envoy.config.route.v3.RouteAction.InternalRedirectAction value) {
if (value == null) {
throw new NullPointerException();
}
internalRedirectAction_ = value.getNumber();
onChanged();
return this;
}
/**
* .envoy.config.route.v3.RouteAction.InternalRedirectAction internal_redirect_action = 26 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"];
* @deprecated envoy.config.route.v3.RouteAction.internal_redirect_action is deprecated.
* See envoy/config/route/v3/route_components.proto;l=1359
* @return This builder for chaining.
*/
@java.lang.Deprecated public Builder clearInternalRedirectAction() {
internalRedirectAction_ = 0;
onChanged();
return this;
}
private com.google.protobuf.UInt32Value maxInternalRedirects_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> maxInternalRedirectsBuilder_;
/**
*
* An internal redirect is handled, iff the number of previous internal redirects that a
* downstream request has encountered is lower than this value, and
* :ref:`internal_redirect_action <envoy_v3_api_field_config.route.v3.RouteAction.internal_redirect_action>`
* is set to :ref:`HANDLE_INTERNAL_REDIRECT
* <envoy_v3_api_enum_value_config.route.v3.RouteAction.InternalRedirectAction.HANDLE_INTERNAL_REDIRECT>`
* In the case where a downstream request is bounced among multiple routes by internal redirect,
* the first route that hits this threshold, or has
* :ref:`internal_redirect_action <envoy_v3_api_field_config.route.v3.RouteAction.internal_redirect_action>`
* set to
* :ref:`PASS_THROUGH_INTERNAL_REDIRECT
* <envoy_v3_api_enum_value_config.route.v3.RouteAction.InternalRedirectAction.PASS_THROUGH_INTERNAL_REDIRECT>`
* will pass the redirect back to downstream.
* If not specified, at most one redirect will be followed.
*
*
* .google.protobuf.UInt32Value max_internal_redirects = 31 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"];
* @deprecated envoy.config.route.v3.RouteAction.max_internal_redirects is deprecated.
* See envoy/config/route/v3/route_components.proto;l=1376
* @return Whether the maxInternalRedirects field is set.
*/
@java.lang.Deprecated public boolean hasMaxInternalRedirects() {
return maxInternalRedirectsBuilder_ != null || maxInternalRedirects_ != null;
}
/**
*
* An internal redirect is handled, iff the number of previous internal redirects that a
* downstream request has encountered is lower than this value, and
* :ref:`internal_redirect_action <envoy_v3_api_field_config.route.v3.RouteAction.internal_redirect_action>`
* is set to :ref:`HANDLE_INTERNAL_REDIRECT
* <envoy_v3_api_enum_value_config.route.v3.RouteAction.InternalRedirectAction.HANDLE_INTERNAL_REDIRECT>`
* In the case where a downstream request is bounced among multiple routes by internal redirect,
* the first route that hits this threshold, or has
* :ref:`internal_redirect_action <envoy_v3_api_field_config.route.v3.RouteAction.internal_redirect_action>`
* set to
* :ref:`PASS_THROUGH_INTERNAL_REDIRECT
* <envoy_v3_api_enum_value_config.route.v3.RouteAction.InternalRedirectAction.PASS_THROUGH_INTERNAL_REDIRECT>`
* will pass the redirect back to downstream.
* If not specified, at most one redirect will be followed.
*
* An internal redirect is handled, iff the number of previous internal redirects that a
* downstream request has encountered is lower than this value, and
* :ref:`internal_redirect_action <envoy_v3_api_field_config.route.v3.RouteAction.internal_redirect_action>`
* is set to :ref:`HANDLE_INTERNAL_REDIRECT
* <envoy_v3_api_enum_value_config.route.v3.RouteAction.InternalRedirectAction.HANDLE_INTERNAL_REDIRECT>`
* In the case where a downstream request is bounced among multiple routes by internal redirect,
* the first route that hits this threshold, or has
* :ref:`internal_redirect_action <envoy_v3_api_field_config.route.v3.RouteAction.internal_redirect_action>`
* set to
* :ref:`PASS_THROUGH_INTERNAL_REDIRECT
* <envoy_v3_api_enum_value_config.route.v3.RouteAction.InternalRedirectAction.PASS_THROUGH_INTERNAL_REDIRECT>`
* will pass the redirect back to downstream.
* If not specified, at most one redirect will be followed.
*
* An internal redirect is handled, iff the number of previous internal redirects that a
* downstream request has encountered is lower than this value, and
* :ref:`internal_redirect_action <envoy_v3_api_field_config.route.v3.RouteAction.internal_redirect_action>`
* is set to :ref:`HANDLE_INTERNAL_REDIRECT
* <envoy_v3_api_enum_value_config.route.v3.RouteAction.InternalRedirectAction.HANDLE_INTERNAL_REDIRECT>`
* In the case where a downstream request is bounced among multiple routes by internal redirect,
* the first route that hits this threshold, or has
* :ref:`internal_redirect_action <envoy_v3_api_field_config.route.v3.RouteAction.internal_redirect_action>`
* set to
* :ref:`PASS_THROUGH_INTERNAL_REDIRECT
* <envoy_v3_api_enum_value_config.route.v3.RouteAction.InternalRedirectAction.PASS_THROUGH_INTERNAL_REDIRECT>`
* will pass the redirect back to downstream.
* If not specified, at most one redirect will be followed.
*
* An internal redirect is handled, iff the number of previous internal redirects that a
* downstream request has encountered is lower than this value, and
* :ref:`internal_redirect_action <envoy_v3_api_field_config.route.v3.RouteAction.internal_redirect_action>`
* is set to :ref:`HANDLE_INTERNAL_REDIRECT
* <envoy_v3_api_enum_value_config.route.v3.RouteAction.InternalRedirectAction.HANDLE_INTERNAL_REDIRECT>`
* In the case where a downstream request is bounced among multiple routes by internal redirect,
* the first route that hits this threshold, or has
* :ref:`internal_redirect_action <envoy_v3_api_field_config.route.v3.RouteAction.internal_redirect_action>`
* set to
* :ref:`PASS_THROUGH_INTERNAL_REDIRECT
* <envoy_v3_api_enum_value_config.route.v3.RouteAction.InternalRedirectAction.PASS_THROUGH_INTERNAL_REDIRECT>`
* will pass the redirect back to downstream.
* If not specified, at most one redirect will be followed.
*
* An internal redirect is handled, iff the number of previous internal redirects that a
* downstream request has encountered is lower than this value, and
* :ref:`internal_redirect_action <envoy_v3_api_field_config.route.v3.RouteAction.internal_redirect_action>`
* is set to :ref:`HANDLE_INTERNAL_REDIRECT
* <envoy_v3_api_enum_value_config.route.v3.RouteAction.InternalRedirectAction.HANDLE_INTERNAL_REDIRECT>`
* In the case where a downstream request is bounced among multiple routes by internal redirect,
* the first route that hits this threshold, or has
* :ref:`internal_redirect_action <envoy_v3_api_field_config.route.v3.RouteAction.internal_redirect_action>`
* set to
* :ref:`PASS_THROUGH_INTERNAL_REDIRECT
* <envoy_v3_api_enum_value_config.route.v3.RouteAction.InternalRedirectAction.PASS_THROUGH_INTERNAL_REDIRECT>`
* will pass the redirect back to downstream.
* If not specified, at most one redirect will be followed.
*
* An internal redirect is handled, iff the number of previous internal redirects that a
* downstream request has encountered is lower than this value, and
* :ref:`internal_redirect_action <envoy_v3_api_field_config.route.v3.RouteAction.internal_redirect_action>`
* is set to :ref:`HANDLE_INTERNAL_REDIRECT
* <envoy_v3_api_enum_value_config.route.v3.RouteAction.InternalRedirectAction.HANDLE_INTERNAL_REDIRECT>`
* In the case where a downstream request is bounced among multiple routes by internal redirect,
* the first route that hits this threshold, or has
* :ref:`internal_redirect_action <envoy_v3_api_field_config.route.v3.RouteAction.internal_redirect_action>`
* set to
* :ref:`PASS_THROUGH_INTERNAL_REDIRECT
* <envoy_v3_api_enum_value_config.route.v3.RouteAction.InternalRedirectAction.PASS_THROUGH_INTERNAL_REDIRECT>`
* will pass the redirect back to downstream.
* If not specified, at most one redirect will be followed.
*
* An internal redirect is handled, iff the number of previous internal redirects that a
* downstream request has encountered is lower than this value, and
* :ref:`internal_redirect_action <envoy_v3_api_field_config.route.v3.RouteAction.internal_redirect_action>`
* is set to :ref:`HANDLE_INTERNAL_REDIRECT
* <envoy_v3_api_enum_value_config.route.v3.RouteAction.InternalRedirectAction.HANDLE_INTERNAL_REDIRECT>`
* In the case where a downstream request is bounced among multiple routes by internal redirect,
* the first route that hits this threshold, or has
* :ref:`internal_redirect_action <envoy_v3_api_field_config.route.v3.RouteAction.internal_redirect_action>`
* set to
* :ref:`PASS_THROUGH_INTERNAL_REDIRECT
* <envoy_v3_api_enum_value_config.route.v3.RouteAction.InternalRedirectAction.PASS_THROUGH_INTERNAL_REDIRECT>`
* will pass the redirect back to downstream.
* If not specified, at most one redirect will be followed.
*
* An internal redirect is handled, iff the number of previous internal redirects that a
* downstream request has encountered is lower than this value, and
* :ref:`internal_redirect_action <envoy_v3_api_field_config.route.v3.RouteAction.internal_redirect_action>`
* is set to :ref:`HANDLE_INTERNAL_REDIRECT
* <envoy_v3_api_enum_value_config.route.v3.RouteAction.InternalRedirectAction.HANDLE_INTERNAL_REDIRECT>`
* In the case where a downstream request is bounced among multiple routes by internal redirect,
* the first route that hits this threshold, or has
* :ref:`internal_redirect_action <envoy_v3_api_field_config.route.v3.RouteAction.internal_redirect_action>`
* set to
* :ref:`PASS_THROUGH_INTERNAL_REDIRECT
* <envoy_v3_api_enum_value_config.route.v3.RouteAction.InternalRedirectAction.PASS_THROUGH_INTERNAL_REDIRECT>`
* will pass the redirect back to downstream.
* If not specified, at most one redirect will be followed.
*
* Indicates that the route has a hedge policy. Note that if this is set,
* it'll take precedence over the virtual host level hedge policy entirely
* (e.g.: policies are not merged, most internal one becomes the enforced policy).
*
*
* .envoy.config.route.v3.HedgePolicy hedge_policy = 27;
* @return Whether the hedgePolicy field is set.
*/
public boolean hasHedgePolicy() {
return hedgePolicyBuilder_ != null || hedgePolicy_ != null;
}
/**
*
* Indicates that the route has a hedge policy. Note that if this is set,
* it'll take precedence over the virtual host level hedge policy entirely
* (e.g.: policies are not merged, most internal one becomes the enforced policy).
*
* Indicates that the route has a hedge policy. Note that if this is set,
* it'll take precedence over the virtual host level hedge policy entirely
* (e.g.: policies are not merged, most internal one becomes the enforced policy).
*
*
* .envoy.config.route.v3.HedgePolicy hedge_policy = 27;
*/
public Builder setHedgePolicy(io.envoyproxy.envoy.config.route.v3.HedgePolicy value) {
if (hedgePolicyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
hedgePolicy_ = value;
onChanged();
} else {
hedgePolicyBuilder_.setMessage(value);
}
return this;
}
/**
*
* Indicates that the route has a hedge policy. Note that if this is set,
* it'll take precedence over the virtual host level hedge policy entirely
* (e.g.: policies are not merged, most internal one becomes the enforced policy).
*
* Indicates that the route has a hedge policy. Note that if this is set,
* it'll take precedence over the virtual host level hedge policy entirely
* (e.g.: policies are not merged, most internal one becomes the enforced policy).
*
* Indicates that the route has a hedge policy. Note that if this is set,
* it'll take precedence over the virtual host level hedge policy entirely
* (e.g.: policies are not merged, most internal one becomes the enforced policy).
*
* Indicates that the route has a hedge policy. Note that if this is set,
* it'll take precedence over the virtual host level hedge policy entirely
* (e.g.: policies are not merged, most internal one becomes the enforced policy).
*
* Indicates that the route has a hedge policy. Note that if this is set,
* it'll take precedence over the virtual host level hedge policy entirely
* (e.g.: policies are not merged, most internal one becomes the enforced policy).
*
* Indicates that the route has a hedge policy. Note that if this is set,
* it'll take precedence over the virtual host level hedge policy entirely
* (e.g.: policies are not merged, most internal one becomes the enforced policy).
*