# Google API Common Protos Client - Class QuotaFailure (4.14.0)

4.14.0 (latest) 4.13.0 4.12.5 4.11.0 4.10.0 4.9.0 4.8.3 Reference documentation and code samples for the Google API Common Protos Client class QuotaFailure.

Describes how a quota check failed.

For example if a daily limit was exceeded for the calling project,
a service could respond with a QuotaFailure detail containing the project
id and the description of the quota limit that was exceeded. If the
calling project hasn't enabled the service in the developer console, then
a service could respond with the project id and set `service_disabled`
to true.
Also see RetryInfo and Help types for other details about handling a
quota failure.

Generated from protobuf message `google.rpc.QuotaFailure`

## Namespace

Google \\ Rpc

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ violations` | `array<https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.QuotaFailure.Violation>` Describes all quota violations. |

### getViolations

Describes all quota violations.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.QuotaFailure.Violation>` |   |

### setViolations

Describes all quota violations.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.QuotaFailure.Violation>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |