# Google Cloud Vm Migration V1 Client - Class PersistentDiskDefaults (1.4.0)

1.4.0 (latest) 1.3.0 1.2.1 1.1.0 1.0.5 0.6.5 0.5.2 0.4.2 0.3.2 0.2.3 Reference documentation and code samples for the Google Cloud Vm Migration V1 Client class PersistentDiskDefaults.

Details for creation of a Persistent Disk.

Generated from protobuf message `google.cloud.vmmigration.v1.PersistentDiskDefaults`

## Namespace

Google \\ Cloud \\ VMMigration \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ source_disk_number` | `int` Required. The ordinal number of the source VM disk. |
| `↳ disk_name` | `string` Optional. The name of the Persistent Disk to create. |
| `↳ disk_type` | `int` The disk type to use. |
| `↳ additional_labels` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` A map of labels to associate with the Persistent Disk. |
| `↳ encryption` | `https://docs.cloud.google.com/php/docs/reference/cloud-vm-migration/latest/V1.Encryption` Optional. The encryption to apply to the disk. |
| `↳ vm_attachment_details` | `https://docs.cloud.google.com/php/docs/reference/cloud-vm-migration/latest/V1.VmAttachmentDetails` Optional. Details for attachment of the disk to a VM. Used when the disk is set to be attached to a target VM. |

### getSourceDiskNumber

Required. The ordinal number of the source VM disk.

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

### setSourceDiskNumber

Required. The ordinal number of the source VM disk.

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

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

### getDiskName

Optional. The name of the Persistent Disk to create.

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

### setDiskName

Optional. The name of the Persistent Disk to create.

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

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

### getDiskType

The disk type to use.

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

### setDiskType

The disk type to use.

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

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

### getAdditionalLabels

A map of labels to associate with the Persistent Disk.

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

### setAdditionalLabels

A map of labels to associate with the Persistent Disk.

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

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

### getEncryption

Optional. The encryption to apply to the disk.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-vm-migration/latest/V1.Encryption|null` |   |

### hasEncryption

### clearEncryption

### setEncryption

Optional. The encryption to apply to the disk.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-vm-migration/latest/V1.Encryption` |

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

### getVmAttachmentDetails

Optional. Details for attachment of the disk to a VM.

Used when the disk is set to be attached to a target VM.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-vm-migration/latest/V1.VmAttachmentDetails|null` |   |

### hasVmAttachmentDetails

### clearVmAttachmentDetails

### setVmAttachmentDetails

Optional. Details for attachment of the disk to a VM.

Used when the disk is set to be attached to a target VM.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-vm-migration/latest/V1.VmAttachmentDetails` |

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