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

On-premises instance configuration.

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

## Namespace

Google \\ Cloud \\ Sql \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ host_port` | `string` The host and port of the on-premises instance in host:port format |
| `↳ kind` | `string` This is always `sql#onPremisesConfiguration`. |
| `↳ username` | `string` The username for connecting to on-premises instance. |
| `↳ password` | `string` The password for connecting to on-premises instance. |
| `↳ ca_certificate` | `string` PEM representation of the trusted CA's x509 certificate. |
| `↳ client_certificate` | `string` PEM representation of the replica's x509 certificate. |
| `↳ client_key` | `string` PEM representation of the replica's private key. The corresponding public key is encoded in the client's certificate. |
| `↳ dump_file_path` | `string` The dump file to create the Cloud SQL replica. |
| `↳ source_instance` | `https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.InstanceReference` The reference to Cloud SQL instance if the source is Cloud SQL. |
| `↳ selected_objects` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.SelectedObjects>` Optional. A list of objects that the user selects for replication from an external source instance. |
| `↳ ssl_option` | `int` Optional. SSL option for replica connection to the on-premises source. |

### getHostPort

The host and port of the on-premises instance in host:port format

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

### setHostPort

The host and port of the on-premises instance in host:port format

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

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

### getKind

This is always `sql#onPremisesConfiguration`.

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

### setKind

This is always `sql#onPremisesConfiguration`.

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

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

### getUsername

The username for connecting to on-premises instance.

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

### setUsername

The username for connecting to on-premises instance.

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

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

### getPassword

The password for connecting to on-premises instance.

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

### setPassword

The password for connecting to on-premises instance.

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

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

### getCaCertificate

PEM representation of the trusted CA's x509 certificate.

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

### setCaCertificate

PEM representation of the trusted CA's x509 certificate.

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

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

### getClientCertificate

PEM representation of the replica's x509 certificate.

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

### setClientCertificate

PEM representation of the replica's x509 certificate.

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

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

### getClientKey

PEM representation of the replica's private key. The corresponding public
key is encoded in the client's certificate.

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

### setClientKey

PEM representation of the replica's private key. The corresponding public
key is encoded in the client's certificate.

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

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

### getDumpFilePath

The dump file to create the Cloud SQL replica.

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

### setDumpFilePath

The dump file to create the Cloud SQL replica.

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

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

### getSourceInstance

The reference to Cloud SQL instance if the source is Cloud SQL.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.InstanceReference|null` |   |

### hasSourceInstance

### clearSourceInstance

### setSourceInstance

The reference to Cloud SQL instance if the source is Cloud SQL.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.InstanceReference` |

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

### getSelectedObjects

Optional. A list of objects that the user selects for replication from an
external source instance.

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

### setSelectedObjects

Optional. A list of objects that the user selects for replication from an
external source instance.

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

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

### getSslOption

Optional. SSL option for replica connection to the on-premises source.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [SslOption](https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.OnPremisesConfiguration.SslOption). |

### setSslOption

Optional. SSL option for replica connection to the on-premises source.

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

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