public static final class Tag.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Tag.Builder> 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](https://cloud.google.com/data-catalog/docs/concepts/iam) for information on the permissions needed to create or view tags.Protobuf type
google.cloud.datacatalog.v1beta1.Tag| Modifier and Type | Method and Description |
|---|---|
Tag.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
Tag |
build() |
Tag |
buildPartial() |
Tag.Builder |
clear() |
Tag.Builder |
clearColumn()
Resources like Entry can have schemas associated with them.
|
Tag.Builder |
clearField(com.google.protobuf.Descriptors.FieldDescriptor field) |
Tag.Builder |
clearFields() |
Tag.Builder |
clearName()
Identifier.
|
Tag.Builder |
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) |
Tag.Builder |
clearScope() |
Tag.Builder |
clearTemplate()
Required.
|
Tag.Builder |
clearTemplateDisplayName()
Output only.
|
Tag.Builder |
clone() |
boolean |
containsFields(String key)
Required.
|
String |
getColumn()
Resources like Entry can have schemas associated with them.
|
com.google.protobuf.ByteString |
getColumnBytes()
Resources like Entry can have schemas associated with them.
|
Tag |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
Map<String,TagField> |
getFields()
Deprecated.
|
int |
getFieldsCount()
Required.
|
Map<String,TagField> |
getFieldsMap()
Required.
|
TagField |
getFieldsOrDefault(String key,
TagField defaultValue)
Required.
|
TagField |
getFieldsOrThrow(String key)
Required.
|
Map<String,TagField> |
getMutableFields()
Deprecated.
|
String |
getName()
Identifier.
|
com.google.protobuf.ByteString |
getNameBytes()
Identifier.
|
Tag.ScopeCase |
getScopeCase() |
String |
getTemplate()
Required.
|
com.google.protobuf.ByteString |
getTemplateBytes()
Required.
|
String |
getTemplateDisplayName()
Output only.
|
com.google.protobuf.ByteString |
getTemplateDisplayNameBytes()
Output only.
|
boolean |
hasColumn()
Resources like Entry can have schemas associated with them.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
protected com.google.protobuf.MapFieldReflectionAccessor |
internalGetMapFieldReflection(int number) |
protected com.google.protobuf.MapFieldReflectionAccessor |
internalGetMutableMapFieldReflection(int number) |
boolean |
isInitialized() |
Tag.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
Tag.Builder |
mergeFrom(com.google.protobuf.Message other) |
Tag.Builder |
mergeFrom(Tag other) |
Tag.Builder |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
Tag.Builder |
putAllFields(Map<String,TagField> values)
Required.
|
Tag.Builder |
putFields(String key,
TagField value)
Required.
|
TagField.Builder |
putFieldsBuilderIfAbsent(String key)
Required.
|
Tag.Builder |
removeFields(String key)
Required.
|
Tag.Builder |
setColumn(String value)
Resources like Entry can have schemas associated with them.
|
Tag.Builder |
setColumnBytes(com.google.protobuf.ByteString value)
Resources like Entry can have schemas associated with them.
|
Tag.Builder |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
Tag.Builder |
setName(String value)
Identifier.
|
Tag.Builder |
setNameBytes(com.google.protobuf.ByteString value)
Identifier.
|
Tag.Builder |
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
Object value) |
Tag.Builder |
setTemplate(String value)
Required.
|
Tag.Builder |
setTemplateBytes(com.google.protobuf.ByteString value)
Required.
|
Tag.Builder |
setTemplateDisplayName(String value)
Output only.
|
Tag.Builder |
setTemplateDisplayNameBytes(com.google.protobuf.ByteString value)
Output only.
|
Tag.Builder |
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessageV3.Builder<Tag.Builder>protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
internalGetMutableMapFieldReflection in class com.google.protobuf.GeneratedMessageV3.Builder<Tag.Builder>protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<Tag.Builder>public Tag.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<Tag.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<Tag.Builder>public Tag getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic Tag build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic Tag buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic Tag.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<Tag.Builder>public Tag.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
setField in interface com.google.protobuf.Message.BuildersetField in class com.google.protobuf.GeneratedMessageV3.Builder<Tag.Builder>public Tag.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<Tag.Builder>public Tag.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Tag.Builder>public Tag.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField in interface com.google.protobuf.Message.BuildersetRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Tag.Builder>public Tag.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
addRepeatedField in interface com.google.protobuf.Message.BuilderaddRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Tag.Builder>public Tag.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<Tag.Builder>public Tag.Builder mergeFrom(Tag other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<Tag.Builder>public Tag.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<Tag.Builder>IOExceptionpublic Tag.ScopeCase getScopeCase()
getScopeCase in interface TagOrBuilderpublic Tag.Builder clearScope()
public 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];getName in interface TagOrBuilderpublic com.google.protobuf.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];getNameBytes in interface TagOrBuilderpublic Tag.Builder setName(String value)
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];value - The name to set.public Tag.Builder clearName()
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];public Tag.Builder setNameBytes(com.google.protobuf.ByteString value)
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];value - The bytes for name to set.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];getTemplate in interface TagOrBuilderpublic com.google.protobuf.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];getTemplateBytes in interface TagOrBuilderpublic Tag.Builder setTemplate(String value)
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];value - The template to set.public Tag.Builder clearTemplate()
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];public Tag.Builder setTemplateBytes(com.google.protobuf.ByteString value)
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];value - The bytes for template to set.public String getTemplateDisplayName()
Output only. The display name of the tag template.
string template_display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];getTemplateDisplayName in interface TagOrBuilderpublic com.google.protobuf.ByteString getTemplateDisplayNameBytes()
Output only. The display name of the tag template.
string template_display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];getTemplateDisplayNameBytes in interface TagOrBuilderpublic Tag.Builder setTemplateDisplayName(String value)
Output only. The display name of the tag template.
string template_display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];value - The templateDisplayName to set.public Tag.Builder clearTemplateDisplayName()
Output only. The display name of the tag template.
string template_display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];public Tag.Builder setTemplateDisplayNameBytes(com.google.protobuf.ByteString value)
Output only. The display name of the tag template.
string template_display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];value - The bytes for templateDisplayName to set.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;hasColumn in interface TagOrBuilderpublic 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;getColumn in interface TagOrBuilderpublic com.google.protobuf.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;getColumnBytes in interface TagOrBuilderpublic Tag.Builder setColumn(String value)
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;value - The column to set.public Tag.Builder clearColumn()
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;public Tag.Builder setColumnBytes(com.google.protobuf.ByteString value)
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;value - The bytes for column to set.public int getFieldsCount()
TagOrBuilderRequired. 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];
getFieldsCount in interface TagOrBuilderpublic 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];
containsFields in interface TagOrBuilder@Deprecated public Map<String,TagField> getFields()
getFieldsMap() instead.getFields in interface TagOrBuilderpublic 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];
getFieldsMap in interface TagOrBuilderpublic 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];
getFieldsOrDefault in interface TagOrBuilderpublic 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];
getFieldsOrThrow in interface TagOrBuilderpublic Tag.Builder clearFields()
public Tag.Builder removeFields(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];
@Deprecated public Map<String,TagField> getMutableFields()
public Tag.Builder putFields(String key, TagField value)
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];
public Tag.Builder putAllFields(Map<String,TagField> values)
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];
public TagField.Builder putFieldsBuilderIfAbsent(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];
public final Tag.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Tag.Builder>public final Tag.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Tag.Builder>Copyright © 2025 Google LLC. All rights reserved.