# Google Cloud Filestore V1 Client - Class CreateSnapshotRequest (2.2.3)

2.2.3 (latest) 2.2.2 2.1.1 2.0.4 1.5.7 1.4.0 1.3.2 1.2.1 1.1.2 1.0.3 Reference documentation and code samples for the Google Cloud Filestore V1 Client class CreateSnapshotRequest.

CreateSnapshotRequest creates a snapshot.

Generated from protobuf message `google.cloud.filestore.v1.CreateSnapshotRequest`

## Namespace

Google \\ Cloud \\ Filestore \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ parent` | `string` Required. The Filestore Instance to create the snapshots of, in the format `projects/{project_id}/locations/{location}/instances/{instance_id}` |
| `↳ snapshot_id` | `string` Required. The ID to use for the snapshot. The ID must be unique within the specified instance. This value must start with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens, and cannot end with a hyphen. |
| `↳ snapshot` | `https://docs.cloud.google.com/php/docs/reference/cloud-filestore/latest/V1.Snapshot` Required. A snapshot resource. |

### getParent

Required. The Filestore Instance to create the snapshots of, in the format
`projects/{project_id}/locations/{location}/instances/{instance_id}`

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

### setParent

Required. The Filestore Instance to create the snapshots of, in the format
`projects/{project_id}/locations/{location}/instances/{instance_id}`

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

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

### getSnapshotId

Required. The ID to use for the snapshot.

The ID must be unique within the specified instance.
This value must start with a lowercase letter followed by up to 62
lowercase letters, numbers, or hyphens, and cannot end with a hyphen.

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

### setSnapshotId

Required. The ID to use for the snapshot.

The ID must be unique within the specified instance.
This value must start with a lowercase letter followed by up to 62
lowercase letters, numbers, or hyphens, and cannot end with a hyphen.

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

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

### getSnapshot

Required. A snapshot resource.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-filestore/latest/V1.Snapshot|null` |   |

### hasSnapshot

### clearSnapshot

### setSnapshot

Required. A snapshot resource.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-filestore/latest/V1.Snapshot` |

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

### static::build

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. The Filestore Instance to create the snapshots of, in the format `projects/{project_id}/locations/{location}/instances/{instance_id}` Please see CloudFilestoreManagerClient::instanceName() for help formatting this field. |
| `snapshot` | `https://docs.cloud.google.com/php/docs/reference/cloud-filestore/latest/V1.Snapshot` Required. A snapshot resource. |
| `snapshotId` | `string` Required. The ID to use for the snapshot. The ID must be unique within the specified instance. This value must start with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens, and cannot end with a hyphen. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-filestore/latest/V1.CreateSnapshotRequest` |   |