Class 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 type google.api.servicecontrol.v1.QuotaOperation
    See Also:
    Serialized Form
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.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 class com.google.protobuf.GeneratedMessageV3
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.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 interface QuotaOperationOrBuilder
        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 interface QuotaOperationOrBuilder
        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 interface QuotaOperationOrBuilder
        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 interface QuotaOperationOrBuilder
        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 interface QuotaOperationOrBuilder
        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 interface QuotaOperationOrBuilder
        Returns:
        The bytes for consumerId.
      • 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 interface QuotaOperationOrBuilder
      • 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 interface QuotaOperationOrBuilder
      • 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 interface QuotaOperationOrBuilder
      • 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 interface QuotaOperationOrBuilder
      • 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 interface QuotaOperationOrBuilder
      • getQuotaModeValue

        public int getQuotaModeValue()
         Quota mode for this operation.
         
        .google.api.servicecontrol.v1.QuotaOperation.QuotaMode quota_mode = 6;
        Specified by:
        getQuotaModeValue in interface QuotaOperationOrBuilder
        Returns:
        The enum numeric value on the wire for quotaMode.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.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​(com.google.protobuf.CodedInputStream input,
                                               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                        throws IOException
        Throws:
        IOException
      • newBuilderForType

        public QuotaOperation.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public QuotaOperation.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected QuotaOperation.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.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 interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public QuotaOperation getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder