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

MigratingVm describes the VM that will be migrated from a Source environment
and its replication state.

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

## Namespace

Google \\ Cloud \\ VMMigration \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ compute_engine_target_defaults` | `https://docs.cloud.google.com/php/docs/reference/cloud-vm-migration/latest/V1.ComputeEngineTargetDefaults` Details of the target VM in Compute Engine. |
| `↳ compute_engine_disks_target_defaults` | `https://docs.cloud.google.com/php/docs/reference/cloud-vm-migration/latest/V1.ComputeEngineDisksTargetDefaults` Details of the target Persistent Disks in Compute Engine. |
| `↳ vmware_source_vm_details` | `https://docs.cloud.google.com/php/docs/reference/cloud-vm-migration/latest/V1.VmwareSourceVmDetails` Output only. Details of the VM from a Vmware source. |
| `↳ aws_source_vm_details` | `https://docs.cloud.google.com/php/docs/reference/cloud-vm-migration/latest/V1.AwsSourceVmDetails` Output only. Details of the VM from an AWS source. |
| `↳ azure_source_vm_details` | `https://docs.cloud.google.com/php/docs/reference/cloud-vm-migration/latest/V1.AzureSourceVmDetails` Output only. Details of the VM from an Azure source. |
| `↳ name` | `string` Output only. The identifier of the MigratingVm. |
| `↳ source_vm_id` | `string` The unique ID of the VM in the source. The VM's name in vSphere can be changed, so this is not the VM's name but rather its moRef id. This id is of the form vm- |
| `↳ display_name` | `string` The display name attached to the MigratingVm by the user. |
| `↳ description` | `string` The description attached to the migrating VM by the user. |
| `↳ policy` | `https://docs.cloud.google.com/php/docs/reference/cloud-vm-migration/latest/V1.SchedulePolicy` The replication schedule policy. |
| `↳ create_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The time the migrating VM was created (this refers to this resource and not to the time it was installed in the source). |
| `↳ update_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The last time the migrating VM resource was updated. |
| `↳ last_sync` | `https://docs.cloud.google.com/php/docs/reference/cloud-vm-migration/latest/V1.ReplicationSync` Output only. The most updated snapshot created time in the source that finished replication. |
| `↳ state` | `int` Output only. State of the MigratingVm. |
| `↳ state_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The last time the migrating VM state was updated. |
| `↳ current_sync_info` | `https://docs.cloud.google.com/php/docs/reference/cloud-vm-migration/latest/V1.ReplicationCycle` Output only. Details of the current running replication cycle. |
| `↳ last_replication_cycle` | `https://docs.cloud.google.com/php/docs/reference/cloud-vm-migration/latest/V1.ReplicationCycle` Output only. Details of the last replication cycle. This will be updated whenever a replication cycle is finished and is not to be confused with last_sync which is only updated on successful replication cycles. |
| `↳ group` | `string` Output only. The group this migrating vm is included in, if any. The group is represented by the full path of the appropriate [Group](https://docs.cloud.google.com/php/docs/reference/cloud-vm-migration/latest/V1.Group) resource. |
| `↳ labels` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` The labels of the migrating VM. |
| `↳ recent_clone_jobs` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-vm-migration/latest/V1.CloneJob>` Output only. The recent [clone jobs](https://docs.cloud.google.com/php/docs/reference/cloud-vm-migration/latest/V1.CloneJob) performed on the migrating VM. This field holds the vm's last completed clone job and the vm's running clone job, if one exists. Note: To have this field populated you need to explicitly request it via the "view" parameter of the Get/List request. |
| `↳ error` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Status.html` Output only. Provides details on the state of the Migrating VM in case of an error in replication. |
| `↳ recent_cutover_jobs` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-vm-migration/latest/V1.CutoverJob>` Output only. The recent cutover jobs performed on the migrating VM. This field holds the vm's last completed cutover job and the vm's running cutover job, if one exists. Note: To have this field populated you need to explicitly request it via the "view" parameter of the Get/List request. |
| `↳ cutover_forecast` | `https://docs.cloud.google.com/php/docs/reference/cloud-vm-migration/latest/V1.CutoverForecast` Output only. Provides details of future CutoverJobs of a MigratingVm. Set to empty when cutover forecast is unavailable. |
| `↳ expiration` | `https://docs.cloud.google.com/php/docs/reference/cloud-vm-migration/latest/V1.MigratingVm.Expiration` Output only. Provides details about the expiration state of the migrating VM. |

### getComputeEngineTargetDefaults

Details of the target VM in Compute Engine.

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

### hasComputeEngineTargetDefaults

### setComputeEngineTargetDefaults

Details of the target VM in Compute Engine.

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

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

### getComputeEngineDisksTargetDefaults

Details of the target Persistent Disks in Compute Engine.

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

### hasComputeEngineDisksTargetDefaults

### setComputeEngineDisksTargetDefaults

Details of the target Persistent Disks in Compute Engine.

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

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

### getVmwareSourceVmDetails

Output only. Details of the VM from a Vmware source.

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

### hasVmwareSourceVmDetails

### setVmwareSourceVmDetails

Output only. Details of the VM from a Vmware source.

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

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

### getAwsSourceVmDetails

Output only. Details of the VM from an AWS source.

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

### hasAwsSourceVmDetails

### setAwsSourceVmDetails

Output only. Details of the VM from an AWS source.

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

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

### getAzureSourceVmDetails

Output only. Details of the VM from an Azure source.

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

### hasAzureSourceVmDetails

### setAzureSourceVmDetails

Output only. Details of the VM from an Azure source.

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

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

### getName

Output only. The identifier of the MigratingVm.

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

### setName

Output only. The identifier of the MigratingVm.

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

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

### getSourceVmId

The unique ID of the VM in the source.

The VM's name in vSphere can be changed, so this is not the VM's name but
rather its moRef id. This id is of the form vm-


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

### setSourceVmId

The unique ID of the VM in the source.

The VM's name in vSphere can be changed, so this is not the VM's name but
rather its moRef id. This id is of the form vm-


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

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

### getDisplayName

The display name attached to the MigratingVm by the user.

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

### setDisplayName

The display name attached to the MigratingVm by the user.

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

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

### getDescription

The description attached to the migrating VM by the user.

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

### setDescription

The description attached to the migrating VM by the user.

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

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

### getPolicy

The replication schedule policy.

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

### hasPolicy

### clearPolicy

### setPolicy

The replication schedule policy.

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

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

### getCreateTime

Output only. The time the migrating VM was created (this refers to this
resource and not to the time it was installed in the source).

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

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. The time the migrating VM was created (this refers to this
resource and not to the time it was installed in the source).

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

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

### getUpdateTime

Output only. The last time the migrating VM resource was updated.

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

### hasUpdateTime

### clearUpdateTime

### setUpdateTime

Output only. The last time the migrating VM resource was updated.

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

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

### getLastSync

Output only. The most updated snapshot created time in the source that
finished replication.

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

### hasLastSync

### clearLastSync

### setLastSync

Output only. The most updated snapshot created time in the source that
finished replication.

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

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

### getState

Output only. State of the MigratingVm.

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

### setState

Output only. State of the MigratingVm.

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

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

### getStateTime

Output only. The last time the migrating VM state was updated.

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

### hasStateTime

### clearStateTime

### setStateTime

Output only. The last time the migrating VM state was updated.

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

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

### getCurrentSyncInfo

Output only. Details of the current running replication cycle.

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

### hasCurrentSyncInfo

### clearCurrentSyncInfo

### setCurrentSyncInfo

Output only. Details of the current running replication cycle.

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

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

### getLastReplicationCycle

Output only. Details of the last replication cycle. This will be updated
whenever a replication cycle is finished and is not to be confused with
last_sync which is only updated on successful replication cycles.

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

### hasLastReplicationCycle

### clearLastReplicationCycle

### setLastReplicationCycle

Output only. Details of the last replication cycle. This will be updated
whenever a replication cycle is finished and is not to be confused with
last_sync which is only updated on successful replication cycles.

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

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

### getGroup

Output only. The group this migrating vm is included in, if any. The group
is represented by the full path of the appropriate
[Group](https://docs.cloud.google.com/php/docs/reference/cloud-vm-migration/latest/V1.Group) resource.

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

### setGroup

Output only. The group this migrating vm is included in, if any. The group
is represented by the full path of the appropriate
[Group](https://docs.cloud.google.com/php/docs/reference/cloud-vm-migration/latest/V1.Group) resource.

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

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

### getLabels

The labels of the migrating VM.

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

### setLabels

The labels of the migrating VM.

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

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

### getRecentCloneJobs

Output only. The recent [clone jobs](https://docs.cloud.google.com/php/docs/reference/cloud-vm-migration/latest/V1.CloneJob)
performed on the migrating VM. This field holds the vm's last completed
clone job and the vm's running clone job, if one exists.

Note: To have this field populated you need to explicitly request it via
the "view" parameter of the Get/List request.

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

### setRecentCloneJobs

Output only. The recent [clone jobs](https://docs.cloud.google.com/php/docs/reference/cloud-vm-migration/latest/V1.CloneJob)
performed on the migrating VM. This field holds the vm's last completed
clone job and the vm's running clone job, if one exists.

Note: To have this field populated you need to explicitly request it via
the "view" parameter of the Get/List request.

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

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

### getError

Output only. Provides details on the state of the Migrating VM in case of
an error in replication.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Status.html|null` |   |

### hasError

### clearError

### setError

Output only. Provides details on the state of the Migrating VM in case of
an error in replication.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Status.html` |

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

### getRecentCutoverJobs

Output only. The recent cutover jobs performed on the migrating VM.

This field holds the vm's last completed cutover job and the vm's
running cutover job, if one exists.
Note: To have this field populated you need to explicitly request it via
the "view" parameter of the Get/List request.

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

### setRecentCutoverJobs

Output only. The recent cutover jobs performed on the migrating VM.

This field holds the vm's last completed cutover job and the vm's
running cutover job, if one exists.
Note: To have this field populated you need to explicitly request it via
the "view" parameter of the Get/List request.

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

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

### getCutoverForecast

Output only. Provides details of future CutoverJobs of a MigratingVm.

Set to empty when cutover forecast is unavailable.

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

### hasCutoverForecast

### clearCutoverForecast

### setCutoverForecast

Output only. Provides details of future CutoverJobs of a MigratingVm.

Set to empty when cutover forecast is unavailable.

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

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

### getExpiration

Output only. Provides details about the expiration state of the migrating
VM.

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

### hasExpiration

### clearExpiration

### setExpiration

Output only. Provides details about the expiration state of the migrating
VM.

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

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

### getTargetVmDefaults

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

### getSourceVmDetails

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