# Google Cloud Redis Cluster V1 Client - Class ZoneDistributionConfig (0.8.0)

0.8.0 (latest) 0.7.0 0.6.4 0.5.1 0.4.1 0.3.2 0.2.5 0.1.0 Reference documentation and code samples for the Google Cloud Redis Cluster V1 Client class ZoneDistributionConfig.

Zone distribution config for allocation of cluster resources.

Generated from protobuf message `google.cloud.redis.cluster.v1.ZoneDistributionConfig`

## Namespace

Google \\ Cloud \\ Redis \\ Cluster \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ mode` | `int` Optional. The mode of zone distribution. Defaults to MULTI_ZONE, when not specified. |
| `↳ zone` | `string` Optional. When SINGLE ZONE distribution is selected, zone field would be used to allocate all resources in that zone. This is not applicable to MULTI_ZONE, and would be ignored for MULTI_ZONE clusters. |

### getMode

Optional. The mode of zone distribution. Defaults to MULTI_ZONE, when not
specified.

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

### setMode

Optional. The mode of zone distribution. Defaults to MULTI_ZONE, when not
specified.

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

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

### getZone

Optional. When SINGLE ZONE distribution is selected, zone field would be
used to allocate all resources in that zone. This is not applicable to
MULTI_ZONE, and would be ignored for MULTI_ZONE clusters.

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

### setZone

Optional. When SINGLE ZONE distribution is selected, zone field would be
used to allocate all resources in that zone. This is not applicable to
MULTI_ZONE, and would be ignored for MULTI_ZONE clusters.

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

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