Class QuotaFailure.Violation (2.58.0)

public static final class QuotaFailure.Violation extends 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

Static Fields

API_SERVICE_FIELD_NUMBER

public static final int API_SERVICE_FIELD_NUMBER
Field Value
Type Description
int

DESCRIPTION_FIELD_NUMBER

public static final int DESCRIPTION_FIELD_NUMBER
Field Value
Type Description
int

FUTURE_QUOTA_VALUE_FIELD_NUMBER

public static final int FUTURE_QUOTA_VALUE_FIELD_NUMBER
Field Value
Type Description
int

QUOTA_DIMENSIONS_FIELD_NUMBER

public static final int QUOTA_DIMENSIONS_FIELD_NUMBER
Field Value
Type Description
int

QUOTA_ID_FIELD_NUMBER

public static final int QUOTA_ID_FIELD_NUMBER
Field Value
Type Description
int

QUOTA_METRIC_FIELD_NUMBER

public static final int QUOTA_METRIC_FIELD_NUMBER
Field Value
Type Description
int

QUOTA_VALUE_FIELD_NUMBER

public static final int QUOTA_VALUE_FIELD_NUMBER
Field Value
Type Description
int

SUBJECT_FIELD_NUMBER

public static final int SUBJECT_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static QuotaFailure.Violation getDefaultInstance()
Returns
Type Description
QuotaFailure.Violation

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static QuotaFailure.Violation.Builder newBuilder()
Returns
Type Description
QuotaFailure.Violation.Builder

newBuilder(QuotaFailure.Violation prototype)

public static QuotaFailure.Violation.Builder newBuilder(QuotaFailure.Violation prototype)
Parameter
Name Description
prototype QuotaFailure.Violation
Returns
Type Description
QuotaFailure.Violation.Builder

parseDelimitedFrom(InputStream input)

public static QuotaFailure.Violation parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
QuotaFailure.Violation
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static QuotaFailure.Violation parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
QuotaFailure.Violation
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static QuotaFailure.Violation parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
QuotaFailure.Violation
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static QuotaFailure.Violation parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
QuotaFailure.Violation
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static QuotaFailure.Violation parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
QuotaFailure.Violation
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static QuotaFailure.Violation parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
QuotaFailure.Violation
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static QuotaFailure.Violation parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
QuotaFailure.Violation
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static QuotaFailure.Violation parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
QuotaFailure.Violation
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static QuotaFailure.Violation parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
QuotaFailure.Violation
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static QuotaFailure.Violation parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
QuotaFailure.Violation
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static QuotaFailure.Violation parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
QuotaFailure.Violation
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static QuotaFailure.Violation parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
QuotaFailure.Violation
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<QuotaFailure.Violation> parser()
Returns
Type Description
Parser<Violation>

Methods

containsQuotaDimensions(String key)

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;

Parameter
Name Description
key String
Returns
Type Description
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

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;

Returns
Type Description
String

The apiService.

getApiServiceBytes()

public 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;

Returns
Type Description
ByteString

The bytes for apiService.

getDefaultInstanceForType()

public QuotaFailure.Violation getDefaultInstanceForType()
Returns
Type Description
QuotaFailure.Violation

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;

Returns
Type Description
String

The description.

getDescriptionBytes()

public 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;

Returns
Type Description
ByteString

The bytes for description.

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;

Returns
Type Description
long

The futureQuotaValue.

getParserForType()

public Parser<QuotaFailure.Violation> getParserForType()
Returns
Type Description
Parser<Violation>
Overrides

getQuotaDimensions() (deprecated)

public Map<String,String> getQuotaDimensions()
Returns
Type Description
Map<String,String>

getQuotaDimensionsCount()

public int getQuotaDimensionsCount()

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;

Returns
Type Description
int

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;

Returns
Type Description
Map<String,String>

getQuotaDimensionsOrDefault(String key, String defaultValue)

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;

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getQuotaDimensionsOrThrow(String key)

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;

Parameter
Name Description
key String
Returns
Type Description
String

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;

Returns
Type Description
String

The quotaId.

getQuotaIdBytes()

public 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;

Returns
Type Description
ByteString

The bytes for quotaId.

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;

Returns
Type Description
String

The quotaMetric.

getQuotaMetricBytes()

public 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;

Returns
Type Description
ByteString

The bytes for quotaMetric.

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;

Returns
Type Description
long

The quotaValue.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

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;

Returns
Type Description
String

The subject.

getSubjectBytes()

public 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;

Returns
Type Description
ByteString

The bytes for subject.

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;

Returns
Type Description
boolean

Whether the futureQuotaValue field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public QuotaFailure.Violation.Builder newBuilderForType()
Returns
Type Description
QuotaFailure.Violation.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected QuotaFailure.Violation.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
QuotaFailure.Violation.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public QuotaFailure.Violation.Builder toBuilder()
Returns
Type Description
QuotaFailure.Violation.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException