Class RateLimitResponse.Quota.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderType>
-
- com.google.protobuf.GeneratedMessageV3.Builder<RateLimitResponse.Quota.Builder>
-
- io.envoyproxy.envoy.service.ratelimit.v3.RateLimitResponse.Quota.Builder
-
- All Implemented Interfaces:
com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,RateLimitResponse.QuotaOrBuilder,Cloneable
- Enclosing class:
- RateLimitResponse.Quota
public static final class RateLimitResponse.Quota.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<RateLimitResponse.Quota.Builder> 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
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description RateLimitResponse.Quota.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)RateLimitResponse.Quotabuild()RateLimitResponse.QuotabuildPartial()RateLimitResponse.Quota.Builderclear()RateLimitResponse.Quota.BuilderclearExpirationSpecifier()RateLimitResponse.Quota.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)RateLimitResponse.Quota.BuilderclearId()The unique id that is associated with each Quota either at individual descriptor level or whole descriptor set level.RateLimitResponse.Quota.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)RateLimitResponse.Quota.BuilderclearRequests()Number of matching requests granted in quota.RateLimitResponse.Quota.BuilderclearValidUntil()Point in time at which the quota expires.RateLimitResponse.Quota.Builderclone()RateLimitResponse.QuotagetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()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.intgetRequests()Number of matching requests granted in quota.com.google.protobuf.TimestampgetValidUntil()Point in time at which the quota expires.com.google.protobuf.Timestamp.BuildergetValidUntilBuilder()Point in time at which the quota expires.com.google.protobuf.TimestampOrBuildergetValidUntilOrBuilder()Point in time at which the quota expires.booleanhasValidUntil()Point in time at which the quota expires.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()RateLimitResponse.Quota.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)RateLimitResponse.Quota.BuildermergeFrom(com.google.protobuf.Message other)RateLimitResponse.Quota.BuildermergeFrom(RateLimitResponse.Quota other)RateLimitResponse.Quota.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)RateLimitResponse.Quota.BuildermergeValidUntil(com.google.protobuf.Timestamp value)Point in time at which the quota expires.RateLimitResponse.Quota.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)RateLimitResponse.Quota.BuildersetId(String value)The unique id that is associated with each Quota either at individual descriptor level or whole descriptor set level.RateLimitResponse.Quota.BuildersetIdBytes(com.google.protobuf.ByteString value)The unique id that is associated with each Quota either at individual descriptor level or whole descriptor set level.RateLimitResponse.Quota.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)RateLimitResponse.Quota.BuildersetRequests(int value)Number of matching requests granted in quota.RateLimitResponse.Quota.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)RateLimitResponse.Quota.BuildersetValidUntil(com.google.protobuf.Timestamp value)Point in time at which the quota expires.RateLimitResponse.Quota.BuildersetValidUntil(com.google.protobuf.Timestamp.Builder builderForValue)Point in time at which the quota expires.-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, newBuilderForField, onBuilt, onChanged, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
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.Builder<RateLimitResponse.Quota.Builder>
-
clear
public RateLimitResponse.Quota.Builder clear()
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<RateLimitResponse.Quota.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<RateLimitResponse.Quota.Builder>
-
getDefaultInstanceForType
public RateLimitResponse.Quota getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public RateLimitResponse.Quota build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public RateLimitResponse.Quota buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
public RateLimitResponse.Quota.Builder clone()
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<RateLimitResponse.Quota.Builder>
-
setField
public RateLimitResponse.Quota.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<RateLimitResponse.Quota.Builder>
-
clearField
public RateLimitResponse.Quota.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<RateLimitResponse.Quota.Builder>
-
clearOneof
public RateLimitResponse.Quota.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<RateLimitResponse.Quota.Builder>
-
setRepeatedField
public RateLimitResponse.Quota.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<RateLimitResponse.Quota.Builder>
-
addRepeatedField
public RateLimitResponse.Quota.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<RateLimitResponse.Quota.Builder>
-
mergeFrom
public RateLimitResponse.Quota.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<RateLimitResponse.Quota.Builder>
-
mergeFrom
public RateLimitResponse.Quota.Builder mergeFrom(RateLimitResponse.Quota other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<RateLimitResponse.Quota.Builder>
-
mergeFrom
public RateLimitResponse.Quota.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<RateLimitResponse.Quota.Builder>- Throws:
IOException
-
getExpirationSpecifierCase
public RateLimitResponse.Quota.ExpirationSpecifierCase getExpirationSpecifierCase()
- Specified by:
getExpirationSpecifierCasein interfaceRateLimitResponse.QuotaOrBuilder
-
clearExpirationSpecifier
public RateLimitResponse.Quota.Builder clearExpirationSpecifier()
-
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.
-
setRequests
public RateLimitResponse.Quota.Builder setRequests(int value)
Number of matching requests granted in quota. Must be 1 or more.
uint32 requests = 1 [(.validate.rules) = { ... }- Parameters:
value- The requests to set.- Returns:
- This builder for chaining.
-
clearRequests
public RateLimitResponse.Quota.Builder clearRequests()
Number of matching requests granted in quota. Must be 1 or more.
uint32 requests = 1 [(.validate.rules) = { ... }- Returns:
- This builder for chaining.
-
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.
-
setValidUntil
public RateLimitResponse.Quota.Builder setValidUntil(com.google.protobuf.Timestamp value)
Point in time at which the quota expires.
.google.protobuf.Timestamp valid_until = 2;
-
setValidUntil
public RateLimitResponse.Quota.Builder setValidUntil(com.google.protobuf.Timestamp.Builder builderForValue)
Point in time at which the quota expires.
.google.protobuf.Timestamp valid_until = 2;
-
mergeValidUntil
public RateLimitResponse.Quota.Builder mergeValidUntil(com.google.protobuf.Timestamp value)
Point in time at which the quota expires.
.google.protobuf.Timestamp valid_until = 2;
-
clearValidUntil
public RateLimitResponse.Quota.Builder clearValidUntil()
Point in time at which the quota expires.
.google.protobuf.Timestamp valid_until = 2;
-
getValidUntilBuilder
public com.google.protobuf.Timestamp.Builder getValidUntilBuilder()
Point in time at which the quota expires.
.google.protobuf.Timestamp valid_until = 2;
-
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.
-
setId
public RateLimitResponse.Quota.Builder setId(String value)
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;- Parameters:
value- The id to set.- Returns:
- This builder for chaining.
-
clearId
public RateLimitResponse.Quota.Builder clearId()
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;- Returns:
- This builder for chaining.
-
setIdBytes
public RateLimitResponse.Quota.Builder setIdBytes(com.google.protobuf.ByteString value)
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;- Parameters:
value- The bytes for id to set.- Returns:
- This builder for chaining.
-
setUnknownFields
public final RateLimitResponse.Quota.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<RateLimitResponse.Quota.Builder>
-
mergeUnknownFields
public final RateLimitResponse.Quota.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<RateLimitResponse.Quota.Builder>
-
-