# Google Cloud BigQuery Analytics Hub V1 Client - Class QueryTemplate (1.5.1)

1.5.1 (latest) 1.5.0 1.4.1 1.3.0 1.2.1 1.1.0 1.0.4 0.5.3 0.4.0 0.3.2 0.2.2 0.1.6 Reference documentation and code samples for the Google Cloud BigQuery Analytics Hub V1 Client class QueryTemplate.

A query template is a container for sharing table-valued functions defined by
contributors in a data clean room.

Generated from protobuf message `google.cloud.bigquery.analyticshub.v1.QueryTemplate`

## Namespace

Google \\ Cloud \\ BigQuery \\ AnalyticsHub \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Output only. The resource name of the QueryTemplate. e.g. `projects/myproject/locations/us/dataExchanges/123/queryTemplates/456` |
| `↳ display_name` | `string` Required. Human-readable display name of the QueryTemplate. The display name must contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces ( ), ampersands (\&) and can't start or end with spaces. Default value is an empty string. Max length: 63 bytes. |
| `↳ description` | `string` Optional. Short description of the QueryTemplate. The description must not contain Unicode non-characters and C0 and C1 control codes except tabs (HT), new lines (LF), carriage returns (CR), and page breaks (FF). Default value is an empty string. Max length: 2000 bytes. |
| `↳ proposer` | `string` Optional. Will be deprecated. Email or URL of the primary point of contact of the QueryTemplate. Max Length: 1000 bytes. |
| `↳ primary_contact` | `string` Optional. Email or URL of the primary point of contact of the QueryTemplate. Max Length: 1000 bytes. |
| `↳ documentation` | `string` Optional. Documentation describing the QueryTemplate. |
| `↳ state` | `int` Output only. The QueryTemplate lifecycle state. |
| `↳ routine` | `https://docs.cloud.google.com/php/docs/reference/cloud-bigquery-analyticshub/latest/V1.Routine` Optional. The routine associated with the QueryTemplate. |
| `↳ create_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. Timestamp when the QueryTemplate was created. |
| `↳ update_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. Timestamp when the QueryTemplate was last modified. |

### getName

Output only. The resource name of the QueryTemplate.

e.g. `projects/myproject/locations/us/dataExchanges/123/queryTemplates/456`

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

### setName

Output only. The resource name of the QueryTemplate.

e.g. `projects/myproject/locations/us/dataExchanges/123/queryTemplates/456`

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

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

### getDisplayName

Required. Human-readable display name of the QueryTemplate. The display
name must contain only Unicode letters, numbers (0-9), underscores (_),
dashes (-), spaces ( ), ampersands (\&) and can't start or end with spaces.

Default value is an empty string. Max length: 63 bytes.

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

### setDisplayName

Required. Human-readable display name of the QueryTemplate. The display
name must contain only Unicode letters, numbers (0-9), underscores (_),
dashes (-), spaces ( ), ampersands (\&) and can't start or end with spaces.

Default value is an empty string. Max length: 63 bytes.

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

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

### getDescription

Optional. Short description of the QueryTemplate. The description must not
contain Unicode non-characters and C0 and C1 control codes except tabs
(HT), new lines (LF), carriage returns (CR), and page breaks (FF). Default
value is an empty string. Max length: 2000 bytes.

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

### setDescription

Optional. Short description of the QueryTemplate. The description must not
contain Unicode non-characters and C0 and C1 control codes except tabs
(HT), new lines (LF), carriage returns (CR), and page breaks (FF). Default
value is an empty string. Max length: 2000 bytes.

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

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

### getProposer

Optional. Will be deprecated.

Email or URL of the primary point of contact of the QueryTemplate.
Max Length: 1000 bytes.

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

### setProposer

Optional. Will be deprecated.

Email or URL of the primary point of contact of the QueryTemplate.
Max Length: 1000 bytes.

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

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

### getPrimaryContact

Optional. Email or URL of the primary point of contact of the
QueryTemplate. Max Length: 1000 bytes.

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

### setPrimaryContact

Optional. Email or URL of the primary point of contact of the
QueryTemplate. Max Length: 1000 bytes.

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

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

### getDocumentation

Optional. Documentation describing the QueryTemplate.

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

### setDocumentation

Optional. Documentation describing the QueryTemplate.

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

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

### getState

Output only. The QueryTemplate lifecycle state.

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

### setState

Output only. The QueryTemplate lifecycle state.

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

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

### getRoutine

Optional. The routine associated with the QueryTemplate.

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

### hasRoutine

### clearRoutine

### setRoutine

Optional. The routine associated with the QueryTemplate.

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

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

### getCreateTime

Output only. Timestamp when the QueryTemplate was created.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. Timestamp when the QueryTemplate was created.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

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

### getUpdateTime

Output only. Timestamp when the QueryTemplate was last modified.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasUpdateTime

### clearUpdateTime

### setUpdateTime

Output only. Timestamp when the QueryTemplate was last modified.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

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