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

ComputeEngineTargetDefaults is a collection of details for creating a VM in a
target Compute Engine project.

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

## Namespace

Google \\ Cloud \\ VMMigration \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ vm_name` | `string` The name of the VM to create. |
| `↳ target_project` | `string` The full path of the resource of type TargetProject which represents the Compute Engine project in which to create this VM. |
| `↳ zone` | `string` The zone in which to create the VM. |
| `↳ machine_type_series` | `string` The machine type series to create the VM with. |
| `↳ machine_type` | `string` The machine type to create the VM with. |
| `↳ network_tags` | `string[]` A list of network tags to associate with the VM. |
| `↳ network_interfaces` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-vm-migration/latest/V1.NetworkInterface>` List of NICs connected to this VM. |
| `↳ service_account` | `string` Optional. The service account to associate the VM with. |
| `↳ disk_type` | `int` The disk type to use in the VM. |
| `↳ labels` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` A map of labels to associate with the VM. |
| `↳ license_type` | `int` The license type to use in OS adaptation. |
| `↳ applied_license` | `https://docs.cloud.google.com/php/docs/reference/cloud-vm-migration/latest/V1.AppliedLicense` Output only. The OS license returned from the adaptation module report. |
| `↳ compute_scheduling` | `https://docs.cloud.google.com/php/docs/reference/cloud-vm-migration/latest/V1.ComputeScheduling` Compute instance scheduling information (if empty default is used). |
| `↳ secure_boot` | `bool` Defines whether the instance has Secure Boot enabled. This can be set to true only if the VM boot option is EFI. |
| `↳ enable_vtpm` | `bool` Optional. Defines whether the instance has vTPM enabled. This can be set to true only if the VM boot option is EFI. |
| `↳ enable_integrity_monitoring` | `bool` Optional. Defines whether the instance has integrity monitoring enabled. This can be set to true only if the VM boot option is EFI, and vTPM is enabled. |
| `↳ boot_option` | `int` Output only. The VM Boot Option, as set in the source VM. |
| `↳ metadata` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` The metadata key/value pairs to assign to the VM. |
| `↳ additional_licenses` | `string[]` Additional licenses to assign to the VM. |
| `↳ hostname` | `string` The hostname to assign to the VM. |
| `↳ encryption` | `https://docs.cloud.google.com/php/docs/reference/cloud-vm-migration/latest/V1.Encryption` Optional. Immutable. The encryption to apply to the VM disks. |
| `↳ boot_conversion` | `int` Optional. By default the virtual machine will keep its existing boot option. Setting this property will trigger an internal process which will convert the virtual machine from using the existing boot option to another. |
| `↳ adaptation_modifiers` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-vm-migration/latest/V1.AdaptationModifier>` Optional. AdaptationModifiers are the set of modifiers used during OS adaptation. |
| `↳ disk_replica_zones` | `string[]` Optional. Additional replica zones of the target regional disks. If this list is not empty a regional disk will be created. The first supported zone would be the one stated in the [zone](https://docs.cloud.google.com/php/docs/reference/cloud-vm-migration/latest/V1.ComputeEngineTargetDefaults#_Google_Cloud_VMMigration_V1_ComputeEngineTargetDefaults__getZone__) field. The rest are taken from this list. Please refer to the [regional disk creation API](https://cloud.google.com/compute/docs/regions-zones/global-regional-zonal-resources) for further details about regional vs zonal disks. If not specified, a zonal disk will be created in the same zone the VM is created. |
| `↳ storage_pool` | `string` Optional. If specified this will be the storage pool in which the disk is created. This is the full path of the storage pool resource, for example: "projects/my-project/zones/us-central1-a/storagePools/my-storage-pool". The storage pool must be in the same project and zone as the target disks. The storage pool's type must match the disk type. |

### getVmName

The name of the VM to create.

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

### setVmName

The name of the VM to create.

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

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

### getTargetProject

The full path of the resource of type TargetProject which represents the
Compute Engine project in which to create this VM.

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

### setTargetProject

The full path of the resource of type TargetProject which represents the
Compute Engine project in which to create this VM.

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

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

### getZone

The zone in which to create the VM.

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

### setZone

The zone in which to create the VM.

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

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

### getMachineTypeSeries

The machine type series to create the VM with.

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

### setMachineTypeSeries

The machine type series to create the VM with.

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

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

### getMachineType

The machine type to create the VM with.

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

### setMachineType

The machine type to create the VM with.

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

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

### getNetworkTags

A list of network tags to associate with the VM.

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

### setNetworkTags

A list of network tags to associate with the VM.

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

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

### getNetworkInterfaces

List of NICs connected to this VM.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-vm-migration/latest/V1.NetworkInterface>` |   |

### setNetworkInterfaces

List of NICs connected to this VM.

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

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

### getServiceAccount

Optional. The service account to associate the VM with.

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

### setServiceAccount

Optional. The service account to associate the VM with.

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

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

### getDiskType

The disk type to use in 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

The disk type to use in 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` |   |

### getLabels

A map of labels to associate with the VM.

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

### setLabels

A map of labels to associate with the VM.

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

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

### getLicenseType

The license type to use in OS adaptation.

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

### setLicenseType

The license type to use in OS adaptation.

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

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

### getAppliedLicense

Output only. The OS license returned from the adaptation module report.

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

### hasAppliedLicense

### clearAppliedLicense

### setAppliedLicense

Output only. The OS license returned from the adaptation module report.

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

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

### getComputeScheduling

Compute instance scheduling information (if empty default is used).

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

### hasComputeScheduling

### clearComputeScheduling

### setComputeScheduling

Compute instance scheduling information (if empty default is used).

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

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

### getSecureBoot

Defines whether the instance has Secure Boot enabled.

This can be set to true only if the VM boot option is EFI.

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

### setSecureBoot

Defines whether the instance has Secure Boot enabled.

This can be set to true only if the VM boot option is EFI.

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

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

### getEnableVtpm

Optional. Defines whether the instance has vTPM enabled.

This can be set to true only if the VM boot option is EFI.

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

### setEnableVtpm

Optional. Defines whether the instance has vTPM enabled.

This can be set to true only if the VM boot option is EFI.

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

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

### getEnableIntegrityMonitoring

Optional. Defines whether the instance has integrity monitoring enabled.

This can be set to true only if the VM boot option is EFI, and vTPM is
enabled.

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

### setEnableIntegrityMonitoring

Optional. Defines whether the instance has integrity monitoring enabled.

This can be set to true only if the VM boot option is EFI, and vTPM is
enabled.

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

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

### getBootOption

Output only. The VM Boot Option, as set in the source VM.

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

### setBootOption

Output only. The VM Boot Option, as set in the source VM.

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

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

### getMetadata

The metadata key/value pairs to assign to the VM.

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

### setMetadata

The metadata key/value pairs to assign to the VM.

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

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

### getAdditionalLicenses

Additional licenses to assign to the VM.

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

### setAdditionalLicenses

Additional licenses to assign to the VM.

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

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

### getHostname

The hostname to assign to the VM.

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

### setHostname

The hostname to assign to the VM.

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

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

### getEncryption

Optional. Immutable. The encryption to apply to the VM disks.

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

### hasEncryption

### clearEncryption

### setEncryption

Optional. Immutable. The encryption to apply to the VM disks.

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

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

### getBootConversion

Optional. By default the virtual machine will keep its existing boot
option. Setting this property will trigger an internal process which will
convert the virtual machine from using the existing boot option to another.

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

### setBootConversion

Optional. By default the virtual machine will keep its existing boot
option. Setting this property will trigger an internal process which will
convert the virtual machine from using the existing boot option to another.

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

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

### getAdaptationModifiers

Optional. AdaptationModifiers are the set of modifiers used during OS
adaptation.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-vm-migration/latest/V1.AdaptationModifier>` |   |

### setAdaptationModifiers

Optional. AdaptationModifiers are the set of modifiers used during OS
adaptation.

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

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

### getDiskReplicaZones

Optional. Additional replica zones of the target regional disks.

If this list is not empty a regional disk will be created. The first
supported zone would be the one stated in the
[zone](https://docs.cloud.google.com/php/docs/reference/cloud-vm-migration/latest/V1.ComputeEngineTargetDefaults#_Google_Cloud_VMMigration_V1_ComputeEngineTargetDefaults__getZone__) field.
The rest are taken from this list. Please refer to the [regional disk
creation
API](https://cloud.google.com/compute/docs/regions-zones/global-regional-zonal-resources)
for further details about regional vs zonal disks. If not specified, a
zonal disk will be created in the same zone the VM is created.

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

### setDiskReplicaZones

Optional. Additional replica zones of the target regional disks.

If this list is not empty a regional disk will be created. The first
supported zone would be the one stated in the
[zone](https://docs.cloud.google.com/php/docs/reference/cloud-vm-migration/latest/V1.ComputeEngineTargetDefaults#_Google_Cloud_VMMigration_V1_ComputeEngineTargetDefaults__getZone__) field.
The rest are taken from this list. Please refer to the [regional disk
creation
API](https://cloud.google.com/compute/docs/regions-zones/global-regional-zonal-resources)
for further details about regional vs zonal disks. If not specified, a
zonal disk will be created in the same zone the VM is created.

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

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

### getStoragePool

Optional. If specified this will be the storage pool in which the disk is
created. This is the full path of the storage pool resource, for example:
"projects/my-project/zones/us-central1-a/storagePools/my-storage-pool".

The storage pool must be in the same project and zone as the target disks.
The storage pool's type must match the disk type.

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

### setStoragePool

Optional. If specified this will be the storage pool in which the disk is
created. This is the full path of the storage pool resource, for example:
"projects/my-project/zones/us-central1-a/storagePools/my-storage-pool".

The storage pool must be in the same project and zone as the target disks.
The storage pool's type must match the disk type.

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

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