Class RateLimitResponse.Quota
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota
- All Implemented Interfaces:
com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,RateLimitResponse.QuotaOrBuilder,Serializable
- Enclosing class:
- RateLimitResponse
public static final class RateLimitResponse.Quota
extends com.google.protobuf.GeneratedMessageV3
implements RateLimitResponse.QuotaOrBuilder
Cacheable quota for responses. Quota can be granted at different levels: either for each individual descriptor or for the whole descriptor set. This is a certain number of requests over a period of time. The client may cache this result and apply the effective RateLimitResponse to future matching requests without querying rate limit service. When quota expires due to timeout, a new RLS request will also be made. The implementation may choose to preemptively query the rate limit server for more quota on or before expiration or before the available quota runs out. [#not-implemented-hide:]Protobuf type
envoy.service.ratelimit.v3.RateLimitResponse.Quota- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classCacheable quota for responses.static enumNested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT, BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessageV3
alwaysUseFieldBuilders, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic RateLimitResponse.Quotastatic final com.google.protobuf.Descriptors.DescriptorgetId()The unique id that is associated with each Quota either at individual descriptor level or whole descriptor set level.com.google.protobuf.ByteStringThe unique id that is associated with each Quota either at individual descriptor level or whole descriptor set level.com.google.protobuf.Parser<RateLimitResponse.Quota>intNumber of matching requests granted in quota.intcom.google.protobuf.TimestampPoint in time at which the quota expires.com.google.protobuf.TimestampOrBuilderPoint in time at which the quota expires.inthashCode()booleanPoint in time at which the quota expires.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleannewBuilder(RateLimitResponse.Quota prototype) protected RateLimitResponse.Quota.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) static RateLimitResponse.QuotaparseDelimitedFrom(InputStream input) static RateLimitResponse.QuotaparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static RateLimitResponse.QuotaparseFrom(byte[] data) static RateLimitResponse.QuotaparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static RateLimitResponse.QuotaparseFrom(com.google.protobuf.ByteString data) static RateLimitResponse.QuotaparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static RateLimitResponse.QuotaparseFrom(com.google.protobuf.CodedInputStream input) static RateLimitResponse.QuotaparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static RateLimitResponse.QuotaparseFrom(InputStream input) static RateLimitResponse.QuotaparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static RateLimitResponse.QuotaparseFrom(ByteBuffer data) static RateLimitResponse.QuotaparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<RateLimitResponse.Quota>parser()voidwriteTo(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, 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, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
REQUESTS_FIELD_NUMBER
public static final int REQUESTS_FIELD_NUMBER- See Also:
-
VALID_UNTIL_FIELD_NUMBER
public static final int VALID_UNTIL_FIELD_NUMBER- See Also:
-
ID_FIELD_NUMBER
public static final int ID_FIELD_NUMBER- See Also:
-
-
Method Details
-
newInstance
- Overrides:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3
-
getExpirationSpecifierCase
- Specified by:
getExpirationSpecifierCasein interfaceRateLimitResponse.QuotaOrBuilder
-
getRequests
public int getRequests()Number of matching requests granted in quota. Must be 1 or more.
uint32 requests = 1 [(.validate.rules) = { ... }- Specified by:
getRequestsin interfaceRateLimitResponse.QuotaOrBuilder- Returns:
- The requests.
-
hasValidUntil
public boolean hasValidUntil()Point in time at which the quota expires.
.google.protobuf.Timestamp valid_until = 2;- Specified by:
hasValidUntilin interfaceRateLimitResponse.QuotaOrBuilder- Returns:
- Whether the validUntil field is set.
-
getValidUntil
public com.google.protobuf.Timestamp getValidUntil()Point in time at which the quota expires.
.google.protobuf.Timestamp valid_until = 2;- Specified by:
getValidUntilin interfaceRateLimitResponse.QuotaOrBuilder- Returns:
- The validUntil.
-
getValidUntilOrBuilder
public com.google.protobuf.TimestampOrBuilder getValidUntilOrBuilder()Point in time at which the quota expires.
.google.protobuf.Timestamp valid_until = 2;- Specified by:
getValidUntilOrBuilderin interfaceRateLimitResponse.QuotaOrBuilder
-
getId
The unique id that is associated with each Quota either at individual descriptor level or whole descriptor set level. For a matching policy with boolean logic, for example, match: "request.headers['environment'] == 'staging' || request.headers['environment'] == 'dev'"), the request_headers action produces a distinct list of descriptors for each possible value of the ‘environment’ header even though the granted quota is same. Thus, the client will use this id information (returned from RLS server) to correctly correlate the multiple descriptors/descriptor sets that have been granted with same quota (i.e., share the same quota among multiple descriptors or descriptor sets.) If id is empty, this id field will be ignored. If quota for the same id changes (e.g. due to configuration update), the old quota will be overridden by the new one. Shared quotas referenced by ID will still adhere to expiration after `valid_until`.
string id = 3;- Specified by:
getIdin interfaceRateLimitResponse.QuotaOrBuilder- Returns:
- The id.
-
getIdBytes
public com.google.protobuf.ByteString getIdBytes()The unique id that is associated with each Quota either at individual descriptor level or whole descriptor set level. For a matching policy with boolean logic, for example, match: "request.headers['environment'] == 'staging' || request.headers['environment'] == 'dev'"), the request_headers action produces a distinct list of descriptors for each possible value of the ‘environment’ header even though the granted quota is same. Thus, the client will use this id information (returned from RLS server) to correctly correlate the multiple descriptors/descriptor sets that have been granted with same quota (i.e., share the same quota among multiple descriptors or descriptor sets.) If id is empty, this id field will be ignored. If quota for the same id changes (e.g. due to configuration update), the old quota will be overridden by the new one. Shared quotas referenced by ID will still adhere to expiration after `valid_until`.
string id = 3;- Specified by:
getIdBytesin interfaceRateLimitResponse.QuotaOrBuilder- Returns:
- The bytes for id.
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessageV3- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessageV3
-
equals
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static RateLimitResponse.Quota parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static RateLimitResponse.Quota parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static RateLimitResponse.Quota parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static RateLimitResponse.Quota parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static RateLimitResponse.Quota parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static RateLimitResponse.Quota parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static RateLimitResponse.Quota parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static RateLimitResponse.Quota parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
public static RateLimitResponse.Quota parseFrom(com.google.protobuf.CodedInputStream input) throws IOException - Throws:
IOException
-
parseFrom
public static RateLimitResponse.Quota parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected RateLimitResponse.Quota.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) - Specified by:
newBuilderForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-