Package com.google.api.servicecontrol.v1
Class QuotaOperation
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessageV3
-
- com.google.api.servicecontrol.v1.QuotaOperation
-
- All Implemented Interfaces:
QuotaOperationOrBuilder,com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Serializable
public final class QuotaOperation extends com.google.protobuf.GeneratedMessageV3 implements QuotaOperationOrBuilder
Represents information regarding a quota operation.
Protobuf typegoogle.api.servicecontrol.v1.QuotaOperation- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classQuotaOperation.BuilderRepresents information regarding a quota operation.static classQuotaOperation.QuotaModeSupported quota modes.-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
-
-
Field Summary
Fields Modifier and Type Field Description static intCONSUMER_ID_FIELD_NUMBERstatic intLABELS_FIELD_NUMBERstatic intMETHOD_NAME_FIELD_NUMBERstatic intOPERATION_ID_FIELD_NUMBERstatic intQUOTA_METRICS_FIELD_NUMBERstatic intQUOTA_MODE_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleancontainsLabels(String key)Labels describing the operation.booleanequals(Object obj)StringgetConsumerId()Identity of the consumer for whom this quota operation is being performed.com.google.protobuf.ByteStringgetConsumerIdBytes()Identity of the consumer for whom this quota operation is being performed.static QuotaOperationgetDefaultInstance()QuotaOperationgetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()Map<String,String>getLabels()Deprecated.intgetLabelsCount()Labels describing the operation.Map<String,String>getLabelsMap()Labels describing the operation.StringgetLabelsOrDefault(String key, String defaultValue)Labels describing the operation.StringgetLabelsOrThrow(String key)Labels describing the operation.StringgetMethodName()Fully qualified name of the API method for which this quota operation is requested.com.google.protobuf.ByteStringgetMethodNameBytes()Fully qualified name of the API method for which this quota operation is requested.StringgetOperationId()Identity of the operation.com.google.protobuf.ByteStringgetOperationIdBytes()Identity of the operation.com.google.protobuf.Parser<QuotaOperation>getParserForType()MetricValueSetgetQuotaMetrics(int index)Represents information about this operation.intgetQuotaMetricsCount()Represents information about this operation.List<MetricValueSet>getQuotaMetricsList()Represents information about this operation.MetricValueSetOrBuildergetQuotaMetricsOrBuilder(int index)Represents information about this operation.List<? extends MetricValueSetOrBuilder>getQuotaMetricsOrBuilderList()Represents information about this operation.QuotaOperation.QuotaModegetQuotaMode()Quota mode for this operation.intgetQuotaModeValue()Quota mode for this operation.intgetSerializedSize()inthashCode()protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()protected com.google.protobuf.MapFieldinternalGetMapField(int number)booleanisInitialized()static QuotaOperation.BuildernewBuilder()static QuotaOperation.BuildernewBuilder(QuotaOperation prototype)QuotaOperation.BuildernewBuilderForType()protected QuotaOperation.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)static QuotaOperationparseDelimitedFrom(InputStream input)static QuotaOperationparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static QuotaOperationparseFrom(byte[] data)static QuotaOperationparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static QuotaOperationparseFrom(com.google.protobuf.ByteString data)static QuotaOperationparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static QuotaOperationparseFrom(com.google.protobuf.CodedInputStream input)static QuotaOperationparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static QuotaOperationparseFrom(InputStream input)static QuotaOperationparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static QuotaOperationparseFrom(ByteBuffer data)static QuotaOperationparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static com.google.protobuf.Parser<QuotaOperation>parser()QuotaOperation.BuildertoBuilder()voidwriteTo(com.google.protobuf.CodedOutputStream output)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, mergeFromAndMakeImmutableInternal, 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, writeStringNoTag
-
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
OPERATION_ID_FIELD_NUMBER
public static final int OPERATION_ID_FIELD_NUMBER
- See Also:
- Constant Field Values
-
METHOD_NAME_FIELD_NUMBER
public static final int METHOD_NAME_FIELD_NUMBER
- See Also:
- Constant Field Values
-
CONSUMER_ID_FIELD_NUMBER
public static final int CONSUMER_ID_FIELD_NUMBER
- See Also:
- Constant Field Values
-
LABELS_FIELD_NUMBER
public static final int LABELS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
QUOTA_METRICS_FIELD_NUMBER
public static final int QUOTA_METRICS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
QUOTA_MODE_FIELD_NUMBER
public static final int QUOTA_MODE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
newInstance
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
- Overrides:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetMapField
protected com.google.protobuf.MapField internalGetMapField(int number)
- Overrides:
internalGetMapFieldin classcom.google.protobuf.GeneratedMessageV3
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3
-
getOperationId
public String getOperationId()
Identity of the operation. This is expected to be unique within the scope of the service that generated the operation, and guarantees idempotency in case of retries. In order to ensure best performance and latency in the Quota backends, operation_ids are optimally associated with time, so that related operations can be accessed fast in storage. For this reason, the recommended token for services that intend to operate at a high QPS is Unix time in nanos + UUID
string operation_id = 1;- Specified by:
getOperationIdin interfaceQuotaOperationOrBuilder- Returns:
- The operationId.
-
getOperationIdBytes
public com.google.protobuf.ByteString getOperationIdBytes()
Identity of the operation. This is expected to be unique within the scope of the service that generated the operation, and guarantees idempotency in case of retries. In order to ensure best performance and latency in the Quota backends, operation_ids are optimally associated with time, so that related operations can be accessed fast in storage. For this reason, the recommended token for services that intend to operate at a high QPS is Unix time in nanos + UUID
string operation_id = 1;- Specified by:
getOperationIdBytesin interfaceQuotaOperationOrBuilder- Returns:
- The bytes for operationId.
-
getMethodName
public String getMethodName()
Fully qualified name of the API method for which this quota operation is requested. This name is used for matching quota rules or metric rules and billing status rules defined in service configuration. This field should not be set if any of the following is true: (1) the quota operation is performed on non-API resources. (2) quota_metrics is set because the caller is doing quota override. Example of an RPC method name: google.example.library.v1.LibraryService.CreateShelfstring method_name = 2;- Specified by:
getMethodNamein interfaceQuotaOperationOrBuilder- Returns:
- The methodName.
-
getMethodNameBytes
public com.google.protobuf.ByteString getMethodNameBytes()
Fully qualified name of the API method for which this quota operation is requested. This name is used for matching quota rules or metric rules and billing status rules defined in service configuration. This field should not be set if any of the following is true: (1) the quota operation is performed on non-API resources. (2) quota_metrics is set because the caller is doing quota override. Example of an RPC method name: google.example.library.v1.LibraryService.CreateShelfstring method_name = 2;- Specified by:
getMethodNameBytesin interfaceQuotaOperationOrBuilder- Returns:
- The bytes for methodName.
-
getConsumerId
public String getConsumerId()
Identity of the consumer for whom this quota operation is being performed. This can be in one of the following formats: project:<project_id>, project_number:<project_number>, api_key:<api_key>.
string consumer_id = 3;- Specified by:
getConsumerIdin interfaceQuotaOperationOrBuilder- Returns:
- The consumerId.
-
getConsumerIdBytes
public com.google.protobuf.ByteString getConsumerIdBytes()
Identity of the consumer for whom this quota operation is being performed. This can be in one of the following formats: project:<project_id>, project_number:<project_number>, api_key:<api_key>.
string consumer_id = 3;- Specified by:
getConsumerIdBytesin interfaceQuotaOperationOrBuilder- Returns:
- The bytes for consumerId.
-
getLabelsCount
public int getLabelsCount()
Description copied from interface:QuotaOperationOrBuilderLabels describing the operation.
map<string, string> labels = 4;- Specified by:
getLabelsCountin interfaceQuotaOperationOrBuilder
-
containsLabels
public boolean containsLabels(String key)
Labels describing the operation.
map<string, string> labels = 4;- Specified by:
containsLabelsin interfaceQuotaOperationOrBuilder
-
getLabels
@Deprecated public Map<String,String> getLabels()
Deprecated.UsegetLabelsMap()instead.- Specified by:
getLabelsin interfaceQuotaOperationOrBuilder
-
getLabelsMap
public Map<String,String> getLabelsMap()
Labels describing the operation.
map<string, string> labels = 4;- Specified by:
getLabelsMapin interfaceQuotaOperationOrBuilder
-
getLabelsOrDefault
public String getLabelsOrDefault(String key, String defaultValue)
Labels describing the operation.
map<string, string> labels = 4;- Specified by:
getLabelsOrDefaultin interfaceQuotaOperationOrBuilder
-
getLabelsOrThrow
public String getLabelsOrThrow(String key)
Labels describing the operation.
map<string, string> labels = 4;- Specified by:
getLabelsOrThrowin interfaceQuotaOperationOrBuilder
-
getQuotaMetricsList
public List<MetricValueSet> getQuotaMetricsList()
Represents information about this operation. Each MetricValueSet corresponds to a metric defined in the service configuration. The data type used in the MetricValueSet must agree with the data type specified in the metric definition. Within a single operation, it is not allowed to have more than one MetricValue instances that have the same metric names and identical label value combinations. If a request has such duplicated MetricValue instances, the entire request is rejected with an invalid argument error. This field is mutually exclusive with method_name.
repeated .google.api.servicecontrol.v1.MetricValueSet quota_metrics = 5;- Specified by:
getQuotaMetricsListin interfaceQuotaOperationOrBuilder
-
getQuotaMetricsOrBuilderList
public List<? extends MetricValueSetOrBuilder> getQuotaMetricsOrBuilderList()
Represents information about this operation. Each MetricValueSet corresponds to a metric defined in the service configuration. The data type used in the MetricValueSet must agree with the data type specified in the metric definition. Within a single operation, it is not allowed to have more than one MetricValue instances that have the same metric names and identical label value combinations. If a request has such duplicated MetricValue instances, the entire request is rejected with an invalid argument error. This field is mutually exclusive with method_name.
repeated .google.api.servicecontrol.v1.MetricValueSet quota_metrics = 5;- Specified by:
getQuotaMetricsOrBuilderListin interfaceQuotaOperationOrBuilder
-
getQuotaMetricsCount
public int getQuotaMetricsCount()
Represents information about this operation. Each MetricValueSet corresponds to a metric defined in the service configuration. The data type used in the MetricValueSet must agree with the data type specified in the metric definition. Within a single operation, it is not allowed to have more than one MetricValue instances that have the same metric names and identical label value combinations. If a request has such duplicated MetricValue instances, the entire request is rejected with an invalid argument error. This field is mutually exclusive with method_name.
repeated .google.api.servicecontrol.v1.MetricValueSet quota_metrics = 5;- Specified by:
getQuotaMetricsCountin interfaceQuotaOperationOrBuilder
-
getQuotaMetrics
public MetricValueSet getQuotaMetrics(int index)
Represents information about this operation. Each MetricValueSet corresponds to a metric defined in the service configuration. The data type used in the MetricValueSet must agree with the data type specified in the metric definition. Within a single operation, it is not allowed to have more than one MetricValue instances that have the same metric names and identical label value combinations. If a request has such duplicated MetricValue instances, the entire request is rejected with an invalid argument error. This field is mutually exclusive with method_name.
repeated .google.api.servicecontrol.v1.MetricValueSet quota_metrics = 5;- Specified by:
getQuotaMetricsin interfaceQuotaOperationOrBuilder
-
getQuotaMetricsOrBuilder
public MetricValueSetOrBuilder getQuotaMetricsOrBuilder(int index)
Represents information about this operation. Each MetricValueSet corresponds to a metric defined in the service configuration. The data type used in the MetricValueSet must agree with the data type specified in the metric definition. Within a single operation, it is not allowed to have more than one MetricValue instances that have the same metric names and identical label value combinations. If a request has such duplicated MetricValue instances, the entire request is rejected with an invalid argument error. This field is mutually exclusive with method_name.
repeated .google.api.servicecontrol.v1.MetricValueSet quota_metrics = 5;- Specified by:
getQuotaMetricsOrBuilderin interfaceQuotaOperationOrBuilder
-
getQuotaModeValue
public int getQuotaModeValue()
Quota mode for this operation.
.google.api.servicecontrol.v1.QuotaOperation.QuotaMode quota_mode = 6;- Specified by:
getQuotaModeValuein interfaceQuotaOperationOrBuilder- Returns:
- The enum numeric value on the wire for quotaMode.
-
getQuotaMode
public QuotaOperation.QuotaMode getQuotaMode()
Quota mode for this operation.
.google.api.servicecontrol.v1.QuotaOperation.QuotaMode quota_mode = 6;- Specified by:
getQuotaModein interfaceQuotaOperationOrBuilder- Returns:
- The quotaMode.
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessageV3- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(Object obj)
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static QuotaOperation parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static QuotaOperation parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static QuotaOperation parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static QuotaOperation parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static QuotaOperation parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static QuotaOperation parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static QuotaOperation parseFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static QuotaOperation parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static QuotaOperation parseDelimitedFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static QuotaOperation parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseFrom
public static QuotaOperation parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static QuotaOperation parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
newBuilderForType
public QuotaOperation.Builder newBuilderForType()
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
public static QuotaOperation.Builder newBuilder()
-
newBuilder
public static QuotaOperation.Builder newBuilder(QuotaOperation prototype)
-
toBuilder
public QuotaOperation.Builder toBuilder()
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected QuotaOperation.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
public static QuotaOperation getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<QuotaOperation> parser()
-
getParserForType
public com.google.protobuf.Parser<QuotaOperation> getParserForType()
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public QuotaOperation getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
-