# Google Cloud Data Catalog V1 Client - Class Tag (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 Tag.

Tags contain custom metadata and are attached to Data Catalog resources. Tags
conform with the specification of their tag template.

See [Data Catalog
IAM](https://cloud.google.com/data-catalog/docs/concepts/iam) for information
on the permissions needed to create or view tags.

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

## Namespace

Google \\ Cloud \\ DataCatalog \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Identifier. The resource name of the tag in URL format where tag ID is a system-generated identifier. Note: The tag itself might not be stored in the location specified in its name. |
| `↳ template` | `string` Required. The resource name of the tag template this tag uses. Example: `projects/{PROJECT_ID}/locations/{LOCATION}/tagTemplates/{TAG_TEMPLATE_ID}` This field cannot be modified after creation. |
| `↳ template_display_name` | `string` Output only. The display name of the tag template. |
| `↳ column` | `string` Resources like entry can have schemas associated with them. This scope allows you to attach tags to an individual column based on that schema. To attach a tag to a nested column, separate column names with a dot (`.`). Example: `column.nested_column`. |
| `↳ fields` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` Required. Maps the ID of a tag field to its value and additional information about that field. Tag template defines valid field IDs. A tag must have at least 1 field and at most 500 fields. |
| `↳ dataplex_transfer_status` | `int` Output only. Denotes the transfer status of the Tag Template. |

### getName

Identifier. The resource name of the tag in URL format where tag ID is a
system-generated identifier.

Note: The tag itself might not be stored in the location specified in its
name.

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

### setName

Identifier. The resource name of the tag in URL format where tag ID is a
system-generated identifier.

Note: The tag itself might not be stored in the location specified in its
name.

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

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

### getTemplate

Required. The resource name of the tag template this tag uses. Example:
`projects/{PROJECT_ID}/locations/{LOCATION}/tagTemplates/{TAG_TEMPLATE_ID}`
This field cannot be modified after creation.

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

### setTemplate

Required. The resource name of the tag template this tag uses. Example:
`projects/{PROJECT_ID}/locations/{LOCATION}/tagTemplates/{TAG_TEMPLATE_ID}`
This field cannot be modified after creation.

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

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

### getTemplateDisplayName

Output only. The display name of the tag template.

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

### setTemplateDisplayName

Output only. The display name of the tag template.

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

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

### getColumn

Resources like entry can have schemas associated with them. This scope
allows you to attach tags to an individual column based on that schema.

To attach a tag to a nested column, separate column names with a dot
(`.`). Example: `column.nested_column`.

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

### hasColumn

### setColumn

Resources like entry can have schemas associated with them. This scope
allows you to attach tags to an individual column based on that schema.

To attach a tag to a nested column, separate column names with a dot
(`.`). Example: `column.nested_column`.

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

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

### getFields

Required. Maps the ID of a tag field to its value and additional
information about that field.

Tag template defines valid field IDs. A tag
must have at least 1 field and at most 500 fields.

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

### setFields

Required. Maps the ID of a tag field to its value and additional
information about that field.

Tag template defines valid field IDs. A tag
must have at least 1 field and at most 500 fields.

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

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

### getDataplexTransferStatus

Output only. Denotes the transfer status of the Tag Template.

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

### setDataplexTransferStatus

Output only. Denotes the transfer status of the Tag Template.

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

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

### getScope

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