# Google Cloud Storage Control V2 Client - Class CreateAnywhereCacheRequest (1.9.0)

1.9.0 (latest) 1.8.0 1.7.0 1.6.3 1.5.0 1.4.1 1.3.0 1.1.0 1.0.3 0.2.1 0.1.1 Reference documentation and code samples for the Google Cloud Storage Control V2 Client class CreateAnywhereCacheRequest.

Request message for CreateAnywhereCache.

Generated from protobuf message `google.storage.control.v2.CreateAnywhereCacheRequest`

## Namespace

Google \\ Cloud \\ Storage \\ Control \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ parent` | `string` Required. The bucket to which this cache belongs. Format: `projects/{project}/buckets/{bucket}` |
| `↳ anywhere_cache` | `https://docs.cloud.google.com/php/docs/reference/cloud-storage-control/latest/V2.AnywhereCache` Required. Properties of the Anywhere Cache instance being created. The parent bucket name is specified in the `parent` field. Server uses the default value of `ttl` or `admission_policy` if not specified in request. |
| `↳ request_id` | `string` Optional. A unique identifier for this request. UUID is the recommended format, but other formats are still accepted. This request is only idempotent if a `request_id` is provided. |

### getParent

Required. The bucket to which this cache belongs.

Format: `projects/{project}/buckets/{bucket}`

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

### setParent

Required. The bucket to which this cache belongs.

Format: `projects/{project}/buckets/{bucket}`

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

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

### getAnywhereCache

Required. Properties of the Anywhere Cache instance being created.

The parent bucket name is specified in the `parent` field. Server uses the
default value of `ttl` or `admission_policy` if not specified in
request.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-storage-control/latest/V2.AnywhereCache|null` |   |

### hasAnywhereCache

### clearAnywhereCache

### setAnywhereCache

Required. Properties of the Anywhere Cache instance being created.

The parent bucket name is specified in the `parent` field. Server uses the
default value of `ttl` or `admission_policy` if not specified in
request.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-storage-control/latest/V2.AnywhereCache` |

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

### getRequestId

Optional. A unique identifier for this request. UUID is the recommended
format, but other formats are still accepted. This request is only
idempotent if a `request_id` is provided.

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

### setRequestId

Optional. A unique identifier for this request. UUID is the recommended
format, but other formats are still accepted. This request is only
idempotent if a `request_id` is provided.

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

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

### static::build

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. The bucket to which this cache belongs. Format: `projects/{project}/buckets/{bucket}` Please see StorageControlClient::bucketName() for help formatting this field. |
| `anywhereCache` | `https://docs.cloud.google.com/php/docs/reference/cloud-storage-control/latest/V2.AnywhereCache` Required. Properties of the Anywhere Cache instance being created. The parent bucket name is specified in the `parent` field. Server uses the default value of `ttl` or `admission_policy` if not specified in request. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-storage-control/latest/V2.CreateAnywhereCacheRequest` |   |