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

Connect settings retrieval response.

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

## Namespace

Google \\ Cloud \\ Sql \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ kind` | `string` This is always `sql#connectSettings`. |
| `↳ server_ca_cert` | `https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.SslCert` SSL configuration. |
| `↳ ip_addresses` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.IpMapping>` The assigned IP addresses for the instance. |
| `↳ region` | `string` The cloud region for the instance. For example, `us-central1`, `europe-west1`. The region cannot be changed after instance creation. |
| `↳ database_version` | `int` The database engine type and version. The `databaseVersion` field cannot be changed after instance creation. MySQL instances: `MYSQL_8_0`, `MYSQL_5_7` (default), or `MYSQL_5_6`. PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`, `POSTGRES_11`, `POSTGRES_12` (default), `POSTGRES_13`, or `POSTGRES_14`. SQL Server instances: `SQLSERVER_2017_STANDARD` (default), `SQLSERVER_2017_ENTERPRISE`, `SQLSERVER_2017_EXPRESS`, `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`, `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or `SQLSERVER_2019_WEB`. |
| `↳ backend_type` | `int` `SECOND_GEN`: Cloud SQL database instance. `EXTERNAL`: A database server that is not managed by Google. This property is read-only; use the `tier` property in the `settings` object to determine the database type. |
| `↳ psc_enabled` | `bool` Whether PSC connectivity is enabled for this instance. |
| `↳ dns_name` | `string` The dns name of the instance. |
| `↳ server_ca_mode` | `int` Specify what type of CA is used for the server certificate. |
| `↳ custom_subject_alternative_names` | `string[]` Custom subject alternative names for the server certificate. |
| `↳ dns_names` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.DnsNameMapping>` Output only. The list of DNS names used by this instance. |
| `↳ node_count` | `int` The number of read pool nodes in a read pool. |
| `↳ nodes` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.ConnectSettings.ConnectPoolNodeConfig>` Output only. Entries containing information about each read pool node of the read pool. |
| `↳ mdx_protocol_support` | `int[]` Optional. Output only. mdx_protocol_support controls how the client uses metadata exchange when connecting to the instance. The values in the list representing parts of the MDX protocol that are supported by this instance. When the list is empty, the instance does not support MDX, so the client must not send an MDX request. The default is empty. |

### getKind

This is always `sql#connectSettings`.

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

### setKind

This is always `sql#connectSettings`.

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

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

### getServerCaCert

SSL configuration.

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

### hasServerCaCert

### clearServerCaCert

### setServerCaCert

SSL configuration.

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

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

### getIpAddresses

The assigned IP addresses for the 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.IpMapping>` |   |

### setIpAddresses

The assigned IP addresses for the instance.

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

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

### getRegion

The cloud region for the instance. For example, `us-central1`,
`europe-west1`. The region cannot be changed after instance creation.

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

### setRegion

The cloud region for the instance. For example, `us-central1`,
`europe-west1`. The region cannot be changed after instance creation.

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

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

### getDatabaseVersion

The database engine type and version. The `databaseVersion`
field cannot be changed after instance creation.

MySQL instances: `MYSQL_8_0`, `MYSQL_5_7` (default),
or `MYSQL_5_6`.
PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`,
`POSTGRES_11`, `POSTGRES_12` (default), `POSTGRES_13`, or `POSTGRES_14`.
SQL Server instances: `SQLSERVER_2017_STANDARD` (default),
`SQLSERVER_2017_ENTERPRISE`, `SQLSERVER_2017_EXPRESS`,
`SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`,
`SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or
`SQLSERVER_2019_WEB`.

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

### setDatabaseVersion

The database engine type and version. The `databaseVersion`
field cannot be changed after instance creation.

MySQL instances: `MYSQL_8_0`, `MYSQL_5_7` (default),
or `MYSQL_5_6`.
PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`,
`POSTGRES_11`, `POSTGRES_12` (default), `POSTGRES_13`, or `POSTGRES_14`.
SQL Server instances: `SQLSERVER_2017_STANDARD` (default),
`SQLSERVER_2017_ENTERPRISE`, `SQLSERVER_2017_EXPRESS`,
`SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`,
`SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or
`SQLSERVER_2019_WEB`.

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

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

### getBackendType

`SECOND_GEN`: Cloud SQL database instance.

`EXTERNAL`: A database server that is not managed by Google.
This property is read-only; use the `tier` property in the `settings`
object to determine the database type.

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

### setBackendType

`SECOND_GEN`: Cloud SQL database instance.

`EXTERNAL`: A database server that is not managed by Google.
This property is read-only; use the `tier` property in the `settings`
object to determine the database type.

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

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

### getPscEnabled

Whether PSC connectivity is enabled for this instance.

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

### setPscEnabled

Whether PSC connectivity is enabled for this instance.

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

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

### getDnsName

The dns name of the instance.

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

### setDnsName

The dns name of the instance.

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

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

### getServerCaMode

Specify what type of CA is used for the server certificate.

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

### setServerCaMode

Specify what type of CA is used for the server certificate.

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

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

### getCustomSubjectAlternativeNames

Custom subject alternative names for the server certificate.

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

### setCustomSubjectAlternativeNames

Custom subject alternative names for the server certificate.

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

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

### getDnsNames

Output only. The list of DNS names used by this 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.DnsNameMapping>` |   |

### setDnsNames

Output only. The list of DNS names used by this instance.

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

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

### getNodeCount

The number of read pool nodes in a read pool.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### hasNodeCount

### clearNodeCount

### setNodeCount

The number of read pool nodes in a read pool.

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

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

### getNodes

Output only. Entries containing information about each read pool node of
the read pool.

| **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.ConnectSettings.ConnectPoolNodeConfig>` |   |

### setNodes

Output only. Entries containing information about each read pool node of
the read pool.

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

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

### getMdxProtocolSupport

Optional. Output only. mdx_protocol_support controls how the client uses
metadata exchange when connecting to the instance. The values in the list
representing parts of the MDX protocol that are supported by this instance.

When the list is empty, the instance does not support MDX, so the client
must not send an MDX request. The default is empty.

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

### setMdxProtocolSupport

Optional. Output only. mdx_protocol_support controls how the client uses
metadata exchange when connecting to the instance. The values in the list
representing parts of the MDX protocol that are supported by this instance.

When the list is empty, the instance does not support MDX, so the client
must not send an MDX request. The default is empty.

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

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