Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: envoy/config/route/v3/route_components.proto
package io.envoyproxy.envoy.config.route.v3;
/**
*
* Global rate limiting :ref:`architecture overview <arch_overview_global_rate_limit>`.
* Also applies to Local rate limiting :ref:`using descriptors <config_http_filters_local_rate_limit_descriptors>`.
*
*
* Protobuf type {@code envoy.config.route.v3.RateLimit}
*/
public final class RateLimit extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.config.route.v3.RateLimit)
RateLimitOrBuilder {
private static final long serialVersionUID = 0L;
// Use RateLimit.newBuilder() to construct.
private RateLimit(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private RateLimit() {
disableKey_ = "";
actions_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new RateLimit();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private RateLimit(
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: {
com.google.protobuf.UInt32Value.Builder subBuilder = null;
if (stage_ != null) {
subBuilder = stage_.toBuilder();
}
stage_ = input.readMessage(com.google.protobuf.UInt32Value.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(stage_);
stage_ = subBuilder.buildPartial();
}
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
disableKey_ = s;
break;
}
case 26: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
actions_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
actions_.add(
input.readMessage(io.envoyproxy.envoy.config.route.v3.RateLimit.Action.parser(), extensionRegistry));
break;
}
case 34: {
io.envoyproxy.envoy.config.route.v3.RateLimit.Override.Builder subBuilder = null;
if (limit_ != null) {
subBuilder = limit_.toBuilder();
}
limit_ = input.readMessage(io.envoyproxy.envoy.config.route.v3.RateLimit.Override.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(limit_);
limit_ = subBuilder.buildPartial();
}
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
actions_ = java.util.Collections.unmodifiableList(actions_);
}
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_RateLimit_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_RateLimit_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.route.v3.RateLimit.class, io.envoyproxy.envoy.config.route.v3.RateLimit.Builder.class);
}
public interface ActionOrBuilder extends
// @@protoc_insertion_point(interface_extends:envoy.config.route.v3.RateLimit.Action)
com.google.protobuf.MessageOrBuilder {
/**
*
* Rate limit on source cluster.
*
*
* .envoy.config.route.v3.RateLimit.Action.SourceCluster source_cluster = 1;
* @return Whether the sourceCluster field is set.
*/
boolean hasSourceCluster();
/**
*
* Rate limit on dynamic metadata.
* .. attention::
* This field has been deprecated in favor of the :ref:`metadata <envoy_v3_api_field_config.route.v3.RateLimit.Action.metadata>` field
*
*
* .envoy.config.route.v3.RateLimit.Action.DynamicMetaData dynamic_metadata = 7 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0", (.envoy.annotations.disallowed_by_default) = true];
* @deprecated envoy.config.route.v3.RateLimit.Action.dynamic_metadata is deprecated.
* See envoy/config/route/v3/route_components.proto;l=2120
* @return Whether the dynamicMetadata field is set.
*/
@java.lang.Deprecated boolean hasDynamicMetadata();
/**
*
* Rate limit on dynamic metadata.
* .. attention::
* This field has been deprecated in favor of the :ref:`metadata <envoy_v3_api_field_config.route.v3.RateLimit.Action.metadata>` field
*
* Rate limit on dynamic metadata.
* .. attention::
* This field has been deprecated in favor of the :ref:`metadata <envoy_v3_api_field_config.route.v3.RateLimit.Action.metadata>` field
*
* Rate limit descriptor extension. See the rate limit descriptor extensions documentation.
* :ref:`HTTP matching input functions <arch_overview_matching_api>` are
* permitted as descriptor extensions. The input functions are only
* looked up if there is no rate limit descriptor extension matching
* the type URL.
* [#extension-category: envoy.rate_limit_descriptors]
*
*
* .envoy.config.core.v3.TypedExtensionConfig extension = 9;
* @return Whether the extension field is set.
*/
boolean hasExtension();
/**
*
* Rate limit descriptor extension. See the rate limit descriptor extensions documentation.
* :ref:`HTTP matching input functions <arch_overview_matching_api>` are
* permitted as descriptor extensions. The input functions are only
* looked up if there is no rate limit descriptor extension matching
* the type URL.
* [#extension-category: envoy.rate_limit_descriptors]
*
* Rate limit descriptor extension. See the rate limit descriptor extensions documentation.
* :ref:`HTTP matching input functions <arch_overview_matching_api>` are
* permitted as descriptor extensions. The input functions are only
* looked up if there is no rate limit descriptor extension matching
* the type URL.
* [#extension-category: envoy.rate_limit_descriptors]
*
* The following descriptor entry is appended to the descriptor:
* .. code-block:: cpp
* ("source_cluster", "<local service cluster>")
* <local service cluster> is derived from the :option:`--service-cluster` option.
*
*
* Protobuf type {@code envoy.config.route.v3.RateLimit.Action.SourceCluster}
*/
public static final class SourceCluster extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.config.route.v3.RateLimit.Action.SourceCluster)
SourceClusterOrBuilder {
private static final long serialVersionUID = 0L;
// Use SourceCluster.newBuilder() to construct.
private SourceCluster(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private SourceCluster() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new SourceCluster();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private SourceCluster(
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;
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RateLimit_Action_SourceCluster_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_RateLimit_Action_SourceCluster_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.route.v3.RateLimit.Action.SourceCluster.class, io.envoyproxy.envoy.config.route.v3.RateLimit.Action.SourceCluster.Builder.class);
}
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 {
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
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.RateLimit.Action.SourceCluster)) {
return super.equals(obj);
}
io.envoyproxy.envoy.config.route.v3.RateLimit.Action.SourceCluster other = (io.envoyproxy.envoy.config.route.v3.RateLimit.Action.SourceCluster) obj;
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 = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.config.route.v3.RateLimit.Action.SourceCluster parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RateLimit.Action.SourceCluster 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.RateLimit.Action.SourceCluster parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RateLimit.Action.SourceCluster 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.RateLimit.Action.SourceCluster parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RateLimit.Action.SourceCluster 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.RateLimit.Action.SourceCluster 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.RateLimit.Action.SourceCluster 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.RateLimit.Action.SourceCluster 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.RateLimit.Action.SourceCluster 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.RateLimit.Action.SourceCluster 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.RateLimit.Action.SourceCluster 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.RateLimit.Action.SourceCluster 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 following descriptor entry is appended to the descriptor:
* .. code-block:: cpp
* ("source_cluster", "<local service cluster>")
* <local service cluster> is derived from the :option:`--service-cluster` option.
*
*
* Protobuf type {@code envoy.config.route.v3.RateLimit.Action.SourceCluster}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.config.route.v3.RateLimit.Action.SourceCluster)
io.envoyproxy.envoy.config.route.v3.RateLimit.Action.SourceClusterOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RateLimit_Action_SourceCluster_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_RateLimit_Action_SourceCluster_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.route.v3.RateLimit.Action.SourceCluster.class, io.envoyproxy.envoy.config.route.v3.RateLimit.Action.SourceCluster.Builder.class);
}
// Construct using io.envoyproxy.envoy.config.route.v3.RateLimit.Action.SourceCluster.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();
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_RateLimit_Action_SourceCluster_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RateLimit.Action.SourceCluster getDefaultInstanceForType() {
return io.envoyproxy.envoy.config.route.v3.RateLimit.Action.SourceCluster.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RateLimit.Action.SourceCluster build() {
io.envoyproxy.envoy.config.route.v3.RateLimit.Action.SourceCluster result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RateLimit.Action.SourceCluster buildPartial() {
io.envoyproxy.envoy.config.route.v3.RateLimit.Action.SourceCluster result = new io.envoyproxy.envoy.config.route.v3.RateLimit.Action.SourceCluster(this);
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.RateLimit.Action.SourceCluster) {
return mergeFrom((io.envoyproxy.envoy.config.route.v3.RateLimit.Action.SourceCluster)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.config.route.v3.RateLimit.Action.SourceCluster other) {
if (other == io.envoyproxy.envoy.config.route.v3.RateLimit.Action.SourceCluster.getDefaultInstance()) return this;
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.RateLimit.Action.SourceCluster parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.config.route.v3.RateLimit.Action.SourceCluster) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
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.RateLimit.Action.SourceCluster)
}
// @@protoc_insertion_point(class_scope:envoy.config.route.v3.RateLimit.Action.SourceCluster)
private static final io.envoyproxy.envoy.config.route.v3.RateLimit.Action.SourceCluster DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.config.route.v3.RateLimit.Action.SourceCluster();
}
public static io.envoyproxy.envoy.config.route.v3.RateLimit.Action.SourceCluster getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public SourceCluster parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new SourceCluster(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.RateLimit.Action.SourceCluster getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface DestinationClusterOrBuilder extends
// @@protoc_insertion_point(interface_extends:envoy.config.route.v3.RateLimit.Action.DestinationCluster)
com.google.protobuf.MessageOrBuilder {
}
/**
*
* The following descriptor entry is appended to the descriptor:
* .. code-block:: cpp
* ("destination_cluster", "<routed target cluster>")
* Once a request matches against a route table rule, a routed cluster is determined by one of
* the following :ref:`route table configuration <envoy_v3_api_msg_config.route.v3.RouteConfiguration>`
* settings:
* * :ref:`cluster <envoy_v3_api_field_config.route.v3.RouteAction.cluster>` indicates the upstream cluster
* to route to.
* * :ref:`weighted_clusters <envoy_v3_api_field_config.route.v3.RouteAction.weighted_clusters>`
* chooses a cluster randomly from a set of clusters with attributed weight.
* * :ref:`cluster_header <envoy_v3_api_field_config.route.v3.RouteAction.cluster_header>` indicates which
* header in the request contains the target cluster.
*
*
* Protobuf type {@code envoy.config.route.v3.RateLimit.Action.DestinationCluster}
*/
public static final class DestinationCluster extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.config.route.v3.RateLimit.Action.DestinationCluster)
DestinationClusterOrBuilder {
private static final long serialVersionUID = 0L;
// Use DestinationCluster.newBuilder() to construct.
private DestinationCluster(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private DestinationCluster() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new DestinationCluster();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private DestinationCluster(
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;
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RateLimit_Action_DestinationCluster_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_RateLimit_Action_DestinationCluster_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.route.v3.RateLimit.Action.DestinationCluster.class, io.envoyproxy.envoy.config.route.v3.RateLimit.Action.DestinationCluster.Builder.class);
}
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 {
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
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.RateLimit.Action.DestinationCluster)) {
return super.equals(obj);
}
io.envoyproxy.envoy.config.route.v3.RateLimit.Action.DestinationCluster other = (io.envoyproxy.envoy.config.route.v3.RateLimit.Action.DestinationCluster) obj;
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 = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.config.route.v3.RateLimit.Action.DestinationCluster parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RateLimit.Action.DestinationCluster 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.RateLimit.Action.DestinationCluster parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RateLimit.Action.DestinationCluster 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.RateLimit.Action.DestinationCluster parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RateLimit.Action.DestinationCluster 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.RateLimit.Action.DestinationCluster 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.RateLimit.Action.DestinationCluster 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.RateLimit.Action.DestinationCluster 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.RateLimit.Action.DestinationCluster 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.RateLimit.Action.DestinationCluster 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.RateLimit.Action.DestinationCluster 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.RateLimit.Action.DestinationCluster 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 following descriptor entry is appended to the descriptor:
* .. code-block:: cpp
* ("destination_cluster", "<routed target cluster>")
* Once a request matches against a route table rule, a routed cluster is determined by one of
* the following :ref:`route table configuration <envoy_v3_api_msg_config.route.v3.RouteConfiguration>`
* settings:
* * :ref:`cluster <envoy_v3_api_field_config.route.v3.RouteAction.cluster>` indicates the upstream cluster
* to route to.
* * :ref:`weighted_clusters <envoy_v3_api_field_config.route.v3.RouteAction.weighted_clusters>`
* chooses a cluster randomly from a set of clusters with attributed weight.
* * :ref:`cluster_header <envoy_v3_api_field_config.route.v3.RouteAction.cluster_header>` indicates which
* header in the request contains the target cluster.
*
*
* Protobuf type {@code envoy.config.route.v3.RateLimit.Action.DestinationCluster}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.config.route.v3.RateLimit.Action.DestinationCluster)
io.envoyproxy.envoy.config.route.v3.RateLimit.Action.DestinationClusterOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RateLimit_Action_DestinationCluster_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_RateLimit_Action_DestinationCluster_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.route.v3.RateLimit.Action.DestinationCluster.class, io.envoyproxy.envoy.config.route.v3.RateLimit.Action.DestinationCluster.Builder.class);
}
// Construct using io.envoyproxy.envoy.config.route.v3.RateLimit.Action.DestinationCluster.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();
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_RateLimit_Action_DestinationCluster_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RateLimit.Action.DestinationCluster getDefaultInstanceForType() {
return io.envoyproxy.envoy.config.route.v3.RateLimit.Action.DestinationCluster.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RateLimit.Action.DestinationCluster build() {
io.envoyproxy.envoy.config.route.v3.RateLimit.Action.DestinationCluster result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RateLimit.Action.DestinationCluster buildPartial() {
io.envoyproxy.envoy.config.route.v3.RateLimit.Action.DestinationCluster result = new io.envoyproxy.envoy.config.route.v3.RateLimit.Action.DestinationCluster(this);
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.RateLimit.Action.DestinationCluster) {
return mergeFrom((io.envoyproxy.envoy.config.route.v3.RateLimit.Action.DestinationCluster)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.config.route.v3.RateLimit.Action.DestinationCluster other) {
if (other == io.envoyproxy.envoy.config.route.v3.RateLimit.Action.DestinationCluster.getDefaultInstance()) return this;
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.RateLimit.Action.DestinationCluster parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.config.route.v3.RateLimit.Action.DestinationCluster) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
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.RateLimit.Action.DestinationCluster)
}
// @@protoc_insertion_point(class_scope:envoy.config.route.v3.RateLimit.Action.DestinationCluster)
private static final io.envoyproxy.envoy.config.route.v3.RateLimit.Action.DestinationCluster DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.config.route.v3.RateLimit.Action.DestinationCluster();
}
public static io.envoyproxy.envoy.config.route.v3.RateLimit.Action.DestinationCluster getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public DestinationCluster parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new DestinationCluster(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.RateLimit.Action.DestinationCluster getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface RequestHeadersOrBuilder extends
// @@protoc_insertion_point(interface_extends:envoy.config.route.v3.RateLimit.Action.RequestHeaders)
com.google.protobuf.MessageOrBuilder {
/**
*
* The header name to be queried from the request headers. The header’s
* value is used to populate the value of the descriptor entry for the
* descriptor_key.
*
* The header name to be queried from the request headers. The header’s
* value is used to populate the value of the descriptor entry for the
* descriptor_key.
*
* If set to true, Envoy skips the descriptor while calling rate limiting service
* when header is not present in the request. By default it skips calling the
* rate limiting service if this header is not present in the request.
*
* The following descriptor entry is appended when a header contains a key that matches the
* ``header_name``:
* .. code-block:: cpp
* ("<descriptor_key>", "<header_value_queried_from_header>")
*
*
* Protobuf type {@code envoy.config.route.v3.RateLimit.Action.RequestHeaders}
*/
public static final class RequestHeaders extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.config.route.v3.RateLimit.Action.RequestHeaders)
RequestHeadersOrBuilder {
private static final long serialVersionUID = 0L;
// Use RequestHeaders.newBuilder() to construct.
private RequestHeaders(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private RequestHeaders() {
headerName_ = "";
descriptorKey_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new RequestHeaders();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private RequestHeaders(
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;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
descriptorKey_ = s;
break;
}
case 24: {
skipIfAbsent_ = input.readBool();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RateLimit_Action_RequestHeaders_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_RateLimit_Action_RequestHeaders_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.route.v3.RateLimit.Action.RequestHeaders.class, io.envoyproxy.envoy.config.route.v3.RateLimit.Action.RequestHeaders.Builder.class);
}
public static final int HEADER_NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object headerName_;
/**
*
* The header name to be queried from the request headers. The header’s
* value is used to populate the value of the descriptor entry for the
* descriptor_key.
*
* The header name to be queried from the request headers. The header’s
* value is used to populate the value of the descriptor entry for the
* descriptor_key.
*
*
* string header_name = 1 [(.validate.rules) = { ... }
* @return The bytes for headerName.
*/
@java.lang.Override
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;
}
}
public static final int DESCRIPTOR_KEY_FIELD_NUMBER = 2;
private volatile java.lang.Object descriptorKey_;
/**
*
*
* string descriptor_key = 2 [(.validate.rules) = { ... }
* @return The bytes for descriptorKey.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getDescriptorKeyBytes() {
java.lang.Object ref = descriptorKey_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
descriptorKey_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int SKIP_IF_ABSENT_FIELD_NUMBER = 3;
private boolean skipIfAbsent_;
/**
*
* If set to true, Envoy skips the descriptor while calling rate limiting service
* when header is not present in the request. By default it skips calling the
* rate limiting service if this header is not present in the request.
*
* The following descriptor entry is appended when a header contains a key that matches the
* ``header_name``:
* .. code-block:: cpp
* ("<descriptor_key>", "<header_value_queried_from_header>")
*
*
* Protobuf type {@code envoy.config.route.v3.RateLimit.Action.RequestHeaders}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.config.route.v3.RateLimit.Action.RequestHeaders)
io.envoyproxy.envoy.config.route.v3.RateLimit.Action.RequestHeadersOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RateLimit_Action_RequestHeaders_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_RateLimit_Action_RequestHeaders_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.route.v3.RateLimit.Action.RequestHeaders.class, io.envoyproxy.envoy.config.route.v3.RateLimit.Action.RequestHeaders.Builder.class);
}
// Construct using io.envoyproxy.envoy.config.route.v3.RateLimit.Action.RequestHeaders.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_ = "";
descriptorKey_ = "";
skipIfAbsent_ = 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_RateLimit_Action_RequestHeaders_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RateLimit.Action.RequestHeaders getDefaultInstanceForType() {
return io.envoyproxy.envoy.config.route.v3.RateLimit.Action.RequestHeaders.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RateLimit.Action.RequestHeaders build() {
io.envoyproxy.envoy.config.route.v3.RateLimit.Action.RequestHeaders result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RateLimit.Action.RequestHeaders buildPartial() {
io.envoyproxy.envoy.config.route.v3.RateLimit.Action.RequestHeaders result = new io.envoyproxy.envoy.config.route.v3.RateLimit.Action.RequestHeaders(this);
result.headerName_ = headerName_;
result.descriptorKey_ = descriptorKey_;
result.skipIfAbsent_ = skipIfAbsent_;
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.RateLimit.Action.RequestHeaders) {
return mergeFrom((io.envoyproxy.envoy.config.route.v3.RateLimit.Action.RequestHeaders)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.config.route.v3.RateLimit.Action.RequestHeaders other) {
if (other == io.envoyproxy.envoy.config.route.v3.RateLimit.Action.RequestHeaders.getDefaultInstance()) return this;
if (!other.getHeaderName().isEmpty()) {
headerName_ = other.headerName_;
onChanged();
}
if (!other.getDescriptorKey().isEmpty()) {
descriptorKey_ = other.descriptorKey_;
onChanged();
}
if (other.getSkipIfAbsent() != false) {
setSkipIfAbsent(other.getSkipIfAbsent());
}
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.RateLimit.Action.RequestHeaders parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.config.route.v3.RateLimit.Action.RequestHeaders) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object headerName_ = "";
/**
*
* The header name to be queried from the request headers. The header’s
* value is used to populate the value of the descriptor entry for the
* descriptor_key.
*
* The header name to be queried from the request headers. The header’s
* value is used to populate the value of the descriptor entry for the
* descriptor_key.
*
* The header name to be queried from the request headers. The header’s
* value is used to populate the value of the descriptor entry for the
* descriptor_key.
*
*
* string header_name = 1 [(.validate.rules) = { ... }
* @param value The headerName to set.
* @return This builder for chaining.
*/
public Builder setHeaderName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
headerName_ = value;
onChanged();
return this;
}
/**
*
* The header name to be queried from the request headers. The header’s
* value is used to populate the value of the descriptor entry for the
* descriptor_key.
*
* The header name to be queried from the request headers. The header’s
* value is used to populate the value of the descriptor entry for the
* descriptor_key.
*
*
* string header_name = 1 [(.validate.rules) = { ... }
* @param value The bytes for headerName to set.
* @return This builder for chaining.
*/
public Builder setHeaderNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
headerName_ = value;
onChanged();
return this;
}
private java.lang.Object descriptorKey_ = "";
/**
*
*
* string descriptor_key = 2 [(.validate.rules) = { ... }
* @param value The bytes for descriptorKey to set.
* @return This builder for chaining.
*/
public Builder setDescriptorKeyBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
descriptorKey_ = value;
onChanged();
return this;
}
private boolean skipIfAbsent_ ;
/**
*
* If set to true, Envoy skips the descriptor while calling rate limiting service
* when header is not present in the request. By default it skips calling the
* rate limiting service if this header is not present in the request.
*
* If set to true, Envoy skips the descriptor while calling rate limiting service
* when header is not present in the request. By default it skips calling the
* rate limiting service if this header is not present in the request.
*
*
* bool skip_if_absent = 3;
* @param value The skipIfAbsent to set.
* @return This builder for chaining.
*/
public Builder setSkipIfAbsent(boolean value) {
skipIfAbsent_ = value;
onChanged();
return this;
}
/**
*
* If set to true, Envoy skips the descriptor while calling rate limiting service
* when header is not present in the request. By default it skips calling the
* rate limiting service if this header is not present in the request.
*
*
* bool skip_if_absent = 3;
* @return This builder for chaining.
*/
public Builder clearSkipIfAbsent() {
skipIfAbsent_ = 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.RateLimit.Action.RequestHeaders)
}
// @@protoc_insertion_point(class_scope:envoy.config.route.v3.RateLimit.Action.RequestHeaders)
private static final io.envoyproxy.envoy.config.route.v3.RateLimit.Action.RequestHeaders DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.config.route.v3.RateLimit.Action.RequestHeaders();
}
public static io.envoyproxy.envoy.config.route.v3.RateLimit.Action.RequestHeaders getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public RequestHeaders parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new RequestHeaders(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.RateLimit.Action.RequestHeaders getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface RemoteAddressOrBuilder extends
// @@protoc_insertion_point(interface_extends:envoy.config.route.v3.RateLimit.Action.RemoteAddress)
com.google.protobuf.MessageOrBuilder {
}
/**
*
* The following descriptor entry is appended to the descriptor and is populated using the
* trusted address from :ref:`x-forwarded-for <config_http_conn_man_headers_x-forwarded-for>`:
* .. code-block:: cpp
* ("remote_address", "<trusted address from x-forwarded-for>")
*
*
* Protobuf type {@code envoy.config.route.v3.RateLimit.Action.RemoteAddress}
*/
public static final class RemoteAddress extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.config.route.v3.RateLimit.Action.RemoteAddress)
RemoteAddressOrBuilder {
private static final long serialVersionUID = 0L;
// Use RemoteAddress.newBuilder() to construct.
private RemoteAddress(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private RemoteAddress() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new RemoteAddress();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private RemoteAddress(
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;
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RateLimit_Action_RemoteAddress_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_RateLimit_Action_RemoteAddress_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.route.v3.RateLimit.Action.RemoteAddress.class, io.envoyproxy.envoy.config.route.v3.RateLimit.Action.RemoteAddress.Builder.class);
}
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 {
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
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.RateLimit.Action.RemoteAddress)) {
return super.equals(obj);
}
io.envoyproxy.envoy.config.route.v3.RateLimit.Action.RemoteAddress other = (io.envoyproxy.envoy.config.route.v3.RateLimit.Action.RemoteAddress) obj;
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 = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.config.route.v3.RateLimit.Action.RemoteAddress parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RateLimit.Action.RemoteAddress 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.RateLimit.Action.RemoteAddress parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RateLimit.Action.RemoteAddress 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.RateLimit.Action.RemoteAddress parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RateLimit.Action.RemoteAddress 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.RateLimit.Action.RemoteAddress 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.RateLimit.Action.RemoteAddress 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.RateLimit.Action.RemoteAddress 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.RateLimit.Action.RemoteAddress 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.RateLimit.Action.RemoteAddress 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.RateLimit.Action.RemoteAddress 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.RateLimit.Action.RemoteAddress 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 following descriptor entry is appended to the descriptor and is populated using the
* trusted address from :ref:`x-forwarded-for <config_http_conn_man_headers_x-forwarded-for>`:
* .. code-block:: cpp
* ("remote_address", "<trusted address from x-forwarded-for>")
*
*
* Protobuf type {@code envoy.config.route.v3.RateLimit.Action.RemoteAddress}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.config.route.v3.RateLimit.Action.RemoteAddress)
io.envoyproxy.envoy.config.route.v3.RateLimit.Action.RemoteAddressOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RateLimit_Action_RemoteAddress_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_RateLimit_Action_RemoteAddress_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.route.v3.RateLimit.Action.RemoteAddress.class, io.envoyproxy.envoy.config.route.v3.RateLimit.Action.RemoteAddress.Builder.class);
}
// Construct using io.envoyproxy.envoy.config.route.v3.RateLimit.Action.RemoteAddress.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();
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_RateLimit_Action_RemoteAddress_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RateLimit.Action.RemoteAddress getDefaultInstanceForType() {
return io.envoyproxy.envoy.config.route.v3.RateLimit.Action.RemoteAddress.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RateLimit.Action.RemoteAddress build() {
io.envoyproxy.envoy.config.route.v3.RateLimit.Action.RemoteAddress result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RateLimit.Action.RemoteAddress buildPartial() {
io.envoyproxy.envoy.config.route.v3.RateLimit.Action.RemoteAddress result = new io.envoyproxy.envoy.config.route.v3.RateLimit.Action.RemoteAddress(this);
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.RateLimit.Action.RemoteAddress) {
return mergeFrom((io.envoyproxy.envoy.config.route.v3.RateLimit.Action.RemoteAddress)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.config.route.v3.RateLimit.Action.RemoteAddress other) {
if (other == io.envoyproxy.envoy.config.route.v3.RateLimit.Action.RemoteAddress.getDefaultInstance()) return this;
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.RateLimit.Action.RemoteAddress parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.config.route.v3.RateLimit.Action.RemoteAddress) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
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.RateLimit.Action.RemoteAddress)
}
// @@protoc_insertion_point(class_scope:envoy.config.route.v3.RateLimit.Action.RemoteAddress)
private static final io.envoyproxy.envoy.config.route.v3.RateLimit.Action.RemoteAddress DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.config.route.v3.RateLimit.Action.RemoteAddress();
}
public static io.envoyproxy.envoy.config.route.v3.RateLimit.Action.RemoteAddress getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public RemoteAddress parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new RemoteAddress(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.RateLimit.Action.RemoteAddress getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface MaskedRemoteAddressOrBuilder extends
// @@protoc_insertion_point(interface_extends:envoy.config.route.v3.RateLimit.Action.MaskedRemoteAddress)
com.google.protobuf.MessageOrBuilder {
/**
*
* Length of prefix mask len for IPv4 (e.g. 0, 32).
* Defaults to 32 when unset.
* For example, trusted address from x-forwarded-for is ``192.168.1.1``,
* the descriptor entry is ("masked_remote_address", "192.168.1.1/32");
* if mask len is 24, the descriptor entry is ("masked_remote_address", "192.168.1.0/24").
*
*
* .google.protobuf.UInt32Value v4_prefix_mask_len = 1 [(.validate.rules) = { ... }
* @return Whether the v4PrefixMaskLen field is set.
*/
boolean hasV4PrefixMaskLen();
/**
*
* Length of prefix mask len for IPv4 (e.g. 0, 32).
* Defaults to 32 when unset.
* For example, trusted address from x-forwarded-for is ``192.168.1.1``,
* the descriptor entry is ("masked_remote_address", "192.168.1.1/32");
* if mask len is 24, the descriptor entry is ("masked_remote_address", "192.168.1.0/24").
*
* Length of prefix mask len for IPv4 (e.g. 0, 32).
* Defaults to 32 when unset.
* For example, trusted address from x-forwarded-for is ``192.168.1.1``,
* the descriptor entry is ("masked_remote_address", "192.168.1.1/32");
* if mask len is 24, the descriptor entry is ("masked_remote_address", "192.168.1.0/24").
*
* Length of prefix mask len for IPv6 (e.g. 0, 128).
* Defaults to 128 when unset.
* For example, trusted address from x-forwarded-for is ``2001:abcd:ef01:2345:6789:abcd:ef01:234``,
* the descriptor entry is ("masked_remote_address", "2001:abcd:ef01:2345:6789:abcd:ef01:234/128");
* if mask len is 64, the descriptor entry is ("masked_remote_address", "2001:abcd:ef01:2345::/64").
*
*
* .google.protobuf.UInt32Value v6_prefix_mask_len = 2 [(.validate.rules) = { ... }
* @return Whether the v6PrefixMaskLen field is set.
*/
boolean hasV6PrefixMaskLen();
/**
*
* Length of prefix mask len for IPv6 (e.g. 0, 128).
* Defaults to 128 when unset.
* For example, trusted address from x-forwarded-for is ``2001:abcd:ef01:2345:6789:abcd:ef01:234``,
* the descriptor entry is ("masked_remote_address", "2001:abcd:ef01:2345:6789:abcd:ef01:234/128");
* if mask len is 64, the descriptor entry is ("masked_remote_address", "2001:abcd:ef01:2345::/64").
*
* Length of prefix mask len for IPv6 (e.g. 0, 128).
* Defaults to 128 when unset.
* For example, trusted address from x-forwarded-for is ``2001:abcd:ef01:2345:6789:abcd:ef01:234``,
* the descriptor entry is ("masked_remote_address", "2001:abcd:ef01:2345:6789:abcd:ef01:234/128");
* if mask len is 64, the descriptor entry is ("masked_remote_address", "2001:abcd:ef01:2345::/64").
*
* The following descriptor entry is appended to the descriptor and is populated using the
* masked address from :ref:`x-forwarded-for <config_http_conn_man_headers_x-forwarded-for>`:
* .. code-block:: cpp
* ("masked_remote_address", "<masked address from x-forwarded-for>")
*
*
* Protobuf type {@code envoy.config.route.v3.RateLimit.Action.MaskedRemoteAddress}
*/
public static final class MaskedRemoteAddress extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.config.route.v3.RateLimit.Action.MaskedRemoteAddress)
MaskedRemoteAddressOrBuilder {
private static final long serialVersionUID = 0L;
// Use MaskedRemoteAddress.newBuilder() to construct.
private MaskedRemoteAddress(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private MaskedRemoteAddress() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new MaskedRemoteAddress();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private MaskedRemoteAddress(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
com.google.protobuf.UInt32Value.Builder subBuilder = null;
if (v4PrefixMaskLen_ != null) {
subBuilder = v4PrefixMaskLen_.toBuilder();
}
v4PrefixMaskLen_ = input.readMessage(com.google.protobuf.UInt32Value.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(v4PrefixMaskLen_);
v4PrefixMaskLen_ = subBuilder.buildPartial();
}
break;
}
case 18: {
com.google.protobuf.UInt32Value.Builder subBuilder = null;
if (v6PrefixMaskLen_ != null) {
subBuilder = v6PrefixMaskLen_.toBuilder();
}
v6PrefixMaskLen_ = input.readMessage(com.google.protobuf.UInt32Value.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(v6PrefixMaskLen_);
v6PrefixMaskLen_ = subBuilder.buildPartial();
}
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RateLimit_Action_MaskedRemoteAddress_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_RateLimit_Action_MaskedRemoteAddress_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.route.v3.RateLimit.Action.MaskedRemoteAddress.class, io.envoyproxy.envoy.config.route.v3.RateLimit.Action.MaskedRemoteAddress.Builder.class);
}
public static final int V4_PREFIX_MASK_LEN_FIELD_NUMBER = 1;
private com.google.protobuf.UInt32Value v4PrefixMaskLen_;
/**
*
* Length of prefix mask len for IPv4 (e.g. 0, 32).
* Defaults to 32 when unset.
* For example, trusted address from x-forwarded-for is ``192.168.1.1``,
* the descriptor entry is ("masked_remote_address", "192.168.1.1/32");
* if mask len is 24, the descriptor entry is ("masked_remote_address", "192.168.1.0/24").
*
*
* .google.protobuf.UInt32Value v4_prefix_mask_len = 1 [(.validate.rules) = { ... }
* @return Whether the v4PrefixMaskLen field is set.
*/
@java.lang.Override
public boolean hasV4PrefixMaskLen() {
return v4PrefixMaskLen_ != null;
}
/**
*
* Length of prefix mask len for IPv4 (e.g. 0, 32).
* Defaults to 32 when unset.
* For example, trusted address from x-forwarded-for is ``192.168.1.1``,
* the descriptor entry is ("masked_remote_address", "192.168.1.1/32");
* if mask len is 24, the descriptor entry is ("masked_remote_address", "192.168.1.0/24").
*
* Length of prefix mask len for IPv4 (e.g. 0, 32).
* Defaults to 32 when unset.
* For example, trusted address from x-forwarded-for is ``192.168.1.1``,
* the descriptor entry is ("masked_remote_address", "192.168.1.1/32");
* if mask len is 24, the descriptor entry is ("masked_remote_address", "192.168.1.0/24").
*
*
* .google.protobuf.UInt32Value v4_prefix_mask_len = 1 [(.validate.rules) = { ... }
*/
@java.lang.Override
public com.google.protobuf.UInt32ValueOrBuilder getV4PrefixMaskLenOrBuilder() {
return getV4PrefixMaskLen();
}
public static final int V6_PREFIX_MASK_LEN_FIELD_NUMBER = 2;
private com.google.protobuf.UInt32Value v6PrefixMaskLen_;
/**
*
* Length of prefix mask len for IPv6 (e.g. 0, 128).
* Defaults to 128 when unset.
* For example, trusted address from x-forwarded-for is ``2001:abcd:ef01:2345:6789:abcd:ef01:234``,
* the descriptor entry is ("masked_remote_address", "2001:abcd:ef01:2345:6789:abcd:ef01:234/128");
* if mask len is 64, the descriptor entry is ("masked_remote_address", "2001:abcd:ef01:2345::/64").
*
*
* .google.protobuf.UInt32Value v6_prefix_mask_len = 2 [(.validate.rules) = { ... }
* @return Whether the v6PrefixMaskLen field is set.
*/
@java.lang.Override
public boolean hasV6PrefixMaskLen() {
return v6PrefixMaskLen_ != null;
}
/**
*
* Length of prefix mask len for IPv6 (e.g. 0, 128).
* Defaults to 128 when unset.
* For example, trusted address from x-forwarded-for is ``2001:abcd:ef01:2345:6789:abcd:ef01:234``,
* the descriptor entry is ("masked_remote_address", "2001:abcd:ef01:2345:6789:abcd:ef01:234/128");
* if mask len is 64, the descriptor entry is ("masked_remote_address", "2001:abcd:ef01:2345::/64").
*
* Length of prefix mask len for IPv6 (e.g. 0, 128).
* Defaults to 128 when unset.
* For example, trusted address from x-forwarded-for is ``2001:abcd:ef01:2345:6789:abcd:ef01:234``,
* the descriptor entry is ("masked_remote_address", "2001:abcd:ef01:2345:6789:abcd:ef01:234/128");
* if mask len is 64, the descriptor entry is ("masked_remote_address", "2001:abcd:ef01:2345::/64").
*
*
* .google.protobuf.UInt32Value v6_prefix_mask_len = 2 [(.validate.rules) = { ... }
*/
@java.lang.Override
public com.google.protobuf.UInt32ValueOrBuilder getV6PrefixMaskLenOrBuilder() {
return getV6PrefixMaskLen();
}
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 (v4PrefixMaskLen_ != null) {
output.writeMessage(1, getV4PrefixMaskLen());
}
if (v6PrefixMaskLen_ != null) {
output.writeMessage(2, getV6PrefixMaskLen());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (v4PrefixMaskLen_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getV4PrefixMaskLen());
}
if (v6PrefixMaskLen_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getV6PrefixMaskLen());
}
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.RateLimit.Action.MaskedRemoteAddress)) {
return super.equals(obj);
}
io.envoyproxy.envoy.config.route.v3.RateLimit.Action.MaskedRemoteAddress other = (io.envoyproxy.envoy.config.route.v3.RateLimit.Action.MaskedRemoteAddress) obj;
if (hasV4PrefixMaskLen() != other.hasV4PrefixMaskLen()) return false;
if (hasV4PrefixMaskLen()) {
if (!getV4PrefixMaskLen()
.equals(other.getV4PrefixMaskLen())) return false;
}
if (hasV6PrefixMaskLen() != other.hasV6PrefixMaskLen()) return false;
if (hasV6PrefixMaskLen()) {
if (!getV6PrefixMaskLen()
.equals(other.getV6PrefixMaskLen())) return false;
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasV4PrefixMaskLen()) {
hash = (37 * hash) + V4_PREFIX_MASK_LEN_FIELD_NUMBER;
hash = (53 * hash) + getV4PrefixMaskLen().hashCode();
}
if (hasV6PrefixMaskLen()) {
hash = (37 * hash) + V6_PREFIX_MASK_LEN_FIELD_NUMBER;
hash = (53 * hash) + getV6PrefixMaskLen().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.config.route.v3.RateLimit.Action.MaskedRemoteAddress parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RateLimit.Action.MaskedRemoteAddress 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.RateLimit.Action.MaskedRemoteAddress parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RateLimit.Action.MaskedRemoteAddress 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.RateLimit.Action.MaskedRemoteAddress parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RateLimit.Action.MaskedRemoteAddress 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.RateLimit.Action.MaskedRemoteAddress 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.RateLimit.Action.MaskedRemoteAddress 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.RateLimit.Action.MaskedRemoteAddress 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.RateLimit.Action.MaskedRemoteAddress 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.RateLimit.Action.MaskedRemoteAddress 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.RateLimit.Action.MaskedRemoteAddress 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.RateLimit.Action.MaskedRemoteAddress 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 following descriptor entry is appended to the descriptor and is populated using the
* masked address from :ref:`x-forwarded-for <config_http_conn_man_headers_x-forwarded-for>`:
* .. code-block:: cpp
* ("masked_remote_address", "<masked address from x-forwarded-for>")
*
*
* Protobuf type {@code envoy.config.route.v3.RateLimit.Action.MaskedRemoteAddress}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.config.route.v3.RateLimit.Action.MaskedRemoteAddress)
io.envoyproxy.envoy.config.route.v3.RateLimit.Action.MaskedRemoteAddressOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RateLimit_Action_MaskedRemoteAddress_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_RateLimit_Action_MaskedRemoteAddress_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.route.v3.RateLimit.Action.MaskedRemoteAddress.class, io.envoyproxy.envoy.config.route.v3.RateLimit.Action.MaskedRemoteAddress.Builder.class);
}
// Construct using io.envoyproxy.envoy.config.route.v3.RateLimit.Action.MaskedRemoteAddress.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (v4PrefixMaskLenBuilder_ == null) {
v4PrefixMaskLen_ = null;
} else {
v4PrefixMaskLen_ = null;
v4PrefixMaskLenBuilder_ = null;
}
if (v6PrefixMaskLenBuilder_ == null) {
v6PrefixMaskLen_ = null;
} else {
v6PrefixMaskLen_ = null;
v6PrefixMaskLenBuilder_ = 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_RateLimit_Action_MaskedRemoteAddress_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RateLimit.Action.MaskedRemoteAddress getDefaultInstanceForType() {
return io.envoyproxy.envoy.config.route.v3.RateLimit.Action.MaskedRemoteAddress.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RateLimit.Action.MaskedRemoteAddress build() {
io.envoyproxy.envoy.config.route.v3.RateLimit.Action.MaskedRemoteAddress result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RateLimit.Action.MaskedRemoteAddress buildPartial() {
io.envoyproxy.envoy.config.route.v3.RateLimit.Action.MaskedRemoteAddress result = new io.envoyproxy.envoy.config.route.v3.RateLimit.Action.MaskedRemoteAddress(this);
if (v4PrefixMaskLenBuilder_ == null) {
result.v4PrefixMaskLen_ = v4PrefixMaskLen_;
} else {
result.v4PrefixMaskLen_ = v4PrefixMaskLenBuilder_.build();
}
if (v6PrefixMaskLenBuilder_ == null) {
result.v6PrefixMaskLen_ = v6PrefixMaskLen_;
} else {
result.v6PrefixMaskLen_ = v6PrefixMaskLenBuilder_.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.RateLimit.Action.MaskedRemoteAddress) {
return mergeFrom((io.envoyproxy.envoy.config.route.v3.RateLimit.Action.MaskedRemoteAddress)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.config.route.v3.RateLimit.Action.MaskedRemoteAddress other) {
if (other == io.envoyproxy.envoy.config.route.v3.RateLimit.Action.MaskedRemoteAddress.getDefaultInstance()) return this;
if (other.hasV4PrefixMaskLen()) {
mergeV4PrefixMaskLen(other.getV4PrefixMaskLen());
}
if (other.hasV6PrefixMaskLen()) {
mergeV6PrefixMaskLen(other.getV6PrefixMaskLen());
}
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.RateLimit.Action.MaskedRemoteAddress parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.config.route.v3.RateLimit.Action.MaskedRemoteAddress) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private com.google.protobuf.UInt32Value v4PrefixMaskLen_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> v4PrefixMaskLenBuilder_;
/**
*
* Length of prefix mask len for IPv4 (e.g. 0, 32).
* Defaults to 32 when unset.
* For example, trusted address from x-forwarded-for is ``192.168.1.1``,
* the descriptor entry is ("masked_remote_address", "192.168.1.1/32");
* if mask len is 24, the descriptor entry is ("masked_remote_address", "192.168.1.0/24").
*
*
* .google.protobuf.UInt32Value v4_prefix_mask_len = 1 [(.validate.rules) = { ... }
* @return Whether the v4PrefixMaskLen field is set.
*/
public boolean hasV4PrefixMaskLen() {
return v4PrefixMaskLenBuilder_ != null || v4PrefixMaskLen_ != null;
}
/**
*
* Length of prefix mask len for IPv4 (e.g. 0, 32).
* Defaults to 32 when unset.
* For example, trusted address from x-forwarded-for is ``192.168.1.1``,
* the descriptor entry is ("masked_remote_address", "192.168.1.1/32");
* if mask len is 24, the descriptor entry is ("masked_remote_address", "192.168.1.0/24").
*
* Length of prefix mask len for IPv4 (e.g. 0, 32).
* Defaults to 32 when unset.
* For example, trusted address from x-forwarded-for is ``192.168.1.1``,
* the descriptor entry is ("masked_remote_address", "192.168.1.1/32");
* if mask len is 24, the descriptor entry is ("masked_remote_address", "192.168.1.0/24").
*
* Length of prefix mask len for IPv4 (e.g. 0, 32).
* Defaults to 32 when unset.
* For example, trusted address from x-forwarded-for is ``192.168.1.1``,
* the descriptor entry is ("masked_remote_address", "192.168.1.1/32");
* if mask len is 24, the descriptor entry is ("masked_remote_address", "192.168.1.0/24").
*
* Length of prefix mask len for IPv4 (e.g. 0, 32).
* Defaults to 32 when unset.
* For example, trusted address from x-forwarded-for is ``192.168.1.1``,
* the descriptor entry is ("masked_remote_address", "192.168.1.1/32");
* if mask len is 24, the descriptor entry is ("masked_remote_address", "192.168.1.0/24").
*
* Length of prefix mask len for IPv4 (e.g. 0, 32).
* Defaults to 32 when unset.
* For example, trusted address from x-forwarded-for is ``192.168.1.1``,
* the descriptor entry is ("masked_remote_address", "192.168.1.1/32");
* if mask len is 24, the descriptor entry is ("masked_remote_address", "192.168.1.0/24").
*
* Length of prefix mask len for IPv4 (e.g. 0, 32).
* Defaults to 32 when unset.
* For example, trusted address from x-forwarded-for is ``192.168.1.1``,
* the descriptor entry is ("masked_remote_address", "192.168.1.1/32");
* if mask len is 24, the descriptor entry is ("masked_remote_address", "192.168.1.0/24").
*
* Length of prefix mask len for IPv4 (e.g. 0, 32).
* Defaults to 32 when unset.
* For example, trusted address from x-forwarded-for is ``192.168.1.1``,
* the descriptor entry is ("masked_remote_address", "192.168.1.1/32");
* if mask len is 24, the descriptor entry is ("masked_remote_address", "192.168.1.0/24").
*
* Length of prefix mask len for IPv4 (e.g. 0, 32).
* Defaults to 32 when unset.
* For example, trusted address from x-forwarded-for is ``192.168.1.1``,
* the descriptor entry is ("masked_remote_address", "192.168.1.1/32");
* if mask len is 24, the descriptor entry is ("masked_remote_address", "192.168.1.0/24").
*
* Length of prefix mask len for IPv6 (e.g. 0, 128).
* Defaults to 128 when unset.
* For example, trusted address from x-forwarded-for is ``2001:abcd:ef01:2345:6789:abcd:ef01:234``,
* the descriptor entry is ("masked_remote_address", "2001:abcd:ef01:2345:6789:abcd:ef01:234/128");
* if mask len is 64, the descriptor entry is ("masked_remote_address", "2001:abcd:ef01:2345::/64").
*
*
* .google.protobuf.UInt32Value v6_prefix_mask_len = 2 [(.validate.rules) = { ... }
* @return Whether the v6PrefixMaskLen field is set.
*/
public boolean hasV6PrefixMaskLen() {
return v6PrefixMaskLenBuilder_ != null || v6PrefixMaskLen_ != null;
}
/**
*
* Length of prefix mask len for IPv6 (e.g. 0, 128).
* Defaults to 128 when unset.
* For example, trusted address from x-forwarded-for is ``2001:abcd:ef01:2345:6789:abcd:ef01:234``,
* the descriptor entry is ("masked_remote_address", "2001:abcd:ef01:2345:6789:abcd:ef01:234/128");
* if mask len is 64, the descriptor entry is ("masked_remote_address", "2001:abcd:ef01:2345::/64").
*
* Length of prefix mask len for IPv6 (e.g. 0, 128).
* Defaults to 128 when unset.
* For example, trusted address from x-forwarded-for is ``2001:abcd:ef01:2345:6789:abcd:ef01:234``,
* the descriptor entry is ("masked_remote_address", "2001:abcd:ef01:2345:6789:abcd:ef01:234/128");
* if mask len is 64, the descriptor entry is ("masked_remote_address", "2001:abcd:ef01:2345::/64").
*
* Length of prefix mask len for IPv6 (e.g. 0, 128).
* Defaults to 128 when unset.
* For example, trusted address from x-forwarded-for is ``2001:abcd:ef01:2345:6789:abcd:ef01:234``,
* the descriptor entry is ("masked_remote_address", "2001:abcd:ef01:2345:6789:abcd:ef01:234/128");
* if mask len is 64, the descriptor entry is ("masked_remote_address", "2001:abcd:ef01:2345::/64").
*
* Length of prefix mask len for IPv6 (e.g. 0, 128).
* Defaults to 128 when unset.
* For example, trusted address from x-forwarded-for is ``2001:abcd:ef01:2345:6789:abcd:ef01:234``,
* the descriptor entry is ("masked_remote_address", "2001:abcd:ef01:2345:6789:abcd:ef01:234/128");
* if mask len is 64, the descriptor entry is ("masked_remote_address", "2001:abcd:ef01:2345::/64").
*
* Length of prefix mask len for IPv6 (e.g. 0, 128).
* Defaults to 128 when unset.
* For example, trusted address from x-forwarded-for is ``2001:abcd:ef01:2345:6789:abcd:ef01:234``,
* the descriptor entry is ("masked_remote_address", "2001:abcd:ef01:2345:6789:abcd:ef01:234/128");
* if mask len is 64, the descriptor entry is ("masked_remote_address", "2001:abcd:ef01:2345::/64").
*
* Length of prefix mask len for IPv6 (e.g. 0, 128).
* Defaults to 128 when unset.
* For example, trusted address from x-forwarded-for is ``2001:abcd:ef01:2345:6789:abcd:ef01:234``,
* the descriptor entry is ("masked_remote_address", "2001:abcd:ef01:2345:6789:abcd:ef01:234/128");
* if mask len is 64, the descriptor entry is ("masked_remote_address", "2001:abcd:ef01:2345::/64").
*
* Length of prefix mask len for IPv6 (e.g. 0, 128).
* Defaults to 128 when unset.
* For example, trusted address from x-forwarded-for is ``2001:abcd:ef01:2345:6789:abcd:ef01:234``,
* the descriptor entry is ("masked_remote_address", "2001:abcd:ef01:2345:6789:abcd:ef01:234/128");
* if mask len is 64, the descriptor entry is ("masked_remote_address", "2001:abcd:ef01:2345::/64").
*
* Length of prefix mask len for IPv6 (e.g. 0, 128).
* Defaults to 128 when unset.
* For example, trusted address from x-forwarded-for is ``2001:abcd:ef01:2345:6789:abcd:ef01:234``,
* the descriptor entry is ("masked_remote_address", "2001:abcd:ef01:2345:6789:abcd:ef01:234/128");
* if mask len is 64, the descriptor entry is ("masked_remote_address", "2001:abcd:ef01:2345::/64").
*
*
* .google.protobuf.UInt32Value v6_prefix_mask_len = 2 [(.validate.rules) = { ... }
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>
getV6PrefixMaskLenFieldBuilder() {
if (v6PrefixMaskLenBuilder_ == null) {
v6PrefixMaskLenBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>(
getV6PrefixMaskLen(),
getParentForChildren(),
isClean());
v6PrefixMaskLen_ = null;
}
return v6PrefixMaskLenBuilder_;
}
@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.RateLimit.Action.MaskedRemoteAddress)
}
// @@protoc_insertion_point(class_scope:envoy.config.route.v3.RateLimit.Action.MaskedRemoteAddress)
private static final io.envoyproxy.envoy.config.route.v3.RateLimit.Action.MaskedRemoteAddress DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.config.route.v3.RateLimit.Action.MaskedRemoteAddress();
}
public static io.envoyproxy.envoy.config.route.v3.RateLimit.Action.MaskedRemoteAddress getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public MaskedRemoteAddress parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new MaskedRemoteAddress(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.RateLimit.Action.MaskedRemoteAddress getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface GenericKeyOrBuilder extends
// @@protoc_insertion_point(interface_extends:envoy.config.route.v3.RateLimit.Action.GenericKey)
com.google.protobuf.MessageOrBuilder {
/**
*
* If set to true, the action will append a descriptor entry when the
* request matches the headers. If set to false, the action will append a
* descriptor entry when the request does not match the headers. The
* default value is true.
*
*
* .google.protobuf.BoolValue expect_match = 2;
* @return Whether the expectMatch field is set.
*/
boolean hasExpectMatch();
/**
*
* If set to true, the action will append a descriptor entry when the
* request matches the headers. If set to false, the action will append a
* descriptor entry when the request does not match the headers. The
* default value is true.
*
* If set to true, the action will append a descriptor entry when the
* request matches the headers. If set to false, the action will append a
* descriptor entry when the request does not match the headers. The
* default value is true.
*
* Specifies a set of headers that the rate limit action should match
* on. The action will check the request’s headers against all the
* specified headers in the config. A match will happen if all the
* headers in the config are present in the request with the same values
* (or based on presence if the value field is not in the config).
*
* Specifies a set of headers that the rate limit action should match
* on. The action will check the request’s headers against all the
* specified headers in the config. A match will happen if all the
* headers in the config are present in the request with the same values
* (or based on presence if the value field is not in the config).
*
* Specifies a set of headers that the rate limit action should match
* on. The action will check the request’s headers against all the
* specified headers in the config. A match will happen if all the
* headers in the config are present in the request with the same values
* (or based on presence if the value field is not in the config).
*
* Specifies a set of headers that the rate limit action should match
* on. The action will check the request’s headers against all the
* specified headers in the config. A match will happen if all the
* headers in the config are present in the request with the same values
* (or based on presence if the value field is not in the config).
*
* Specifies a set of headers that the rate limit action should match
* on. The action will check the request’s headers against all the
* specified headers in the config. A match will happen if all the
* headers in the config are present in the request with the same values
* (or based on presence if the value field is not in the config).
*
*
* string descriptor_value = 1 [(.validate.rules) = { ... }
* @return The bytes for descriptorValue.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getDescriptorValueBytes() {
java.lang.Object ref = descriptorValue_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
descriptorValue_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int EXPECT_MATCH_FIELD_NUMBER = 2;
private com.google.protobuf.BoolValue expectMatch_;
/**
*
* If set to true, the action will append a descriptor entry when the
* request matches the headers. If set to false, the action will append a
* descriptor entry when the request does not match the headers. The
* default value is true.
*
*
* .google.protobuf.BoolValue expect_match = 2;
* @return Whether the expectMatch field is set.
*/
@java.lang.Override
public boolean hasExpectMatch() {
return expectMatch_ != null;
}
/**
*
* If set to true, the action will append a descriptor entry when the
* request matches the headers. If set to false, the action will append a
* descriptor entry when the request does not match the headers. The
* default value is true.
*
* If set to true, the action will append a descriptor entry when the
* request matches the headers. If set to false, the action will append a
* descriptor entry when the request does not match the headers. The
* default value is true.
*
*
* .google.protobuf.BoolValue expect_match = 2;
*/
@java.lang.Override
public com.google.protobuf.BoolValueOrBuilder getExpectMatchOrBuilder() {
return getExpectMatch();
}
public static final int HEADERS_FIELD_NUMBER = 3;
private java.util.List headers_;
/**
*
* Specifies a set of headers that the rate limit action should match
* on. The action will check the request’s headers against all the
* specified headers in the config. A match will happen if all the
* headers in the config are present in the request with the same values
* (or based on presence if the value field is not in the config).
*
* Specifies a set of headers that the rate limit action should match
* on. The action will check the request’s headers against all the
* specified headers in the config. A match will happen if all the
* headers in the config are present in the request with the same values
* (or based on presence if the value field is not in the config).
*
* Specifies a set of headers that the rate limit action should match
* on. The action will check the request’s headers against all the
* specified headers in the config. A match will happen if all the
* headers in the config are present in the request with the same values
* (or based on presence if the value field is not in the config).
*
* Specifies a set of headers that the rate limit action should match
* on. The action will check the request’s headers against all the
* specified headers in the config. A match will happen if all the
* headers in the config are present in the request with the same values
* (or based on presence if the value field is not in the config).
*
* Specifies a set of headers that the rate limit action should match
* on. The action will check the request’s headers against all the
* specified headers in the config. A match will happen if all the
* headers in the config are present in the request with the same values
* (or based on presence if the value field is not in the config).
*
*
* repeated .envoy.config.route.v3.HeaderMatcher headers = 3 [(.validate.rules) = { ... }
*/
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.HeaderMatcherOrBuilder getHeadersOrBuilder(
int index) {
return headers_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(descriptorValue_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, descriptorValue_);
}
if (expectMatch_ != null) {
output.writeMessage(2, getExpectMatch());
}
for (int i = 0; i < headers_.size(); i++) {
output.writeMessage(3, headers_.get(i));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(descriptorKey_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, descriptorKey_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(descriptorValue_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, descriptorValue_);
}
if (expectMatch_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getExpectMatch());
}
for (int i = 0; i < headers_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, headers_.get(i));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(descriptorKey_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, descriptorKey_);
}
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.RateLimit.Action.HeaderValueMatch)) {
return super.equals(obj);
}
io.envoyproxy.envoy.config.route.v3.RateLimit.Action.HeaderValueMatch other = (io.envoyproxy.envoy.config.route.v3.RateLimit.Action.HeaderValueMatch) obj;
if (!getDescriptorKey()
.equals(other.getDescriptorKey())) return false;
if (!getDescriptorValue()
.equals(other.getDescriptorValue())) return false;
if (hasExpectMatch() != other.hasExpectMatch()) return false;
if (hasExpectMatch()) {
if (!getExpectMatch()
.equals(other.getExpectMatch())) return false;
}
if (!getHeadersList()
.equals(other.getHeadersList())) 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) + DESCRIPTOR_KEY_FIELD_NUMBER;
hash = (53 * hash) + getDescriptorKey().hashCode();
hash = (37 * hash) + DESCRIPTOR_VALUE_FIELD_NUMBER;
hash = (53 * hash) + getDescriptorValue().hashCode();
if (hasExpectMatch()) {
hash = (37 * hash) + EXPECT_MATCH_FIELD_NUMBER;
hash = (53 * hash) + getExpectMatch().hashCode();
}
if (getHeadersCount() > 0) {
hash = (37 * hash) + HEADERS_FIELD_NUMBER;
hash = (53 * hash) + getHeadersList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.config.route.v3.RateLimit.Action.HeaderValueMatch parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RateLimit.Action.HeaderValueMatch 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.RateLimit.Action.HeaderValueMatch parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RateLimit.Action.HeaderValueMatch 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.RateLimit.Action.HeaderValueMatch parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RateLimit.Action.HeaderValueMatch 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.RateLimit.Action.HeaderValueMatch 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.RateLimit.Action.HeaderValueMatch 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.RateLimit.Action.HeaderValueMatch 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.RateLimit.Action.HeaderValueMatch 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.RateLimit.Action.HeaderValueMatch 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.RateLimit.Action.HeaderValueMatch 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.RateLimit.Action.HeaderValueMatch 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 following descriptor entry is appended to the descriptor:
* .. code-block:: cpp
* ("header_match", "<descriptor_value>")
*
*
* string descriptor_value = 1 [(.validate.rules) = { ... }
* @param value The bytes for descriptorValue to set.
* @return This builder for chaining.
*/
public Builder setDescriptorValueBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
descriptorValue_ = value;
onChanged();
return this;
}
private com.google.protobuf.BoolValue expectMatch_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> expectMatchBuilder_;
/**
*
* If set to true, the action will append a descriptor entry when the
* request matches the headers. If set to false, the action will append a
* descriptor entry when the request does not match the headers. The
* default value is true.
*
*
* .google.protobuf.BoolValue expect_match = 2;
* @return Whether the expectMatch field is set.
*/
public boolean hasExpectMatch() {
return expectMatchBuilder_ != null || expectMatch_ != null;
}
/**
*
* If set to true, the action will append a descriptor entry when the
* request matches the headers. If set to false, the action will append a
* descriptor entry when the request does not match the headers. The
* default value is true.
*
* If set to true, the action will append a descriptor entry when the
* request matches the headers. If set to false, the action will append a
* descriptor entry when the request does not match the headers. The
* default value is true.
*
*
* .google.protobuf.BoolValue expect_match = 2;
*/
public Builder setExpectMatch(com.google.protobuf.BoolValue value) {
if (expectMatchBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
expectMatch_ = value;
onChanged();
} else {
expectMatchBuilder_.setMessage(value);
}
return this;
}
/**
*
* If set to true, the action will append a descriptor entry when the
* request matches the headers. If set to false, the action will append a
* descriptor entry when the request does not match the headers. The
* default value is true.
*
* If set to true, the action will append a descriptor entry when the
* request matches the headers. If set to false, the action will append a
* descriptor entry when the request does not match the headers. The
* default value is true.
*
* If set to true, the action will append a descriptor entry when the
* request matches the headers. If set to false, the action will append a
* descriptor entry when the request does not match the headers. The
* default value is true.
*
* If set to true, the action will append a descriptor entry when the
* request matches the headers. If set to false, the action will append a
* descriptor entry when the request does not match the headers. The
* default value is true.
*
* If set to true, the action will append a descriptor entry when the
* request matches the headers. If set to false, the action will append a
* descriptor entry when the request does not match the headers. The
* default value is true.
*
* If set to true, the action will append a descriptor entry when the
* request matches the headers. If set to false, the action will append a
* descriptor entry when the request does not match the headers. The
* default value is true.
*
* Specifies a set of headers that the rate limit action should match
* on. The action will check the request’s headers against all the
* specified headers in the config. A match will happen if all the
* headers in the config are present in the request with the same values
* (or based on presence if the value field is not in the config).
*
* Specifies a set of headers that the rate limit action should match
* on. The action will check the request’s headers against all the
* specified headers in the config. A match will happen if all the
* headers in the config are present in the request with the same values
* (or based on presence if the value field is not in the config).
*
* Specifies a set of headers that the rate limit action should match
* on. The action will check the request’s headers against all the
* specified headers in the config. A match will happen if all the
* headers in the config are present in the request with the same values
* (or based on presence if the value field is not in the config).
*
* Specifies a set of headers that the rate limit action should match
* on. The action will check the request’s headers against all the
* specified headers in the config. A match will happen if all the
* headers in the config are present in the request with the same values
* (or based on presence if the value field is not in the config).
*
*
* repeated .envoy.config.route.v3.HeaderMatcher headers = 3 [(.validate.rules) = { ... }
*/
public Builder setHeaders(
int index, io.envoyproxy.envoy.config.route.v3.HeaderMatcher value) {
if (headersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureHeadersIsMutable();
headers_.set(index, value);
onChanged();
} else {
headersBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Specifies a set of headers that the rate limit action should match
* on. The action will check the request’s headers against all the
* specified headers in the config. A match will happen if all the
* headers in the config are present in the request with the same values
* (or based on presence if the value field is not in the config).
*
* Specifies a set of headers that the rate limit action should match
* on. The action will check the request’s headers against all the
* specified headers in the config. A match will happen if all the
* headers in the config are present in the request with the same values
* (or based on presence if the value field is not in the config).
*
* Specifies a set of headers that the rate limit action should match
* on. The action will check the request’s headers against all the
* specified headers in the config. A match will happen if all the
* headers in the config are present in the request with the same values
* (or based on presence if the value field is not in the config).
*
*
* repeated .envoy.config.route.v3.HeaderMatcher headers = 3 [(.validate.rules) = { ... }
*/
public Builder addHeaders(
int index, io.envoyproxy.envoy.config.route.v3.HeaderMatcher value) {
if (headersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureHeadersIsMutable();
headers_.add(index, value);
onChanged();
} else {
headersBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Specifies a set of headers that the rate limit action should match
* on. The action will check the request’s headers against all the
* specified headers in the config. A match will happen if all the
* headers in the config are present in the request with the same values
* (or based on presence if the value field is not in the config).
*
* Specifies a set of headers that the rate limit action should match
* on. The action will check the request’s headers against all the
* specified headers in the config. A match will happen if all the
* headers in the config are present in the request with the same values
* (or based on presence if the value field is not in the config).
*
* Specifies a set of headers that the rate limit action should match
* on. The action will check the request’s headers against all the
* specified headers in the config. A match will happen if all the
* headers in the config are present in the request with the same values
* (or based on presence if the value field is not in the config).
*
* Specifies a set of headers that the rate limit action should match
* on. The action will check the request’s headers against all the
* specified headers in the config. A match will happen if all the
* headers in the config are present in the request with the same values
* (or based on presence if the value field is not in the config).
*
* Specifies a set of headers that the rate limit action should match
* on. The action will check the request’s headers against all the
* specified headers in the config. A match will happen if all the
* headers in the config are present in the request with the same values
* (or based on presence if the value field is not in the config).
*
* Specifies a set of headers that the rate limit action should match
* on. The action will check the request’s headers against all the
* specified headers in the config. A match will happen if all the
* headers in the config are present in the request with the same values
* (or based on presence if the value field is not in the config).
*
* Specifies a set of headers that the rate limit action should match
* on. The action will check the request’s headers against all the
* specified headers in the config. A match will happen if all the
* headers in the config are present in the request with the same values
* (or based on presence if the value field is not in the config).
*
* Specifies a set of headers that the rate limit action should match
* on. The action will check the request’s headers against all the
* specified headers in the config. A match will happen if all the
* headers in the config are present in the request with the same values
* (or based on presence if the value field is not in the config).
*
* Specifies a set of headers that the rate limit action should match
* on. The action will check the request’s headers against all the
* specified headers in the config. A match will happen if all the
* headers in the config are present in the request with the same values
* (or based on presence if the value field is not in the config).
*
* Specifies a set of headers that the rate limit action should match
* on. The action will check the request’s headers against all the
* specified headers in the config. A match will happen if all the
* headers in the config are present in the request with the same values
* (or based on presence if the value field is not in the config).
*
* Specifies a set of headers that the rate limit action should match
* on. The action will check the request’s headers against all the
* specified headers in the config. A match will happen if all the
* headers in the config are present in the request with the same values
* (or based on presence if the value field is not in the config).
*
*
* repeated .envoy.config.route.v3.HeaderMatcher headers = 3 [(.validate.rules) = { ... }
*/
public java.util.List
getHeadersBuilderList() {
return getHeadersFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.config.route.v3.HeaderMatcher, io.envoyproxy.envoy.config.route.v3.HeaderMatcher.Builder, io.envoyproxy.envoy.config.route.v3.HeaderMatcherOrBuilder>
getHeadersFieldBuilder() {
if (headersBuilder_ == null) {
headersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.config.route.v3.HeaderMatcher, io.envoyproxy.envoy.config.route.v3.HeaderMatcher.Builder, io.envoyproxy.envoy.config.route.v3.HeaderMatcherOrBuilder>(
headers_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
headers_ = null;
}
return headersBuilder_;
}
@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.RateLimit.Action.HeaderValueMatch)
}
// @@protoc_insertion_point(class_scope:envoy.config.route.v3.RateLimit.Action.HeaderValueMatch)
private static final io.envoyproxy.envoy.config.route.v3.RateLimit.Action.HeaderValueMatch DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.config.route.v3.RateLimit.Action.HeaderValueMatch();
}
public static io.envoyproxy.envoy.config.route.v3.RateLimit.Action.HeaderValueMatch getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public HeaderValueMatch parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new HeaderValueMatch(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.RateLimit.Action.HeaderValueMatch getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface DynamicMetaDataOrBuilder extends
// @@protoc_insertion_point(interface_extends:envoy.config.route.v3.RateLimit.Action.DynamicMetaData)
com.google.protobuf.MessageOrBuilder {
/**
*
* Metadata struct that defines the key and path to retrieve the string value. A match will
* only happen if the value in the dynamic metadata is of type string.
*
*
* .envoy.type.metadata.v3.MetadataKey metadata_key = 2 [(.validate.rules) = { ... }
* @return Whether the metadataKey field is set.
*/
boolean hasMetadataKey();
/**
*
* Metadata struct that defines the key and path to retrieve the string value. A match will
* only happen if the value in the dynamic metadata is of type string.
*
* Metadata struct that defines the key and path to retrieve the string value. A match will
* only happen if the value in the dynamic metadata is of type string.
*
* An optional value to use if ``metadata_key`` is empty. If not set and
* no value is present under the metadata_key then no descriptor is generated.
*
* An optional value to use if ``metadata_key`` is empty. If not set and
* no value is present under the metadata_key then no descriptor is generated.
*
*
* string default_value = 3;
* @return The bytes for defaultValue.
*/
com.google.protobuf.ByteString
getDefaultValueBytes();
}
/**
*
* The following descriptor entry is appended when the
* :ref:`dynamic metadata <well_known_dynamic_metadata>` contains a key value:
* .. code-block:: cpp
* ("<descriptor_key>", "<value_queried_from_dynamic_metadata>")
* .. attention::
* This action has been deprecated in favor of the :ref:`metadata <envoy_v3_api_msg_config.route.v3.RateLimit.Action.MetaData>` action
*
*
* Protobuf type {@code envoy.config.route.v3.RateLimit.Action.DynamicMetaData}
*/
public static final class DynamicMetaData extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.config.route.v3.RateLimit.Action.DynamicMetaData)
DynamicMetaDataOrBuilder {
private static final long serialVersionUID = 0L;
// Use DynamicMetaData.newBuilder() to construct.
private DynamicMetaData(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private DynamicMetaData() {
descriptorKey_ = "";
defaultValue_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new DynamicMetaData();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private DynamicMetaData(
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();
descriptorKey_ = s;
break;
}
case 18: {
io.envoyproxy.envoy.type.metadata.v3.MetadataKey.Builder subBuilder = null;
if (metadataKey_ != null) {
subBuilder = metadataKey_.toBuilder();
}
metadataKey_ = input.readMessage(io.envoyproxy.envoy.type.metadata.v3.MetadataKey.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(metadataKey_);
metadataKey_ = subBuilder.buildPartial();
}
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
defaultValue_ = s;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RateLimit_Action_DynamicMetaData_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_RateLimit_Action_DynamicMetaData_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.route.v3.RateLimit.Action.DynamicMetaData.class, io.envoyproxy.envoy.config.route.v3.RateLimit.Action.DynamicMetaData.Builder.class);
}
public static final int DESCRIPTOR_KEY_FIELD_NUMBER = 1;
private volatile java.lang.Object descriptorKey_;
/**
*
*
* string descriptor_key = 1 [(.validate.rules) = { ... }
* @return The bytes for descriptorKey.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getDescriptorKeyBytes() {
java.lang.Object ref = descriptorKey_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
descriptorKey_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int METADATA_KEY_FIELD_NUMBER = 2;
private io.envoyproxy.envoy.type.metadata.v3.MetadataKey metadataKey_;
/**
*
* Metadata struct that defines the key and path to retrieve the string value. A match will
* only happen if the value in the dynamic metadata is of type string.
*
*
* .envoy.type.metadata.v3.MetadataKey metadata_key = 2 [(.validate.rules) = { ... }
* @return Whether the metadataKey field is set.
*/
@java.lang.Override
public boolean hasMetadataKey() {
return metadataKey_ != null;
}
/**
*
* Metadata struct that defines the key and path to retrieve the string value. A match will
* only happen if the value in the dynamic metadata is of type string.
*
* Metadata struct that defines the key and path to retrieve the string value. A match will
* only happen if the value in the dynamic metadata is of type string.
*
*
* .envoy.type.metadata.v3.MetadataKey metadata_key = 2 [(.validate.rules) = { ... }
*/
@java.lang.Override
public io.envoyproxy.envoy.type.metadata.v3.MetadataKeyOrBuilder getMetadataKeyOrBuilder() {
return getMetadataKey();
}
public static final int DEFAULT_VALUE_FIELD_NUMBER = 3;
private volatile java.lang.Object defaultValue_;
/**
*
* An optional value to use if ``metadata_key`` is empty. If not set and
* no value is present under the metadata_key then no descriptor is generated.
*
* An optional value to use if ``metadata_key`` is empty. If not set and
* no value is present under the metadata_key then no descriptor is generated.
*
*
* string default_value = 3;
* @return The bytes for defaultValue.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getDefaultValueBytes() {
java.lang.Object ref = defaultValue_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
defaultValue_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(descriptorKey_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, descriptorKey_);
}
if (metadataKey_ != null) {
output.writeMessage(2, getMetadataKey());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(defaultValue_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, defaultValue_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(descriptorKey_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, descriptorKey_);
}
if (metadataKey_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getMetadataKey());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(defaultValue_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, defaultValue_);
}
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.RateLimit.Action.DynamicMetaData)) {
return super.equals(obj);
}
io.envoyproxy.envoy.config.route.v3.RateLimit.Action.DynamicMetaData other = (io.envoyproxy.envoy.config.route.v3.RateLimit.Action.DynamicMetaData) obj;
if (!getDescriptorKey()
.equals(other.getDescriptorKey())) return false;
if (hasMetadataKey() != other.hasMetadataKey()) return false;
if (hasMetadataKey()) {
if (!getMetadataKey()
.equals(other.getMetadataKey())) return false;
}
if (!getDefaultValue()
.equals(other.getDefaultValue())) 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) + DESCRIPTOR_KEY_FIELD_NUMBER;
hash = (53 * hash) + getDescriptorKey().hashCode();
if (hasMetadataKey()) {
hash = (37 * hash) + METADATA_KEY_FIELD_NUMBER;
hash = (53 * hash) + getMetadataKey().hashCode();
}
hash = (37 * hash) + DEFAULT_VALUE_FIELD_NUMBER;
hash = (53 * hash) + getDefaultValue().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.config.route.v3.RateLimit.Action.DynamicMetaData parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RateLimit.Action.DynamicMetaData 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.RateLimit.Action.DynamicMetaData parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RateLimit.Action.DynamicMetaData 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.RateLimit.Action.DynamicMetaData parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.RateLimit.Action.DynamicMetaData 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.RateLimit.Action.DynamicMetaData 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.RateLimit.Action.DynamicMetaData 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.RateLimit.Action.DynamicMetaData 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.RateLimit.Action.DynamicMetaData 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.RateLimit.Action.DynamicMetaData 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.RateLimit.Action.DynamicMetaData 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.RateLimit.Action.DynamicMetaData 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 following descriptor entry is appended when the
* :ref:`dynamic metadata <well_known_dynamic_metadata>` contains a key value:
* .. code-block:: cpp
* ("<descriptor_key>", "<value_queried_from_dynamic_metadata>")
* .. attention::
* This action has been deprecated in favor of the :ref:`metadata <envoy_v3_api_msg_config.route.v3.RateLimit.Action.MetaData>` action
*
*
* Protobuf type {@code envoy.config.route.v3.RateLimit.Action.DynamicMetaData}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.config.route.v3.RateLimit.Action.DynamicMetaData)
io.envoyproxy.envoy.config.route.v3.RateLimit.Action.DynamicMetaDataOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RateLimit_Action_DynamicMetaData_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_RateLimit_Action_DynamicMetaData_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.route.v3.RateLimit.Action.DynamicMetaData.class, io.envoyproxy.envoy.config.route.v3.RateLimit.Action.DynamicMetaData.Builder.class);
}
// Construct using io.envoyproxy.envoy.config.route.v3.RateLimit.Action.DynamicMetaData.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();
descriptorKey_ = "";
if (metadataKeyBuilder_ == null) {
metadataKey_ = null;
} else {
metadataKey_ = null;
metadataKeyBuilder_ = null;
}
defaultValue_ = "";
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_RateLimit_Action_DynamicMetaData_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RateLimit.Action.DynamicMetaData getDefaultInstanceForType() {
return io.envoyproxy.envoy.config.route.v3.RateLimit.Action.DynamicMetaData.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RateLimit.Action.DynamicMetaData build() {
io.envoyproxy.envoy.config.route.v3.RateLimit.Action.DynamicMetaData result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.RateLimit.Action.DynamicMetaData buildPartial() {
io.envoyproxy.envoy.config.route.v3.RateLimit.Action.DynamicMetaData result = new io.envoyproxy.envoy.config.route.v3.RateLimit.Action.DynamicMetaData(this);
result.descriptorKey_ = descriptorKey_;
if (metadataKeyBuilder_ == null) {
result.metadataKey_ = metadataKey_;
} else {
result.metadataKey_ = metadataKeyBuilder_.build();
}
result.defaultValue_ = defaultValue_;
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.RateLimit.Action.DynamicMetaData) {
return mergeFrom((io.envoyproxy.envoy.config.route.v3.RateLimit.Action.DynamicMetaData)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.config.route.v3.RateLimit.Action.DynamicMetaData other) {
if (other == io.envoyproxy.envoy.config.route.v3.RateLimit.Action.DynamicMetaData.getDefaultInstance()) return this;
if (!other.getDescriptorKey().isEmpty()) {
descriptorKey_ = other.descriptorKey_;
onChanged();
}
if (other.hasMetadataKey()) {
mergeMetadataKey(other.getMetadataKey());
}
if (!other.getDefaultValue().isEmpty()) {
defaultValue_ = other.defaultValue_;
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.RateLimit.Action.DynamicMetaData parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.config.route.v3.RateLimit.Action.DynamicMetaData) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object descriptorKey_ = "";
/**
*
*
* string descriptor_key = 1 [(.validate.rules) = { ... }
* @param value The bytes for descriptorKey to set.
* @return This builder for chaining.
*/
public Builder setDescriptorKeyBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
descriptorKey_ = value;
onChanged();
return this;
}
private io.envoyproxy.envoy.type.metadata.v3.MetadataKey metadataKey_;
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.type.metadata.v3.MetadataKey, io.envoyproxy.envoy.type.metadata.v3.MetadataKey.Builder, io.envoyproxy.envoy.type.metadata.v3.MetadataKeyOrBuilder> metadataKeyBuilder_;
/**
*
* Metadata struct that defines the key and path to retrieve the string value. A match will
* only happen if the value in the dynamic metadata is of type string.
*
*
* .envoy.type.metadata.v3.MetadataKey metadata_key = 2 [(.validate.rules) = { ... }
* @return Whether the metadataKey field is set.
*/
public boolean hasMetadataKey() {
return metadataKeyBuilder_ != null || metadataKey_ != null;
}
/**
*
* Metadata struct that defines the key and path to retrieve the string value. A match will
* only happen if the value in the dynamic metadata is of type string.
*
* Metadata struct that defines the key and path to retrieve the string value. A match will
* only happen if the value in the dynamic metadata is of type string.
*
* Metadata struct that defines the key and path to retrieve the string value. A match will
* only happen if the value in the dynamic metadata is of type string.
*
* Metadata struct that defines the key and path to retrieve the string value. A match will
* only happen if the value in the dynamic metadata is of type string.
*
* Metadata struct that defines the key and path to retrieve the string value. A match will
* only happen if the value in the dynamic metadata is of type string.
*
* Metadata struct that defines the key and path to retrieve the string value. A match will
* only happen if the value in the dynamic metadata is of type string.
*
* Metadata struct that defines the key and path to retrieve the string value. A match will
* only happen if the value in the dynamic metadata is of type string.
*
* Metadata struct that defines the key and path to retrieve the string value. A match will
* only happen if the value in the dynamic metadata is of type string.
*
* An optional value to use if ``metadata_key`` is empty. If not set and
* no value is present under the metadata_key then no descriptor is generated.
*
* An optional value to use if ``metadata_key`` is empty. If not set and
* no value is present under the metadata_key then no descriptor is generated.
*
*
* string default_value = 3;
* @return The bytes for defaultValue.
*/
public com.google.protobuf.ByteString
getDefaultValueBytes() {
java.lang.Object ref = defaultValue_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
defaultValue_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* An optional value to use if ``metadata_key`` is empty. If not set and
* no value is present under the metadata_key then no descriptor is generated.
*
*
* string default_value = 3;
* @param value The defaultValue to set.
* @return This builder for chaining.
*/
public Builder setDefaultValue(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
defaultValue_ = value;
onChanged();
return this;
}
/**
*
* An optional value to use if ``metadata_key`` is empty. If not set and
* no value is present under the metadata_key then no descriptor is generated.
*
*
* string default_value = 3;
* @return This builder for chaining.
*/
public Builder clearDefaultValue() {
defaultValue_ = getDefaultInstance().getDefaultValue();
onChanged();
return this;
}
/**
*
* An optional value to use if ``metadata_key`` is empty. If not set and
* no value is present under the metadata_key then no descriptor is generated.
*
*
* string default_value = 3;
* @param value The bytes for defaultValue to set.
* @return This builder for chaining.
*/
public Builder setDefaultValueBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
defaultValue_ = 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.RateLimit.Action.DynamicMetaData)
}
// @@protoc_insertion_point(class_scope:envoy.config.route.v3.RateLimit.Action.DynamicMetaData)
private static final io.envoyproxy.envoy.config.route.v3.RateLimit.Action.DynamicMetaData DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.config.route.v3.RateLimit.Action.DynamicMetaData();
}
public static io.envoyproxy.envoy.config.route.v3.RateLimit.Action.DynamicMetaData getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public DynamicMetaData parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new DynamicMetaData(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.RateLimit.Action.DynamicMetaData getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface MetaDataOrBuilder extends
// @@protoc_insertion_point(interface_extends:envoy.config.route.v3.RateLimit.Action.MetaData)
com.google.protobuf.MessageOrBuilder {
/**
*
* Metadata struct that defines the key and path to retrieve the string value. A match will
* only happen if the value in the metadata is of type string.
*
*
* .envoy.type.metadata.v3.MetadataKey metadata_key = 2 [(.validate.rules) = { ... }
* @return Whether the metadataKey field is set.
*/
boolean hasMetadataKey();
/**
*
* Metadata struct that defines the key and path to retrieve the string value. A match will
* only happen if the value in the metadata is of type string.
*
* Metadata struct that defines the key and path to retrieve the string value. A match will
* only happen if the value in the metadata is of type string.
*
* An optional value to use if ``metadata_key`` is empty. If not set and
* no value is present under the metadata_key then ``skip_if_absent`` is followed to
* skip calling the rate limiting service or skip the descriptor.
*
* An optional value to use if ``metadata_key`` is empty. If not set and
* no value is present under the metadata_key then ``skip_if_absent`` is followed to
* skip calling the rate limiting service or skip the descriptor.
*
*
* string default_value = 3;
* @return The bytes for defaultValue.
*/
com.google.protobuf.ByteString
getDefaultValueBytes();
/**
*
* Source of metadata
*
*
* .envoy.config.route.v3.RateLimit.Action.MetaData.Source source = 4 [(.validate.rules) = { ... }
* @return The enum numeric value on the wire for source.
*/
int getSourceValue();
/**
*
* If set to true, Envoy skips the descriptor while calling rate limiting service
* when ``metadata_key`` is empty and ``default_value`` is not set. By default it skips calling the
* rate limiting service in that case.
*
* The following descriptor entry is appended when the metadata contains a key value:
* .. code-block:: cpp
* ("<descriptor_key>", "<value_queried_from_metadata>")
* [#next-free-field: 6]
*
*
* Protobuf type {@code envoy.config.route.v3.RateLimit.Action.MetaData}
*/
public static final class MetaData extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.config.route.v3.RateLimit.Action.MetaData)
MetaDataOrBuilder {
private static final long serialVersionUID = 0L;
// Use MetaData.newBuilder() to construct.
private MetaData(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private MetaData() {
descriptorKey_ = "";
defaultValue_ = "";
source_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new MetaData();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private MetaData(
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();
descriptorKey_ = s;
break;
}
case 18: {
io.envoyproxy.envoy.type.metadata.v3.MetadataKey.Builder subBuilder = null;
if (metadataKey_ != null) {
subBuilder = metadataKey_.toBuilder();
}
metadataKey_ = input.readMessage(io.envoyproxy.envoy.type.metadata.v3.MetadataKey.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(metadataKey_);
metadataKey_ = subBuilder.buildPartial();
}
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
defaultValue_ = s;
break;
}
case 32: {
int rawValue = input.readEnum();
source_ = rawValue;
break;
}
case 40: {
skipIfAbsent_ = input.readBool();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_RateLimit_Action_MetaData_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_RateLimit_Action_MetaData_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.route.v3.RateLimit.Action.MetaData.class, io.envoyproxy.envoy.config.route.v3.RateLimit.Action.MetaData.Builder.class);
}
/**
* Protobuf enum {@code envoy.config.route.v3.RateLimit.Action.MetaData.Source}
*/
public enum Source
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
* ROUTE_ENTRY = 1;
*/
public static final int ROUTE_ENTRY_VALUE = 1;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static Source valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static Source forNumber(int value) {
switch (value) {
case 0: return DYNAMIC;
case 1: return ROUTE_ENTRY;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap