# Google Cloud Net App V1 Client - Class Snapshot (1.12.0)

1.12.0 (latest) 1.11.0 1.10.2 1.9.0 1.8.1 1.7.0 1.6.1 1.4.0 1.3.1 1.2.1 1.1.1 1.0.1 0.3.1 0.2.6 0.1.1 Reference documentation and code samples for the Google Cloud Net App V1 Client class Snapshot.

Snapshot is a point-in-time version of a Volume's content.

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

## Namespace

Google \\ Cloud \\ NetApp \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Identifier. The resource name of the snapshot. Format: `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`. |
| `↳ state` | `int` Output only. The snapshot state. |
| `↳ state_details` | `string` Output only. State details of the storage pool |
| `↳ description` | `string` A description of the snapshot with 2048 characters or less. Requests with longer descriptions will be rejected. |
| `↳ used_bytes` | `float` Output only. Current storage usage for the snapshot in bytes. |
| `↳ 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. |

### getName

Identifier. The resource name of the snapshot.

Format:
`projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`.

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

### setName

Identifier. The resource name of the snapshot.

Format:
`projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`.

| **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-netapp/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-netapp/latest/V1.Snapshot.State). |

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

### getStateDetails

Output only. State details of the storage pool

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

### setStateDetails

Output only. State details of the storage pool

| **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` |   |

### getUsedBytes

Output only. Current storage usage for the snapshot in bytes.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `float` |   |

### setUsedBytes

Output only. Current storage usage for the snapshot in bytes.

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

| **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` |   |