Class QuotaFailure.Violation

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
com.google.rpc.QuotaFailure.Violation
All Implemented Interfaces:
com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, QuotaFailure.ViolationOrBuilder, Serializable
Enclosing class:
QuotaFailure

public static final class QuotaFailure.Violation extends com.google.protobuf.GeneratedMessageV3 implements QuotaFailure.ViolationOrBuilder
 A message type used to describe a single quota violation.  For example, a
 daily quota or a custom quota that was exceeded.
 
Protobuf type google.rpc.QuotaFailure.Violation
See Also:
  • Field Details

    • SUBJECT_FIELD_NUMBER

      public static final int SUBJECT_FIELD_NUMBER
      See Also:
    • DESCRIPTION_FIELD_NUMBER

      public static final int DESCRIPTION_FIELD_NUMBER
      See Also:
    • API_SERVICE_FIELD_NUMBER

      public static final int API_SERVICE_FIELD_NUMBER
      See Also:
    • QUOTA_METRIC_FIELD_NUMBER

      public static final int QUOTA_METRIC_FIELD_NUMBER
      See Also:
    • QUOTA_ID_FIELD_NUMBER

      public static final int QUOTA_ID_FIELD_NUMBER
      See Also:
    • QUOTA_DIMENSIONS_FIELD_NUMBER

      public static final int QUOTA_DIMENSIONS_FIELD_NUMBER
      See Also:
    • QUOTA_VALUE_FIELD_NUMBER

      public static final int QUOTA_VALUE_FIELD_NUMBER
      See Also:
    • FUTURE_QUOTA_VALUE_FIELD_NUMBER

      public static final int FUTURE_QUOTA_VALUE_FIELD_NUMBER
      See Also:
  • Method Details

    • 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()
    • internalGetMapFieldReflection

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

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
    • getSubject

      public String getSubject()
       The subject on which the quota check failed.
       For example, "clientip:<ip address of client>" or "project:<Google
       developer project id>".
       
      string subject = 1;
      Specified by:
      getSubject in interface QuotaFailure.ViolationOrBuilder
      Returns:
      The subject.
    • getSubjectBytes

      public com.google.protobuf.ByteString getSubjectBytes()
       The subject on which the quota check failed.
       For example, "clientip:<ip address of client>" or "project:<Google
       developer project id>".
       
      string subject = 1;
      Specified by:
      getSubjectBytes in interface QuotaFailure.ViolationOrBuilder
      Returns:
      The bytes for subject.
    • getDescription

      public String getDescription()
       A description of how the quota check failed. Clients can use this
       description to find more about the quota configuration in the service's
       public documentation, or find the relevant quota limit to adjust through
       developer console.
      
       For example: "Service disabled" or "Daily Limit for read operations
       exceeded".
       
      string description = 2;
      Specified by:
      getDescription in interface QuotaFailure.ViolationOrBuilder
      Returns:
      The description.
    • getDescriptionBytes

      public com.google.protobuf.ByteString getDescriptionBytes()
       A description of how the quota check failed. Clients can use this
       description to find more about the quota configuration in the service's
       public documentation, or find the relevant quota limit to adjust through
       developer console.
      
       For example: "Service disabled" or "Daily Limit for read operations
       exceeded".
       
      string description = 2;
      Specified by:
      getDescriptionBytes in interface QuotaFailure.ViolationOrBuilder
      Returns:
      The bytes for description.
    • getApiService

      public String getApiService()
       The API Service from which the `QuotaFailure.Violation` orginates. In
       some cases, Quota issues originate from an API Service other than the one
       that was called. In other words, a dependency of the called API Service
       could be the cause of the `QuotaFailure`, and this field would have the
       dependency API service name.
      
       For example, if the called API is Kubernetes Engine API
       (container.googleapis.com), and a quota violation occurs in the
       Kubernetes Engine API itself, this field would be
       "container.googleapis.com". On the other hand, if the quota violation
       occurs when the Kubernetes Engine API creates VMs in the Compute Engine
       API (compute.googleapis.com), this field would be
       "compute.googleapis.com".
       
      string api_service = 3;
      Specified by:
      getApiService in interface QuotaFailure.ViolationOrBuilder
      Returns:
      The apiService.
    • getApiServiceBytes

      public com.google.protobuf.ByteString getApiServiceBytes()
       The API Service from which the `QuotaFailure.Violation` orginates. In
       some cases, Quota issues originate from an API Service other than the one
       that was called. In other words, a dependency of the called API Service
       could be the cause of the `QuotaFailure`, and this field would have the
       dependency API service name.
      
       For example, if the called API is Kubernetes Engine API
       (container.googleapis.com), and a quota violation occurs in the
       Kubernetes Engine API itself, this field would be
       "container.googleapis.com". On the other hand, if the quota violation
       occurs when the Kubernetes Engine API creates VMs in the Compute Engine
       API (compute.googleapis.com), this field would be
       "compute.googleapis.com".
       
      string api_service = 3;
      Specified by:
      getApiServiceBytes in interface QuotaFailure.ViolationOrBuilder
      Returns:
      The bytes for apiService.
    • getQuotaMetric

      public String getQuotaMetric()
       The metric of the violated quota. A quota metric is a named counter to
       measure usage, such as API requests or CPUs. When an activity occurs in a
       service, such as Virtual Machine allocation, one or more quota metrics
       may be affected.
      
       For example, "compute.googleapis.com/cpus_per_vm_family",
       "storage.googleapis.com/internet_egress_bandwidth".
       
      string quota_metric = 4;
      Specified by:
      getQuotaMetric in interface QuotaFailure.ViolationOrBuilder
      Returns:
      The quotaMetric.
    • getQuotaMetricBytes

      public com.google.protobuf.ByteString getQuotaMetricBytes()
       The metric of the violated quota. A quota metric is a named counter to
       measure usage, such as API requests or CPUs. When an activity occurs in a
       service, such as Virtual Machine allocation, one or more quota metrics
       may be affected.
      
       For example, "compute.googleapis.com/cpus_per_vm_family",
       "storage.googleapis.com/internet_egress_bandwidth".
       
      string quota_metric = 4;
      Specified by:
      getQuotaMetricBytes in interface QuotaFailure.ViolationOrBuilder
      Returns:
      The bytes for quotaMetric.
    • getQuotaId

      public String getQuotaId()
       The id of the violated quota. Also know as "limit name", this is the
       unique identifier of a quota in the context of an API service.
      
       For example, "CPUS-PER-VM-FAMILY-per-project-region".
       
      string quota_id = 5;
      Specified by:
      getQuotaId in interface QuotaFailure.ViolationOrBuilder
      Returns:
      The quotaId.
    • getQuotaIdBytes

      public com.google.protobuf.ByteString getQuotaIdBytes()
       The id of the violated quota. Also know as "limit name", this is the
       unique identifier of a quota in the context of an API service.
      
       For example, "CPUS-PER-VM-FAMILY-per-project-region".
       
      string quota_id = 5;
      Specified by:
      getQuotaIdBytes in interface QuotaFailure.ViolationOrBuilder
      Returns:
      The bytes for quotaId.
    • getQuotaDimensionsCount

      public int getQuotaDimensionsCount()
      Description copied from interface: QuotaFailure.ViolationOrBuilder
       The dimensions of the violated quota. Every non-global quota is enforced
       on a set of dimensions. While quota metric defines what to count, the
       dimensions specify for what aspects the counter should be increased.
      
       For example, the quota "CPUs per region per VM family" enforces a limit
       on the metric "compute.googleapis.com/cpus_per_vm_family" on dimensions
       "region" and "vm_family". And if the violation occurred in region
       "us-central1" and for VM family "n1", the quota_dimensions would be,
      
       {
         "region": "us-central1",
         "vm_family": "n1",
       }
      
       When a quota is enforced globally, the quota_dimensions would always be
       empty.
       
      map<string, string> quota_dimensions = 6;
      Specified by:
      getQuotaDimensionsCount in interface QuotaFailure.ViolationOrBuilder
    • containsQuotaDimensions

      public boolean containsQuotaDimensions(String key)
       The dimensions of the violated quota. Every non-global quota is enforced
       on a set of dimensions. While quota metric defines what to count, the
       dimensions specify for what aspects the counter should be increased.
      
       For example, the quota "CPUs per region per VM family" enforces a limit
       on the metric "compute.googleapis.com/cpus_per_vm_family" on dimensions
       "region" and "vm_family". And if the violation occurred in region
       "us-central1" and for VM family "n1", the quota_dimensions would be,
      
       {
         "region": "us-central1",
         "vm_family": "n1",
       }
      
       When a quota is enforced globally, the quota_dimensions would always be
       empty.
       
      map<string, string> quota_dimensions = 6;
      Specified by:
      containsQuotaDimensions in interface QuotaFailure.ViolationOrBuilder
    • getQuotaDimensions

      @Deprecated public Map<String,String> getQuotaDimensions()
      Deprecated.
      Specified by:
      getQuotaDimensions in interface QuotaFailure.ViolationOrBuilder
    • getQuotaDimensionsMap

      public Map<String,String> getQuotaDimensionsMap()
       The dimensions of the violated quota. Every non-global quota is enforced
       on a set of dimensions. While quota metric defines what to count, the
       dimensions specify for what aspects the counter should be increased.
      
       For example, the quota "CPUs per region per VM family" enforces a limit
       on the metric "compute.googleapis.com/cpus_per_vm_family" on dimensions
       "region" and "vm_family". And if the violation occurred in region
       "us-central1" and for VM family "n1", the quota_dimensions would be,
      
       {
         "region": "us-central1",
         "vm_family": "n1",
       }
      
       When a quota is enforced globally, the quota_dimensions would always be
       empty.
       
      map<string, string> quota_dimensions = 6;
      Specified by:
      getQuotaDimensionsMap in interface QuotaFailure.ViolationOrBuilder
    • getQuotaDimensionsOrDefault

      public String getQuotaDimensionsOrDefault(String key, String defaultValue)
       The dimensions of the violated quota. Every non-global quota is enforced
       on a set of dimensions. While quota metric defines what to count, the
       dimensions specify for what aspects the counter should be increased.
      
       For example, the quota "CPUs per region per VM family" enforces a limit
       on the metric "compute.googleapis.com/cpus_per_vm_family" on dimensions
       "region" and "vm_family". And if the violation occurred in region
       "us-central1" and for VM family "n1", the quota_dimensions would be,
      
       {
         "region": "us-central1",
         "vm_family": "n1",
       }
      
       When a quota is enforced globally, the quota_dimensions would always be
       empty.
       
      map<string, string> quota_dimensions = 6;
      Specified by:
      getQuotaDimensionsOrDefault in interface QuotaFailure.ViolationOrBuilder
    • getQuotaDimensionsOrThrow

      public String getQuotaDimensionsOrThrow(String key)
       The dimensions of the violated quota. Every non-global quota is enforced
       on a set of dimensions. While quota metric defines what to count, the
       dimensions specify for what aspects the counter should be increased.
      
       For example, the quota "CPUs per region per VM family" enforces a limit
       on the metric "compute.googleapis.com/cpus_per_vm_family" on dimensions
       "region" and "vm_family". And if the violation occurred in region
       "us-central1" and for VM family "n1", the quota_dimensions would be,
      
       {
         "region": "us-central1",
         "vm_family": "n1",
       }
      
       When a quota is enforced globally, the quota_dimensions would always be
       empty.
       
      map<string, string> quota_dimensions = 6;
      Specified by:
      getQuotaDimensionsOrThrow in interface QuotaFailure.ViolationOrBuilder
    • getQuotaValue

      public long getQuotaValue()
       The enforced quota value at the time of the `QuotaFailure`.
      
       For example, if the enforced quota value at the time of the
       `QuotaFailure` on the number of CPUs is "10", then the value of this
       field would reflect this quantity.
       
      int64 quota_value = 7;
      Specified by:
      getQuotaValue in interface QuotaFailure.ViolationOrBuilder
      Returns:
      The quotaValue.
    • hasFutureQuotaValue

      public boolean hasFutureQuotaValue()
       The new quota value being rolled out at the time of the violation. At the
       completion of the rollout, this value will be enforced in place of
       quota_value. If no rollout is in progress at the time of the violation,
       this field is not set.
      
       For example, if at the time of the violation a rollout is in progress
       changing the number of CPUs quota from 10 to 20, 20 would be the value of
       this field.
       
      optional int64 future_quota_value = 8;
      Specified by:
      hasFutureQuotaValue in interface QuotaFailure.ViolationOrBuilder
      Returns:
      Whether the futureQuotaValue field is set.
    • getFutureQuotaValue

      public long getFutureQuotaValue()
       The new quota value being rolled out at the time of the violation. At the
       completion of the rollout, this value will be enforced in place of
       quota_value. If no rollout is in progress at the time of the violation,
       this field is not set.
      
       For example, if at the time of the violation a rollout is in progress
       changing the number of CPUs quota from 10 to 20, 20 would be the value of
       this field.
       
      optional int64 future_quota_value = 8;
      Specified by:
      getFutureQuotaValue in interface QuotaFailure.ViolationOrBuilder
      Returns:
      The futureQuotaValue.
    • 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 QuotaFailure.Violation parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static QuotaFailure.Violation parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static QuotaFailure.Violation parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static QuotaFailure.Violation parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static QuotaFailure.Violation parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static QuotaFailure.Violation parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static QuotaFailure.Violation parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static QuotaFailure.Violation parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static QuotaFailure.Violation parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static QuotaFailure.Violation parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static QuotaFailure.Violation parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static QuotaFailure.Violation parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public QuotaFailure.Violation.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static QuotaFailure.Violation.Builder newBuilder()
    • newBuilder

      public static QuotaFailure.Violation.Builder newBuilder(QuotaFailure.Violation prototype)
    • toBuilder

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

      protected QuotaFailure.Violation.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
      Specified by:
      newBuilderForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstance

      public static QuotaFailure.Violation getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<QuotaFailure.Violation> parser()
    • getParserForType

      public com.google.protobuf.Parser<QuotaFailure.Violation> 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 QuotaFailure.Violation getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder