0.13.0 (latest) 0.12.0 0.11.0 0.10.3 0.9.0 0.8.0 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 CrossClusterReplicationConfig.

Cross cluster replication config.

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

## Namespace

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

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ cluster_role` | `int` The role of the cluster in cross cluster replication. |
| `↳ primary_cluster` | `https://docs.cloud.google.com/php/docs/reference/cloud-redis-cluster/latest/V1.CrossClusterReplicationConfig.RemoteCluster` Details of the primary cluster that is used as the replication source for this secondary cluster. This field is only set for a secondary cluster. |
| `↳ secondary_clusters` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-redis-cluster/latest/V1.CrossClusterReplicationConfig.RemoteCluster>` List of secondary clusters that are replicating from this primary cluster. This field is only set for a primary cluster. |
| `↳ update_time` | `Google\Protobuf\Timestamp` Output only. The last time cross cluster replication config was updated. |
| `↳ membership` | `https://docs.cloud.google.com/php/docs/reference/cloud-redis-cluster/latest/V1.CrossClusterReplicationConfig.Membership` Output only. An output only view of all the member clusters participating in the cross cluster replication. This view will be provided by every member cluster irrespective of its cluster role(primary or secondary). A primary cluster can provide information about all the secondary clusters replicating from it. However, a secondary cluster only knows about the primary cluster from which it is replicating. However, for scenarios, where the primary cluster is unavailable(e.g. regional outage), a GetCluster request can be sent to any other member cluster and this field will list all the member clusters participating in cross cluster replication. |

### getClusterRole

The role of the cluster in cross cluster replication.

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

### setClusterRole

The role of the cluster in cross cluster replication.

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

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

### getPrimaryCluster

Details of the primary cluster that is used as the replication source for
this secondary cluster.

This field is only set for a secondary cluster.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-redis-cluster/latest/V1.CrossClusterReplicationConfig.RemoteCluster|null` |   |

### hasPrimaryCluster

### clearPrimaryCluster

### setPrimaryCluster

Details of the primary cluster that is used as the replication source for
this secondary cluster.

This field is only set for a secondary cluster.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-redis-cluster/latest/V1.CrossClusterReplicationConfig.RemoteCluster` |

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

### getSecondaryClusters

List of secondary clusters that are replicating from this primary cluster.

This field is only set for a primary cluster.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-redis-cluster/latest/V1.CrossClusterReplicationConfig.RemoteCluster>` |   |

### setSecondaryClusters

List of secondary clusters that are replicating from this primary cluster.

This field is only set for a primary cluster.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-redis-cluster/latest/V1.CrossClusterReplicationConfig.RemoteCluster>` |

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

### getUpdateTime

Output only. The last time cross cluster replication config was updated.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\Timestamp|null` |   |

### hasUpdateTime

### clearUpdateTime

### setUpdateTime

Output only. The last time cross cluster replication config was updated.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `Google\Protobuf\Timestamp` |

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

### getMembership

Output only. An output only view of all the member clusters participating
in the cross cluster replication. This view will be provided by every
member cluster irrespective of its cluster role(primary or secondary).

A primary cluster can provide information about all the secondary clusters
replicating from it. However, a secondary cluster only knows about the
primary cluster from which it is replicating. However, for scenarios, where
the primary cluster is unavailable(e.g. regional outage), a GetCluster
request can be sent to any other member cluster and this field will list
all the member clusters participating in cross cluster replication.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-redis-cluster/latest/V1.CrossClusterReplicationConfig.Membership|null` |   |

### hasMembership

### clearMembership

### setMembership

Output only. An output only view of all the member clusters participating
in the cross cluster replication. This view will be provided by every
member cluster irrespective of its cluster role(primary or secondary).

A primary cluster can provide information about all the secondary clusters
replicating from it. However, a secondary cluster only knows about the
primary cluster from which it is replicating. However, for scenarios, where
the primary cluster is unavailable(e.g. regional outage), a GetCluster
request can be sent to any other member cluster and this field will list
all the member clusters participating in cross cluster replication.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-redis-cluster/latest/V1.CrossClusterReplicationConfig.Membership` |

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