# Google Cloud Sql Admin V1 Client - Class ReplicationCluster (1.9.0)

1.9.0 (latest) 1.8.0 1.7.0 1.6.0 1.5.0 1.4.0 1.3.1 1.2.6 1.1.0 1.0.0 0.19.0 0.18.0 0.17.1 0.16.1 0.12.0 0.11.0 0.10.0 0.9.0 0.8.0 0.7.0 0.6.0 0.5.0 0.4.1 0.3.1 0.2.12 Reference documentation and code samples for the Google Cloud Sql Admin V1 Client class ReplicationCluster.

A primary instance and disaster recovery (DR) replica pair.

A DR replica is a cross-region replica that you designate for failover in
the event that the primary instance experiences regional failure.
Applicable to MySQL and PostgreSQL.

Generated from protobuf message `google.cloud.sql.v1.ReplicationCluster`

## Namespace

Google \\ Cloud \\ Sql \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ psa_write_endpoint` | `string` Output only. If set, this field indicates this instance has a private service access (PSA) DNS endpoint that is pointing to the primary instance of the cluster. If this instance is the primary, then the DNS endpoint points to this instance. After a switchover or replica failover operation, this DNS endpoint points to the promoted instance. This is a read-only field, returned to the user as information. This field can exist even if a standalone instance doesn't have a DR replica yet or the DR replica is deleted. |
| `↳ failover_dr_replica_name` | `string` Optional. If the instance is a primary instance, then this field identifies the disaster recovery (DR) replica. A DR replica is an optional configuration for Enterprise Plus edition instances. If the instance is a read replica, then the field is not set. Set this field to a replica name to designate a DR replica for a primary instance. Remove the replica name to remove the DR replica designation. |
| `↳ dr_replica` | `bool` Output only. Read-only field that indicates whether the replica is a DR replica. This field is not set if the instance is a primary instance. |

### getPsaWriteEndpoint

Output only. If set, this field indicates this instance has a private
service access (PSA) DNS endpoint that is pointing to the primary instance
of the cluster. If this instance is the primary, then the DNS endpoint
points to this instance. After a switchover or replica failover operation,
this DNS endpoint points to the promoted instance. This is a read-only
field, returned to the user as information. This field can exist even if a
standalone instance doesn't have a DR replica yet or the DR replica is
deleted.

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

### setPsaWriteEndpoint

Output only. If set, this field indicates this instance has a private
service access (PSA) DNS endpoint that is pointing to the primary instance
of the cluster. If this instance is the primary, then the DNS endpoint
points to this instance. After a switchover or replica failover operation,
this DNS endpoint points to the promoted instance. This is a read-only
field, returned to the user as information. This field can exist even if a
standalone instance doesn't have a DR replica yet or the DR replica is
deleted.

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

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

### getFailoverDrReplicaName

Optional. If the instance is a primary instance, then this field identifies
the disaster recovery (DR) replica. A DR replica is an optional
configuration for Enterprise Plus edition instances. If the instance is a
read replica, then the field is not set. Set this field to a replica name
to designate a DR replica for a primary instance. Remove the replica name
to remove the DR replica designation.

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

### setFailoverDrReplicaName

Optional. If the instance is a primary instance, then this field identifies
the disaster recovery (DR) replica. A DR replica is an optional
configuration for Enterprise Plus edition instances. If the instance is a
read replica, then the field is not set. Set this field to a replica name
to designate a DR replica for a primary instance. Remove the replica name
to remove the DR replica designation.

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

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

### getDrReplica

Output only. Read-only field that indicates whether the replica is a DR
replica. This field is not set if the instance is a primary instance.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setDrReplica

Output only. Read-only field that indicates whether the replica is a DR
replica. This field is not set if the instance is a primary instance.

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

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