# Google Cloud Sql Admin V1 Client - Class SqlFailoverReplica (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 SqlFailoverReplica.

Generated from protobuf message `google.cloud.sql.v1.DatabaseInstance.SqlFailoverReplica`

## Namespace

Google \\ Cloud \\ Sql \\ V1 \\ DatabaseInstance

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` The name of the failover replica. If specified at instance creation, a failover replica is created for the instance. The name doesn't include the project ID. |
| `↳ available` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/BoolValue` The availability status of the failover replica. A false status indicates that the failover replica is out of sync. The primary instance can only failover to the failover replica when the status is true. |

### getName

The name of the failover replica. If specified at instance creation, a
failover replica is created for the instance. The name
doesn't include the project ID.

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

### setName

The name of the failover replica. If specified at instance creation, a
failover replica is created for the instance. The name
doesn't include the project ID.

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

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

### getAvailable

The availability status of the failover replica. A false status indicates
that the failover replica is out of sync. The primary instance can only
failover to the failover replica when the status is true.

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

### hasAvailable

### clearAvailable

### getAvailableUnwrapped

Returns the unboxed value from `getAvailable()`

The availability status of the failover replica. A false status indicates
that the failover replica is out of sync. The primary instance can only
failover to the failover replica when the status is true.

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

### setAvailable

The availability status of the failover replica. A false status indicates
that the failover replica is out of sync. The primary instance can only
failover to the failover replica when the status is true.

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

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

### setAvailableUnwrapped

Sets the field by wrapping a primitive type in a Google\\Protobuf\\BoolValue object.

The availability status of the failover replica. A false status indicates
that the failover replica is out of sync. The primary instance can only
failover to the failover replica when the status is true.

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

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