public static final class QuotaLimit.Builder extends GeneratedMessageV3.Builder<QuotaLimit.Builder> implements QuotaLimitOrBuilder
QuotaLimit
defines a specific limit that applies over a specified duration
for a limit type. There can be at most one limit for a duration and limit
type combination defined within a QuotaGroup
.
Protobuf type google.api.QuotaLimit
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > QuotaLimit.BuilderImplements
QuotaLimitOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Type | Description |
Descriptor |
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public QuotaLimit.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
QuotaLimit.Builder |
build()
public QuotaLimit build()
Type | Description |
QuotaLimit |
buildPartial()
public QuotaLimit buildPartial()
Type | Description |
QuotaLimit |
clear()
public QuotaLimit.Builder clear()
Type | Description |
QuotaLimit.Builder |
clearDefaultLimit()
public QuotaLimit.Builder clearDefaultLimit()
Default number of tokens that can be consumed during the specified duration. This is the number of tokens assigned when a client application developer activates the service for his/her project. Specifying a value of 0 will block all requests. This can be used if you are provisioning quota to selected consumers and blocking others. Similarly, a value of -1 will indicate an unlimited quota. No other negative values are allowed. Used by group-based quotas only.
int64 default_limit = 3;
Type | Description |
QuotaLimit.Builder | This builder for chaining. |
clearDescription()
public QuotaLimit.Builder clearDescription()
Optional. User-visible, extended description for this quota limit.
Should be used only when more context is needed to understand this limit
than provided by the limit's display name (see: display_name
).
string description = 2;
Type | Description |
QuotaLimit.Builder | This builder for chaining. |
clearDisplayName()
public QuotaLimit.Builder clearDisplayName()
User-visible display name for this limit. Optional. If not set, the UI will provide a default display name based on the quota configuration. This field can be used to override the default display name generated from the configuration.
string display_name = 12;
Type | Description |
QuotaLimit.Builder | This builder for chaining. |
clearDuration()
public QuotaLimit.Builder clearDuration()
Duration of this limit in textual notation. Must be "100s" or "1d". Used by group-based quotas only.
string duration = 5;
Type | Description |
QuotaLimit.Builder | This builder for chaining. |
clearField(Descriptors.FieldDescriptor field)
public QuotaLimit.Builder clearField(Descriptors.FieldDescriptor field)
Name | Description |
field | FieldDescriptor |
Type | Description |
QuotaLimit.Builder |
clearFreeTier()
public QuotaLimit.Builder clearFreeTier()
Free tier value displayed in the Developers Console for this limit. The free tier is the number of tokens that will be subtracted from the billed amount when billing is enabled. This field can only be set on a limit with duration "1d", in a billable group; it is invalid on any other limit. If this field is not set, it defaults to 0, indicating that there is no free tier for this service. Used by group-based quotas only.
int64 free_tier = 7;
Type | Description |
QuotaLimit.Builder | This builder for chaining. |
clearMaxLimit()
public QuotaLimit.Builder clearMaxLimit()
Maximum number of tokens that can be consumed during the specified duration. Client application developers can override the default limit up to this maximum. If specified, this value cannot be set to a value less than the default limit. If not specified, it is set to the default limit. To allow clients to apply overrides with no upper bound, set this to -1, indicating unlimited maximum quota. Used by group-based quotas only.
int64 max_limit = 4;
Type | Description |
QuotaLimit.Builder | This builder for chaining. |
clearMetric()
public QuotaLimit.Builder clearMetric()
The name of the metric this quota limit applies to. The quota limits with the same metric will be checked together during runtime. The metric must be defined within the service config.
string metric = 8;
Type | Description |
QuotaLimit.Builder | This builder for chaining. |
clearName()
public QuotaLimit.Builder clearName()
Name of the quota limit. The name must be provided, and it must be unique within the service. The name can only include alphanumeric characters as well as '-'. The maximum length of the limit name is 64 characters.
string name = 6;
Type | Description |
QuotaLimit.Builder | This builder for chaining. |
clearOneof(Descriptors.OneofDescriptor oneof)
public QuotaLimit.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Name | Description |
oneof | OneofDescriptor |
Type | Description |
QuotaLimit.Builder |
clearUnit()
public QuotaLimit.Builder clearUnit()
Specify the unit of the quota limit. It uses the same syntax as [Metric.unit][]. The supported unit kinds are determined by the quota backend system. Here are some examples:
- "1/min/{project}" for quota per minute per project. Note: the order of unit components is insignificant. The "1" at the beginning is required to follow the metric unit syntax.
string unit = 9;
Type | Description |
QuotaLimit.Builder | This builder for chaining. |
clearValues()
public QuotaLimit.Builder clearValues()
Type | Description |
QuotaLimit.Builder |
clone()
public QuotaLimit.Builder clone()
Type | Description |
QuotaLimit.Builder |
containsValues(String key)
public boolean containsValues(String key)
Tiered limit values. You must specify this as a key:value pair, with an integer value that is the maximum number of requests allowed for the specified unit. Currently only STANDARD is supported.
map<string, int64> values = 10;
Name | Description |
key | String |
Type | Description |
boolean |
getDefaultInstanceForType()
public QuotaLimit getDefaultInstanceForType()
Type | Description |
QuotaLimit |
getDefaultLimit()
public long getDefaultLimit()
Default number of tokens that can be consumed during the specified duration. This is the number of tokens assigned when a client application developer activates the service for his/her project. Specifying a value of 0 will block all requests. This can be used if you are provisioning quota to selected consumers and blocking others. Similarly, a value of -1 will indicate an unlimited quota. No other negative values are allowed. Used by group-based quotas only.
int64 default_limit = 3;
Type | Description |
long | The defaultLimit. |
getDescription()
public String getDescription()
Optional. User-visible, extended description for this quota limit.
Should be used only when more context is needed to understand this limit
than provided by the limit's display name (see: display_name
).
string description = 2;
Type | Description |
String | The description. |
getDescriptionBytes()
public ByteString getDescriptionBytes()
Optional. User-visible, extended description for this quota limit.
Should be used only when more context is needed to understand this limit
than provided by the limit's display name (see: display_name
).
string description = 2;
Type | Description |
ByteString | The bytes for description. |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Type | Description |
Descriptor |
getDisplayName()
public String getDisplayName()
User-visible display name for this limit. Optional. If not set, the UI will provide a default display name based on the quota configuration. This field can be used to override the default display name generated from the configuration.
string display_name = 12;
Type | Description |
String | The displayName. |
getDisplayNameBytes()
public ByteString getDisplayNameBytes()
User-visible display name for this limit. Optional. If not set, the UI will provide a default display name based on the quota configuration. This field can be used to override the default display name generated from the configuration.
string display_name = 12;
Type | Description |
ByteString | The bytes for displayName. |
getDuration()
public String getDuration()
Duration of this limit in textual notation. Must be "100s" or "1d". Used by group-based quotas only.
string duration = 5;
Type | Description |
String | The duration. |
getDurationBytes()
public ByteString getDurationBytes()
Duration of this limit in textual notation. Must be "100s" or "1d". Used by group-based quotas only.
string duration = 5;
Type | Description |
ByteString | The bytes for duration. |
getFreeTier()
public long getFreeTier()
Free tier value displayed in the Developers Console for this limit. The free tier is the number of tokens that will be subtracted from the billed amount when billing is enabled. This field can only be set on a limit with duration "1d", in a billable group; it is invalid on any other limit. If this field is not set, it defaults to 0, indicating that there is no free tier for this service. Used by group-based quotas only.
int64 free_tier = 7;
Type | Description |
long | The freeTier. |
getMaxLimit()
public long getMaxLimit()
Maximum number of tokens that can be consumed during the specified duration. Client application developers can override the default limit up to this maximum. If specified, this value cannot be set to a value less than the default limit. If not specified, it is set to the default limit. To allow clients to apply overrides with no upper bound, set this to -1, indicating unlimited maximum quota. Used by group-based quotas only.
int64 max_limit = 4;
Type | Description |
long | The maxLimit. |
getMetric()
public String getMetric()
The name of the metric this quota limit applies to. The quota limits with the same metric will be checked together during runtime. The metric must be defined within the service config.
string metric = 8;
Type | Description |
String | The metric. |
getMetricBytes()
public ByteString getMetricBytes()
The name of the metric this quota limit applies to. The quota limits with the same metric will be checked together during runtime. The metric must be defined within the service config.
string metric = 8;
Type | Description |
ByteString | The bytes for metric. |
getMutableValues()
public Map<String,Long> getMutableValues()
Use alternate mutation accessors instead.
Type | Description |
Map<String,Long> |
getName()
public String getName()
Name of the quota limit. The name must be provided, and it must be unique within the service. The name can only include alphanumeric characters as well as '-'. The maximum length of the limit name is 64 characters.
string name = 6;
Type | Description |
String | The name. |
getNameBytes()
public ByteString getNameBytes()
Name of the quota limit. The name must be provided, and it must be unique within the service. The name can only include alphanumeric characters as well as '-'. The maximum length of the limit name is 64 characters.
string name = 6;
Type | Description |
ByteString | The bytes for name. |
getUnit()
public String getUnit()
Specify the unit of the quota limit. It uses the same syntax as [Metric.unit][]. The supported unit kinds are determined by the quota backend system. Here are some examples:
- "1/min/{project}" for quota per minute per project. Note: the order of unit components is insignificant. The "1" at the beginning is required to follow the metric unit syntax.
string unit = 9;
Type | Description |
String | The unit. |
getUnitBytes()
public ByteString getUnitBytes()
Specify the unit of the quota limit. It uses the same syntax as [Metric.unit][]. The supported unit kinds are determined by the quota backend system. Here are some examples:
- "1/min/{project}" for quota per minute per project. Note: the order of unit components is insignificant. The "1" at the beginning is required to follow the metric unit syntax.
string unit = 9;
Type | Description |
ByteString | The bytes for unit. |
getValues()
public Map<String,Long> getValues()
Use #getValuesMap() instead.
Type | Description |
Map<String,Long> |
getValuesCount()
public int getValuesCount()
Tiered limit values. You must specify this as a key:value pair, with an integer value that is the maximum number of requests allowed for the specified unit. Currently only STANDARD is supported.
map<string, int64> values = 10;
Type | Description |
int |
getValuesMap()
public Map<String,Long> getValuesMap()
Tiered limit values. You must specify this as a key:value pair, with an integer value that is the maximum number of requests allowed for the specified unit. Currently only STANDARD is supported.
map<string, int64> values = 10;
Type | Description |
Map<String,Long> |
getValuesOrDefault(String key, long defaultValue)
public long getValuesOrDefault(String key, long defaultValue)
Tiered limit values. You must specify this as a key:value pair, with an integer value that is the maximum number of requests allowed for the specified unit. Currently only STANDARD is supported.
map<string, int64> values = 10;
Name | Description |
key | String |
defaultValue | long |
Type | Description |
long |
getValuesOrThrow(String key)
public long getValuesOrThrow(String key)
Tiered limit values. You must specify this as a key:value pair, with an integer value that is the maximum number of requests allowed for the specified unit. Currently only STANDARD is supported.
map<string, int64> values = 10;
Name | Description |
key | String |
Type | Description |
long |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Type | Description |
FieldAccessorTable |
internalGetMapField(int number)
protected MapField internalGetMapField(int number)
Name | Description |
number | int |
Type | Description |
MapField |
internalGetMutableMapField(int number)
protected MapField internalGetMutableMapField(int number)
Name | Description |
number | int |
Type | Description |
MapField |
isInitialized()
public final boolean isInitialized()
Type | Description |
boolean |
mergeFrom(QuotaLimit other)
public QuotaLimit.Builder mergeFrom(QuotaLimit other)
Name | Description |
other | QuotaLimit |
Type | Description |
QuotaLimit.Builder |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public QuotaLimit.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Name | Description |
input | CodedInputStream |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
QuotaLimit.Builder |
Type | Description |
IOException |
mergeFrom(Message other)
public QuotaLimit.Builder mergeFrom(Message other)
Name | Description |
other | Message |
Type | Description |
QuotaLimit.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final QuotaLimit.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
QuotaLimit.Builder |
putAllValues(Map<String,Long> values)
public QuotaLimit.Builder putAllValues(Map<String,Long> values)
Tiered limit values. You must specify this as a key:value pair, with an integer value that is the maximum number of requests allowed for the specified unit. Currently only STANDARD is supported.
map<string, int64> values = 10;
Name | Description |
values | Map<String,Long> |
Type | Description |
QuotaLimit.Builder |
putValues(String key, long value)
public QuotaLimit.Builder putValues(String key, long value)
Tiered limit values. You must specify this as a key:value pair, with an integer value that is the maximum number of requests allowed for the specified unit. Currently only STANDARD is supported.
map<string, int64> values = 10;
Name | Description |
key | String |
value | long |
Type | Description |
QuotaLimit.Builder |
removeValues(String key)
public QuotaLimit.Builder removeValues(String key)
Tiered limit values. You must specify this as a key:value pair, with an integer value that is the maximum number of requests allowed for the specified unit. Currently only STANDARD is supported.
map<string, int64> values = 10;
Name | Description |
key | String |
Type | Description |
QuotaLimit.Builder |
setDefaultLimit(long value)
public QuotaLimit.Builder setDefaultLimit(long value)
Default number of tokens that can be consumed during the specified duration. This is the number of tokens assigned when a client application developer activates the service for his/her project. Specifying a value of 0 will block all requests. This can be used if you are provisioning quota to selected consumers and blocking others. Similarly, a value of -1 will indicate an unlimited quota. No other negative values are allowed. Used by group-based quotas only.
int64 default_limit = 3;
Name | Description |
value | long The defaultLimit to set. |
Type | Description |
QuotaLimit.Builder | This builder for chaining. |
setDescription(String value)
public QuotaLimit.Builder setDescription(String value)
Optional. User-visible, extended description for this quota limit.
Should be used only when more context is needed to understand this limit
than provided by the limit's display name (see: display_name
).
string description = 2;
Name | Description |
value | String The description to set. |
Type | Description |
QuotaLimit.Builder | This builder for chaining. |
setDescriptionBytes(ByteString value)
public QuotaLimit.Builder setDescriptionBytes(ByteString value)
Optional. User-visible, extended description for this quota limit.
Should be used only when more context is needed to understand this limit
than provided by the limit's display name (see: display_name
).
string description = 2;
Name | Description |
value | ByteString The bytes for description to set. |
Type | Description |
QuotaLimit.Builder | This builder for chaining. |
setDisplayName(String value)
public QuotaLimit.Builder setDisplayName(String value)
User-visible display name for this limit. Optional. If not set, the UI will provide a default display name based on the quota configuration. This field can be used to override the default display name generated from the configuration.
string display_name = 12;
Name | Description |
value | String The displayName to set. |
Type | Description |
QuotaLimit.Builder | This builder for chaining. |
setDisplayNameBytes(ByteString value)
public QuotaLimit.Builder setDisplayNameBytes(ByteString value)
User-visible display name for this limit. Optional. If not set, the UI will provide a default display name based on the quota configuration. This field can be used to override the default display name generated from the configuration.
string display_name = 12;
Name | Description |
value | ByteString The bytes for displayName to set. |
Type | Description |
QuotaLimit.Builder | This builder for chaining. |
setDuration(String value)
public QuotaLimit.Builder setDuration(String value)
Duration of this limit in textual notation. Must be "100s" or "1d". Used by group-based quotas only.
string duration = 5;
Name | Description |
value | String The duration to set. |
Type | Description |
QuotaLimit.Builder | This builder for chaining. |
setDurationBytes(ByteString value)
public QuotaLimit.Builder setDurationBytes(ByteString value)
Duration of this limit in textual notation. Must be "100s" or "1d". Used by group-based quotas only.
string duration = 5;
Name | Description |
value | ByteString The bytes for duration to set. |
Type | Description |
QuotaLimit.Builder | This builder for chaining. |
setField(Descriptors.FieldDescriptor field, Object value)
public QuotaLimit.Builder setField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
QuotaLimit.Builder |
setFreeTier(long value)
public QuotaLimit.Builder setFreeTier(long value)
Free tier value displayed in the Developers Console for this limit. The free tier is the number of tokens that will be subtracted from the billed amount when billing is enabled. This field can only be set on a limit with duration "1d", in a billable group; it is invalid on any other limit. If this field is not set, it defaults to 0, indicating that there is no free tier for this service. Used by group-based quotas only.
int64 free_tier = 7;
Name | Description |
value | long The freeTier to set. |
Type | Description |
QuotaLimit.Builder | This builder for chaining. |
setMaxLimit(long value)
public QuotaLimit.Builder setMaxLimit(long value)
Maximum number of tokens that can be consumed during the specified duration. Client application developers can override the default limit up to this maximum. If specified, this value cannot be set to a value less than the default limit. If not specified, it is set to the default limit. To allow clients to apply overrides with no upper bound, set this to -1, indicating unlimited maximum quota. Used by group-based quotas only.
int64 max_limit = 4;
Name | Description |
value | long The maxLimit to set. |
Type | Description |
QuotaLimit.Builder | This builder for chaining. |
setMetric(String value)
public QuotaLimit.Builder setMetric(String value)
The name of the metric this quota limit applies to. The quota limits with the same metric will be checked together during runtime. The metric must be defined within the service config.
string metric = 8;
Name | Description |
value | String The metric to set. |
Type | Description |
QuotaLimit.Builder | This builder for chaining. |
setMetricBytes(ByteString value)
public QuotaLimit.Builder setMetricBytes(ByteString value)
The name of the metric this quota limit applies to. The quota limits with the same metric will be checked together during runtime. The metric must be defined within the service config.
string metric = 8;
Name | Description |
value | ByteString The bytes for metric to set. |
Type | Description |
QuotaLimit.Builder | This builder for chaining. |
setName(String value)
public QuotaLimit.Builder setName(String value)
Name of the quota limit. The name must be provided, and it must be unique within the service. The name can only include alphanumeric characters as well as '-'. The maximum length of the limit name is 64 characters.
string name = 6;
Name | Description |
value | String The name to set. |
Type | Description |
QuotaLimit.Builder | This builder for chaining. |
setNameBytes(ByteString value)
public QuotaLimit.Builder setNameBytes(ByteString value)
Name of the quota limit. The name must be provided, and it must be unique within the service. The name can only include alphanumeric characters as well as '-'. The maximum length of the limit name is 64 characters.
string name = 6;
Name | Description |
value | ByteString The bytes for name to set. |
Type | Description |
QuotaLimit.Builder | This builder for chaining. |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public QuotaLimit.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Name | Description |
field | FieldDescriptor |
index | int |
value | Object |
Type | Description |
QuotaLimit.Builder |
setUnit(String value)
public QuotaLimit.Builder setUnit(String value)
Specify the unit of the quota limit. It uses the same syntax as [Metric.unit][]. The supported unit kinds are determined by the quota backend system. Here are some examples:
- "1/min/{project}" for quota per minute per project. Note: the order of unit components is insignificant. The "1" at the beginning is required to follow the metric unit syntax.
string unit = 9;
Name | Description |
value | String The unit to set. |
Type | Description |
QuotaLimit.Builder | This builder for chaining. |
setUnitBytes(ByteString value)
public QuotaLimit.Builder setUnitBytes(ByteString value)
Specify the unit of the quota limit. It uses the same syntax as [Metric.unit][]. The supported unit kinds are determined by the quota backend system. Here are some examples:
- "1/min/{project}" for quota per minute per project. Note: the order of unit components is insignificant. The "1" at the beginning is required to follow the metric unit syntax.
string unit = 9;
Name | Description |
value | ByteString The bytes for unit to set. |
Type | Description |
QuotaLimit.Builder | This builder for chaining. |
setUnknownFields(UnknownFieldSet unknownFields)
public final QuotaLimit.Builder setUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
QuotaLimit.Builder |