# Google Cloud Vm Migration V1 Client - Class BootDiskDefaults (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 BootDiskDefaults.

BootDiskDefaults hold information about the boot disk of a VM.

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

## Namespace

Google \\ Cloud \\ VMMigration \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ image` | `https://docs.cloud.google.com/php/docs/reference/cloud-vm-migration/latest/V1.BootDiskDefaults.DiskImageDefaults` The image to use when creating the disk. |
| `↳ disk_name` | `string` Optional. The name of the disk. |
| `↳ disk_type` | `int` Optional. The type of disk provisioning to use for the VM. |
| `↳ device_name` | `string` Optional. Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-\* tree of a Linux operating system running within the instance. If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disk-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks. |
| `↳ encryption` | `https://docs.cloud.google.com/php/docs/reference/cloud-vm-migration/latest/V1.Encryption` Optional. The encryption to apply to the boot disk. |

### getImage

The image to use when creating the disk.

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

### hasImage

### setImage

The image to use when creating the disk.

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

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

### getDiskName

Optional. The name of the disk.

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

### setDiskName

Optional. The name of the disk.

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

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

### getDiskType

Optional. The type of disk provisioning to use for the VM.

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

### setDiskType

Optional. The type of disk provisioning to use for the VM.

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

### getDeviceName

Optional. Specifies a unique device name of your choice that is reflected
into the /dev/disk/by-id/google-\* tree of a Linux operating system running
within the instance. If not specified, the server chooses a default device
name to apply to this disk, in the form persistent-disk-x, where x is a
number assigned by Google Compute Engine. This field is only applicable for
persistent disks.

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

### setDeviceName

Optional. Specifies a unique device name of your choice that is reflected
into the /dev/disk/by-id/google-\* tree of a Linux operating system running
within the instance. If not specified, the server chooses a default device
name to apply to this disk, in the form persistent-disk-x, where x is a
number assigned by Google Compute Engine. This field is only applicable for
persistent disks.

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

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

### getEncryption

Optional. The encryption to apply to the boot 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 boot disk.

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

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

### getSource

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