# Interface TagOrBuilder (1.99.0)

1.99.0 (latest) 1.97.0 1.94.0 1.93.0 1.91.0 1.89.0 1.88.0 1.87.0 1.86.0 1.84.0 1.82.0 1.81.0 1.80.0 1.79.0 1.78.0 1.76.0 1.74.0 1.73.0 1.70.0 1.69.0 1.68.0 1.66.0 1.65.0 1.64.0 1.63.0 1.62.0 1.61.0 1.60.0 1.59.0 1.58.0 1.57.0 1.55.0 1.54.0 1.53.0 1.52.0 1.51.0 1.50.0 1.49.0 1.48.0 1.47.0 1.46.0 1.45.0 1.43.0 1.42.0 1.41.0 1.40.0 1.39.0 1.38.0 1.37.0 1.36.0 1.35.0 1.34.0 1.33.0 1.30.0 1.29.0 1.28.0 1.27.0 1.26.0 1.25.0 1.24.0 1.23.0 1.22.0 1.21.0 1.20.0 1.19.0 1.18.0 1.17.0 1.15.0 1.14.0 1.13.0 1.12.0 1.11.0 1.10.0 1.9.5 1.8.4 1.7.2 1.6.2 1.5.4

    public interface TagOrBuilder extends MessageOrBuilder

## Implements

[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)

## Methods

### containsFields(String key)

    public abstract boolean containsFields(String key)

Required. This maps the ID of a tag field to the value of and additional
information about that field. Valid field IDs are defined by the tag's
template. A tag must have at least 1 field and at most 500 fields.

`
map<string, .google.cloud.datacatalog.v1beta1.TagField> fields = 3 [(.google.api.field_behavior) = REQUIRED];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `key` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getColumn()

    public abstract String getColumn()

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

For attaching a tag to a nested column, use `.` to separate the column
names. Example:

- `outer_column.inner_column`

`string column = 4;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The column. |

### getColumnBytes()

    public abstract ByteString getColumnBytes()

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

For attaching a tag to a nested column, use `.` to separate the column
names. Example:

- `outer_column.inner_column`

`string column = 4;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for column. |

### getFields() (deprecated)

    public abstract Map<String,TagField> getFields()

Use [#getFieldsMap()](https://docs.cloud.google.com/java/docs/reference/google-cloud-datacatalog/latest/com.google.cloud.datacatalog.v1beta1.TagOrBuilder#com_google_cloud_datacatalog_v1beta1_TagOrBuilder_getFieldsMap__) instead.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/Map.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html,https://docs.cloud.google.com/java/docs/reference/google-cloud-datacatalog/latest/com.google.cloud.datacatalog.v1beta1.TagField>` |   |

### getFieldsCount()

    public abstract int getFieldsCount()

Required. This maps the ID of a tag field to the value of and additional
information about that field. Valid field IDs are defined by the tag's
template. A tag must have at least 1 field and at most 500 fields.

`
map<string, .google.cloud.datacatalog.v1beta1.TagField> fields = 3 [(.google.api.field_behavior) = REQUIRED];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getFieldsMap()

    public abstract Map<String,TagField> getFieldsMap()

Required. This maps the ID of a tag field to the value of and additional
information about that field. Valid field IDs are defined by the tag's
template. A tag must have at least 1 field and at most 500 fields.

`
map<string, .google.cloud.datacatalog.v1beta1.TagField> fields = 3 [(.google.api.field_behavior) = REQUIRED];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/Map.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html,https://docs.cloud.google.com/java/docs/reference/google-cloud-datacatalog/latest/com.google.cloud.datacatalog.v1beta1.TagField>` |   |

### getFieldsOrDefault(String key, TagField defaultValue)

    public abstract TagField getFieldsOrDefault(String key, TagField defaultValue)

Required. This maps the ID of a tag field to the value of and additional
information about that field. Valid field IDs are defined by the tag's
template. A tag must have at least 1 field and at most 500 fields.

`
map<string, .google.cloud.datacatalog.v1beta1.TagField> fields = 3 [(.google.api.field_behavior) = REQUIRED];
`

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `key` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |
| `defaultValue` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-datacatalog/latest/com.google.cloud.datacatalog.v1beta1.TagField` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-datacatalog/latest/com.google.cloud.datacatalog.v1beta1.TagField` |   |

### getFieldsOrThrow(String key)

    public abstract TagField getFieldsOrThrow(String key)

Required. This maps the ID of a tag field to the value of and additional
information about that field. Valid field IDs are defined by the tag's
template. A tag must have at least 1 field and at most 500 fields.

`
map<string, .google.cloud.datacatalog.v1beta1.TagField> fields = 3 [(.google.api.field_behavior) = REQUIRED];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `key` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-datacatalog/latest/com.google.cloud.datacatalog.v1beta1.TagField` |   |

### getName()

    public abstract String getName()

Identifier. The resource name of the tag in URL format. Example:

- projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}

  where `tag_id` is a system-generated identifier.
  Note that this Tag may not actually be stored in the location in this name.

`string name = 1 [(.google.api.field_behavior) = IDENTIFIER];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The name. |

### getNameBytes()

    public abstract ByteString getNameBytes()

Identifier. The resource name of the tag in URL format. Example:

- projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}

  where `tag_id` is a system-generated identifier.
  Note that this Tag may not actually be stored in the location in this name.

`string name = 1 [(.google.api.field_behavior) = IDENTIFIER];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for name. |

### getScopeCase()

    public abstract Tag.ScopeCase getScopeCase()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-datacatalog/latest/com.google.cloud.datacatalog.v1beta1.Tag.ScopeCase` |   |

### getTemplate()

    public abstract String getTemplate()

Required. The resource name of the tag template that this tag uses.
Example:

- projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}

  This field cannot be modified after creation.

`string template = 2 [(.google.api.field_behavior) = REQUIRED];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The template. |

### getTemplateBytes()

    public abstract ByteString getTemplateBytes()

Required. The resource name of the tag template that this tag uses.
Example:

- projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}

  This field cannot be modified after creation.

`string template = 2 [(.google.api.field_behavior) = REQUIRED];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for template. |

### getTemplateDisplayName()

    public abstract String getTemplateDisplayName()

Output only. The display name of the tag template.

`string template_display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The templateDisplayName. |

### getTemplateDisplayNameBytes()

    public abstract ByteString getTemplateDisplayNameBytes()

Output only. The display name of the tag template.

`string template_display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for templateDisplayName. |

### hasColumn()

    public abstract boolean hasColumn()

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

For attaching a tag to a nested column, use `.` to separate the column
names. Example:

- `outer_column.inner_column`

`string column = 4;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the column field is set. |