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 class
QuotaOperation.Builder
Represents information regarding a quota operation.static class
QuotaOperation.QuotaMode
Supported 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 int
CONSUMER_ID_FIELD_NUMBER
static int
LABELS_FIELD_NUMBER
static int
METHOD_NAME_FIELD_NUMBER
static int
OPERATION_ID_FIELD_NUMBER
static int
QUOTA_METRICS_FIELD_NUMBER
static int
QUOTA_MODE_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
containsLabels(String key)
Labels describing the operation.boolean
equals(Object obj)
String
getConsumerId()
Identity of the consumer for whom this quota operation is being performed.com.google.protobuf.ByteString
getConsumerIdBytes()
Identity of the consumer for whom this quota operation is being performed.static QuotaOperation
getDefaultInstance()
QuotaOperation
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
Map<String,String>
getLabels()
Deprecated.int
getLabelsCount()
Labels describing the operation.Map<String,String>
getLabelsMap()
Labels describing the operation.String
getLabelsOrDefault(String key, String defaultValue)
Labels describing the operation.String
getLabelsOrThrow(String key)
Labels describing the operation.String
getMethodName()
Fully qualified name of the API method for which this quota operation is requested.com.google.protobuf.ByteString
getMethodNameBytes()
Fully qualified name of the API method for which this quota operation is requested.String
getOperationId()
Identity of the operation.com.google.protobuf.ByteString
getOperationIdBytes()
Identity of the operation.com.google.protobuf.Parser<QuotaOperation>
getParserForType()
MetricValueSet
getQuotaMetrics(int index)
Represents information about this operation.int
getQuotaMetricsCount()
Represents information about this operation.List<MetricValueSet>
getQuotaMetricsList()
Represents information about this operation.MetricValueSetOrBuilder
getQuotaMetricsOrBuilder(int index)
Represents information about this operation.List<? extends MetricValueSetOrBuilder>
getQuotaMetricsOrBuilderList()
Represents information about this operation.QuotaOperation.QuotaMode
getQuotaMode()
Quota mode for this operation.int
getQuotaModeValue()
Quota mode for this operation.int
getSerializedSize()
int
hashCode()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
protected com.google.protobuf.MapField
internalGetMapField(int number)
boolean
isInitialized()
static QuotaOperation.Builder
newBuilder()
static QuotaOperation.Builder
newBuilder(QuotaOperation prototype)
QuotaOperation.Builder
newBuilderForType()
protected QuotaOperation.Builder
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
protected Object
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
static QuotaOperation
parseDelimitedFrom(InputStream input)
static QuotaOperation
parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static QuotaOperation
parseFrom(byte[] data)
static QuotaOperation
parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static QuotaOperation
parseFrom(com.google.protobuf.ByteString data)
static QuotaOperation
parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static QuotaOperation
parseFrom(com.google.protobuf.CodedInputStream input)
static QuotaOperation
parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static QuotaOperation
parseFrom(InputStream input)
static QuotaOperation
parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static QuotaOperation
parseFrom(ByteBuffer data)
static QuotaOperation
parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.protobuf.Parser<QuotaOperation>
parser()
QuotaOperation.Builder
toBuilder()
void
writeTo(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:
newInstance
in classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetMapField
protected com.google.protobuf.MapField internalGetMapField(int number)
- Overrides:
internalGetMapField
in classcom.google.protobuf.GeneratedMessageV3
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in 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:
getOperationId
in 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:
getOperationIdBytes
in 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.CreateShelf
string method_name = 2;
- Specified by:
getMethodName
in 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.CreateShelf
string method_name = 2;
- Specified by:
getMethodNameBytes
in 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:
getConsumerId
in 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:
getConsumerIdBytes
in interfaceQuotaOperationOrBuilder
- Returns:
- The bytes for consumerId.
-
getLabelsCount
public int getLabelsCount()
Description copied from interface:QuotaOperationOrBuilder
Labels describing the operation.
map<string, string> labels = 4;
- Specified by:
getLabelsCount
in interfaceQuotaOperationOrBuilder
-
containsLabels
public boolean containsLabels(String key)
Labels describing the operation.
map<string, string> labels = 4;
- Specified by:
containsLabels
in interfaceQuotaOperationOrBuilder
-
getLabels
@Deprecated public Map<String,String> getLabels()
Deprecated.UsegetLabelsMap()
instead.- Specified by:
getLabels
in interfaceQuotaOperationOrBuilder
-
getLabelsMap
public Map<String,String> getLabelsMap()
Labels describing the operation.
map<string, string> labels = 4;
- Specified by:
getLabelsMap
in interfaceQuotaOperationOrBuilder
-
getLabelsOrDefault
public String getLabelsOrDefault(String key, String defaultValue)
Labels describing the operation.
map<string, string> labels = 4;
- Specified by:
getLabelsOrDefault
in interfaceQuotaOperationOrBuilder
-
getLabelsOrThrow
public String getLabelsOrThrow(String key)
Labels describing the operation.
map<string, string> labels = 4;
- Specified by:
getLabelsOrThrow
in 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:
getQuotaMetricsList
in 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:
getQuotaMetricsOrBuilderList
in 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:
getQuotaMetricsCount
in 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:
getQuotaMetrics
in 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:
getQuotaMetricsOrBuilder
in interfaceQuotaOperationOrBuilder
-
getQuotaModeValue
public int getQuotaModeValue()
Quota mode for this operation.
.google.api.servicecontrol.v1.QuotaOperation.QuotaMode quota_mode = 6;
- Specified by:
getQuotaModeValue
in 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:
getQuotaMode
in interfaceQuotaOperationOrBuilder
- Returns:
- The quotaMode.
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
- Specified by:
writeTo
in interfacecom.google.protobuf.MessageLite
- Overrides:
writeTo
in classcom.google.protobuf.GeneratedMessageV3
- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSize
in interfacecom.google.protobuf.MessageLite
- Overrides:
getSerializedSize
in classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(Object obj)
- Specified by:
equals
in interfacecom.google.protobuf.Message
- Overrides:
equals
in classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfacecom.google.protobuf.Message
- Overrides:
hashCode
in 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:
newBuilderForType
in interfacecom.google.protobuf.Message
- Specified by:
newBuilderForType
in 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:
toBuilder
in interfacecom.google.protobuf.Message
- Specified by:
toBuilder
in interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected QuotaOperation.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForType
in 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:
getParserForType
in interfacecom.google.protobuf.Message
- Specified by:
getParserForType
in interfacecom.google.protobuf.MessageLite
- Overrides:
getParserForType
in classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public QuotaOperation getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
-