# Google Cloud Quotas V1beta Client - Class QuotaPreference (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

> [!WARNING]
> **Beta**
>
>
> This library is covered by the [Pre-GA Offerings Terms](https://docs.cloud.google.com/terms/service-terms#1)
> of the Terms of Service. Pre-GA libraries might have limited support,
> and changes to pre-GA libraries might not be compatible with other pre-GA versions.
> For more information, see the
> [launch stage descriptions](https://docs.cloud.google.com/products#product-launch-stages).

Reference documentation and code samples for the Google Cloud Quotas V1beta Client class QuotaPreference.

QuotaPreference represents the preferred quota configuration specified for
a project, folder or organization. There is only one QuotaPreference
resource for a quota value targeting a unique set of dimensions.

Generated from protobuf message `google.api.cloudquotas.v1beta.QuotaPreference`

## Namespace

Google \\ Cloud \\ CloudQuotas \\ V1beta

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Required except in the CREATE requests. The resource name of the quota preference. The path that follows `/locations` must be `/global`. For example: `projects/123/locations/global/quotaPreferences/my-config-for-us-east1` |
| `↳ dimensions` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` Immutable. The dimensions that this quota preference applies to. The key of the map entry is the name of a dimension, such as `region`, `zone`, `network_id`, and the value of the map entry is the dimension value. If a dimension is missing from the map of dimensions, the quota preference applies to all the dimension values except for those that have other quota preferences configured for the specific value. Note: QuotaPreferences can only be applied across all values of `user` and `resource` dimension. Do not set values for `user` or `resource` in the dimension map. For example: `{"provider" : "Example Organization"}` where `provider` is a service-specific quota dimension and `Example Organization` is the provider name. |
| `↳ quota_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-quotas/latest/V1beta.QuotaConfig` Required. Preferred quota configuration. |
| `↳ etag` | `string` Optional. The current etag of the quota preference. If an etag is provided on update and does not match the current server's etag of the quota preference, the request will be blocked and an ABORTED error will be returned. See <https://google.aip.dev/134#etags> for more details on etags. |
| `↳ create_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. Create time stamp |
| `↳ update_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. Update time stamp |
| `↳ service` | `string` Required. The name of the service to which the quota preference is applied. |
| `↳ quota_id` | `string` Required. The id of the quota to which the quota preference is applied. A quota name is unique in the service. For example, `CpusPerProjectPerRegion` |
| `↳ reconciling` | `bool` Output only. Is the quota preference pending Google Cloud approval and fulfillment. |
| `↳ justification` | `string` The reason / justification for this quota preference. |
| `↳ contact_email` | `string` Input only. An email address that can be used to contact the user, in case Google Cloud needs more information to make a decision before additional quota can be granted. When requesting a quota increase, the email address is required. When requesting a quota decrease, the email address is optional. For example, the email address is optional when the `QuotaConfig.preferred_value` is smaller than the `QuotaDetails.reset_value`. |

### getName

Required except in the CREATE requests.

The resource name of the quota preference.
The path that follows `/locations` must be `/global`.
For example:
`projects/123/locations/global/quotaPreferences/my-config-for-us-east1`

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

### setName

Required except in the CREATE requests.

The resource name of the quota preference.
The path that follows `/locations` must be `/global`.
For example:
`projects/123/locations/global/quotaPreferences/my-config-for-us-east1`

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

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

### getDimensions

Immutable. The dimensions that this quota preference applies to. The key of
the map entry is the name of a dimension, such as `region`, `zone`,
`network_id`, and the value of the map entry is the dimension value.

If a dimension is missing from the map of dimensions, the quota preference
applies to all the dimension values except for those that have other quota
preferences configured for the specific value.
Note: QuotaPreferences can only be applied across all values of `user` and
`resource` dimension. Do not set values for `user` or `resource` in the
dimension map.
For example: `{"provider" : "Example Organization"}` where `provider` is a
service-specific quota dimension and `Example Organization` is the provider
name.

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

### setDimensions

Immutable. The dimensions that this quota preference applies to. The key of
the map entry is the name of a dimension, such as `region`, `zone`,
`network_id`, and the value of the map entry is the dimension value.

If a dimension is missing from the map of dimensions, the quota preference
applies to all the dimension values except for those that have other quota
preferences configured for the specific value.
Note: QuotaPreferences can only be applied across all values of `user` and
`resource` dimension. Do not set values for `user` or `resource` in the
dimension map.
For example: `{"provider" : "Example Organization"}` where `provider` is a
service-specific quota dimension and `Example Organization` is the provider
name.

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

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

### getQuotaConfig

Required. Preferred quota configuration.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-quotas/latest/V1beta.QuotaConfig|null` |   |

### hasQuotaConfig

### clearQuotaConfig

### setQuotaConfig

Required. Preferred quota configuration.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-quotas/latest/V1beta.QuotaConfig` |

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

### getEtag

Optional. The current etag of the quota preference. If an etag is provided
on update and does not match the current server's etag of the quota
preference, the request will be blocked and an ABORTED error will be
returned. See <https://google.aip.dev/134#etags> for more details on etags.

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

### setEtag

Optional. The current etag of the quota preference. If an etag is provided
on update and does not match the current server's etag of the quota
preference, the request will be blocked and an ABORTED error will be
returned. See <https://google.aip.dev/134#etags> for more details on etags.

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

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

### getCreateTime

Output only. Create time stamp

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

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. Create time stamp

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

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

### getUpdateTime

Output only. Update time stamp

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

### hasUpdateTime

### clearUpdateTime

### setUpdateTime

Output only. Update time stamp

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

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

### getService

Required. The name of the service to which the quota preference is applied.

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

### setService

Required. The name of the service to which the quota preference is applied.

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

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

### getQuotaId

Required. The id of the quota to which the quota preference is applied. A
quota name is unique in the service. For example, `CpusPerProjectPerRegion`

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

### setQuotaId

Required. The id of the quota to which the quota preference is applied. A
quota name is unique in the service. For example, `CpusPerProjectPerRegion`

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

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

### getReconciling

Output only. Is the quota preference pending Google Cloud approval and
fulfillment.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setReconciling

Output only. Is the quota preference pending Google Cloud approval and
fulfillment.

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

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

### getJustification

The reason / justification for this quota preference.

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

### setJustification

The reason / justification for this quota preference.

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

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

### getContactEmail

Input only. An email address that can be used to contact the user, in case
Google Cloud needs more information to make a decision before additional
quota can be granted.

When requesting a quota increase, the email address is required.
When requesting a quota decrease, the email address is optional.
For example, the email address is optional when the
`QuotaConfig.preferred_value` is smaller than the
`QuotaDetails.reset_value`.

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

### setContactEmail

Input only. An email address that can be used to contact the user, in case
Google Cloud needs more information to make a decision before additional
quota can be granted.

When requesting a quota increase, the email address is required.
When requesting a quota decrease, the email address is optional.
For example, the email address is optional when the
`QuotaConfig.preferred_value` is smaller than the
`QuotaDetails.reset_value`.

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

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