public final class QuotaLimit extends GeneratedMessageV3 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
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
Static Fields
DEFAULT_LIMIT_FIELD_NUMBER
public static final int DEFAULT_LIMIT_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
DESCRIPTION_FIELD_NUMBER
public static final int DESCRIPTION_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
DISPLAY_NAME_FIELD_NUMBER
public static final int DISPLAY_NAME_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
DURATION_FIELD_NUMBER
public static final int DURATION_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
FREE_TIER_FIELD_NUMBER
public static final int FREE_TIER_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
MAX_LIMIT_FIELD_NUMBER
public static final int MAX_LIMIT_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
METRIC_FIELD_NUMBER
public static final int METRIC_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
UNIT_FIELD_NUMBER
public static final int UNIT_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
VALUES_FIELD_NUMBER
public static final int VALUES_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
Static Methods
getDefaultInstance()
public static QuotaLimit getDefaultInstance()
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
newBuilder()
public static QuotaLimit.Builder newBuilder()
newBuilder(QuotaLimit prototype)
public static QuotaLimit.Builder newBuilder(QuotaLimit prototype)
public static QuotaLimit parseDelimitedFrom(InputStream input)
public static QuotaLimit parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(byte[] data)
public static QuotaLimit parseFrom(byte[] data)
Parameter |
Name |
Description |
data |
byte[]
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static QuotaLimit parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteString data)
public static QuotaLimit parseFrom(ByteString data)
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static QuotaLimit parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static QuotaLimit parseFrom(CodedInputStream input)
public static QuotaLimit parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static QuotaLimit parseFrom(InputStream input)
public static QuotaLimit parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteBuffer data)
public static QuotaLimit parseFrom(ByteBuffer data)
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static QuotaLimit parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
parser()
public static Parser<QuotaLimit> parser()
Methods
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;
Parameter |
Name |
Description |
key |
String
|
equals(Object obj)
public boolean equals(Object obj)
Parameter |
Name |
Description |
obj |
Object
|
Overrides
getDefaultInstanceForType()
public QuotaLimit getDefaultInstanceForType()
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;
Returns |
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;
Returns |
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;
Returns |
Type |
Description |
ByteString |
The bytes for description.
|
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;
Returns |
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;
Returns |
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;
Returns |
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;
Returns |
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;
Returns |
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;
Returns |
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;
Returns |
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;
Returns |
Type |
Description |
ByteString |
The bytes for metric.
|
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;
Returns |
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;
Returns |
Type |
Description |
ByteString |
The bytes for name.
|
getParserForType()
public Parser<QuotaLimit> getParserForType()
Overrides
getSerializedSize()
public int getSerializedSize()
Returns |
Type |
Description |
int |
|
Overrides
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:
string unit = 9;
Returns |
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:
string unit = 9;
Returns |
Type |
Description |
ByteString |
The bytes for unit.
|
getValues() (deprecated)
public Map<String,Long> getValues()
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;
Returns |
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;
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;
Parameters |
Name |
Description |
key |
String
|
defaultValue |
long
|
Returns |
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;
Parameter |
Name |
Description |
key |
String
|
Returns |
Type |
Description |
long |
|
hashCode()
Returns |
Type |
Description |
int |
|
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
internalGetMapFieldReflection(int number)
protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter |
Name |
Description |
number |
int
|
Returns |
Type |
Description |
com.google.protobuf.MapFieldReflectionAccessor |
|
Overrides
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
isInitialized()
public final boolean isInitialized()
Overrides
newBuilderForType()
public QuotaLimit.Builder newBuilderForType()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected QuotaLimit.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Returns |
Type |
Description |
Object |
|
Overrides
toBuilder()
public QuotaLimit.Builder toBuilder()
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Overrides