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

Message for creating a QuotaPreference

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

## Namespace

Google \\ Cloud \\ CloudQuotas \\ V1beta

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ parent` | `string` Required. Value for parent. Example: `projects/123/locations/global` |
| `↳ quota_preference_id` | `string` Optional. Id of the requesting object, must be unique under its parent. If client does not set this field, the service will generate one. |
| `↳ quota_preference` | `https://docs.cloud.google.com/php/docs/reference/cloud-quotas/latest/V1beta.QuotaPreference` Required. The resource being created |
| `↳ ignore_safety_checks` | `int[]` The list of quota safety checks to be ignored. |

### getParent

Required. Value for parent.

Example:
`projects/123/locations/global`

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

### setParent

Required. Value for parent.

Example:
`projects/123/locations/global`

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

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

### getQuotaPreferenceId

Optional. Id of the requesting object, must be unique under its parent.

If client does not set this field, the service will generate one.

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

### setQuotaPreferenceId

Optional. Id of the requesting object, must be unique under its parent.

If client does not set this field, the service will generate one.

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

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

### getQuotaPreference

Required. The resource being created

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

### hasQuotaPreference

### clearQuotaPreference

### setQuotaPreference

Required. The resource being created

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

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

### getIgnoreSafetyChecks

The list of quota safety checks to be ignored.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<int>` |   |

### setIgnoreSafetyChecks

The list of quota safety checks to be ignored.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int[]` |

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

### static::build

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. Value for parent. Example: `projects/123/locations/global` Please see CloudQuotasClient::locationName() for help formatting this field. |
| `quotaPreference` | `https://docs.cloud.google.com/php/docs/reference/cloud-quotas/latest/V1beta.QuotaPreference` Required. The resource being created |
| `quotaPreferenceId` | `string` Optional. Id of the requesting object, must be unique under its parent. If client does not set this field, the service will generate one. |

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

### static::buildFromParentQuotaPreference

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. Value for parent. Example: `projects/123/locations/global` Please see CloudQuotasClient::locationName() for help formatting this field. |
| `quotaPreference` | `https://docs.cloud.google.com/php/docs/reference/cloud-quotas/latest/V1beta.QuotaPreference` Required. The resource being created |

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