# Google Cloud Managed Kafka V1 Client - Class RebalanceConfig (0.8.0)

0.8.0 (latest) 0.7.2 0.6.1 0.5.0 0.4.1 0.3.1 0.2.3 0.1.3 Reference documentation and code samples for the Google Cloud Managed Kafka V1 Client class RebalanceConfig.

Defines rebalancing behavior of a Kafka cluster.

Generated from protobuf message `google.cloud.managedkafka.v1.RebalanceConfig`

## Namespace

Google \\ Cloud \\ ManagedKafka \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ mode` | `int` Optional. The rebalance behavior for the cluster. When not specified, defaults to `NO_REBALANCE`. |

### getMode

Optional. The rebalance behavior for the cluster.

When not specified, defaults to `NO_REBALANCE`.

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

### setMode

Optional. The rebalance behavior for the cluster.

When not specified, defaults to `NO_REBALANCE`.

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

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