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/api/v2/route/route_components.proto
package io.envoyproxy.envoy.api.v2.route;
/**
*
* [#next-free-field: 34]
*
*
* Protobuf type {@code envoy.api.v2.route.RouteAction}
*/
public final class RouteAction extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.api.v2.route.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.api.v2.route.WeightedCluster.Builder subBuilder = null;
if (clusterSpecifierCase_ == 3) {
subBuilder = ((io.envoyproxy.envoy.api.v2.route.WeightedCluster) clusterSpecifier_).toBuilder();
}
clusterSpecifier_ =
input.readMessage(io.envoyproxy.envoy.api.v2.route.WeightedCluster.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((io.envoyproxy.envoy.api.v2.route.WeightedCluster) clusterSpecifier_);
clusterSpecifier_ = subBuilder.buildPartial();
}
clusterSpecifierCase_ = 3;
break;
}
case 34: {
io.envoyproxy.envoy.api.v2.core.Metadata.Builder subBuilder = null;
if (metadataMatch_ != null) {
subBuilder = metadataMatch_.toBuilder();
}
metadataMatch_ = input.readMessage(io.envoyproxy.envoy.api.v2.core.Metadata.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(metadataMatch_);
metadataMatch_ = subBuilder.buildPartial();
}
break;
}
case 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.api.v2.route.RetryPolicy.Builder subBuilder = null;
if (retryPolicy_ != null) {
subBuilder = retryPolicy_.toBuilder();
}
retryPolicy_ = input.readMessage(io.envoyproxy.envoy.api.v2.route.RetryPolicy.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(retryPolicy_);
retryPolicy_ = subBuilder.buildPartial();
}
break;
}
case 82: {
io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy.Builder subBuilder = null;
if (requestMirrorPolicy_ != null) {
subBuilder = requestMirrorPolicy_.toBuilder();
}
requestMirrorPolicy_ = input.readMessage(io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(requestMirrorPolicy_);
requestMirrorPolicy_ = 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.api.v2.route.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.api.v2.route.RouteAction.HashPolicy.parser(), extensionRegistry));
break;
}
case 138: {
io.envoyproxy.envoy.api.v2.route.CorsPolicy.Builder subBuilder = null;
if (cors_ != null) {
subBuilder = cors_.toBuilder();
}
cors_ = input.readMessage(io.envoyproxy.envoy.api.v2.route.CorsPolicy.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(cors_);
cors_ = subBuilder.buildPartial();
}
break;
}
case 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.api.v2.route.RouteAction.UpgradeConfig.parser(), extensionRegistry));
break;
}
case 208: {
int rawValue = input.readEnum();
internalRedirectAction_ = rawValue;
break;
}
case 218: {
io.envoyproxy.envoy.api.v2.route.HedgePolicy.Builder subBuilder = null;
if (hedgePolicy_ != null) {
subBuilder = hedgePolicy_.toBuilder();
}
hedgePolicy_ = input.readMessage(io.envoyproxy.envoy.api.v2.route.HedgePolicy.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(hedgePolicy_);
hedgePolicy_ = subBuilder.buildPartial();
}
break;
}
case 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.api.v2.route.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.RegexMatchAndSubstitute.Builder subBuilder = null;
if (regexRewrite_ != null) {
subBuilder = regexRewrite_.toBuilder();
}
regexRewrite_ = input.readMessage(io.envoyproxy.envoy.type.matcher.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;
}
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.api.v2.route.RouteComponentsProto.internal_static_envoy_api_v2_route_RouteAction_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.api.v2.route.RouteComponentsProto.internal_static_envoy_api_v2_route_RouteAction_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.api.v2.route.RouteAction.class, io.envoyproxy.envoy.api.v2.route.RouteAction.Builder.class);
}
/**
* Protobuf enum {@code envoy.api.v2.route.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;
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;
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.api.v2.route.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.api.v2.route.RouteAction.ClusterNotFoundResponseCode)
}
/**
*
*
* Protobuf enum {@code envoy.api.v2.route.RouteAction.InternalRedirectAction}
*/
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.api.v2.route.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.api.v2.route.RouteAction.InternalRedirectAction)
}
public interface RequestMirrorPolicyOrBuilder extends
// @@protoc_insertion_point(interface_extends:envoy.api.v2.route.RouteAction.RequestMirrorPolicy)
com.google.protobuf.MessageOrBuilder {
/**
*
* Specifies the cluster that requests will be mirrored to. The cluster must
* exist in the cluster manager configuration.
*
* If not specified, all requests to the target cluster will be mirrored. If
* specified, Envoy will lookup the runtime key to get the % of requests to
* mirror. Valid values are from 0 to 10000, allowing for increments of
* 0.01% of requests to be mirrored. If the runtime key is specified in the
* configuration but not present in runtime, 0 is the default and thus 0% of
* requests will be mirrored.
* .. attention::
* **This field is deprecated**. Set the
* :ref:`runtime_fraction
* <envoy_api_field_route.RouteAction.RequestMirrorPolicy.runtime_fraction>`
* field instead. Mirroring occurs if both this and
* <envoy_api_field_route.RouteAction.RequestMirrorPolicy.runtime_fraction>`
* are not set.
*
*
* string runtime_key = 2 [deprecated = true, (.envoy.annotations.disallowed_by_default) = true];
* @deprecated envoy.api.v2.route.RouteAction.RequestMirrorPolicy.runtime_key is deprecated.
* See envoy/api/v2/route/route_components.proto;l=606
* @return The runtimeKey.
*/
@java.lang.Deprecated java.lang.String getRuntimeKey();
/**
*
* If not specified, all requests to the target cluster will be mirrored. If
* specified, Envoy will lookup the runtime key to get the % of requests to
* mirror. Valid values are from 0 to 10000, allowing for increments of
* 0.01% of requests to be mirrored. If the runtime key is specified in the
* configuration but not present in runtime, 0 is the default and thus 0% of
* requests will be mirrored.
* .. attention::
* **This field is deprecated**. Set the
* :ref:`runtime_fraction
* <envoy_api_field_route.RouteAction.RequestMirrorPolicy.runtime_fraction>`
* field instead. Mirroring occurs if both this and
* <envoy_api_field_route.RouteAction.RequestMirrorPolicy.runtime_fraction>`
* are not set.
*
*
* string runtime_key = 2 [deprecated = true, (.envoy.annotations.disallowed_by_default) = true];
* @deprecated envoy.api.v2.route.RouteAction.RequestMirrorPolicy.runtime_key is deprecated.
* See envoy/api/v2/route/route_components.proto;l=606
* @return The bytes for runtimeKey.
*/
@java.lang.Deprecated com.google.protobuf.ByteString
getRuntimeKeyBytes();
/**
*
* 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.api.v2.core.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.
*
*
* Protobuf type {@code envoy.api.v2.route.RouteAction.RequestMirrorPolicy}
*/
public static final class RequestMirrorPolicy extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.api.v2.route.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_ = "";
runtimeKey_ = "";
}
@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 18: {
java.lang.String s = input.readStringRequireUtf8();
runtimeKey_ = s;
break;
}
case 26: {
io.envoyproxy.envoy.api.v2.core.RuntimeFractionalPercent.Builder subBuilder = null;
if (runtimeFraction_ != null) {
subBuilder = runtimeFraction_.toBuilder();
}
runtimeFraction_ = input.readMessage(io.envoyproxy.envoy.api.v2.core.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;
}
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.api.v2.route.RouteComponentsProto.internal_static_envoy_api_v2_route_RouteAction_RequestMirrorPolicy_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.api.v2.route.RouteComponentsProto.internal_static_envoy_api_v2_route_RouteAction_RequestMirrorPolicy_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy.class, io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy.Builder.class);
}
public static final int CLUSTER_FIELD_NUMBER = 1;
private volatile java.lang.Object cluster_;
/**
*
* Specifies the cluster that requests will be mirrored to. The cluster must
* exist in the cluster manager configuration.
*
* Specifies the cluster that requests will be mirrored to. The cluster must
* exist in the cluster manager configuration.
*
*
* string cluster = 1 [(.validate.rules) = { ... }
* @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 RUNTIME_KEY_FIELD_NUMBER = 2;
private volatile java.lang.Object runtimeKey_;
/**
*
* If not specified, all requests to the target cluster will be mirrored. If
* specified, Envoy will lookup the runtime key to get the % of requests to
* mirror. Valid values are from 0 to 10000, allowing for increments of
* 0.01% of requests to be mirrored. If the runtime key is specified in the
* configuration but not present in runtime, 0 is the default and thus 0% of
* requests will be mirrored.
* .. attention::
* **This field is deprecated**. Set the
* :ref:`runtime_fraction
* <envoy_api_field_route.RouteAction.RequestMirrorPolicy.runtime_fraction>`
* field instead. Mirroring occurs if both this and
* <envoy_api_field_route.RouteAction.RequestMirrorPolicy.runtime_fraction>`
* are not set.
*
* If not specified, all requests to the target cluster will be mirrored. If
* specified, Envoy will lookup the runtime key to get the % of requests to
* mirror. Valid values are from 0 to 10000, allowing for increments of
* 0.01% of requests to be mirrored. If the runtime key is specified in the
* configuration but not present in runtime, 0 is the default and thus 0% of
* requests will be mirrored.
* .. attention::
* **This field is deprecated**. Set the
* :ref:`runtime_fraction
* <envoy_api_field_route.RouteAction.RequestMirrorPolicy.runtime_fraction>`
* field instead. Mirroring occurs if both this and
* <envoy_api_field_route.RouteAction.RequestMirrorPolicy.runtime_fraction>`
* are not set.
*
*
* string runtime_key = 2 [deprecated = true, (.envoy.annotations.disallowed_by_default) = true];
* @deprecated envoy.api.v2.route.RouteAction.RequestMirrorPolicy.runtime_key is deprecated.
* See envoy/api/v2/route/route_components.proto;l=606
* @return The bytes for runtimeKey.
*/
@java.lang.Override
@java.lang.Deprecated public com.google.protobuf.ByteString
getRuntimeKeyBytes() {
java.lang.Object ref = runtimeKey_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
runtimeKey_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int RUNTIME_FRACTION_FIELD_NUMBER = 3;
private io.envoyproxy.envoy.api.v2.core.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.api.v2.core.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.api.v2.core.RuntimeFractionalPercent runtime_fraction = 3;
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.core.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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(runtimeKey_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, runtimeKey_);
}
if (runtimeFraction_ != null) {
output.writeMessage(3, getRuntimeFraction());
}
if (traceSampled_ != null) {
output.writeMessage(4, getTraceSampled());
}
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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(runtimeKey_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, runtimeKey_);
}
if (runtimeFraction_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getRuntimeFraction());
}
if (traceSampled_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getTraceSampled());
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy)) {
return super.equals(obj);
}
io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy other = (io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy) obj;
if (!getCluster()
.equals(other.getCluster())) return false;
if (!getRuntimeKey()
.equals(other.getRuntimeKey())) 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) + RUNTIME_KEY_FIELD_NUMBER;
hash = (53 * hash) + getRuntimeKey().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.api.v2.route.RouteAction.RequestMirrorPolicy parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.api.v2.route.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.api.v2.route.RouteAction.RequestMirrorPolicy parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.api.v2.route.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.api.v2.route.RouteAction.RequestMirrorPolicy parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.api.v2.route.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.api.v2.route.RouteAction.RequestMirrorPolicy parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.api.v2.route.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.api.v2.route.RouteAction.RequestMirrorPolicy parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.api.v2.route.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.api.v2.route.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.api.v2.route.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.api.v2.route.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.
*
*
* Protobuf type {@code envoy.api.v2.route.RouteAction.RequestMirrorPolicy}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.api.v2.route.RouteAction.RequestMirrorPolicy)
io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicyOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.api.v2.route.RouteComponentsProto.internal_static_envoy_api_v2_route_RouteAction_RequestMirrorPolicy_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.api.v2.route.RouteComponentsProto.internal_static_envoy_api_v2_route_RouteAction_RequestMirrorPolicy_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy.class, io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy.Builder.class);
}
// Construct using io.envoyproxy.envoy.api.v2.route.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_ = "";
runtimeKey_ = "";
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.api.v2.route.RouteComponentsProto.internal_static_envoy_api_v2_route_RouteAction_RequestMirrorPolicy_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy getDefaultInstanceForType() {
return io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy build() {
io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy buildPartial() {
io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy result = new io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy(this);
result.cluster_ = cluster_;
result.runtimeKey_ = runtimeKey_;
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.api.v2.route.RouteAction.RequestMirrorPolicy) {
return mergeFrom((io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy other) {
if (other == io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy.getDefaultInstance()) return this;
if (!other.getCluster().isEmpty()) {
cluster_ = other.cluster_;
onChanged();
}
if (!other.getRuntimeKey().isEmpty()) {
runtimeKey_ = other.runtimeKey_;
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.api.v2.route.RouteAction.RequestMirrorPolicy parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object cluster_ = "";
/**
*
* Specifies the cluster that requests will be mirrored to. The cluster must
* exist in the cluster manager configuration.
*
* Specifies the cluster that requests will be mirrored to. The cluster must
* exist in the cluster manager configuration.
*
*
* 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);
cluster_ = value;
onChanged();
return this;
}
private java.lang.Object runtimeKey_ = "";
/**
*
* If not specified, all requests to the target cluster will be mirrored. If
* specified, Envoy will lookup the runtime key to get the % of requests to
* mirror. Valid values are from 0 to 10000, allowing for increments of
* 0.01% of requests to be mirrored. If the runtime key is specified in the
* configuration but not present in runtime, 0 is the default and thus 0% of
* requests will be mirrored.
* .. attention::
* **This field is deprecated**. Set the
* :ref:`runtime_fraction
* <envoy_api_field_route.RouteAction.RequestMirrorPolicy.runtime_fraction>`
* field instead. Mirroring occurs if both this and
* <envoy_api_field_route.RouteAction.RequestMirrorPolicy.runtime_fraction>`
* are not set.
*
* If not specified, all requests to the target cluster will be mirrored. If
* specified, Envoy will lookup the runtime key to get the % of requests to
* mirror. Valid values are from 0 to 10000, allowing for increments of
* 0.01% of requests to be mirrored. If the runtime key is specified in the
* configuration but not present in runtime, 0 is the default and thus 0% of
* requests will be mirrored.
* .. attention::
* **This field is deprecated**. Set the
* :ref:`runtime_fraction
* <envoy_api_field_route.RouteAction.RequestMirrorPolicy.runtime_fraction>`
* field instead. Mirroring occurs if both this and
* <envoy_api_field_route.RouteAction.RequestMirrorPolicy.runtime_fraction>`
* are not set.
*
*
* string runtime_key = 2 [deprecated = true, (.envoy.annotations.disallowed_by_default) = true];
* @deprecated envoy.api.v2.route.RouteAction.RequestMirrorPolicy.runtime_key is deprecated.
* See envoy/api/v2/route/route_components.proto;l=606
* @return The bytes for runtimeKey.
*/
@java.lang.Deprecated public com.google.protobuf.ByteString
getRuntimeKeyBytes() {
java.lang.Object ref = runtimeKey_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
runtimeKey_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* If not specified, all requests to the target cluster will be mirrored. If
* specified, Envoy will lookup the runtime key to get the % of requests to
* mirror. Valid values are from 0 to 10000, allowing for increments of
* 0.01% of requests to be mirrored. If the runtime key is specified in the
* configuration but not present in runtime, 0 is the default and thus 0% of
* requests will be mirrored.
* .. attention::
* **This field is deprecated**. Set the
* :ref:`runtime_fraction
* <envoy_api_field_route.RouteAction.RequestMirrorPolicy.runtime_fraction>`
* field instead. Mirroring occurs if both this and
* <envoy_api_field_route.RouteAction.RequestMirrorPolicy.runtime_fraction>`
* are not set.
*
*
* string runtime_key = 2 [deprecated = true, (.envoy.annotations.disallowed_by_default) = true];
* @deprecated envoy.api.v2.route.RouteAction.RequestMirrorPolicy.runtime_key is deprecated.
* See envoy/api/v2/route/route_components.proto;l=606
* @param value The runtimeKey to set.
* @return This builder for chaining.
*/
@java.lang.Deprecated public Builder setRuntimeKey(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
runtimeKey_ = value;
onChanged();
return this;
}
/**
*
* If not specified, all requests to the target cluster will be mirrored. If
* specified, Envoy will lookup the runtime key to get the % of requests to
* mirror. Valid values are from 0 to 10000, allowing for increments of
* 0.01% of requests to be mirrored. If the runtime key is specified in the
* configuration but not present in runtime, 0 is the default and thus 0% of
* requests will be mirrored.
* .. attention::
* **This field is deprecated**. Set the
* :ref:`runtime_fraction
* <envoy_api_field_route.RouteAction.RequestMirrorPolicy.runtime_fraction>`
* field instead. Mirroring occurs if both this and
* <envoy_api_field_route.RouteAction.RequestMirrorPolicy.runtime_fraction>`
* are not set.
*
*
* string runtime_key = 2 [deprecated = true, (.envoy.annotations.disallowed_by_default) = true];
* @deprecated envoy.api.v2.route.RouteAction.RequestMirrorPolicy.runtime_key is deprecated.
* See envoy/api/v2/route/route_components.proto;l=606
* @return This builder for chaining.
*/
@java.lang.Deprecated public Builder clearRuntimeKey() {
runtimeKey_ = getDefaultInstance().getRuntimeKey();
onChanged();
return this;
}
/**
*
* If not specified, all requests to the target cluster will be mirrored. If
* specified, Envoy will lookup the runtime key to get the % of requests to
* mirror. Valid values are from 0 to 10000, allowing for increments of
* 0.01% of requests to be mirrored. If the runtime key is specified in the
* configuration but not present in runtime, 0 is the default and thus 0% of
* requests will be mirrored.
* .. attention::
* **This field is deprecated**. Set the
* :ref:`runtime_fraction
* <envoy_api_field_route.RouteAction.RequestMirrorPolicy.runtime_fraction>`
* field instead. Mirroring occurs if both this and
* <envoy_api_field_route.RouteAction.RequestMirrorPolicy.runtime_fraction>`
* are not set.
*
*
* string runtime_key = 2 [deprecated = true, (.envoy.annotations.disallowed_by_default) = true];
* @deprecated envoy.api.v2.route.RouteAction.RequestMirrorPolicy.runtime_key is deprecated.
* See envoy/api/v2/route/route_components.proto;l=606
* @param value The bytes for runtimeKey to set.
* @return This builder for chaining.
*/
@java.lang.Deprecated public Builder setRuntimeKeyBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
runtimeKey_ = value;
onChanged();
return this;
}
private io.envoyproxy.envoy.api.v2.core.RuntimeFractionalPercent runtimeFraction_;
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.api.v2.core.RuntimeFractionalPercent, io.envoyproxy.envoy.api.v2.core.RuntimeFractionalPercent.Builder, io.envoyproxy.envoy.api.v2.core.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.api.v2.core.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.api.v2.core.RuntimeFractionalPercent runtime_fraction = 3;
*/
public Builder setRuntimeFraction(io.envoyproxy.envoy.api.v2.core.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.api.v2.route.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.api.v2.route.RouteAction.HashPolicy}
*/
public static final class HashPolicy extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.api.v2.route.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.api.v2.route.RouteAction.HashPolicy.Header.Builder subBuilder = null;
if (policySpecifierCase_ == 1) {
subBuilder = ((io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Header) policySpecifier_).toBuilder();
}
policySpecifier_ =
input.readMessage(io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Header.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Header) policySpecifier_);
policySpecifier_ = subBuilder.buildPartial();
}
policySpecifierCase_ = 1;
break;
}
case 18: {
io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Cookie.Builder subBuilder = null;
if (policySpecifierCase_ == 2) {
subBuilder = ((io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Cookie) policySpecifier_).toBuilder();
}
policySpecifier_ =
input.readMessage(io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Cookie.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Cookie) policySpecifier_);
policySpecifier_ = subBuilder.buildPartial();
}
policySpecifierCase_ = 2;
break;
}
case 26: {
io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.ConnectionProperties.Builder subBuilder = null;
if (policySpecifierCase_ == 3) {
subBuilder = ((io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.ConnectionProperties) policySpecifier_).toBuilder();
}
policySpecifier_ =
input.readMessage(io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.ConnectionProperties.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.ConnectionProperties) policySpecifier_);
policySpecifier_ = subBuilder.buildPartial();
}
policySpecifierCase_ = 3;
break;
}
case 32: {
terminal_ = input.readBool();
break;
}
case 42: {
io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter.Builder subBuilder = null;
if (policySpecifierCase_ == 5) {
subBuilder = ((io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter) policySpecifier_).toBuilder();
}
policySpecifier_ =
input.readMessage(io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter) policySpecifier_);
policySpecifier_ = subBuilder.buildPartial();
}
policySpecifierCase_ = 5;
break;
}
case 50: {
io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.FilterState.Builder subBuilder = null;
if (policySpecifierCase_ == 6) {
subBuilder = ((io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.FilterState) policySpecifier_).toBuilder();
}
policySpecifier_ =
input.readMessage(io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.FilterState.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((io.envoyproxy.envoy.api.v2.route.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.api.v2.route.RouteComponentsProto.internal_static_envoy_api_v2_route_RouteAction_HashPolicy_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.api.v2.route.RouteComponentsProto.internal_static_envoy_api_v2_route_RouteAction_HashPolicy_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.class, io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Builder.class);
}
public interface HeaderOrBuilder extends
// @@protoc_insertion_point(interface_extends:envoy.api.v2.route.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.
*
* 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 header_name = 1 [(.validate.rules) = { ... }
* @param value The bytes for headerName to set.
* @return This builder for chaining.
*/
public Builder setHeaderNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
headerName_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:envoy.api.v2.route.RouteAction.HashPolicy.Header)
}
// @@protoc_insertion_point(class_scope:envoy.api.v2.route.RouteAction.HashPolicy.Header)
private static final io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Header DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Header();
}
public static io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Header getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Header parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Header(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Header getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface CookieOrBuilder extends
// @@protoc_insertion_point(interface_extends:envoy.api.v2.route.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.
*
* The name of the path for the cookie. If no path is specified here, no path
* will be set for the cookie.
*
*
* string path = 3;
* @return The bytes for path.
*/
com.google.protobuf.ByteString
getPathBytes();
}
/**
*
* 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.api.v2.route.RouteAction.HashPolicy.Cookie}
*/
public static final class Cookie extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.api.v2.route.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_ = "";
}
@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();
}
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;
}
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.api.v2.route.RouteComponentsProto.internal_static_envoy_api_v2_route_RouteAction_HashPolicy_Cookie_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.api.v2.route.RouteComponentsProto.internal_static_envoy_api_v2_route_RouteAction_HashPolicy_Cookie_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Cookie.class, io.envoyproxy.envoy.api.v2.route.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.
*
* The name of the path for the cookie. If no path is specified here, no path
* will be set for the cookie.
*
*
* string path = 3;
* @return The bytes for path.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getPathBytes() {
java.lang.Object ref = path_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
path_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (ttl_ != null) {
output.writeMessage(2, getTtl());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, path_);
}
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_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Cookie)) {
return super.equals(obj);
}
io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Cookie other = (io.envoyproxy.envoy.api.v2.route.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 (!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();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Cookie parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.api.v2.route.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.api.v2.route.RouteAction.HashPolicy.Cookie parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.api.v2.route.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.api.v2.route.RouteAction.HashPolicy.Cookie parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.api.v2.route.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.api.v2.route.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.api.v2.route.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.api.v2.route.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.api.v2.route.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.api.v2.route.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.api.v2.route.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.api.v2.route.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.
*
*
* Protobuf type {@code envoy.api.v2.route.RouteAction.HashPolicy.Cookie}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.api.v2.route.RouteAction.HashPolicy.Cookie)
io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.CookieOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.api.v2.route.RouteComponentsProto.internal_static_envoy_api_v2_route_RouteAction_HashPolicy_Cookie_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.api.v2.route.RouteComponentsProto.internal_static_envoy_api_v2_route_RouteAction_HashPolicy_Cookie_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Cookie.class, io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Cookie.Builder.class);
}
// Construct using io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Cookie.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_ = "";
if (ttlBuilder_ == null) {
ttl_ = null;
} else {
ttl_ = null;
ttlBuilder_ = null;
}
path_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.api.v2.route.RouteComponentsProto.internal_static_envoy_api_v2_route_RouteAction_HashPolicy_Cookie_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Cookie getDefaultInstanceForType() {
return io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Cookie.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Cookie build() {
io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Cookie result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Cookie buildPartial() {
io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Cookie result = new io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Cookie(this);
result.name_ = name_;
if (ttlBuilder_ == null) {
result.ttl_ = ttl_;
} else {
result.ttl_ = ttlBuilder_.build();
}
result.path_ = path_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Cookie) {
return mergeFrom((io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Cookie)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Cookie other) {
if (other == io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Cookie.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
onChanged();
}
if (other.hasTtl()) {
mergeTtl(other.getTtl());
}
if (!other.getPath().isEmpty()) {
path_ = other.path_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Cookie parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Cookie) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private 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.
*/
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.api.v2.route.RouteAction.HashPolicy.ConnectionProperties)
}
// @@protoc_insertion_point(class_scope:envoy.api.v2.route.RouteAction.HashPolicy.ConnectionProperties)
private static final io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.ConnectionProperties DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.ConnectionProperties();
}
public static io.envoyproxy.envoy.api.v2.route.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.api.v2.route.RouteAction.HashPolicy.ConnectionProperties getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface QueryParameterOrBuilder extends
// @@protoc_insertion_point(interface_extends:envoy.api.v2.route.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.
*
*
* 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.
*
*
* string name = 1 [(.validate.rules) = { ... }
* @return The bytes for name.
*/
com.google.protobuf.ByteString
getNameBytes();
}
/**
* Protobuf type {@code envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter}
*/
public static final class QueryParameter extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.api.v2.route.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.api.v2.route.RouteComponentsProto.internal_static_envoy_api_v2_route_RouteAction_HashPolicy_QueryParameter_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.api.v2.route.RouteComponentsProto.internal_static_envoy_api_v2_route_RouteAction_HashPolicy_QueryParameter_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter.class, io.envoyproxy.envoy.api.v2.route.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.
*
* 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.
*
*
* 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.api.v2.route.RouteAction.HashPolicy.QueryParameter)) {
return super.equals(obj);
}
io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter other = (io.envoyproxy.envoy.api.v2.route.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.api.v2.route.RouteAction.HashPolicy.QueryParameter parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.api.v2.route.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.api.v2.route.RouteAction.HashPolicy.QueryParameter parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.api.v2.route.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.api.v2.route.RouteAction.HashPolicy.QueryParameter parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.api.v2.route.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.api.v2.route.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.api.v2.route.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.api.v2.route.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.api.v2.route.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.api.v2.route.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.api.v2.route.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.api.v2.route.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.api.v2.route.RouteAction.HashPolicy.QueryParameter}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter)
io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.QueryParameterOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.api.v2.route.RouteComponentsProto.internal_static_envoy_api_v2_route_RouteAction_HashPolicy_QueryParameter_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.api.v2.route.RouteComponentsProto.internal_static_envoy_api_v2_route_RouteAction_HashPolicy_QueryParameter_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter.class, io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter.Builder.class);
}
// Construct using io.envoyproxy.envoy.api.v2.route.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.api.v2.route.RouteComponentsProto.internal_static_envoy_api_v2_route_RouteAction_HashPolicy_QueryParameter_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter getDefaultInstanceForType() {
return io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter build() {
io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter buildPartial() {
io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter result = new io.envoyproxy.envoy.api.v2.route.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.api.v2.route.RouteAction.HashPolicy.QueryParameter) {
return mergeFrom((io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter other) {
if (other == io.envoyproxy.envoy.api.v2.route.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.api.v2.route.RouteAction.HashPolicy.QueryParameter parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.api.v2.route.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.
*
* 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.
*
*
* 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.
*
*
* 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.
*
*
* 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.
*
*
* 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.api.v2.route.RouteAction.HashPolicy.QueryParameter)
}
// @@protoc_insertion_point(class_scope:envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter)
private static final io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter();
}
public static io.envoyproxy.envoy.api.v2.route.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.api.v2.route.RouteAction.HashPolicy.QueryParameter getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface FilterStateOrBuilder extends
// @@protoc_insertion_point(interface_extends:envoy.api.v2.route.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.api.v2.route.RouteAction.HashPolicy.FilterState}
*/
public static final class FilterState extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.api.v2.route.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.api.v2.route.RouteComponentsProto.internal_static_envoy_api_v2_route_RouteAction_HashPolicy_FilterState_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.api.v2.route.RouteComponentsProto.internal_static_envoy_api_v2_route_RouteAction_HashPolicy_FilterState_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.FilterState.class, io.envoyproxy.envoy.api.v2.route.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.api.v2.route.RouteAction.HashPolicy.FilterState)) {
return super.equals(obj);
}
io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.FilterState other = (io.envoyproxy.envoy.api.v2.route.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.api.v2.route.RouteAction.HashPolicy.FilterState parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.api.v2.route.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.api.v2.route.RouteAction.HashPolicy.FilterState parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.api.v2.route.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.api.v2.route.RouteAction.HashPolicy.FilterState parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.api.v2.route.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.api.v2.route.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.api.v2.route.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.api.v2.route.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.api.v2.route.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.api.v2.route.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.api.v2.route.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.api.v2.route.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.api.v2.route.RouteAction.HashPolicy.FilterState}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.api.v2.route.RouteAction.HashPolicy.FilterState)
io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.FilterStateOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.api.v2.route.RouteComponentsProto.internal_static_envoy_api_v2_route_RouteAction_HashPolicy_FilterState_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.api.v2.route.RouteComponentsProto.internal_static_envoy_api_v2_route_RouteAction_HashPolicy_FilterState_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.FilterState.class, io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.FilterState.Builder.class);
}
// Construct using io.envoyproxy.envoy.api.v2.route.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.api.v2.route.RouteComponentsProto.internal_static_envoy_api_v2_route_RouteAction_HashPolicy_FilterState_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.FilterState getDefaultInstanceForType() {
return io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.FilterState.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.FilterState build() {
io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.FilterState result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.FilterState buildPartial() {
io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.FilterState result = new io.envoyproxy.envoy.api.v2.route.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.api.v2.route.RouteAction.HashPolicy.FilterState) {
return mergeFrom((io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.FilterState)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.FilterState other) {
if (other == io.envoyproxy.envoy.api.v2.route.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.api.v2.route.RouteAction.HashPolicy.FilterState parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.api.v2.route.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.api.v2.route.RouteAction.HashPolicy.FilterState)
}
// @@protoc_insertion_point(class_scope:envoy.api.v2.route.RouteAction.HashPolicy.FilterState)
private static final io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.FilterState DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.FilterState();
}
public static io.envoyproxy.envoy.api.v2.route.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.api.v2.route.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.api.v2.route.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.api.v2.route.RouteAction.HashPolicy.Header header = 1;
* @return The header.
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Header getHeader() {
if (policySpecifierCase_ == 1) {
return (io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Header) policySpecifier_;
}
return io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Header.getDefaultInstance();
}
/**
*
* Header hash policy.
*
*
* .envoy.api.v2.route.RouteAction.HashPolicy.Header header = 1;
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.HeaderOrBuilder getHeaderOrBuilder() {
if (policySpecifierCase_ == 1) {
return (io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Header) policySpecifier_;
}
return io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Header.getDefaultInstance();
}
public static final int COOKIE_FIELD_NUMBER = 2;
/**
*
* Cookie hash policy.
*
*
* .envoy.api.v2.route.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.api.v2.route.RouteAction.HashPolicy.Cookie cookie = 2;
* @return The cookie.
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Cookie getCookie() {
if (policySpecifierCase_ == 2) {
return (io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Cookie) policySpecifier_;
}
return io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Cookie.getDefaultInstance();
}
/**
*
* Cookie hash policy.
*
*
* .envoy.api.v2.route.RouteAction.HashPolicy.Cookie cookie = 2;
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.CookieOrBuilder getCookieOrBuilder() {
if (policySpecifierCase_ == 2) {
return (io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Cookie) policySpecifier_;
}
return io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Cookie.getDefaultInstance();
}
public static final int CONNECTION_PROPERTIES_FIELD_NUMBER = 3;
/**
*
* Connection properties hash policy.
*
*
* .envoy.api.v2.route.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.api.v2.route.RouteAction.HashPolicy.ConnectionProperties connection_properties = 3;
* @return The connectionProperties.
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.ConnectionProperties getConnectionProperties() {
if (policySpecifierCase_ == 3) {
return (io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.ConnectionProperties) policySpecifier_;
}
return io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.ConnectionProperties.getDefaultInstance();
}
/**
*
* Connection properties hash policy.
*
*
* .envoy.api.v2.route.RouteAction.HashPolicy.ConnectionProperties connection_properties = 3;
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.ConnectionPropertiesOrBuilder getConnectionPropertiesOrBuilder() {
if (policySpecifierCase_ == 3) {
return (io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.ConnectionProperties) policySpecifier_;
}
return io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.ConnectionProperties.getDefaultInstance();
}
public static final int QUERY_PARAMETER_FIELD_NUMBER = 5;
/**
*
* Query parameter hash policy.
*
*
* .envoy.api.v2.route.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.api.v2.route.RouteAction.HashPolicy.QueryParameter query_parameter = 5;
* @return The queryParameter.
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter getQueryParameter() {
if (policySpecifierCase_ == 5) {
return (io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter) policySpecifier_;
}
return io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter.getDefaultInstance();
}
/**
*
* Query parameter hash policy.
*
*
* .envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter query_parameter = 5;
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.QueryParameterOrBuilder getQueryParameterOrBuilder() {
if (policySpecifierCase_ == 5) {
return (io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter) policySpecifier_;
}
return io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter.getDefaultInstance();
}
public static final int FILTER_STATE_FIELD_NUMBER = 6;
/**
*
* Filter state hash policy.
*
*
* .envoy.api.v2.route.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.api.v2.route.RouteAction.HashPolicy.FilterState filter_state = 6;
* @return The filterState.
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.FilterState getFilterState() {
if (policySpecifierCase_ == 6) {
return (io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.FilterState) policySpecifier_;
}
return io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.FilterState.getDefaultInstance();
}
/**
*
* Filter state hash policy.
*
*
* .envoy.api.v2.route.RouteAction.HashPolicy.FilterState filter_state = 6;
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.FilterStateOrBuilder getFilterStateOrBuilder() {
if (policySpecifierCase_ == 6) {
return (io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.FilterState) policySpecifier_;
}
return io.envoyproxy.envoy.api.v2.route.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.api.v2.route.RouteAction.HashPolicy.Header) policySpecifier_);
}
if (policySpecifierCase_ == 2) {
output.writeMessage(2, (io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Cookie) policySpecifier_);
}
if (policySpecifierCase_ == 3) {
output.writeMessage(3, (io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.ConnectionProperties) policySpecifier_);
}
if (terminal_ != false) {
output.writeBool(4, terminal_);
}
if (policySpecifierCase_ == 5) {
output.writeMessage(5, (io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter) policySpecifier_);
}
if (policySpecifierCase_ == 6) {
output.writeMessage(6, (io.envoyproxy.envoy.api.v2.route.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.api.v2.route.RouteAction.HashPolicy.Header) policySpecifier_);
}
if (policySpecifierCase_ == 2) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, (io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Cookie) policySpecifier_);
}
if (policySpecifierCase_ == 3) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, (io.envoyproxy.envoy.api.v2.route.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.api.v2.route.RouteAction.HashPolicy.QueryParameter) policySpecifier_);
}
if (policySpecifierCase_ == 6) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, (io.envoyproxy.envoy.api.v2.route.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.api.v2.route.RouteAction.HashPolicy)) {
return super.equals(obj);
}
io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy other = (io.envoyproxy.envoy.api.v2.route.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.api.v2.route.RouteAction.HashPolicy parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.api.v2.route.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.api.v2.route.RouteAction.HashPolicy parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.api.v2.route.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.api.v2.route.RouteAction.HashPolicy parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.api.v2.route.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.api.v2.route.RouteAction.HashPolicy parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.api.v2.route.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.api.v2.route.RouteAction.HashPolicy parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.api.v2.route.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.api.v2.route.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.api.v2.route.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.api.v2.route.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.api.v2.route.RouteAction.HashPolicy}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.api.v2.route.RouteAction.HashPolicy)
io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicyOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.api.v2.route.RouteComponentsProto.internal_static_envoy_api_v2_route_RouteAction_HashPolicy_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.api.v2.route.RouteComponentsProto.internal_static_envoy_api_v2_route_RouteAction_HashPolicy_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.class, io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Builder.class);
}
// Construct using io.envoyproxy.envoy.api.v2.route.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.api.v2.route.RouteComponentsProto.internal_static_envoy_api_v2_route_RouteAction_HashPolicy_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy getDefaultInstanceForType() {
return io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy build() {
io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy buildPartial() {
io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy result = new io.envoyproxy.envoy.api.v2.route.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.api.v2.route.RouteAction.HashPolicy) {
return mergeFrom((io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy other) {
if (other == io.envoyproxy.envoy.api.v2.route.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.api.v2.route.RouteAction.HashPolicy parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.api.v2.route.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.api.v2.route.RouteAction.HashPolicy.Header, io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Header.Builder, io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.HeaderOrBuilder> headerBuilder_;
/**
*
* Header hash policy.
*
*
* .envoy.api.v2.route.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.api.v2.route.RouteAction.HashPolicy.Header header = 1;
* @return The header.
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Header getHeader() {
if (headerBuilder_ == null) {
if (policySpecifierCase_ == 1) {
return (io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Header) policySpecifier_;
}
return io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Header.getDefaultInstance();
} else {
if (policySpecifierCase_ == 1) {
return headerBuilder_.getMessage();
}
return io.envoyproxy.envoy.api.v2.route.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.api.v2.route.RouteAction.HashPolicy)
}
// @@protoc_insertion_point(class_scope:envoy.api.v2.route.RouteAction.HashPolicy)
private static final io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy();
}
public static io.envoyproxy.envoy.api.v2.route.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.api.v2.route.RouteAction.HashPolicy getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface UpgradeConfigOrBuilder extends
// @@protoc_insertion_point(interface_extends:envoy.api.v2.route.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.
*
* 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_api_field_config.filter.network.http_connection_manager.v2.HttpConnectionManager.upgrade_configs>`
* but does not affect any custom filter chain specified there.
*
*
* Protobuf type {@code envoy.api.v2.route.RouteAction.UpgradeConfig}
*/
public static final class UpgradeConfig extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.api.v2.route.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;
}
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.api.v2.route.RouteComponentsProto.internal_static_envoy_api_v2_route_RouteAction_UpgradeConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.api.v2.route.RouteComponentsProto.internal_static_envoy_api_v2_route_RouteAction_UpgradeConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig.class, io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig.Builder.class);
}
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();
}
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());
}
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());
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig)) {
return super.equals(obj);
}
io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig other = (io.envoyproxy.envoy.api.v2.route.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 (!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();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.api.v2.route.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.api.v2.route.RouteAction.UpgradeConfig parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.api.v2.route.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.api.v2.route.RouteAction.UpgradeConfig parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.api.v2.route.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.api.v2.route.RouteAction.UpgradeConfig parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.api.v2.route.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.api.v2.route.RouteAction.UpgradeConfig parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.api.v2.route.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.api.v2.route.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.api.v2.route.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.api.v2.route.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_api_field_config.filter.network.http_connection_manager.v2.HttpConnectionManager.upgrade_configs>`
* but does not affect any custom filter chain specified there.
*
*
* Protobuf type {@code envoy.api.v2.route.RouteAction.UpgradeConfig}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.api.v2.route.RouteAction.UpgradeConfig)
io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfigOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.api.v2.route.RouteComponentsProto.internal_static_envoy_api_v2_route_RouteAction_UpgradeConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.api.v2.route.RouteComponentsProto.internal_static_envoy_api_v2_route_RouteAction_UpgradeConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig.class, io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig.Builder.class);
}
// Construct using io.envoyproxy.envoy.api.v2.route.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;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.api.v2.route.RouteComponentsProto.internal_static_envoy_api_v2_route_RouteAction_UpgradeConfig_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig getDefaultInstanceForType() {
return io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig build() {
io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig buildPartial() {
io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig result = new io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig(this);
result.upgradeType_ = upgradeType_;
if (enabledBuilder_ == null) {
result.enabled_ = enabled_;
} else {
result.enabled_ = enabledBuilder_.build();
}
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig) {
return mergeFrom((io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig other) {
if (other == io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig.getDefaultInstance()) return this;
if (!other.getUpgradeType().isEmpty()) {
upgradeType_ = other.upgradeType_;
onChanged();
}
if (other.hasEnabled()) {
mergeEnabled(other.getEnabled());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.api.v2.route.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.
*
* 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.api.v2.route.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.api.v2.route.WeightedCluster weighted_clusters = 3;
* @return The weightedClusters.
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.WeightedCluster getWeightedClusters() {
if (clusterSpecifierCase_ == 3) {
return (io.envoyproxy.envoy.api.v2.route.WeightedCluster) clusterSpecifier_;
}
return io.envoyproxy.envoy.api.v2.route.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.api.v2.route.WeightedCluster weighted_clusters = 3;
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.WeightedClusterOrBuilder getWeightedClustersOrBuilder() {
if (clusterSpecifierCase_ == 3) {
return (io.envoyproxy.envoy.api.v2.route.WeightedCluster) clusterSpecifier_;
}
return io.envoyproxy.envoy.api.v2.route.WeightedCluster.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.api.v2.route.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.api.v2.route.RouteAction.ClusterNotFoundResponseCode cluster_not_found_response_code = 20 [(.validate.rules) = { ... }
* @return The clusterNotFoundResponseCode.
*/
@java.lang.Override public io.envoyproxy.envoy.api.v2.route.RouteAction.ClusterNotFoundResponseCode getClusterNotFoundResponseCode() {
@SuppressWarnings("deprecation")
io.envoyproxy.envoy.api.v2.route.RouteAction.ClusterNotFoundResponseCode result = io.envoyproxy.envoy.api.v2.route.RouteAction.ClusterNotFoundResponseCode.valueOf(clusterNotFoundResponseCode_);
return result == null ? io.envoyproxy.envoy.api.v2.route.RouteAction.ClusterNotFoundResponseCode.UNRECOGNIZED : result;
}
public static final int METADATA_MATCH_FIELD_NUMBER = 4;
private io.envoyproxy.envoy.api.v2.core.Metadata metadataMatch_;
/**
*
* Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints
* in the upstream cluster with metadata matching what's set in this field will be considered
* for load balancing. If using :ref:`weighted_clusters
* <envoy_api_field_route.RouteAction.weighted_clusters>`, metadata will be merged, with values
* provided there taking precedence. The filter name should be specified as *envoy.lb*.
*
*
* .envoy.api.v2.core.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_api_field_route.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_api_field_route.RouteAction.weighted_clusters>`, metadata will be merged, with values
* provided there taking precedence. The filter name should be specified as *envoy.lb*.
*
*
* .envoy.api.v2.core.Metadata metadata_match = 4;
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.core.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 *prefix_rewrite* or
* :ref:`regex_rewrite <envoy_api_field_route.RouteAction.regex_rewrite>`
* may be specified.
* .. attention::
* Pay careful attention to the use of trailing slashes in the
* :ref:`route's match <envoy_api_field_route.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_api_msg_route.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 *prefix_rewrite* or
* :ref:`regex_rewrite <envoy_api_field_route.RouteAction.regex_rewrite>`
* may be specified.
* .. attention::
* Pay careful attention to the use of trailing slashes in the
* :ref:`route's match <envoy_api_field_route.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_api_msg_route.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.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:`prefix_rewrite <envoy_api_field_route.RouteAction.prefix_rewrite>`
* or *regex_rewrite* 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.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:`prefix_rewrite <envoy_api_field_route.RouteAction.prefix_rewrite>`
* or *regex_rewrite* 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:`prefix_rewrite <envoy_api_field_route.RouteAction.prefix_rewrite>`
* or *regex_rewrite* 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.RegexMatchAndSubstitute regex_rewrite = 32;
*/
@java.lang.Override
public io.envoyproxy.envoy.type.matcher.RegexMatchAndSubstituteOrBuilder getRegexRewriteOrBuilder() {
return getRegexRewrite();
}
public static final int HOST_REWRITE_FIELD_NUMBER = 6;
/**
*
* Indicates that during forwarding, the host header will be swapped with
* this value.
*
*
* string host_rewrite = 6 [(.validate.rules) = { ... }
* @return Whether the hostRewrite field is set.
*/
public boolean hasHostRewrite() {
return hostRewriteSpecifierCase_ == 6;
}
/**
*
* Indicates that during forwarding, the host header will be swapped with
* this value.
*
* Indicates that during forwarding, the host header will be swapped with
* this value.
*
*
* string host_rewrite = 6 [(.validate.rules) = { ... }
* @return The bytes for hostRewrite.
*/
public com.google.protobuf.ByteString
getHostRewriteBytes() {
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``, ``LOGICAL_DNS`` or ``STATIC``. For ``STATIC`` clusters, the
* hostname attribute of the endpoint must be configured. Setting this to true
* with other cluster types has no effect.
*
*
* .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``, ``LOGICAL_DNS`` or ``STATIC``. For ``STATIC`` clusters, the
* hostname attribute of the endpoint must be configured. Setting this to true
* with other cluster types has no effect.
*
*
* .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``, ``LOGICAL_DNS`` or ``STATIC``. For ``STATIC`` clusters, the
* hostname attribute of the endpoint must be configured. Setting this to true
* with other cluster types has no effect.
*
*
* .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 AUTO_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.
* .. 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 auto_host_rewrite_header = 29 [(.validate.rules) = { ... }
* @return Whether the autoHostRewriteHeader field is set.
*/
public boolean hasAutoHostRewriteHeader() {
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.
* .. 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.
* .. 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 auto_host_rewrite_header = 29 [(.validate.rules) = { ... }
* @return The bytes for autoHostRewriteHeader.
*/
public com.google.protobuf.ByteString
getAutoHostRewriteHeaderBytes() {
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 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_api_field_config.filter.network.http_connection_manager.v2.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_api_field_route.RouteAction.timeout>`, which provides an upper bound
* on the upstream response time; :ref:`idle_timeout
* <envoy_api_field_route.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.
*
*
* .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_api_field_config.filter.network.http_connection_manager.v2.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_api_field_route.RouteAction.timeout>`, which provides an upper bound
* on the upstream response time; :ref:`idle_timeout
* <envoy_api_field_route.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.
*
* 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_api_field_config.filter.network.http_connection_manager.v2.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_api_field_route.RouteAction.timeout>`, which provides an upper bound
* on the upstream response time; :ref:`idle_timeout
* <envoy_api_field_route.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.
*
*
* .google.protobuf.Duration idle_timeout = 24;
*/
@java.lang.Override
public com.google.protobuf.DurationOrBuilder getIdleTimeoutOrBuilder() {
return getIdleTimeout();
}
public static final int RETRY_POLICY_FIELD_NUMBER = 9;
private io.envoyproxy.envoy.api.v2.route.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.api.v2.route.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.api.v2.route.RetryPolicy retry_policy = 9;
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.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_api_field_route.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_api_field_route.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_api_field_route.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_POLICY_FIELD_NUMBER = 10;
private io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy requestMirrorPolicy_;
/**
*
* Indicates that the route has a request mirroring policy.
* .. attention::
* This field has been deprecated in favor of `request_mirror_policies` which supports one or
* more mirroring policies.
*
*
* .envoy.api.v2.route.RouteAction.RequestMirrorPolicy request_mirror_policy = 10 [deprecated = true];
* @deprecated envoy.api.v2.route.RouteAction.request_mirror_policy is deprecated.
* See envoy/api/v2/route/route_components.proto;l=934
* @return Whether the requestMirrorPolicy field is set.
*/
@java.lang.Override
@java.lang.Deprecated public boolean hasRequestMirrorPolicy() {
return requestMirrorPolicy_ != null;
}
/**
*
* Indicates that the route has a request mirroring policy.
* .. attention::
* This field has been deprecated in favor of `request_mirror_policies` which supports one or
* more mirroring policies.
*
*
* .envoy.api.v2.route.RouteAction.RequestMirrorPolicy request_mirror_policy = 10 [deprecated = true];
* @deprecated envoy.api.v2.route.RouteAction.request_mirror_policy is deprecated.
* See envoy/api/v2/route/route_components.proto;l=934
* @return The requestMirrorPolicy.
*/
@java.lang.Override
@java.lang.Deprecated public io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy getRequestMirrorPolicy() {
return requestMirrorPolicy_ == null ? io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy.getDefaultInstance() : requestMirrorPolicy_;
}
/**
*
* Indicates that the route has a request mirroring policy.
* .. attention::
* This field has been deprecated in favor of `request_mirror_policies` which supports one or
* more mirroring policies.
*
*
* .envoy.api.v2.route.RouteAction.RequestMirrorPolicy request_mirror_policy = 10 [deprecated = true];
*/
@java.lang.Override
@java.lang.Deprecated public io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicyOrBuilder getRequestMirrorPolicyOrBuilder() {
return getRequestMirrorPolicy();
}
public static final int REQUEST_MIRROR_POLICIES_FIELD_NUMBER = 30;
private java.util.List requestMirrorPolicies_;
/**
*
* Indicates that the route has request mirroring policies.
*
* Indicates that the route has request mirroring policies.
*
*
* repeated .envoy.api.v2.route.RouteAction.RequestMirrorPolicy request_mirror_policies = 30;
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.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.api.v2.core.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.api.v2.core.RoutingPriority priority = 11 [(.validate.rules) = { ... }
* @return The priority.
*/
@java.lang.Override public io.envoyproxy.envoy.api.v2.core.RoutingPriority getPriority() {
@SuppressWarnings("deprecation")
io.envoyproxy.envoy.api.v2.core.RoutingPriority result = io.envoyproxy.envoy.api.v2.core.RoutingPriority.valueOf(priority_);
return result == null ? io.envoyproxy.envoy.api.v2.core.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.api.v2.route.RateLimit rate_limits = 13;
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.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_api_field_route.VirtualHost.rate_limits>` are not applied to the
* request.
*
*
* .google.protobuf.BoolValue include_vh_rate_limits = 14;
* @return Whether the includeVhRateLimits field is set.
*/
@java.lang.Override
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_api_field_route.VirtualHost.rate_limits>` are not applied to the
* request.
*
* 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_api_field_route.VirtualHost.rate_limits>` are not applied to the
* request.
*
*
* .google.protobuf.BoolValue include_vh_rate_limits = 14;
*/
@java.lang.Override
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.api.v2.route.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.api.v2.route.RouteAction.HashPolicy hash_policy = 15;
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicyOrBuilder getHashPolicyOrBuilder(
int index) {
return hashPolicy_.get(index);
}
public static final int CORS_FIELD_NUMBER = 17;
private io.envoyproxy.envoy.api.v2.route.CorsPolicy cors_;
/**
*
* Indicates that the route has a CORS policy.
*
*
* .envoy.api.v2.route.CorsPolicy cors = 17;
* @return Whether the cors field is set.
*/
@java.lang.Override
public boolean hasCors() {
return cors_ != null;
}
/**
*
* Indicates that the route has a CORS policy.
*
*
* .envoy.api.v2.route.CorsPolicy cors = 17;
* @return The cors.
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.CorsPolicy getCors() {
return cors_ == null ? io.envoyproxy.envoy.api.v2.route.CorsPolicy.getDefaultInstance() : cors_;
}
/**
*
* Indicates that the route has a CORS policy.
*
*
* .envoy.api.v2.route.CorsPolicy cors = 17;
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.CorsPolicyOrBuilder getCorsOrBuilder() {
return getCors();
}
public static final int MAX_GRPC_TIMEOUT_FIELD_NUMBER = 23;
private com.google.protobuf.Duration maxGrpcTimeout_;
/**
*
* 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_api_field_route.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_api_field_route.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;
* @return Whether the maxGrpcTimeout field is set.
*/
@java.lang.Override
public boolean hasMaxGrpcTimeout() {
return maxGrpcTimeout_ != null;
}
/**
*
* 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_api_field_route.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_api_field_route.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>`.
*
* 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_api_field_route.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_api_field_route.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;
*/
@java.lang.Override
public com.google.protobuf.DurationOrBuilder getMaxGrpcTimeoutOrBuilder() {
return getMaxGrpcTimeout();
}
public static final int GRPC_TIMEOUT_OFFSET_FIELD_NUMBER = 28;
private com.google.protobuf.Duration grpcTimeoutOffset_;
/**
*
* 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;
* @return Whether the grpcTimeoutOffset field is set.
*/
@java.lang.Override
public boolean hasGrpcTimeoutOffset() {
return grpcTimeoutOffset_ != 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 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 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;
*/
@java.lang.Override
public com.google.protobuf.DurationOrBuilder getGrpcTimeoutOffsetOrBuilder() {
return getGrpcTimeoutOffset();
}
public static final int UPGRADE_CONFIGS_FIELD_NUMBER = 25;
private java.util.List upgradeConfigs_;
/**
* repeated .envoy.api.v2.route.RouteAction.UpgradeConfig upgrade_configs = 25;
*/
@java.lang.Override
public java.util.List getUpgradeConfigsList() {
return upgradeConfigs_;
}
/**
* repeated .envoy.api.v2.route.RouteAction.UpgradeConfig upgrade_configs = 25;
*/
@java.lang.Override
public java.util.List extends io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfigOrBuilder>
getUpgradeConfigsOrBuilderList() {
return upgradeConfigs_;
}
/**
* repeated .envoy.api.v2.route.RouteAction.UpgradeConfig upgrade_configs = 25;
*/
@java.lang.Override
public int getUpgradeConfigsCount() {
return upgradeConfigs_.size();
}
/**
* repeated .envoy.api.v2.route.RouteAction.UpgradeConfig upgrade_configs = 25;
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig getUpgradeConfigs(int index) {
return upgradeConfigs_.get(index);
}
/**
* repeated .envoy.api.v2.route.RouteAction.UpgradeConfig upgrade_configs = 25;
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfigOrBuilder getUpgradeConfigsOrBuilder(
int index) {
return upgradeConfigs_.get(index);
}
public static final int INTERNAL_REDIRECT_ACTION_FIELD_NUMBER = 26;
private int internalRedirectAction_;
/**
* .envoy.api.v2.route.RouteAction.InternalRedirectAction internal_redirect_action = 26;
* @return The enum numeric value on the wire for internalRedirectAction.
*/
@java.lang.Override public int getInternalRedirectActionValue() {
return internalRedirectAction_;
}
/**
* .envoy.api.v2.route.RouteAction.InternalRedirectAction internal_redirect_action = 26;
* @return The internalRedirectAction.
*/
@java.lang.Override public io.envoyproxy.envoy.api.v2.route.RouteAction.InternalRedirectAction getInternalRedirectAction() {
@SuppressWarnings("deprecation")
io.envoyproxy.envoy.api.v2.route.RouteAction.InternalRedirectAction result = io.envoyproxy.envoy.api.v2.route.RouteAction.InternalRedirectAction.valueOf(internalRedirectAction_);
return result == null ? io.envoyproxy.envoy.api.v2.route.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_api_field_route.RouteAction.internal_redirect_action>`
* is set to :ref:`HANDLE_INTERNAL_REDIRECT
* <envoy_api_enum_value_route.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_api_field_route.RouteAction.internal_redirect_action>`
* set to
* :ref:`PASS_THROUGH_INTERNAL_REDIRECT
* <envoy_api_enum_value_route.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;
* @return Whether the maxInternalRedirects field is set.
*/
@java.lang.Override
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_api_field_route.RouteAction.internal_redirect_action>`
* is set to :ref:`HANDLE_INTERNAL_REDIRECT
* <envoy_api_enum_value_route.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_api_field_route.RouteAction.internal_redirect_action>`
* set to
* :ref:`PASS_THROUGH_INTERNAL_REDIRECT
* <envoy_api_enum_value_route.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_api_field_route.RouteAction.internal_redirect_action>`
* is set to :ref:`HANDLE_INTERNAL_REDIRECT
* <envoy_api_enum_value_route.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_api_field_route.RouteAction.internal_redirect_action>`
* set to
* :ref:`PASS_THROUGH_INTERNAL_REDIRECT
* <envoy_api_enum_value_route.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;
*/
@java.lang.Override
public com.google.protobuf.UInt32ValueOrBuilder getMaxInternalRedirectsOrBuilder() {
return getMaxInternalRedirects();
}
public static final int HEDGE_POLICY_FIELD_NUMBER = 27;
private io.envoyproxy.envoy.api.v2.route.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.api.v2.route.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.api.v2.route.HedgePolicy hedge_policy = 27;
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.HedgePolicyOrBuilder getHedgePolicyOrBuilder() {
return getHedgePolicy();
}
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 (clusterSpecifierCase_ == 1) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, clusterSpecifier_);
}
if (clusterSpecifierCase_ == 2) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clusterSpecifier_);
}
if (clusterSpecifierCase_ == 3) {
output.writeMessage(3, (io.envoyproxy.envoy.api.v2.route.WeightedCluster) clusterSpecifier_);
}
if (metadataMatch_ != null) {
output.writeMessage(4, getMetadataMatch());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(prefixRewrite_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, prefixRewrite_);
}
if (hostRewriteSpecifierCase_ == 6) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, hostRewriteSpecifier_);
}
if (hostRewriteSpecifierCase_ == 7) {
output.writeMessage(7, (com.google.protobuf.BoolValue) hostRewriteSpecifier_);
}
if (timeout_ != null) {
output.writeMessage(8, getTimeout());
}
if (retryPolicy_ != null) {
output.writeMessage(9, getRetryPolicy());
}
if (requestMirrorPolicy_ != null) {
output.writeMessage(10, getRequestMirrorPolicy());
}
if (priority_ != io.envoyproxy.envoy.api.v2.core.RoutingPriority.DEFAULT.getNumber()) {
output.writeEnum(11, priority_);
}
for (int i = 0; i < rateLimits_.size(); i++) {
output.writeMessage(13, rateLimits_.get(i));
}
if (includeVhRateLimits_ != null) {
output.writeMessage(14, getIncludeVhRateLimits());
}
for (int i = 0; i < hashPolicy_.size(); i++) {
output.writeMessage(15, hashPolicy_.get(i));
}
if (cors_ != null) {
output.writeMessage(17, getCors());
}
if (clusterNotFoundResponseCode_ != io.envoyproxy.envoy.api.v2.route.RouteAction.ClusterNotFoundResponseCode.SERVICE_UNAVAILABLE.getNumber()) {
output.writeEnum(20, clusterNotFoundResponseCode_);
}
if (maxGrpcTimeout_ != null) {
output.writeMessage(23, getMaxGrpcTimeout());
}
if (idleTimeout_ != null) {
output.writeMessage(24, getIdleTimeout());
}
for (int i = 0; i < upgradeConfigs_.size(); i++) {
output.writeMessage(25, upgradeConfigs_.get(i));
}
if (internalRedirectAction_ != io.envoyproxy.envoy.api.v2.route.RouteAction.InternalRedirectAction.PASS_THROUGH_INTERNAL_REDIRECT.getNumber()) {
output.writeEnum(26, internalRedirectAction_);
}
if (hedgePolicy_ != null) {
output.writeMessage(27, getHedgePolicy());
}
if (grpcTimeoutOffset_ != null) {
output.writeMessage(28, getGrpcTimeoutOffset());
}
if (hostRewriteSpecifierCase_ == 29) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 29, hostRewriteSpecifier_);
}
for (int i = 0; i < requestMirrorPolicies_.size(); i++) {
output.writeMessage(30, requestMirrorPolicies_.get(i));
}
if (maxInternalRedirects_ != null) {
output.writeMessage(31, getMaxInternalRedirects());
}
if (regexRewrite_ != null) {
output.writeMessage(32, getRegexRewrite());
}
if (retryPolicyTypedConfig_ != null) {
output.writeMessage(33, getRetryPolicyTypedConfig());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (clusterSpecifierCase_ == 1) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, clusterSpecifier_);
}
if (clusterSpecifierCase_ == 2) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, clusterSpecifier_);
}
if (clusterSpecifierCase_ == 3) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, (io.envoyproxy.envoy.api.v2.route.WeightedCluster) clusterSpecifier_);
}
if (metadataMatch_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getMetadataMatch());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(prefixRewrite_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, prefixRewrite_);
}
if (hostRewriteSpecifierCase_ == 6) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, hostRewriteSpecifier_);
}
if (hostRewriteSpecifierCase_ == 7) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, (com.google.protobuf.BoolValue) hostRewriteSpecifier_);
}
if (timeout_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(8, getTimeout());
}
if (retryPolicy_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(9, getRetryPolicy());
}
if (requestMirrorPolicy_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(10, getRequestMirrorPolicy());
}
if (priority_ != io.envoyproxy.envoy.api.v2.core.RoutingPriority.DEFAULT.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(11, priority_);
}
for (int i = 0; i < rateLimits_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(13, rateLimits_.get(i));
}
if (includeVhRateLimits_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(14, getIncludeVhRateLimits());
}
for (int i = 0; i < hashPolicy_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(15, hashPolicy_.get(i));
}
if (cors_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(17, getCors());
}
if (clusterNotFoundResponseCode_ != io.envoyproxy.envoy.api.v2.route.RouteAction.ClusterNotFoundResponseCode.SERVICE_UNAVAILABLE.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(20, clusterNotFoundResponseCode_);
}
if (maxGrpcTimeout_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(23, getMaxGrpcTimeout());
}
if (idleTimeout_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(24, getIdleTimeout());
}
for (int i = 0; i < upgradeConfigs_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(25, upgradeConfigs_.get(i));
}
if (internalRedirectAction_ != io.envoyproxy.envoy.api.v2.route.RouteAction.InternalRedirectAction.PASS_THROUGH_INTERNAL_REDIRECT.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(26, internalRedirectAction_);
}
if (hedgePolicy_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(27, getHedgePolicy());
}
if (grpcTimeoutOffset_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(28, getGrpcTimeoutOffset());
}
if (hostRewriteSpecifierCase_ == 29) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(29, hostRewriteSpecifier_);
}
for (int i = 0; i < requestMirrorPolicies_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(30, requestMirrorPolicies_.get(i));
}
if (maxInternalRedirects_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(31, getMaxInternalRedirects());
}
if (regexRewrite_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(32, getRegexRewrite());
}
if (retryPolicyTypedConfig_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(33, getRetryPolicyTypedConfig());
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.envoyproxy.envoy.api.v2.route.RouteAction)) {
return super.equals(obj);
}
io.envoyproxy.envoy.api.v2.route.RouteAction other = (io.envoyproxy.envoy.api.v2.route.RouteAction) obj;
if (clusterNotFoundResponseCode_ != other.clusterNotFoundResponseCode_) return false;
if (hasMetadataMatch() != other.hasMetadataMatch()) return false;
if (hasMetadataMatch()) {
if (!getMetadataMatch()
.equals(other.getMetadataMatch())) return false;
}
if (!getPrefixRewrite()
.equals(other.getPrefixRewrite())) return false;
if (hasRegexRewrite() != other.hasRegexRewrite()) return false;
if (hasRegexRewrite()) {
if (!getRegexRewrite()
.equals(other.getRegexRewrite())) return false;
}
if (hasTimeout() != other.hasTimeout()) return false;
if (hasTimeout()) {
if (!getTimeout()
.equals(other.getTimeout())) return false;
}
if (hasIdleTimeout() != other.hasIdleTimeout()) return false;
if (hasIdleTimeout()) {
if (!getIdleTimeout()
.equals(other.getIdleTimeout())) return false;
}
if (hasRetryPolicy() != other.hasRetryPolicy()) return false;
if (hasRetryPolicy()) {
if (!getRetryPolicy()
.equals(other.getRetryPolicy())) return false;
}
if (hasRetryPolicyTypedConfig() != other.hasRetryPolicyTypedConfig()) return false;
if (hasRetryPolicyTypedConfig()) {
if (!getRetryPolicyTypedConfig()
.equals(other.getRetryPolicyTypedConfig())) return false;
}
if (hasRequestMirrorPolicy() != other.hasRequestMirrorPolicy()) return false;
if (hasRequestMirrorPolicy()) {
if (!getRequestMirrorPolicy()
.equals(other.getRequestMirrorPolicy())) return false;
}
if (!getRequestMirrorPoliciesList()
.equals(other.getRequestMirrorPoliciesList())) return false;
if (priority_ != other.priority_) return false;
if (!getRateLimitsList()
.equals(other.getRateLimitsList())) return false;
if (hasIncludeVhRateLimits() != other.hasIncludeVhRateLimits()) return false;
if (hasIncludeVhRateLimits()) {
if (!getIncludeVhRateLimits()
.equals(other.getIncludeVhRateLimits())) return false;
}
if (!getHashPolicyList()
.equals(other.getHashPolicyList())) return false;
if (hasCors() != other.hasCors()) return false;
if (hasCors()) {
if (!getCors()
.equals(other.getCors())) return false;
}
if (hasMaxGrpcTimeout() != other.hasMaxGrpcTimeout()) return false;
if (hasMaxGrpcTimeout()) {
if (!getMaxGrpcTimeout()
.equals(other.getMaxGrpcTimeout())) return false;
}
if (hasGrpcTimeoutOffset() != other.hasGrpcTimeoutOffset()) return false;
if (hasGrpcTimeoutOffset()) {
if (!getGrpcTimeoutOffset()
.equals(other.getGrpcTimeoutOffset())) return false;
}
if (!getUpgradeConfigsList()
.equals(other.getUpgradeConfigsList())) return false;
if (internalRedirectAction_ != other.internalRedirectAction_) return false;
if (hasMaxInternalRedirects() != other.hasMaxInternalRedirects()) return false;
if (hasMaxInternalRedirects()) {
if (!getMaxInternalRedirects()
.equals(other.getMaxInternalRedirects())) return false;
}
if (hasHedgePolicy() != other.hasHedgePolicy()) return false;
if (hasHedgePolicy()) {
if (!getHedgePolicy()
.equals(other.getHedgePolicy())) return false;
}
if (!getClusterSpecifierCase().equals(other.getClusterSpecifierCase())) return false;
switch (clusterSpecifierCase_) {
case 1:
if (!getCluster()
.equals(other.getCluster())) return false;
break;
case 2:
if (!getClusterHeader()
.equals(other.getClusterHeader())) return false;
break;
case 3:
if (!getWeightedClusters()
.equals(other.getWeightedClusters())) return false;
break;
case 0:
default:
}
if (!getHostRewriteSpecifierCase().equals(other.getHostRewriteSpecifierCase())) return false;
switch (hostRewriteSpecifierCase_) {
case 6:
if (!getHostRewrite()
.equals(other.getHostRewrite())) return false;
break;
case 7:
if (!getAutoHostRewrite()
.equals(other.getAutoHostRewrite())) return false;
break;
case 29:
if (!getAutoHostRewriteHeader()
.equals(other.getAutoHostRewriteHeader())) 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) + CLUSTER_NOT_FOUND_RESPONSE_CODE_FIELD_NUMBER;
hash = (53 * hash) + clusterNotFoundResponseCode_;
if (hasMetadataMatch()) {
hash = (37 * hash) + METADATA_MATCH_FIELD_NUMBER;
hash = (53 * hash) + getMetadataMatch().hashCode();
}
hash = (37 * hash) + PREFIX_REWRITE_FIELD_NUMBER;
hash = (53 * hash) + getPrefixRewrite().hashCode();
if (hasRegexRewrite()) {
hash = (37 * hash) + REGEX_REWRITE_FIELD_NUMBER;
hash = (53 * hash) + getRegexRewrite().hashCode();
}
if (hasTimeout()) {
hash = (37 * hash) + TIMEOUT_FIELD_NUMBER;
hash = (53 * hash) + getTimeout().hashCode();
}
if (hasIdleTimeout()) {
hash = (37 * hash) + IDLE_TIMEOUT_FIELD_NUMBER;
hash = (53 * hash) + getIdleTimeout().hashCode();
}
if (hasRetryPolicy()) {
hash = (37 * hash) + RETRY_POLICY_FIELD_NUMBER;
hash = (53 * hash) + getRetryPolicy().hashCode();
}
if (hasRetryPolicyTypedConfig()) {
hash = (37 * hash) + RETRY_POLICY_TYPED_CONFIG_FIELD_NUMBER;
hash = (53 * hash) + getRetryPolicyTypedConfig().hashCode();
}
if (hasRequestMirrorPolicy()) {
hash = (37 * hash) + REQUEST_MIRROR_POLICY_FIELD_NUMBER;
hash = (53 * hash) + getRequestMirrorPolicy().hashCode();
}
if (getRequestMirrorPoliciesCount() > 0) {
hash = (37 * hash) + REQUEST_MIRROR_POLICIES_FIELD_NUMBER;
hash = (53 * hash) + getRequestMirrorPoliciesList().hashCode();
}
hash = (37 * hash) + PRIORITY_FIELD_NUMBER;
hash = (53 * hash) + priority_;
if (getRateLimitsCount() > 0) {
hash = (37 * hash) + RATE_LIMITS_FIELD_NUMBER;
hash = (53 * hash) + getRateLimitsList().hashCode();
}
if (hasIncludeVhRateLimits()) {
hash = (37 * hash) + INCLUDE_VH_RATE_LIMITS_FIELD_NUMBER;
hash = (53 * hash) + getIncludeVhRateLimits().hashCode();
}
if (getHashPolicyCount() > 0) {
hash = (37 * hash) + HASH_POLICY_FIELD_NUMBER;
hash = (53 * hash) + getHashPolicyList().hashCode();
}
if (hasCors()) {
hash = (37 * hash) + CORS_FIELD_NUMBER;
hash = (53 * hash) + getCors().hashCode();
}
if (hasMaxGrpcTimeout()) {
hash = (37 * hash) + MAX_GRPC_TIMEOUT_FIELD_NUMBER;
hash = (53 * hash) + getMaxGrpcTimeout().hashCode();
}
if (hasGrpcTimeoutOffset()) {
hash = (37 * hash) + GRPC_TIMEOUT_OFFSET_FIELD_NUMBER;
hash = (53 * hash) + getGrpcTimeoutOffset().hashCode();
}
if (getUpgradeConfigsCount() > 0) {
hash = (37 * hash) + UPGRADE_CONFIGS_FIELD_NUMBER;
hash = (53 * hash) + getUpgradeConfigsList().hashCode();
}
hash = (37 * hash) + INTERNAL_REDIRECT_ACTION_FIELD_NUMBER;
hash = (53 * hash) + internalRedirectAction_;
if (hasMaxInternalRedirects()) {
hash = (37 * hash) + MAX_INTERNAL_REDIRECTS_FIELD_NUMBER;
hash = (53 * hash) + getMaxInternalRedirects().hashCode();
}
if (hasHedgePolicy()) {
hash = (37 * hash) + HEDGE_POLICY_FIELD_NUMBER;
hash = (53 * hash) + getHedgePolicy().hashCode();
}
switch (clusterSpecifierCase_) {
case 1:
hash = (37 * hash) + CLUSTER_FIELD_NUMBER;
hash = (53 * hash) + getCluster().hashCode();
break;
case 2:
hash = (37 * hash) + CLUSTER_HEADER_FIELD_NUMBER;
hash = (53 * hash) + getClusterHeader().hashCode();
break;
case 3:
hash = (37 * hash) + WEIGHTED_CLUSTERS_FIELD_NUMBER;
hash = (53 * hash) + getWeightedClusters().hashCode();
break;
case 0:
default:
}
switch (hostRewriteSpecifierCase_) {
case 6:
hash = (37 * hash) + HOST_REWRITE_FIELD_NUMBER;
hash = (53 * hash) + getHostRewrite().hashCode();
break;
case 7:
hash = (37 * hash) + AUTO_HOST_REWRITE_FIELD_NUMBER;
hash = (53 * hash) + getAutoHostRewrite().hashCode();
break;
case 29:
hash = (37 * hash) + AUTO_HOST_REWRITE_HEADER_FIELD_NUMBER;
hash = (53 * hash) + getAutoHostRewriteHeader().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.api.v2.route.RouteAction parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.api.v2.route.RouteAction parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.api.v2.route.RouteAction parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.api.v2.route.RouteAction parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.api.v2.route.RouteAction parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.api.v2.route.RouteAction parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.api.v2.route.RouteAction parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.api.v2.route.RouteAction parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static io.envoyproxy.envoy.api.v2.route.RouteAction parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.api.v2.route.RouteAction parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static io.envoyproxy.envoy.api.v2.route.RouteAction parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.api.v2.route.RouteAction parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.envoyproxy.envoy.api.v2.route.RouteAction 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;
}
/**
*
* 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.api.v2.route.WeightedCluster, io.envoyproxy.envoy.api.v2.route.WeightedCluster.Builder, io.envoyproxy.envoy.api.v2.route.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.api.v2.route.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.api.v2.route.WeightedCluster weighted_clusters = 3;
* @return The weightedClusters.
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.WeightedCluster getWeightedClusters() {
if (weightedClustersBuilder_ == null) {
if (clusterSpecifierCase_ == 3) {
return (io.envoyproxy.envoy.api.v2.route.WeightedCluster) clusterSpecifier_;
}
return io.envoyproxy.envoy.api.v2.route.WeightedCluster.getDefaultInstance();
} else {
if (clusterSpecifierCase_ == 3) {
return weightedClustersBuilder_.getMessage();
}
return io.envoyproxy.envoy.api.v2.route.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.
*
* The HTTP status code to use when configured cluster is not found.
* The default response code is 503 Service Unavailable.
*
*
* .envoy.api.v2.route.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.api.v2.route.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.api.v2.route.RouteAction.ClusterNotFoundResponseCode cluster_not_found_response_code = 20 [(.validate.rules) = { ... }
* @return The clusterNotFoundResponseCode.
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.RouteAction.ClusterNotFoundResponseCode getClusterNotFoundResponseCode() {
@SuppressWarnings("deprecation")
io.envoyproxy.envoy.api.v2.route.RouteAction.ClusterNotFoundResponseCode result = io.envoyproxy.envoy.api.v2.route.RouteAction.ClusterNotFoundResponseCode.valueOf(clusterNotFoundResponseCode_);
return result == null ? io.envoyproxy.envoy.api.v2.route.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.api.v2.route.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.api.v2.route.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_api_field_route.RouteAction.weighted_clusters>`, metadata will be merged, with values
* provided there taking precedence. The filter name should be specified as *envoy.lb*.
*
*
* .envoy.api.v2.core.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_api_field_route.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_api_field_route.RouteAction.weighted_clusters>`, metadata will be merged, with values
* provided there taking precedence. The filter name should be specified as *envoy.lb*.
*
*
* .envoy.api.v2.core.Metadata metadata_match = 4;
*/
public Builder setMetadataMatch(io.envoyproxy.envoy.api.v2.core.Metadata value) {
if (metadataMatchBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
metadataMatch_ = value;
onChanged();
} else {
metadataMatchBuilder_.setMessage(value);
}
return this;
}
/**
*
* Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints
* in the upstream cluster with metadata matching what's set in this field will be considered
* for load balancing. If using :ref:`weighted_clusters
* <envoy_api_field_route.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_api_field_route.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_api_field_route.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_api_field_route.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_api_field_route.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_api_field_route.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 *prefix_rewrite* or
* :ref:`regex_rewrite <envoy_api_field_route.RouteAction.regex_rewrite>`
* may be specified.
* .. attention::
* Pay careful attention to the use of trailing slashes in the
* :ref:`route's match <envoy_api_field_route.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_api_msg_route.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 *prefix_rewrite* or
* :ref:`regex_rewrite <envoy_api_field_route.RouteAction.regex_rewrite>`
* may be specified.
* .. attention::
* Pay careful attention to the use of trailing slashes in the
* :ref:`route's match <envoy_api_field_route.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_api_msg_route.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 *prefix_rewrite* or
* :ref:`regex_rewrite <envoy_api_field_route.RouteAction.regex_rewrite>`
* may be specified.
* .. attention::
* Pay careful attention to the use of trailing slashes in the
* :ref:`route's match <envoy_api_field_route.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_api_msg_route.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 *prefix_rewrite* or
* :ref:`regex_rewrite <envoy_api_field_route.RouteAction.regex_rewrite>`
* may be specified.
* .. attention::
* Pay careful attention to the use of trailing slashes in the
* :ref:`route's match <envoy_api_field_route.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_api_msg_route.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 *prefix_rewrite* or
* :ref:`regex_rewrite <envoy_api_field_route.RouteAction.regex_rewrite>`
* may be specified.
* .. attention::
* Pay careful attention to the use of trailing slashes in the
* :ref:`route's match <envoy_api_field_route.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_api_msg_route.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.RegexMatchAndSubstitute regexRewrite_;
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.type.matcher.RegexMatchAndSubstitute, io.envoyproxy.envoy.type.matcher.RegexMatchAndSubstitute.Builder, io.envoyproxy.envoy.type.matcher.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:`prefix_rewrite <envoy_api_field_route.RouteAction.prefix_rewrite>`
* or *regex_rewrite* 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.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:`prefix_rewrite <envoy_api_field_route.RouteAction.prefix_rewrite>`
* or *regex_rewrite* 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:`prefix_rewrite <envoy_api_field_route.RouteAction.prefix_rewrite>`
* or *regex_rewrite* 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.RegexMatchAndSubstitute regex_rewrite = 32;
*/
public Builder setRegexRewrite(io.envoyproxy.envoy.type.matcher.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:`prefix_rewrite <envoy_api_field_route.RouteAction.prefix_rewrite>`
* or *regex_rewrite* 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:`prefix_rewrite <envoy_api_field_route.RouteAction.prefix_rewrite>`
* or *regex_rewrite* 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:`prefix_rewrite <envoy_api_field_route.RouteAction.prefix_rewrite>`
* or *regex_rewrite* 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:`prefix_rewrite <envoy_api_field_route.RouteAction.prefix_rewrite>`
* or *regex_rewrite* 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:`prefix_rewrite <envoy_api_field_route.RouteAction.prefix_rewrite>`
* or *regex_rewrite* 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:`prefix_rewrite <envoy_api_field_route.RouteAction.prefix_rewrite>`
* or *regex_rewrite* 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.
*
*
* string host_rewrite = 6 [(.validate.rules) = { ... }
* @return The bytes for hostRewrite.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getHostRewriteBytes() {
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.
*
*
* string host_rewrite = 6 [(.validate.rules) = { ... }
* @param value The hostRewrite to set.
* @return This builder for chaining.
*/
public Builder setHostRewrite(
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.
*
*
* string host_rewrite = 6 [(.validate.rules) = { ... }
* @return This builder for chaining.
*/
public Builder clearHostRewrite() {
if (hostRewriteSpecifierCase_ == 6) {
hostRewriteSpecifierCase_ = 0;
hostRewriteSpecifier_ = null;
onChanged();
}
return this;
}
/**
*
* Indicates that during forwarding, the host header will be swapped with
* this value.
*
*
* string host_rewrite = 6 [(.validate.rules) = { ... }
* @param value The bytes for hostRewrite to set.
* @return This builder for chaining.
*/
public Builder setHostRewriteBytes(
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``, ``LOGICAL_DNS`` or ``STATIC``. For ``STATIC`` clusters, the
* hostname attribute of the endpoint must be configured. Setting this to true
* with other cluster types has no effect.
*
*
* .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``, ``LOGICAL_DNS`` or ``STATIC``. For ``STATIC`` clusters, the
* hostname attribute of the endpoint must be configured. Setting this to true
* with other cluster types has no effect.
*
*
* .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``, ``LOGICAL_DNS`` or ``STATIC``. For ``STATIC`` clusters, the
* hostname attribute of the endpoint must be configured. Setting this to true
* with other cluster types has no effect.
*
* 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``, ``LOGICAL_DNS`` or ``STATIC``. For ``STATIC`` clusters, the
* hostname attribute of the endpoint must be configured. Setting this to true
* with other cluster types has no effect.
*
* 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``, ``LOGICAL_DNS`` or ``STATIC``. For ``STATIC`` clusters, the
* hostname attribute of the endpoint must be configured. Setting this to true
* with other cluster types has no effect.
*
* 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``, ``LOGICAL_DNS`` or ``STATIC``. For ``STATIC`` clusters, the
* hostname attribute of the endpoint must be configured. Setting this to true
* with other cluster types has no effect.
*
* 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``, ``LOGICAL_DNS`` or ``STATIC``. For ``STATIC`` clusters, the
* hostname attribute of the endpoint must be configured. Setting this to true
* with other cluster types has no effect.
*
* 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``, ``LOGICAL_DNS`` or ``STATIC``. For ``STATIC`` clusters, the
* hostname attribute of the endpoint must be configured. Setting this to true
* with other cluster types has no effect.
*
* 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``, ``LOGICAL_DNS`` or ``STATIC``. For ``STATIC`` clusters, the
* hostname attribute of the endpoint must be configured. Setting this to true
* with other cluster types has no effect.
*
* 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.
* .. 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 auto_host_rewrite_header = 29 [(.validate.rules) = { ... }
* @return Whether the autoHostRewriteHeader field is set.
*/
@java.lang.Override
public boolean hasAutoHostRewriteHeader() {
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.
* .. 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.
* .. 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 auto_host_rewrite_header = 29 [(.validate.rules) = { ... }
* @return The bytes for autoHostRewriteHeader.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getAutoHostRewriteHeaderBytes() {
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.
* .. 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 auto_host_rewrite_header = 29 [(.validate.rules) = { ... }
* @param value The autoHostRewriteHeader to set.
* @return This builder for chaining.
*/
public Builder setAutoHostRewriteHeader(
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.
* .. 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 auto_host_rewrite_header = 29 [(.validate.rules) = { ... }
* @return This builder for chaining.
*/
public Builder clearAutoHostRewriteHeader() {
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.
* .. 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 auto_host_rewrite_header = 29 [(.validate.rules) = { ... }
* @param value The bytes for autoHostRewriteHeader to set.
* @return This builder for chaining.
*/
public Builder setAutoHostRewriteHeaderBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
hostRewriteSpecifierCase_ = 29;
hostRewriteSpecifier_ = value;
onChanged();
return this;
}
private com.google.protobuf.Duration timeout_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> timeoutBuilder_;
/**
*
* 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_api_field_config.filter.network.http_connection_manager.v2.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_api_field_route.RouteAction.timeout>`, which provides an upper bound
* on the upstream response time; :ref:`idle_timeout
* <envoy_api_field_route.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.
*
*
* .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_api_field_config.filter.network.http_connection_manager.v2.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_api_field_route.RouteAction.timeout>`, which provides an upper bound
* on the upstream response time; :ref:`idle_timeout
* <envoy_api_field_route.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.
*
* 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_api_field_config.filter.network.http_connection_manager.v2.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_api_field_route.RouteAction.timeout>`, which provides an upper bound
* on the upstream response time; :ref:`idle_timeout
* <envoy_api_field_route.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.
*
*
* .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_api_field_config.filter.network.http_connection_manager.v2.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_api_field_route.RouteAction.timeout>`, which provides an upper bound
* on the upstream response time; :ref:`idle_timeout
* <envoy_api_field_route.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.
*
* 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_api_field_config.filter.network.http_connection_manager.v2.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_api_field_route.RouteAction.timeout>`, which provides an upper bound
* on the upstream response time; :ref:`idle_timeout
* <envoy_api_field_route.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.
*
* 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_api_field_config.filter.network.http_connection_manager.v2.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_api_field_route.RouteAction.timeout>`, which provides an upper bound
* on the upstream response time; :ref:`idle_timeout
* <envoy_api_field_route.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.
*
* 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_api_field_config.filter.network.http_connection_manager.v2.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_api_field_route.RouteAction.timeout>`, which provides an upper bound
* on the upstream response time; :ref:`idle_timeout
* <envoy_api_field_route.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.
*
* 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_api_field_config.filter.network.http_connection_manager.v2.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_api_field_route.RouteAction.timeout>`, which provides an upper bound
* on the upstream response time; :ref:`idle_timeout
* <envoy_api_field_route.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.
*
* 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_api_field_config.filter.network.http_connection_manager.v2.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_api_field_route.RouteAction.timeout>`, which provides an upper bound
* on the upstream response time; :ref:`idle_timeout
* <envoy_api_field_route.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.
*
* 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.api.v2.route.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.api.v2.route.RetryPolicy retry_policy = 9;
*/
public Builder setRetryPolicy(io.envoyproxy.envoy.api.v2.route.RetryPolicy value) {
if (retryPolicyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
retryPolicy_ = value;
onChanged();
} else {
retryPolicyBuilder_.setMessage(value);
}
return this;
}
/**
*
* Indicates 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_api_field_route.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_api_field_route.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_api_field_route.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_api_field_route.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_api_field_route.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_api_field_route.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_api_field_route.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_api_field_route.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_api_field_route.VirtualHost.retry_policy>`
* should not be set if this field is used.
*
* Indicates that the route has a request mirroring policy.
* .. attention::
* This field has been deprecated in favor of `request_mirror_policies` which supports one or
* more mirroring policies.
*
*
* .envoy.api.v2.route.RouteAction.RequestMirrorPolicy request_mirror_policy = 10 [deprecated = true];
* @deprecated envoy.api.v2.route.RouteAction.request_mirror_policy is deprecated.
* See envoy/api/v2/route/route_components.proto;l=934
* @return Whether the requestMirrorPolicy field is set.
*/
@java.lang.Deprecated public boolean hasRequestMirrorPolicy() {
return requestMirrorPolicyBuilder_ != null || requestMirrorPolicy_ != null;
}
/**
*
* Indicates that the route has a request mirroring policy.
* .. attention::
* This field has been deprecated in favor of `request_mirror_policies` which supports one or
* more mirroring policies.
*
*
* .envoy.api.v2.route.RouteAction.RequestMirrorPolicy request_mirror_policy = 10 [deprecated = true];
* @deprecated envoy.api.v2.route.RouteAction.request_mirror_policy is deprecated.
* See envoy/api/v2/route/route_components.proto;l=934
* @return The requestMirrorPolicy.
*/
@java.lang.Deprecated public io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy getRequestMirrorPolicy() {
if (requestMirrorPolicyBuilder_ == null) {
return requestMirrorPolicy_ == null ? io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy.getDefaultInstance() : requestMirrorPolicy_;
} else {
return requestMirrorPolicyBuilder_.getMessage();
}
}
/**
*
* Indicates that the route has a request mirroring policy.
* .. attention::
* This field has been deprecated in favor of `request_mirror_policies` which supports one or
* more mirroring policies.
*
* Indicates that the route has a request mirroring policy.
* .. attention::
* This field has been deprecated in favor of `request_mirror_policies` which supports one or
* more mirroring policies.
*
* Indicates that the route has a request mirroring policy.
* .. attention::
* This field has been deprecated in favor of `request_mirror_policies` which supports one or
* more mirroring policies.
*
* Indicates that the route has a request mirroring policy.
* .. attention::
* This field has been deprecated in favor of `request_mirror_policies` which supports one or
* more mirroring policies.
*
* Indicates that the route has a request mirroring policy.
* .. attention::
* This field has been deprecated in favor of `request_mirror_policies` which supports one or
* more mirroring policies.
*
* Indicates that the route has a request mirroring policy.
* .. attention::
* This field has been deprecated in favor of `request_mirror_policies` which supports one or
* more mirroring policies.
*
* Indicates that the route has a request mirroring policy.
* .. attention::
* This field has been deprecated in favor of `request_mirror_policies` which supports one or
* more mirroring policies.
*
* Optionally specifies the :ref:`routing priority <arch_overview_http_routing_priority>`.
*
*
* .envoy.api.v2.core.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.api.v2.core.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.api.v2.core.RoutingPriority priority = 11 [(.validate.rules) = { ... }
* @return The priority.
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.core.RoutingPriority getPriority() {
@SuppressWarnings("deprecation")
io.envoyproxy.envoy.api.v2.core.RoutingPriority result = io.envoyproxy.envoy.api.v2.core.RoutingPriority.valueOf(priority_);
return result == null ? io.envoyproxy.envoy.api.v2.core.RoutingPriority.UNRECOGNIZED : result;
}
/**
*
* Optionally specifies the :ref:`routing priority <arch_overview_http_routing_priority>`.
*
*
* .envoy.api.v2.core.RoutingPriority priority = 11 [(.validate.rules) = { ... }
* @param value The priority to set.
* @return This builder for chaining.
*/
public Builder setPriority(io.envoyproxy.envoy.api.v2.core.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_api_field_route.VirtualHost.rate_limits>` are not applied to the
* request.
*
*
* .google.protobuf.BoolValue include_vh_rate_limits = 14;
* @return Whether the includeVhRateLimits field is set.
*/
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_api_field_route.VirtualHost.rate_limits>` are not applied to the
* request.
*
* 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_api_field_route.VirtualHost.rate_limits>` are not applied to the
* request.
*
*
* .google.protobuf.BoolValue include_vh_rate_limits = 14;
*/
public Builder setIncludeVhRateLimits(com.google.protobuf.BoolValue value) {
if (includeVhRateLimitsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
includeVhRateLimits_ = value;
onChanged();
} else {
includeVhRateLimitsBuilder_.setMessage(value);
}
return this;
}
/**
*
* 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_api_field_route.VirtualHost.rate_limits>` are not applied to the
* request.
*
* 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_api_field_route.VirtualHost.rate_limits>` are not applied to the
* request.
*
* 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_api_field_route.VirtualHost.rate_limits>` are not applied to the
* request.
*
* 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_api_field_route.VirtualHost.rate_limits>` are not applied to the
* request.
*
* 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_api_field_route.VirtualHost.rate_limits>` are not applied to the
* request.
*
* 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_api_field_route.VirtualHost.rate_limits>` are not applied to the
* request.
*
* 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.api.v2.route.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.api.v2.route.RouteAction.HashPolicy hash_policy = 15;
*/
public Builder setHashPolicy(
int index, io.envoyproxy.envoy.api.v2.route.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.api.v2.route.RouteAction.HashPolicy hash_policy = 15;
*/
public Builder addHashPolicy(io.envoyproxy.envoy.api.v2.route.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.api.v2.route.RouteAction.HashPolicy hash_policy = 15;
*/
public Builder addHashPolicy(
int index, io.envoyproxy.envoy.api.v2.route.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.api.v2.route.RouteAction.HashPolicy hash_policy = 15;
*/
public io.envoyproxy.envoy.api.v2.route.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.api.v2.route.RouteAction.HashPolicy hash_policy = 15;
*/
public io.envoyproxy.envoy.api.v2.route.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.
*
*
* .envoy.api.v2.route.CorsPolicy cors = 17;
* @return Whether the cors field is set.
*/
public boolean hasCors() {
return corsBuilder_ != null || cors_ != null;
}
/**
*
* Indicates that the route has a CORS policy.
*
*
* .envoy.api.v2.route.CorsPolicy cors = 17;
* @return The cors.
*/
public io.envoyproxy.envoy.api.v2.route.CorsPolicy getCors() {
if (corsBuilder_ == null) {
return cors_ == null ? io.envoyproxy.envoy.api.v2.route.CorsPolicy.getDefaultInstance() : cors_;
} else {
return corsBuilder_.getMessage();
}
}
/**
*
* Indicates that the route has a CORS policy.
*
*
* .envoy.api.v2.route.CorsPolicy cors = 17;
*/
public Builder setCors(io.envoyproxy.envoy.api.v2.route.CorsPolicy value) {
if (corsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
cors_ = value;
onChanged();
} else {
corsBuilder_.setMessage(value);
}
return this;
}
/**
*
* 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_api_field_route.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_api_field_route.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;
* @return Whether the maxGrpcTimeout field is set.
*/
public boolean hasMaxGrpcTimeout() {
return maxGrpcTimeoutBuilder_ != null || maxGrpcTimeout_ != null;
}
/**
*
* 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_api_field_route.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_api_field_route.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>`.
*
* 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_api_field_route.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_api_field_route.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;
*/
public Builder setMaxGrpcTimeout(com.google.protobuf.Duration value) {
if (maxGrpcTimeoutBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
maxGrpcTimeout_ = value;
onChanged();
} else {
maxGrpcTimeoutBuilder_.setMessage(value);
}
return this;
}
/**
*
* 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_api_field_route.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_api_field_route.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>`.
*
* 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_api_field_route.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_api_field_route.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>`.
*
* 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_api_field_route.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_api_field_route.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>`.
*
* 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_api_field_route.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_api_field_route.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>`.
*
* 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_api_field_route.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_api_field_route.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>`.
*
* 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_api_field_route.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_api_field_route.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>`.
*
* 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;
* @return Whether the grpcTimeoutOffset field is set.
*/
public boolean hasGrpcTimeoutOffset() {
return grpcTimeoutOffsetBuilder_ != null || grpcTimeoutOffset_ != 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 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 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;
*/
public Builder setGrpcTimeoutOffset(com.google.protobuf.Duration value) {
if (grpcTimeoutOffsetBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
grpcTimeoutOffset_ = value;
onChanged();
} else {
grpcTimeoutOffsetBuilder_.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 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 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 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 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 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 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;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>
getGrpcTimeoutOffsetFieldBuilder() {
if (grpcTimeoutOffsetBuilder_ == null) {
grpcTimeoutOffsetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>(
getGrpcTimeoutOffset(),
getParentForChildren(),
isClean());
grpcTimeoutOffset_ = null;
}
return grpcTimeoutOffsetBuilder_;
}
private java.util.List upgradeConfigs_ =
java.util.Collections.emptyList();
private void ensureUpgradeConfigsIsMutable() {
if (!((bitField0_ & 0x00000008) != 0)) {
upgradeConfigs_ = new java.util.ArrayList(upgradeConfigs_);
bitField0_ |= 0x00000008;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig, io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig.Builder, io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfigOrBuilder> upgradeConfigsBuilder_;
/**
* repeated .envoy.api.v2.route.RouteAction.UpgradeConfig upgrade_configs = 25;
*/
public java.util.List getUpgradeConfigsList() {
if (upgradeConfigsBuilder_ == null) {
return java.util.Collections.unmodifiableList(upgradeConfigs_);
} else {
return upgradeConfigsBuilder_.getMessageList();
}
}
/**
* repeated .envoy.api.v2.route.RouteAction.UpgradeConfig upgrade_configs = 25;
*/
public int getUpgradeConfigsCount() {
if (upgradeConfigsBuilder_ == null) {
return upgradeConfigs_.size();
} else {
return upgradeConfigsBuilder_.getCount();
}
}
/**
* repeated .envoy.api.v2.route.RouteAction.UpgradeConfig upgrade_configs = 25;
*/
public io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig getUpgradeConfigs(int index) {
if (upgradeConfigsBuilder_ == null) {
return upgradeConfigs_.get(index);
} else {
return upgradeConfigsBuilder_.getMessage(index);
}
}
/**
* repeated .envoy.api.v2.route.RouteAction.UpgradeConfig upgrade_configs = 25;
*/
public Builder setUpgradeConfigs(
int index, io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig value) {
if (upgradeConfigsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureUpgradeConfigsIsMutable();
upgradeConfigs_.set(index, value);
onChanged();
} else {
upgradeConfigsBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .envoy.api.v2.route.RouteAction.UpgradeConfig upgrade_configs = 25;
*/
public Builder setUpgradeConfigs(
int index, io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig.Builder builderForValue) {
if (upgradeConfigsBuilder_ == null) {
ensureUpgradeConfigsIsMutable();
upgradeConfigs_.set(index, builderForValue.build());
onChanged();
} else {
upgradeConfigsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .envoy.api.v2.route.RouteAction.UpgradeConfig upgrade_configs = 25;
*/
public Builder addUpgradeConfigs(io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig value) {
if (upgradeConfigsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureUpgradeConfigsIsMutable();
upgradeConfigs_.add(value);
onChanged();
} else {
upgradeConfigsBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .envoy.api.v2.route.RouteAction.UpgradeConfig upgrade_configs = 25;
*/
public Builder addUpgradeConfigs(
int index, io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig value) {
if (upgradeConfigsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureUpgradeConfigsIsMutable();
upgradeConfigs_.add(index, value);
onChanged();
} else {
upgradeConfigsBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .envoy.api.v2.route.RouteAction.UpgradeConfig upgrade_configs = 25;
*/
public Builder addUpgradeConfigs(
io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig.Builder builderForValue) {
if (upgradeConfigsBuilder_ == null) {
ensureUpgradeConfigsIsMutable();
upgradeConfigs_.add(builderForValue.build());
onChanged();
} else {
upgradeConfigsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .envoy.api.v2.route.RouteAction.UpgradeConfig upgrade_configs = 25;
*/
public Builder addUpgradeConfigs(
int index, io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig.Builder builderForValue) {
if (upgradeConfigsBuilder_ == null) {
ensureUpgradeConfigsIsMutable();
upgradeConfigs_.add(index, builderForValue.build());
onChanged();
} else {
upgradeConfigsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .envoy.api.v2.route.RouteAction.UpgradeConfig upgrade_configs = 25;
*/
public Builder addAllUpgradeConfigs(
java.lang.Iterable extends io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig> values) {
if (upgradeConfigsBuilder_ == null) {
ensureUpgradeConfigsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, upgradeConfigs_);
onChanged();
} else {
upgradeConfigsBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .envoy.api.v2.route.RouteAction.UpgradeConfig upgrade_configs = 25;
*/
public Builder clearUpgradeConfigs() {
if (upgradeConfigsBuilder_ == null) {
upgradeConfigs_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
} else {
upgradeConfigsBuilder_.clear();
}
return this;
}
/**
* repeated .envoy.api.v2.route.RouteAction.UpgradeConfig upgrade_configs = 25;
*/
public Builder removeUpgradeConfigs(int index) {
if (upgradeConfigsBuilder_ == null) {
ensureUpgradeConfigsIsMutable();
upgradeConfigs_.remove(index);
onChanged();
} else {
upgradeConfigsBuilder_.remove(index);
}
return this;
}
/**
* repeated .envoy.api.v2.route.RouteAction.UpgradeConfig upgrade_configs = 25;
*/
public io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig.Builder getUpgradeConfigsBuilder(
int index) {
return getUpgradeConfigsFieldBuilder().getBuilder(index);
}
/**
* repeated .envoy.api.v2.route.RouteAction.UpgradeConfig upgrade_configs = 25;
*/
public io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfigOrBuilder getUpgradeConfigsOrBuilder(
int index) {
if (upgradeConfigsBuilder_ == null) {
return upgradeConfigs_.get(index); } else {
return upgradeConfigsBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .envoy.api.v2.route.RouteAction.UpgradeConfig upgrade_configs = 25;
*/
public java.util.List extends io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfigOrBuilder>
getUpgradeConfigsOrBuilderList() {
if (upgradeConfigsBuilder_ != null) {
return upgradeConfigsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(upgradeConfigs_);
}
}
/**
* repeated .envoy.api.v2.route.RouteAction.UpgradeConfig upgrade_configs = 25;
*/
public io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig.Builder addUpgradeConfigsBuilder() {
return getUpgradeConfigsFieldBuilder().addBuilder(
io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig.getDefaultInstance());
}
/**
* repeated .envoy.api.v2.route.RouteAction.UpgradeConfig upgrade_configs = 25;
*/
public io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig.Builder addUpgradeConfigsBuilder(
int index) {
return getUpgradeConfigsFieldBuilder().addBuilder(
index, io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig.getDefaultInstance());
}
/**
* repeated .envoy.api.v2.route.RouteAction.UpgradeConfig upgrade_configs = 25;
*/
public java.util.List
getUpgradeConfigsBuilderList() {
return getUpgradeConfigsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig, io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig.Builder, io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfigOrBuilder>
getUpgradeConfigsFieldBuilder() {
if (upgradeConfigsBuilder_ == null) {
upgradeConfigsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig, io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig.Builder, io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfigOrBuilder>(
upgradeConfigs_,
((bitField0_ & 0x00000008) != 0),
getParentForChildren(),
isClean());
upgradeConfigs_ = null;
}
return upgradeConfigsBuilder_;
}
private int internalRedirectAction_ = 0;
/**
* .envoy.api.v2.route.RouteAction.InternalRedirectAction internal_redirect_action = 26;
* @return The enum numeric value on the wire for internalRedirectAction.
*/
@java.lang.Override public int getInternalRedirectActionValue() {
return internalRedirectAction_;
}
/**
* .envoy.api.v2.route.RouteAction.InternalRedirectAction internal_redirect_action = 26;
* @param value The enum numeric value on the wire for internalRedirectAction to set.
* @return This builder for chaining.
*/
public Builder setInternalRedirectActionValue(int value) {
internalRedirectAction_ = value;
onChanged();
return this;
}
/**
* .envoy.api.v2.route.RouteAction.InternalRedirectAction internal_redirect_action = 26;
* @return The internalRedirectAction.
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.RouteAction.InternalRedirectAction getInternalRedirectAction() {
@SuppressWarnings("deprecation")
io.envoyproxy.envoy.api.v2.route.RouteAction.InternalRedirectAction result = io.envoyproxy.envoy.api.v2.route.RouteAction.InternalRedirectAction.valueOf(internalRedirectAction_);
return result == null ? io.envoyproxy.envoy.api.v2.route.RouteAction.InternalRedirectAction.UNRECOGNIZED : result;
}
/**
* .envoy.api.v2.route.RouteAction.InternalRedirectAction internal_redirect_action = 26;
* @param value The internalRedirectAction to set.
* @return This builder for chaining.
*/
public Builder setInternalRedirectAction(io.envoyproxy.envoy.api.v2.route.RouteAction.InternalRedirectAction value) {
if (value == null) {
throw new NullPointerException();
}
internalRedirectAction_ = value.getNumber();
onChanged();
return this;
}
/**
* .envoy.api.v2.route.RouteAction.InternalRedirectAction internal_redirect_action = 26;
* @return This builder for chaining.
*/
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_api_field_route.RouteAction.internal_redirect_action>`
* is set to :ref:`HANDLE_INTERNAL_REDIRECT
* <envoy_api_enum_value_route.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_api_field_route.RouteAction.internal_redirect_action>`
* set to
* :ref:`PASS_THROUGH_INTERNAL_REDIRECT
* <envoy_api_enum_value_route.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;
* @return Whether the maxInternalRedirects field is set.
*/
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_api_field_route.RouteAction.internal_redirect_action>`
* is set to :ref:`HANDLE_INTERNAL_REDIRECT
* <envoy_api_enum_value_route.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_api_field_route.RouteAction.internal_redirect_action>`
* set to
* :ref:`PASS_THROUGH_INTERNAL_REDIRECT
* <envoy_api_enum_value_route.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_api_field_route.RouteAction.internal_redirect_action>`
* is set to :ref:`HANDLE_INTERNAL_REDIRECT
* <envoy_api_enum_value_route.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_api_field_route.RouteAction.internal_redirect_action>`
* set to
* :ref:`PASS_THROUGH_INTERNAL_REDIRECT
* <envoy_api_enum_value_route.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;
*/
public Builder setMaxInternalRedirects(com.google.protobuf.UInt32Value value) {
if (maxInternalRedirectsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
maxInternalRedirects_ = value;
onChanged();
} else {
maxInternalRedirectsBuilder_.setMessage(value);
}
return this;
}
/**
*
* 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_api_field_route.RouteAction.internal_redirect_action>`
* is set to :ref:`HANDLE_INTERNAL_REDIRECT
* <envoy_api_enum_value_route.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_api_field_route.RouteAction.internal_redirect_action>`
* set to
* :ref:`PASS_THROUGH_INTERNAL_REDIRECT
* <envoy_api_enum_value_route.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_api_field_route.RouteAction.internal_redirect_action>`
* is set to :ref:`HANDLE_INTERNAL_REDIRECT
* <envoy_api_enum_value_route.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_api_field_route.RouteAction.internal_redirect_action>`
* set to
* :ref:`PASS_THROUGH_INTERNAL_REDIRECT
* <envoy_api_enum_value_route.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_api_field_route.RouteAction.internal_redirect_action>`
* is set to :ref:`HANDLE_INTERNAL_REDIRECT
* <envoy_api_enum_value_route.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_api_field_route.RouteAction.internal_redirect_action>`
* set to
* :ref:`PASS_THROUGH_INTERNAL_REDIRECT
* <envoy_api_enum_value_route.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_api_field_route.RouteAction.internal_redirect_action>`
* is set to :ref:`HANDLE_INTERNAL_REDIRECT
* <envoy_api_enum_value_route.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_api_field_route.RouteAction.internal_redirect_action>`
* set to
* :ref:`PASS_THROUGH_INTERNAL_REDIRECT
* <envoy_api_enum_value_route.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_api_field_route.RouteAction.internal_redirect_action>`
* is set to :ref:`HANDLE_INTERNAL_REDIRECT
* <envoy_api_enum_value_route.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_api_field_route.RouteAction.internal_redirect_action>`
* set to
* :ref:`PASS_THROUGH_INTERNAL_REDIRECT
* <envoy_api_enum_value_route.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_api_field_route.RouteAction.internal_redirect_action>`
* is set to :ref:`HANDLE_INTERNAL_REDIRECT
* <envoy_api_enum_value_route.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_api_field_route.RouteAction.internal_redirect_action>`
* set to
* :ref:`PASS_THROUGH_INTERNAL_REDIRECT
* <envoy_api_enum_value_route.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.api.v2.route.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.api.v2.route.HedgePolicy hedge_policy = 27;
*/
public Builder setHedgePolicy(io.envoyproxy.envoy.api.v2.route.HedgePolicy value) {
if (hedgePolicyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
hedgePolicy_ = value;
onChanged();
} else {
hedgePolicyBuilder_.setMessage(value);
}
return this;
}
/**
*
* Indicates 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).
*
*
* .envoy.api.v2.route.HedgePolicy hedge_policy = 27;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.api.v2.route.HedgePolicy, io.envoyproxy.envoy.api.v2.route.HedgePolicy.Builder, io.envoyproxy.envoy.api.v2.route.HedgePolicyOrBuilder>
getHedgePolicyFieldBuilder() {
if (hedgePolicyBuilder_ == null) {
hedgePolicyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.api.v2.route.HedgePolicy, io.envoyproxy.envoy.api.v2.route.HedgePolicy.Builder, io.envoyproxy.envoy.api.v2.route.HedgePolicyOrBuilder>(
getHedgePolicy(),
getParentForChildren(),
isClean());
hedgePolicy_ = null;
}
return hedgePolicyBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:envoy.api.v2.route.RouteAction)
}
// @@protoc_insertion_point(class_scope:envoy.api.v2.route.RouteAction)
private static final io.envoyproxy.envoy.api.v2.route.RouteAction DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.api.v2.route.RouteAction();
}
public static io.envoyproxy.envoy.api.v2.route.RouteAction getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public RouteAction parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new RouteAction(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public io.envoyproxy.envoy.api.v2.route.RouteAction getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}