# Google Cloud Bare Metal Solution V2 Client - Class VolumeConfig (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 VolumeConfig.

Configuration parameters for a new volume.

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

## Namespace

Google \\ Cloud \\ BareMetalSolution \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Output only. The name of the volume config. |
| `↳ id` | `string` A transient unique identifier to identify a volume within an ProvisioningConfig request. |
| `↳ snapshots_enabled` | `bool` Whether snapshots should be enabled. |
| `↳ type` | `int` The type of this Volume. |
| `↳ protocol` | `int` Volume protocol. |
| `↳ size_gb` | `int` The requested size of this volume, in GB. |
| `↳ lun_ranges` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-bare-metal-solution/latest/V2.VolumeConfig.LunRange>` LUN ranges to be configured. Set only when protocol is PROTOCOL_FC. |
| `↳ machine_ids` | `string[]` Machine ids connected to this volume. Set only when protocol is PROTOCOL_FC. |
| `↳ nfs_exports` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-bare-metal-solution/latest/V2.VolumeConfig.NfsExport>` NFS exports. Set only when protocol is PROTOCOL_NFS. |
| `↳ user_note` | `string` User note field, it can be used by customers to add additional information for the BMS Ops team . |
| `↳ gcp_service` | `string` The GCP service of the storage volume. Available gcp_service are in <https://cloud.google.com/bare-metal/docs/bms-planning>. |
| `↳ performance_tier` | `int` Performance tier of the Volume. Default is SHARED. |

### getName

Output only. The name of the volume config.

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

### setName

Output only. The name of the volume config.

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

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

### getId

A transient unique identifier to identify a volume within an
ProvisioningConfig request.

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

### setId

A transient unique identifier to identify a volume within an
ProvisioningConfig request.

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

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

### getSnapshotsEnabled

Whether snapshots should be enabled.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setSnapshotsEnabled

Whether snapshots should be enabled.

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

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

### getType

The type of this Volume.

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

### setType

The type of this Volume.

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

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

### getProtocol

Volume protocol.

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

### setProtocol

Volume protocol.

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

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

### getSizeGb

The requested size of this volume, in GB.

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

### setSizeGb

The requested size of this volume, in GB.

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

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

### getLunRanges

LUN ranges to be configured. Set only when protocol is PROTOCOL_FC.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-bare-metal-solution/latest/V2.VolumeConfig.LunRange>` |   |

### setLunRanges

LUN ranges to be configured. Set only when protocol is PROTOCOL_FC.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-bare-metal-solution/latest/V2.VolumeConfig.LunRange>` |

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

### getMachineIds

Machine ids connected to this volume. Set only when protocol is
PROTOCOL_FC.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setMachineIds

Machine ids connected to this volume. Set only when protocol is
PROTOCOL_FC.

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

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

### getNfsExports

NFS exports. Set only when protocol is PROTOCOL_NFS.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-bare-metal-solution/latest/V2.VolumeConfig.NfsExport>` |   |

### setNfsExports

NFS exports. Set only when protocol is PROTOCOL_NFS.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-bare-metal-solution/latest/V2.VolumeConfig.NfsExport>` |

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

### getUserNote

User note field, it can be used by customers to add additional information
for the BMS Ops team .

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

### setUserNote

User note field, it can be used by customers to add additional information
for the BMS Ops team .

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

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

### getGcpService

The GCP service of the storage volume. Available gcp_service are in
<https://cloud.google.com/bare-metal/docs/bms-planning>.

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

### setGcpService

The GCP service of the storage volume. Available gcp_service are in
<https://cloud.google.com/bare-metal/docs/bms-planning>.

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

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

### getPerformanceTier

Performance tier of the Volume.

Default is SHARED.

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

### setPerformanceTier

Performance tier of the Volume.

Default is SHARED.

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

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