# Common Protos for Google Cloud APIs Client - Class Query (1.0.0)

1.0.0 (latest) 0.8.3 0.7.0 0.6.0 0.5.2 0.4.2 0.3.8 Reference documentation and code samples for the Common Protos for Google Cloud APIs Client class Query.

Query job configuration.

Generated from protobuf message `google.cloud.audit.BigQueryAuditMetadata.JobConfig.Query`

## Namespace

Google \\ Cloud \\ Audit \\ BigQueryAuditMetadata \\ JobConfig

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ query` | `string` The SQL query to run. Truncated if exceeds 50K. |
| `↳ query_truncated` | `bool` True if the query field was truncated. |
| `↳ destination_table` | `string` The destination table for the query results. |
| `↳ create_disposition` | `int` Destination table create disposition. |
| `↳ write_disposition` | `int` Destination table write disposition. |
| `↳ default_dataset` | `string` Default dataset for the query. |
| `↳ table_definitions` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-common-protos/latest/Audit.BigQueryAuditMetadata.TableDefinition>` External data sources used in the query. |
| `↳ priority` | `int` Priority given to the query. |
| `↳ destination_table_encryption` | `https://docs.cloud.google.com/php/docs/reference/cloud-common-protos/latest/Audit.BigQueryAuditMetadata.EncryptionInfo` Result table encryption information. Set when non-default encryption is used. |
| `↳ statement_type` | `int` Type of the query. |

### getQuery

The SQL query to run. Truncated if exceeds 50K.

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

### setQuery

The SQL query to run. Truncated if exceeds 50K.

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

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

### getQueryTruncated

True if the query field was truncated.

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

### setQueryTruncated

True if the query field was truncated.

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

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

### getDestinationTable

The destination table for the query results.

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

### setDestinationTable

The destination table for the query results.

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

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

### getCreateDisposition

Destination table create disposition.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [CreateDisposition](https://docs.cloud.google.com/php/docs/reference/cloud-common-protos/latest/Audit.BigQueryAuditMetadata.CreateDisposition). |

### setCreateDisposition

Destination table create disposition.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [CreateDisposition](https://docs.cloud.google.com/php/docs/reference/cloud-common-protos/latest/Audit.BigQueryAuditMetadata.CreateDisposition). |

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

### getWriteDisposition

Destination table write disposition.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [WriteDisposition](https://docs.cloud.google.com/php/docs/reference/cloud-common-protos/latest/Audit.BigQueryAuditMetadata.WriteDisposition). |

### setWriteDisposition

Destination table write disposition.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [WriteDisposition](https://docs.cloud.google.com/php/docs/reference/cloud-common-protos/latest/Audit.BigQueryAuditMetadata.WriteDisposition). |

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

### getDefaultDataset

Default dataset for the query.

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

### setDefaultDataset

Default dataset for the query.

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

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

### getTableDefinitions

External data sources used in the query.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-common-protos/latest/Audit.BigQueryAuditMetadata.TableDefinition>` |   |

### setTableDefinitions

External data sources used in the query.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-common-protos/latest/Audit.BigQueryAuditMetadata.TableDefinition>` |

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

### getPriority

Priority given to the query.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [Priority](https://docs.cloud.google.com/php/docs/reference/cloud-common-protos/latest/Audit.BigQueryAuditMetadata.JobConfig.Query.Priority). |

### setPriority

Priority given to the query.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [Priority](https://docs.cloud.google.com/php/docs/reference/cloud-common-protos/latest/Audit.BigQueryAuditMetadata.JobConfig.Query.Priority). |

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

### getDestinationTableEncryption

Result table encryption information. Set when non-default encryption is
used.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-common-protos/latest/Audit.BigQueryAuditMetadata.EncryptionInfo|null` |   |

### hasDestinationTableEncryption

### clearDestinationTableEncryption

### setDestinationTableEncryption

Result table encryption information. Set when non-default encryption is
used.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-common-protos/latest/Audit.BigQueryAuditMetadata.EncryptionInfo` |

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

### getStatementType

Type of the query.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [QueryStatementType](https://docs.cloud.google.com/php/docs/reference/cloud-common-protos/latest/Audit.BigQueryAuditMetadata.QueryStatementType). |

### setStatementType

Type of the query.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [QueryStatementType](https://docs.cloud.google.com/php/docs/reference/cloud-common-protos/latest/Audit.BigQueryAuditMetadata.QueryStatementType). |

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