# Google Cloud Filestore V1 Client - Class ReplicaConfig (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 ReplicaConfig.

Replica configuration for the instance.

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

## Namespace

Google \\ Cloud \\ Filestore \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ state` | `int` Output only. The replica state. |
| `↳ state_reasons` | `int[]` Output only. Additional information about the replication state, if available. |
| `↳ peer_instance` | `string` Optional. The peer instance. |
| `↳ last_active_sync_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The timestamp of the latest replication snapshot taken on the active instance and is already replicated safely. |

### getState

Output only. The replica state.

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

### setState

Output only. The replica state.

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

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

### getStateReasons

Output only. Additional information about the replication state, if
available.

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

### setStateReasons

Output only. Additional information about the replication state, if
available.

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

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

### getPeerInstance

Optional. The peer instance.

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

### setPeerInstance

Optional. The peer instance.

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

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

### getLastActiveSyncTime

Output only. The timestamp of the latest replication snapshot taken on the
active instance and is already replicated safely.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasLastActiveSyncTime

### clearLastActiveSyncTime

### setLastActiveSyncTime

Output only. The timestamp of the latest replication snapshot taken on the
active instance and is already replicated safely.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

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