# Google Cloud Dataplex V1 Client - Class TemplateReference (1.14.0)

1.14.0 (latest) 1.13.0 1.12.0 1.11.0 1.10.0 1.9.1 1.8.0 1.7.1 1.6.1 1.4.0 1.3.0 1.2.1 1.1.1 1.0.1 0.16.1 0.15.1 0.14.0 0.13.0 0.12.0 0.11.1 0.10.0 0.9.0 0.8.0 0.7.0 0.6.0 0.5.1 0.4.0 0.3.0 0.2.3 0.1.6 Reference documentation and code samples for the Google Cloud Dataplex V1 Client class TemplateReference.

A rule that constructs a SQL statement to evaluate using a rule template
and parameter values. If the constructed statement returns any rows, this
rule fails

Generated from protobuf message `google.cloud.dataplex.v1.DataQualityRule.TemplateReference`

## Namespace

Google \\ Cloud \\ Dataplex \\ V1 \\ DataQualityRule

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Required. The template entry name. Entry must be of EntryType `projects/dataplex-types/locations/global/entryTypes/data-quality-rule-template` and contains top-level aspect of AspectType `projects/dataplex-types/locations/global/aspectTypes/data-quality-rule-template`. The format is: `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}/entries/{entry_id}` |
| `↳ values` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` Optional. Provides the map of parameter name and value. The maximum size of the field is 120KB (encoded as UTF-8). |
| `↳ resolved_sql` | `string` Output only. The resolved SQL statement generated from the template with parameters substituted. It is only populated in the result. |
| `↳ rule_template` | `https://docs.cloud.google.com/php/docs/reference/cloud-dataplex/latest/V1.DataQualityRuleTemplate` Output only. The rule template used to resolve the rule. It is only populated in the result. |

### getName

Required. The template entry name. Entry must be of EntryType
`projects/dataplex-types/locations/global/entryTypes/data-quality-rule-template`
and contains top-level aspect of AspectType
`projects/dataplex-types/locations/global/aspectTypes/data-quality-rule-template`.

The format is:
`projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}/entries/{entry_id}`

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

### setName

Required. The template entry name. Entry must be of EntryType
`projects/dataplex-types/locations/global/entryTypes/data-quality-rule-template`
and contains top-level aspect of AspectType
`projects/dataplex-types/locations/global/aspectTypes/data-quality-rule-template`.

The format is:
`projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}/entries/{entry_id}`

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

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

### getValues

Optional. Provides the map of parameter name and value.

The maximum size of the field is 120KB (encoded as UTF-8).

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

### setValues

Optional. Provides the map of parameter name and value.

The maximum size of the field is 120KB (encoded as UTF-8).

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

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

### getResolvedSql

Output only. The resolved SQL statement generated from the template with
parameters substituted. It is only populated in the result.

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

### setResolvedSql

Output only. The resolved SQL statement generated from the template with
parameters substituted. It is only populated in the result.

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

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

### getRuleTemplate

Output only. The rule template used to resolve the rule. It is only
populated in the result.

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

### hasRuleTemplate

### clearRuleTemplate

### setRuleTemplate

Output only. The rule template used to resolve the rule. It is only
populated in the result.

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

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