public final class RateLimitRequest extends com.google.protobuf.GeneratedMessageV3 implements RateLimitRequestOrBuilder
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
envoy.service.ratelimit.v2.RateLimitRequest| Modifier and Type | Class and Description |
|---|---|
static class |
RateLimitRequest.Builder
Main message for a rate limit request.
|
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter| Modifier and Type | Field and Description |
|---|---|
static int |
DESCRIPTORS_FIELD_NUMBER |
static int |
DOMAIN_FIELD_NUMBER |
static int |
HITS_ADDEND_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
static RateLimitRequest |
getDefaultInstance() |
RateLimitRequest |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
RateLimitDescriptor |
getDescriptors(int index)
All rate limit requests must specify at least one RateLimitDescriptor.
|
int |
getDescriptorsCount()
All rate limit requests must specify at least one RateLimitDescriptor.
|
List<RateLimitDescriptor> |
getDescriptorsList()
All rate limit requests must specify at least one RateLimitDescriptor.
|
RateLimitDescriptorOrBuilder |
getDescriptorsOrBuilder(int index)
All rate limit requests must specify at least one RateLimitDescriptor.
|
List<? extends RateLimitDescriptorOrBuilder> |
getDescriptorsOrBuilderList()
All rate limit requests must specify at least one RateLimitDescriptor.
|
String |
getDomain()
All rate limit requests must specify a domain.
|
com.google.protobuf.ByteString |
getDomainBytes()
All rate limit requests must specify a domain.
|
int |
getHitsAddend()
Rate limit requests can optionally specify the number of hits a request adds to the matched
limit.
|
com.google.protobuf.Parser<RateLimitRequest> |
getParserForType() |
int |
getSerializedSize() |
com.google.protobuf.UnknownFieldSet |
getUnknownFields() |
int |
hashCode() |
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static RateLimitRequest.Builder |
newBuilder() |
static RateLimitRequest.Builder |
newBuilder(RateLimitRequest prototype) |
RateLimitRequest.Builder |
newBuilderForType() |
protected RateLimitRequest.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static RateLimitRequest |
parseDelimitedFrom(InputStream input) |
static RateLimitRequest |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static RateLimitRequest |
parseFrom(byte[] data) |
static RateLimitRequest |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static RateLimitRequest |
parseFrom(ByteBuffer data) |
static RateLimitRequest |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static RateLimitRequest |
parseFrom(com.google.protobuf.ByteString data) |
static RateLimitRequest |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static RateLimitRequest |
parseFrom(com.google.protobuf.CodedInputStream input) |
static RateLimitRequest |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static RateLimitRequest |
parseFrom(InputStream input) |
static RateLimitRequest |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<RateLimitRequest> |
parser() |
RateLimitRequest.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, makeExtensionsImmutable, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int DOMAIN_FIELD_NUMBER
public static final int DESCRIPTORS_FIELD_NUMBER
public static final int HITS_ADDEND_FIELD_NUMBER
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance in class com.google.protobuf.GeneratedMessageV3public final com.google.protobuf.UnknownFieldSet getUnknownFields()
getUnknownFields in interface com.google.protobuf.MessageOrBuildergetUnknownFields in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public String getDomain()
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;getDomain in interface RateLimitRequestOrBuilderpublic com.google.protobuf.ByteString getDomainBytes()
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;getDomainBytes in interface RateLimitRequestOrBuilderpublic List<RateLimitDescriptor> getDescriptorsList()
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;getDescriptorsList in interface RateLimitRequestOrBuilderpublic List<? extends RateLimitDescriptorOrBuilder> getDescriptorsOrBuilderList()
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;getDescriptorsOrBuilderList in interface RateLimitRequestOrBuilderpublic int getDescriptorsCount()
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;getDescriptorsCount in interface RateLimitRequestOrBuilderpublic RateLimitDescriptor getDescriptors(int 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;getDescriptors in interface RateLimitRequestOrBuilderpublic RateLimitDescriptorOrBuilder getDescriptorsOrBuilder(int 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;getDescriptorsOrBuilder in interface RateLimitRequestOrBuilderpublic int getHitsAddend()
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;getHitsAddend in interface RateLimitRequestOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static RateLimitRequest parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RateLimitRequest parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RateLimitRequest parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RateLimitRequest parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RateLimitRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RateLimitRequest parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RateLimitRequest parseFrom(InputStream input) throws IOException
IOExceptionpublic static RateLimitRequest parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static RateLimitRequest parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static RateLimitRequest parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static RateLimitRequest parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static RateLimitRequest parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic RateLimitRequest.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static RateLimitRequest.Builder newBuilder()
public static RateLimitRequest.Builder newBuilder(RateLimitRequest prototype)
public RateLimitRequest.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected RateLimitRequest.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static RateLimitRequest getDefaultInstance()
public static com.google.protobuf.Parser<RateLimitRequest> parser()
public com.google.protobuf.Parser<RateLimitRequest> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public RateLimitRequest getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2018–2021 The Envoy Project. All rights reserved.