0.16.0 (latest) 0.15.0 0.14.0 0.13.3 0.12.0 0.10.0 0.9.0 0.8.0 0.7.0 0.6.2 0.5.1 0.4.2 0.3.0 0.2.0 0.1.1

> [!WARNING]
> **Beta**
>
>
> This library is covered by the [Pre-GA Offerings Terms](https://docs.cloud.google.com/terms/service-terms#1)
> of the Terms of Service. Pre-GA libraries might have limited support,
> and changes to pre-GA libraries might not be compatible with other pre-GA versions.
> For more information, see the
> [launch stage descriptions](https://docs.cloud.google.com/products#product-launch-stages).

Reference documentation and code samples for the Google Cloud Memorystore V1beta Client class ZoneDistributionConfig.

Zone distribution configuration for allocation of instance resources.

Generated from protobuf message `google.cloud.memorystore.v1beta.ZoneDistributionConfig`

## Namespace

Google \\ Cloud \\ Memorystore \\ V1beta

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ zone` | `string` Optional. Defines zone where all resources will be allocated with SINGLE_ZONE mode. Ignored for MULTI_ZONE mode. |
| `↳ zones` | `string[]` Optional. Specify the zones of a multi-zone instance where Memorystore instance allocates resources. This flag isn't applicable for single-zone instances. |
| `↳ active_zones` | `string[]` Output only. The exact list of zones where the instance currently has active VMs. |
| `↳ mode` | `int` Optional. Current zone distribution mode. Defaults to MULTI_ZONE. |

### getZone

Optional. Defines zone where all resources will be allocated with
SINGLE_ZONE mode. Ignored for MULTI_ZONE mode.

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

### setZone

Optional. Defines zone where all resources will be allocated with
SINGLE_ZONE mode. Ignored for MULTI_ZONE mode.

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

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

### getZones

Optional. Specify the zones of a multi-zone instance where Memorystore
instance allocates resources. This flag isn't applicable for single-zone
instances.

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

### setZones

Optional. Specify the zones of a multi-zone instance where Memorystore
instance allocates resources. This flag isn't applicable for single-zone
instances.

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

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

### getActiveZones

Output only. The exact list of zones where the instance currently has
active VMs.

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

### setActiveZones

Output only. The exact list of zones where the instance currently has
active VMs.

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

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

### getMode

Optional. Current zone distribution mode. Defaults to MULTI_ZONE.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [ZoneDistributionMode](https://docs.cloud.google.com/php/docs/reference/cloud-memorystore/latest/V1beta.ZoneDistributionConfig.ZoneDistributionMode). |

### setMode

Optional. Current zone distribution mode. Defaults to MULTI_ZONE.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [ZoneDistributionMode](https://docs.cloud.google.com/php/docs/reference/cloud-memorystore/latest/V1beta.ZoneDistributionConfig.ZoneDistributionMode). |

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