# Google Cloud Quotas V1 Client - Class QuotaConfig (1.5.5)

1.5.5 (latest) 1.5.4 1.4.1 1.3.1 1.2.1 1.1.1 1.0.1 0.2.3 0.1.0 Reference documentation and code samples for the Google Cloud Quotas V1 Client class QuotaConfig.

The preferred quota configuration.

Generated from protobuf message `google.api.cloudquotas.v1.QuotaConfig`

## Namespace

Google \\ Cloud \\ CloudQuotas \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ preferred_value` | `int|string` Required. The preferred value. Must be greater than or equal to -1. If set to -1, it means the value is "unlimited". |
| `↳ state_detail` | `string` Output only. Optional details about the state of this quota preference. |
| `↳ granted_value` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Int64Value` Output only. Granted quota value. |
| `↳ trace_id` | `string` Output only. The trace id that the Google Cloud uses to provision the requested quota. This trace id may be used by the client to contact Cloud support to track the state of a quota preference request. The trace id is only produced for increase requests and is unique for each request. The quota decrease requests do not have a trace id. |
| `↳ annotations` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` Optional. The annotations map for clients to store small amounts of arbitrary data. Do not put PII or other sensitive information here. See <https://google.aip.dev/128#annotations> |
| `↳ request_origin` | `int` Output only. The origin of the quota preference request. |

### getPreferredValue

Required. The preferred value. Must be greater than or equal to -1. If set
to -1, it means the value is "unlimited".

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int|string` |   |

### setPreferredValue

Required. The preferred value. Must be greater than or equal to -1. If set
to -1, it means the value is "unlimited".

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int|string` |

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

### getStateDetail

Output only. Optional details about the state of this quota preference.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setStateDetail

Output only. Optional details about the state of this quota preference.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

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

### getGrantedValue

Output only. Granted quota value.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Int64Value|null` |   |

### hasGrantedValue

### clearGrantedValue

### getGrantedValueUnwrapped

Returns the unboxed value from `getGrantedValue()`

Output only. Granted quota value.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int|string|null` |   |

### setGrantedValue

Output only. Granted quota value.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Int64Value` |

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

### setGrantedValueUnwrapped

Sets the field by wrapping a primitive type in a Google\\Protobuf\\Int64Value object.

Output only. Granted quota value.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int|string|null` |

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

### getTraceId

Output only. The trace id that the Google Cloud uses to provision the
requested quota. This trace id may be used by the client to contact Cloud
support to track the state of a quota preference request. The trace id is
only produced for increase requests and is unique for each request. The
quota decrease requests do not have a trace id.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setTraceId

Output only. The trace id that the Google Cloud uses to provision the
requested quota. This trace id may be used by the client to contact Cloud
support to track the state of a quota preference request. The trace id is
only produced for increase requests and is unique for each request. The
quota decrease requests do not have a trace id.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

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

### getAnnotations

Optional. The annotations map for clients to store small amounts of
arbitrary data. Do not put PII or other sensitive information here. See
<https://google.aip.dev/128#annotations>

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |   |

### setAnnotations

Optional. The annotations map for clients to store small amounts of
arbitrary data. Do not put PII or other sensitive information here. See
<https://google.aip.dev/128#annotations>

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |

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

### getRequestOrigin

Output only. The origin of the quota preference request.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [Origin](https://docs.cloud.google.com/php/docs/reference/cloud-quotas/latest/V1.QuotaConfig.Origin). |

### setRequestOrigin

Output only. The origin of the quota preference request.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [Origin](https://docs.cloud.google.com/php/docs/reference/cloud-quotas/latest/V1.QuotaConfig.Origin). |

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