# Google Cloud Filestore V1 Client - Class Snapshot (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 Snapshot.

A Filestore snapshot.

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

## Namespace

Google \\ Cloud \\ Filestore \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Output only. The resource name of the snapshot, in the format `projects/{project_id}/locations/{location_id}/instances/{instance_id}/snapshots/{snapshot_id}`. |
| `↳ description` | `string` A description of the snapshot with 2048 characters or less. Requests with longer descriptions will be rejected. |
| `↳ state` | `int` Output only. The snapshot state. |
| `↳ create_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The time when the snapshot was created. |
| `↳ labels` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` Resource labels to represent user provided metadata. |
| `↳ filesystem_used_bytes` | `int|string` Output only. The amount of bytes needed to allocate a full copy of the snapshot content |
| `↳ tags` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` Optional. Input only. Immutable. Tag key-value pairs bound to this resource. Each key must be a namespaced name and each value a short name. Example: "123456789012/environment" : "production", "123456789013/costCenter" : "marketing" See the documentation for more information: - Namespaced name: <https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing#retrieving_tag_key> - Short name: <https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing#retrieving_tag_value> |

### getName

Output only. The resource name of the snapshot, in the format
`projects/{project_id}/locations/{location_id}/instances/{instance_id}/snapshots/{snapshot_id}`.

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

### setName

Output only. The resource name of the snapshot, in the format
`projects/{project_id}/locations/{location_id}/instances/{instance_id}/snapshots/{snapshot_id}`.

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

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

### getDescription

A description of the snapshot with 2048 characters or less.

Requests with longer descriptions will be rejected.

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

### setDescription

A description of the snapshot with 2048 characters or less.

Requests with longer descriptions will be rejected.

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

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

### getState

Output only. The snapshot state.

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

### setState

Output only. The snapshot state.

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

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

### getCreateTime

Output only. The time when the snapshot was created.

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

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. The time when the snapshot was created.

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

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

### getLabels

Resource labels to represent user provided metadata.

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

### setLabels

Resource labels to represent user provided metadata.

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

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

### getFilesystemUsedBytes

Output only. The amount of bytes needed to allocate a full copy of the
snapshot content

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

### setFilesystemUsedBytes

Output only. The amount of bytes needed to allocate a full copy of the
snapshot content

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

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

### getTags

Optional. Input only. Immutable. Tag key-value pairs bound to this
resource. Each key must be a namespaced name and each value a short name.

Example:
"123456789012/environment" : "production",
"123456789013/costCenter" : "marketing"
See the documentation for more information:

- Namespaced name: <https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing#retrieving_tag_key>
- Short name: <https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing#retrieving_tag_value>

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

### setTags

Optional. Input only. Immutable. Tag key-value pairs bound to this
resource. Each key must be a namespaced name and each value a short name.

Example:
"123456789012/environment" : "production",
"123456789013/costCenter" : "marketing"
See the documentation for more information:

- Namespaced name: <https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing#retrieving_tag_key>
- Short name: <https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing#retrieving_tag_value>

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

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