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

Message requesting rename of a server.

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

## Namespace

Google \\ Cloud \\ BareMetalSolution \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Required. The `name` field is used to identify the volume. Format: projects/{project}/locations/{location}/volumes/{volume} |
| `↳ new_volume_id` | `string` Required. The new `id` of the volume. |

### getName

Required. The `name` field is used to identify the volume.

Format: projects/{project}/locations/{location}/volumes/{volume}

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

### setName

Required. The `name` field is used to identify the volume.

Format: projects/{project}/locations/{location}/volumes/{volume}

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

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

### getNewVolumeId

Required. The new `id` of the volume.

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

### setNewVolumeId

Required. The new `id` of the volume.

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

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

### static::build

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `string` Required. The `name` field is used to identify the volume. Format: projects/{project}/locations/{location}/volumes/{volume} Please see BareMetalSolutionClient::volumeName() for help formatting this field. |
| `newVolumeId` | `string` Required. The new `id` of the volume. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-bare-metal-solution/latest/V2.RenameVolumeRequest` |   |