
io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: envoy/extensions/common/ratelimit/v3/ratelimit.proto
package io.envoyproxy.envoy.extensions.common.ratelimit.v3;
/**
*
* A RateLimitDescriptor is a list of hierarchical entries that are used by the service to
* determine the final rate limit key and overall allowed limit. Here are some examples of how
* they might be used for the domain "envoy".
* .. code-block:: cpp
* ["authenticated": "false"], ["remote_address": "10.0.0.1"]
* What it does: Limits all unauthenticated traffic for the IP address 10.0.0.1. The
* configuration supplies a default limit for the *remote_address* key. If there is a desire to
* raise the limit for 10.0.0.1 or block it entirely it can be specified directly in the
* configuration.
* .. code-block:: cpp
* ["authenticated": "false"], ["path": "/foo/bar"]
* What it does: Limits all unauthenticated traffic globally for a specific path (or prefix if
* configured that way in the service).
* .. code-block:: cpp
* ["authenticated": "false"], ["path": "/foo/bar"], ["remote_address": "10.0.0.1"]
* What it does: Limits unauthenticated traffic to a specific path for a specific IP address.
* Like (1) we can raise/block specific IP addresses if we want with an override configuration.
* .. code-block:: cpp
* ["authenticated": "true"], ["client_id": "foo"]
* What it does: Limits all traffic for an authenticated client "foo"
* .. code-block:: cpp
* ["authenticated": "true"], ["client_id": "foo"], ["path": "/foo/bar"]
* What it does: Limits traffic to a specific path for an authenticated client "foo"
* The idea behind the API is that (1)/(2)/(3) and (4)/(5) can be sent in 1 request if desired.
* This enables building complex application scenarios with a generic backend.
*
*
* Protobuf type {@code envoy.extensions.common.ratelimit.v3.RateLimitDescriptor}
*/
public final class RateLimitDescriptor extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.extensions.common.ratelimit.v3.RateLimitDescriptor)
RateLimitDescriptorOrBuilder {
private static final long serialVersionUID = 0L;
// Use RateLimitDescriptor.newBuilder() to construct.
private RateLimitDescriptor(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private RateLimitDescriptor() {
entries_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new RateLimitDescriptor();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private RateLimitDescriptor(
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: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
entries_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
entries_.add(
input.readMessage(io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry.parser(), extensionRegistry));
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
entries_ = java.util.Collections.unmodifiableList(entries_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.extensions.common.ratelimit.v3.RatelimitProto.internal_static_envoy_extensions_common_ratelimit_v3_RateLimitDescriptor_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.extensions.common.ratelimit.v3.RatelimitProto.internal_static_envoy_extensions_common_ratelimit_v3_RateLimitDescriptor_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.class, io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Builder.class);
}
public interface EntryOrBuilder extends
// @@protoc_insertion_point(interface_extends:envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry)
com.google.protobuf.MessageOrBuilder {
/**
*
* Descriptor key.
*
*
* string key = 1 [(.validate.rules) = { ... }
*/
java.lang.String getKey();
/**
*
* Descriptor key.
*
*
* string key = 1 [(.validate.rules) = { ... }
*/
com.google.protobuf.ByteString
getKeyBytes();
/**
*
* Descriptor value.
*
*
* string value = 2 [(.validate.rules) = { ... }
*/
java.lang.String getValue();
/**
*
* Descriptor value.
*
*
* string value = 2 [(.validate.rules) = { ... }
*/
com.google.protobuf.ByteString
getValueBytes();
}
/**
* Protobuf type {@code envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry}
*/
public static final class Entry extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry)
EntryOrBuilder {
private static final long serialVersionUID = 0L;
// Use Entry.newBuilder() to construct.
private Entry(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Entry() {
key_ = "";
value_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Entry();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Entry(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
key_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
value_ = s;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.extensions.common.ratelimit.v3.RatelimitProto.internal_static_envoy_extensions_common_ratelimit_v3_RateLimitDescriptor_Entry_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.extensions.common.ratelimit.v3.RatelimitProto.internal_static_envoy_extensions_common_ratelimit_v3_RateLimitDescriptor_Entry_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry.class, io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry.Builder.class);
}
public static final int KEY_FIELD_NUMBER = 1;
private volatile java.lang.Object key_;
/**
*
* Descriptor key.
*
*
* string key = 1 [(.validate.rules) = { ... }
*/
public java.lang.String getKey() {
java.lang.Object ref = key_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
key_ = s;
return s;
}
}
/**
*
* Descriptor key.
*
*
* string key = 1 [(.validate.rules) = { ... }
*/
public com.google.protobuf.ByteString
getKeyBytes() {
java.lang.Object ref = key_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
key_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int VALUE_FIELD_NUMBER = 2;
private volatile java.lang.Object value_;
/**
*
* Descriptor value.
*
*
* string value = 2 [(.validate.rules) = { ... }
*/
public java.lang.String getValue() {
java.lang.Object ref = value_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
value_ = s;
return s;
}
}
/**
*
* Descriptor value.
*
*
* string value = 2 [(.validate.rules) = { ... }
*/
public com.google.protobuf.ByteString
getValueBytes() {
java.lang.Object ref = value_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
value_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
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 (!getKeyBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_);
}
if (!getValueBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getKeyBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_);
}
if (!getValueBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_);
}
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.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry)) {
return super.equals(obj);
}
io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry other = (io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry) obj;
if (!getKey()
.equals(other.getKey())) return false;
if (!getValue()
.equals(other.getValue())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + KEY_FIELD_NUMBER;
hash = (53 * hash) + getKey().hashCode();
hash = (37 * hash) + VALUE_FIELD_NUMBER;
hash = (53 * hash) + getValue().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry 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.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry 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.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry 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.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry 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.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry 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.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry)
io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.EntryOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.extensions.common.ratelimit.v3.RatelimitProto.internal_static_envoy_extensions_common_ratelimit_v3_RateLimitDescriptor_Entry_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.extensions.common.ratelimit.v3.RatelimitProto.internal_static_envoy_extensions_common_ratelimit_v3_RateLimitDescriptor_Entry_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry.class, io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry.Builder.class);
}
// Construct using io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
key_ = "";
value_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.extensions.common.ratelimit.v3.RatelimitProto.internal_static_envoy_extensions_common_ratelimit_v3_RateLimitDescriptor_Entry_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry getDefaultInstanceForType() {
return io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry build() {
io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry buildPartial() {
io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry result = new io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry(this);
result.key_ = key_;
result.value_ = value_;
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.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry) {
return mergeFrom((io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry other) {
if (other == io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry.getDefaultInstance()) return this;
if (!other.getKey().isEmpty()) {
key_ = other.key_;
onChanged();
}
if (!other.getValue().isEmpty()) {
value_ = other.value_;
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.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object key_ = "";
/**
*
* Descriptor key.
*
*
* string key = 1 [(.validate.rules) = { ... }
*/
public java.lang.String getKey() {
java.lang.Object ref = key_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
key_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Descriptor key.
*
*
* string key = 1 [(.validate.rules) = { ... }
*/
public com.google.protobuf.ByteString
getKeyBytes() {
java.lang.Object ref = key_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
key_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Descriptor key.
*
*
* string key = 1 [(.validate.rules) = { ... }
*/
public Builder setKey(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
key_ = value;
onChanged();
return this;
}
/**
*
* Descriptor key.
*
*
* string key = 1 [(.validate.rules) = { ... }
*/
public Builder clearKey() {
key_ = getDefaultInstance().getKey();
onChanged();
return this;
}
/**
*
* Descriptor key.
*
*
* string key = 1 [(.validate.rules) = { ... }
*/
public Builder setKeyBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
key_ = value;
onChanged();
return this;
}
private java.lang.Object value_ = "";
/**
*
* Descriptor value.
*
*
* string value = 2 [(.validate.rules) = { ... }
*/
public java.lang.String getValue() {
java.lang.Object ref = value_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
value_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Descriptor value.
*
*
* string value = 2 [(.validate.rules) = { ... }
*/
public com.google.protobuf.ByteString
getValueBytes() {
java.lang.Object ref = value_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
value_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Descriptor value.
*
*
* string value = 2 [(.validate.rules) = { ... }
*/
public Builder setValue(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
value_ = value;
onChanged();
return this;
}
/**
*
* Descriptor value.
*
*
* string value = 2 [(.validate.rules) = { ... }
*/
public Builder clearValue() {
value_ = getDefaultInstance().getValue();
onChanged();
return this;
}
/**
*
* Descriptor value.
*
*
* string value = 2 [(.validate.rules) = { ... }
*/
public Builder setValueBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
value_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry)
}
// @@protoc_insertion_point(class_scope:envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry)
private static final io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry();
}
public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Entry parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Entry(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.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int ENTRIES_FIELD_NUMBER = 1;
private java.util.List entries_;
/**
*
* Descriptor entries.
*
*
* repeated .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry entries = 1 [(.validate.rules) = { ... }
*/
public java.util.List getEntriesList() {
return entries_;
}
/**
*
* Descriptor entries.
*
*
* repeated .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry entries = 1 [(.validate.rules) = { ... }
*/
public java.util.List extends io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.EntryOrBuilder>
getEntriesOrBuilderList() {
return entries_;
}
/**
*
* Descriptor entries.
*
*
* repeated .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry entries = 1 [(.validate.rules) = { ... }
*/
public int getEntriesCount() {
return entries_.size();
}
/**
*
* Descriptor entries.
*
*
* repeated .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry entries = 1 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry getEntries(int index) {
return entries_.get(index);
}
/**
*
* Descriptor entries.
*
*
* repeated .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry entries = 1 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.EntryOrBuilder getEntriesOrBuilder(
int index) {
return entries_.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 {
for (int i = 0; i < entries_.size(); i++) {
output.writeMessage(1, entries_.get(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < entries_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, entries_.get(i));
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor)) {
return super.equals(obj);
}
io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor other = (io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor) obj;
if (!getEntriesList()
.equals(other.getEntriesList())) 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 (getEntriesCount() > 0) {
hash = (37 * hash) + ENTRIES_FIELD_NUMBER;
hash = (53 * hash) + getEntriesList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor 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.extensions.common.ratelimit.v3.RateLimitDescriptor parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor 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.extensions.common.ratelimit.v3.RateLimitDescriptor parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor 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.extensions.common.ratelimit.v3.RateLimitDescriptor parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor 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.extensions.common.ratelimit.v3.RateLimitDescriptor parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor 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.extensions.common.ratelimit.v3.RateLimitDescriptor 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;
}
/**
*
* A RateLimitDescriptor is a list of hierarchical entries that are used by the service to
* determine the final rate limit key and overall allowed limit. Here are some examples of how
* they might be used for the domain "envoy".
* .. code-block:: cpp
* ["authenticated": "false"], ["remote_address": "10.0.0.1"]
* What it does: Limits all unauthenticated traffic for the IP address 10.0.0.1. The
* configuration supplies a default limit for the *remote_address* key. If there is a desire to
* raise the limit for 10.0.0.1 or block it entirely it can be specified directly in the
* configuration.
* .. code-block:: cpp
* ["authenticated": "false"], ["path": "/foo/bar"]
* What it does: Limits all unauthenticated traffic globally for a specific path (or prefix if
* configured that way in the service).
* .. code-block:: cpp
* ["authenticated": "false"], ["path": "/foo/bar"], ["remote_address": "10.0.0.1"]
* What it does: Limits unauthenticated traffic to a specific path for a specific IP address.
* Like (1) we can raise/block specific IP addresses if we want with an override configuration.
* .. code-block:: cpp
* ["authenticated": "true"], ["client_id": "foo"]
* What it does: Limits all traffic for an authenticated client "foo"
* .. code-block:: cpp
* ["authenticated": "true"], ["client_id": "foo"], ["path": "/foo/bar"]
* What it does: Limits traffic to a specific path for an authenticated client "foo"
* The idea behind the API is that (1)/(2)/(3) and (4)/(5) can be sent in 1 request if desired.
* This enables building complex application scenarios with a generic backend.
*
*
* Protobuf type {@code envoy.extensions.common.ratelimit.v3.RateLimitDescriptor}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.extensions.common.ratelimit.v3.RateLimitDescriptor)
io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptorOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.extensions.common.ratelimit.v3.RatelimitProto.internal_static_envoy_extensions_common_ratelimit_v3_RateLimitDescriptor_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.extensions.common.ratelimit.v3.RatelimitProto.internal_static_envoy_extensions_common_ratelimit_v3_RateLimitDescriptor_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.class, io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Builder.class);
}
// Construct using io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getEntriesFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (entriesBuilder_ == null) {
entries_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
entriesBuilder_.clear();
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.extensions.common.ratelimit.v3.RatelimitProto.internal_static_envoy_extensions_common_ratelimit_v3_RateLimitDescriptor_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor getDefaultInstanceForType() {
return io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor build() {
io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor buildPartial() {
io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor result = new io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor(this);
int from_bitField0_ = bitField0_;
if (entriesBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
entries_ = java.util.Collections.unmodifiableList(entries_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.entries_ = entries_;
} else {
result.entries_ = entriesBuilder_.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.extensions.common.ratelimit.v3.RateLimitDescriptor) {
return mergeFrom((io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor other) {
if (other == io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.getDefaultInstance()) return this;
if (entriesBuilder_ == null) {
if (!other.entries_.isEmpty()) {
if (entries_.isEmpty()) {
entries_ = other.entries_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureEntriesIsMutable();
entries_.addAll(other.entries_);
}
onChanged();
}
} else {
if (!other.entries_.isEmpty()) {
if (entriesBuilder_.isEmpty()) {
entriesBuilder_.dispose();
entriesBuilder_ = null;
entries_ = other.entries_;
bitField0_ = (bitField0_ & ~0x00000001);
entriesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getEntriesFieldBuilder() : null;
} else {
entriesBuilder_.addAllMessages(other.entries_);
}
}
}
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.extensions.common.ratelimit.v3.RateLimitDescriptor parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List entries_ =
java.util.Collections.emptyList();
private void ensureEntriesIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
entries_ = new java.util.ArrayList(entries_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry, io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry.Builder, io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.EntryOrBuilder> entriesBuilder_;
/**
*
* Descriptor entries.
*
*
* repeated .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry entries = 1 [(.validate.rules) = { ... }
*/
public java.util.List getEntriesList() {
if (entriesBuilder_ == null) {
return java.util.Collections.unmodifiableList(entries_);
} else {
return entriesBuilder_.getMessageList();
}
}
/**
*
* Descriptor entries.
*
*
* repeated .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry entries = 1 [(.validate.rules) = { ... }
*/
public int getEntriesCount() {
if (entriesBuilder_ == null) {
return entries_.size();
} else {
return entriesBuilder_.getCount();
}
}
/**
*
* Descriptor entries.
*
*
* repeated .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry entries = 1 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry getEntries(int index) {
if (entriesBuilder_ == null) {
return entries_.get(index);
} else {
return entriesBuilder_.getMessage(index);
}
}
/**
*
* Descriptor entries.
*
*
* repeated .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry entries = 1 [(.validate.rules) = { ... }
*/
public Builder setEntries(
int index, io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry value) {
if (entriesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureEntriesIsMutable();
entries_.set(index, value);
onChanged();
} else {
entriesBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Descriptor entries.
*
*
* repeated .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry entries = 1 [(.validate.rules) = { ... }
*/
public Builder setEntries(
int index, io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry.Builder builderForValue) {
if (entriesBuilder_ == null) {
ensureEntriesIsMutable();
entries_.set(index, builderForValue.build());
onChanged();
} else {
entriesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Descriptor entries.
*
*
* repeated .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry entries = 1 [(.validate.rules) = { ... }
*/
public Builder addEntries(io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry value) {
if (entriesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureEntriesIsMutable();
entries_.add(value);
onChanged();
} else {
entriesBuilder_.addMessage(value);
}
return this;
}
/**
*
* Descriptor entries.
*
*
* repeated .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry entries = 1 [(.validate.rules) = { ... }
*/
public Builder addEntries(
int index, io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry value) {
if (entriesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureEntriesIsMutable();
entries_.add(index, value);
onChanged();
} else {
entriesBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Descriptor entries.
*
*
* repeated .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry entries = 1 [(.validate.rules) = { ... }
*/
public Builder addEntries(
io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry.Builder builderForValue) {
if (entriesBuilder_ == null) {
ensureEntriesIsMutable();
entries_.add(builderForValue.build());
onChanged();
} else {
entriesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Descriptor entries.
*
*
* repeated .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry entries = 1 [(.validate.rules) = { ... }
*/
public Builder addEntries(
int index, io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry.Builder builderForValue) {
if (entriesBuilder_ == null) {
ensureEntriesIsMutable();
entries_.add(index, builderForValue.build());
onChanged();
} else {
entriesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Descriptor entries.
*
*
* repeated .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry entries = 1 [(.validate.rules) = { ... }
*/
public Builder addAllEntries(
java.lang.Iterable extends io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry> values) {
if (entriesBuilder_ == null) {
ensureEntriesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, entries_);
onChanged();
} else {
entriesBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Descriptor entries.
*
*
* repeated .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry entries = 1 [(.validate.rules) = { ... }
*/
public Builder clearEntries() {
if (entriesBuilder_ == null) {
entries_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
entriesBuilder_.clear();
}
return this;
}
/**
*
* Descriptor entries.
*
*
* repeated .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry entries = 1 [(.validate.rules) = { ... }
*/
public Builder removeEntries(int index) {
if (entriesBuilder_ == null) {
ensureEntriesIsMutable();
entries_.remove(index);
onChanged();
} else {
entriesBuilder_.remove(index);
}
return this;
}
/**
*
* Descriptor entries.
*
*
* repeated .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry entries = 1 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry.Builder getEntriesBuilder(
int index) {
return getEntriesFieldBuilder().getBuilder(index);
}
/**
*
* Descriptor entries.
*
*
* repeated .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry entries = 1 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.EntryOrBuilder getEntriesOrBuilder(
int index) {
if (entriesBuilder_ == null) {
return entries_.get(index); } else {
return entriesBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Descriptor entries.
*
*
* repeated .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry entries = 1 [(.validate.rules) = { ... }
*/
public java.util.List extends io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.EntryOrBuilder>
getEntriesOrBuilderList() {
if (entriesBuilder_ != null) {
return entriesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(entries_);
}
}
/**
*
* Descriptor entries.
*
*
* repeated .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry entries = 1 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry.Builder addEntriesBuilder() {
return getEntriesFieldBuilder().addBuilder(
io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry.getDefaultInstance());
}
/**
*
* Descriptor entries.
*
*
* repeated .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry entries = 1 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry.Builder addEntriesBuilder(
int index) {
return getEntriesFieldBuilder().addBuilder(
index, io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry.getDefaultInstance());
}
/**
*
* Descriptor entries.
*
*
* repeated .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry entries = 1 [(.validate.rules) = { ... }
*/
public java.util.List
getEntriesBuilderList() {
return getEntriesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry, io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry.Builder, io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.EntryOrBuilder>
getEntriesFieldBuilder() {
if (entriesBuilder_ == null) {
entriesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry, io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry.Builder, io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.EntryOrBuilder>(
entries_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
entries_ = null;
}
return entriesBuilder_;
}
@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.extensions.common.ratelimit.v3.RateLimitDescriptor)
}
// @@protoc_insertion_point(class_scope:envoy.extensions.common.ratelimit.v3.RateLimitDescriptor)
private static final io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor();
}
public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public RateLimitDescriptor parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new RateLimitDescriptor(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.extensions.common.ratelimit.v3.RateLimitDescriptor getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy