
io.envoyproxy.envoy.config.route.v3.RouteAction Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: envoy/config/route/v3/route_components.proto
package io.envoyproxy.envoy.config.route.v3;
/**
*
* [#next-free-field: 32]
*
*
* Protobuf type {@code envoy.config.route.v3.RouteAction}
*/
public final class RouteAction extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.config.route.v3.RouteAction)
RouteActionOrBuilder {
private static final long serialVersionUID = 0L;
// Use RouteAction.newBuilder() to construct.
private RouteAction(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private RouteAction() {
clusterNotFoundResponseCode_ = 0;
prefixRewrite_ = "";
requestMirrorPolicies_ = java.util.Collections.emptyList();
priority_ = 0;
rateLimits_ = java.util.Collections.emptyList();
hashPolicy_ = java.util.Collections.emptyList();
upgradeConfigs_ = java.util.Collections.emptyList();
internalRedirectAction_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new RouteAction();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private RouteAction(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
clusterSpecifierCase_ = 1;
clusterSpecifier_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
clusterSpecifierCase_ = 2;
clusterSpecifier_ = s;
break;
}
case 26: {
io.envoyproxy.envoy.config.route.v3.WeightedCluster.Builder subBuilder = null;
if (clusterSpecifierCase_ == 3) {
subBuilder = ((io.envoyproxy.envoy.config.route.v3.WeightedCluster) clusterSpecifier_).toBuilder();
}
clusterSpecifier_ =
input.readMessage(io.envoyproxy.envoy.config.route.v3.WeightedCluster.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((io.envoyproxy.envoy.config.route.v3.WeightedCluster) clusterSpecifier_);
clusterSpecifier_ = subBuilder.buildPartial();
}
clusterSpecifierCase_ = 3;
break;
}
case 34: {
io.envoyproxy.envoy.config.core.v3.Metadata.Builder subBuilder = null;
if (metadataMatch_ != null) {
subBuilder = metadataMatch_.toBuilder();
}
metadataMatch_ = input.readMessage(io.envoyproxy.envoy.config.core.v3.Metadata.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(metadataMatch_);
metadataMatch_ = subBuilder.buildPartial();
}
break;
}
case 42: {
java.lang.String s = input.readStringRequireUtf8();
prefixRewrite_ = s;
break;
}
case 50: {
java.lang.String s = input.readStringRequireUtf8();
hostRewriteSpecifierCase_ = 6;
hostRewriteSpecifier_ = s;
break;
}
case 58: {
com.google.protobuf.BoolValue.Builder subBuilder = null;
if (hostRewriteSpecifierCase_ == 7) {
subBuilder = ((com.google.protobuf.BoolValue) hostRewriteSpecifier_).toBuilder();
}
hostRewriteSpecifier_ =
input.readMessage(com.google.protobuf.BoolValue.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.google.protobuf.BoolValue) hostRewriteSpecifier_);
hostRewriteSpecifier_ = subBuilder.buildPartial();
}
hostRewriteSpecifierCase_ = 7;
break;
}
case 66: {
com.google.protobuf.Duration.Builder subBuilder = null;
if (timeout_ != null) {
subBuilder = timeout_.toBuilder();
}
timeout_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(timeout_);
timeout_ = subBuilder.buildPartial();
}
break;
}
case 74: {
io.envoyproxy.envoy.config.route.v3.RetryPolicy.Builder subBuilder = null;
if (retryPolicy_ != null) {
subBuilder = retryPolicy_.toBuilder();
}
retryPolicy_ = input.readMessage(io.envoyproxy.envoy.config.route.v3.RetryPolicy.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(retryPolicy_);
retryPolicy_ = subBuilder.buildPartial();
}
break;
}
case 88: {
int rawValue = input.readEnum();
priority_ = rawValue;
break;
}
case 106: {
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
rateLimits_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000002;
}
rateLimits_.add(
input.readMessage(io.envoyproxy.envoy.config.route.v3.RateLimit.parser(), extensionRegistry));
break;
}
case 114: {
com.google.protobuf.BoolValue.Builder subBuilder = null;
if (includeVhRateLimits_ != null) {
subBuilder = includeVhRateLimits_.toBuilder();
}
includeVhRateLimits_ = input.readMessage(com.google.protobuf.BoolValue.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(includeVhRateLimits_);
includeVhRateLimits_ = subBuilder.buildPartial();
}
break;
}
case 122: {
if (!((mutable_bitField0_ & 0x00000004) != 0)) {
hashPolicy_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000004;
}
hashPolicy_.add(
input.readMessage(io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.parser(), extensionRegistry));
break;
}
case 138: {
io.envoyproxy.envoy.config.route.v3.CorsPolicy.Builder subBuilder = null;
if (cors_ != null) {
subBuilder = cors_.toBuilder();
}
cors_ = input.readMessage(io.envoyproxy.envoy.config.route.v3.CorsPolicy.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(cors_);
cors_ = subBuilder.buildPartial();
}
break;
}
case 160: {
int rawValue = input.readEnum();
clusterNotFoundResponseCode_ = rawValue;
break;
}
case 186: {
com.google.protobuf.Duration.Builder subBuilder = null;
if (maxGrpcTimeout_ != null) {
subBuilder = maxGrpcTimeout_.toBuilder();
}
maxGrpcTimeout_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(maxGrpcTimeout_);
maxGrpcTimeout_ = subBuilder.buildPartial();
}
break;
}
case 194: {
com.google.protobuf.Duration.Builder subBuilder = null;
if (idleTimeout_ != null) {
subBuilder = idleTimeout_.toBuilder();
}
idleTimeout_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(idleTimeout_);
idleTimeout_ = subBuilder.buildPartial();
}
break;
}
case 202: {
if (!((mutable_bitField0_ & 0x00000008) != 0)) {
upgradeConfigs_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000008;
}
upgradeConfigs_.add(
input.readMessage(io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.parser(), extensionRegistry));
break;
}
case 208: {
int rawValue = input.readEnum();
internalRedirectAction_ = rawValue;
break;
}
case 218: {
io.envoyproxy.envoy.config.route.v3.HedgePolicy.Builder subBuilder = null;
if (hedgePolicy_ != null) {
subBuilder = hedgePolicy_.toBuilder();
}
hedgePolicy_ = input.readMessage(io.envoyproxy.envoy.config.route.v3.HedgePolicy.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(hedgePolicy_);
hedgePolicy_ = subBuilder.buildPartial();
}
break;
}
case 226: {
com.google.protobuf.Duration.Builder subBuilder = null;
if (grpcTimeoutOffset_ != null) {
subBuilder = grpcTimeoutOffset_.toBuilder();
}
grpcTimeoutOffset_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(grpcTimeoutOffset_);
grpcTimeoutOffset_ = subBuilder.buildPartial();
}
break;
}
case 234: {
java.lang.String s = input.readStringRequireUtf8();
hostRewriteSpecifierCase_ = 29;
hostRewriteSpecifier_ = s;
break;
}
case 242: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
requestMirrorPolicies_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
requestMirrorPolicies_.add(
input.readMessage(io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy.parser(), extensionRegistry));
break;
}
case 250: {
com.google.protobuf.UInt32Value.Builder subBuilder = null;
if (maxInternalRedirects_ != null) {
subBuilder = maxInternalRedirects_.toBuilder();
}
maxInternalRedirects_ = input.readMessage(com.google.protobuf.UInt32Value.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(maxInternalRedirects_);
maxInternalRedirects_ = subBuilder.buildPartial();
}
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000002) != 0)) {
rateLimits_ = java.util.Collections.unmodifiableList(rateLimits_);
}
if (((mutable_bitField0_ & 0x00000004) != 0)) {
hashPolicy_ = java.util.Collections.unmodifiableList(hashPolicy_);
}
if (((mutable_bitField0_ & 0x00000008) != 0)) {
upgradeConfigs_ = java.util.Collections.unmodifiableList(upgradeConfigs_);
}
if (((mutable_bitField0_ & 0x00000001) != 0)) {
requestMirrorPolicies_ = java.util.Collections.unmodifiableList(requestMirrorPolicies_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.route.v3.RouteAction.class, io.envoyproxy.envoy.config.route.v3.RouteAction.Builder.class);
}
/**
* Protobuf enum {@code envoy.config.route.v3.RouteAction.ClusterNotFoundResponseCode}
*/
public enum ClusterNotFoundResponseCode
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
* HTTP status code - 503 Service Unavailable.
*
*
* SERVICE_UNAVAILABLE = 0;
*/
SERVICE_UNAVAILABLE(0),
/**
*
* HTTP status code - 404 Not Found.
*
*
* NOT_FOUND = 1;
*/
NOT_FOUND(1),
UNRECOGNIZED(-1),
;
/**
*
* HTTP status code - 503 Service Unavailable.
*
*
* 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;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static ClusterNotFoundResponseCode valueOf(int value) {
return forNumber(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() {
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return io.envoyproxy.envoy.config.route.v3.RouteAction.getDescriptor().getEnumTypes().get(0);
}
private static final ClusterNotFoundResponseCode[] VALUES = values();
public static ClusterNotFoundResponseCode valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private ClusterNotFoundResponseCode(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:envoy.config.route.v3.RouteAction.ClusterNotFoundResponseCode)
}
/**
*
* Configures :ref:`internal redirect <arch_overview_internal_redirects>` behavior.
*
*
* Protobuf enum {@code envoy.config.route.v3.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;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static InternalRedirectAction valueOf(int value) {
return forNumber(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() {
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return io.envoyproxy.envoy.config.route.v3.RouteAction.getDescriptor().getEnumTypes().get(1);
}
private static final InternalRedirectAction[] VALUES = values();
public static InternalRedirectAction valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private InternalRedirectAction(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:envoy.config.route.v3.RouteAction.InternalRedirectAction)
}
public interface RequestMirrorPolicyOrBuilder extends
// @@protoc_insertion_point(interface_extends:envoy.config.route.v3.RouteAction.RequestMirrorPolicy)
com.google.protobuf.MessageOrBuilder {
/**
*
* Specifies the cluster that requests will be mirrored to. The cluster must
* exist in the cluster manager configuration.
*
*
* string cluster = 1 [(.validate.rules) = { ... }
*/
java.lang.String getCluster();
/**
*
* Specifies the cluster that requests will be mirrored to. The cluster must
* exist in the cluster manager configuration.
*
*
* string cluster = 1 [(.validate.rules) = { ... }
*/
com.google.protobuf.ByteString
getClusterBytes();
/**
*
* If not specified, all requests to the target cluster will be mirrored.
* If specified, this field takes precedence over the `runtime_key` field and requests must also
* fall under the percentage of matches indicated by this field.
* For some fraction N/D, a random number in the range [0,D) is selected. If the
* number is <= the value of the numerator N, or if the key is not present, the default
* value, the request will be mirrored.
*
*
* .envoy.config.core.v3.RuntimeFractionalPercent runtime_fraction = 3;
*/
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.
*
*
* .envoy.config.core.v3.RuntimeFractionalPercent runtime_fraction = 3;
*/
io.envoyproxy.envoy.config.core.v3.RuntimeFractionalPercent getRuntimeFraction();
/**
*
* If not specified, all requests to the target cluster will be mirrored.
* If specified, this field takes precedence over the `runtime_key` field and requests must also
* fall under the percentage of matches indicated by this field.
* For some fraction N/D, a random number in the range [0,D) is selected. If the
* number is <= the value of the numerator N, or if the key is not present, the default
* value, the request will be mirrored.
*
*
* .envoy.config.core.v3.RuntimeFractionalPercent runtime_fraction = 3;
*/
io.envoyproxy.envoy.config.core.v3.RuntimeFractionalPercentOrBuilder getRuntimeFractionOrBuilder();
}
/**
*
* 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.config.route.v3.RouteAction.RequestMirrorPolicy}
*/
public static final class RequestMirrorPolicy extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.config.route.v3.RouteAction.RequestMirrorPolicy)
RequestMirrorPolicyOrBuilder {
private static final long serialVersionUID = 0L;
// Use RequestMirrorPolicy.newBuilder() to construct.
private RequestMirrorPolicy(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private RequestMirrorPolicy() {
cluster_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new RequestMirrorPolicy();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private RequestMirrorPolicy(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
cluster_ = s;
break;
}
case 26: {
io.envoyproxy.envoy.config.core.v3.RuntimeFractionalPercent.Builder subBuilder = null;
if (runtimeFraction_ != null) {
subBuilder = runtimeFraction_.toBuilder();
}
runtimeFraction_ = input.readMessage(io.envoyproxy.envoy.config.core.v3.RuntimeFractionalPercent.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(runtimeFraction_);
runtimeFraction_ = subBuilder.buildPartial();
}
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_RequestMirrorPolicy_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_RequestMirrorPolicy_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy.class, io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy.Builder.class);
}
public static final int CLUSTER_FIELD_NUMBER = 1;
private volatile java.lang.Object cluster_;
/**
*
* Specifies the cluster that requests will be mirrored to. The cluster must
* exist in the cluster manager configuration.
*
*
* string cluster = 1 [(.validate.rules) = { ... }
*/
public java.lang.String getCluster() {
java.lang.Object ref = cluster_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
cluster_ = s;
return s;
}
}
/**
*
* Specifies the cluster that requests will be mirrored to. The cluster must
* exist in the cluster manager configuration.
*
*
* string cluster = 1 [(.validate.rules) = { ... }
*/
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_FRACTION_FIELD_NUMBER = 3;
private io.envoyproxy.envoy.config.core.v3.RuntimeFractionalPercent runtimeFraction_;
/**
*
* If not specified, all requests to the target cluster will be mirrored.
* If specified, this field takes precedence over the `runtime_key` field and requests must also
* fall under the percentage of matches indicated by this field.
* For some fraction N/D, a random number in the range [0,D) is selected. If the
* number is <= the value of the numerator N, or if the key is not present, the default
* value, the request will be mirrored.
*
*
* .envoy.config.core.v3.RuntimeFractionalPercent runtime_fraction = 3;
*/
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.
*
*
* .envoy.config.core.v3.RuntimeFractionalPercent runtime_fraction = 3;
*/
public io.envoyproxy.envoy.config.core.v3.RuntimeFractionalPercent getRuntimeFraction() {
return runtimeFraction_ == null ? io.envoyproxy.envoy.config.core.v3.RuntimeFractionalPercent.getDefaultInstance() : runtimeFraction_;
}
/**
*
* If not specified, all requests to the target cluster will be mirrored.
* If specified, this field takes precedence over the `runtime_key` field and requests must also
* fall under the percentage of matches indicated by this field.
* For some fraction N/D, a random number in the range [0,D) is selected. If the
* number is <= the value of the numerator N, or if the key is not present, the default
* value, the request will be mirrored.
*
*
* .envoy.config.core.v3.RuntimeFractionalPercent runtime_fraction = 3;
*/
public io.envoyproxy.envoy.config.core.v3.RuntimeFractionalPercentOrBuilder getRuntimeFractionOrBuilder() {
return getRuntimeFraction();
}
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 (!getClusterBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cluster_);
}
if (runtimeFraction_ != null) {
output.writeMessage(3, getRuntimeFraction());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getClusterBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cluster_);
}
if (runtimeFraction_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getRuntimeFraction());
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy)) {
return super.equals(obj);
}
io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy other = (io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy) obj;
if (!getCluster()
.equals(other.getCluster())) return false;
if (hasRuntimeFraction() != other.hasRuntimeFraction()) return false;
if (hasRuntimeFraction()) {
if (!getRuntimeFraction()
.equals(other.getRuntimeFraction())) 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();
if (hasRuntimeFraction()) {
hash = (37 * hash) + RUNTIME_FRACTION_FIELD_NUMBER;
hash = (53 * hash) + getRuntimeFraction().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* The router is capable of shadowing traffic from one cluster to another. The current
* implementation is "fire and forget," meaning Envoy will not wait for the shadow cluster to
* respond before returning the response from the primary cluster. All normal statistics are
* collected for the shadow cluster making this feature useful for testing.
* During shadowing, the host/authority header is altered such that *-shadow* is appended. This is
* useful for logging. For example, *cluster1* becomes *cluster1-shadow*.
* .. note::
* Shadowing will not be triggered if the primary cluster does not exist.
*
*
* Protobuf type {@code envoy.config.route.v3.RouteAction.RequestMirrorPolicy}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.config.route.v3.RouteAction.RequestMirrorPolicy)
io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicyOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_RequestMirrorPolicy_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_RequestMirrorPolicy_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy.class, io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy.Builder.class);
}
// Construct using io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
cluster_ = "";
if (runtimeFractionBuilder_ == null) {
runtimeFraction_ = null;
} else {
runtimeFraction_ = null;
runtimeFractionBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_RequestMirrorPolicy_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy getDefaultInstanceForType() {
return io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy build() {
io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy buildPartial() {
io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy result = new io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy(this);
result.cluster_ = cluster_;
if (runtimeFractionBuilder_ == null) {
result.runtimeFraction_ = runtimeFraction_;
} else {
result.runtimeFraction_ = runtimeFractionBuilder_.build();
}
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy) {
return mergeFrom((io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy other) {
if (other == io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy.getDefaultInstance()) return this;
if (!other.getCluster().isEmpty()) {
cluster_ = other.cluster_;
onChanged();
}
if (other.hasRuntimeFraction()) {
mergeRuntimeFraction(other.getRuntimeFraction());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object cluster_ = "";
/**
*
* Specifies the cluster that requests will be mirrored to. The cluster must
* exist in the cluster manager configuration.
*
*
* string cluster = 1 [(.validate.rules) = { ... }
*/
public java.lang.String getCluster() {
java.lang.Object ref = cluster_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
cluster_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Specifies the cluster that requests will be mirrored to. The cluster must
* exist in the cluster manager configuration.
*
*
* string cluster = 1 [(.validate.rules) = { ... }
*/
public com.google.protobuf.ByteString
getClusterBytes() {
java.lang.Object ref = cluster_;
if (ref instanceof 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;
}
}
/**
*
* Specifies the cluster that requests will be mirrored to. The cluster must
* exist in the cluster manager configuration.
*
*
* string cluster = 1 [(.validate.rules) = { ... }
*/
public Builder setCluster(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
cluster_ = value;
onChanged();
return this;
}
/**
*
* Specifies the cluster that requests will be mirrored to. The cluster must
* exist in the cluster manager configuration.
*
*
* string cluster = 1 [(.validate.rules) = { ... }
*/
public Builder clearCluster() {
cluster_ = getDefaultInstance().getCluster();
onChanged();
return this;
}
/**
*
* Specifies the cluster that requests will be mirrored to. The cluster must
* exist in the cluster manager configuration.
*
*
* string cluster = 1 [(.validate.rules) = { ... }
*/
public Builder setClusterBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
cluster_ = value;
onChanged();
return this;
}
private io.envoyproxy.envoy.config.core.v3.RuntimeFractionalPercent runtimeFraction_;
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.core.v3.RuntimeFractionalPercent, io.envoyproxy.envoy.config.core.v3.RuntimeFractionalPercent.Builder, io.envoyproxy.envoy.config.core.v3.RuntimeFractionalPercentOrBuilder> runtimeFractionBuilder_;
/**
*
* If not specified, all requests to the target cluster will be mirrored.
* If specified, this field takes precedence over the `runtime_key` field and requests must also
* fall under the percentage of matches indicated by this field.
* For some fraction N/D, a random number in the range [0,D) is selected. If the
* number is <= the value of the numerator N, or if the key is not present, the default
* value, the request will be mirrored.
*
*
* .envoy.config.core.v3.RuntimeFractionalPercent runtime_fraction = 3;
*/
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.
*
*
* .envoy.config.core.v3.RuntimeFractionalPercent runtime_fraction = 3;
*/
public io.envoyproxy.envoy.config.core.v3.RuntimeFractionalPercent getRuntimeFraction() {
if (runtimeFractionBuilder_ == null) {
return runtimeFraction_ == null ? io.envoyproxy.envoy.config.core.v3.RuntimeFractionalPercent.getDefaultInstance() : runtimeFraction_;
} else {
return runtimeFractionBuilder_.getMessage();
}
}
/**
*
* If not specified, all requests to the target cluster will be mirrored.
* If specified, this field takes precedence over the `runtime_key` field and requests must also
* fall under the percentage of matches indicated by this field.
* For some fraction N/D, a random number in the range [0,D) is selected. If the
* number is <= the value of the numerator N, or if the key is not present, the default
* value, the request will be mirrored.
*
*
* .envoy.config.core.v3.RuntimeFractionalPercent runtime_fraction = 3;
*/
public Builder setRuntimeFraction(io.envoyproxy.envoy.config.core.v3.RuntimeFractionalPercent value) {
if (runtimeFractionBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
runtimeFraction_ = value;
onChanged();
} else {
runtimeFractionBuilder_.setMessage(value);
}
return this;
}
/**
*
* If not specified, all requests to the target cluster will be mirrored.
* If specified, this field takes precedence over the `runtime_key` field and requests must also
* fall under the percentage of matches indicated by this field.
* For some fraction N/D, a random number in the range [0,D) is selected. If the
* number is <= the value of the numerator N, or if the key is not present, the default
* value, the request will be mirrored.
*
*
* .envoy.config.core.v3.RuntimeFractionalPercent runtime_fraction = 3;
*/
public Builder setRuntimeFraction(
io.envoyproxy.envoy.config.core.v3.RuntimeFractionalPercent.Builder builderForValue) {
if (runtimeFractionBuilder_ == null) {
runtimeFraction_ = builderForValue.build();
onChanged();
} else {
runtimeFractionBuilder_.setMessage(builderForValue.build());
}
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.
*
*
* .envoy.config.core.v3.RuntimeFractionalPercent runtime_fraction = 3;
*/
public Builder mergeRuntimeFraction(io.envoyproxy.envoy.config.core.v3.RuntimeFractionalPercent value) {
if (runtimeFractionBuilder_ == null) {
if (runtimeFraction_ != null) {
runtimeFraction_ =
io.envoyproxy.envoy.config.core.v3.RuntimeFractionalPercent.newBuilder(runtimeFraction_).mergeFrom(value).buildPartial();
} else {
runtimeFraction_ = value;
}
onChanged();
} else {
runtimeFractionBuilder_.mergeFrom(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.
*
*
* .envoy.config.core.v3.RuntimeFractionalPercent runtime_fraction = 3;
*/
public Builder clearRuntimeFraction() {
if (runtimeFractionBuilder_ == null) {
runtimeFraction_ = null;
onChanged();
} else {
runtimeFraction_ = null;
runtimeFractionBuilder_ = null;
}
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.
*
*
* .envoy.config.core.v3.RuntimeFractionalPercent runtime_fraction = 3;
*/
public io.envoyproxy.envoy.config.core.v3.RuntimeFractionalPercent.Builder getRuntimeFractionBuilder() {
onChanged();
return getRuntimeFractionFieldBuilder().getBuilder();
}
/**
*
* If not specified, all requests to the target cluster will be mirrored.
* If specified, this field takes precedence over the `runtime_key` field and requests must also
* fall under the percentage of matches indicated by this field.
* For some fraction N/D, a random number in the range [0,D) is selected. If the
* number is <= the value of the numerator N, or if the key is not present, the default
* value, the request will be mirrored.
*
*
* .envoy.config.core.v3.RuntimeFractionalPercent runtime_fraction = 3;
*/
public io.envoyproxy.envoy.config.core.v3.RuntimeFractionalPercentOrBuilder getRuntimeFractionOrBuilder() {
if (runtimeFractionBuilder_ != null) {
return runtimeFractionBuilder_.getMessageOrBuilder();
} else {
return runtimeFraction_ == null ?
io.envoyproxy.envoy.config.core.v3.RuntimeFractionalPercent.getDefaultInstance() : runtimeFraction_;
}
}
/**
*
* If not specified, all requests to the target cluster will be mirrored.
* If specified, this field takes precedence over the `runtime_key` field and requests must also
* fall under the percentage of matches indicated by this field.
* For some fraction N/D, a random number in the range [0,D) is selected. If the
* number is <= the value of the numerator N, or if the key is not present, the default
* value, the request will be mirrored.
*
*
* .envoy.config.core.v3.RuntimeFractionalPercent runtime_fraction = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.core.v3.RuntimeFractionalPercent, io.envoyproxy.envoy.config.core.v3.RuntimeFractionalPercent.Builder, io.envoyproxy.envoy.config.core.v3.RuntimeFractionalPercentOrBuilder>
getRuntimeFractionFieldBuilder() {
if (runtimeFractionBuilder_ == null) {
runtimeFractionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.core.v3.RuntimeFractionalPercent, io.envoyproxy.envoy.config.core.v3.RuntimeFractionalPercent.Builder, io.envoyproxy.envoy.config.core.v3.RuntimeFractionalPercentOrBuilder>(
getRuntimeFraction(),
getParentForChildren(),
isClean());
runtimeFraction_ = null;
}
return runtimeFractionBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:envoy.config.route.v3.RouteAction.RequestMirrorPolicy)
}
// @@protoc_insertion_point(class_scope:envoy.config.route.v3.RouteAction.RequestMirrorPolicy)
private static final io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy();
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public RequestMirrorPolicy parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new RequestMirrorPolicy(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface HashPolicyOrBuilder extends
// @@protoc_insertion_point(interface_extends:envoy.config.route.v3.RouteAction.HashPolicy)
com.google.protobuf.MessageOrBuilder {
/**
*
* Header hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.Header header = 1;
*/
boolean hasHeader();
/**
*
* Header hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.Header header = 1;
*/
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header getHeader();
/**
*
* Header hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.Header header = 1;
*/
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.HeaderOrBuilder getHeaderOrBuilder();
/**
*
* Cookie hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.Cookie cookie = 2;
*/
boolean hasCookie();
/**
*
* Cookie hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.Cookie cookie = 2;
*/
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie getCookie();
/**
*
* Cookie hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.Cookie cookie = 2;
*/
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.CookieOrBuilder getCookieOrBuilder();
/**
*
* Connection properties hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties connection_properties = 3;
*/
boolean hasConnectionProperties();
/**
*
* Connection properties hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties connection_properties = 3;
*/
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties getConnectionProperties();
/**
*
* Connection properties hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties connection_properties = 3;
*/
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionPropertiesOrBuilder getConnectionPropertiesOrBuilder();
/**
*
* Query parameter hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter query_parameter = 5;
*/
boolean hasQueryParameter();
/**
*
* Query parameter hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter query_parameter = 5;
*/
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter getQueryParameter();
/**
*
* Query parameter hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter query_parameter = 5;
*/
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameterOrBuilder getQueryParameterOrBuilder();
/**
*
* 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;
*/
boolean getTerminal();
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.PolicySpecifierCase getPolicySpecifierCase();
}
/**
*
* Specifies the route's hashing policy if the upstream cluster uses a hashing :ref:`load balancer
* <arch_overview_load_balancing_types>`.
* [#next-free-field: 6]
*
*
* Protobuf type {@code envoy.config.route.v3.RouteAction.HashPolicy}
*/
public static final class HashPolicy extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.config.route.v3.RouteAction.HashPolicy)
HashPolicyOrBuilder {
private static final long serialVersionUID = 0L;
// Use HashPolicy.newBuilder() to construct.
private HashPolicy(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private HashPolicy() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new HashPolicy();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private HashPolicy(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header.Builder subBuilder = null;
if (policySpecifierCase_ == 1) {
subBuilder = ((io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header) policySpecifier_).toBuilder();
}
policySpecifier_ =
input.readMessage(io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header) policySpecifier_);
policySpecifier_ = subBuilder.buildPartial();
}
policySpecifierCase_ = 1;
break;
}
case 18: {
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie.Builder subBuilder = null;
if (policySpecifierCase_ == 2) {
subBuilder = ((io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie) policySpecifier_).toBuilder();
}
policySpecifier_ =
input.readMessage(io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie) policySpecifier_);
policySpecifier_ = subBuilder.buildPartial();
}
policySpecifierCase_ = 2;
break;
}
case 26: {
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties.Builder subBuilder = null;
if (policySpecifierCase_ == 3) {
subBuilder = ((io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties) policySpecifier_).toBuilder();
}
policySpecifier_ =
input.readMessage(io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties) policySpecifier_);
policySpecifier_ = subBuilder.buildPartial();
}
policySpecifierCase_ = 3;
break;
}
case 32: {
terminal_ = input.readBool();
break;
}
case 42: {
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter.Builder subBuilder = null;
if (policySpecifierCase_ == 5) {
subBuilder = ((io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter) policySpecifier_).toBuilder();
}
policySpecifier_ =
input.readMessage(io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter) policySpecifier_);
policySpecifier_ = subBuilder.buildPartial();
}
policySpecifierCase_ = 5;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_HashPolicy_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_HashPolicy_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.class, io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Builder.class);
}
public interface HeaderOrBuilder extends
// @@protoc_insertion_point(interface_extends:envoy.config.route.v3.RouteAction.HashPolicy.Header)
com.google.protobuf.MessageOrBuilder {
/**
*
* The name of the request header that will be used to obtain the hash
* key. If the request header is not present, no hash will be produced.
*
*
* string header_name = 1 [(.validate.rules) = { ... }
*/
java.lang.String getHeaderName();
/**
*
* 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) = { ... }
*/
com.google.protobuf.ByteString
getHeaderNameBytes();
}
/**
* Protobuf type {@code envoy.config.route.v3.RouteAction.HashPolicy.Header}
*/
public static final class Header extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.config.route.v3.RouteAction.HashPolicy.Header)
HeaderOrBuilder {
private static final long serialVersionUID = 0L;
// Use Header.newBuilder() to construct.
private Header(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Header() {
headerName_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Header();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Header(
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();
headerName_ = s;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_HashPolicy_Header_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_HashPolicy_Header_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header.class, io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header.Builder.class);
}
public static final int HEADER_NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object headerName_;
/**
*
* 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) = { ... }
*/
public java.lang.String getHeaderName() {
java.lang.Object ref = headerName_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
headerName_ = s;
return s;
}
}
/**
*
* 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) = { ... }
*/
public com.google.protobuf.ByteString
getHeaderNameBytes() {
java.lang.Object ref = headerName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
headerName_ = 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 (!getHeaderNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, headerName_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getHeaderNameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, headerName_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header)) {
return super.equals(obj);
}
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header other = (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header) obj;
if (!getHeaderName()
.equals(other.getHeaderName())) 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) + HEADER_NAME_FIELD_NUMBER;
hash = (53 * hash) + getHeaderName().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code envoy.config.route.v3.RouteAction.HashPolicy.Header}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.config.route.v3.RouteAction.HashPolicy.Header)
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.HeaderOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_HashPolicy_Header_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_HashPolicy_Header_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header.class, io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header.Builder.class);
}
// Construct using io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header.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();
headerName_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_HashPolicy_Header_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header getDefaultInstanceForType() {
return io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header build() {
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header buildPartial() {
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header result = new io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header(this);
result.headerName_ = headerName_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header) {
return mergeFrom((io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header other) {
if (other == io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header.getDefaultInstance()) return this;
if (!other.getHeaderName().isEmpty()) {
headerName_ = other.headerName_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object headerName_ = "";
/**
*
* 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) = { ... }
*/
public java.lang.String getHeaderName() {
java.lang.Object ref = headerName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
headerName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* 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) = { ... }
*/
public com.google.protobuf.ByteString
getHeaderNameBytes() {
java.lang.Object ref = headerName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
headerName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* 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) = { ... }
*/
public Builder setHeaderName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
headerName_ = value;
onChanged();
return this;
}
/**
*
* 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) = { ... }
*/
public Builder clearHeaderName() {
headerName_ = getDefaultInstance().getHeaderName();
onChanged();
return this;
}
/**
*
* 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) = { ... }
*/
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.config.route.v3.RouteAction.HashPolicy.Header)
}
// @@protoc_insertion_point(class_scope:envoy.config.route.v3.RouteAction.HashPolicy.Header)
private static final io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header();
}
public static io.envoyproxy.envoy.config.route.v3.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.config.route.v3.RouteAction.HashPolicy.Header getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface CookieOrBuilder extends
// @@protoc_insertion_point(interface_extends:envoy.config.route.v3.RouteAction.HashPolicy.Cookie)
com.google.protobuf.MessageOrBuilder {
/**
*
* The name of the cookie that will be used to obtain the hash key. If the
* cookie is not present and ttl below is not set, no hash will be
* produced.
*
*
* string name = 1 [(.validate.rules) = { ... }
*/
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) = { ... }
*/
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;
*/
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.
*
*
* .google.protobuf.Duration ttl = 2;
*/
com.google.protobuf.Duration getTtl();
/**
*
* 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;
*/
com.google.protobuf.DurationOrBuilder getTtlOrBuilder();
/**
*
* 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;
*/
java.lang.String getPath();
/**
*
* 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;
*/
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.config.route.v3.RouteAction.HashPolicy.Cookie}
*/
public static final class Cookie extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.config.route.v3.RouteAction.HashPolicy.Cookie)
CookieOrBuilder {
private static final long serialVersionUID = 0L;
// Use Cookie.newBuilder() to construct.
private Cookie(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Cookie() {
name_ = "";
path_ = "";
}
@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 (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_HashPolicy_Cookie_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_HashPolicy_Cookie_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie.class, io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie.Builder.class);
}
public static final int NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object name_;
/**
*
* The name of the cookie that will be used to obtain the hash key. If the
* cookie is not present and ttl below is not set, no hash will be
* produced.
*
*
* string name = 1 [(.validate.rules) = { ... }
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
}
}
/**
*
* The 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) = { ... }
*/
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;
*/
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.
*
*
* .google.protobuf.Duration ttl = 2;
*/
public com.google.protobuf.Duration getTtl() {
return ttl_ == null ? com.google.protobuf.Duration.getDefaultInstance() : 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;
*/
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.
*
*
* string path = 3;
*/
public java.lang.String getPath() {
java.lang.Object ref = path_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
path_ = s;
return s;
}
}
/**
*
* 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;
*/
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 (!getNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (ttl_ != null) {
output.writeMessage(2, getTtl());
}
if (!getPathBytes().isEmpty()) {
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 (!getNameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
if (ttl_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getTtl());
}
if (!getPathBytes().isEmpty()) {
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.config.route.v3.RouteAction.HashPolicy.Cookie)) {
return super.equals(obj);
}
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie other = (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie) obj;
if (!getName()
.equals(other.getName())) return false;
if (hasTtl() != other.hasTtl()) return false;
if (hasTtl()) {
if (!getTtl()
.equals(other.getTtl())) return false;
}
if (!getPath()
.equals(other.getPath())) return false;
if (!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.config.route.v3.RouteAction.HashPolicy.Cookie parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Envoy supports two types of cookie affinity:
* 1. Passive. Envoy takes a cookie that's present in the cookies header and
* hashes on its value.
* 2. Generated. Envoy generates and sets a cookie with an expiration (TTL)
* on the first request from the client in its response to the client,
* based on the endpoint the request gets sent to. The client then
* presents this on the next and all subsequent requests. The hash of
* this is sufficient to ensure these requests get sent to the same
* endpoint. The cookie is generated by hashing the source and
* destination ports and addresses so that multiple independent HTTP2
* streams on the same connection will independently receive the same
* cookie, even if they arrive at the Envoy simultaneously.
*
*
* Protobuf type {@code envoy.config.route.v3.RouteAction.HashPolicy.Cookie}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.config.route.v3.RouteAction.HashPolicy.Cookie)
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.CookieOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_HashPolicy_Cookie_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_HashPolicy_Cookie_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie.class, io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie.Builder.class);
}
// Construct using io.envoyproxy.envoy.config.route.v3.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.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_HashPolicy_Cookie_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie getDefaultInstanceForType() {
return io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie build() {
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie buildPartial() {
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie result = new io.envoyproxy.envoy.config.route.v3.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.config.route.v3.RouteAction.HashPolicy.Cookie) {
return mergeFrom((io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie other) {
if (other == io.envoyproxy.envoy.config.route.v3.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.config.route.v3.RouteAction.HashPolicy.Cookie parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.config.route.v3.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.
*
*
* string name = 1 [(.validate.rules) = { ... }
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The 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) = { ... }
*/
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) = { ... }
*/
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) = { ... }
*/
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) = { ... }
*/
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;
*/
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.
*
*
* .google.protobuf.Duration ttl = 2;
*/
public com.google.protobuf.Duration getTtl() {
if (ttlBuilder_ == null) {
return ttl_ == null ? com.google.protobuf.Duration.getDefaultInstance() : ttl_;
} else {
return ttlBuilder_.getMessage();
}
}
/**
*
* 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.
*
*
* .google.protobuf.Duration ttl = 2;
*/
public Builder setTtl(
com.google.protobuf.Duration.Builder builderForValue) {
if (ttlBuilder_ == null) {
ttl_ = builderForValue.build();
onChanged();
} else {
ttlBuilder_.setMessage(builderForValue.build());
}
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.
*
*
* .google.protobuf.Duration ttl = 2;
*/
public Builder mergeTtl(com.google.protobuf.Duration value) {
if (ttlBuilder_ == null) {
if (ttl_ != null) {
ttl_ =
com.google.protobuf.Duration.newBuilder(ttl_).mergeFrom(value).buildPartial();
} else {
ttl_ = value;
}
onChanged();
} else {
ttlBuilder_.mergeFrom(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.
*
*
* .google.protobuf.Duration ttl = 2;
*/
public Builder clearTtl() {
if (ttlBuilder_ == null) {
ttl_ = null;
onChanged();
} else {
ttl_ = null;
ttlBuilder_ = null;
}
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.
*
*
* .google.protobuf.Duration ttl = 2;
*/
public com.google.protobuf.Duration.Builder getTtlBuilder() {
onChanged();
return getTtlFieldBuilder().getBuilder();
}
/**
*
* 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 com.google.protobuf.DurationOrBuilder getTtlOrBuilder() {
if (ttlBuilder_ != null) {
return ttlBuilder_.getMessageOrBuilder();
} else {
return ttl_ == null ?
com.google.protobuf.Duration.getDefaultInstance() : 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;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>
getTtlFieldBuilder() {
if (ttlBuilder_ == null) {
ttlBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>(
getTtl(),
getParentForChildren(),
isClean());
ttl_ = null;
}
return ttlBuilder_;
}
private 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.
*
*
* string path = 3;
*/
public java.lang.String getPath() {
java.lang.Object ref = path_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
path_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* 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;
*/
public com.google.protobuf.ByteString
getPathBytes() {
java.lang.Object ref = path_;
if (ref instanceof 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;
}
}
/**
*
* 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;
*/
public Builder setPath(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
path_ = value;
onChanged();
return this;
}
/**
*
* 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;
*/
public Builder clearPath() {
path_ = getDefaultInstance().getPath();
onChanged();
return this;
}
/**
*
* 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;
*/
public Builder setPathBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
path_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:envoy.config.route.v3.RouteAction.HashPolicy.Cookie)
}
// @@protoc_insertion_point(class_scope:envoy.config.route.v3.RouteAction.HashPolicy.Cookie)
private static final io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie();
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Cookie parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Cookie(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ConnectionPropertiesOrBuilder extends
// @@protoc_insertion_point(interface_extends:envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties)
com.google.protobuf.MessageOrBuilder {
/**
*
* Hash on source IP address.
*
*
* bool source_ip = 1;
*/
boolean getSourceIp();
}
/**
* Protobuf type {@code envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties}
*/
public static final class ConnectionProperties extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties)
ConnectionPropertiesOrBuilder {
private static final long serialVersionUID = 0L;
// Use ConnectionProperties.newBuilder() to construct.
private ConnectionProperties(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ConnectionProperties() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ConnectionProperties();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ConnectionProperties(
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 8: {
sourceIp_ = input.readBool();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_HashPolicy_ConnectionProperties_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_HashPolicy_ConnectionProperties_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties.class, io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties.Builder.class);
}
public static final int SOURCE_IP_FIELD_NUMBER = 1;
private boolean sourceIp_;
/**
*
* Hash on source IP address.
*
*
* bool source_ip = 1;
*/
public boolean getSourceIp() {
return sourceIp_;
}
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 (sourceIp_ != false) {
output.writeBool(1, sourceIp_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (sourceIp_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(1, sourceIp_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties)) {
return super.equals(obj);
}
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties other = (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties) obj;
if (getSourceIp()
!= other.getSourceIp()) 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) + SOURCE_IP_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getSourceIp());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties)
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionPropertiesOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_HashPolicy_ConnectionProperties_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_HashPolicy_ConnectionProperties_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties.class, io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties.Builder.class);
}
// Construct using io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties.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();
sourceIp_ = false;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_HashPolicy_ConnectionProperties_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties getDefaultInstanceForType() {
return io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties build() {
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties buildPartial() {
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties result = new io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties(this);
result.sourceIp_ = sourceIp_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties) {
return mergeFrom((io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties other) {
if (other == io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties.getDefaultInstance()) return this;
if (other.getSourceIp() != false) {
setSourceIp(other.getSourceIp());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private boolean sourceIp_ ;
/**
*
* Hash on source IP address.
*
*
* bool source_ip = 1;
*/
public boolean getSourceIp() {
return sourceIp_;
}
/**
*
* Hash on source IP address.
*
*
* bool source_ip = 1;
*/
public Builder setSourceIp(boolean value) {
sourceIp_ = value;
onChanged();
return this;
}
/**
*
* Hash on source IP address.
*
*
* bool source_ip = 1;
*/
public Builder clearSourceIp() {
sourceIp_ = false;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties)
}
// @@protoc_insertion_point(class_scope:envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties)
private static final io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties();
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ConnectionProperties parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ConnectionProperties(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface QueryParameterOrBuilder extends
// @@protoc_insertion_point(interface_extends:envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter)
com.google.protobuf.MessageOrBuilder {
/**
*
* The name of the URL query parameter that will be used to obtain the hash
* key. If the parameter is not present, no hash will be produced. Query
* parameter names are case-sensitive.
*
*
* string name = 1 [(.validate.rules) = { ... }
*/
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) = { ... }
*/
com.google.protobuf.ByteString
getNameBytes();
}
/**
* Protobuf type {@code envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter}
*/
public static final class QueryParameter extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter)
QueryParameterOrBuilder {
private static final long serialVersionUID = 0L;
// Use QueryParameter.newBuilder() to construct.
private QueryParameter(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private QueryParameter() {
name_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new QueryParameter();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private QueryParameter(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
name_ = s;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_HashPolicy_QueryParameter_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_HashPolicy_QueryParameter_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter.class, io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter.Builder.class);
}
public static final int NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object name_;
/**
*
* The name of the URL query parameter that will be used to obtain the hash
* key. If the parameter is not present, no hash will be produced. Query
* parameter names are case-sensitive.
*
*
* string name = 1 [(.validate.rules) = { ... }
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
}
}
/**
*
* The 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) = { ... }
*/
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 (!getNameBytes().isEmpty()) {
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 (!getNameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter)) {
return super.equals(obj);
}
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter other = (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter) obj;
if (!getName()
.equals(other.getName())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter)
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameterOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_HashPolicy_QueryParameter_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_HashPolicy_QueryParameter_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter.class, io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter.Builder.class);
}
// Construct using io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
name_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_HashPolicy_QueryParameter_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter getDefaultInstanceForType() {
return io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter build() {
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter buildPartial() {
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter result = new io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter(this);
result.name_ = name_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter) {
return mergeFrom((io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter other) {
if (other == io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object name_ = "";
/**
*
* The name of the URL query parameter that will be used to obtain the hash
* key. If the parameter is not present, no hash will be produced. Query
* parameter names are case-sensitive.
*
*
* string name = 1 [(.validate.rules) = { ... }
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The 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) = { ... }
*/
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) = { ... }
*/
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) = { ... }
*/
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) = { ... }
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter)
}
// @@protoc_insertion_point(class_scope:envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter)
private static final io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter();
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public QueryParameter parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new QueryParameter(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int policySpecifierCase_ = 0;
private java.lang.Object policySpecifier_;
public enum PolicySpecifierCase
implements com.google.protobuf.Internal.EnumLite {
HEADER(1),
COOKIE(2),
CONNECTION_PROPERTIES(3),
QUERY_PARAMETER(5),
POLICYSPECIFIER_NOT_SET(0);
private final int value;
private PolicySpecifierCase(int value) {
this.value = value;
}
/**
* @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 0: return POLICYSPECIFIER_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public PolicySpecifierCase
getPolicySpecifierCase() {
return PolicySpecifierCase.forNumber(
policySpecifierCase_);
}
public static final int HEADER_FIELD_NUMBER = 1;
/**
*
* Header hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.Header header = 1;
*/
public boolean hasHeader() {
return policySpecifierCase_ == 1;
}
/**
*
* Header hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.Header header = 1;
*/
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header getHeader() {
if (policySpecifierCase_ == 1) {
return (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header) policySpecifier_;
}
return io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header.getDefaultInstance();
}
/**
*
* Header hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.Header header = 1;
*/
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.HeaderOrBuilder getHeaderOrBuilder() {
if (policySpecifierCase_ == 1) {
return (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header) policySpecifier_;
}
return io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header.getDefaultInstance();
}
public static final int COOKIE_FIELD_NUMBER = 2;
/**
*
* Cookie hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.Cookie cookie = 2;
*/
public boolean hasCookie() {
return policySpecifierCase_ == 2;
}
/**
*
* Cookie hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.Cookie cookie = 2;
*/
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie getCookie() {
if (policySpecifierCase_ == 2) {
return (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie) policySpecifier_;
}
return io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie.getDefaultInstance();
}
/**
*
* Cookie hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.Cookie cookie = 2;
*/
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.CookieOrBuilder getCookieOrBuilder() {
if (policySpecifierCase_ == 2) {
return (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie) policySpecifier_;
}
return io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie.getDefaultInstance();
}
public static final int CONNECTION_PROPERTIES_FIELD_NUMBER = 3;
/**
*
* Connection properties hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties connection_properties = 3;
*/
public boolean hasConnectionProperties() {
return policySpecifierCase_ == 3;
}
/**
*
* Connection properties hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties connection_properties = 3;
*/
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties getConnectionProperties() {
if (policySpecifierCase_ == 3) {
return (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties) policySpecifier_;
}
return io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties.getDefaultInstance();
}
/**
*
* Connection properties hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties connection_properties = 3;
*/
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionPropertiesOrBuilder getConnectionPropertiesOrBuilder() {
if (policySpecifierCase_ == 3) {
return (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties) policySpecifier_;
}
return io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties.getDefaultInstance();
}
public static final int QUERY_PARAMETER_FIELD_NUMBER = 5;
/**
*
* Query parameter hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter query_parameter = 5;
*/
public boolean hasQueryParameter() {
return policySpecifierCase_ == 5;
}
/**
*
* Query parameter hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter query_parameter = 5;
*/
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter getQueryParameter() {
if (policySpecifierCase_ == 5) {
return (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter) policySpecifier_;
}
return io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter.getDefaultInstance();
}
/**
*
* Query parameter hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter query_parameter = 5;
*/
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameterOrBuilder getQueryParameterOrBuilder() {
if (policySpecifierCase_ == 5) {
return (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter) policySpecifier_;
}
return io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter.getDefaultInstance();
}
public static final int 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;
*/
public boolean getTerminal() {
return terminal_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (policySpecifierCase_ == 1) {
output.writeMessage(1, (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header) policySpecifier_);
}
if (policySpecifierCase_ == 2) {
output.writeMessage(2, (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie) policySpecifier_);
}
if (policySpecifierCase_ == 3) {
output.writeMessage(3, (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties) policySpecifier_);
}
if (terminal_ != false) {
output.writeBool(4, terminal_);
}
if (policySpecifierCase_ == 5) {
output.writeMessage(5, (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter) policySpecifier_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (policySpecifierCase_ == 1) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header) policySpecifier_);
}
if (policySpecifierCase_ == 2) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie) policySpecifier_);
}
if (policySpecifierCase_ == 3) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties) policySpecifier_);
}
if (terminal_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(4, terminal_);
}
if (policySpecifierCase_ == 5) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter) policySpecifier_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy)) {
return super.equals(obj);
}
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy other = (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy) obj;
if (getTerminal()
!= other.getTerminal()) return false;
if (!getPolicySpecifierCase().equals(other.getPolicySpecifierCase())) return false;
switch (policySpecifierCase_) {
case 1:
if (!getHeader()
.equals(other.getHeader())) return false;
break;
case 2:
if (!getCookie()
.equals(other.getCookie())) return false;
break;
case 3:
if (!getConnectionProperties()
.equals(other.getConnectionProperties())) return false;
break;
case 5:
if (!getQueryParameter()
.equals(other.getQueryParameter())) return false;
break;
case 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 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Specifies the route's hashing policy if the upstream cluster uses a hashing :ref:`load balancer
* <arch_overview_load_balancing_types>`.
* [#next-free-field: 6]
*
*
* Protobuf type {@code envoy.config.route.v3.RouteAction.HashPolicy}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.config.route.v3.RouteAction.HashPolicy)
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicyOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_HashPolicy_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_HashPolicy_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.class, io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Builder.class);
}
// Construct using io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
terminal_ = false;
policySpecifierCase_ = 0;
policySpecifier_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_HashPolicy_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy getDefaultInstanceForType() {
return io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy build() {
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy buildPartial() {
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy result = new io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy(this);
if (policySpecifierCase_ == 1) {
if (headerBuilder_ == null) {
result.policySpecifier_ = policySpecifier_;
} else {
result.policySpecifier_ = headerBuilder_.build();
}
}
if (policySpecifierCase_ == 2) {
if (cookieBuilder_ == null) {
result.policySpecifier_ = policySpecifier_;
} else {
result.policySpecifier_ = cookieBuilder_.build();
}
}
if (policySpecifierCase_ == 3) {
if (connectionPropertiesBuilder_ == null) {
result.policySpecifier_ = policySpecifier_;
} else {
result.policySpecifier_ = connectionPropertiesBuilder_.build();
}
}
if (policySpecifierCase_ == 5) {
if (queryParameterBuilder_ == null) {
result.policySpecifier_ = policySpecifier_;
} else {
result.policySpecifier_ = queryParameterBuilder_.build();
}
}
result.terminal_ = terminal_;
result.policySpecifierCase_ = policySpecifierCase_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy) {
return mergeFrom((io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy other) {
if (other == io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.getDefaultInstance()) return this;
if (other.getTerminal() != false) {
setTerminal(other.getTerminal());
}
switch (other.getPolicySpecifierCase()) {
case HEADER: {
mergeHeader(other.getHeader());
break;
}
case COOKIE: {
mergeCookie(other.getCookie());
break;
}
case CONNECTION_PROPERTIES: {
mergeConnectionProperties(other.getConnectionProperties());
break;
}
case QUERY_PARAMETER: {
mergeQueryParameter(other.getQueryParameter());
break;
}
case POLICYSPECIFIER_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int policySpecifierCase_ = 0;
private java.lang.Object policySpecifier_;
public PolicySpecifierCase
getPolicySpecifierCase() {
return PolicySpecifierCase.forNumber(
policySpecifierCase_);
}
public Builder clearPolicySpecifier() {
policySpecifierCase_ = 0;
policySpecifier_ = null;
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header, io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header.Builder, io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.HeaderOrBuilder> headerBuilder_;
/**
*
* Header hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.Header header = 1;
*/
public boolean hasHeader() {
return policySpecifierCase_ == 1;
}
/**
*
* Header hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.Header header = 1;
*/
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header getHeader() {
if (headerBuilder_ == null) {
if (policySpecifierCase_ == 1) {
return (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header) policySpecifier_;
}
return io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header.getDefaultInstance();
} else {
if (policySpecifierCase_ == 1) {
return headerBuilder_.getMessage();
}
return io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header.getDefaultInstance();
}
}
/**
*
* Header hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.Header header = 1;
*/
public Builder setHeader(io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header value) {
if (headerBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
policySpecifier_ = value;
onChanged();
} else {
headerBuilder_.setMessage(value);
}
policySpecifierCase_ = 1;
return this;
}
/**
*
* Header hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.Header header = 1;
*/
public Builder setHeader(
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header.Builder builderForValue) {
if (headerBuilder_ == null) {
policySpecifier_ = builderForValue.build();
onChanged();
} else {
headerBuilder_.setMessage(builderForValue.build());
}
policySpecifierCase_ = 1;
return this;
}
/**
*
* Header hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.Header header = 1;
*/
public Builder mergeHeader(io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header value) {
if (headerBuilder_ == null) {
if (policySpecifierCase_ == 1 &&
policySpecifier_ != io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header.getDefaultInstance()) {
policySpecifier_ = io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header.newBuilder((io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header) policySpecifier_)
.mergeFrom(value).buildPartial();
} else {
policySpecifier_ = value;
}
onChanged();
} else {
if (policySpecifierCase_ == 1) {
headerBuilder_.mergeFrom(value);
}
headerBuilder_.setMessage(value);
}
policySpecifierCase_ = 1;
return this;
}
/**
*
* Header hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.Header header = 1;
*/
public Builder clearHeader() {
if (headerBuilder_ == null) {
if (policySpecifierCase_ == 1) {
policySpecifierCase_ = 0;
policySpecifier_ = null;
onChanged();
}
} else {
if (policySpecifierCase_ == 1) {
policySpecifierCase_ = 0;
policySpecifier_ = null;
}
headerBuilder_.clear();
}
return this;
}
/**
*
* Header hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.Header header = 1;
*/
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header.Builder getHeaderBuilder() {
return getHeaderFieldBuilder().getBuilder();
}
/**
*
* Header hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.Header header = 1;
*/
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.HeaderOrBuilder getHeaderOrBuilder() {
if ((policySpecifierCase_ == 1) && (headerBuilder_ != null)) {
return headerBuilder_.getMessageOrBuilder();
} else {
if (policySpecifierCase_ == 1) {
return (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header) policySpecifier_;
}
return io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header.getDefaultInstance();
}
}
/**
*
* Header hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.Header header = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header, io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header.Builder, io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.HeaderOrBuilder>
getHeaderFieldBuilder() {
if (headerBuilder_ == null) {
if (!(policySpecifierCase_ == 1)) {
policySpecifier_ = io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header.getDefaultInstance();
}
headerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header, io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header.Builder, io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.HeaderOrBuilder>(
(io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Header) policySpecifier_,
getParentForChildren(),
isClean());
policySpecifier_ = null;
}
policySpecifierCase_ = 1;
onChanged();;
return headerBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie, io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie.Builder, io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.CookieOrBuilder> cookieBuilder_;
/**
*
* Cookie hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.Cookie cookie = 2;
*/
public boolean hasCookie() {
return policySpecifierCase_ == 2;
}
/**
*
* Cookie hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.Cookie cookie = 2;
*/
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie getCookie() {
if (cookieBuilder_ == null) {
if (policySpecifierCase_ == 2) {
return (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie) policySpecifier_;
}
return io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie.getDefaultInstance();
} else {
if (policySpecifierCase_ == 2) {
return cookieBuilder_.getMessage();
}
return io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie.getDefaultInstance();
}
}
/**
*
* Cookie hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.Cookie cookie = 2;
*/
public Builder setCookie(io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie value) {
if (cookieBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
policySpecifier_ = value;
onChanged();
} else {
cookieBuilder_.setMessage(value);
}
policySpecifierCase_ = 2;
return this;
}
/**
*
* Cookie hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.Cookie cookie = 2;
*/
public Builder setCookie(
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie.Builder builderForValue) {
if (cookieBuilder_ == null) {
policySpecifier_ = builderForValue.build();
onChanged();
} else {
cookieBuilder_.setMessage(builderForValue.build());
}
policySpecifierCase_ = 2;
return this;
}
/**
*
* Cookie hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.Cookie cookie = 2;
*/
public Builder mergeCookie(io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie value) {
if (cookieBuilder_ == null) {
if (policySpecifierCase_ == 2 &&
policySpecifier_ != io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie.getDefaultInstance()) {
policySpecifier_ = io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie.newBuilder((io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie) policySpecifier_)
.mergeFrom(value).buildPartial();
} else {
policySpecifier_ = value;
}
onChanged();
} else {
if (policySpecifierCase_ == 2) {
cookieBuilder_.mergeFrom(value);
}
cookieBuilder_.setMessage(value);
}
policySpecifierCase_ = 2;
return this;
}
/**
*
* Cookie hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.Cookie cookie = 2;
*/
public Builder clearCookie() {
if (cookieBuilder_ == null) {
if (policySpecifierCase_ == 2) {
policySpecifierCase_ = 0;
policySpecifier_ = null;
onChanged();
}
} else {
if (policySpecifierCase_ == 2) {
policySpecifierCase_ = 0;
policySpecifier_ = null;
}
cookieBuilder_.clear();
}
return this;
}
/**
*
* Cookie hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.Cookie cookie = 2;
*/
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie.Builder getCookieBuilder() {
return getCookieFieldBuilder().getBuilder();
}
/**
*
* Cookie hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.Cookie cookie = 2;
*/
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.CookieOrBuilder getCookieOrBuilder() {
if ((policySpecifierCase_ == 2) && (cookieBuilder_ != null)) {
return cookieBuilder_.getMessageOrBuilder();
} else {
if (policySpecifierCase_ == 2) {
return (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie) policySpecifier_;
}
return io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie.getDefaultInstance();
}
}
/**
*
* Cookie hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.Cookie cookie = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie, io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie.Builder, io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.CookieOrBuilder>
getCookieFieldBuilder() {
if (cookieBuilder_ == null) {
if (!(policySpecifierCase_ == 2)) {
policySpecifier_ = io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie.getDefaultInstance();
}
cookieBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie, io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie.Builder, io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.CookieOrBuilder>(
(io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Cookie) policySpecifier_,
getParentForChildren(),
isClean());
policySpecifier_ = null;
}
policySpecifierCase_ = 2;
onChanged();;
return cookieBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties, io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties.Builder, io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionPropertiesOrBuilder> connectionPropertiesBuilder_;
/**
*
* Connection properties hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties connection_properties = 3;
*/
public boolean hasConnectionProperties() {
return policySpecifierCase_ == 3;
}
/**
*
* Connection properties hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties connection_properties = 3;
*/
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties getConnectionProperties() {
if (connectionPropertiesBuilder_ == null) {
if (policySpecifierCase_ == 3) {
return (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties) policySpecifier_;
}
return io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties.getDefaultInstance();
} else {
if (policySpecifierCase_ == 3) {
return connectionPropertiesBuilder_.getMessage();
}
return io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties.getDefaultInstance();
}
}
/**
*
* Connection properties hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties connection_properties = 3;
*/
public Builder setConnectionProperties(io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties value) {
if (connectionPropertiesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
policySpecifier_ = value;
onChanged();
} else {
connectionPropertiesBuilder_.setMessage(value);
}
policySpecifierCase_ = 3;
return this;
}
/**
*
* Connection properties hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties connection_properties = 3;
*/
public Builder setConnectionProperties(
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties.Builder builderForValue) {
if (connectionPropertiesBuilder_ == null) {
policySpecifier_ = builderForValue.build();
onChanged();
} else {
connectionPropertiesBuilder_.setMessage(builderForValue.build());
}
policySpecifierCase_ = 3;
return this;
}
/**
*
* Connection properties hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties connection_properties = 3;
*/
public Builder mergeConnectionProperties(io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties value) {
if (connectionPropertiesBuilder_ == null) {
if (policySpecifierCase_ == 3 &&
policySpecifier_ != io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties.getDefaultInstance()) {
policySpecifier_ = io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties.newBuilder((io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties) policySpecifier_)
.mergeFrom(value).buildPartial();
} else {
policySpecifier_ = value;
}
onChanged();
} else {
if (policySpecifierCase_ == 3) {
connectionPropertiesBuilder_.mergeFrom(value);
}
connectionPropertiesBuilder_.setMessage(value);
}
policySpecifierCase_ = 3;
return this;
}
/**
*
* Connection properties hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties connection_properties = 3;
*/
public Builder clearConnectionProperties() {
if (connectionPropertiesBuilder_ == null) {
if (policySpecifierCase_ == 3) {
policySpecifierCase_ = 0;
policySpecifier_ = null;
onChanged();
}
} else {
if (policySpecifierCase_ == 3) {
policySpecifierCase_ = 0;
policySpecifier_ = null;
}
connectionPropertiesBuilder_.clear();
}
return this;
}
/**
*
* Connection properties hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties connection_properties = 3;
*/
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties.Builder getConnectionPropertiesBuilder() {
return getConnectionPropertiesFieldBuilder().getBuilder();
}
/**
*
* Connection properties hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties connection_properties = 3;
*/
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionPropertiesOrBuilder getConnectionPropertiesOrBuilder() {
if ((policySpecifierCase_ == 3) && (connectionPropertiesBuilder_ != null)) {
return connectionPropertiesBuilder_.getMessageOrBuilder();
} else {
if (policySpecifierCase_ == 3) {
return (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties) policySpecifier_;
}
return io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties.getDefaultInstance();
}
}
/**
*
* Connection properties hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties connection_properties = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties, io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties.Builder, io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionPropertiesOrBuilder>
getConnectionPropertiesFieldBuilder() {
if (connectionPropertiesBuilder_ == null) {
if (!(policySpecifierCase_ == 3)) {
policySpecifier_ = io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties.getDefaultInstance();
}
connectionPropertiesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties, io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties.Builder, io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionPropertiesOrBuilder>(
(io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties) policySpecifier_,
getParentForChildren(),
isClean());
policySpecifier_ = null;
}
policySpecifierCase_ = 3;
onChanged();;
return connectionPropertiesBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter, io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter.Builder, io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameterOrBuilder> queryParameterBuilder_;
/**
*
* Query parameter hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter query_parameter = 5;
*/
public boolean hasQueryParameter() {
return policySpecifierCase_ == 5;
}
/**
*
* Query parameter hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter query_parameter = 5;
*/
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter getQueryParameter() {
if (queryParameterBuilder_ == null) {
if (policySpecifierCase_ == 5) {
return (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter) policySpecifier_;
}
return io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter.getDefaultInstance();
} else {
if (policySpecifierCase_ == 5) {
return queryParameterBuilder_.getMessage();
}
return io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter.getDefaultInstance();
}
}
/**
*
* Query parameter hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter query_parameter = 5;
*/
public Builder setQueryParameter(io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter value) {
if (queryParameterBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
policySpecifier_ = value;
onChanged();
} else {
queryParameterBuilder_.setMessage(value);
}
policySpecifierCase_ = 5;
return this;
}
/**
*
* Query parameter hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter query_parameter = 5;
*/
public Builder setQueryParameter(
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter.Builder builderForValue) {
if (queryParameterBuilder_ == null) {
policySpecifier_ = builderForValue.build();
onChanged();
} else {
queryParameterBuilder_.setMessage(builderForValue.build());
}
policySpecifierCase_ = 5;
return this;
}
/**
*
* Query parameter hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter query_parameter = 5;
*/
public Builder mergeQueryParameter(io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter value) {
if (queryParameterBuilder_ == null) {
if (policySpecifierCase_ == 5 &&
policySpecifier_ != io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter.getDefaultInstance()) {
policySpecifier_ = io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter.newBuilder((io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter) policySpecifier_)
.mergeFrom(value).buildPartial();
} else {
policySpecifier_ = value;
}
onChanged();
} else {
if (policySpecifierCase_ == 5) {
queryParameterBuilder_.mergeFrom(value);
}
queryParameterBuilder_.setMessage(value);
}
policySpecifierCase_ = 5;
return this;
}
/**
*
* Query parameter hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter query_parameter = 5;
*/
public Builder clearQueryParameter() {
if (queryParameterBuilder_ == null) {
if (policySpecifierCase_ == 5) {
policySpecifierCase_ = 0;
policySpecifier_ = null;
onChanged();
}
} else {
if (policySpecifierCase_ == 5) {
policySpecifierCase_ = 0;
policySpecifier_ = null;
}
queryParameterBuilder_.clear();
}
return this;
}
/**
*
* Query parameter hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter query_parameter = 5;
*/
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter.Builder getQueryParameterBuilder() {
return getQueryParameterFieldBuilder().getBuilder();
}
/**
*
* Query parameter hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter query_parameter = 5;
*/
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameterOrBuilder getQueryParameterOrBuilder() {
if ((policySpecifierCase_ == 5) && (queryParameterBuilder_ != null)) {
return queryParameterBuilder_.getMessageOrBuilder();
} else {
if (policySpecifierCase_ == 5) {
return (io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter) policySpecifier_;
}
return io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter.getDefaultInstance();
}
}
/**
*
* Query parameter hash policy.
*
*
* .envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter query_parameter = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter, io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter.Builder, io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameterOrBuilder>
getQueryParameterFieldBuilder() {
if (queryParameterBuilder_ == null) {
if (!(policySpecifierCase_ == 5)) {
policySpecifier_ = io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter.getDefaultInstance();
}
queryParameterBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter, io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter.Builder, io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameterOrBuilder>(
(io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter) policySpecifier_,
getParentForChildren(),
isClean());
policySpecifier_ = null;
}
policySpecifierCase_ = 5;
onChanged();;
return queryParameterBuilder_;
}
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;
*/
public boolean getTerminal() {
return 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;
*/
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;
*/
public Builder clearTerminal() {
terminal_ = false;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:envoy.config.route.v3.RouteAction.HashPolicy)
}
// @@protoc_insertion_point(class_scope:envoy.config.route.v3.RouteAction.HashPolicy)
private static final io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy();
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public HashPolicy parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new HashPolicy(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface UpgradeConfigOrBuilder extends
// @@protoc_insertion_point(interface_extends:envoy.config.route.v3.RouteAction.UpgradeConfig)
com.google.protobuf.MessageOrBuilder {
/**
*
* The case-insensitive name of this upgrade, e.g. "websocket".
* For each upgrade type present in upgrade_configs, requests with
* Upgrade: [upgrade_type] will be proxied upstream.
*
*
* string upgrade_type = 1;
*/
java.lang.String getUpgradeType();
/**
*
* 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;
*/
com.google.protobuf.ByteString
getUpgradeTypeBytes();
/**
*
* Determines if upgrades are available on this route. Defaults to true.
*
*
* .google.protobuf.BoolValue enabled = 2;
*/
boolean hasEnabled();
/**
*
* Determines if upgrades are available on this route. Defaults to true.
*
*
* .google.protobuf.BoolValue enabled = 2;
*/
com.google.protobuf.BoolValue getEnabled();
/**
*
* Determines if upgrades are available on this route. Defaults to true.
*
*
* .google.protobuf.BoolValue enabled = 2;
*/
com.google.protobuf.BoolValueOrBuilder getEnabledOrBuilder();
}
/**
*
* 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_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.upgrade_configs>`
* but does not affect any custom filter chain specified there.
*
*
* Protobuf type {@code envoy.config.route.v3.RouteAction.UpgradeConfig}
*/
public static final class UpgradeConfig extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.config.route.v3.RouteAction.UpgradeConfig)
UpgradeConfigOrBuilder {
private static final long serialVersionUID = 0L;
// Use UpgradeConfig.newBuilder() to construct.
private UpgradeConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private UpgradeConfig() {
upgradeType_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new UpgradeConfig();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private UpgradeConfig(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
upgradeType_ = s;
break;
}
case 18: {
com.google.protobuf.BoolValue.Builder subBuilder = null;
if (enabled_ != null) {
subBuilder = enabled_.toBuilder();
}
enabled_ = input.readMessage(com.google.protobuf.BoolValue.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(enabled_);
enabled_ = subBuilder.buildPartial();
}
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_UpgradeConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_UpgradeConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.class, io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.Builder.class);
}
public 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.
*
*
* string upgrade_type = 1;
*/
public java.lang.String getUpgradeType() {
java.lang.Object ref = upgradeType_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
upgradeType_ = s;
return s;
}
}
/**
*
* 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;
*/
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;
*/
public boolean hasEnabled() {
return enabled_ != null;
}
/**
*
* Determines if upgrades are available on this route. Defaults to true.
*
*
* .google.protobuf.BoolValue enabled = 2;
*/
public com.google.protobuf.BoolValue getEnabled() {
return enabled_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : enabled_;
}
/**
*
* Determines if upgrades are available on this route. Defaults to true.
*
*
* .google.protobuf.BoolValue enabled = 2;
*/
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 (!getUpgradeTypeBytes().isEmpty()) {
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 (!getUpgradeTypeBytes().isEmpty()) {
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.config.route.v3.RouteAction.UpgradeConfig)) {
return super.equals(obj);
}
io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig other = (io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig) obj;
if (!getUpgradeType()
.equals(other.getUpgradeType())) return false;
if (hasEnabled() != other.hasEnabled()) return false;
if (hasEnabled()) {
if (!getEnabled()
.equals(other.getEnabled())) return false;
}
if (!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.config.route.v3.RouteAction.UpgradeConfig parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Allows enabling and disabling upgrades on a per-route basis.
* This overrides any enabled/disabled upgrade filter chain specified in the
* HttpConnectionManager
* :ref:`upgrade_configs
* <envoy_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.upgrade_configs>`
* but does not affect any custom filter chain specified there.
*
*
* Protobuf type {@code envoy.config.route.v3.RouteAction.UpgradeConfig}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.config.route.v3.RouteAction.UpgradeConfig)
io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfigOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_UpgradeConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_UpgradeConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.class, io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.Builder.class);
}
// Construct using io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
upgradeType_ = "";
if (enabledBuilder_ == null) {
enabled_ = null;
} else {
enabled_ = null;
enabledBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_UpgradeConfig_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig getDefaultInstanceForType() {
return io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig build() {
io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig buildPartial() {
io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig result = new io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig(this);
result.upgradeType_ = upgradeType_;
if (enabledBuilder_ == null) {
result.enabled_ = enabled_;
} else {
result.enabled_ = enabledBuilder_.build();
}
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig) {
return mergeFrom((io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig other) {
if (other == io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.getDefaultInstance()) return this;
if (!other.getUpgradeType().isEmpty()) {
upgradeType_ = other.upgradeType_;
onChanged();
}
if (other.hasEnabled()) {
mergeEnabled(other.getEnabled());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object upgradeType_ = "";
/**
*
* The case-insensitive name of this upgrade, e.g. "websocket".
* For each upgrade type present in upgrade_configs, requests with
* Upgrade: [upgrade_type] will be proxied upstream.
*
*
* string upgrade_type = 1;
*/
public java.lang.String getUpgradeType() {
java.lang.Object ref = upgradeType_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
upgradeType_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* 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;
*/
public com.google.protobuf.ByteString
getUpgradeTypeBytes() {
java.lang.Object ref = upgradeType_;
if (ref instanceof 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;
}
}
/**
*
* 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;
*/
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.
*
*
* string upgrade_type = 1;
*/
public Builder clearUpgradeType() {
upgradeType_ = getDefaultInstance().getUpgradeType();
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.
*
*
* string upgrade_type = 1;
*/
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;
*/
public boolean hasEnabled() {
return enabledBuilder_ != null || enabled_ != null;
}
/**
*
* Determines if upgrades are available on this route. Defaults to true.
*
*
* .google.protobuf.BoolValue enabled = 2;
*/
public com.google.protobuf.BoolValue getEnabled() {
if (enabledBuilder_ == null) {
return enabled_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : enabled_;
} else {
return enabledBuilder_.getMessage();
}
}
/**
*
* Determines if upgrades are available on this route. Defaults to true.
*
*
* .google.protobuf.BoolValue enabled = 2;
*/
public Builder setEnabled(com.google.protobuf.BoolValue value) {
if (enabledBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
enabled_ = value;
onChanged();
} else {
enabledBuilder_.setMessage(value);
}
return this;
}
/**
*
* Determines if upgrades are available on this route. Defaults to true.
*
*
* .google.protobuf.BoolValue enabled = 2;
*/
public Builder setEnabled(
com.google.protobuf.BoolValue.Builder builderForValue) {
if (enabledBuilder_ == null) {
enabled_ = builderForValue.build();
onChanged();
} else {
enabledBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Determines if upgrades are available on this route. Defaults to true.
*
*
* .google.protobuf.BoolValue enabled = 2;
*/
public Builder mergeEnabled(com.google.protobuf.BoolValue value) {
if (enabledBuilder_ == null) {
if (enabled_ != null) {
enabled_ =
com.google.protobuf.BoolValue.newBuilder(enabled_).mergeFrom(value).buildPartial();
} else {
enabled_ = value;
}
onChanged();
} else {
enabledBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Determines if upgrades are available on this route. Defaults to true.
*
*
* .google.protobuf.BoolValue enabled = 2;
*/
public Builder clearEnabled() {
if (enabledBuilder_ == null) {
enabled_ = null;
onChanged();
} else {
enabled_ = null;
enabledBuilder_ = null;
}
return this;
}
/**
*
* Determines if upgrades are available on this route. Defaults to true.
*
*
* .google.protobuf.BoolValue enabled = 2;
*/
public com.google.protobuf.BoolValue.Builder getEnabledBuilder() {
onChanged();
return getEnabledFieldBuilder().getBuilder();
}
/**
*
* Determines if upgrades are available on this route. Defaults to true.
*
*
* .google.protobuf.BoolValue enabled = 2;
*/
public com.google.protobuf.BoolValueOrBuilder getEnabledOrBuilder() {
if (enabledBuilder_ != null) {
return enabledBuilder_.getMessageOrBuilder();
} else {
return enabled_ == null ?
com.google.protobuf.BoolValue.getDefaultInstance() : enabled_;
}
}
/**
*
* Determines if upgrades are available on this route. Defaults to true.
*
*
* .google.protobuf.BoolValue enabled = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>
getEnabledFieldBuilder() {
if (enabledBuilder_ == null) {
enabledBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>(
getEnabled(),
getParentForChildren(),
isClean());
enabled_ = null;
}
return enabledBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:envoy.config.route.v3.RouteAction.UpgradeConfig)
}
// @@protoc_insertion_point(class_scope:envoy.config.route.v3.RouteAction.UpgradeConfig)
private static final io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig();
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public UpgradeConfig parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new UpgradeConfig(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int clusterSpecifierCase_ = 0;
private java.lang.Object clusterSpecifier_;
public enum ClusterSpecifierCase
implements com.google.protobuf.Internal.EnumLite {
CLUSTER(1),
CLUSTER_HEADER(2),
WEIGHTED_CLUSTERS(3),
CLUSTERSPECIFIER_NOT_SET(0);
private final int value;
private ClusterSpecifierCase(int value) {
this.value = value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static ClusterSpecifierCase valueOf(int value) {
return forNumber(value);
}
public static ClusterSpecifierCase forNumber(int value) {
switch (value) {
case 1: return CLUSTER;
case 2: return CLUSTER_HEADER;
case 3: return WEIGHTED_CLUSTERS;
case 0: return CLUSTERSPECIFIER_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public ClusterSpecifierCase
getClusterSpecifierCase() {
return ClusterSpecifierCase.forNumber(
clusterSpecifierCase_);
}
private int hostRewriteSpecifierCase_ = 0;
private java.lang.Object hostRewriteSpecifier_;
public enum HostRewriteSpecifierCase
implements com.google.protobuf.Internal.EnumLite {
HOST_REWRITE_LITERAL(6),
AUTO_HOST_REWRITE(7),
HOST_REWRITE_HEADER(29),
HOSTREWRITESPECIFIER_NOT_SET(0);
private final int value;
private HostRewriteSpecifierCase(int value) {
this.value = value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static HostRewriteSpecifierCase valueOf(int value) {
return forNumber(value);
}
public static HostRewriteSpecifierCase forNumber(int value) {
switch (value) {
case 6: return HOST_REWRITE_LITERAL;
case 7: return AUTO_HOST_REWRITE;
case 29: return HOST_REWRITE_HEADER;
case 0: return HOSTREWRITESPECIFIER_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public HostRewriteSpecifierCase
getHostRewriteSpecifierCase() {
return HostRewriteSpecifierCase.forNumber(
hostRewriteSpecifierCase_);
}
public static final int CLUSTER_FIELD_NUMBER = 1;
/**
*
* Indicates the upstream cluster to which the request should be routed
* to.
*
*
* string cluster = 1 [(.validate.rules) = { ... }
*/
public java.lang.String getCluster() {
java.lang.Object ref = "";
if (clusterSpecifierCase_ == 1) {
ref = clusterSpecifier_;
}
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (clusterSpecifierCase_ == 1) {
clusterSpecifier_ = s;
}
return s;
}
}
/**
*
* Indicates the upstream cluster to which the request should be routed
* to.
*
*
* string cluster = 1 [(.validate.rules) = { ... }
*/
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.
*
*
* string cluster_header = 2 [(.validate.rules) = { ... }
*/
public java.lang.String getClusterHeader() {
java.lang.Object ref = "";
if (clusterSpecifierCase_ == 2) {
ref = clusterSpecifier_;
}
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (clusterSpecifierCase_ == 2) {
clusterSpecifier_ = s;
}
return s;
}
}
/**
*
* 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.
*
*
* string cluster_header = 2 [(.validate.rules) = { ... }
*/
public com.google.protobuf.ByteString
getClusterHeaderBytes() {
java.lang.Object ref = "";
if (clusterSpecifierCase_ == 2) {
ref = clusterSpecifier_;
}
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (clusterSpecifierCase_ == 2) {
clusterSpecifier_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int WEIGHTED_CLUSTERS_FIELD_NUMBER = 3;
/**
*
* Multiple upstream clusters can be specified for a given route. The
* request is routed to one of the upstream clusters based on weights
* assigned to each cluster. See
* :ref:`traffic splitting <config_http_conn_man_route_table_traffic_splitting_split>`
* for additional documentation.
*
*
* .envoy.config.route.v3.WeightedCluster weighted_clusters = 3;
*/
public boolean hasWeightedClusters() {
return clusterSpecifierCase_ == 3;
}
/**
*
* Multiple upstream clusters can be specified for a given route. The
* request is routed to one of the upstream clusters based on weights
* assigned to each cluster. See
* :ref:`traffic splitting <config_http_conn_man_route_table_traffic_splitting_split>`
* for additional documentation.
*
*
* .envoy.config.route.v3.WeightedCluster weighted_clusters = 3;
*/
public io.envoyproxy.envoy.config.route.v3.WeightedCluster getWeightedClusters() {
if (clusterSpecifierCase_ == 3) {
return (io.envoyproxy.envoy.config.route.v3.WeightedCluster) clusterSpecifier_;
}
return io.envoyproxy.envoy.config.route.v3.WeightedCluster.getDefaultInstance();
}
/**
*
* Multiple upstream clusters can be specified for a given route. The
* request is routed to one of the upstream clusters based on weights
* assigned to each cluster. See
* :ref:`traffic splitting <config_http_conn_man_route_table_traffic_splitting_split>`
* for additional documentation.
*
*
* .envoy.config.route.v3.WeightedCluster weighted_clusters = 3;
*/
public io.envoyproxy.envoy.config.route.v3.WeightedClusterOrBuilder getWeightedClustersOrBuilder() {
if (clusterSpecifierCase_ == 3) {
return (io.envoyproxy.envoy.config.route.v3.WeightedCluster) clusterSpecifier_;
}
return io.envoyproxy.envoy.config.route.v3.WeightedCluster.getDefaultInstance();
}
public static final int CLUSTER_NOT_FOUND_RESPONSE_CODE_FIELD_NUMBER = 20;
private int clusterNotFoundResponseCode_;
/**
*
* The HTTP status code to use when configured cluster is not found.
* The default response code is 503 Service Unavailable.
*
*
* .envoy.config.route.v3.RouteAction.ClusterNotFoundResponseCode cluster_not_found_response_code = 20 [(.validate.rules) = { ... }
*/
public int getClusterNotFoundResponseCodeValue() {
return clusterNotFoundResponseCode_;
}
/**
*
* The HTTP status code to use when configured cluster is not found.
* The default response code is 503 Service Unavailable.
*
*
* .envoy.config.route.v3.RouteAction.ClusterNotFoundResponseCode cluster_not_found_response_code = 20 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.config.route.v3.RouteAction.ClusterNotFoundResponseCode getClusterNotFoundResponseCode() {
@SuppressWarnings("deprecation")
io.envoyproxy.envoy.config.route.v3.RouteAction.ClusterNotFoundResponseCode result = io.envoyproxy.envoy.config.route.v3.RouteAction.ClusterNotFoundResponseCode.valueOf(clusterNotFoundResponseCode_);
return result == null ? io.envoyproxy.envoy.config.route.v3.RouteAction.ClusterNotFoundResponseCode.UNRECOGNIZED : result;
}
public static final int METADATA_MATCH_FIELD_NUMBER = 4;
private io.envoyproxy.envoy.config.core.v3.Metadata metadataMatch_;
/**
*
* Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints
* in the upstream cluster with metadata matching what's set in this field will be considered
* for load balancing. If using :ref:`weighted_clusters
* <envoy_api_field_config.route.v3.RouteAction.weighted_clusters>`, metadata will be merged, with values
* provided there taking precedence. The filter name should be specified as *envoy.lb*.
*
*
* .envoy.config.core.v3.Metadata metadata_match = 4;
*/
public 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_config.route.v3.RouteAction.weighted_clusters>`, metadata will be merged, with values
* provided there taking precedence. The filter name should be specified as *envoy.lb*.
*
*
* .envoy.config.core.v3.Metadata metadata_match = 4;
*/
public io.envoyproxy.envoy.config.core.v3.Metadata getMetadataMatch() {
return metadataMatch_ == null ? io.envoyproxy.envoy.config.core.v3.Metadata.getDefaultInstance() : metadataMatch_;
}
/**
*
* Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints
* in the upstream cluster with metadata matching what's set in this field will be considered
* for load balancing. If using :ref:`weighted_clusters
* <envoy_api_field_config.route.v3.RouteAction.weighted_clusters>`, metadata will be merged, with values
* provided there taking precedence. The filter name should be specified as *envoy.lb*.
*
*
* .envoy.config.core.v3.Metadata metadata_match = 4;
*/
public io.envoyproxy.envoy.config.core.v3.MetadataOrBuilder getMetadataMatchOrBuilder() {
return getMetadataMatch();
}
public static final int PREFIX_REWRITE_FIELD_NUMBER = 5;
private volatile java.lang.Object prefixRewrite_;
/**
*
* Indicates that during forwarding, the matched prefix (or path) should be
* swapped with this value. This option allows application URLs to be rooted
* at a different path from those exposed at the reverse proxy layer. The router filter will
* place the original path before rewrite into the :ref:`x-envoy-original-path
* <config_http_filters_router_x-envoy-original-path>` header.
* .. attention::
* Pay careful attention to the use of trailing slashes in the
* :ref:`route's match <envoy_api_field_config.route.v3.Route.match>` prefix value.
* Stripping a prefix from a path requires multiple Routes to handle all cases. For example,
* rewriting */prefix* to */* and */prefix/etc* to */etc* cannot be done in a single
* :ref:`Route <envoy_api_msg_config.route.v3.Route>`, as shown by the below config entries:
* .. code-block:: yaml
* - match:
* prefix: "/prefix/"
* route:
* prefix_rewrite: "/"
* - match:
* prefix: "/prefix"
* route:
* prefix_rewrite: "/"
* Having above entries in the config, requests to */prefix* will be stripped to */*, while
* requests to */prefix/etc* will be stripped to */etc*.
*
*
* string prefix_rewrite = 5;
*/
public java.lang.String getPrefixRewrite() {
java.lang.Object ref = prefixRewrite_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
prefixRewrite_ = s;
return s;
}
}
/**
*
* 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.
* .. attention::
* Pay careful attention to the use of trailing slashes in the
* :ref:`route's match <envoy_api_field_config.route.v3.Route.match>` prefix value.
* Stripping a prefix from a path requires multiple Routes to handle all cases. For example,
* rewriting */prefix* to */* and */prefix/etc* to */etc* cannot be done in a single
* :ref:`Route <envoy_api_msg_config.route.v3.Route>`, as shown by the below config entries:
* .. code-block:: yaml
* - match:
* prefix: "/prefix/"
* route:
* prefix_rewrite: "/"
* - match:
* prefix: "/prefix"
* route:
* prefix_rewrite: "/"
* Having above entries in the config, requests to */prefix* will be stripped to */*, while
* requests to */prefix/etc* will be stripped to */etc*.
*
*
* string prefix_rewrite = 5;
*/
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 HOST_REWRITE_LITERAL_FIELD_NUMBER = 6;
/**
*
* Indicates that during forwarding, the host header will be swapped with
* this value.
*
*
* string host_rewrite_literal = 6;
*/
public java.lang.String getHostRewriteLiteral() {
java.lang.Object ref = "";
if (hostRewriteSpecifierCase_ == 6) {
ref = hostRewriteSpecifier_;
}
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (hostRewriteSpecifierCase_ == 6) {
hostRewriteSpecifier_ = s;
}
return s;
}
}
/**
*
* Indicates that during forwarding, the host header will be swapped with
* this value.
*
*
* string host_rewrite_literal = 6;
*/
public com.google.protobuf.ByteString
getHostRewriteLiteralBytes() {
java.lang.Object ref = "";
if (hostRewriteSpecifierCase_ == 6) {
ref = hostRewriteSpecifier_;
}
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (hostRewriteSpecifierCase_ == 6) {
hostRewriteSpecifier_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int AUTO_HOST_REWRITE_FIELD_NUMBER = 7;
/**
*
* Indicates that during forwarding, the host header will be swapped with
* the hostname of the upstream host chosen by the cluster manager. This
* option is applicable only when the destination cluster for a route is of
* type *strict_dns* or *logical_dns*. Setting this to true with other cluster
* types has no effect.
*
*
* .google.protobuf.BoolValue auto_host_rewrite = 7;
*/
public boolean hasAutoHostRewrite() {
return hostRewriteSpecifierCase_ == 7;
}
/**
*
* Indicates that during forwarding, the host header will be swapped with
* the hostname of the upstream host chosen by the cluster manager. This
* option is applicable only when the destination cluster for a route is of
* type *strict_dns* or *logical_dns*. Setting this to true with other cluster
* types has no effect.
*
*
* .google.protobuf.BoolValue auto_host_rewrite = 7;
*/
public com.google.protobuf.BoolValue getAutoHostRewrite() {
if (hostRewriteSpecifierCase_ == 7) {
return (com.google.protobuf.BoolValue) hostRewriteSpecifier_;
}
return com.google.protobuf.BoolValue.getDefaultInstance();
}
/**
*
* Indicates that during forwarding, the host header will be swapped with
* the hostname of the upstream host chosen by the cluster manager. This
* option is applicable only when the destination cluster for a route is of
* type *strict_dns* or *logical_dns*. Setting this to true with other cluster
* types has no effect.
*
*
* .google.protobuf.BoolValue auto_host_rewrite = 7;
*/
public com.google.protobuf.BoolValueOrBuilder getAutoHostRewriteOrBuilder() {
if (hostRewriteSpecifierCase_ == 7) {
return (com.google.protobuf.BoolValue) hostRewriteSpecifier_;
}
return com.google.protobuf.BoolValue.getDefaultInstance();
}
public static final int HOST_REWRITE_HEADER_FIELD_NUMBER = 29;
/**
*
* Indicates that during forwarding, the host header will be swapped with the content of given
* downstream or :ref:`custom <config_http_conn_man_headers_custom_request_headers>` header.
* If header value is empty, host header is left intact.
* .. attention::
* Pay attention to the potential security implications of using this option. Provided header
* must come from trusted source.
*
*
* string host_rewrite_header = 29;
*/
public java.lang.String getHostRewriteHeader() {
java.lang.Object ref = "";
if (hostRewriteSpecifierCase_ == 29) {
ref = hostRewriteSpecifier_;
}
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (hostRewriteSpecifierCase_ == 29) {
hostRewriteSpecifier_ = s;
}
return s;
}
}
/**
*
* 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.
*
*
* string host_rewrite_header = 29;
*/
public com.google.protobuf.ByteString
getHostRewriteHeaderBytes() {
java.lang.Object ref = "";
if (hostRewriteSpecifierCase_ == 29) {
ref = hostRewriteSpecifier_;
}
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (hostRewriteSpecifierCase_ == 29) {
hostRewriteSpecifier_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int 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;
*/
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>`.
*
*
* .google.protobuf.Duration timeout = 8;
*/
public com.google.protobuf.Duration getTimeout() {
return timeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : 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;
*/
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_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.stream_idle_timeout>`
* will still apply. A value of 0 will completely disable the route's idle timeout, even if a
* connection manager stream idle timeout is configured.
* The idle timeout is distinct to :ref:`timeout
* <envoy_api_field_config.route.v3.RouteAction.timeout>`, which provides an upper bound
* on the upstream response time; :ref:`idle_timeout
* <envoy_api_field_config.route.v3.RouteAction.idle_timeout>` instead bounds the amount
* of time the request's stream may be idle.
* After header decoding, the idle timeout will apply on downstream and
* upstream request events. Each time an encode/decode event for headers or
* data is processed for the stream, the timer will be reset. If the timeout
* fires, the stream is terminated with a 408 Request Timeout error code if no
* upstream response header has been received, otherwise a stream reset
* occurs.
*
*
* .google.protobuf.Duration idle_timeout = 24;
*/
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_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.stream_idle_timeout>`
* will still apply. A value of 0 will completely disable the route's idle timeout, even if a
* connection manager stream idle timeout is configured.
* The idle timeout is distinct to :ref:`timeout
* <envoy_api_field_config.route.v3.RouteAction.timeout>`, which provides an upper bound
* on the upstream response time; :ref:`idle_timeout
* <envoy_api_field_config.route.v3.RouteAction.idle_timeout>` instead bounds the amount
* of time the request's stream may be idle.
* After header decoding, the idle timeout will apply on downstream and
* upstream request events. Each time an encode/decode event for headers or
* data is processed for the stream, the timer will be reset. If the timeout
* fires, the stream is terminated with a 408 Request Timeout error code if no
* upstream response header has been received, otherwise a stream reset
* occurs.
*
*
* .google.protobuf.Duration idle_timeout = 24;
*/
public com.google.protobuf.Duration getIdleTimeout() {
return idleTimeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : 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_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.stream_idle_timeout>`
* will still apply. A value of 0 will completely disable the route's idle timeout, even if a
* connection manager stream idle timeout is configured.
* The idle timeout is distinct to :ref:`timeout
* <envoy_api_field_config.route.v3.RouteAction.timeout>`, which provides an upper bound
* on the upstream response time; :ref:`idle_timeout
* <envoy_api_field_config.route.v3.RouteAction.idle_timeout>` instead bounds the amount
* of time the request's stream may be idle.
* After header decoding, the idle timeout will apply on downstream and
* upstream request events. Each time an encode/decode event for headers or
* data is processed for the stream, the timer will be reset. If the timeout
* fires, the stream is terminated with a 408 Request Timeout error code if no
* upstream response header has been received, otherwise a stream reset
* occurs.
*
*
* .google.protobuf.Duration idle_timeout = 24;
*/
public com.google.protobuf.DurationOrBuilder getIdleTimeoutOrBuilder() {
return getIdleTimeout();
}
public static final int RETRY_POLICY_FIELD_NUMBER = 9;
private io.envoyproxy.envoy.config.route.v3.RetryPolicy retryPolicy_;
/**
*
* Indicates that the route has a retry policy. Note that if this is set,
* it'll take precedence over the virtual host level retry policy entirely
* (e.g.: policies are not merged, most internal one becomes the enforced policy).
*
*
* .envoy.config.route.v3.RetryPolicy retry_policy = 9;
*/
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).
*
*
* .envoy.config.route.v3.RetryPolicy retry_policy = 9;
*/
public io.envoyproxy.envoy.config.route.v3.RetryPolicy getRetryPolicy() {
return retryPolicy_ == null ? io.envoyproxy.envoy.config.route.v3.RetryPolicy.getDefaultInstance() : retryPolicy_;
}
/**
*
* Indicates that the route has a retry policy. Note that if this is set,
* it'll take precedence over the virtual host level retry policy entirely
* (e.g.: policies are not merged, most internal one becomes the enforced policy).
*
*
* .envoy.config.route.v3.RetryPolicy retry_policy = 9;
*/
public io.envoyproxy.envoy.config.route.v3.RetryPolicyOrBuilder getRetryPolicyOrBuilder() {
return getRetryPolicy();
}
public static final int REQUEST_MIRROR_POLICIES_FIELD_NUMBER = 30;
private java.util.List requestMirrorPolicies_;
/**
*
* Indicates that the route has request mirroring policies.
*
*
* repeated .envoy.config.route.v3.RouteAction.RequestMirrorPolicy request_mirror_policies = 30;
*/
public java.util.List getRequestMirrorPoliciesList() {
return requestMirrorPolicies_;
}
/**
*
* Indicates that the route has request mirroring policies.
*
*
* repeated .envoy.config.route.v3.RouteAction.RequestMirrorPolicy request_mirror_policies = 30;
*/
public java.util.List extends io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicyOrBuilder>
getRequestMirrorPoliciesOrBuilderList() {
return requestMirrorPolicies_;
}
/**
*
* Indicates that the route has request mirroring policies.
*
*
* repeated .envoy.config.route.v3.RouteAction.RequestMirrorPolicy request_mirror_policies = 30;
*/
public int getRequestMirrorPoliciesCount() {
return requestMirrorPolicies_.size();
}
/**
*
* Indicates that the route has request mirroring policies.
*
*
* repeated .envoy.config.route.v3.RouteAction.RequestMirrorPolicy request_mirror_policies = 30;
*/
public io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy getRequestMirrorPolicies(int index) {
return requestMirrorPolicies_.get(index);
}
/**
*
* Indicates that the route has request mirroring policies.
*
*
* repeated .envoy.config.route.v3.RouteAction.RequestMirrorPolicy request_mirror_policies = 30;
*/
public io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicyOrBuilder getRequestMirrorPoliciesOrBuilder(
int index) {
return requestMirrorPolicies_.get(index);
}
public static final int PRIORITY_FIELD_NUMBER = 11;
private int priority_;
/**
*
* Optionally specifies the :ref:`routing priority <arch_overview_http_routing_priority>`.
*
*
* .envoy.config.core.v3.RoutingPriority priority = 11 [(.validate.rules) = { ... }
*/
public int getPriorityValue() {
return priority_;
}
/**
*
* Optionally specifies the :ref:`routing priority <arch_overview_http_routing_priority>`.
*
*
* .envoy.config.core.v3.RoutingPriority priority = 11 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.config.core.v3.RoutingPriority getPriority() {
@SuppressWarnings("deprecation")
io.envoyproxy.envoy.config.core.v3.RoutingPriority result = io.envoyproxy.envoy.config.core.v3.RoutingPriority.valueOf(priority_);
return result == null ? io.envoyproxy.envoy.config.core.v3.RoutingPriority.UNRECOGNIZED : result;
}
public static final int RATE_LIMITS_FIELD_NUMBER = 13;
private java.util.List rateLimits_;
/**
*
* Specifies a set of rate limit configurations that could be applied to the
* route.
*
*
* repeated .envoy.config.route.v3.RateLimit rate_limits = 13;
*/
public java.util.List getRateLimitsList() {
return rateLimits_;
}
/**
*
* Specifies a set of rate limit configurations that could be applied to the
* route.
*
*
* repeated .envoy.config.route.v3.RateLimit rate_limits = 13;
*/
public java.util.List extends io.envoyproxy.envoy.config.route.v3.RateLimitOrBuilder>
getRateLimitsOrBuilderList() {
return rateLimits_;
}
/**
*
* Specifies a set of rate limit configurations that could be applied to the
* route.
*
*
* repeated .envoy.config.route.v3.RateLimit rate_limits = 13;
*/
public int getRateLimitsCount() {
return rateLimits_.size();
}
/**
*
* Specifies a set of rate limit configurations that could be applied to the
* route.
*
*
* repeated .envoy.config.route.v3.RateLimit rate_limits = 13;
*/
public io.envoyproxy.envoy.config.route.v3.RateLimit getRateLimits(int index) {
return rateLimits_.get(index);
}
/**
*
* Specifies a set of rate limit configurations that could be applied to the
* route.
*
*
* repeated .envoy.config.route.v3.RateLimit rate_limits = 13;
*/
public io.envoyproxy.envoy.config.route.v3.RateLimitOrBuilder getRateLimitsOrBuilder(
int index) {
return rateLimits_.get(index);
}
public static final int INCLUDE_VH_RATE_LIMITS_FIELD_NUMBER = 14;
private com.google.protobuf.BoolValue includeVhRateLimits_;
/**
*
* Specifies if the rate limit filter should include the virtual host rate
* limits. By default, if the route configured rate limits, the virtual host
* :ref:`rate_limits <envoy_api_field_config.route.v3.VirtualHost.rate_limits>` are not applied to the
* request.
*
*
* .google.protobuf.BoolValue include_vh_rate_limits = 14;
*/
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_config.route.v3.VirtualHost.rate_limits>` are not applied to the
* request.
*
*
* .google.protobuf.BoolValue include_vh_rate_limits = 14;
*/
public com.google.protobuf.BoolValue getIncludeVhRateLimits() {
return includeVhRateLimits_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : 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_config.route.v3.VirtualHost.rate_limits>` are not applied to the
* request.
*
*
* .google.protobuf.BoolValue include_vh_rate_limits = 14;
*/
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.
*
*
* repeated .envoy.config.route.v3.RouteAction.HashPolicy hash_policy = 15;
*/
public java.util.List getHashPolicyList() {
return 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.
*
*
* repeated .envoy.config.route.v3.RouteAction.HashPolicy hash_policy = 15;
*/
public java.util.List extends io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicyOrBuilder>
getHashPolicyOrBuilderList() {
return 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.
*
*
* repeated .envoy.config.route.v3.RouteAction.HashPolicy hash_policy = 15;
*/
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.
*
*
* repeated .envoy.config.route.v3.RouteAction.HashPolicy hash_policy = 15;
*/
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy getHashPolicy(int index) {
return hashPolicy_.get(index);
}
/**
*
* Specifies a list of hash policies to use for ring hash load balancing. Each
* hash policy is evaluated individually and the combined result is used to
* route the request. The method of combination is deterministic such that
* identical lists of hash policies will produce the same hash. Since a hash
* policy examines specific parts of a request, it can fail to produce a hash
* (i.e. if the hashed header is not present). If (and only if) all configured
* hash policies fail to generate a hash, no hash will be produced for
* the route. In this case, the behavior is the same as if no hash policies
* were specified (i.e. the ring hash load balancer will choose a random
* backend). If a hash policy has the "terminal" attribute set to true, and
* there is already a hash generated, the hash is returned immediately,
* ignoring the rest of the hash policy list.
*
*
* repeated .envoy.config.route.v3.RouteAction.HashPolicy hash_policy = 15;
*/
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicyOrBuilder getHashPolicyOrBuilder(
int index) {
return hashPolicy_.get(index);
}
public static final int CORS_FIELD_NUMBER = 17;
private io.envoyproxy.envoy.config.route.v3.CorsPolicy cors_;
/**
*
* Indicates that the route has a CORS policy.
*
*
* .envoy.config.route.v3.CorsPolicy cors = 17;
*/
public boolean hasCors() {
return cors_ != null;
}
/**
*
* Indicates that the route has a CORS policy.
*
*
* .envoy.config.route.v3.CorsPolicy cors = 17;
*/
public io.envoyproxy.envoy.config.route.v3.CorsPolicy getCors() {
return cors_ == null ? io.envoyproxy.envoy.config.route.v3.CorsPolicy.getDefaultInstance() : cors_;
}
/**
*
* Indicates that the route has a CORS policy.
*
*
* .envoy.config.route.v3.CorsPolicy cors = 17;
*/
public io.envoyproxy.envoy.config.route.v3.CorsPolicyOrBuilder getCorsOrBuilder() {
return getCors();
}
public static final int MAX_GRPC_TIMEOUT_FIELD_NUMBER = 23;
private com.google.protobuf.Duration maxGrpcTimeout_;
/**
*
* 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_config.route.v3.RouteAction.timeout>`, but limit the applied timeout
* to the maximum value specified here. If configured as 0, the maximum allowed timeout for
* gRPC requests is infinity. If not configured at all, the `grpc-timeout` header is not used
* and gRPC requests time out like any other requests using
* :ref:`timeout <envoy_api_field_config.route.v3.RouteAction.timeout>` or its default.
* This can be used to prevent unexpected upstream request timeouts due to potentially long
* time gaps between gRPC request and response in gRPC streaming mode.
*
*
* .google.protobuf.Duration max_grpc_timeout = 23;
*/
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_config.route.v3.RouteAction.timeout>`, but limit the applied timeout
* to the maximum value specified here. If configured as 0, the maximum allowed timeout for
* gRPC requests is infinity. If not configured at all, the `grpc-timeout` header is not used
* and gRPC requests time out like any other requests using
* :ref:`timeout <envoy_api_field_config.route.v3.RouteAction.timeout>` or its default.
* This can be used to prevent unexpected upstream request timeouts due to potentially long
* time gaps between gRPC request and response in gRPC streaming mode.
*
*
* .google.protobuf.Duration max_grpc_timeout = 23;
*/
public com.google.protobuf.Duration getMaxGrpcTimeout() {
return maxGrpcTimeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : 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_config.route.v3.RouteAction.timeout>`, but limit the applied timeout
* to the maximum value specified here. If configured as 0, the maximum allowed timeout for
* gRPC requests is infinity. If not configured at all, the `grpc-timeout` header is not used
* and gRPC requests time out like any other requests using
* :ref:`timeout <envoy_api_field_config.route.v3.RouteAction.timeout>` or its default.
* This can be used to prevent unexpected upstream request timeouts due to potentially long
* time gaps between gRPC request and response in gRPC streaming mode.
*
*
* .google.protobuf.Duration max_grpc_timeout = 23;
*/
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;
*/
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).
*
*
* .google.protobuf.Duration grpc_timeout_offset = 28;
*/
public com.google.protobuf.Duration getGrpcTimeoutOffset() {
return grpcTimeoutOffset_ == null ? com.google.protobuf.Duration.getDefaultInstance() : 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;
*/
public com.google.protobuf.DurationOrBuilder getGrpcTimeoutOffsetOrBuilder() {
return getGrpcTimeoutOffset();
}
public static final int UPGRADE_CONFIGS_FIELD_NUMBER = 25;
private java.util.List upgradeConfigs_;
/**
* repeated .envoy.config.route.v3.RouteAction.UpgradeConfig upgrade_configs = 25;
*/
public java.util.List getUpgradeConfigsList() {
return upgradeConfigs_;
}
/**
* repeated .envoy.config.route.v3.RouteAction.UpgradeConfig upgrade_configs = 25;
*/
public java.util.List extends io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfigOrBuilder>
getUpgradeConfigsOrBuilderList() {
return upgradeConfigs_;
}
/**
* repeated .envoy.config.route.v3.RouteAction.UpgradeConfig upgrade_configs = 25;
*/
public int getUpgradeConfigsCount() {
return upgradeConfigs_.size();
}
/**
* repeated .envoy.config.route.v3.RouteAction.UpgradeConfig upgrade_configs = 25;
*/
public io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig getUpgradeConfigs(int index) {
return upgradeConfigs_.get(index);
}
/**
* repeated .envoy.config.route.v3.RouteAction.UpgradeConfig upgrade_configs = 25;
*/
public io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfigOrBuilder getUpgradeConfigsOrBuilder(
int index) {
return upgradeConfigs_.get(index);
}
public static final int INTERNAL_REDIRECT_ACTION_FIELD_NUMBER = 26;
private int internalRedirectAction_;
/**
* .envoy.config.route.v3.RouteAction.InternalRedirectAction internal_redirect_action = 26;
*/
public int getInternalRedirectActionValue() {
return internalRedirectAction_;
}
/**
* .envoy.config.route.v3.RouteAction.InternalRedirectAction internal_redirect_action = 26;
*/
public io.envoyproxy.envoy.config.route.v3.RouteAction.InternalRedirectAction getInternalRedirectAction() {
@SuppressWarnings("deprecation")
io.envoyproxy.envoy.config.route.v3.RouteAction.InternalRedirectAction result = io.envoyproxy.envoy.config.route.v3.RouteAction.InternalRedirectAction.valueOf(internalRedirectAction_);
return result == null ? io.envoyproxy.envoy.config.route.v3.RouteAction.InternalRedirectAction.UNRECOGNIZED : result;
}
public static final int MAX_INTERNAL_REDIRECTS_FIELD_NUMBER = 31;
private com.google.protobuf.UInt32Value maxInternalRedirects_;
/**
*
* An internal redirect is handled, iff the number of previous internal redirects that a
* downstream request has encountered is lower than this value, and
* :ref:`internal_redirect_action <envoy_api_field_config.route.v3.RouteAction.internal_redirect_action>`
* is set to :ref:`HANDLE_INTERNAL_REDIRECT
* <envoy_api_enum_value_config.route.v3.RouteAction.InternalRedirectAction.HANDLE_INTERNAL_REDIRECT>`
* In the case where a downstream request is bounced among multiple routes by internal redirect,
* the first route that hits this threshold, or has
* :ref:`internal_redirect_action <envoy_api_field_config.route.v3.RouteAction.internal_redirect_action>`
* set to
* :ref:`PASS_THROUGH_INTERNAL_REDIRECT
* <envoy_api_enum_value_config.route.v3.RouteAction.InternalRedirectAction.PASS_THROUGH_INTERNAL_REDIRECT>`
* will pass the redirect back to downstream.
* If not specified, at most one redirect will be followed.
*
*
* .google.protobuf.UInt32Value max_internal_redirects = 31;
*/
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_config.route.v3.RouteAction.internal_redirect_action>`
* is set to :ref:`HANDLE_INTERNAL_REDIRECT
* <envoy_api_enum_value_config.route.v3.RouteAction.InternalRedirectAction.HANDLE_INTERNAL_REDIRECT>`
* In the case where a downstream request is bounced among multiple routes by internal redirect,
* the first route that hits this threshold, or has
* :ref:`internal_redirect_action <envoy_api_field_config.route.v3.RouteAction.internal_redirect_action>`
* set to
* :ref:`PASS_THROUGH_INTERNAL_REDIRECT
* <envoy_api_enum_value_config.route.v3.RouteAction.InternalRedirectAction.PASS_THROUGH_INTERNAL_REDIRECT>`
* will pass the redirect back to downstream.
* If not specified, at most one redirect will be followed.
*
*
* .google.protobuf.UInt32Value max_internal_redirects = 31;
*/
public com.google.protobuf.UInt32Value getMaxInternalRedirects() {
return maxInternalRedirects_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : 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_config.route.v3.RouteAction.internal_redirect_action>`
* is set to :ref:`HANDLE_INTERNAL_REDIRECT
* <envoy_api_enum_value_config.route.v3.RouteAction.InternalRedirectAction.HANDLE_INTERNAL_REDIRECT>`
* In the case where a downstream request is bounced among multiple routes by internal redirect,
* the first route that hits this threshold, or has
* :ref:`internal_redirect_action <envoy_api_field_config.route.v3.RouteAction.internal_redirect_action>`
* set to
* :ref:`PASS_THROUGH_INTERNAL_REDIRECT
* <envoy_api_enum_value_config.route.v3.RouteAction.InternalRedirectAction.PASS_THROUGH_INTERNAL_REDIRECT>`
* will pass the redirect back to downstream.
* If not specified, at most one redirect will be followed.
*
*
* .google.protobuf.UInt32Value max_internal_redirects = 31;
*/
public com.google.protobuf.UInt32ValueOrBuilder getMaxInternalRedirectsOrBuilder() {
return getMaxInternalRedirects();
}
public static final int HEDGE_POLICY_FIELD_NUMBER = 27;
private io.envoyproxy.envoy.config.route.v3.HedgePolicy hedgePolicy_;
/**
*
* Indicates that the route has a hedge policy. Note that if this is set,
* it'll take precedence over the virtual host level hedge policy entirely
* (e.g.: policies are not merged, most internal one becomes the enforced policy).
*
*
* .envoy.config.route.v3.HedgePolicy hedge_policy = 27;
*/
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).
*
*
* .envoy.config.route.v3.HedgePolicy hedge_policy = 27;
*/
public io.envoyproxy.envoy.config.route.v3.HedgePolicy getHedgePolicy() {
return hedgePolicy_ == null ? io.envoyproxy.envoy.config.route.v3.HedgePolicy.getDefaultInstance() : hedgePolicy_;
}
/**
*
* Indicates that the route has a hedge policy. Note that if this is set,
* it'll take precedence over the virtual host level hedge policy entirely
* (e.g.: policies are not merged, most internal one becomes the enforced policy).
*
*
* .envoy.config.route.v3.HedgePolicy hedge_policy = 27;
*/
public io.envoyproxy.envoy.config.route.v3.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.config.route.v3.WeightedCluster) clusterSpecifier_);
}
if (metadataMatch_ != null) {
output.writeMessage(4, getMetadataMatch());
}
if (!getPrefixRewriteBytes().isEmpty()) {
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 (priority_ != io.envoyproxy.envoy.config.core.v3.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.config.route.v3.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.config.route.v3.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());
}
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.config.route.v3.WeightedCluster) clusterSpecifier_);
}
if (metadataMatch_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getMetadataMatch());
}
if (!getPrefixRewriteBytes().isEmpty()) {
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 (priority_ != io.envoyproxy.envoy.config.core.v3.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.config.route.v3.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.config.route.v3.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());
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.envoyproxy.envoy.config.route.v3.RouteAction)) {
return super.equals(obj);
}
io.envoyproxy.envoy.config.route.v3.RouteAction other = (io.envoyproxy.envoy.config.route.v3.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 (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 (!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 (!getHostRewriteLiteral()
.equals(other.getHostRewriteLiteral())) return false;
break;
case 7:
if (!getAutoHostRewrite()
.equals(other.getAutoHostRewrite())) return false;
break;
case 29:
if (!getHostRewriteHeader()
.equals(other.getHostRewriteHeader())) 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 (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 (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_LITERAL_FIELD_NUMBER;
hash = (53 * hash) + getHostRewriteLiteral().hashCode();
break;
case 7:
hash = (37 * hash) + AUTO_HOST_REWRITE_FIELD_NUMBER;
hash = (53 * hash) + getAutoHostRewrite().hashCode();
break;
case 29:
hash = (37 * hash) + HOST_REWRITE_HEADER_FIELD_NUMBER;
hash = (53 * hash) + getHostRewriteHeader().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.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.config.route.v3.RouteAction parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.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.config.route.v3.RouteAction parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.route.v3.RouteAction parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.envoyproxy.envoy.config.route.v3.RouteAction prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* [#next-free-field: 32]
*
*
* Protobuf type {@code envoy.config.route.v3.RouteAction}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.config.route.v3.RouteAction)
io.envoyproxy.envoy.config.route.v3.RouteActionOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.route.v3.RouteAction.class, io.envoyproxy.envoy.config.route.v3.RouteAction.Builder.class);
}
// Construct using io.envoyproxy.envoy.config.route.v3.RouteAction.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getRequestMirrorPoliciesFieldBuilder();
getRateLimitsFieldBuilder();
getHashPolicyFieldBuilder();
getUpgradeConfigsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
clusterNotFoundResponseCode_ = 0;
if (metadataMatchBuilder_ == null) {
metadataMatch_ = null;
} else {
metadataMatch_ = null;
metadataMatchBuilder_ = null;
}
prefixRewrite_ = "";
if (timeoutBuilder_ == null) {
timeout_ = null;
} else {
timeout_ = null;
timeoutBuilder_ = null;
}
if (idleTimeoutBuilder_ == null) {
idleTimeout_ = null;
} else {
idleTimeout_ = null;
idleTimeoutBuilder_ = null;
}
if (retryPolicyBuilder_ == null) {
retryPolicy_ = null;
} else {
retryPolicy_ = null;
retryPolicyBuilder_ = null;
}
if (requestMirrorPoliciesBuilder_ == null) {
requestMirrorPolicies_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
requestMirrorPoliciesBuilder_.clear();
}
priority_ = 0;
if (rateLimitsBuilder_ == null) {
rateLimits_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
} else {
rateLimitsBuilder_.clear();
}
if (includeVhRateLimitsBuilder_ == null) {
includeVhRateLimits_ = null;
} else {
includeVhRateLimits_ = null;
includeVhRateLimitsBuilder_ = null;
}
if (hashPolicyBuilder_ == null) {
hashPolicy_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
} else {
hashPolicyBuilder_.clear();
}
if (corsBuilder_ == null) {
cors_ = null;
} else {
cors_ = null;
corsBuilder_ = null;
}
if (maxGrpcTimeoutBuilder_ == null) {
maxGrpcTimeout_ = null;
} else {
maxGrpcTimeout_ = null;
maxGrpcTimeoutBuilder_ = null;
}
if (grpcTimeoutOffsetBuilder_ == null) {
grpcTimeoutOffset_ = null;
} else {
grpcTimeoutOffset_ = null;
grpcTimeoutOffsetBuilder_ = null;
}
if (upgradeConfigsBuilder_ == null) {
upgradeConfigs_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
} else {
upgradeConfigsBuilder_.clear();
}
internalRedirectAction_ = 0;
if (maxInternalRedirectsBuilder_ == null) {
maxInternalRedirects_ = null;
} else {
maxInternalRedirects_ = null;
maxInternalRedirectsBuilder_ = null;
}
if (hedgePolicyBuilder_ == null) {
hedgePolicy_ = null;
} else {
hedgePolicy_ = null;
hedgePolicyBuilder_ = null;
}
clusterSpecifierCase_ = 0;
clusterSpecifier_ = null;
hostRewriteSpecifierCase_ = 0;
hostRewriteSpecifier_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RouteAction_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction getDefaultInstanceForType() {
return io.envoyproxy.envoy.config.route.v3.RouteAction.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction build() {
io.envoyproxy.envoy.config.route.v3.RouteAction result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RouteAction buildPartial() {
io.envoyproxy.envoy.config.route.v3.RouteAction result = new io.envoyproxy.envoy.config.route.v3.RouteAction(this);
int from_bitField0_ = bitField0_;
if (clusterSpecifierCase_ == 1) {
result.clusterSpecifier_ = clusterSpecifier_;
}
if (clusterSpecifierCase_ == 2) {
result.clusterSpecifier_ = clusterSpecifier_;
}
if (clusterSpecifierCase_ == 3) {
if (weightedClustersBuilder_ == null) {
result.clusterSpecifier_ = clusterSpecifier_;
} else {
result.clusterSpecifier_ = weightedClustersBuilder_.build();
}
}
result.clusterNotFoundResponseCode_ = clusterNotFoundResponseCode_;
if (metadataMatchBuilder_ == null) {
result.metadataMatch_ = metadataMatch_;
} else {
result.metadataMatch_ = metadataMatchBuilder_.build();
}
result.prefixRewrite_ = prefixRewrite_;
if (hostRewriteSpecifierCase_ == 6) {
result.hostRewriteSpecifier_ = hostRewriteSpecifier_;
}
if (hostRewriteSpecifierCase_ == 7) {
if (autoHostRewriteBuilder_ == null) {
result.hostRewriteSpecifier_ = hostRewriteSpecifier_;
} else {
result.hostRewriteSpecifier_ = autoHostRewriteBuilder_.build();
}
}
if (hostRewriteSpecifierCase_ == 29) {
result.hostRewriteSpecifier_ = hostRewriteSpecifier_;
}
if (timeoutBuilder_ == null) {
result.timeout_ = timeout_;
} else {
result.timeout_ = timeoutBuilder_.build();
}
if (idleTimeoutBuilder_ == null) {
result.idleTimeout_ = idleTimeout_;
} else {
result.idleTimeout_ = idleTimeoutBuilder_.build();
}
if (retryPolicyBuilder_ == null) {
result.retryPolicy_ = retryPolicy_;
} else {
result.retryPolicy_ = retryPolicyBuilder_.build();
}
if (requestMirrorPoliciesBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
requestMirrorPolicies_ = java.util.Collections.unmodifiableList(requestMirrorPolicies_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.requestMirrorPolicies_ = requestMirrorPolicies_;
} else {
result.requestMirrorPolicies_ = requestMirrorPoliciesBuilder_.build();
}
result.priority_ = priority_;
if (rateLimitsBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
rateLimits_ = java.util.Collections.unmodifiableList(rateLimits_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.rateLimits_ = rateLimits_;
} else {
result.rateLimits_ = rateLimitsBuilder_.build();
}
if (includeVhRateLimitsBuilder_ == null) {
result.includeVhRateLimits_ = includeVhRateLimits_;
} else {
result.includeVhRateLimits_ = includeVhRateLimitsBuilder_.build();
}
if (hashPolicyBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0)) {
hashPolicy_ = java.util.Collections.unmodifiableList(hashPolicy_);
bitField0_ = (bitField0_ & ~0x00000004);
}
result.hashPolicy_ = hashPolicy_;
} else {
result.hashPolicy_ = hashPolicyBuilder_.build();
}
if (corsBuilder_ == null) {
result.cors_ = cors_;
} else {
result.cors_ = corsBuilder_.build();
}
if (maxGrpcTimeoutBuilder_ == null) {
result.maxGrpcTimeout_ = maxGrpcTimeout_;
} else {
result.maxGrpcTimeout_ = maxGrpcTimeoutBuilder_.build();
}
if (grpcTimeoutOffsetBuilder_ == null) {
result.grpcTimeoutOffset_ = grpcTimeoutOffset_;
} else {
result.grpcTimeoutOffset_ = grpcTimeoutOffsetBuilder_.build();
}
if (upgradeConfigsBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0)) {
upgradeConfigs_ = java.util.Collections.unmodifiableList(upgradeConfigs_);
bitField0_ = (bitField0_ & ~0x00000008);
}
result.upgradeConfigs_ = upgradeConfigs_;
} else {
result.upgradeConfigs_ = upgradeConfigsBuilder_.build();
}
result.internalRedirectAction_ = internalRedirectAction_;
if (maxInternalRedirectsBuilder_ == null) {
result.maxInternalRedirects_ = maxInternalRedirects_;
} else {
result.maxInternalRedirects_ = maxInternalRedirectsBuilder_.build();
}
if (hedgePolicyBuilder_ == null) {
result.hedgePolicy_ = hedgePolicy_;
} else {
result.hedgePolicy_ = hedgePolicyBuilder_.build();
}
result.clusterSpecifierCase_ = clusterSpecifierCase_;
result.hostRewriteSpecifierCase_ = hostRewriteSpecifierCase_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.envoyproxy.envoy.config.route.v3.RouteAction) {
return mergeFrom((io.envoyproxy.envoy.config.route.v3.RouteAction)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.config.route.v3.RouteAction other) {
if (other == io.envoyproxy.envoy.config.route.v3.RouteAction.getDefaultInstance()) return this;
if (other.clusterNotFoundResponseCode_ != 0) {
setClusterNotFoundResponseCodeValue(other.getClusterNotFoundResponseCodeValue());
}
if (other.hasMetadataMatch()) {
mergeMetadataMatch(other.getMetadataMatch());
}
if (!other.getPrefixRewrite().isEmpty()) {
prefixRewrite_ = other.prefixRewrite_;
onChanged();
}
if (other.hasTimeout()) {
mergeTimeout(other.getTimeout());
}
if (other.hasIdleTimeout()) {
mergeIdleTimeout(other.getIdleTimeout());
}
if (other.hasRetryPolicy()) {
mergeRetryPolicy(other.getRetryPolicy());
}
if (requestMirrorPoliciesBuilder_ == null) {
if (!other.requestMirrorPolicies_.isEmpty()) {
if (requestMirrorPolicies_.isEmpty()) {
requestMirrorPolicies_ = other.requestMirrorPolicies_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureRequestMirrorPoliciesIsMutable();
requestMirrorPolicies_.addAll(other.requestMirrorPolicies_);
}
onChanged();
}
} else {
if (!other.requestMirrorPolicies_.isEmpty()) {
if (requestMirrorPoliciesBuilder_.isEmpty()) {
requestMirrorPoliciesBuilder_.dispose();
requestMirrorPoliciesBuilder_ = null;
requestMirrorPolicies_ = other.requestMirrorPolicies_;
bitField0_ = (bitField0_ & ~0x00000001);
requestMirrorPoliciesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getRequestMirrorPoliciesFieldBuilder() : null;
} else {
requestMirrorPoliciesBuilder_.addAllMessages(other.requestMirrorPolicies_);
}
}
}
if (other.priority_ != 0) {
setPriorityValue(other.getPriorityValue());
}
if (rateLimitsBuilder_ == null) {
if (!other.rateLimits_.isEmpty()) {
if (rateLimits_.isEmpty()) {
rateLimits_ = other.rateLimits_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureRateLimitsIsMutable();
rateLimits_.addAll(other.rateLimits_);
}
onChanged();
}
} else {
if (!other.rateLimits_.isEmpty()) {
if (rateLimitsBuilder_.isEmpty()) {
rateLimitsBuilder_.dispose();
rateLimitsBuilder_ = null;
rateLimits_ = other.rateLimits_;
bitField0_ = (bitField0_ & ~0x00000002);
rateLimitsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getRateLimitsFieldBuilder() : null;
} else {
rateLimitsBuilder_.addAllMessages(other.rateLimits_);
}
}
}
if (other.hasIncludeVhRateLimits()) {
mergeIncludeVhRateLimits(other.getIncludeVhRateLimits());
}
if (hashPolicyBuilder_ == null) {
if (!other.hashPolicy_.isEmpty()) {
if (hashPolicy_.isEmpty()) {
hashPolicy_ = other.hashPolicy_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureHashPolicyIsMutable();
hashPolicy_.addAll(other.hashPolicy_);
}
onChanged();
}
} else {
if (!other.hashPolicy_.isEmpty()) {
if (hashPolicyBuilder_.isEmpty()) {
hashPolicyBuilder_.dispose();
hashPolicyBuilder_ = null;
hashPolicy_ = other.hashPolicy_;
bitField0_ = (bitField0_ & ~0x00000004);
hashPolicyBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getHashPolicyFieldBuilder() : null;
} else {
hashPolicyBuilder_.addAllMessages(other.hashPolicy_);
}
}
}
if (other.hasCors()) {
mergeCors(other.getCors());
}
if (other.hasMaxGrpcTimeout()) {
mergeMaxGrpcTimeout(other.getMaxGrpcTimeout());
}
if (other.hasGrpcTimeoutOffset()) {
mergeGrpcTimeoutOffset(other.getGrpcTimeoutOffset());
}
if (upgradeConfigsBuilder_ == null) {
if (!other.upgradeConfigs_.isEmpty()) {
if (upgradeConfigs_.isEmpty()) {
upgradeConfigs_ = other.upgradeConfigs_;
bitField0_ = (bitField0_ & ~0x00000008);
} else {
ensureUpgradeConfigsIsMutable();
upgradeConfigs_.addAll(other.upgradeConfigs_);
}
onChanged();
}
} else {
if (!other.upgradeConfigs_.isEmpty()) {
if (upgradeConfigsBuilder_.isEmpty()) {
upgradeConfigsBuilder_.dispose();
upgradeConfigsBuilder_ = null;
upgradeConfigs_ = other.upgradeConfigs_;
bitField0_ = (bitField0_ & ~0x00000008);
upgradeConfigsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getUpgradeConfigsFieldBuilder() : null;
} else {
upgradeConfigsBuilder_.addAllMessages(other.upgradeConfigs_);
}
}
}
if (other.internalRedirectAction_ != 0) {
setInternalRedirectActionValue(other.getInternalRedirectActionValue());
}
if (other.hasMaxInternalRedirects()) {
mergeMaxInternalRedirects(other.getMaxInternalRedirects());
}
if (other.hasHedgePolicy()) {
mergeHedgePolicy(other.getHedgePolicy());
}
switch (other.getClusterSpecifierCase()) {
case CLUSTER: {
clusterSpecifierCase_ = 1;
clusterSpecifier_ = other.clusterSpecifier_;
onChanged();
break;
}
case CLUSTER_HEADER: {
clusterSpecifierCase_ = 2;
clusterSpecifier_ = other.clusterSpecifier_;
onChanged();
break;
}
case WEIGHTED_CLUSTERS: {
mergeWeightedClusters(other.getWeightedClusters());
break;
}
case CLUSTERSPECIFIER_NOT_SET: {
break;
}
}
switch (other.getHostRewriteSpecifierCase()) {
case HOST_REWRITE_LITERAL: {
hostRewriteSpecifierCase_ = 6;
hostRewriteSpecifier_ = other.hostRewriteSpecifier_;
onChanged();
break;
}
case AUTO_HOST_REWRITE: {
mergeAutoHostRewrite(other.getAutoHostRewrite());
break;
}
case HOST_REWRITE_HEADER: {
hostRewriteSpecifierCase_ = 29;
hostRewriteSpecifier_ = other.hostRewriteSpecifier_;
onChanged();
break;
}
case HOSTREWRITESPECIFIER_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.envoyproxy.envoy.config.route.v3.RouteAction parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.config.route.v3.RouteAction) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int clusterSpecifierCase_ = 0;
private java.lang.Object clusterSpecifier_;
public ClusterSpecifierCase
getClusterSpecifierCase() {
return ClusterSpecifierCase.forNumber(
clusterSpecifierCase_);
}
public Builder clearClusterSpecifier() {
clusterSpecifierCase_ = 0;
clusterSpecifier_ = null;
onChanged();
return this;
}
private int hostRewriteSpecifierCase_ = 0;
private java.lang.Object hostRewriteSpecifier_;
public HostRewriteSpecifierCase
getHostRewriteSpecifierCase() {
return HostRewriteSpecifierCase.forNumber(
hostRewriteSpecifierCase_);
}
public Builder clearHostRewriteSpecifier() {
hostRewriteSpecifierCase_ = 0;
hostRewriteSpecifier_ = null;
onChanged();
return this;
}
private int bitField0_;
/**
*
* Indicates the upstream cluster to which the request should be routed
* to.
*
*
* string cluster = 1 [(.validate.rules) = { ... }
*/
public java.lang.String getCluster() {
java.lang.Object ref = "";
if (clusterSpecifierCase_ == 1) {
ref = clusterSpecifier_;
}
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (clusterSpecifierCase_ == 1) {
clusterSpecifier_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Indicates the upstream cluster to which the request should be routed
* to.
*
*
* string cluster = 1 [(.validate.rules) = { ... }
*/
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) = { ... }
*/
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) = { ... }
*/
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) = { ... }
*/
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.
*
*
* string cluster_header = 2 [(.validate.rules) = { ... }
*/
public java.lang.String getClusterHeader() {
java.lang.Object ref = "";
if (clusterSpecifierCase_ == 2) {
ref = clusterSpecifier_;
}
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (clusterSpecifierCase_ == 2) {
clusterSpecifier_ = s;
}
return s;
} else {
return (java.lang.String) 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.
*
*
* string cluster_header = 2 [(.validate.rules) = { ... }
*/
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.
*
*
* string cluster_header = 2 [(.validate.rules) = { ... }
*/
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.
*
*
* string cluster_header = 2 [(.validate.rules) = { ... }
*/
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.
*
*
* string cluster_header = 2 [(.validate.rules) = { ... }
*/
public Builder setClusterHeaderBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
clusterSpecifierCase_ = 2;
clusterSpecifier_ = value;
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.route.v3.WeightedCluster, io.envoyproxy.envoy.config.route.v3.WeightedCluster.Builder, io.envoyproxy.envoy.config.route.v3.WeightedClusterOrBuilder> weightedClustersBuilder_;
/**
*
* Multiple upstream clusters can be specified for a given route. The
* request is routed to one of the upstream clusters based on weights
* assigned to each cluster. See
* :ref:`traffic splitting <config_http_conn_man_route_table_traffic_splitting_split>`
* for additional documentation.
*
*
* .envoy.config.route.v3.WeightedCluster weighted_clusters = 3;
*/
public boolean hasWeightedClusters() {
return clusterSpecifierCase_ == 3;
}
/**
*
* Multiple upstream clusters can be specified for a given route. The
* request is routed to one of the upstream clusters based on weights
* assigned to each cluster. See
* :ref:`traffic splitting <config_http_conn_man_route_table_traffic_splitting_split>`
* for additional documentation.
*
*
* .envoy.config.route.v3.WeightedCluster weighted_clusters = 3;
*/
public io.envoyproxy.envoy.config.route.v3.WeightedCluster getWeightedClusters() {
if (weightedClustersBuilder_ == null) {
if (clusterSpecifierCase_ == 3) {
return (io.envoyproxy.envoy.config.route.v3.WeightedCluster) clusterSpecifier_;
}
return io.envoyproxy.envoy.config.route.v3.WeightedCluster.getDefaultInstance();
} else {
if (clusterSpecifierCase_ == 3) {
return weightedClustersBuilder_.getMessage();
}
return io.envoyproxy.envoy.config.route.v3.WeightedCluster.getDefaultInstance();
}
}
/**
*
* Multiple upstream clusters can be specified for a given route. The
* request is routed to one of the upstream clusters based on weights
* assigned to each cluster. See
* :ref:`traffic splitting <config_http_conn_man_route_table_traffic_splitting_split>`
* for additional documentation.
*
*
* .envoy.config.route.v3.WeightedCluster weighted_clusters = 3;
*/
public Builder setWeightedClusters(io.envoyproxy.envoy.config.route.v3.WeightedCluster value) {
if (weightedClustersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
clusterSpecifier_ = value;
onChanged();
} else {
weightedClustersBuilder_.setMessage(value);
}
clusterSpecifierCase_ = 3;
return this;
}
/**
*
* Multiple upstream clusters can be specified for a given route. The
* request is routed to one of the upstream clusters based on weights
* assigned to each cluster. See
* :ref:`traffic splitting <config_http_conn_man_route_table_traffic_splitting_split>`
* for additional documentation.
*
*
* .envoy.config.route.v3.WeightedCluster weighted_clusters = 3;
*/
public Builder setWeightedClusters(
io.envoyproxy.envoy.config.route.v3.WeightedCluster.Builder builderForValue) {
if (weightedClustersBuilder_ == null) {
clusterSpecifier_ = builderForValue.build();
onChanged();
} else {
weightedClustersBuilder_.setMessage(builderForValue.build());
}
clusterSpecifierCase_ = 3;
return this;
}
/**
*
* Multiple upstream clusters can be specified for a given route. The
* request is routed to one of the upstream clusters based on weights
* assigned to each cluster. See
* :ref:`traffic splitting <config_http_conn_man_route_table_traffic_splitting_split>`
* for additional documentation.
*
*
* .envoy.config.route.v3.WeightedCluster weighted_clusters = 3;
*/
public Builder mergeWeightedClusters(io.envoyproxy.envoy.config.route.v3.WeightedCluster value) {
if (weightedClustersBuilder_ == null) {
if (clusterSpecifierCase_ == 3 &&
clusterSpecifier_ != io.envoyproxy.envoy.config.route.v3.WeightedCluster.getDefaultInstance()) {
clusterSpecifier_ = io.envoyproxy.envoy.config.route.v3.WeightedCluster.newBuilder((io.envoyproxy.envoy.config.route.v3.WeightedCluster) clusterSpecifier_)
.mergeFrom(value).buildPartial();
} else {
clusterSpecifier_ = value;
}
onChanged();
} else {
if (clusterSpecifierCase_ == 3) {
weightedClustersBuilder_.mergeFrom(value);
}
weightedClustersBuilder_.setMessage(value);
}
clusterSpecifierCase_ = 3;
return this;
}
/**
*
* Multiple upstream clusters can be specified for a given route. The
* request is routed to one of the upstream clusters based on weights
* assigned to each cluster. See
* :ref:`traffic splitting <config_http_conn_man_route_table_traffic_splitting_split>`
* for additional documentation.
*
*
* .envoy.config.route.v3.WeightedCluster weighted_clusters = 3;
*/
public Builder clearWeightedClusters() {
if (weightedClustersBuilder_ == null) {
if (clusterSpecifierCase_ == 3) {
clusterSpecifierCase_ = 0;
clusterSpecifier_ = null;
onChanged();
}
} else {
if (clusterSpecifierCase_ == 3) {
clusterSpecifierCase_ = 0;
clusterSpecifier_ = null;
}
weightedClustersBuilder_.clear();
}
return this;
}
/**
*
* Multiple upstream clusters can be specified for a given route. The
* request is routed to one of the upstream clusters based on weights
* assigned to each cluster. See
* :ref:`traffic splitting <config_http_conn_man_route_table_traffic_splitting_split>`
* for additional documentation.
*
*
* .envoy.config.route.v3.WeightedCluster weighted_clusters = 3;
*/
public io.envoyproxy.envoy.config.route.v3.WeightedCluster.Builder getWeightedClustersBuilder() {
return getWeightedClustersFieldBuilder().getBuilder();
}
/**
*
* Multiple upstream clusters can be specified for a given route. The
* request is routed to one of the upstream clusters based on weights
* assigned to each cluster. See
* :ref:`traffic splitting <config_http_conn_man_route_table_traffic_splitting_split>`
* for additional documentation.
*
*
* .envoy.config.route.v3.WeightedCluster weighted_clusters = 3;
*/
public io.envoyproxy.envoy.config.route.v3.WeightedClusterOrBuilder getWeightedClustersOrBuilder() {
if ((clusterSpecifierCase_ == 3) && (weightedClustersBuilder_ != null)) {
return weightedClustersBuilder_.getMessageOrBuilder();
} else {
if (clusterSpecifierCase_ == 3) {
return (io.envoyproxy.envoy.config.route.v3.WeightedCluster) clusterSpecifier_;
}
return io.envoyproxy.envoy.config.route.v3.WeightedCluster.getDefaultInstance();
}
}
/**
*
* Multiple upstream clusters can be specified for a given route. The
* request is routed to one of the upstream clusters based on weights
* assigned to each cluster. See
* :ref:`traffic splitting <config_http_conn_man_route_table_traffic_splitting_split>`
* for additional documentation.
*
*
* .envoy.config.route.v3.WeightedCluster weighted_clusters = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.route.v3.WeightedCluster, io.envoyproxy.envoy.config.route.v3.WeightedCluster.Builder, io.envoyproxy.envoy.config.route.v3.WeightedClusterOrBuilder>
getWeightedClustersFieldBuilder() {
if (weightedClustersBuilder_ == null) {
if (!(clusterSpecifierCase_ == 3)) {
clusterSpecifier_ = io.envoyproxy.envoy.config.route.v3.WeightedCluster.getDefaultInstance();
}
weightedClustersBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.route.v3.WeightedCluster, io.envoyproxy.envoy.config.route.v3.WeightedCluster.Builder, io.envoyproxy.envoy.config.route.v3.WeightedClusterOrBuilder>(
(io.envoyproxy.envoy.config.route.v3.WeightedCluster) clusterSpecifier_,
getParentForChildren(),
isClean());
clusterSpecifier_ = null;
}
clusterSpecifierCase_ = 3;
onChanged();;
return weightedClustersBuilder_;
}
private int clusterNotFoundResponseCode_ = 0;
/**
*
* The HTTP status code to use when configured cluster is not found.
* The default response code is 503 Service Unavailable.
*
*
* .envoy.config.route.v3.RouteAction.ClusterNotFoundResponseCode cluster_not_found_response_code = 20 [(.validate.rules) = { ... }
*/
public int getClusterNotFoundResponseCodeValue() {
return clusterNotFoundResponseCode_;
}
/**
*
* The HTTP status code to use when configured cluster is not found.
* The default response code is 503 Service Unavailable.
*
*
* .envoy.config.route.v3.RouteAction.ClusterNotFoundResponseCode cluster_not_found_response_code = 20 [(.validate.rules) = { ... }
*/
public Builder setClusterNotFoundResponseCodeValue(int value) {
clusterNotFoundResponseCode_ = value;
onChanged();
return this;
}
/**
*
* The HTTP status code to use when configured cluster is not found.
* The default response code is 503 Service Unavailable.
*
*
* .envoy.config.route.v3.RouteAction.ClusterNotFoundResponseCode cluster_not_found_response_code = 20 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.config.route.v3.RouteAction.ClusterNotFoundResponseCode getClusterNotFoundResponseCode() {
@SuppressWarnings("deprecation")
io.envoyproxy.envoy.config.route.v3.RouteAction.ClusterNotFoundResponseCode result = io.envoyproxy.envoy.config.route.v3.RouteAction.ClusterNotFoundResponseCode.valueOf(clusterNotFoundResponseCode_);
return result == null ? io.envoyproxy.envoy.config.route.v3.RouteAction.ClusterNotFoundResponseCode.UNRECOGNIZED : result;
}
/**
*
* The HTTP status code to use when configured cluster is not found.
* The default response code is 503 Service Unavailable.
*
*
* .envoy.config.route.v3.RouteAction.ClusterNotFoundResponseCode cluster_not_found_response_code = 20 [(.validate.rules) = { ... }
*/
public Builder setClusterNotFoundResponseCode(io.envoyproxy.envoy.config.route.v3.RouteAction.ClusterNotFoundResponseCode value) {
if (value == null) {
throw new NullPointerException();
}
clusterNotFoundResponseCode_ = value.getNumber();
onChanged();
return this;
}
/**
*
* The HTTP status code to use when configured cluster is not found.
* The default response code is 503 Service Unavailable.
*
*
* .envoy.config.route.v3.RouteAction.ClusterNotFoundResponseCode cluster_not_found_response_code = 20 [(.validate.rules) = { ... }
*/
public Builder clearClusterNotFoundResponseCode() {
clusterNotFoundResponseCode_ = 0;
onChanged();
return this;
}
private io.envoyproxy.envoy.config.core.v3.Metadata metadataMatch_;
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.core.v3.Metadata, io.envoyproxy.envoy.config.core.v3.Metadata.Builder, io.envoyproxy.envoy.config.core.v3.MetadataOrBuilder> metadataMatchBuilder_;
/**
*
* Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints
* in the upstream cluster with metadata matching what's set in this field will be considered
* for load balancing. If using :ref:`weighted_clusters
* <envoy_api_field_config.route.v3.RouteAction.weighted_clusters>`, metadata will be merged, with values
* provided there taking precedence. The filter name should be specified as *envoy.lb*.
*
*
* .envoy.config.core.v3.Metadata metadata_match = 4;
*/
public 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_config.route.v3.RouteAction.weighted_clusters>`, metadata will be merged, with values
* provided there taking precedence. The filter name should be specified as *envoy.lb*.
*
*
* .envoy.config.core.v3.Metadata metadata_match = 4;
*/
public io.envoyproxy.envoy.config.core.v3.Metadata getMetadataMatch() {
if (metadataMatchBuilder_ == null) {
return metadataMatch_ == null ? io.envoyproxy.envoy.config.core.v3.Metadata.getDefaultInstance() : metadataMatch_;
} else {
return metadataMatchBuilder_.getMessage();
}
}
/**
*
* Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints
* in the upstream cluster with metadata matching what's set in this field will be considered
* for load balancing. If using :ref:`weighted_clusters
* <envoy_api_field_config.route.v3.RouteAction.weighted_clusters>`, metadata will be merged, with values
* provided there taking precedence. The filter name should be specified as *envoy.lb*.
*
*
* .envoy.config.core.v3.Metadata metadata_match = 4;
*/
public Builder setMetadataMatch(io.envoyproxy.envoy.config.core.v3.Metadata value) {
if (metadataMatchBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
metadataMatch_ = value;
onChanged();
} else {
metadataMatchBuilder_.setMessage(value);
}
return this;
}
/**
*
* Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints
* in the upstream cluster with metadata matching what's set in this field will be considered
* for load balancing. If using :ref:`weighted_clusters
* <envoy_api_field_config.route.v3.RouteAction.weighted_clusters>`, metadata will be merged, with values
* provided there taking precedence. The filter name should be specified as *envoy.lb*.
*
*
* .envoy.config.core.v3.Metadata metadata_match = 4;
*/
public Builder setMetadataMatch(
io.envoyproxy.envoy.config.core.v3.Metadata.Builder builderForValue) {
if (metadataMatchBuilder_ == null) {
metadataMatch_ = builderForValue.build();
onChanged();
} else {
metadataMatchBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints
* in the upstream cluster with metadata matching what's set in this field will be considered
* for load balancing. If using :ref:`weighted_clusters
* <envoy_api_field_config.route.v3.RouteAction.weighted_clusters>`, metadata will be merged, with values
* provided there taking precedence. The filter name should be specified as *envoy.lb*.
*
*
* .envoy.config.core.v3.Metadata metadata_match = 4;
*/
public Builder mergeMetadataMatch(io.envoyproxy.envoy.config.core.v3.Metadata value) {
if (metadataMatchBuilder_ == null) {
if (metadataMatch_ != null) {
metadataMatch_ =
io.envoyproxy.envoy.config.core.v3.Metadata.newBuilder(metadataMatch_).mergeFrom(value).buildPartial();
} else {
metadataMatch_ = value;
}
onChanged();
} else {
metadataMatchBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints
* in the upstream cluster with metadata matching what's set in this field will be considered
* for load balancing. If using :ref:`weighted_clusters
* <envoy_api_field_config.route.v3.RouteAction.weighted_clusters>`, metadata will be merged, with values
* provided there taking precedence. The filter name should be specified as *envoy.lb*.
*
*
* .envoy.config.core.v3.Metadata metadata_match = 4;
*/
public Builder clearMetadataMatch() {
if (metadataMatchBuilder_ == null) {
metadataMatch_ = null;
onChanged();
} else {
metadataMatch_ = null;
metadataMatchBuilder_ = null;
}
return this;
}
/**
*
* Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints
* in the upstream cluster with metadata matching what's set in this field will be considered
* for load balancing. If using :ref:`weighted_clusters
* <envoy_api_field_config.route.v3.RouteAction.weighted_clusters>`, metadata will be merged, with values
* provided there taking precedence. The filter name should be specified as *envoy.lb*.
*
*
* .envoy.config.core.v3.Metadata metadata_match = 4;
*/
public io.envoyproxy.envoy.config.core.v3.Metadata.Builder getMetadataMatchBuilder() {
onChanged();
return getMetadataMatchFieldBuilder().getBuilder();
}
/**
*
* Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints
* in the upstream cluster with metadata matching what's set in this field will be considered
* for load balancing. If using :ref:`weighted_clusters
* <envoy_api_field_config.route.v3.RouteAction.weighted_clusters>`, metadata will be merged, with values
* provided there taking precedence. The filter name should be specified as *envoy.lb*.
*
*
* .envoy.config.core.v3.Metadata metadata_match = 4;
*/
public io.envoyproxy.envoy.config.core.v3.MetadataOrBuilder getMetadataMatchOrBuilder() {
if (metadataMatchBuilder_ != null) {
return metadataMatchBuilder_.getMessageOrBuilder();
} else {
return metadataMatch_ == null ?
io.envoyproxy.envoy.config.core.v3.Metadata.getDefaultInstance() : metadataMatch_;
}
}
/**
*
* Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints
* in the upstream cluster with metadata matching what's set in this field will be considered
* for load balancing. If using :ref:`weighted_clusters
* <envoy_api_field_config.route.v3.RouteAction.weighted_clusters>`, metadata will be merged, with values
* provided there taking precedence. The filter name should be specified as *envoy.lb*.
*
*
* .envoy.config.core.v3.Metadata metadata_match = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.core.v3.Metadata, io.envoyproxy.envoy.config.core.v3.Metadata.Builder, io.envoyproxy.envoy.config.core.v3.MetadataOrBuilder>
getMetadataMatchFieldBuilder() {
if (metadataMatchBuilder_ == null) {
metadataMatchBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.core.v3.Metadata, io.envoyproxy.envoy.config.core.v3.Metadata.Builder, io.envoyproxy.envoy.config.core.v3.MetadataOrBuilder>(
getMetadataMatch(),
getParentForChildren(),
isClean());
metadataMatch_ = null;
}
return metadataMatchBuilder_;
}
private java.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.
* .. attention::
* Pay careful attention to the use of trailing slashes in the
* :ref:`route's match <envoy_api_field_config.route.v3.Route.match>` prefix value.
* Stripping a prefix from a path requires multiple Routes to handle all cases. For example,
* rewriting */prefix* to */* and */prefix/etc* to */etc* cannot be done in a single
* :ref:`Route <envoy_api_msg_config.route.v3.Route>`, as shown by the below config entries:
* .. code-block:: yaml
* - match:
* prefix: "/prefix/"
* route:
* prefix_rewrite: "/"
* - match:
* prefix: "/prefix"
* route:
* prefix_rewrite: "/"
* Having above entries in the config, requests to */prefix* will be stripped to */*, while
* requests to */prefix/etc* will be stripped to */etc*.
*
*
* string prefix_rewrite = 5;
*/
public java.lang.String getPrefixRewrite() {
java.lang.Object ref = prefixRewrite_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
prefixRewrite_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* 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.
* .. attention::
* Pay careful attention to the use of trailing slashes in the
* :ref:`route's match <envoy_api_field_config.route.v3.Route.match>` prefix value.
* Stripping a prefix from a path requires multiple Routes to handle all cases. For example,
* rewriting */prefix* to */* and */prefix/etc* to */etc* cannot be done in a single
* :ref:`Route <envoy_api_msg_config.route.v3.Route>`, as shown by the below config entries:
* .. code-block:: yaml
* - match:
* prefix: "/prefix/"
* route:
* prefix_rewrite: "/"
* - match:
* prefix: "/prefix"
* route:
* prefix_rewrite: "/"
* Having above entries in the config, requests to */prefix* will be stripped to */*, while
* requests to */prefix/etc* will be stripped to */etc*.
*
*
* string prefix_rewrite = 5;
*/
public com.google.protobuf.ByteString
getPrefixRewriteBytes() {
java.lang.Object ref = prefixRewrite_;
if (ref instanceof 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;
}
}
/**
*
* 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.
* .. attention::
* Pay careful attention to the use of trailing slashes in the
* :ref:`route's match <envoy_api_field_config.route.v3.Route.match>` prefix value.
* Stripping a prefix from a path requires multiple Routes to handle all cases. For example,
* rewriting */prefix* to */* and */prefix/etc* to */etc* cannot be done in a single
* :ref:`Route <envoy_api_msg_config.route.v3.Route>`, as shown by the below config entries:
* .. code-block:: yaml
* - match:
* prefix: "/prefix/"
* route:
* prefix_rewrite: "/"
* - match:
* prefix: "/prefix"
* route:
* prefix_rewrite: "/"
* Having above entries in the config, requests to */prefix* will be stripped to */*, while
* requests to */prefix/etc* will be stripped to */etc*.
*
*
* string prefix_rewrite = 5;
*/
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.
* .. attention::
* Pay careful attention to the use of trailing slashes in the
* :ref:`route's match <envoy_api_field_config.route.v3.Route.match>` prefix value.
* Stripping a prefix from a path requires multiple Routes to handle all cases. For example,
* rewriting */prefix* to */* and */prefix/etc* to */etc* cannot be done in a single
* :ref:`Route <envoy_api_msg_config.route.v3.Route>`, as shown by the below config entries:
* .. code-block:: yaml
* - match:
* prefix: "/prefix/"
* route:
* prefix_rewrite: "/"
* - match:
* prefix: "/prefix"
* route:
* prefix_rewrite: "/"
* Having above entries in the config, requests to */prefix* will be stripped to */*, while
* requests to */prefix/etc* will be stripped to */etc*.
*
*
* string prefix_rewrite = 5;
*/
public Builder clearPrefixRewrite() {
prefixRewrite_ = getDefaultInstance().getPrefixRewrite();
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.
* .. attention::
* Pay careful attention to the use of trailing slashes in the
* :ref:`route's match <envoy_api_field_config.route.v3.Route.match>` prefix value.
* Stripping a prefix from a path requires multiple Routes to handle all cases. For example,
* rewriting */prefix* to */* and */prefix/etc* to */etc* cannot be done in a single
* :ref:`Route <envoy_api_msg_config.route.v3.Route>`, as shown by the below config entries:
* .. code-block:: yaml
* - match:
* prefix: "/prefix/"
* route:
* prefix_rewrite: "/"
* - match:
* prefix: "/prefix"
* route:
* prefix_rewrite: "/"
* Having above entries in the config, requests to */prefix* will be stripped to */*, while
* requests to */prefix/etc* will be stripped to */etc*.
*
*
* string prefix_rewrite = 5;
*/
public Builder setPrefixRewriteBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
prefixRewrite_ = value;
onChanged();
return this;
}
/**
*
* Indicates that during forwarding, the host header will be swapped with
* this value.
*
*
* string host_rewrite_literal = 6;
*/
public java.lang.String getHostRewriteLiteral() {
java.lang.Object ref = "";
if (hostRewriteSpecifierCase_ == 6) {
ref = hostRewriteSpecifier_;
}
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (hostRewriteSpecifierCase_ == 6) {
hostRewriteSpecifier_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Indicates that during forwarding, the host header will be swapped with
* this value.
*
*
* string host_rewrite_literal = 6;
*/
public com.google.protobuf.ByteString
getHostRewriteLiteralBytes() {
java.lang.Object ref = "";
if (hostRewriteSpecifierCase_ == 6) {
ref = hostRewriteSpecifier_;
}
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (hostRewriteSpecifierCase_ == 6) {
hostRewriteSpecifier_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Indicates that during forwarding, the host header will be swapped with
* this value.
*
*
* string host_rewrite_literal = 6;
*/
public Builder setHostRewriteLiteral(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
hostRewriteSpecifierCase_ = 6;
hostRewriteSpecifier_ = value;
onChanged();
return this;
}
/**
*
* Indicates that during forwarding, the host header will be swapped with
* this value.
*
*
* string host_rewrite_literal = 6;
*/
public Builder clearHostRewriteLiteral() {
if (hostRewriteSpecifierCase_ == 6) {
hostRewriteSpecifierCase_ = 0;
hostRewriteSpecifier_ = null;
onChanged();
}
return this;
}
/**
*
* Indicates that during forwarding, the host header will be swapped with
* this value.
*
*
* string host_rewrite_literal = 6;
*/
public Builder setHostRewriteLiteralBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
hostRewriteSpecifierCase_ = 6;
hostRewriteSpecifier_ = value;
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> autoHostRewriteBuilder_;
/**
*
* Indicates that during forwarding, the host header will be swapped with
* the hostname of the upstream host chosen by the cluster manager. This
* option is applicable only when the destination cluster for a route is of
* type *strict_dns* or *logical_dns*. Setting this to true with other cluster
* types has no effect.
*
*
* .google.protobuf.BoolValue auto_host_rewrite = 7;
*/
public boolean hasAutoHostRewrite() {
return hostRewriteSpecifierCase_ == 7;
}
/**
*
* Indicates that during forwarding, the host header will be swapped with
* the hostname of the upstream host chosen by the cluster manager. This
* option is applicable only when the destination cluster for a route is of
* type *strict_dns* or *logical_dns*. Setting this to true with other cluster
* types has no effect.
*
*
* .google.protobuf.BoolValue auto_host_rewrite = 7;
*/
public com.google.protobuf.BoolValue getAutoHostRewrite() {
if (autoHostRewriteBuilder_ == null) {
if (hostRewriteSpecifierCase_ == 7) {
return (com.google.protobuf.BoolValue) hostRewriteSpecifier_;
}
return com.google.protobuf.BoolValue.getDefaultInstance();
} else {
if (hostRewriteSpecifierCase_ == 7) {
return autoHostRewriteBuilder_.getMessage();
}
return com.google.protobuf.BoolValue.getDefaultInstance();
}
}
/**
*
* Indicates that during forwarding, the host header will be swapped with
* the hostname of the upstream host chosen by the cluster manager. This
* option is applicable only when the destination cluster for a route is of
* type *strict_dns* or *logical_dns*. Setting this to true with other cluster
* types has no effect.
*
*
* .google.protobuf.BoolValue auto_host_rewrite = 7;
*/
public Builder setAutoHostRewrite(com.google.protobuf.BoolValue value) {
if (autoHostRewriteBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
hostRewriteSpecifier_ = value;
onChanged();
} else {
autoHostRewriteBuilder_.setMessage(value);
}
hostRewriteSpecifierCase_ = 7;
return this;
}
/**
*
* Indicates that during forwarding, the host header will be swapped with
* the hostname of the upstream host chosen by the cluster manager. This
* option is applicable only when the destination cluster for a route is of
* type *strict_dns* or *logical_dns*. Setting this to true with other cluster
* types has no effect.
*
*
* .google.protobuf.BoolValue auto_host_rewrite = 7;
*/
public Builder setAutoHostRewrite(
com.google.protobuf.BoolValue.Builder builderForValue) {
if (autoHostRewriteBuilder_ == null) {
hostRewriteSpecifier_ = builderForValue.build();
onChanged();
} else {
autoHostRewriteBuilder_.setMessage(builderForValue.build());
}
hostRewriteSpecifierCase_ = 7;
return this;
}
/**
*
* Indicates that during forwarding, the host header will be swapped with
* the hostname of the upstream host chosen by the cluster manager. This
* option is applicable only when the destination cluster for a route is of
* type *strict_dns* or *logical_dns*. Setting this to true with other cluster
* types has no effect.
*
*
* .google.protobuf.BoolValue auto_host_rewrite = 7;
*/
public Builder mergeAutoHostRewrite(com.google.protobuf.BoolValue value) {
if (autoHostRewriteBuilder_ == null) {
if (hostRewriteSpecifierCase_ == 7 &&
hostRewriteSpecifier_ != com.google.protobuf.BoolValue.getDefaultInstance()) {
hostRewriteSpecifier_ = com.google.protobuf.BoolValue.newBuilder((com.google.protobuf.BoolValue) hostRewriteSpecifier_)
.mergeFrom(value).buildPartial();
} else {
hostRewriteSpecifier_ = value;
}
onChanged();
} else {
if (hostRewriteSpecifierCase_ == 7) {
autoHostRewriteBuilder_.mergeFrom(value);
}
autoHostRewriteBuilder_.setMessage(value);
}
hostRewriteSpecifierCase_ = 7;
return this;
}
/**
*
* Indicates that during forwarding, the host header will be swapped with
* the hostname of the upstream host chosen by the cluster manager. This
* option is applicable only when the destination cluster for a route is of
* type *strict_dns* or *logical_dns*. Setting this to true with other cluster
* types has no effect.
*
*
* .google.protobuf.BoolValue auto_host_rewrite = 7;
*/
public Builder clearAutoHostRewrite() {
if (autoHostRewriteBuilder_ == null) {
if (hostRewriteSpecifierCase_ == 7) {
hostRewriteSpecifierCase_ = 0;
hostRewriteSpecifier_ = null;
onChanged();
}
} else {
if (hostRewriteSpecifierCase_ == 7) {
hostRewriteSpecifierCase_ = 0;
hostRewriteSpecifier_ = null;
}
autoHostRewriteBuilder_.clear();
}
return this;
}
/**
*
* Indicates that during forwarding, the host header will be swapped with
* the hostname of the upstream host chosen by the cluster manager. This
* option is applicable only when the destination cluster for a route is of
* type *strict_dns* or *logical_dns*. Setting this to true with other cluster
* types has no effect.
*
*
* .google.protobuf.BoolValue auto_host_rewrite = 7;
*/
public com.google.protobuf.BoolValue.Builder getAutoHostRewriteBuilder() {
return getAutoHostRewriteFieldBuilder().getBuilder();
}
/**
*
* Indicates that during forwarding, the host header will be swapped with
* the hostname of the upstream host chosen by the cluster manager. This
* option is applicable only when the destination cluster for a route is of
* type *strict_dns* or *logical_dns*. Setting this to true with other cluster
* types has no effect.
*
*
* .google.protobuf.BoolValue auto_host_rewrite = 7;
*/
public com.google.protobuf.BoolValueOrBuilder getAutoHostRewriteOrBuilder() {
if ((hostRewriteSpecifierCase_ == 7) && (autoHostRewriteBuilder_ != null)) {
return autoHostRewriteBuilder_.getMessageOrBuilder();
} else {
if (hostRewriteSpecifierCase_ == 7) {
return (com.google.protobuf.BoolValue) hostRewriteSpecifier_;
}
return com.google.protobuf.BoolValue.getDefaultInstance();
}
}
/**
*
* Indicates that during forwarding, the host header will be swapped with
* the hostname of the upstream host chosen by the cluster manager. This
* option is applicable only when the destination cluster for a route is of
* type *strict_dns* or *logical_dns*. Setting this to true with other cluster
* types has no effect.
*
*
* .google.protobuf.BoolValue auto_host_rewrite = 7;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>
getAutoHostRewriteFieldBuilder() {
if (autoHostRewriteBuilder_ == null) {
if (!(hostRewriteSpecifierCase_ == 7)) {
hostRewriteSpecifier_ = com.google.protobuf.BoolValue.getDefaultInstance();
}
autoHostRewriteBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>(
(com.google.protobuf.BoolValue) hostRewriteSpecifier_,
getParentForChildren(),
isClean());
hostRewriteSpecifier_ = null;
}
hostRewriteSpecifierCase_ = 7;
onChanged();;
return autoHostRewriteBuilder_;
}
/**
*
* 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.
*
*
* string host_rewrite_header = 29;
*/
public java.lang.String getHostRewriteHeader() {
java.lang.Object ref = "";
if (hostRewriteSpecifierCase_ == 29) {
ref = hostRewriteSpecifier_;
}
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (hostRewriteSpecifierCase_ == 29) {
hostRewriteSpecifier_ = s;
}
return s;
} else {
return (java.lang.String) 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.
*
*
* string host_rewrite_header = 29;
*/
public com.google.protobuf.ByteString
getHostRewriteHeaderBytes() {
java.lang.Object ref = "";
if (hostRewriteSpecifierCase_ == 29) {
ref = hostRewriteSpecifier_;
}
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (hostRewriteSpecifierCase_ == 29) {
hostRewriteSpecifier_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Indicates that during forwarding, the host header will be swapped with the content of given
* downstream or :ref:`custom <config_http_conn_man_headers_custom_request_headers>` header.
* If header value is empty, host header is left intact.
* .. attention::
* Pay attention to the potential security implications of using this option. Provided header
* must come from trusted source.
*
*
* string host_rewrite_header = 29;
*/
public Builder setHostRewriteHeader(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
hostRewriteSpecifierCase_ = 29;
hostRewriteSpecifier_ = value;
onChanged();
return this;
}
/**
*
* Indicates that during forwarding, the host header will be swapped with the content of given
* downstream or :ref:`custom <config_http_conn_man_headers_custom_request_headers>` header.
* If header value is empty, host header is left intact.
* .. attention::
* Pay attention to the potential security implications of using this option. Provided header
* must come from trusted source.
*
*
* string host_rewrite_header = 29;
*/
public Builder clearHostRewriteHeader() {
if (hostRewriteSpecifierCase_ == 29) {
hostRewriteSpecifierCase_ = 0;
hostRewriteSpecifier_ = null;
onChanged();
}
return this;
}
/**
*
* Indicates that during forwarding, the host header will be swapped with the content of given
* downstream or :ref:`custom <config_http_conn_man_headers_custom_request_headers>` header.
* If header value is empty, host header is left intact.
* .. attention::
* Pay attention to the potential security implications of using this option. Provided header
* must come from trusted source.
*
*
* string host_rewrite_header = 29;
*/
public Builder setHostRewriteHeaderBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
hostRewriteSpecifierCase_ = 29;
hostRewriteSpecifier_ = value;
onChanged();
return this;
}
private com.google.protobuf.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;
*/
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>`.
*
*
* .google.protobuf.Duration timeout = 8;
*/
public com.google.protobuf.Duration getTimeout() {
if (timeoutBuilder_ == null) {
return timeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : timeout_;
} else {
return timeoutBuilder_.getMessage();
}
}
/**
*
* 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>`.
*
*
* .google.protobuf.Duration timeout = 8;
*/
public Builder setTimeout(
com.google.protobuf.Duration.Builder builderForValue) {
if (timeoutBuilder_ == null) {
timeout_ = builderForValue.build();
onChanged();
} else {
timeoutBuilder_.setMessage(builderForValue.build());
}
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>`.
*
*
* .google.protobuf.Duration timeout = 8;
*/
public Builder mergeTimeout(com.google.protobuf.Duration value) {
if (timeoutBuilder_ == null) {
if (timeout_ != null) {
timeout_ =
com.google.protobuf.Duration.newBuilder(timeout_).mergeFrom(value).buildPartial();
} else {
timeout_ = value;
}
onChanged();
} else {
timeoutBuilder_.mergeFrom(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>`.
*
*
* .google.protobuf.Duration timeout = 8;
*/
public Builder clearTimeout() {
if (timeoutBuilder_ == null) {
timeout_ = null;
onChanged();
} else {
timeout_ = null;
timeoutBuilder_ = null;
}
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>`.
*
*
* .google.protobuf.Duration timeout = 8;
*/
public com.google.protobuf.Duration.Builder getTimeoutBuilder() {
onChanged();
return getTimeoutFieldBuilder().getBuilder();
}
/**
*
* 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 com.google.protobuf.DurationOrBuilder getTimeoutOrBuilder() {
if (timeoutBuilder_ != null) {
return timeoutBuilder_.getMessageOrBuilder();
} else {
return timeout_ == null ?
com.google.protobuf.Duration.getDefaultInstance() : 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;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>
getTimeoutFieldBuilder() {
if (timeoutBuilder_ == null) {
timeoutBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>(
getTimeout(),
getParentForChildren(),
isClean());
timeout_ = null;
}
return timeoutBuilder_;
}
private com.google.protobuf.Duration idleTimeout_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> idleTimeoutBuilder_;
/**
*
* 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_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.stream_idle_timeout>`
* will still apply. A value of 0 will completely disable the route's idle timeout, even if a
* connection manager stream idle timeout is configured.
* The idle timeout is distinct to :ref:`timeout
* <envoy_api_field_config.route.v3.RouteAction.timeout>`, which provides an upper bound
* on the upstream response time; :ref:`idle_timeout
* <envoy_api_field_config.route.v3.RouteAction.idle_timeout>` instead bounds the amount
* of time the request's stream may be idle.
* After header decoding, the idle timeout will apply on downstream and
* upstream request events. Each time an encode/decode event for headers or
* data is processed for the stream, the timer will be reset. If the timeout
* fires, the stream is terminated with a 408 Request Timeout error code if no
* upstream response header has been received, otherwise a stream reset
* occurs.
*
*
* .google.protobuf.Duration idle_timeout = 24;
*/
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_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.stream_idle_timeout>`
* will still apply. A value of 0 will completely disable the route's idle timeout, even if a
* connection manager stream idle timeout is configured.
* The idle timeout is distinct to :ref:`timeout
* <envoy_api_field_config.route.v3.RouteAction.timeout>`, which provides an upper bound
* on the upstream response time; :ref:`idle_timeout
* <envoy_api_field_config.route.v3.RouteAction.idle_timeout>` instead bounds the amount
* of time the request's stream may be idle.
* After header decoding, the idle timeout will apply on downstream and
* upstream request events. Each time an encode/decode event for headers or
* data is processed for the stream, the timer will be reset. If the timeout
* fires, the stream is terminated with a 408 Request Timeout error code if no
* upstream response header has been received, otherwise a stream reset
* occurs.
*
*
* .google.protobuf.Duration idle_timeout = 24;
*/
public com.google.protobuf.Duration getIdleTimeout() {
if (idleTimeoutBuilder_ == null) {
return idleTimeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : idleTimeout_;
} else {
return idleTimeoutBuilder_.getMessage();
}
}
/**
*
* 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_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.stream_idle_timeout>`
* will still apply. A value of 0 will completely disable the route's idle timeout, even if a
* connection manager stream idle timeout is configured.
* The idle timeout is distinct to :ref:`timeout
* <envoy_api_field_config.route.v3.RouteAction.timeout>`, which provides an upper bound
* on the upstream response time; :ref:`idle_timeout
* <envoy_api_field_config.route.v3.RouteAction.idle_timeout>` instead bounds the amount
* of time the request's stream may be idle.
* After header decoding, the idle timeout will apply on downstream and
* upstream request events. Each time an encode/decode event for headers or
* data is processed for the stream, the timer will be reset. If the timeout
* fires, the stream is terminated with a 408 Request Timeout error code if no
* upstream response header has been received, otherwise a stream reset
* occurs.
*
*
* .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_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.stream_idle_timeout>`
* will still apply. A value of 0 will completely disable the route's idle timeout, even if a
* connection manager stream idle timeout is configured.
* The idle timeout is distinct to :ref:`timeout
* <envoy_api_field_config.route.v3.RouteAction.timeout>`, which provides an upper bound
* on the upstream response time; :ref:`idle_timeout
* <envoy_api_field_config.route.v3.RouteAction.idle_timeout>` instead bounds the amount
* of time the request's stream may be idle.
* After header decoding, the idle timeout will apply on downstream and
* upstream request events. Each time an encode/decode event for headers or
* data is processed for the stream, the timer will be reset. If the timeout
* fires, the stream is terminated with a 408 Request Timeout error code if no
* upstream response header has been received, otherwise a stream reset
* occurs.
*
*
* .google.protobuf.Duration idle_timeout = 24;
*/
public Builder setIdleTimeout(
com.google.protobuf.Duration.Builder builderForValue) {
if (idleTimeoutBuilder_ == null) {
idleTimeout_ = builderForValue.build();
onChanged();
} else {
idleTimeoutBuilder_.setMessage(builderForValue.build());
}
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_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.stream_idle_timeout>`
* will still apply. A value of 0 will completely disable the route's idle timeout, even if a
* connection manager stream idle timeout is configured.
* The idle timeout is distinct to :ref:`timeout
* <envoy_api_field_config.route.v3.RouteAction.timeout>`, which provides an upper bound
* on the upstream response time; :ref:`idle_timeout
* <envoy_api_field_config.route.v3.RouteAction.idle_timeout>` instead bounds the amount
* of time the request's stream may be idle.
* After header decoding, the idle timeout will apply on downstream and
* upstream request events. Each time an encode/decode event for headers or
* data is processed for the stream, the timer will be reset. If the timeout
* fires, the stream is terminated with a 408 Request Timeout error code if no
* upstream response header has been received, otherwise a stream reset
* occurs.
*
*
* .google.protobuf.Duration idle_timeout = 24;
*/
public Builder mergeIdleTimeout(com.google.protobuf.Duration value) {
if (idleTimeoutBuilder_ == null) {
if (idleTimeout_ != null) {
idleTimeout_ =
com.google.protobuf.Duration.newBuilder(idleTimeout_).mergeFrom(value).buildPartial();
} else {
idleTimeout_ = value;
}
onChanged();
} else {
idleTimeoutBuilder_.mergeFrom(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_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.stream_idle_timeout>`
* will still apply. A value of 0 will completely disable the route's idle timeout, even if a
* connection manager stream idle timeout is configured.
* The idle timeout is distinct to :ref:`timeout
* <envoy_api_field_config.route.v3.RouteAction.timeout>`, which provides an upper bound
* on the upstream response time; :ref:`idle_timeout
* <envoy_api_field_config.route.v3.RouteAction.idle_timeout>` instead bounds the amount
* of time the request's stream may be idle.
* After header decoding, the idle timeout will apply on downstream and
* upstream request events. Each time an encode/decode event for headers or
* data is processed for the stream, the timer will be reset. If the timeout
* fires, the stream is terminated with a 408 Request Timeout error code if no
* upstream response header has been received, otherwise a stream reset
* occurs.
*
*
* .google.protobuf.Duration idle_timeout = 24;
*/
public Builder clearIdleTimeout() {
if (idleTimeoutBuilder_ == null) {
idleTimeout_ = null;
onChanged();
} else {
idleTimeout_ = null;
idleTimeoutBuilder_ = null;
}
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_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.stream_idle_timeout>`
* will still apply. A value of 0 will completely disable the route's idle timeout, even if a
* connection manager stream idle timeout is configured.
* The idle timeout is distinct to :ref:`timeout
* <envoy_api_field_config.route.v3.RouteAction.timeout>`, which provides an upper bound
* on the upstream response time; :ref:`idle_timeout
* <envoy_api_field_config.route.v3.RouteAction.idle_timeout>` instead bounds the amount
* of time the request's stream may be idle.
* After header decoding, the idle timeout will apply on downstream and
* upstream request events. Each time an encode/decode event for headers or
* data is processed for the stream, the timer will be reset. If the timeout
* fires, the stream is terminated with a 408 Request Timeout error code if no
* upstream response header has been received, otherwise a stream reset
* occurs.
*
*
* .google.protobuf.Duration idle_timeout = 24;
*/
public com.google.protobuf.Duration.Builder getIdleTimeoutBuilder() {
onChanged();
return getIdleTimeoutFieldBuilder().getBuilder();
}
/**
*
* 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_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.stream_idle_timeout>`
* will still apply. A value of 0 will completely disable the route's idle timeout, even if a
* connection manager stream idle timeout is configured.
* The idle timeout is distinct to :ref:`timeout
* <envoy_api_field_config.route.v3.RouteAction.timeout>`, which provides an upper bound
* on the upstream response time; :ref:`idle_timeout
* <envoy_api_field_config.route.v3.RouteAction.idle_timeout>` instead bounds the amount
* of time the request's stream may be idle.
* After header decoding, the idle timeout will apply on downstream and
* upstream request events. Each time an encode/decode event for headers or
* data is processed for the stream, the timer will be reset. If the timeout
* fires, the stream is terminated with a 408 Request Timeout error code if no
* upstream response header has been received, otherwise a stream reset
* occurs.
*
*
* .google.protobuf.Duration idle_timeout = 24;
*/
public com.google.protobuf.DurationOrBuilder getIdleTimeoutOrBuilder() {
if (idleTimeoutBuilder_ != null) {
return idleTimeoutBuilder_.getMessageOrBuilder();
} else {
return idleTimeout_ == null ?
com.google.protobuf.Duration.getDefaultInstance() : 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_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.stream_idle_timeout>`
* will still apply. A value of 0 will completely disable the route's idle timeout, even if a
* connection manager stream idle timeout is configured.
* The idle timeout is distinct to :ref:`timeout
* <envoy_api_field_config.route.v3.RouteAction.timeout>`, which provides an upper bound
* on the upstream response time; :ref:`idle_timeout
* <envoy_api_field_config.route.v3.RouteAction.idle_timeout>` instead bounds the amount
* of time the request's stream may be idle.
* After header decoding, the idle timeout will apply on downstream and
* upstream request events. Each time an encode/decode event for headers or
* data is processed for the stream, the timer will be reset. If the timeout
* fires, the stream is terminated with a 408 Request Timeout error code if no
* upstream response header has been received, otherwise a stream reset
* occurs.
*
*
* .google.protobuf.Duration idle_timeout = 24;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>
getIdleTimeoutFieldBuilder() {
if (idleTimeoutBuilder_ == null) {
idleTimeoutBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>(
getIdleTimeout(),
getParentForChildren(),
isClean());
idleTimeout_ = null;
}
return idleTimeoutBuilder_;
}
private io.envoyproxy.envoy.config.route.v3.RetryPolicy retryPolicy_;
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.route.v3.RetryPolicy, io.envoyproxy.envoy.config.route.v3.RetryPolicy.Builder, io.envoyproxy.envoy.config.route.v3.RetryPolicyOrBuilder> retryPolicyBuilder_;
/**
*
* Indicates that the route has a retry policy. Note that if this is set,
* it'll take precedence over the virtual host level retry policy entirely
* (e.g.: policies are not merged, most internal one becomes the enforced policy).
*
*
* .envoy.config.route.v3.RetryPolicy retry_policy = 9;
*/
public 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).
*
*
* .envoy.config.route.v3.RetryPolicy retry_policy = 9;
*/
public io.envoyproxy.envoy.config.route.v3.RetryPolicy getRetryPolicy() {
if (retryPolicyBuilder_ == null) {
return retryPolicy_ == null ? io.envoyproxy.envoy.config.route.v3.RetryPolicy.getDefaultInstance() : retryPolicy_;
} else {
return retryPolicyBuilder_.getMessage();
}
}
/**
*
* Indicates that the route has a retry policy. Note that if this is set,
* it'll take precedence over the virtual host level retry policy entirely
* (e.g.: policies are not merged, most internal one becomes the enforced policy).
*
*
* .envoy.config.route.v3.RetryPolicy retry_policy = 9;
*/
public Builder setRetryPolicy(io.envoyproxy.envoy.config.route.v3.RetryPolicy value) {
if (retryPolicyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
retryPolicy_ = value;
onChanged();
} else {
retryPolicyBuilder_.setMessage(value);
}
return this;
}
/**
*
* Indicates that the route has a retry policy. Note that if this is set,
* it'll take precedence over the virtual host level retry policy entirely
* (e.g.: policies are not merged, most internal one becomes the enforced policy).
*
*
* .envoy.config.route.v3.RetryPolicy retry_policy = 9;
*/
public Builder setRetryPolicy(
io.envoyproxy.envoy.config.route.v3.RetryPolicy.Builder builderForValue) {
if (retryPolicyBuilder_ == null) {
retryPolicy_ = builderForValue.build();
onChanged();
} else {
retryPolicyBuilder_.setMessage(builderForValue.build());
}
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).
*
*
* .envoy.config.route.v3.RetryPolicy retry_policy = 9;
*/
public Builder mergeRetryPolicy(io.envoyproxy.envoy.config.route.v3.RetryPolicy value) {
if (retryPolicyBuilder_ == null) {
if (retryPolicy_ != null) {
retryPolicy_ =
io.envoyproxy.envoy.config.route.v3.RetryPolicy.newBuilder(retryPolicy_).mergeFrom(value).buildPartial();
} else {
retryPolicy_ = value;
}
onChanged();
} else {
retryPolicyBuilder_.mergeFrom(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).
*
*
* .envoy.config.route.v3.RetryPolicy retry_policy = 9;
*/
public Builder clearRetryPolicy() {
if (retryPolicyBuilder_ == null) {
retryPolicy_ = null;
onChanged();
} else {
retryPolicy_ = null;
retryPolicyBuilder_ = null;
}
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).
*
*
* .envoy.config.route.v3.RetryPolicy retry_policy = 9;
*/
public io.envoyproxy.envoy.config.route.v3.RetryPolicy.Builder getRetryPolicyBuilder() {
onChanged();
return getRetryPolicyFieldBuilder().getBuilder();
}
/**
*
* Indicates that the route has a retry policy. Note that if this is set,
* it'll take precedence over the virtual host level retry policy entirely
* (e.g.: policies are not merged, most internal one becomes the enforced policy).
*
*
* .envoy.config.route.v3.RetryPolicy retry_policy = 9;
*/
public io.envoyproxy.envoy.config.route.v3.RetryPolicyOrBuilder getRetryPolicyOrBuilder() {
if (retryPolicyBuilder_ != null) {
return retryPolicyBuilder_.getMessageOrBuilder();
} else {
return retryPolicy_ == null ?
io.envoyproxy.envoy.config.route.v3.RetryPolicy.getDefaultInstance() : retryPolicy_;
}
}
/**
*
* Indicates that the route has a retry policy. Note that if this is set,
* it'll take precedence over the virtual host level retry policy entirely
* (e.g.: policies are not merged, most internal one becomes the enforced policy).
*
*
* .envoy.config.route.v3.RetryPolicy retry_policy = 9;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.route.v3.RetryPolicy, io.envoyproxy.envoy.config.route.v3.RetryPolicy.Builder, io.envoyproxy.envoy.config.route.v3.RetryPolicyOrBuilder>
getRetryPolicyFieldBuilder() {
if (retryPolicyBuilder_ == null) {
retryPolicyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.route.v3.RetryPolicy, io.envoyproxy.envoy.config.route.v3.RetryPolicy.Builder, io.envoyproxy.envoy.config.route.v3.RetryPolicyOrBuilder>(
getRetryPolicy(),
getParentForChildren(),
isClean());
retryPolicy_ = null;
}
return retryPolicyBuilder_;
}
private java.util.List requestMirrorPolicies_ =
java.util.Collections.emptyList();
private void ensureRequestMirrorPoliciesIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
requestMirrorPolicies_ = new java.util.ArrayList(requestMirrorPolicies_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy, io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy.Builder, io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicyOrBuilder> requestMirrorPoliciesBuilder_;
/**
*
* Indicates that the route has request mirroring policies.
*
*
* repeated .envoy.config.route.v3.RouteAction.RequestMirrorPolicy request_mirror_policies = 30;
*/
public java.util.List getRequestMirrorPoliciesList() {
if (requestMirrorPoliciesBuilder_ == null) {
return java.util.Collections.unmodifiableList(requestMirrorPolicies_);
} else {
return requestMirrorPoliciesBuilder_.getMessageList();
}
}
/**
*
* Indicates that the route has request mirroring policies.
*
*
* repeated .envoy.config.route.v3.RouteAction.RequestMirrorPolicy request_mirror_policies = 30;
*/
public int getRequestMirrorPoliciesCount() {
if (requestMirrorPoliciesBuilder_ == null) {
return requestMirrorPolicies_.size();
} else {
return requestMirrorPoliciesBuilder_.getCount();
}
}
/**
*
* Indicates that the route has request mirroring policies.
*
*
* repeated .envoy.config.route.v3.RouteAction.RequestMirrorPolicy request_mirror_policies = 30;
*/
public io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy getRequestMirrorPolicies(int index) {
if (requestMirrorPoliciesBuilder_ == null) {
return requestMirrorPolicies_.get(index);
} else {
return requestMirrorPoliciesBuilder_.getMessage(index);
}
}
/**
*
* Indicates that the route has request mirroring policies.
*
*
* repeated .envoy.config.route.v3.RouteAction.RequestMirrorPolicy request_mirror_policies = 30;
*/
public Builder setRequestMirrorPolicies(
int index, io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy value) {
if (requestMirrorPoliciesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRequestMirrorPoliciesIsMutable();
requestMirrorPolicies_.set(index, value);
onChanged();
} else {
requestMirrorPoliciesBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Indicates that the route has request mirroring policies.
*
*
* repeated .envoy.config.route.v3.RouteAction.RequestMirrorPolicy request_mirror_policies = 30;
*/
public Builder setRequestMirrorPolicies(
int index, io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy.Builder builderForValue) {
if (requestMirrorPoliciesBuilder_ == null) {
ensureRequestMirrorPoliciesIsMutable();
requestMirrorPolicies_.set(index, builderForValue.build());
onChanged();
} else {
requestMirrorPoliciesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Indicates that the route has request mirroring policies.
*
*
* repeated .envoy.config.route.v3.RouteAction.RequestMirrorPolicy request_mirror_policies = 30;
*/
public Builder addRequestMirrorPolicies(io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy value) {
if (requestMirrorPoliciesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRequestMirrorPoliciesIsMutable();
requestMirrorPolicies_.add(value);
onChanged();
} else {
requestMirrorPoliciesBuilder_.addMessage(value);
}
return this;
}
/**
*
* Indicates that the route has request mirroring policies.
*
*
* repeated .envoy.config.route.v3.RouteAction.RequestMirrorPolicy request_mirror_policies = 30;
*/
public Builder addRequestMirrorPolicies(
int index, io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy value) {
if (requestMirrorPoliciesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRequestMirrorPoliciesIsMutable();
requestMirrorPolicies_.add(index, value);
onChanged();
} else {
requestMirrorPoliciesBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Indicates that the route has request mirroring policies.
*
*
* repeated .envoy.config.route.v3.RouteAction.RequestMirrorPolicy request_mirror_policies = 30;
*/
public Builder addRequestMirrorPolicies(
io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy.Builder builderForValue) {
if (requestMirrorPoliciesBuilder_ == null) {
ensureRequestMirrorPoliciesIsMutable();
requestMirrorPolicies_.add(builderForValue.build());
onChanged();
} else {
requestMirrorPoliciesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Indicates that the route has request mirroring policies.
*
*
* repeated .envoy.config.route.v3.RouteAction.RequestMirrorPolicy request_mirror_policies = 30;
*/
public Builder addRequestMirrorPolicies(
int index, io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy.Builder builderForValue) {
if (requestMirrorPoliciesBuilder_ == null) {
ensureRequestMirrorPoliciesIsMutable();
requestMirrorPolicies_.add(index, builderForValue.build());
onChanged();
} else {
requestMirrorPoliciesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Indicates that the route has request mirroring policies.
*
*
* repeated .envoy.config.route.v3.RouteAction.RequestMirrorPolicy request_mirror_policies = 30;
*/
public Builder addAllRequestMirrorPolicies(
java.lang.Iterable extends io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy> values) {
if (requestMirrorPoliciesBuilder_ == null) {
ensureRequestMirrorPoliciesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, requestMirrorPolicies_);
onChanged();
} else {
requestMirrorPoliciesBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Indicates that the route has request mirroring policies.
*
*
* repeated .envoy.config.route.v3.RouteAction.RequestMirrorPolicy request_mirror_policies = 30;
*/
public Builder clearRequestMirrorPolicies() {
if (requestMirrorPoliciesBuilder_ == null) {
requestMirrorPolicies_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
requestMirrorPoliciesBuilder_.clear();
}
return this;
}
/**
*
* Indicates that the route has request mirroring policies.
*
*
* repeated .envoy.config.route.v3.RouteAction.RequestMirrorPolicy request_mirror_policies = 30;
*/
public Builder removeRequestMirrorPolicies(int index) {
if (requestMirrorPoliciesBuilder_ == null) {
ensureRequestMirrorPoliciesIsMutable();
requestMirrorPolicies_.remove(index);
onChanged();
} else {
requestMirrorPoliciesBuilder_.remove(index);
}
return this;
}
/**
*
* Indicates that the route has request mirroring policies.
*
*
* repeated .envoy.config.route.v3.RouteAction.RequestMirrorPolicy request_mirror_policies = 30;
*/
public io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy.Builder getRequestMirrorPoliciesBuilder(
int index) {
return getRequestMirrorPoliciesFieldBuilder().getBuilder(index);
}
/**
*
* Indicates that the route has request mirroring policies.
*
*
* repeated .envoy.config.route.v3.RouteAction.RequestMirrorPolicy request_mirror_policies = 30;
*/
public io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicyOrBuilder getRequestMirrorPoliciesOrBuilder(
int index) {
if (requestMirrorPoliciesBuilder_ == null) {
return requestMirrorPolicies_.get(index); } else {
return requestMirrorPoliciesBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Indicates that the route has request mirroring policies.
*
*
* repeated .envoy.config.route.v3.RouteAction.RequestMirrorPolicy request_mirror_policies = 30;
*/
public java.util.List extends io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicyOrBuilder>
getRequestMirrorPoliciesOrBuilderList() {
if (requestMirrorPoliciesBuilder_ != null) {
return requestMirrorPoliciesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(requestMirrorPolicies_);
}
}
/**
*
* Indicates that the route has request mirroring policies.
*
*
* repeated .envoy.config.route.v3.RouteAction.RequestMirrorPolicy request_mirror_policies = 30;
*/
public io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy.Builder addRequestMirrorPoliciesBuilder() {
return getRequestMirrorPoliciesFieldBuilder().addBuilder(
io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy.getDefaultInstance());
}
/**
*
* Indicates that the route has request mirroring policies.
*
*
* repeated .envoy.config.route.v3.RouteAction.RequestMirrorPolicy request_mirror_policies = 30;
*/
public io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy.Builder addRequestMirrorPoliciesBuilder(
int index) {
return getRequestMirrorPoliciesFieldBuilder().addBuilder(
index, io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy.getDefaultInstance());
}
/**
*
* Indicates that the route has request mirroring policies.
*
*
* repeated .envoy.config.route.v3.RouteAction.RequestMirrorPolicy request_mirror_policies = 30;
*/
public java.util.List
getRequestMirrorPoliciesBuilderList() {
return getRequestMirrorPoliciesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy, io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy.Builder, io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicyOrBuilder>
getRequestMirrorPoliciesFieldBuilder() {
if (requestMirrorPoliciesBuilder_ == null) {
requestMirrorPoliciesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy, io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicy.Builder, io.envoyproxy.envoy.config.route.v3.RouteAction.RequestMirrorPolicyOrBuilder>(
requestMirrorPolicies_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
requestMirrorPolicies_ = null;
}
return requestMirrorPoliciesBuilder_;
}
private int priority_ = 0;
/**
*
* Optionally specifies the :ref:`routing priority <arch_overview_http_routing_priority>`.
*
*
* .envoy.config.core.v3.RoutingPriority priority = 11 [(.validate.rules) = { ... }
*/
public int getPriorityValue() {
return priority_;
}
/**
*
* Optionally specifies the :ref:`routing priority <arch_overview_http_routing_priority>`.
*
*
* .envoy.config.core.v3.RoutingPriority priority = 11 [(.validate.rules) = { ... }
*/
public Builder setPriorityValue(int value) {
priority_ = value;
onChanged();
return this;
}
/**
*
* Optionally specifies the :ref:`routing priority <arch_overview_http_routing_priority>`.
*
*
* .envoy.config.core.v3.RoutingPriority priority = 11 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.config.core.v3.RoutingPriority getPriority() {
@SuppressWarnings("deprecation")
io.envoyproxy.envoy.config.core.v3.RoutingPriority result = io.envoyproxy.envoy.config.core.v3.RoutingPriority.valueOf(priority_);
return result == null ? io.envoyproxy.envoy.config.core.v3.RoutingPriority.UNRECOGNIZED : result;
}
/**
*
* Optionally specifies the :ref:`routing priority <arch_overview_http_routing_priority>`.
*
*
* .envoy.config.core.v3.RoutingPriority priority = 11 [(.validate.rules) = { ... }
*/
public Builder setPriority(io.envoyproxy.envoy.config.core.v3.RoutingPriority value) {
if (value == null) {
throw new NullPointerException();
}
priority_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Optionally specifies the :ref:`routing priority <arch_overview_http_routing_priority>`.
*
*
* .envoy.config.core.v3.RoutingPriority priority = 11 [(.validate.rules) = { ... }
*/
public Builder clearPriority() {
priority_ = 0;
onChanged();
return this;
}
private java.util.List rateLimits_ =
java.util.Collections.emptyList();
private void ensureRateLimitsIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
rateLimits_ = new java.util.ArrayList(rateLimits_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.config.route.v3.RateLimit, io.envoyproxy.envoy.config.route.v3.RateLimit.Builder, io.envoyproxy.envoy.config.route.v3.RateLimitOrBuilder> rateLimitsBuilder_;
/**
*
* Specifies a set of rate limit configurations that could be applied to the
* route.
*
*
* repeated .envoy.config.route.v3.RateLimit rate_limits = 13;
*/
public java.util.List getRateLimitsList() {
if (rateLimitsBuilder_ == null) {
return java.util.Collections.unmodifiableList(rateLimits_);
} else {
return rateLimitsBuilder_.getMessageList();
}
}
/**
*
* Specifies a set of rate limit configurations that could be applied to the
* route.
*
*
* repeated .envoy.config.route.v3.RateLimit rate_limits = 13;
*/
public int getRateLimitsCount() {
if (rateLimitsBuilder_ == null) {
return rateLimits_.size();
} else {
return rateLimitsBuilder_.getCount();
}
}
/**
*
* Specifies a set of rate limit configurations that could be applied to the
* route.
*
*
* repeated .envoy.config.route.v3.RateLimit rate_limits = 13;
*/
public io.envoyproxy.envoy.config.route.v3.RateLimit getRateLimits(int index) {
if (rateLimitsBuilder_ == null) {
return rateLimits_.get(index);
} else {
return rateLimitsBuilder_.getMessage(index);
}
}
/**
*
* Specifies a set of rate limit configurations that could be applied to the
* route.
*
*
* repeated .envoy.config.route.v3.RateLimit rate_limits = 13;
*/
public Builder setRateLimits(
int index, io.envoyproxy.envoy.config.route.v3.RateLimit value) {
if (rateLimitsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRateLimitsIsMutable();
rateLimits_.set(index, value);
onChanged();
} else {
rateLimitsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Specifies a set of rate limit configurations that could be applied to the
* route.
*
*
* repeated .envoy.config.route.v3.RateLimit rate_limits = 13;
*/
public Builder setRateLimits(
int index, io.envoyproxy.envoy.config.route.v3.RateLimit.Builder builderForValue) {
if (rateLimitsBuilder_ == null) {
ensureRateLimitsIsMutable();
rateLimits_.set(index, builderForValue.build());
onChanged();
} else {
rateLimitsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Specifies a set of rate limit configurations that could be applied to the
* route.
*
*
* repeated .envoy.config.route.v3.RateLimit rate_limits = 13;
*/
public Builder addRateLimits(io.envoyproxy.envoy.config.route.v3.RateLimit value) {
if (rateLimitsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRateLimitsIsMutable();
rateLimits_.add(value);
onChanged();
} else {
rateLimitsBuilder_.addMessage(value);
}
return this;
}
/**
*
* Specifies a set of rate limit configurations that could be applied to the
* route.
*
*
* repeated .envoy.config.route.v3.RateLimit rate_limits = 13;
*/
public Builder addRateLimits(
int index, io.envoyproxy.envoy.config.route.v3.RateLimit value) {
if (rateLimitsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRateLimitsIsMutable();
rateLimits_.add(index, value);
onChanged();
} else {
rateLimitsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Specifies a set of rate limit configurations that could be applied to the
* route.
*
*
* repeated .envoy.config.route.v3.RateLimit rate_limits = 13;
*/
public Builder addRateLimits(
io.envoyproxy.envoy.config.route.v3.RateLimit.Builder builderForValue) {
if (rateLimitsBuilder_ == null) {
ensureRateLimitsIsMutable();
rateLimits_.add(builderForValue.build());
onChanged();
} else {
rateLimitsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Specifies a set of rate limit configurations that could be applied to the
* route.
*
*
* repeated .envoy.config.route.v3.RateLimit rate_limits = 13;
*/
public Builder addRateLimits(
int index, io.envoyproxy.envoy.config.route.v3.RateLimit.Builder builderForValue) {
if (rateLimitsBuilder_ == null) {
ensureRateLimitsIsMutable();
rateLimits_.add(index, builderForValue.build());
onChanged();
} else {
rateLimitsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Specifies a set of rate limit configurations that could be applied to the
* route.
*
*
* repeated .envoy.config.route.v3.RateLimit rate_limits = 13;
*/
public Builder addAllRateLimits(
java.lang.Iterable extends io.envoyproxy.envoy.config.route.v3.RateLimit> values) {
if (rateLimitsBuilder_ == null) {
ensureRateLimitsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, rateLimits_);
onChanged();
} else {
rateLimitsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Specifies a set of rate limit configurations that could be applied to the
* route.
*
*
* repeated .envoy.config.route.v3.RateLimit rate_limits = 13;
*/
public Builder clearRateLimits() {
if (rateLimitsBuilder_ == null) {
rateLimits_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
rateLimitsBuilder_.clear();
}
return this;
}
/**
*
* Specifies a set of rate limit configurations that could be applied to the
* route.
*
*
* repeated .envoy.config.route.v3.RateLimit rate_limits = 13;
*/
public Builder removeRateLimits(int index) {
if (rateLimitsBuilder_ == null) {
ensureRateLimitsIsMutable();
rateLimits_.remove(index);
onChanged();
} else {
rateLimitsBuilder_.remove(index);
}
return this;
}
/**
*
* Specifies a set of rate limit configurations that could be applied to the
* route.
*
*
* repeated .envoy.config.route.v3.RateLimit rate_limits = 13;
*/
public io.envoyproxy.envoy.config.route.v3.RateLimit.Builder getRateLimitsBuilder(
int index) {
return getRateLimitsFieldBuilder().getBuilder(index);
}
/**
*
* Specifies a set of rate limit configurations that could be applied to the
* route.
*
*
* repeated .envoy.config.route.v3.RateLimit rate_limits = 13;
*/
public io.envoyproxy.envoy.config.route.v3.RateLimitOrBuilder getRateLimitsOrBuilder(
int index) {
if (rateLimitsBuilder_ == null) {
return rateLimits_.get(index); } else {
return rateLimitsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Specifies a set of rate limit configurations that could be applied to the
* route.
*
*
* repeated .envoy.config.route.v3.RateLimit rate_limits = 13;
*/
public java.util.List extends io.envoyproxy.envoy.config.route.v3.RateLimitOrBuilder>
getRateLimitsOrBuilderList() {
if (rateLimitsBuilder_ != null) {
return rateLimitsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(rateLimits_);
}
}
/**
*
* Specifies a set of rate limit configurations that could be applied to the
* route.
*
*
* repeated .envoy.config.route.v3.RateLimit rate_limits = 13;
*/
public io.envoyproxy.envoy.config.route.v3.RateLimit.Builder addRateLimitsBuilder() {
return getRateLimitsFieldBuilder().addBuilder(
io.envoyproxy.envoy.config.route.v3.RateLimit.getDefaultInstance());
}
/**
*
* Specifies a set of rate limit configurations that could be applied to the
* route.
*
*
* repeated .envoy.config.route.v3.RateLimit rate_limits = 13;
*/
public io.envoyproxy.envoy.config.route.v3.RateLimit.Builder addRateLimitsBuilder(
int index) {
return getRateLimitsFieldBuilder().addBuilder(
index, io.envoyproxy.envoy.config.route.v3.RateLimit.getDefaultInstance());
}
/**
*
* Specifies a set of rate limit configurations that could be applied to the
* route.
*
*
* repeated .envoy.config.route.v3.RateLimit rate_limits = 13;
*/
public java.util.List
getRateLimitsBuilderList() {
return getRateLimitsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.config.route.v3.RateLimit, io.envoyproxy.envoy.config.route.v3.RateLimit.Builder, io.envoyproxy.envoy.config.route.v3.RateLimitOrBuilder>
getRateLimitsFieldBuilder() {
if (rateLimitsBuilder_ == null) {
rateLimitsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.config.route.v3.RateLimit, io.envoyproxy.envoy.config.route.v3.RateLimit.Builder, io.envoyproxy.envoy.config.route.v3.RateLimitOrBuilder>(
rateLimits_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
rateLimits_ = null;
}
return rateLimitsBuilder_;
}
private com.google.protobuf.BoolValue includeVhRateLimits_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> includeVhRateLimitsBuilder_;
/**
*
* 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_config.route.v3.VirtualHost.rate_limits>` are not applied to the
* request.
*
*
* .google.protobuf.BoolValue include_vh_rate_limits = 14;
*/
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_config.route.v3.VirtualHost.rate_limits>` are not applied to the
* request.
*
*
* .google.protobuf.BoolValue include_vh_rate_limits = 14;
*/
public com.google.protobuf.BoolValue getIncludeVhRateLimits() {
if (includeVhRateLimitsBuilder_ == null) {
return includeVhRateLimits_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : includeVhRateLimits_;
} else {
return includeVhRateLimitsBuilder_.getMessage();
}
}
/**
*
* 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_config.route.v3.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_config.route.v3.VirtualHost.rate_limits>` are not applied to the
* request.
*
*
* .google.protobuf.BoolValue include_vh_rate_limits = 14;
*/
public Builder setIncludeVhRateLimits(
com.google.protobuf.BoolValue.Builder builderForValue) {
if (includeVhRateLimitsBuilder_ == null) {
includeVhRateLimits_ = builderForValue.build();
onChanged();
} else {
includeVhRateLimitsBuilder_.setMessage(builderForValue.build());
}
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_config.route.v3.VirtualHost.rate_limits>` are not applied to the
* request.
*
*
* .google.protobuf.BoolValue include_vh_rate_limits = 14;
*/
public Builder mergeIncludeVhRateLimits(com.google.protobuf.BoolValue value) {
if (includeVhRateLimitsBuilder_ == null) {
if (includeVhRateLimits_ != null) {
includeVhRateLimits_ =
com.google.protobuf.BoolValue.newBuilder(includeVhRateLimits_).mergeFrom(value).buildPartial();
} else {
includeVhRateLimits_ = value;
}
onChanged();
} else {
includeVhRateLimitsBuilder_.mergeFrom(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_config.route.v3.VirtualHost.rate_limits>` are not applied to the
* request.
*
*
* .google.protobuf.BoolValue include_vh_rate_limits = 14;
*/
public Builder clearIncludeVhRateLimits() {
if (includeVhRateLimitsBuilder_ == null) {
includeVhRateLimits_ = null;
onChanged();
} else {
includeVhRateLimits_ = null;
includeVhRateLimitsBuilder_ = null;
}
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_config.route.v3.VirtualHost.rate_limits>` are not applied to the
* request.
*
*
* .google.protobuf.BoolValue include_vh_rate_limits = 14;
*/
public com.google.protobuf.BoolValue.Builder getIncludeVhRateLimitsBuilder() {
onChanged();
return getIncludeVhRateLimitsFieldBuilder().getBuilder();
}
/**
*
* 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_config.route.v3.VirtualHost.rate_limits>` are not applied to the
* request.
*
*
* .google.protobuf.BoolValue include_vh_rate_limits = 14;
*/
public com.google.protobuf.BoolValueOrBuilder getIncludeVhRateLimitsOrBuilder() {
if (includeVhRateLimitsBuilder_ != null) {
return includeVhRateLimitsBuilder_.getMessageOrBuilder();
} else {
return includeVhRateLimits_ == null ?
com.google.protobuf.BoolValue.getDefaultInstance() : 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_config.route.v3.VirtualHost.rate_limits>` are not applied to the
* request.
*
*
* .google.protobuf.BoolValue include_vh_rate_limits = 14;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>
getIncludeVhRateLimitsFieldBuilder() {
if (includeVhRateLimitsBuilder_ == null) {
includeVhRateLimitsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>(
getIncludeVhRateLimits(),
getParentForChildren(),
isClean());
includeVhRateLimits_ = null;
}
return includeVhRateLimitsBuilder_;
}
private java.util.List hashPolicy_ =
java.util.Collections.emptyList();
private void ensureHashPolicyIsMutable() {
if (!((bitField0_ & 0x00000004) != 0)) {
hashPolicy_ = new java.util.ArrayList(hashPolicy_);
bitField0_ |= 0x00000004;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy, io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Builder, io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicyOrBuilder> hashPolicyBuilder_;
/**
*
* Specifies a list of hash policies to use for ring hash load balancing. Each
* hash policy is evaluated individually and the combined result is used to
* route the request. The method of combination is deterministic such that
* identical lists of hash policies will produce the same hash. Since a hash
* policy examines specific parts of a request, it can fail to produce a hash
* (i.e. if the hashed header is not present). If (and only if) all configured
* hash policies fail to generate a hash, no hash will be produced for
* the route. In this case, the behavior is the same as if no hash policies
* were specified (i.e. the ring hash load balancer will choose a random
* backend). If a hash policy has the "terminal" attribute set to true, and
* there is already a hash generated, the hash is returned immediately,
* ignoring the rest of the hash policy list.
*
*
* repeated .envoy.config.route.v3.RouteAction.HashPolicy hash_policy = 15;
*/
public java.util.List getHashPolicyList() {
if (hashPolicyBuilder_ == null) {
return java.util.Collections.unmodifiableList(hashPolicy_);
} else {
return hashPolicyBuilder_.getMessageList();
}
}
/**
*
* Specifies a list of hash policies to use for ring hash load balancing. Each
* hash policy is evaluated individually and the combined result is used to
* route the request. The method of combination is deterministic such that
* identical lists of hash policies will produce the same hash. Since a hash
* policy examines specific parts of a request, it can fail to produce a hash
* (i.e. if the hashed header is not present). If (and only if) all configured
* hash policies fail to generate a hash, no hash will be produced for
* the route. In this case, the behavior is the same as if no hash policies
* were specified (i.e. the ring hash load balancer will choose a random
* backend). If a hash policy has the "terminal" attribute set to true, and
* there is already a hash generated, the hash is returned immediately,
* ignoring the rest of the hash policy list.
*
*
* repeated .envoy.config.route.v3.RouteAction.HashPolicy hash_policy = 15;
*/
public int getHashPolicyCount() {
if (hashPolicyBuilder_ == null) {
return hashPolicy_.size();
} else {
return hashPolicyBuilder_.getCount();
}
}
/**
*
* Specifies a list of hash policies to use for ring hash load balancing. Each
* hash policy is evaluated individually and the combined result is used to
* route the request. The method of combination is deterministic such that
* identical lists of hash policies will produce the same hash. Since a hash
* policy examines specific parts of a request, it can fail to produce a hash
* (i.e. if the hashed header is not present). If (and only if) all configured
* hash policies fail to generate a hash, no hash will be produced for
* the route. In this case, the behavior is the same as if no hash policies
* were specified (i.e. the ring hash load balancer will choose a random
* backend). If a hash policy has the "terminal" attribute set to true, and
* there is already a hash generated, the hash is returned immediately,
* ignoring the rest of the hash policy list.
*
*
* repeated .envoy.config.route.v3.RouteAction.HashPolicy hash_policy = 15;
*/
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy getHashPolicy(int index) {
if (hashPolicyBuilder_ == null) {
return hashPolicy_.get(index);
} else {
return hashPolicyBuilder_.getMessage(index);
}
}
/**
*
* Specifies a list of hash policies to use for ring hash load balancing. Each
* hash policy is evaluated individually and the combined result is used to
* route the request. The method of combination is deterministic such that
* identical lists of hash policies will produce the same hash. Since a hash
* policy examines specific parts of a request, it can fail to produce a hash
* (i.e. if the hashed header is not present). If (and only if) all configured
* hash policies fail to generate a hash, no hash will be produced for
* the route. In this case, the behavior is the same as if no hash policies
* were specified (i.e. the ring hash load balancer will choose a random
* backend). If a hash policy has the "terminal" attribute set to true, and
* there is already a hash generated, the hash is returned immediately,
* ignoring the rest of the hash policy list.
*
*
* repeated .envoy.config.route.v3.RouteAction.HashPolicy hash_policy = 15;
*/
public Builder setHashPolicy(
int index, io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy value) {
if (hashPolicyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureHashPolicyIsMutable();
hashPolicy_.set(index, value);
onChanged();
} else {
hashPolicyBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Specifies a list of hash policies to use for ring hash load balancing. Each
* hash policy is evaluated individually and the combined result is used to
* route the request. The method of combination is deterministic such that
* identical lists of hash policies will produce the same hash. Since a hash
* policy examines specific parts of a request, it can fail to produce a hash
* (i.e. if the hashed header is not present). If (and only if) all configured
* hash policies fail to generate a hash, no hash will be produced for
* the route. In this case, the behavior is the same as if no hash policies
* were specified (i.e. the ring hash load balancer will choose a random
* backend). If a hash policy has the "terminal" attribute set to true, and
* there is already a hash generated, the hash is returned immediately,
* ignoring the rest of the hash policy list.
*
*
* repeated .envoy.config.route.v3.RouteAction.HashPolicy hash_policy = 15;
*/
public Builder setHashPolicy(
int index, io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Builder builderForValue) {
if (hashPolicyBuilder_ == null) {
ensureHashPolicyIsMutable();
hashPolicy_.set(index, builderForValue.build());
onChanged();
} else {
hashPolicyBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Specifies a list of hash policies to use for ring hash load balancing. Each
* hash policy is evaluated individually and the combined result is used to
* route the request. The method of combination is deterministic such that
* identical lists of hash policies will produce the same hash. Since a hash
* policy examines specific parts of a request, it can fail to produce a hash
* (i.e. if the hashed header is not present). If (and only if) all configured
* hash policies fail to generate a hash, no hash will be produced for
* the route. In this case, the behavior is the same as if no hash policies
* were specified (i.e. the ring hash load balancer will choose a random
* backend). If a hash policy has the "terminal" attribute set to true, and
* there is already a hash generated, the hash is returned immediately,
* ignoring the rest of the hash policy list.
*
*
* repeated .envoy.config.route.v3.RouteAction.HashPolicy hash_policy = 15;
*/
public Builder addHashPolicy(io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy value) {
if (hashPolicyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureHashPolicyIsMutable();
hashPolicy_.add(value);
onChanged();
} else {
hashPolicyBuilder_.addMessage(value);
}
return this;
}
/**
*
* Specifies a list of hash policies to use for ring hash load balancing. Each
* hash policy is evaluated individually and the combined result is used to
* route the request. The method of combination is deterministic such that
* identical lists of hash policies will produce the same hash. Since a hash
* policy examines specific parts of a request, it can fail to produce a hash
* (i.e. if the hashed header is not present). If (and only if) all configured
* hash policies fail to generate a hash, no hash will be produced for
* the route. In this case, the behavior is the same as if no hash policies
* were specified (i.e. the ring hash load balancer will choose a random
* backend). If a hash policy has the "terminal" attribute set to true, and
* there is already a hash generated, the hash is returned immediately,
* ignoring the rest of the hash policy list.
*
*
* repeated .envoy.config.route.v3.RouteAction.HashPolicy hash_policy = 15;
*/
public Builder addHashPolicy(
int index, io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy value) {
if (hashPolicyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureHashPolicyIsMutable();
hashPolicy_.add(index, value);
onChanged();
} else {
hashPolicyBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Specifies a list of hash policies to use for ring hash load balancing. Each
* hash policy is evaluated individually and the combined result is used to
* route the request. The method of combination is deterministic such that
* identical lists of hash policies will produce the same hash. Since a hash
* policy examines specific parts of a request, it can fail to produce a hash
* (i.e. if the hashed header is not present). If (and only if) all configured
* hash policies fail to generate a hash, no hash will be produced for
* the route. In this case, the behavior is the same as if no hash policies
* were specified (i.e. the ring hash load balancer will choose a random
* backend). If a hash policy has the "terminal" attribute set to true, and
* there is already a hash generated, the hash is returned immediately,
* ignoring the rest of the hash policy list.
*
*
* repeated .envoy.config.route.v3.RouteAction.HashPolicy hash_policy = 15;
*/
public Builder addHashPolicy(
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Builder builderForValue) {
if (hashPolicyBuilder_ == null) {
ensureHashPolicyIsMutable();
hashPolicy_.add(builderForValue.build());
onChanged();
} else {
hashPolicyBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Specifies a list of hash policies to use for ring hash load balancing. Each
* hash policy is evaluated individually and the combined result is used to
* route the request. The method of combination is deterministic such that
* identical lists of hash policies will produce the same hash. Since a hash
* policy examines specific parts of a request, it can fail to produce a hash
* (i.e. if the hashed header is not present). If (and only if) all configured
* hash policies fail to generate a hash, no hash will be produced for
* the route. In this case, the behavior is the same as if no hash policies
* were specified (i.e. the ring hash load balancer will choose a random
* backend). If a hash policy has the "terminal" attribute set to true, and
* there is already a hash generated, the hash is returned immediately,
* ignoring the rest of the hash policy list.
*
*
* repeated .envoy.config.route.v3.RouteAction.HashPolicy hash_policy = 15;
*/
public Builder addHashPolicy(
int index, io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Builder builderForValue) {
if (hashPolicyBuilder_ == null) {
ensureHashPolicyIsMutable();
hashPolicy_.add(index, builderForValue.build());
onChanged();
} else {
hashPolicyBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Specifies a list of hash policies to use for ring hash load balancing. Each
* hash policy is evaluated individually and the combined result is used to
* route the request. The method of combination is deterministic such that
* identical lists of hash policies will produce the same hash. Since a hash
* policy examines specific parts of a request, it can fail to produce a hash
* (i.e. if the hashed header is not present). If (and only if) all configured
* hash policies fail to generate a hash, no hash will be produced for
* the route. In this case, the behavior is the same as if no hash policies
* were specified (i.e. the ring hash load balancer will choose a random
* backend). If a hash policy has the "terminal" attribute set to true, and
* there is already a hash generated, the hash is returned immediately,
* ignoring the rest of the hash policy list.
*
*
* repeated .envoy.config.route.v3.RouteAction.HashPolicy hash_policy = 15;
*/
public Builder addAllHashPolicy(
java.lang.Iterable extends io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy> values) {
if (hashPolicyBuilder_ == null) {
ensureHashPolicyIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, hashPolicy_);
onChanged();
} else {
hashPolicyBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Specifies a list of hash policies to use for ring hash load balancing. Each
* hash policy is evaluated individually and the combined result is used to
* route the request. The method of combination is deterministic such that
* identical lists of hash policies will produce the same hash. Since a hash
* policy examines specific parts of a request, it can fail to produce a hash
* (i.e. if the hashed header is not present). If (and only if) all configured
* hash policies fail to generate a hash, no hash will be produced for
* the route. In this case, the behavior is the same as if no hash policies
* were specified (i.e. the ring hash load balancer will choose a random
* backend). If a hash policy has the "terminal" attribute set to true, and
* there is already a hash generated, the hash is returned immediately,
* ignoring the rest of the hash policy list.
*
*
* repeated .envoy.config.route.v3.RouteAction.HashPolicy hash_policy = 15;
*/
public Builder clearHashPolicy() {
if (hashPolicyBuilder_ == null) {
hashPolicy_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
} else {
hashPolicyBuilder_.clear();
}
return this;
}
/**
*
* Specifies a list of hash policies to use for ring hash load balancing. Each
* hash policy is evaluated individually and the combined result is used to
* route the request. The method of combination is deterministic such that
* identical lists of hash policies will produce the same hash. Since a hash
* policy examines specific parts of a request, it can fail to produce a hash
* (i.e. if the hashed header is not present). If (and only if) all configured
* hash policies fail to generate a hash, no hash will be produced for
* the route. In this case, the behavior is the same as if no hash policies
* were specified (i.e. the ring hash load balancer will choose a random
* backend). If a hash policy has the "terminal" attribute set to true, and
* there is already a hash generated, the hash is returned immediately,
* ignoring the rest of the hash policy list.
*
*
* repeated .envoy.config.route.v3.RouteAction.HashPolicy hash_policy = 15;
*/
public Builder removeHashPolicy(int index) {
if (hashPolicyBuilder_ == null) {
ensureHashPolicyIsMutable();
hashPolicy_.remove(index);
onChanged();
} else {
hashPolicyBuilder_.remove(index);
}
return this;
}
/**
*
* Specifies a list of hash policies to use for ring hash load balancing. Each
* hash policy is evaluated individually and the combined result is used to
* route the request. The method of combination is deterministic such that
* identical lists of hash policies will produce the same hash. Since a hash
* policy examines specific parts of a request, it can fail to produce a hash
* (i.e. if the hashed header is not present). If (and only if) all configured
* hash policies fail to generate a hash, no hash will be produced for
* the route. In this case, the behavior is the same as if no hash policies
* were specified (i.e. the ring hash load balancer will choose a random
* backend). If a hash policy has the "terminal" attribute set to true, and
* there is already a hash generated, the hash is returned immediately,
* ignoring the rest of the hash policy list.
*
*
* repeated .envoy.config.route.v3.RouteAction.HashPolicy hash_policy = 15;
*/
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Builder getHashPolicyBuilder(
int index) {
return getHashPolicyFieldBuilder().getBuilder(index);
}
/**
*
* Specifies a list of hash policies to use for ring hash load balancing. Each
* hash policy is evaluated individually and the combined result is used to
* route the request. The method of combination is deterministic such that
* identical lists of hash policies will produce the same hash. Since a hash
* policy examines specific parts of a request, it can fail to produce a hash
* (i.e. if the hashed header is not present). If (and only if) all configured
* hash policies fail to generate a hash, no hash will be produced for
* the route. In this case, the behavior is the same as if no hash policies
* were specified (i.e. the ring hash load balancer will choose a random
* backend). If a hash policy has the "terminal" attribute set to true, and
* there is already a hash generated, the hash is returned immediately,
* ignoring the rest of the hash policy list.
*
*
* repeated .envoy.config.route.v3.RouteAction.HashPolicy hash_policy = 15;
*/
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicyOrBuilder getHashPolicyOrBuilder(
int index) {
if (hashPolicyBuilder_ == null) {
return hashPolicy_.get(index); } else {
return hashPolicyBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Specifies a list of hash policies to use for ring hash load balancing. Each
* hash policy is evaluated individually and the combined result is used to
* route the request. The method of combination is deterministic such that
* identical lists of hash policies will produce the same hash. Since a hash
* policy examines specific parts of a request, it can fail to produce a hash
* (i.e. if the hashed header is not present). If (and only if) all configured
* hash policies fail to generate a hash, no hash will be produced for
* the route. In this case, the behavior is the same as if no hash policies
* were specified (i.e. the ring hash load balancer will choose a random
* backend). If a hash policy has the "terminal" attribute set to true, and
* there is already a hash generated, the hash is returned immediately,
* ignoring the rest of the hash policy list.
*
*
* repeated .envoy.config.route.v3.RouteAction.HashPolicy hash_policy = 15;
*/
public java.util.List extends io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicyOrBuilder>
getHashPolicyOrBuilderList() {
if (hashPolicyBuilder_ != null) {
return hashPolicyBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(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.
*
*
* repeated .envoy.config.route.v3.RouteAction.HashPolicy hash_policy = 15;
*/
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Builder addHashPolicyBuilder() {
return getHashPolicyFieldBuilder().addBuilder(
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.getDefaultInstance());
}
/**
*
* Specifies a list of hash policies to use for ring hash load balancing. Each
* hash policy is evaluated individually and the combined result is used to
* route the request. The method of combination is deterministic such that
* identical lists of hash policies will produce the same hash. Since a hash
* policy examines specific parts of a request, it can fail to produce a hash
* (i.e. if the hashed header is not present). If (and only if) all configured
* hash policies fail to generate a hash, no hash will be produced for
* the route. In this case, the behavior is the same as if no hash policies
* were specified (i.e. the ring hash load balancer will choose a random
* backend). If a hash policy has the "terminal" attribute set to true, and
* there is already a hash generated, the hash is returned immediately,
* ignoring the rest of the hash policy list.
*
*
* repeated .envoy.config.route.v3.RouteAction.HashPolicy hash_policy = 15;
*/
public io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Builder addHashPolicyBuilder(
int index) {
return getHashPolicyFieldBuilder().addBuilder(
index, io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.getDefaultInstance());
}
/**
*
* Specifies a list of hash policies to use for ring hash load balancing. Each
* hash policy is evaluated individually and the combined result is used to
* route the request. The method of combination is deterministic such that
* identical lists of hash policies will produce the same hash. Since a hash
* policy examines specific parts of a request, it can fail to produce a hash
* (i.e. if the hashed header is not present). If (and only if) all configured
* hash policies fail to generate a hash, no hash will be produced for
* the route. In this case, the behavior is the same as if no hash policies
* were specified (i.e. the ring hash load balancer will choose a random
* backend). If a hash policy has the "terminal" attribute set to true, and
* there is already a hash generated, the hash is returned immediately,
* ignoring the rest of the hash policy list.
*
*
* repeated .envoy.config.route.v3.RouteAction.HashPolicy hash_policy = 15;
*/
public java.util.List
getHashPolicyBuilderList() {
return getHashPolicyFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy, io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Builder, io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicyOrBuilder>
getHashPolicyFieldBuilder() {
if (hashPolicyBuilder_ == null) {
hashPolicyBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy, io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicy.Builder, io.envoyproxy.envoy.config.route.v3.RouteAction.HashPolicyOrBuilder>(
hashPolicy_,
((bitField0_ & 0x00000004) != 0),
getParentForChildren(),
isClean());
hashPolicy_ = null;
}
return hashPolicyBuilder_;
}
private io.envoyproxy.envoy.config.route.v3.CorsPolicy cors_;
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.route.v3.CorsPolicy, io.envoyproxy.envoy.config.route.v3.CorsPolicy.Builder, io.envoyproxy.envoy.config.route.v3.CorsPolicyOrBuilder> corsBuilder_;
/**
*
* Indicates that the route has a CORS policy.
*
*
* .envoy.config.route.v3.CorsPolicy cors = 17;
*/
public boolean hasCors() {
return corsBuilder_ != null || cors_ != null;
}
/**
*
* Indicates that the route has a CORS policy.
*
*
* .envoy.config.route.v3.CorsPolicy cors = 17;
*/
public io.envoyproxy.envoy.config.route.v3.CorsPolicy getCors() {
if (corsBuilder_ == null) {
return cors_ == null ? io.envoyproxy.envoy.config.route.v3.CorsPolicy.getDefaultInstance() : cors_;
} else {
return corsBuilder_.getMessage();
}
}
/**
*
* Indicates that the route has a CORS policy.
*
*
* .envoy.config.route.v3.CorsPolicy cors = 17;
*/
public Builder setCors(io.envoyproxy.envoy.config.route.v3.CorsPolicy value) {
if (corsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
cors_ = value;
onChanged();
} else {
corsBuilder_.setMessage(value);
}
return this;
}
/**
*
* Indicates that the route has a CORS policy.
*
*
* .envoy.config.route.v3.CorsPolicy cors = 17;
*/
public Builder setCors(
io.envoyproxy.envoy.config.route.v3.CorsPolicy.Builder builderForValue) {
if (corsBuilder_ == null) {
cors_ = builderForValue.build();
onChanged();
} else {
corsBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Indicates that the route has a CORS policy.
*
*
* .envoy.config.route.v3.CorsPolicy cors = 17;
*/
public Builder mergeCors(io.envoyproxy.envoy.config.route.v3.CorsPolicy value) {
if (corsBuilder_ == null) {
if (cors_ != null) {
cors_ =
io.envoyproxy.envoy.config.route.v3.CorsPolicy.newBuilder(cors_).mergeFrom(value).buildPartial();
} else {
cors_ = value;
}
onChanged();
} else {
corsBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Indicates that the route has a CORS policy.
*
*
* .envoy.config.route.v3.CorsPolicy cors = 17;
*/
public Builder clearCors() {
if (corsBuilder_ == null) {
cors_ = null;
onChanged();
} else {
cors_ = null;
corsBuilder_ = null;
}
return this;
}
/**
*
* Indicates that the route has a CORS policy.
*
*
* .envoy.config.route.v3.CorsPolicy cors = 17;
*/
public io.envoyproxy.envoy.config.route.v3.CorsPolicy.Builder getCorsBuilder() {
onChanged();
return getCorsFieldBuilder().getBuilder();
}
/**
*
* Indicates that the route has a CORS policy.
*
*
* .envoy.config.route.v3.CorsPolicy cors = 17;
*/
public io.envoyproxy.envoy.config.route.v3.CorsPolicyOrBuilder getCorsOrBuilder() {
if (corsBuilder_ != null) {
return corsBuilder_.getMessageOrBuilder();
} else {
return cors_ == null ?
io.envoyproxy.envoy.config.route.v3.CorsPolicy.getDefaultInstance() : cors_;
}
}
/**
*
* Indicates that the route has a CORS policy.
*
*
* .envoy.config.route.v3.CorsPolicy cors = 17;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.route.v3.CorsPolicy, io.envoyproxy.envoy.config.route.v3.CorsPolicy.Builder, io.envoyproxy.envoy.config.route.v3.CorsPolicyOrBuilder>
getCorsFieldBuilder() {
if (corsBuilder_ == null) {
corsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.route.v3.CorsPolicy, io.envoyproxy.envoy.config.route.v3.CorsPolicy.Builder, io.envoyproxy.envoy.config.route.v3.CorsPolicyOrBuilder>(
getCors(),
getParentForChildren(),
isClean());
cors_ = null;
}
return corsBuilder_;
}
private com.google.protobuf.Duration maxGrpcTimeout_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> maxGrpcTimeoutBuilder_;
/**
*
* 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_config.route.v3.RouteAction.timeout>`, but limit the applied timeout
* to the maximum value specified here. If configured as 0, the maximum allowed timeout for
* gRPC requests is infinity. If not configured at all, the `grpc-timeout` header is not used
* and gRPC requests time out like any other requests using
* :ref:`timeout <envoy_api_field_config.route.v3.RouteAction.timeout>` or its default.
* This can be used to prevent unexpected upstream request timeouts due to potentially long
* time gaps between gRPC request and response in gRPC streaming mode.
*
*
* .google.protobuf.Duration max_grpc_timeout = 23;
*/
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_config.route.v3.RouteAction.timeout>`, but limit the applied timeout
* to the maximum value specified here. If configured as 0, the maximum allowed timeout for
* gRPC requests is infinity. If not configured at all, the `grpc-timeout` header is not used
* and gRPC requests time out like any other requests using
* :ref:`timeout <envoy_api_field_config.route.v3.RouteAction.timeout>` or its default.
* This can be used to prevent unexpected upstream request timeouts due to potentially long
* time gaps between gRPC request and response in gRPC streaming mode.
*
*
* .google.protobuf.Duration max_grpc_timeout = 23;
*/
public com.google.protobuf.Duration getMaxGrpcTimeout() {
if (maxGrpcTimeoutBuilder_ == null) {
return maxGrpcTimeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : maxGrpcTimeout_;
} else {
return maxGrpcTimeoutBuilder_.getMessage();
}
}
/**
*
* 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_config.route.v3.RouteAction.timeout>`, but limit the applied timeout
* to the maximum value specified here. If configured as 0, the maximum allowed timeout for
* gRPC requests is infinity. If not configured at all, the `grpc-timeout` header is not used
* and gRPC requests time out like any other requests using
* :ref:`timeout <envoy_api_field_config.route.v3.RouteAction.timeout>` or its default.
* This can be used to prevent unexpected upstream request timeouts due to potentially long
* time gaps between gRPC request and response in gRPC streaming mode.
*
*
* .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_config.route.v3.RouteAction.timeout>`, but limit the applied timeout
* to the maximum value specified here. If configured as 0, the maximum allowed timeout for
* gRPC requests is infinity. If not configured at all, the `grpc-timeout` header is not used
* and gRPC requests time out like any other requests using
* :ref:`timeout <envoy_api_field_config.route.v3.RouteAction.timeout>` or its default.
* This can be used to prevent unexpected upstream request timeouts due to potentially long
* time gaps between gRPC request and response in gRPC streaming mode.
*
*
* .google.protobuf.Duration max_grpc_timeout = 23;
*/
public Builder setMaxGrpcTimeout(
com.google.protobuf.Duration.Builder builderForValue) {
if (maxGrpcTimeoutBuilder_ == null) {
maxGrpcTimeout_ = builderForValue.build();
onChanged();
} else {
maxGrpcTimeoutBuilder_.setMessage(builderForValue.build());
}
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_config.route.v3.RouteAction.timeout>`, but limit the applied timeout
* to the maximum value specified here. If configured as 0, the maximum allowed timeout for
* gRPC requests is infinity. If not configured at all, the `grpc-timeout` header is not used
* and gRPC requests time out like any other requests using
* :ref:`timeout <envoy_api_field_config.route.v3.RouteAction.timeout>` or its default.
* This can be used to prevent unexpected upstream request timeouts due to potentially long
* time gaps between gRPC request and response in gRPC streaming mode.
*
*
* .google.protobuf.Duration max_grpc_timeout = 23;
*/
public Builder mergeMaxGrpcTimeout(com.google.protobuf.Duration value) {
if (maxGrpcTimeoutBuilder_ == null) {
if (maxGrpcTimeout_ != null) {
maxGrpcTimeout_ =
com.google.protobuf.Duration.newBuilder(maxGrpcTimeout_).mergeFrom(value).buildPartial();
} else {
maxGrpcTimeout_ = value;
}
onChanged();
} else {
maxGrpcTimeoutBuilder_.mergeFrom(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_config.route.v3.RouteAction.timeout>`, but limit the applied timeout
* to the maximum value specified here. If configured as 0, the maximum allowed timeout for
* gRPC requests is infinity. If not configured at all, the `grpc-timeout` header is not used
* and gRPC requests time out like any other requests using
* :ref:`timeout <envoy_api_field_config.route.v3.RouteAction.timeout>` or its default.
* This can be used to prevent unexpected upstream request timeouts due to potentially long
* time gaps between gRPC request and response in gRPC streaming mode.
*
*
* .google.protobuf.Duration max_grpc_timeout = 23;
*/
public Builder clearMaxGrpcTimeout() {
if (maxGrpcTimeoutBuilder_ == null) {
maxGrpcTimeout_ = null;
onChanged();
} else {
maxGrpcTimeout_ = null;
maxGrpcTimeoutBuilder_ = null;
}
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_config.route.v3.RouteAction.timeout>`, but limit the applied timeout
* to the maximum value specified here. If configured as 0, the maximum allowed timeout for
* gRPC requests is infinity. If not configured at all, the `grpc-timeout` header is not used
* and gRPC requests time out like any other requests using
* :ref:`timeout <envoy_api_field_config.route.v3.RouteAction.timeout>` or its default.
* This can be used to prevent unexpected upstream request timeouts due to potentially long
* time gaps between gRPC request and response in gRPC streaming mode.
*
*
* .google.protobuf.Duration max_grpc_timeout = 23;
*/
public com.google.protobuf.Duration.Builder getMaxGrpcTimeoutBuilder() {
onChanged();
return getMaxGrpcTimeoutFieldBuilder().getBuilder();
}
/**
*
* 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_config.route.v3.RouteAction.timeout>`, but limit the applied timeout
* to the maximum value specified here. If configured as 0, the maximum allowed timeout for
* gRPC requests is infinity. If not configured at all, the `grpc-timeout` header is not used
* and gRPC requests time out like any other requests using
* :ref:`timeout <envoy_api_field_config.route.v3.RouteAction.timeout>` or its default.
* This can be used to prevent unexpected upstream request timeouts due to potentially long
* time gaps between gRPC request and response in gRPC streaming mode.
*
*
* .google.protobuf.Duration max_grpc_timeout = 23;
*/
public com.google.protobuf.DurationOrBuilder getMaxGrpcTimeoutOrBuilder() {
if (maxGrpcTimeoutBuilder_ != null) {
return maxGrpcTimeoutBuilder_.getMessageOrBuilder();
} else {
return maxGrpcTimeout_ == null ?
com.google.protobuf.Duration.getDefaultInstance() : 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_config.route.v3.RouteAction.timeout>`, but limit the applied timeout
* to the maximum value specified here. If configured as 0, the maximum allowed timeout for
* gRPC requests is infinity. If not configured at all, the `grpc-timeout` header is not used
* and gRPC requests time out like any other requests using
* :ref:`timeout <envoy_api_field_config.route.v3.RouteAction.timeout>` or its default.
* This can be used to prevent unexpected upstream request timeouts due to potentially long
* time gaps between gRPC request and response in gRPC streaming mode.
*
*
* .google.protobuf.Duration max_grpc_timeout = 23;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>
getMaxGrpcTimeoutFieldBuilder() {
if (maxGrpcTimeoutBuilder_ == null) {
maxGrpcTimeoutBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>(
getMaxGrpcTimeout(),
getParentForChildren(),
isClean());
maxGrpcTimeout_ = null;
}
return maxGrpcTimeoutBuilder_;
}
private com.google.protobuf.Duration grpcTimeoutOffset_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> grpcTimeoutOffsetBuilder_;
/**
*
* 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 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).
*
*
* .google.protobuf.Duration grpc_timeout_offset = 28;
*/
public com.google.protobuf.Duration getGrpcTimeoutOffset() {
if (grpcTimeoutOffsetBuilder_ == null) {
return grpcTimeoutOffset_ == null ? com.google.protobuf.Duration.getDefaultInstance() : grpcTimeoutOffset_;
} else {
return grpcTimeoutOffsetBuilder_.getMessage();
}
}
/**
*
* 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).
*
*
* .google.protobuf.Duration grpc_timeout_offset = 28;
*/
public Builder setGrpcTimeoutOffset(
com.google.protobuf.Duration.Builder builderForValue) {
if (grpcTimeoutOffsetBuilder_ == null) {
grpcTimeoutOffset_ = builderForValue.build();
onChanged();
} else {
grpcTimeoutOffsetBuilder_.setMessage(builderForValue.build());
}
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).
*
*
* .google.protobuf.Duration grpc_timeout_offset = 28;
*/
public Builder mergeGrpcTimeoutOffset(com.google.protobuf.Duration value) {
if (grpcTimeoutOffsetBuilder_ == null) {
if (grpcTimeoutOffset_ != null) {
grpcTimeoutOffset_ =
com.google.protobuf.Duration.newBuilder(grpcTimeoutOffset_).mergeFrom(value).buildPartial();
} else {
grpcTimeoutOffset_ = value;
}
onChanged();
} else {
grpcTimeoutOffsetBuilder_.mergeFrom(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).
*
*
* .google.protobuf.Duration grpc_timeout_offset = 28;
*/
public Builder clearGrpcTimeoutOffset() {
if (grpcTimeoutOffsetBuilder_ == null) {
grpcTimeoutOffset_ = null;
onChanged();
} else {
grpcTimeoutOffset_ = null;
grpcTimeoutOffsetBuilder_ = null;
}
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).
*
*
* .google.protobuf.Duration grpc_timeout_offset = 28;
*/
public com.google.protobuf.Duration.Builder getGrpcTimeoutOffsetBuilder() {
onChanged();
return getGrpcTimeoutOffsetFieldBuilder().getBuilder();
}
/**
*
* 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 com.google.protobuf.DurationOrBuilder getGrpcTimeoutOffsetOrBuilder() {
if (grpcTimeoutOffsetBuilder_ != null) {
return grpcTimeoutOffsetBuilder_.getMessageOrBuilder();
} else {
return grpcTimeoutOffset_ == null ?
com.google.protobuf.Duration.getDefaultInstance() : 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;
*/
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.config.route.v3.RouteAction.UpgradeConfig, io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.Builder, io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfigOrBuilder> upgradeConfigsBuilder_;
/**
* repeated .envoy.config.route.v3.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.config.route.v3.RouteAction.UpgradeConfig upgrade_configs = 25;
*/
public int getUpgradeConfigsCount() {
if (upgradeConfigsBuilder_ == null) {
return upgradeConfigs_.size();
} else {
return upgradeConfigsBuilder_.getCount();
}
}
/**
* repeated .envoy.config.route.v3.RouteAction.UpgradeConfig upgrade_configs = 25;
*/
public io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig getUpgradeConfigs(int index) {
if (upgradeConfigsBuilder_ == null) {
return upgradeConfigs_.get(index);
} else {
return upgradeConfigsBuilder_.getMessage(index);
}
}
/**
* repeated .envoy.config.route.v3.RouteAction.UpgradeConfig upgrade_configs = 25;
*/
public Builder setUpgradeConfigs(
int index, io.envoyproxy.envoy.config.route.v3.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.config.route.v3.RouteAction.UpgradeConfig upgrade_configs = 25;
*/
public Builder setUpgradeConfigs(
int index, io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.Builder builderForValue) {
if (upgradeConfigsBuilder_ == null) {
ensureUpgradeConfigsIsMutable();
upgradeConfigs_.set(index, builderForValue.build());
onChanged();
} else {
upgradeConfigsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .envoy.config.route.v3.RouteAction.UpgradeConfig upgrade_configs = 25;
*/
public Builder addUpgradeConfigs(io.envoyproxy.envoy.config.route.v3.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.config.route.v3.RouteAction.UpgradeConfig upgrade_configs = 25;
*/
public Builder addUpgradeConfigs(
int index, io.envoyproxy.envoy.config.route.v3.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.config.route.v3.RouteAction.UpgradeConfig upgrade_configs = 25;
*/
public Builder addUpgradeConfigs(
io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.Builder builderForValue) {
if (upgradeConfigsBuilder_ == null) {
ensureUpgradeConfigsIsMutable();
upgradeConfigs_.add(builderForValue.build());
onChanged();
} else {
upgradeConfigsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .envoy.config.route.v3.RouteAction.UpgradeConfig upgrade_configs = 25;
*/
public Builder addUpgradeConfigs(
int index, io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.Builder builderForValue) {
if (upgradeConfigsBuilder_ == null) {
ensureUpgradeConfigsIsMutable();
upgradeConfigs_.add(index, builderForValue.build());
onChanged();
} else {
upgradeConfigsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .envoy.config.route.v3.RouteAction.UpgradeConfig upgrade_configs = 25;
*/
public Builder addAllUpgradeConfigs(
java.lang.Iterable extends io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig> values) {
if (upgradeConfigsBuilder_ == null) {
ensureUpgradeConfigsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, upgradeConfigs_);
onChanged();
} else {
upgradeConfigsBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .envoy.config.route.v3.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.config.route.v3.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.config.route.v3.RouteAction.UpgradeConfig upgrade_configs = 25;
*/
public io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.Builder getUpgradeConfigsBuilder(
int index) {
return getUpgradeConfigsFieldBuilder().getBuilder(index);
}
/**
* repeated .envoy.config.route.v3.RouteAction.UpgradeConfig upgrade_configs = 25;
*/
public io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfigOrBuilder getUpgradeConfigsOrBuilder(
int index) {
if (upgradeConfigsBuilder_ == null) {
return upgradeConfigs_.get(index); } else {
return upgradeConfigsBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .envoy.config.route.v3.RouteAction.UpgradeConfig upgrade_configs = 25;
*/
public java.util.List extends io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfigOrBuilder>
getUpgradeConfigsOrBuilderList() {
if (upgradeConfigsBuilder_ != null) {
return upgradeConfigsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(upgradeConfigs_);
}
}
/**
* repeated .envoy.config.route.v3.RouteAction.UpgradeConfig upgrade_configs = 25;
*/
public io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.Builder addUpgradeConfigsBuilder() {
return getUpgradeConfigsFieldBuilder().addBuilder(
io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.getDefaultInstance());
}
/**
* repeated .envoy.config.route.v3.RouteAction.UpgradeConfig upgrade_configs = 25;
*/
public io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.Builder addUpgradeConfigsBuilder(
int index) {
return getUpgradeConfigsFieldBuilder().addBuilder(
index, io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.getDefaultInstance());
}
/**
* repeated .envoy.config.route.v3.RouteAction.UpgradeConfig upgrade_configs = 25;
*/
public java.util.List
getUpgradeConfigsBuilderList() {
return getUpgradeConfigsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig, io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.Builder, io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfigOrBuilder>
getUpgradeConfigsFieldBuilder() {
if (upgradeConfigsBuilder_ == null) {
upgradeConfigsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig, io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfig.Builder, io.envoyproxy.envoy.config.route.v3.RouteAction.UpgradeConfigOrBuilder>(
upgradeConfigs_,
((bitField0_ & 0x00000008) != 0),
getParentForChildren(),
isClean());
upgradeConfigs_ = null;
}
return upgradeConfigsBuilder_;
}
private int internalRedirectAction_ = 0;
/**
* .envoy.config.route.v3.RouteAction.InternalRedirectAction internal_redirect_action = 26;
*/
public int getInternalRedirectActionValue() {
return internalRedirectAction_;
}
/**
* .envoy.config.route.v3.RouteAction.InternalRedirectAction internal_redirect_action = 26;
*/
public Builder setInternalRedirectActionValue(int value) {
internalRedirectAction_ = value;
onChanged();
return this;
}
/**
* .envoy.config.route.v3.RouteAction.InternalRedirectAction internal_redirect_action = 26;
*/
public io.envoyproxy.envoy.config.route.v3.RouteAction.InternalRedirectAction getInternalRedirectAction() {
@SuppressWarnings("deprecation")
io.envoyproxy.envoy.config.route.v3.RouteAction.InternalRedirectAction result = io.envoyproxy.envoy.config.route.v3.RouteAction.InternalRedirectAction.valueOf(internalRedirectAction_);
return result == null ? io.envoyproxy.envoy.config.route.v3.RouteAction.InternalRedirectAction.UNRECOGNIZED : result;
}
/**
* .envoy.config.route.v3.RouteAction.InternalRedirectAction internal_redirect_action = 26;
*/
public Builder setInternalRedirectAction(io.envoyproxy.envoy.config.route.v3.RouteAction.InternalRedirectAction value) {
if (value == null) {
throw new NullPointerException();
}
internalRedirectAction_ = value.getNumber();
onChanged();
return this;
}
/**
* .envoy.config.route.v3.RouteAction.InternalRedirectAction internal_redirect_action = 26;
*/
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_config.route.v3.RouteAction.internal_redirect_action>`
* is set to :ref:`HANDLE_INTERNAL_REDIRECT
* <envoy_api_enum_value_config.route.v3.RouteAction.InternalRedirectAction.HANDLE_INTERNAL_REDIRECT>`
* In the case where a downstream request is bounced among multiple routes by internal redirect,
* the first route that hits this threshold, or has
* :ref:`internal_redirect_action <envoy_api_field_config.route.v3.RouteAction.internal_redirect_action>`
* set to
* :ref:`PASS_THROUGH_INTERNAL_REDIRECT
* <envoy_api_enum_value_config.route.v3.RouteAction.InternalRedirectAction.PASS_THROUGH_INTERNAL_REDIRECT>`
* will pass the redirect back to downstream.
* If not specified, at most one redirect will be followed.
*
*
* .google.protobuf.UInt32Value max_internal_redirects = 31;
*/
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_config.route.v3.RouteAction.internal_redirect_action>`
* is set to :ref:`HANDLE_INTERNAL_REDIRECT
* <envoy_api_enum_value_config.route.v3.RouteAction.InternalRedirectAction.HANDLE_INTERNAL_REDIRECT>`
* In the case where a downstream request is bounced among multiple routes by internal redirect,
* the first route that hits this threshold, or has
* :ref:`internal_redirect_action <envoy_api_field_config.route.v3.RouteAction.internal_redirect_action>`
* set to
* :ref:`PASS_THROUGH_INTERNAL_REDIRECT
* <envoy_api_enum_value_config.route.v3.RouteAction.InternalRedirectAction.PASS_THROUGH_INTERNAL_REDIRECT>`
* will pass the redirect back to downstream.
* If not specified, at most one redirect will be followed.
*
*
* .google.protobuf.UInt32Value max_internal_redirects = 31;
*/
public com.google.protobuf.UInt32Value getMaxInternalRedirects() {
if (maxInternalRedirectsBuilder_ == null) {
return maxInternalRedirects_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : maxInternalRedirects_;
} else {
return maxInternalRedirectsBuilder_.getMessage();
}
}
/**
*
* 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_config.route.v3.RouteAction.internal_redirect_action>`
* is set to :ref:`HANDLE_INTERNAL_REDIRECT
* <envoy_api_enum_value_config.route.v3.RouteAction.InternalRedirectAction.HANDLE_INTERNAL_REDIRECT>`
* In the case where a downstream request is bounced among multiple routes by internal redirect,
* the first route that hits this threshold, or has
* :ref:`internal_redirect_action <envoy_api_field_config.route.v3.RouteAction.internal_redirect_action>`
* set to
* :ref:`PASS_THROUGH_INTERNAL_REDIRECT
* <envoy_api_enum_value_config.route.v3.RouteAction.InternalRedirectAction.PASS_THROUGH_INTERNAL_REDIRECT>`
* will pass the redirect back to downstream.
* If not specified, at most one redirect will be followed.
*
*
* .google.protobuf.UInt32Value max_internal_redirects = 31;
*/
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_config.route.v3.RouteAction.internal_redirect_action>`
* is set to :ref:`HANDLE_INTERNAL_REDIRECT
* <envoy_api_enum_value_config.route.v3.RouteAction.InternalRedirectAction.HANDLE_INTERNAL_REDIRECT>`
* In the case where a downstream request is bounced among multiple routes by internal redirect,
* the first route that hits this threshold, or has
* :ref:`internal_redirect_action <envoy_api_field_config.route.v3.RouteAction.internal_redirect_action>`
* set to
* :ref:`PASS_THROUGH_INTERNAL_REDIRECT
* <envoy_api_enum_value_config.route.v3.RouteAction.InternalRedirectAction.PASS_THROUGH_INTERNAL_REDIRECT>`
* will pass the redirect back to downstream.
* If not specified, at most one redirect will be followed.
*
*
* .google.protobuf.UInt32Value max_internal_redirects = 31;
*/
public Builder setMaxInternalRedirects(
com.google.protobuf.UInt32Value.Builder builderForValue) {
if (maxInternalRedirectsBuilder_ == null) {
maxInternalRedirects_ = builderForValue.build();
onChanged();
} else {
maxInternalRedirectsBuilder_.setMessage(builderForValue.build());
}
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_config.route.v3.RouteAction.internal_redirect_action>`
* is set to :ref:`HANDLE_INTERNAL_REDIRECT
* <envoy_api_enum_value_config.route.v3.RouteAction.InternalRedirectAction.HANDLE_INTERNAL_REDIRECT>`
* In the case where a downstream request is bounced among multiple routes by internal redirect,
* the first route that hits this threshold, or has
* :ref:`internal_redirect_action <envoy_api_field_config.route.v3.RouteAction.internal_redirect_action>`
* set to
* :ref:`PASS_THROUGH_INTERNAL_REDIRECT
* <envoy_api_enum_value_config.route.v3.RouteAction.InternalRedirectAction.PASS_THROUGH_INTERNAL_REDIRECT>`
* will pass the redirect back to downstream.
* If not specified, at most one redirect will be followed.
*
*
* .google.protobuf.UInt32Value max_internal_redirects = 31;
*/
public Builder mergeMaxInternalRedirects(com.google.protobuf.UInt32Value value) {
if (maxInternalRedirectsBuilder_ == null) {
if (maxInternalRedirects_ != null) {
maxInternalRedirects_ =
com.google.protobuf.UInt32Value.newBuilder(maxInternalRedirects_).mergeFrom(value).buildPartial();
} else {
maxInternalRedirects_ = value;
}
onChanged();
} else {
maxInternalRedirectsBuilder_.mergeFrom(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_config.route.v3.RouteAction.internal_redirect_action>`
* is set to :ref:`HANDLE_INTERNAL_REDIRECT
* <envoy_api_enum_value_config.route.v3.RouteAction.InternalRedirectAction.HANDLE_INTERNAL_REDIRECT>`
* In the case where a downstream request is bounced among multiple routes by internal redirect,
* the first route that hits this threshold, or has
* :ref:`internal_redirect_action <envoy_api_field_config.route.v3.RouteAction.internal_redirect_action>`
* set to
* :ref:`PASS_THROUGH_INTERNAL_REDIRECT
* <envoy_api_enum_value_config.route.v3.RouteAction.InternalRedirectAction.PASS_THROUGH_INTERNAL_REDIRECT>`
* will pass the redirect back to downstream.
* If not specified, at most one redirect will be followed.
*
*
* .google.protobuf.UInt32Value max_internal_redirects = 31;
*/
public Builder clearMaxInternalRedirects() {
if (maxInternalRedirectsBuilder_ == null) {
maxInternalRedirects_ = null;
onChanged();
} else {
maxInternalRedirects_ = null;
maxInternalRedirectsBuilder_ = null;
}
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_config.route.v3.RouteAction.internal_redirect_action>`
* is set to :ref:`HANDLE_INTERNAL_REDIRECT
* <envoy_api_enum_value_config.route.v3.RouteAction.InternalRedirectAction.HANDLE_INTERNAL_REDIRECT>`
* In the case where a downstream request is bounced among multiple routes by internal redirect,
* the first route that hits this threshold, or has
* :ref:`internal_redirect_action <envoy_api_field_config.route.v3.RouteAction.internal_redirect_action>`
* set to
* :ref:`PASS_THROUGH_INTERNAL_REDIRECT
* <envoy_api_enum_value_config.route.v3.RouteAction.InternalRedirectAction.PASS_THROUGH_INTERNAL_REDIRECT>`
* will pass the redirect back to downstream.
* If not specified, at most one redirect will be followed.
*
*
* .google.protobuf.UInt32Value max_internal_redirects = 31;
*/
public com.google.protobuf.UInt32Value.Builder getMaxInternalRedirectsBuilder() {
onChanged();
return getMaxInternalRedirectsFieldBuilder().getBuilder();
}
/**
*
* 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_config.route.v3.RouteAction.internal_redirect_action>`
* is set to :ref:`HANDLE_INTERNAL_REDIRECT
* <envoy_api_enum_value_config.route.v3.RouteAction.InternalRedirectAction.HANDLE_INTERNAL_REDIRECT>`
* In the case where a downstream request is bounced among multiple routes by internal redirect,
* the first route that hits this threshold, or has
* :ref:`internal_redirect_action <envoy_api_field_config.route.v3.RouteAction.internal_redirect_action>`
* set to
* :ref:`PASS_THROUGH_INTERNAL_REDIRECT
* <envoy_api_enum_value_config.route.v3.RouteAction.InternalRedirectAction.PASS_THROUGH_INTERNAL_REDIRECT>`
* will pass the redirect back to downstream.
* If not specified, at most one redirect will be followed.
*
*
* .google.protobuf.UInt32Value max_internal_redirects = 31;
*/
public com.google.protobuf.UInt32ValueOrBuilder getMaxInternalRedirectsOrBuilder() {
if (maxInternalRedirectsBuilder_ != null) {
return maxInternalRedirectsBuilder_.getMessageOrBuilder();
} else {
return maxInternalRedirects_ == null ?
com.google.protobuf.UInt32Value.getDefaultInstance() : 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_config.route.v3.RouteAction.internal_redirect_action>`
* is set to :ref:`HANDLE_INTERNAL_REDIRECT
* <envoy_api_enum_value_config.route.v3.RouteAction.InternalRedirectAction.HANDLE_INTERNAL_REDIRECT>`
* In the case where a downstream request is bounced among multiple routes by internal redirect,
* the first route that hits this threshold, or has
* :ref:`internal_redirect_action <envoy_api_field_config.route.v3.RouteAction.internal_redirect_action>`
* set to
* :ref:`PASS_THROUGH_INTERNAL_REDIRECT
* <envoy_api_enum_value_config.route.v3.RouteAction.InternalRedirectAction.PASS_THROUGH_INTERNAL_REDIRECT>`
* will pass the redirect back to downstream.
* If not specified, at most one redirect will be followed.
*
*
* .google.protobuf.UInt32Value max_internal_redirects = 31;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>
getMaxInternalRedirectsFieldBuilder() {
if (maxInternalRedirectsBuilder_ == null) {
maxInternalRedirectsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>(
getMaxInternalRedirects(),
getParentForChildren(),
isClean());
maxInternalRedirects_ = null;
}
return maxInternalRedirectsBuilder_;
}
private io.envoyproxy.envoy.config.route.v3.HedgePolicy hedgePolicy_;
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.route.v3.HedgePolicy, io.envoyproxy.envoy.config.route.v3.HedgePolicy.Builder, io.envoyproxy.envoy.config.route.v3.HedgePolicyOrBuilder> hedgePolicyBuilder_;
/**
*
* Indicates that the route has a hedge policy. Note that if this is set,
* it'll take precedence over the virtual host level hedge policy entirely
* (e.g.: policies are not merged, most internal one becomes the enforced policy).
*
*
* .envoy.config.route.v3.HedgePolicy hedge_policy = 27;
*/
public 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).
*
*
* .envoy.config.route.v3.HedgePolicy hedge_policy = 27;
*/
public io.envoyproxy.envoy.config.route.v3.HedgePolicy getHedgePolicy() {
if (hedgePolicyBuilder_ == null) {
return hedgePolicy_ == null ? io.envoyproxy.envoy.config.route.v3.HedgePolicy.getDefaultInstance() : hedgePolicy_;
} else {
return hedgePolicyBuilder_.getMessage();
}
}
/**
*
* Indicates that the route has a hedge policy. Note that if this is set,
* it'll take precedence over the virtual host level hedge policy entirely
* (e.g.: policies are not merged, most internal one becomes the enforced policy).
*
*
* .envoy.config.route.v3.HedgePolicy hedge_policy = 27;
*/
public Builder setHedgePolicy(io.envoyproxy.envoy.config.route.v3.HedgePolicy value) {
if (hedgePolicyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
hedgePolicy_ = value;
onChanged();
} else {
hedgePolicyBuilder_.setMessage(value);
}
return this;
}
/**
*
* Indicates that the route has a hedge policy. Note that if this is set,
* it'll take precedence over the virtual host level hedge policy entirely
* (e.g.: policies are not merged, most internal one becomes the enforced policy).
*
*
* .envoy.config.route.v3.HedgePolicy hedge_policy = 27;
*/
public Builder setHedgePolicy(
io.envoyproxy.envoy.config.route.v3.HedgePolicy.Builder builderForValue) {
if (hedgePolicyBuilder_ == null) {
hedgePolicy_ = builderForValue.build();
onChanged();
} else {
hedgePolicyBuilder_.setMessage(builderForValue.build());
}
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).
*
*
* .envoy.config.route.v3.HedgePolicy hedge_policy = 27;
*/
public Builder mergeHedgePolicy(io.envoyproxy.envoy.config.route.v3.HedgePolicy value) {
if (hedgePolicyBuilder_ == null) {
if (hedgePolicy_ != null) {
hedgePolicy_ =
io.envoyproxy.envoy.config.route.v3.HedgePolicy.newBuilder(hedgePolicy_).mergeFrom(value).buildPartial();
} else {
hedgePolicy_ = value;
}
onChanged();
} else {
hedgePolicyBuilder_.mergeFrom(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).
*
*
* .envoy.config.route.v3.HedgePolicy hedge_policy = 27;
*/
public Builder clearHedgePolicy() {
if (hedgePolicyBuilder_ == null) {
hedgePolicy_ = null;
onChanged();
} else {
hedgePolicy_ = null;
hedgePolicyBuilder_ = null;
}
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).
*
*
* .envoy.config.route.v3.HedgePolicy hedge_policy = 27;
*/
public io.envoyproxy.envoy.config.route.v3.HedgePolicy.Builder getHedgePolicyBuilder() {
onChanged();
return getHedgePolicyFieldBuilder().getBuilder();
}
/**
*
* Indicates that the route has a hedge policy. Note that if this is set,
* it'll take precedence over the virtual host level hedge policy entirely
* (e.g.: policies are not merged, most internal one becomes the enforced policy).
*
*
* .envoy.config.route.v3.HedgePolicy hedge_policy = 27;
*/
public io.envoyproxy.envoy.config.route.v3.HedgePolicyOrBuilder getHedgePolicyOrBuilder() {
if (hedgePolicyBuilder_ != null) {
return hedgePolicyBuilder_.getMessageOrBuilder();
} else {
return hedgePolicy_ == null ?
io.envoyproxy.envoy.config.route.v3.HedgePolicy.getDefaultInstance() : hedgePolicy_;
}
}
/**
*
* Indicates that the route has a hedge policy. Note that if this is set,
* it'll take precedence over the virtual host level hedge policy entirely
* (e.g.: policies are not merged, most internal one becomes the enforced policy).
*
*
* .envoy.config.route.v3.HedgePolicy hedge_policy = 27;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.route.v3.HedgePolicy, io.envoyproxy.envoy.config.route.v3.HedgePolicy.Builder, io.envoyproxy.envoy.config.route.v3.HedgePolicyOrBuilder>
getHedgePolicyFieldBuilder() {
if (hedgePolicyBuilder_ == null) {
hedgePolicyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.route.v3.HedgePolicy, io.envoyproxy.envoy.config.route.v3.HedgePolicy.Builder, io.envoyproxy.envoy.config.route.v3.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.config.route.v3.RouteAction)
}
// @@protoc_insertion_point(class_scope:envoy.config.route.v3.RouteAction)
private static final io.envoyproxy.envoy.config.route.v3.RouteAction DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.config.route.v3.RouteAction();
}
public static io.envoyproxy.envoy.config.route.v3.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.config.route.v3.RouteAction getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy