# Interface QuotaFailure.ViolationOrBuilder (2.72.0)

2.72.0 (latest) 2.70.0 2.67.0 2.66.0 2.65.1 2.64.1 2.63.2 2.62.0 2.61.3 2.60.0 2.59.2 2.58.0 2.57.0 2.56.0 2.54.1 2.53.0 2.52.0 2.51.0 2.50.1 2.49.0 2.48.0 2.46.0 2.45.1 2.44.0 2.43.0 2.42.0 2.41.0 2.40.0 2.39.1 2.38.0 2.37.1 2.36.0 2.34.0 2.33.0 2.32.0 2.30.0 2.29.0 2.28.0 2.27.0 2.26.0 2.25.1 2.24.0 2.23.1 2.22.1 2.21.1 2.15.0 2.14.3 2.13.0 2.12.0 2.11.0 2.10.0 2.9.6 2.8.4 2.7.4

    public static interface QuotaFailure.ViolationOrBuilder extends MessageOrBuilder

## Implements

[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)

## Methods

### containsQuotaDimensions(String key)

    public abstract 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` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getApiService()

    public abstract 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** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The apiService. |

### getApiServiceBytes()

    public abstract 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** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for apiService. |

### getDescription()

    public abstract 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** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The description. |

### getDescriptionBytes()

    public abstract 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** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for description. |

### getFutureQuotaValue()

    public abstract 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** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The futureQuotaValue. |

### getQuotaDimensions() (deprecated)

    public abstract Map<String,String> getQuotaDimensions()

Use [#getQuotaDimensionsMap()](https://docs.cloud.google.com/java/docs/reference/proto-google-common-protos/latest/com.google.rpc.QuotaFailure.ViolationOrBuilder#com_google_rpc_QuotaFailure_ViolationOrBuilder_getQuotaDimensionsMap__) instead.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/Map.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html,https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` |   |

### getQuotaDimensionsCount()

    public abstract 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** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getQuotaDimensionsMap()

    public abstract 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** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/Map.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html,https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` |   |

### getQuotaDimensionsOrDefault(String key, String defaultValue)

    public abstract 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` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |
| `defaultValue` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |   |

### getQuotaDimensionsOrThrow(String key)

    public abstract 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` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |   |

### getQuotaId()

    public abstract 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** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The quotaId. |

### getQuotaIdBytes()

    public abstract 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** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for quotaId. |

### getQuotaMetric()

    public abstract 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** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The quotaMetric. |

### getQuotaMetricBytes()

    public abstract 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** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for quotaMetric. |

### getQuotaValue()

    public abstract 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** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The quotaValue. |

### getSubject()

    public abstract 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** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The subject. |

### getSubjectBytes()

    public abstract 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** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for subject. |

### hasFutureQuotaValue()

    public abstract 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** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the futureQuotaValue field is set. |