Class Tag (1.48.0)

public final class Tag extends GeneratedMessageV3 implements TagOrBuilder

Tags are used to attach custom metadata to Data Catalog resources. Tags conform to the specifications within their tag template.

See Data Catalog IAM for information on the permissions needed to create or view tags.

Protobuf type google.cloud.datacatalog.v1beta1.Tag

Implements

TagOrBuilder

Static Fields

COLUMN_FIELD_NUMBER

public static final int COLUMN_FIELD_NUMBER
Field Value
Type Description
int

FIELDS_FIELD_NUMBER

public static final int FIELDS_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

TEMPLATE_DISPLAY_NAME_FIELD_NUMBER

public static final int TEMPLATE_DISPLAY_NAME_FIELD_NUMBER
Field Value
Type Description
int

TEMPLATE_FIELD_NUMBER

public static final int TEMPLATE_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static Tag getDefaultInstance()
Returns
Type Description
Tag

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static Tag.Builder newBuilder()
Returns
Type Description
Tag.Builder

newBuilder(Tag prototype)

public static Tag.Builder newBuilder(Tag prototype)
Parameter
Name Description
prototype Tag
Returns
Type Description
Tag.Builder

parseDelimitedFrom(InputStream input)

public static Tag parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Tag
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Tag parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Tag
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static Tag parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
Tag
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Tag parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Tag
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Tag parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
Tag
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Tag parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Tag
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Tag parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Tag
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Tag parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Tag
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static Tag parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Tag
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Tag parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Tag
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static Tag parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Tag
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Tag parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Tag
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<Tag> parser()
Returns
Type Description
Parser<Tag>

Methods

containsFields(String key)

public 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 String
Returns
Type Description
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getColumn()

public 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
String

The column.

getColumnBytes()

public 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
ByteString

The bytes for column.

getDefaultInstanceForType()

public Tag getDefaultInstanceForType()
Returns
Type Description
Tag

getFields() (deprecated)

public Map<String,TagField> getFields()

Use #getFieldsMap() instead.

Returns
Type Description
Map<String,TagField>

getFieldsCount()

public 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
int

getFieldsMap()

public 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
Map<String,TagField>

getFieldsOrDefault(String key, TagField defaultValue)

public 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 String
defaultValue TagField
Returns
Type Description
TagField

getFieldsOrThrow(String key)

public 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 String
Returns
Type Description
TagField

getName()

public String getName()

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;

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

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;

Returns
Type Description
ByteString

The bytes for name.

getParserForType()

public Parser<Tag> getParserForType()
Returns
Type Description
Parser<Tag>
Overrides

getScopeCase()

public Tag.ScopeCase getScopeCase()
Returns
Type Description
Tag.ScopeCase

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getTemplate()

public 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
String

The template.

getTemplateBytes()

public 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
ByteString

The bytes for template.

getTemplateDisplayName()

public 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
String

The templateDisplayName.

getTemplateDisplayNameBytes()

public 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
ByteString

The bytes for templateDisplayName.

hasColumn()

public 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
boolean

Whether the column field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public Tag.Builder newBuilderForType()
Returns
Type Description
Tag.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Tag.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Tag.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public Tag.Builder toBuilder()
Returns
Type Description
Tag.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException