4.3.0 (latest) 4.2.0 4.1.3 4.0.0 3.14.0 3.13.4 3.12.0 3.11.0 3.10.1 3.9.0 3.8.1 3.7.1 3.6.1 3.5.1 3.4.0 3.3.0 3.2.2 2.12.0 2.11.0 2.10.0 2.9.1 2.8.2 2.7.0 2.6.1 2.5.0 2.3.0 2.2.3 2.1.0 2.0.0 Reference documentation and code samples for the Google Cloud Dataproc V1 Client class ReservationAffinity.

Reservation Affinity for consuming Zonal reservation.

Generated from protobuf message `google.cloud.dataproc.v1.ReservationAffinity`

## Namespace

Google \\ Cloud \\ Dataproc \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ consume_reservation_type` | `int` Optional. Type of reservation to consume |
| `↳ key` | `string` Optional. Corresponds to the label key of reservation resource. |
| `↳ values` | `string[]` Optional. Corresponds to the label values of reservation resource. |

### getConsumeReservationType

Optional. Type of reservation to consume

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

### setConsumeReservationType

Optional. Type of reservation to consume

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

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

### getKey

Optional. Corresponds to the label key of reservation resource.

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

### setKey

Optional. Corresponds to the label key of reservation resource.

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

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

### getValues

Optional. Corresponds to the label values of reservation resource.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\RepeatedField<string>` |   |

### setValues

Optional. Corresponds to the label values of reservation resource.

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

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