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

Request message for
CreateTag.

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

## Namespace

Google \\ Cloud \\ DataCatalog \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ parent` | `string` Required. The name of the resource to attach this tag to. Tags can be attached to entries or entry groups. An entry can have up to 1000 attached tags. Note: The tag and its child resources might not be stored in the location specified in its name. |
| `↳ tag` | `https://docs.cloud.google.com/php/docs/reference/cloud-data-catalog/latest/V1.Tag` Required. The tag to create. |

### getParent

Required. The name of the resource to attach this tag to.

Tags can be attached to entries or entry groups. An entry can have up to
1000 attached tags.
Note: The tag and its child resources might not be stored in
the location specified in its name.

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

### setParent

Required. The name of the resource to attach this tag to.

Tags can be attached to entries or entry groups. An entry can have up to
1000 attached tags.
Note: The tag and its child resources might not be stored in
the location specified in its name.

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

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

### getTag

Required. The tag to create.

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

### hasTag

### clearTag

### setTag

Required. The tag to create.

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

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

### static::build

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. The name of the resource to attach this tag to. Tags can be attached to entries or entry groups. An entry can have up to 1000 attached tags. Note: The tag and its child resources might not be stored in the location specified in its name. Please see DataCatalogClient::entryName() for help formatting this field. |
| `tag` | `https://docs.cloud.google.com/php/docs/reference/cloud-data-catalog/latest/V1.Tag` Required. The tag to create. |

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