Class QuotaOperation

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
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

@Generated public final class QuotaOperation extends com.google.protobuf.GeneratedMessage implements QuotaOperationOrBuilder
 Represents information regarding a quota operation.
 
Protobuf type google.api.servicecontrol.v1.QuotaOperation
See Also:
  • Field Details

    • OPERATION_ID_FIELD_NUMBER

      public static final int OPERATION_ID_FIELD_NUMBER
      See Also:
    • METHOD_NAME_FIELD_NUMBER

      public static final int METHOD_NAME_FIELD_NUMBER
      See Also:
    • CONSUMER_ID_FIELD_NUMBER

      public static final int CONSUMER_ID_FIELD_NUMBER
      See Also:
    • LABELS_FIELD_NUMBER

      public static final int LABELS_FIELD_NUMBER
      See Also:
    • QUOTA_METRICS_FIELD_NUMBER

      public static final int QUOTA_METRICS_FIELD_NUMBER
      See Also:
    • QUOTA_MODE_FIELD_NUMBER

      public static final int QUOTA_MODE_FIELD_NUMBER
      See Also:
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
    • 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.
    • getLabelsCount

      public int getLabelsCount()
      Description copied from interface: QuotaOperationOrBuilder
       Labels describing the operation.
       
      map<string, string> labels = 4;
      Specified by:
      getLabelsCount in interface QuotaOperationOrBuilder
    • containsLabels

      public boolean containsLabels(String key)
       Labels describing the operation.
       
      map<string, string> labels = 4;
      Specified by:
      containsLabels in interface QuotaOperationOrBuilder
    • getLabels

      @Deprecated public Map<String,String> getLabels()
      Deprecated.
      Use getLabelsMap() instead.
      Specified by:
      getLabels in interface QuotaOperationOrBuilder
    • getLabelsMap

      public Map<String,String> getLabelsMap()
       Labels describing the operation.
       
      map<string, string> labels = 4;
      Specified by:
      getLabelsMap in interface QuotaOperationOrBuilder
    • getLabelsOrDefault

      public String getLabelsOrDefault(String key, String defaultValue)
       Labels describing the operation.
       
      map<string, string> labels = 4;
      Specified by:
      getLabelsOrDefault in interface QuotaOperationOrBuilder
    • getLabelsOrThrow

      public String getLabelsOrThrow(String key)
       Labels describing the operation.
       
      map<string, string> labels = 4;
      Specified by:
      getLabelsOrThrow in interface QuotaOperationOrBuilder
    • 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.
    • getQuotaMode

      public QuotaOperation.QuotaMode getQuotaMode()
       Quota mode for this operation.
       
      .google.api.servicecontrol.v1.QuotaOperation.QuotaMode quota_mode = 6;
      Specified by:
      getQuotaMode in interface QuotaOperationOrBuilder
      Returns:
      The quotaMode.
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • 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.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • 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(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 interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.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 interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected QuotaOperation.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • 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.GeneratedMessage
    • getDefaultInstanceForType

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