Please wait. This can take some minutes ...
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.
io.envoyproxy.envoy.extensions.common.ratelimit.v3.LocalRateLimitDescriptor 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;
/**
* Protobuf type {@code envoy.extensions.common.ratelimit.v3.LocalRateLimitDescriptor}
*/
public final class LocalRateLimitDescriptor extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.extensions.common.ratelimit.v3.LocalRateLimitDescriptor)
LocalRateLimitDescriptorOrBuilder {
private static final long serialVersionUID = 0L;
// Use LocalRateLimitDescriptor.newBuilder() to construct.
private LocalRateLimitDescriptor(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private LocalRateLimitDescriptor() {
entries_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new LocalRateLimitDescriptor();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private LocalRateLimitDescriptor(
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;
}
case 18: {
io.envoyproxy.envoy.type.v3.TokenBucket.Builder subBuilder = null;
if (tokenBucket_ != null) {
subBuilder = tokenBucket_.toBuilder();
}
tokenBucket_ = input.readMessage(io.envoyproxy.envoy.type.v3.TokenBucket.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(tokenBucket_);
tokenBucket_ = 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)) {
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_LocalRateLimitDescriptor_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_LocalRateLimitDescriptor_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.extensions.common.ratelimit.v3.LocalRateLimitDescriptor.class, io.envoyproxy.envoy.extensions.common.ratelimit.v3.LocalRateLimitDescriptor.Builder.class);
}
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) = { ... }
*/
@java.lang.Override
public java.util.List getEntriesList() {
return entries_;
}
/**
*
* Descriptor entries.
*
*
* repeated .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry entries = 1 [(.validate.rules) = { ... }
*/
@java.lang.Override
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) = { ... }
*/
@java.lang.Override
public int getEntriesCount() {
return entries_.size();
}
/**
*
* Descriptor entries.
*
*
* repeated .envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.Entry entries = 1 [(.validate.rules) = { ... }
*/
@java.lang.Override
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) = { ... }
*/
@java.lang.Override
public io.envoyproxy.envoy.extensions.common.ratelimit.v3.RateLimitDescriptor.EntryOrBuilder getEntriesOrBuilder(
int index) {
return entries_.get(index);
}
public static final int TOKEN_BUCKET_FIELD_NUMBER = 2;
private io.envoyproxy.envoy.type.v3.TokenBucket tokenBucket_;
/**
*
* Token Bucket algorithm for local ratelimiting.
*
*
* .envoy.type.v3.TokenBucket token_bucket = 2 [(.validate.rules) = { ... }
* @return Whether the tokenBucket field is set.
*/
@java.lang.Override
public boolean hasTokenBucket() {
return tokenBucket_ != null;
}
/**
*
* Token Bucket algorithm for local ratelimiting.
*
*
* .envoy.type.v3.TokenBucket token_bucket = 2 [(.validate.rules) = { ... }
* @return The tokenBucket.
*/
@java.lang.Override
public io.envoyproxy.envoy.type.v3.TokenBucket getTokenBucket() {
return tokenBucket_ == null ? io.envoyproxy.envoy.type.v3.TokenBucket.getDefaultInstance() : tokenBucket_;
}
/**
*
* Token Bucket algorithm for local ratelimiting.
*
*
* .envoy.type.v3.TokenBucket token_bucket = 2 [(.validate.rules) = { ... }
*/
@java.lang.Override
public io.envoyproxy.envoy.type.v3.TokenBucketOrBuilder getTokenBucketOrBuilder() {
return getTokenBucket();
}
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));
}
if (tokenBucket_ != null) {
output.writeMessage(2, getTokenBucket());
}
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));
}
if (tokenBucket_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getTokenBucket());
}
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.LocalRateLimitDescriptor)) {
return super.equals(obj);
}
io.envoyproxy.envoy.extensions.common.ratelimit.v3.LocalRateLimitDescriptor other = (io.envoyproxy.envoy.extensions.common.ratelimit.v3.LocalRateLimitDescriptor) obj;
if (!getEntriesList()
.equals(other.getEntriesList())) return false;
if (hasTokenBucket() != other.hasTokenBucket()) return false;
if (hasTokenBucket()) {
if (!getTokenBucket()
.equals(other.getTokenBucket())) 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();
}
if (hasTokenBucket()) {
hash = (37 * hash) + TOKEN_BUCKET_FIELD_NUMBER;
hash = (53 * hash) + getTokenBucket().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.LocalRateLimitDescriptor parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.LocalRateLimitDescriptor 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.LocalRateLimitDescriptor parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.LocalRateLimitDescriptor 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.LocalRateLimitDescriptor parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.LocalRateLimitDescriptor 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.LocalRateLimitDescriptor 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.LocalRateLimitDescriptor 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.LocalRateLimitDescriptor 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.LocalRateLimitDescriptor 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.LocalRateLimitDescriptor 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.LocalRateLimitDescriptor 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.LocalRateLimitDescriptor 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.LocalRateLimitDescriptor}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.extensions.common.ratelimit.v3.LocalRateLimitDescriptor)
io.envoyproxy.envoy.extensions.common.ratelimit.v3.LocalRateLimitDescriptorOrBuilder {
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_LocalRateLimitDescriptor_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_LocalRateLimitDescriptor_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.extensions.common.ratelimit.v3.LocalRateLimitDescriptor.class, io.envoyproxy.envoy.extensions.common.ratelimit.v3.LocalRateLimitDescriptor.Builder.class);
}
// Construct using io.envoyproxy.envoy.extensions.common.ratelimit.v3.LocalRateLimitDescriptor.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();
}
if (tokenBucketBuilder_ == null) {
tokenBucket_ = null;
} else {
tokenBucket_ = null;
tokenBucketBuilder_ = null;
}
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_LocalRateLimitDescriptor_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.extensions.common.ratelimit.v3.LocalRateLimitDescriptor getDefaultInstanceForType() {
return io.envoyproxy.envoy.extensions.common.ratelimit.v3.LocalRateLimitDescriptor.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.extensions.common.ratelimit.v3.LocalRateLimitDescriptor build() {
io.envoyproxy.envoy.extensions.common.ratelimit.v3.LocalRateLimitDescriptor result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.extensions.common.ratelimit.v3.LocalRateLimitDescriptor buildPartial() {
io.envoyproxy.envoy.extensions.common.ratelimit.v3.LocalRateLimitDescriptor result = new io.envoyproxy.envoy.extensions.common.ratelimit.v3.LocalRateLimitDescriptor(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();
}
if (tokenBucketBuilder_ == null) {
result.tokenBucket_ = tokenBucket_;
} else {
result.tokenBucket_ = tokenBucketBuilder_.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.LocalRateLimitDescriptor) {
return mergeFrom((io.envoyproxy.envoy.extensions.common.ratelimit.v3.LocalRateLimitDescriptor)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.extensions.common.ratelimit.v3.LocalRateLimitDescriptor other) {
if (other == io.envoyproxy.envoy.extensions.common.ratelimit.v3.LocalRateLimitDescriptor.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_);
}
}
}
if (other.hasTokenBucket()) {
mergeTokenBucket(other.getTokenBucket());
}
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.LocalRateLimitDescriptor parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.extensions.common.ratelimit.v3.LocalRateLimitDescriptor) 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_;
}
private io.envoyproxy.envoy.type.v3.TokenBucket tokenBucket_;
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.type.v3.TokenBucket, io.envoyproxy.envoy.type.v3.TokenBucket.Builder, io.envoyproxy.envoy.type.v3.TokenBucketOrBuilder> tokenBucketBuilder_;
/**
*
* Token Bucket algorithm for local ratelimiting.
*
*
* .envoy.type.v3.TokenBucket token_bucket = 2 [(.validate.rules) = { ... }
* @return Whether the tokenBucket field is set.
*/
public boolean hasTokenBucket() {
return tokenBucketBuilder_ != null || tokenBucket_ != null;
}
/**
*
* Token Bucket algorithm for local ratelimiting.
*
*
* .envoy.type.v3.TokenBucket token_bucket = 2 [(.validate.rules) = { ... }
* @return The tokenBucket.
*/
public io.envoyproxy.envoy.type.v3.TokenBucket getTokenBucket() {
if (tokenBucketBuilder_ == null) {
return tokenBucket_ == null ? io.envoyproxy.envoy.type.v3.TokenBucket.getDefaultInstance() : tokenBucket_;
} else {
return tokenBucketBuilder_.getMessage();
}
}
/**
*
* Token Bucket algorithm for local ratelimiting.
*
*
* .envoy.type.v3.TokenBucket token_bucket = 2 [(.validate.rules) = { ... }
*/
public Builder setTokenBucket(io.envoyproxy.envoy.type.v3.TokenBucket value) {
if (tokenBucketBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
tokenBucket_ = value;
onChanged();
} else {
tokenBucketBuilder_.setMessage(value);
}
return this;
}
/**
*
* Token Bucket algorithm for local ratelimiting.
*
*
* .envoy.type.v3.TokenBucket token_bucket = 2 [(.validate.rules) = { ... }
*/
public Builder setTokenBucket(
io.envoyproxy.envoy.type.v3.TokenBucket.Builder builderForValue) {
if (tokenBucketBuilder_ == null) {
tokenBucket_ = builderForValue.build();
onChanged();
} else {
tokenBucketBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Token Bucket algorithm for local ratelimiting.
*
*
* .envoy.type.v3.TokenBucket token_bucket = 2 [(.validate.rules) = { ... }
*/
public Builder mergeTokenBucket(io.envoyproxy.envoy.type.v3.TokenBucket value) {
if (tokenBucketBuilder_ == null) {
if (tokenBucket_ != null) {
tokenBucket_ =
io.envoyproxy.envoy.type.v3.TokenBucket.newBuilder(tokenBucket_).mergeFrom(value).buildPartial();
} else {
tokenBucket_ = value;
}
onChanged();
} else {
tokenBucketBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Token Bucket algorithm for local ratelimiting.
*
*
* .envoy.type.v3.TokenBucket token_bucket = 2 [(.validate.rules) = { ... }
*/
public Builder clearTokenBucket() {
if (tokenBucketBuilder_ == null) {
tokenBucket_ = null;
onChanged();
} else {
tokenBucket_ = null;
tokenBucketBuilder_ = null;
}
return this;
}
/**
*
* Token Bucket algorithm for local ratelimiting.
*
*
* .envoy.type.v3.TokenBucket token_bucket = 2 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.type.v3.TokenBucket.Builder getTokenBucketBuilder() {
onChanged();
return getTokenBucketFieldBuilder().getBuilder();
}
/**
*
* Token Bucket algorithm for local ratelimiting.
*
*
* .envoy.type.v3.TokenBucket token_bucket = 2 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.type.v3.TokenBucketOrBuilder getTokenBucketOrBuilder() {
if (tokenBucketBuilder_ != null) {
return tokenBucketBuilder_.getMessageOrBuilder();
} else {
return tokenBucket_ == null ?
io.envoyproxy.envoy.type.v3.TokenBucket.getDefaultInstance() : tokenBucket_;
}
}
/**
*
* Token Bucket algorithm for local ratelimiting.
*
*
* .envoy.type.v3.TokenBucket token_bucket = 2 [(.validate.rules) = { ... }
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.type.v3.TokenBucket, io.envoyproxy.envoy.type.v3.TokenBucket.Builder, io.envoyproxy.envoy.type.v3.TokenBucketOrBuilder>
getTokenBucketFieldBuilder() {
if (tokenBucketBuilder_ == null) {
tokenBucketBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.type.v3.TokenBucket, io.envoyproxy.envoy.type.v3.TokenBucket.Builder, io.envoyproxy.envoy.type.v3.TokenBucketOrBuilder>(
getTokenBucket(),
getParentForChildren(),
isClean());
tokenBucket_ = null;
}
return tokenBucketBuilder_;
}
@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.LocalRateLimitDescriptor)
}
// @@protoc_insertion_point(class_scope:envoy.extensions.common.ratelimit.v3.LocalRateLimitDescriptor)
private static final io.envoyproxy.envoy.extensions.common.ratelimit.v3.LocalRateLimitDescriptor DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.extensions.common.ratelimit.v3.LocalRateLimitDescriptor();
}
public static io.envoyproxy.envoy.extensions.common.ratelimit.v3.LocalRateLimitDescriptor getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public LocalRateLimitDescriptor parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new LocalRateLimitDescriptor(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.LocalRateLimitDescriptor getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}