# Google Cloud Asset V1 Client - Class Tag (2.3.3)

2.3.3 (latest) 2.3.2 2.2.3 2.1.3 2.0.1 1.16.4 1.14.1 1.13.2 1.12.2 1.11.3 1.10.2 1.9.2 Reference documentation and code samples for the Google Cloud Asset V1 Client class Tag.

The key and value for a
[tag](https://cloud.google.com/resource-manager/docs/tags/tags-overview).

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

## Namespace

Google \\ Cloud \\ Asset \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ tag_key` | `string` TagKey namespaced name, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}. |
| `↳ tag_key_id` | `string` TagKey ID, in the format of tagKeys/{TAG_KEY_ID}. |
| `↳ tag_value` | `string` TagValue namespaced name, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}. |
| `↳ tag_value_id` | `string` TagValue ID, in the format of tagValues/{TAG_VALUE_ID}. |

### getTagKey

TagKey namespaced name, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}.

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

### hasTagKey

### clearTagKey

### setTagKey

TagKey namespaced name, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}.

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

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

### getTagKeyId

TagKey ID, in the format of tagKeys/{TAG_KEY_ID}.

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

### hasTagKeyId

### clearTagKeyId

### setTagKeyId

TagKey ID, in the format of tagKeys/{TAG_KEY_ID}.

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

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

### getTagValue

TagValue namespaced name, in the format of
{ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}.

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

### hasTagValue

### clearTagValue

### setTagValue

TagValue namespaced name, in the format of
{ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}.

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

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

### getTagValueId

TagValue ID, in the format of tagValues/{TAG_VALUE_ID}.

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

### hasTagValueId

### clearTagValueId

### setTagValueId

TagValue ID, in the format of tagValues/{TAG_VALUE_ID}.

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

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