# Google Cloud Bare Metal Solution V2 Client - Class VolumeSnapshot (1.1.3)

1.1.3 (latest) 1.1.2 1.0.5 0.6.5 0.5.2 0.4.0 0.3.2 0.2.8 Reference documentation and code samples for the Google Cloud Bare Metal Solution V2 Client class VolumeSnapshot.

A snapshot of a volume. Only boot volumes can have snapshots.

Generated from protobuf message `google.cloud.baremetalsolution.v2.VolumeSnapshot`

## Namespace

Google \\ Cloud \\ BareMetalSolution \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` The name of the snapshot. |
| `↳ id` | `string` Output only. An identifier for the snapshot, generated by the backend. |
| `↳ description` | `string` The description of the snapshot. |
| `↳ create_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The creation time of the snapshot. |
| `↳ storage_volume` | `string` Output only. The name of the volume which this snapshot belongs to. |
| `↳ type` | `int` Output only. The type of the snapshot which indicates whether it was scheduled or manual/ad-hoc. |

### getName

The name of the snapshot.

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

### setName

The name of the snapshot.

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

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

### getId

Output only. An identifier for the snapshot, generated by the backend.

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

### setId

Output only. An identifier for the snapshot, generated by the backend.

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

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

### getDescription

The description of the snapshot.

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

### setDescription

The description of the snapshot.

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

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

### getCreateTime

Output only. The creation time of the snapshot.

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

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. The creation time of the snapshot.

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

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

### getStorageVolume

Output only. The name of the volume which this snapshot belongs to.

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

### setStorageVolume

Output only. The name of the volume which this snapshot belongs to.

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

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

### getType

Output only. The type of the snapshot which indicates whether it was
scheduled or manual/ad-hoc.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [SnapshotType](https://docs.cloud.google.com/php/docs/reference/cloud-bare-metal-solution/latest/V2.VolumeSnapshot.SnapshotType). |

### setType

Output only. The type of the snapshot which indicates whether it was
scheduled or manual/ad-hoc.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [SnapshotType](https://docs.cloud.google.com/php/docs/reference/cloud-bare-metal-solution/latest/V2.VolumeSnapshot.SnapshotType). |

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