# Google BigQuery Connection V1 Client - Class CloudSqlProperties (2.1.3)

2.1.3 (latest) 2.1.2 2.0.5 1.5.5 1.4.1 1.3.1 1.2.2 1.1.0 1.0.3 Reference documentation and code samples for the Google BigQuery Connection V1 Client class CloudSqlProperties.

Connection properties specific to the Cloud SQL.

Generated from protobuf message `google.cloud.bigquery.connection.v1.CloudSqlProperties`

## Namespace

Google \\ Cloud \\ BigQuery \\ Connection \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ instance_id` | `string` Cloud SQL instance ID in the form `project:location:instance`. |
| `↳ database` | `string` Database name. |
| `↳ type` | `int` Type of the Cloud SQL database. |
| `↳ credential` | `https://docs.cloud.google.com/php/docs/reference/cloud-bigquery-connection/latest/V1.CloudSqlCredential` Input only. Cloud SQL credential. |
| `↳ service_account_id` | `string` Output only. The account ID of the service used for the purpose of this connection. When the connection is used in the context of an operation in BigQuery, this service account will serve as the identity being used for connecting to the CloudSQL instance specified in this connection. |

### getInstanceId

Cloud SQL instance ID in the form `project:location:instance`.

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

### setInstanceId

Cloud SQL instance ID in the form `project:location:instance`.

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

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

### getDatabase

Database name.

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

### setDatabase

Database name.

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

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

### getType

Type of the Cloud SQL database.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [DatabaseType](https://docs.cloud.google.com/php/docs/reference/cloud-bigquery-connection/latest/V1.CloudSqlProperties.DatabaseType). |

### setType

Type of the Cloud SQL database.

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

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

### getCredential

Input only. Cloud SQL credential.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-bigquery-connection/latest/V1.CloudSqlCredential|null` |   |

### hasCredential

### clearCredential

### setCredential

Input only. Cloud SQL credential.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-bigquery-connection/latest/V1.CloudSqlCredential` |

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

### getServiceAccountId

Output only. The account ID of the service used for the purpose of this
connection.

When the connection is used in the context of an operation in
BigQuery, this service account will serve as the identity being used for
connecting to the CloudSQL instance specified in this connection.

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

### setServiceAccountId

Output only. The account ID of the service used for the purpose of this
connection.

When the connection is used in the context of an operation in
BigQuery, this service account will serve as the identity being used for
connecting to the CloudSQL instance specified in this connection.

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

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