Class RateLimitResponse.Quota.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
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 type
envoy.service.ratelimit.v3.RateLimitResponse.Quota-
Method Summary
Modifier and TypeMethodDescriptionaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) build()clear()clearField(com.google.protobuf.Descriptors.FieldDescriptor field) clearId()The unique id that is associated with each Quota either at individual descriptor level or whole descriptor set level.clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) Number of matching requests granted in quota.Point in time at which the quota expires.clone()static final com.google.protobuf.Descriptors.Descriptorcom.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.intNumber of matching requests granted in quota.com.google.protobuf.TimestampPoint in time at which the quota expires.com.google.protobuf.Timestamp.BuilderPoint in time at which the quota expires.com.google.protobuf.TimestampOrBuilderPoint in time at which the quota expires.booleanPoint in time at which the quota expires.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) mergeFrom(RateLimitResponse.Quota other) mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) mergeValidUntil(com.google.protobuf.Timestamp value) Point in time at which the quota expires.The unique id that is associated with each Quota either at individual descriptor level or whole descriptor set level.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.setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) setRequests(int value) Number of matching requests granted in quota.setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) setValidUntil(com.google.protobuf.Timestamp value) Point in time at which the quota expires.setValidUntil(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, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
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
- 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
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.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
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<RateLimitResponse.Quota.Builder>
-
mergeFrom
-
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
- Specified by:
getExpirationSpecifierCasein interfaceRateLimitResponse.QuotaOrBuilder
-
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
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
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
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
Point in time at which the quota expires.
.google.protobuf.Timestamp valid_until = 2; -
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
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
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
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
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>
-