# Google Cloud Migration Center V1 Client - Class VirtualMachinePreferences (1.2.3)

1.2.3 (latest) 1.2.2 1.1.2 1.0.3 0.4.5 0.3.1 0.2.0 0.1.0 Reference documentation and code samples for the Google Cloud Migration Center V1 Client class VirtualMachinePreferences.

VirtualMachinePreferences enables you to create sets of assumptions, for
example, a geographical location and pricing track, for your migrated virtual
machines. The set of preferences influence recommendations for migrating
virtual machine assets.

Generated from protobuf message `google.cloud.migrationcenter.v1.VirtualMachinePreferences`

## Namespace

Google \\ Cloud \\ MigrationCenter \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ target_product` | `int` Target product for assets using this preference set. Specify either target product or business goal, but not both. |
| `↳ region_preferences` | `https://docs.cloud.google.com/php/docs/reference/cloud-migrationcenter/latest/V1.RegionPreferences` Region preferences for assets using this preference set. If you are unsure which value to set, the migration service API region is often a good value to start with. |
| `↳ commitment_plan` | `int` Commitment plan to consider when calculating costs for virtual machine insights and recommendations. If you are unsure which value to set, a 3 year commitment plan is often a good value to start with. |
| `↳ sizing_optimization_strategy` | `int` Sizing optimization strategy specifies the preferred strategy used when extrapolating usage data to calculate insights and recommendations for a virtual machine. If you are unsure which value to set, a moderate sizing optimization strategy is often a good value to start with. |
| `↳ compute_engine_preferences` | `https://docs.cloud.google.com/php/docs/reference/cloud-migrationcenter/latest/V1.ComputeEnginePreferences` Compute Engine preferences concern insights and recommendations for Compute Engine target. |
| `↳ vmware_engine_preferences` | `https://docs.cloud.google.com/php/docs/reference/cloud-migrationcenter/latest/V1.VmwareEnginePreferences` Preferences concerning insights and recommendations for Google Cloud VMware Engine. |
| `↳ sole_tenancy_preferences` | `https://docs.cloud.google.com/php/docs/reference/cloud-migrationcenter/latest/V1.SoleTenancyPreferences` Preferences concerning Sole Tenant nodes and virtual machines. |

### getTargetProduct

Target product for assets using this preference set.

Specify either target product or business goal, but
not both.

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

### setTargetProduct

Target product for assets using this preference set.

Specify either target product or business goal, but
not both.

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

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

### getRegionPreferences

Region preferences for assets using this preference set.

If you are unsure which value to set, the migration service API region is
often a good value to start with.

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

### hasRegionPreferences

### clearRegionPreferences

### setRegionPreferences

Region preferences for assets using this preference set.

If you are unsure which value to set, the migration service API region is
often a good value to start with.

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

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

### getCommitmentPlan

Commitment plan to consider when calculating costs for virtual machine
insights and recommendations.

If you are unsure which value to set, a 3 year commitment plan is often a
good value to start with.

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

### setCommitmentPlan

Commitment plan to consider when calculating costs for virtual machine
insights and recommendations.

If you are unsure which value to set, a 3 year commitment plan is often a
good value to start with.

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

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

### getSizingOptimizationStrategy

Sizing optimization strategy specifies the preferred strategy used when
extrapolating usage data to calculate insights and recommendations for a
virtual machine.

If you are unsure which value to set, a moderate sizing optimization
strategy is often a good value to start with.

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

### setSizingOptimizationStrategy

Sizing optimization strategy specifies the preferred strategy used when
extrapolating usage data to calculate insights and recommendations for a
virtual machine.

If you are unsure which value to set, a moderate sizing optimization
strategy is often a good value to start with.

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

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

### getComputeEnginePreferences

Compute Engine preferences concern insights and recommendations for Compute
Engine target.

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

### hasComputeEnginePreferences

### clearComputeEnginePreferences

### setComputeEnginePreferences

Compute Engine preferences concern insights and recommendations for Compute
Engine target.

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

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

### getVmwareEnginePreferences

Preferences concerning insights and recommendations for
Google Cloud VMware Engine.

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

### hasVmwareEnginePreferences

### clearVmwareEnginePreferences

### setVmwareEnginePreferences

Preferences concerning insights and recommendations for
Google Cloud VMware Engine.

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

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

### getSoleTenancyPreferences

Preferences concerning Sole Tenant nodes and virtual machines.

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

### hasSoleTenancyPreferences

### clearSoleTenancyPreferences

### setSoleTenancyPreferences

Preferences concerning Sole Tenant nodes and virtual machines.

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

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