# Google Cloud Data Catalog V1 Client - Class BigQueryConnectionSpec (2.4.2)

2.4.2 (latest) 2.4.1 2.3.2 2.2.4 2.1.0 2.0.2 1.10.3 1.9.1 1.8.2 1.7.1 1.6.0 1.5.1 1.4.2 1.3.9 Reference documentation and code samples for the Google Cloud Data Catalog V1 Client class BigQueryConnectionSpec.

Specification for the BigQuery connection.

Generated from protobuf message `google.cloud.datacatalog.v1.BigQueryConnectionSpec`

## Namespace

Google \\ Cloud \\ DataCatalog \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ connection_type` | `int` The type of the BigQuery connection. |
| `↳ cloud_sql` | `https://docs.cloud.google.com/php/docs/reference/cloud-data-catalog/latest/V1.CloudSqlBigQueryConnectionSpec` Specification for the BigQuery connection to a Cloud SQL instance. |
| `↳ has_credential` | `bool` True if there are credentials attached to the BigQuery connection; false otherwise. |

### getConnectionType

The type of the BigQuery connection.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [ConnectionType](https://docs.cloud.google.com/php/docs/reference/cloud-data-catalog/latest/V1.BigQueryConnectionSpec.ConnectionType). |

### setConnectionType

The type of the BigQuery connection.

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

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

### getCloudSql

Specification for the BigQuery connection to a Cloud SQL instance.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-data-catalog/latest/V1.CloudSqlBigQueryConnectionSpec|null` |   |

### hasCloudSql

### setCloudSql

Specification for the BigQuery connection to a Cloud SQL instance.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-data-catalog/latest/V1.CloudSqlBigQueryConnectionSpec` |

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

### getHasCredential

True if there are credentials attached to the BigQuery connection; false
otherwise.

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

### setHasCredential

True if there are credentials attached to the BigQuery connection; false
otherwise.

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

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

### getConnectionSpec

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