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| Modifier and Type | Class and Description |
|---|---|
static class |
QuotaLimit.Builder
`QuotaLimit` defines a specific limit that applies over a specified duration
for a limit type.
|
GeneratedMessageV3.BuilderParent, GeneratedMessageV3.ExtendableBuilder<MessageType extends GeneratedMessageV3.ExtendableMessage,BuilderType extends GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, GeneratedMessageV3.ExtendableMessage<MessageType extends GeneratedMessageV3.ExtendableMessage>, GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends GeneratedMessageV3.ExtendableMessage>, GeneratedMessageV3.FieldAccessorTable| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_LIMIT_FIELD_NUMBER |
static int |
DESCRIPTION_FIELD_NUMBER |
static int |
DISPLAY_NAME_FIELD_NUMBER |
static int |
DURATION_FIELD_NUMBER |
static int |
FREE_TIER_FIELD_NUMBER |
static int |
MAX_LIMIT_FIELD_NUMBER |
static int |
METRIC_FIELD_NUMBER |
static int |
NAME_FIELD_NUMBER |
static int |
UNIT_FIELD_NUMBER |
static int |
VALUES_FIELD_NUMBER |
alwaysUseFieldBuilders, unknownFieldsmemoizedSizememoizedHashCode| Modifier and Type | Method and Description |
|---|---|
boolean |
containsValues(java.lang.String key)
Tiered limit values.
|
boolean |
equals(java.lang.Object obj) |
static QuotaLimit |
getDefaultInstance() |
QuotaLimit |
getDefaultInstanceForType() |
long |
getDefaultLimit()
Default number of tokens that can be consumed during the specified
duration.
|
java.lang.String |
getDescription()
Optional.
|
ByteString |
getDescriptionBytes()
Optional.
|
static Descriptors.Descriptor |
getDescriptor() |
java.lang.String |
getDisplayName()
User-visible display name for this limit.
|
ByteString |
getDisplayNameBytes()
User-visible display name for this limit.
|
java.lang.String |
getDuration()
Duration of this limit in textual notation.
|
ByteString |
getDurationBytes()
Duration of this limit in textual notation.
|
long |
getFreeTier()
Free tier value displayed in the Developers Console for this limit.
|
long |
getMaxLimit()
Maximum number of tokens that can be consumed during the specified
duration.
|
java.lang.String |
getMetric()
The name of the metric this quota limit applies to.
|
ByteString |
getMetricBytes()
The name of the metric this quota limit applies to.
|
java.lang.String |
getName()
Name of the quota limit.
|
ByteString |
getNameBytes()
Name of the quota limit.
|
Parser<QuotaLimit> |
getParserForType() |
int |
getSerializedSize() |
java.lang.String |
getUnit()
Specify the unit of the quota limit.
|
ByteString |
getUnitBytes()
Specify the unit of the quota limit.
|
UnknownFieldSet |
getUnknownFields() |
java.util.Map<java.lang.String,java.lang.Long> |
getValues()
Deprecated.
|
int |
getValuesCount()
Tiered limit values.
|
java.util.Map<java.lang.String,java.lang.Long> |
getValuesMap()
Tiered limit values.
|
long |
getValuesOrDefault(java.lang.String key,
long defaultValue)
Tiered limit values.
|
long |
getValuesOrThrow(java.lang.String key)
Tiered limit values.
|
int |
hashCode() |
protected GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
protected MapField |
internalGetMapField(int number) |
boolean |
isInitialized() |
static QuotaLimit.Builder |
newBuilder() |
static QuotaLimit.Builder |
newBuilder(QuotaLimit prototype) |
QuotaLimit.Builder |
newBuilderForType() |
protected QuotaLimit.Builder |
newBuilderForType(GeneratedMessageV3.BuilderParent parent) |
static QuotaLimit |
parseDelimitedFrom(java.io.InputStream input) |
static QuotaLimit |
parseDelimitedFrom(java.io.InputStream input,
ExtensionRegistryLite extensionRegistry) |
static QuotaLimit |
parseFrom(byte[] data) |
static QuotaLimit |
parseFrom(byte[] data,
ExtensionRegistryLite extensionRegistry) |
static QuotaLimit |
parseFrom(java.nio.ByteBuffer data) |
static QuotaLimit |
parseFrom(java.nio.ByteBuffer data,
ExtensionRegistryLite extensionRegistry) |
static QuotaLimit |
parseFrom(ByteString data) |
static QuotaLimit |
parseFrom(ByteString data,
ExtensionRegistryLite extensionRegistry) |
static QuotaLimit |
parseFrom(CodedInputStream input) |
static QuotaLimit |
parseFrom(CodedInputStream input,
ExtensionRegistryLite extensionRegistry) |
static QuotaLimit |
parseFrom(java.io.InputStream input) |
static QuotaLimit |
parseFrom(java.io.InputStream input,
ExtensionRegistryLite extensionRegistry) |
static Parser<QuotaLimit> |
parser() |
QuotaLimit.Builder |
toBuilder() |
void |
writeTo(CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, makeExtensionsImmutable, 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, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitfindInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneoftoByteArray, toByteString, writeDelimitedTo, writeTopublic static final int NAME_FIELD_NUMBER
public static final int DESCRIPTION_FIELD_NUMBER
public static final int DEFAULT_LIMIT_FIELD_NUMBER
public static final int MAX_LIMIT_FIELD_NUMBER
public static final int FREE_TIER_FIELD_NUMBER
public static final int DURATION_FIELD_NUMBER
public static final int METRIC_FIELD_NUMBER
public static final int UNIT_FIELD_NUMBER
public static final int VALUES_FIELD_NUMBER
public static final int DISPLAY_NAME_FIELD_NUMBER
public final UnknownFieldSet getUnknownFields()
getUnknownFields in interface MessageOrBuildergetUnknownFields in class GeneratedMessageV3public static final Descriptors.Descriptor getDescriptor()
protected MapField internalGetMapField(int number)
internalGetMapField in class GeneratedMessageV3protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class GeneratedMessageV3public java.lang.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;getName in interface QuotaLimitOrBuilderpublic 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;getNameBytes in interface QuotaLimitOrBuilderpublic java.lang.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;getDescription in interface QuotaLimitOrBuilderpublic 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;getDescriptionBytes in interface QuotaLimitOrBuilderpublic 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;getDefaultLimit in interface QuotaLimitOrBuilderpublic 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;getMaxLimit in interface QuotaLimitOrBuilderpublic 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;getFreeTier in interface QuotaLimitOrBuilderpublic java.lang.String getDuration()
Duration of this limit in textual notation. Example: "100s", "24h", "1d". For duration longer than a day, only multiple of days is supported. We support only "100s" and "1d" for now. Additional support will be added in the future. "0" indicates indefinite duration. Used by group-based quotas only.
string duration = 5;getDuration in interface QuotaLimitOrBuilderpublic ByteString getDurationBytes()
Duration of this limit in textual notation. Example: "100s", "24h", "1d". For duration longer than a day, only multiple of days is supported. We support only "100s" and "1d" for now. Additional support will be added in the future. "0" indicates indefinite duration. Used by group-based quotas only.
string duration = 5;getDurationBytes in interface QuotaLimitOrBuilderpublic java.lang.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;getMetric in interface QuotaLimitOrBuilderpublic 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;getMetricBytes in interface QuotaLimitOrBuilderpublic java.lang.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;getUnit in interface QuotaLimitOrBuilderpublic 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;getUnitBytes in interface QuotaLimitOrBuilderpublic int getValuesCount()
QuotaLimitOrBuilderTiered 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;getValuesCount in interface QuotaLimitOrBuilderpublic boolean containsValues(java.lang.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;containsValues in interface QuotaLimitOrBuilder@Deprecated public java.util.Map<java.lang.String,java.lang.Long> getValues()
getValuesMap() instead.getValues in interface QuotaLimitOrBuilderpublic java.util.Map<java.lang.String,java.lang.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;getValuesMap in interface QuotaLimitOrBuilderpublic long getValuesOrDefault(java.lang.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;getValuesOrDefault in interface QuotaLimitOrBuilderpublic long getValuesOrThrow(java.lang.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;getValuesOrThrow in interface QuotaLimitOrBuilderpublic java.lang.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;getDisplayName in interface QuotaLimitOrBuilderpublic 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;getDisplayNameBytes in interface QuotaLimitOrBuilderpublic final boolean isInitialized()
isInitialized in interface MessageLiteOrBuilderisInitialized in class GeneratedMessageV3public void writeTo(CodedOutputStream output) throws java.io.IOException
writeTo in interface MessageLitewriteTo in class GeneratedMessageV3java.io.IOExceptionpublic int getSerializedSize()
getSerializedSize in interface MessageLitegetSerializedSize in class GeneratedMessageV3public boolean equals(java.lang.Object obj)
equals in interface Messageequals in class AbstractMessagepublic int hashCode()
hashCode in interface MessagehashCode in class AbstractMessagepublic static QuotaLimit parseFrom(java.nio.ByteBuffer data) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static QuotaLimit parseFrom(java.nio.ByteBuffer data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static QuotaLimit parseFrom(ByteString data) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static QuotaLimit parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static QuotaLimit parseFrom(byte[] data) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static QuotaLimit parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static QuotaLimit parseFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOExceptionpublic static QuotaLimit parseFrom(java.io.InputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic static QuotaLimit parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOExceptionpublic static QuotaLimit parseDelimitedFrom(java.io.InputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic static QuotaLimit parseFrom(CodedInputStream input) throws java.io.IOException
java.io.IOExceptionpublic static QuotaLimit parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic QuotaLimit.Builder newBuilderForType()
newBuilderForType in interface MessagenewBuilderForType in interface MessageLitepublic static QuotaLimit.Builder newBuilder()
public static QuotaLimit.Builder newBuilder(QuotaLimit prototype)
public QuotaLimit.Builder toBuilder()
toBuilder in interface MessagetoBuilder in interface MessageLiteprotected QuotaLimit.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class GeneratedMessageV3public static QuotaLimit getDefaultInstance()
public static Parser<QuotaLimit> parser()
public Parser<QuotaLimit> getParserForType()
getParserForType in interface MessagegetParserForType in interface MessageLitegetParserForType in class GeneratedMessageV3public QuotaLimit getDefaultInstanceForType()
getDefaultInstanceForType in interface MessageLiteOrBuildergetDefaultInstanceForType in interface MessageOrBuilder