Class Tag (1.7.2)

public final class Tag extends GeneratedMessageV3 implements TagOrBuilder

Tags contain custom metadata and are attached to Data Catalog resources. Tags conform with the specification of their tag template. See Data Catalog IAM for information on the permissions needed to create or view tags.

Protobuf type google.cloud.datacatalog.v1.Tag

Implements

TagOrBuilder

Static Fields

COLUMN_FIELD_NUMBER

public static final int COLUMN_FIELD_NUMBER
Field Value
TypeDescription
int

FIELDS_FIELD_NUMBER

public static final int FIELDS_FIELD_NUMBER
Field Value
TypeDescription
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

TEMPLATE_DISPLAY_NAME_FIELD_NUMBER

public static final int TEMPLATE_DISPLAY_NAME_FIELD_NUMBER
Field Value
TypeDescription
int

TEMPLATE_FIELD_NUMBER

public static final int TEMPLATE_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Tag getDefaultInstance()
Returns
TypeDescription
Tag

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static Tag.Builder newBuilder()
Returns
TypeDescription
Tag.Builder

newBuilder(Tag prototype)

public static Tag.Builder newBuilder(Tag prototype)
Parameter
NameDescription
prototypeTag
Returns
TypeDescription
Tag.Builder

parseDelimitedFrom(InputStream input)

public static Tag parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Tag
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Tag parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Tag
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Tag parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Tag
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Tag parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Tag
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Tag parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Tag
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Tag parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Tag
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Tag parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Tag
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Tag parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Tag
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static Tag parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Tag
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Tag parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Tag
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Tag parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Tag
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Tag parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Tag
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<Tag> parser()
Returns
TypeDescription
Parser<Tag>

Methods

containsFields(String key)

public boolean containsFields(String key)

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.

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

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getColumn()

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

string column = 4;

Returns
TypeDescription
String

The column.

getColumnBytes()

public ByteString getColumnBytes()

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.

string column = 4;

Returns
TypeDescription
ByteString

The bytes for column.

getDefaultInstanceForType()

public Tag getDefaultInstanceForType()
Returns
TypeDescription
Tag

getFields()

public Map<String,TagField> getFields()

Use #getFieldsMap() instead.

Returns
TypeDescription
Map<String,TagField>

getFieldsCount()

public int getFieldsCount()

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.

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

Returns
TypeDescription
int

getFieldsMap()

public Map<String,TagField> getFieldsMap()

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.

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

Returns
TypeDescription
Map<String,TagField>

getFieldsOrDefault(String key, TagField defaultValue)

public TagField getFieldsOrDefault(String key, TagField defaultValue)

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.

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

Parameters
NameDescription
keyString
defaultValueTagField
Returns
TypeDescription
TagField

getFieldsOrThrow(String key)

public TagField getFieldsOrThrow(String key)

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.

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

Parameter
NameDescription
keyString
Returns
TypeDescription
TagField

getName()

public String getName()

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.

string name = 1;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

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.

string name = 1;

Returns
TypeDescription
ByteString

The bytes for name.

getParserForType()

public Parser<Tag> getParserForType()
Returns
TypeDescription
Parser<Tag>
Overrides

getScopeCase()

public Tag.ScopeCase getScopeCase()
Returns
TypeDescription
Tag.ScopeCase

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getTemplate()

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

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

Returns
TypeDescription
String

The template.

getTemplateBytes()

public ByteString getTemplateBytes()

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.

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

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for templateDisplayName.

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

hasColumn()

public boolean hasColumn()

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.

string column = 4;

Returns
TypeDescription
boolean

Whether the column field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public Tag.Builder newBuilderForType()
Returns
TypeDescription
Tag.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Tag.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Tag.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public Tag.Builder toBuilder()
Returns
TypeDescription
Tag.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides Exceptions
TypeDescription
IOException