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

Node Affinity: the configuration of desired nodes onto which this Instance
could be scheduled. Based on
<https://cloud.google.com/compute/docs/reference/rest/v1/instances/setScheduling>

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

## Namespace

Google \\ Cloud \\ VMMigration \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ key` | `string` The label key of Node resource to reference. |
| `↳ operator` | `int` The operator to use for the node resources specified in the `values` parameter. |
| `↳ values` | `string[]` Corresponds to the label values of Node resource. |

### getKey

The label key of Node resource to reference.

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

### setKey

The label key of Node resource to reference.

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

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

### getOperator

The operator to use for the node resources specified in the `values`
parameter.

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

### setOperator

The operator to use for the node resources specified in the `values`
parameter.

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

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

### getValues

Corresponds to the label values of Node resource.

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

### setValues

Corresponds to the label values of Node resource.

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

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