# Google Cloud Backup Dr V1 Client - Class AllocationAffinity (0.13.0)

0.13.0 (latest) 0.12.1 0.11.1 0.10.0 0.9.0 0.8.1 0.7.0 0.6.2 0.5.1 0.4.2 0.3.0 0.2.0 0.1.0 Reference documentation and code samples for the Google Cloud Backup Dr V1 Client class AllocationAffinity.

Specifies the reservations that this instance can consume from.

Generated from protobuf message `google.cloud.backupdr.v1.AllocationAffinity`

## Namespace

Google \\ Cloud \\ BackupDR \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ consume_allocation_type` | `int` Optional. Specifies the type of reservation from which this instance can consume |
| `↳ key` | `string` Optional. Corresponds to the label key of a reservation resource. |
| `↳ values` | `string[]` Optional. Corresponds to the label values of a reservation resource. |

### getConsumeAllocationType

Optional. Specifies the type of reservation from which this instance can
consume

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### hasConsumeAllocationType

### clearConsumeAllocationType

### setConsumeAllocationType

Optional. Specifies the type of reservation from which this instance can
consume

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

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

### getKey

Optional. Corresponds to the label key of a reservation resource.

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

### hasKey

### clearKey

### setKey

Optional. Corresponds to the label key of a reservation resource.

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

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

### getValues

Optional. Corresponds to the label values of a reservation resource.

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

### setValues

Optional. Corresponds to the label values of a reservation resource.

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

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