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 typeenvoy.service.ratelimit.v3.RateLimitResponse.Quota- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRateLimitResponse.Quota.BuilderCacheable quota for responses.static classRateLimitResponse.Quota.ExpirationSpecifierCase-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
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
-
-
Field Summary
Fields Modifier and Type Field Description static intID_FIELD_NUMBERstatic intREQUESTS_FIELD_NUMBERstatic intVALID_UNTIL_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)static RateLimitResponse.QuotagetDefaultInstance()RateLimitResponse.QuotagetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()RateLimitResponse.Quota.ExpirationSpecifierCasegetExpirationSpecifierCase()StringgetId()The unique id that is associated with each Quota either at individual descriptor level or whole descriptor set level.com.google.protobuf.ByteStringgetIdBytes()The unique id that is associated with each Quota either at individual descriptor level or whole descriptor set level.com.google.protobuf.Parser<RateLimitResponse.Quota>getParserForType()intgetRequests()Number of matching requests granted in quota.intgetSerializedSize()com.google.protobuf.UnknownFieldSetgetUnknownFields()com.google.protobuf.TimestampgetValidUntil()Point in time at which the quota expires.com.google.protobuf.TimestampOrBuildergetValidUntilOrBuilder()Point in time at which the quota expires.inthashCode()booleanhasValidUntil()Point in time at which the quota expires.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()static RateLimitResponse.Quota.BuildernewBuilder()static RateLimitResponse.Quota.BuildernewBuilder(RateLimitResponse.Quota prototype)RateLimitResponse.Quota.BuildernewBuilderForType()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()RateLimitResponse.Quota.BuildertoBuilder()voidwriteTo(com.google.protobuf.CodedOutputStream output)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, isStringEmpty, 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, writeStringNoTag
-
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
REQUESTS_FIELD_NUMBER
public static final int REQUESTS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
VALID_UNTIL_FIELD_NUMBER
public static final int VALID_UNTIL_FIELD_NUMBER
- See Also:
- Constant Field Values
-
ID_FIELD_NUMBER
public static final int ID_FIELD_NUMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
newInstance
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
- Overrides:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getUnknownFields
public final com.google.protobuf.UnknownFieldSet getUnknownFields()
- Specified by:
getUnknownFieldsin interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getUnknownFieldsin 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
public RateLimitResponse.Quota.ExpirationSpecifierCase 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
public String 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
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException- 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
public boolean equals(Object obj)
- 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
public static RateLimitResponse.Quota parseFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static RateLimitResponse.Quota parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static RateLimitResponse.Quota parseDelimitedFrom(InputStream input) throws IOException
- 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
public RateLimitResponse.Quota.Builder newBuilderForType()
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
public static RateLimitResponse.Quota.Builder newBuilder()
-
newBuilder
public static RateLimitResponse.Quota.Builder newBuilder(RateLimitResponse.Quota prototype)
-
toBuilder
public RateLimitResponse.Quota.Builder 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
public static RateLimitResponse.Quota getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<RateLimitResponse.Quota> parser()
-
getParserForType
public com.google.protobuf.Parser<RateLimitResponse.Quota> getParserForType()
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public RateLimitResponse.Quota getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
-