# Google Cloud Filestore V1 Client - Class Replication (2.2.3)

2.2.3 (latest) 2.2.2 2.1.1 2.0.4 1.5.7 1.4.0 1.3.2 1.2.1 1.1.2 1.0.3 Reference documentation and code samples for the Google Cloud Filestore V1 Client class Replication.

Replication specifications.

Generated from protobuf message `google.cloud.filestore.v1.Replication`

## Namespace

Google \\ Cloud \\ Filestore \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ role` | `int` Optional. The replication role. |
| `↳ replicas` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-filestore/latest/V1.ReplicaConfig>` Optional. Replication configuration for the replica instance associated with this instance. Only a single replica is supported. |

### getRole

Optional. The replication role.

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

### setRole

Optional. The replication role.

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

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

### getReplicas

Optional. Replication configuration for the replica instance associated
with this instance. Only a single replica is supported.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-filestore/latest/V1.ReplicaConfig>` |   |

### setReplicas

Optional. Replication configuration for the replica instance associated
with this instance. Only a single replica is supported.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-filestore/latest/V1.ReplicaConfig>` |

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