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

The user preferences relating to Compute Engine target platform.

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

## Namespace

Google \\ Cloud \\ MigrationCenter \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ machine_preferences` | `https://docs.cloud.google.com/php/docs/reference/cloud-migrationcenter/latest/V1.MachinePreferences` Preferences concerning the machine types to consider on Compute Engine. |
| `↳ license_type` | `int` License type to consider when calculating costs for virtual machine insights and recommendations. If unspecified, costs are calculated based on the default licensing plan. |

### getMachinePreferences

Preferences concerning the machine types to consider on Compute Engine.

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

### hasMachinePreferences

### clearMachinePreferences

### setMachinePreferences

Preferences concerning the machine types to consider on Compute Engine.

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

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

### getLicenseType

License type to consider when calculating costs for virtual machine
insights and recommendations. If unspecified, costs are calculated
based on the default licensing plan.

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

### setLicenseType

License type to consider when calculating costs for virtual machine
insights and recommendations. If unspecified, costs are calculated
based on the default licensing plan.

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

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