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/service/ratelimit/v2/rls.proto
package io.envoyproxy.envoy.service.ratelimit.v2;
/**
*
* Main message for a rate limit request. The rate limit service is designed to be fully generic
* in the sense that it can operate on arbitrary hierarchical key/value pairs. The loaded
* configuration will parse the request and find the most specific limit to apply. In addition,
* a RateLimitRequest can contain multiple "descriptors" to limit on. When multiple descriptors
* are provided, the server will limit on *ALL* of them and return an OVER_LIMIT response if any
* of them are over limit. This enables more complex application level rate limiting scenarios
* if desired.
*
*
* Protobuf type {@code envoy.service.ratelimit.v2.RateLimitRequest}
*/
public final class RateLimitRequest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.service.ratelimit.v2.RateLimitRequest)
RateLimitRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use RateLimitRequest.newBuilder() to construct.
private RateLimitRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private RateLimitRequest() {
domain_ = "";
descriptors_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new RateLimitRequest();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private RateLimitRequest(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
domain_ = s;
break;
}
case 18: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
descriptors_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
descriptors_.add(
input.readMessage(io.envoyproxy.envoy.api.v2.ratelimit.RateLimitDescriptor.parser(), extensionRegistry));
break;
}
case 24: {
hitsAddend_ = input.readUInt32();
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)) {
descriptors_ = java.util.Collections.unmodifiableList(descriptors_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.service.ratelimit.v2.RlsProto.internal_static_envoy_service_ratelimit_v2_RateLimitRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.service.ratelimit.v2.RlsProto.internal_static_envoy_service_ratelimit_v2_RateLimitRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.service.ratelimit.v2.RateLimitRequest.class, io.envoyproxy.envoy.service.ratelimit.v2.RateLimitRequest.Builder.class);
}
public static final int DOMAIN_FIELD_NUMBER = 1;
private volatile java.lang.Object domain_;
/**
*
* All rate limit requests must specify a domain. This enables the configuration to be per
* application without fear of overlap. E.g., "envoy".
*
* All rate limit requests must specify a domain. This enables the configuration to be per
* application without fear of overlap. E.g., "envoy".
*
*
* string domain = 1;
*/
public com.google.protobuf.ByteString
getDomainBytes() {
java.lang.Object ref = domain_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
domain_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DESCRIPTORS_FIELD_NUMBER = 2;
private java.util.List descriptors_;
/**
*
* All rate limit requests must specify at least one RateLimitDescriptor. Each descriptor is
* processed by the service (see below). If any of the descriptors are over limit, the entire
* request is considered to be over limit.
*
* All rate limit requests must specify at least one RateLimitDescriptor. Each descriptor is
* processed by the service (see below). If any of the descriptors are over limit, the entire
* request is considered to be over limit.
*
* All rate limit requests must specify at least one RateLimitDescriptor. Each descriptor is
* processed by the service (see below). If any of the descriptors are over limit, the entire
* request is considered to be over limit.
*
*
* repeated .envoy.api.v2.ratelimit.RateLimitDescriptor descriptors = 2;
*/
public int getDescriptorsCount() {
return descriptors_.size();
}
/**
*
* All rate limit requests must specify at least one RateLimitDescriptor. Each descriptor is
* processed by the service (see below). If any of the descriptors are over limit, the entire
* request is considered to be over limit.
*
* All rate limit requests must specify at least one RateLimitDescriptor. Each descriptor is
* processed by the service (see below). If any of the descriptors are over limit, the entire
* request is considered to be over limit.
*
*
* repeated .envoy.api.v2.ratelimit.RateLimitDescriptor descriptors = 2;
*/
public io.envoyproxy.envoy.api.v2.ratelimit.RateLimitDescriptorOrBuilder getDescriptorsOrBuilder(
int index) {
return descriptors_.get(index);
}
public static final int HITS_ADDEND_FIELD_NUMBER = 3;
private int hitsAddend_;
/**
*
* Rate limit requests can optionally specify the number of hits a request adds to the matched
* limit. If the value is not set in the message, a request increases the matched limit by 1.
*
*
* uint32 hits_addend = 3;
*/
public int getHitsAddend() {
return hitsAddend_;
}
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 (!getDomainBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, domain_);
}
for (int i = 0; i < descriptors_.size(); i++) {
output.writeMessage(2, descriptors_.get(i));
}
if (hitsAddend_ != 0) {
output.writeUInt32(3, hitsAddend_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getDomainBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, domain_);
}
for (int i = 0; i < descriptors_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, descriptors_.get(i));
}
if (hitsAddend_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(3, hitsAddend_);
}
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.service.ratelimit.v2.RateLimitRequest)) {
return super.equals(obj);
}
io.envoyproxy.envoy.service.ratelimit.v2.RateLimitRequest other = (io.envoyproxy.envoy.service.ratelimit.v2.RateLimitRequest) obj;
if (!getDomain()
.equals(other.getDomain())) return false;
if (!getDescriptorsList()
.equals(other.getDescriptorsList())) return false;
if (getHitsAddend()
!= other.getHitsAddend()) 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) + DOMAIN_FIELD_NUMBER;
hash = (53 * hash) + getDomain().hashCode();
if (getDescriptorsCount() > 0) {
hash = (37 * hash) + DESCRIPTORS_FIELD_NUMBER;
hash = (53 * hash) + getDescriptorsList().hashCode();
}
hash = (37 * hash) + HITS_ADDEND_FIELD_NUMBER;
hash = (53 * hash) + getHitsAddend();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.service.ratelimit.v2.RateLimitRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.service.ratelimit.v2.RateLimitRequest 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.service.ratelimit.v2.RateLimitRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.service.ratelimit.v2.RateLimitRequest 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.service.ratelimit.v2.RateLimitRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.service.ratelimit.v2.RateLimitRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.service.ratelimit.v2.RateLimitRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.service.ratelimit.v2.RateLimitRequest 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.service.ratelimit.v2.RateLimitRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.service.ratelimit.v2.RateLimitRequest 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.service.ratelimit.v2.RateLimitRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.service.ratelimit.v2.RateLimitRequest 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.service.ratelimit.v2.RateLimitRequest 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;
}
/**
*
* Main message for a rate limit request. The rate limit service is designed to be fully generic
* in the sense that it can operate on arbitrary hierarchical key/value pairs. The loaded
* configuration will parse the request and find the most specific limit to apply. In addition,
* a RateLimitRequest can contain multiple "descriptors" to limit on. When multiple descriptors
* are provided, the server will limit on *ALL* of them and return an OVER_LIMIT response if any
* of them are over limit. This enables more complex application level rate limiting scenarios
* if desired.
*
*
* Protobuf type {@code envoy.service.ratelimit.v2.RateLimitRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.service.ratelimit.v2.RateLimitRequest)
io.envoyproxy.envoy.service.ratelimit.v2.RateLimitRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.service.ratelimit.v2.RlsProto.internal_static_envoy_service_ratelimit_v2_RateLimitRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.service.ratelimit.v2.RlsProto.internal_static_envoy_service_ratelimit_v2_RateLimitRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.service.ratelimit.v2.RateLimitRequest.class, io.envoyproxy.envoy.service.ratelimit.v2.RateLimitRequest.Builder.class);
}
// Construct using io.envoyproxy.envoy.service.ratelimit.v2.RateLimitRequest.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getDescriptorsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
domain_ = "";
if (descriptorsBuilder_ == null) {
descriptors_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
descriptorsBuilder_.clear();
}
hitsAddend_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.service.ratelimit.v2.RlsProto.internal_static_envoy_service_ratelimit_v2_RateLimitRequest_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.service.ratelimit.v2.RateLimitRequest getDefaultInstanceForType() {
return io.envoyproxy.envoy.service.ratelimit.v2.RateLimitRequest.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.service.ratelimit.v2.RateLimitRequest build() {
io.envoyproxy.envoy.service.ratelimit.v2.RateLimitRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.service.ratelimit.v2.RateLimitRequest buildPartial() {
io.envoyproxy.envoy.service.ratelimit.v2.RateLimitRequest result = new io.envoyproxy.envoy.service.ratelimit.v2.RateLimitRequest(this);
int from_bitField0_ = bitField0_;
result.domain_ = domain_;
if (descriptorsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
descriptors_ = java.util.Collections.unmodifiableList(descriptors_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.descriptors_ = descriptors_;
} else {
result.descriptors_ = descriptorsBuilder_.build();
}
result.hitsAddend_ = hitsAddend_;
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.service.ratelimit.v2.RateLimitRequest) {
return mergeFrom((io.envoyproxy.envoy.service.ratelimit.v2.RateLimitRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.service.ratelimit.v2.RateLimitRequest other) {
if (other == io.envoyproxy.envoy.service.ratelimit.v2.RateLimitRequest.getDefaultInstance()) return this;
if (!other.getDomain().isEmpty()) {
domain_ = other.domain_;
onChanged();
}
if (descriptorsBuilder_ == null) {
if (!other.descriptors_.isEmpty()) {
if (descriptors_.isEmpty()) {
descriptors_ = other.descriptors_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureDescriptorsIsMutable();
descriptors_.addAll(other.descriptors_);
}
onChanged();
}
} else {
if (!other.descriptors_.isEmpty()) {
if (descriptorsBuilder_.isEmpty()) {
descriptorsBuilder_.dispose();
descriptorsBuilder_ = null;
descriptors_ = other.descriptors_;
bitField0_ = (bitField0_ & ~0x00000001);
descriptorsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getDescriptorsFieldBuilder() : null;
} else {
descriptorsBuilder_.addAllMessages(other.descriptors_);
}
}
}
if (other.getHitsAddend() != 0) {
setHitsAddend(other.getHitsAddend());
}
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.service.ratelimit.v2.RateLimitRequest parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.service.ratelimit.v2.RateLimitRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object domain_ = "";
/**
*
* All rate limit requests must specify a domain. This enables the configuration to be per
* application without fear of overlap. E.g., "envoy".
*
* All rate limit requests must specify at least one RateLimitDescriptor. Each descriptor is
* processed by the service (see below). If any of the descriptors are over limit, the entire
* request is considered to be over limit.
*
* All rate limit requests must specify at least one RateLimitDescriptor. Each descriptor is
* processed by the service (see below). If any of the descriptors are over limit, the entire
* request is considered to be over limit.
*
*
* repeated .envoy.api.v2.ratelimit.RateLimitDescriptor descriptors = 2;
*/
public int getDescriptorsCount() {
if (descriptorsBuilder_ == null) {
return descriptors_.size();
} else {
return descriptorsBuilder_.getCount();
}
}
/**
*
* All rate limit requests must specify at least one RateLimitDescriptor. Each descriptor is
* processed by the service (see below). If any of the descriptors are over limit, the entire
* request is considered to be over limit.
*
* All rate limit requests must specify at least one RateLimitDescriptor. Each descriptor is
* processed by the service (see below). If any of the descriptors are over limit, the entire
* request is considered to be over limit.
*
*
* repeated .envoy.api.v2.ratelimit.RateLimitDescriptor descriptors = 2;
*/
public Builder setDescriptors(
int index, io.envoyproxy.envoy.api.v2.ratelimit.RateLimitDescriptor value) {
if (descriptorsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureDescriptorsIsMutable();
descriptors_.set(index, value);
onChanged();
} else {
descriptorsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* All rate limit requests must specify at least one RateLimitDescriptor. Each descriptor is
* processed by the service (see below). If any of the descriptors are over limit, the entire
* request is considered to be over limit.
*
* All rate limit requests must specify at least one RateLimitDescriptor. Each descriptor is
* processed by the service (see below). If any of the descriptors are over limit, the entire
* request is considered to be over limit.
*
*
* repeated .envoy.api.v2.ratelimit.RateLimitDescriptor descriptors = 2;
*/
public Builder addDescriptors(io.envoyproxy.envoy.api.v2.ratelimit.RateLimitDescriptor value) {
if (descriptorsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureDescriptorsIsMutable();
descriptors_.add(value);
onChanged();
} else {
descriptorsBuilder_.addMessage(value);
}
return this;
}
/**
*
* All rate limit requests must specify at least one RateLimitDescriptor. Each descriptor is
* processed by the service (see below). If any of the descriptors are over limit, the entire
* request is considered to be over limit.
*
*
* repeated .envoy.api.v2.ratelimit.RateLimitDescriptor descriptors = 2;
*/
public Builder addDescriptors(
int index, io.envoyproxy.envoy.api.v2.ratelimit.RateLimitDescriptor value) {
if (descriptorsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureDescriptorsIsMutable();
descriptors_.add(index, value);
onChanged();
} else {
descriptorsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* All rate limit requests must specify at least one RateLimitDescriptor. Each descriptor is
* processed by the service (see below). If any of the descriptors are over limit, the entire
* request is considered to be over limit.
*
* All rate limit requests must specify at least one RateLimitDescriptor. Each descriptor is
* processed by the service (see below). If any of the descriptors are over limit, the entire
* request is considered to be over limit.
*
* All rate limit requests must specify at least one RateLimitDescriptor. Each descriptor is
* processed by the service (see below). If any of the descriptors are over limit, the entire
* request is considered to be over limit.
*
* All rate limit requests must specify at least one RateLimitDescriptor. Each descriptor is
* processed by the service (see below). If any of the descriptors are over limit, the entire
* request is considered to be over limit.
*
* All rate limit requests must specify at least one RateLimitDescriptor. Each descriptor is
* processed by the service (see below). If any of the descriptors are over limit, the entire
* request is considered to be over limit.
*
* All rate limit requests must specify at least one RateLimitDescriptor. Each descriptor is
* processed by the service (see below). If any of the descriptors are over limit, the entire
* request is considered to be over limit.
*
*
* repeated .envoy.api.v2.ratelimit.RateLimitDescriptor descriptors = 2;
*/
public io.envoyproxy.envoy.api.v2.ratelimit.RateLimitDescriptor.Builder getDescriptorsBuilder(
int index) {
return getDescriptorsFieldBuilder().getBuilder(index);
}
/**
*
* All rate limit requests must specify at least one RateLimitDescriptor. Each descriptor is
* processed by the service (see below). If any of the descriptors are over limit, the entire
* request is considered to be over limit.
*
*
* repeated .envoy.api.v2.ratelimit.RateLimitDescriptor descriptors = 2;
*/
public io.envoyproxy.envoy.api.v2.ratelimit.RateLimitDescriptorOrBuilder getDescriptorsOrBuilder(
int index) {
if (descriptorsBuilder_ == null) {
return descriptors_.get(index); } else {
return descriptorsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* All rate limit requests must specify at least one RateLimitDescriptor. Each descriptor is
* processed by the service (see below). If any of the descriptors are over limit, the entire
* request is considered to be over limit.
*
* All rate limit requests must specify at least one RateLimitDescriptor. Each descriptor is
* processed by the service (see below). If any of the descriptors are over limit, the entire
* request is considered to be over limit.
*
* All rate limit requests must specify at least one RateLimitDescriptor. Each descriptor is
* processed by the service (see below). If any of the descriptors are over limit, the entire
* request is considered to be over limit.
*
* All rate limit requests must specify at least one RateLimitDescriptor. Each descriptor is
* processed by the service (see below). If any of the descriptors are over limit, the entire
* request is considered to be over limit.
*
* Rate limit requests can optionally specify the number of hits a request adds to the matched
* limit. If the value is not set in the message, a request increases the matched limit by 1.
*
*
* uint32 hits_addend = 3;
*/
public int getHitsAddend() {
return hitsAddend_;
}
/**
*
* Rate limit requests can optionally specify the number of hits a request adds to the matched
* limit. If the value is not set in the message, a request increases the matched limit by 1.
*
* Rate limit requests can optionally specify the number of hits a request adds to the matched
* limit. If the value is not set in the message, a request increases the matched limit by 1.
*
*
* uint32 hits_addend = 3;
*/
public Builder clearHitsAddend() {
hitsAddend_ = 0;
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.service.ratelimit.v2.RateLimitRequest)
}
// @@protoc_insertion_point(class_scope:envoy.service.ratelimit.v2.RateLimitRequest)
private static final io.envoyproxy.envoy.service.ratelimit.v2.RateLimitRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.service.ratelimit.v2.RateLimitRequest();
}
public static io.envoyproxy.envoy.service.ratelimit.v2.RateLimitRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public RateLimitRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new RateLimitRequest(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.service.ratelimit.v2.RateLimitRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}