public static final class Tag.Builder extends GeneratedMessageV3.Builder<Tag.Builder> 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](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.v1.Tag
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public Tag.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
build()
Returns
buildPartial()
public Tag buildPartial()
Returns
clear()
public Tag.Builder clear()
Returns
Overrides
clearColumn()
public Tag.Builder clearColumn()
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
clearField(Descriptors.FieldDescriptor field)
public Tag.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Returns
Overrides
clearFields()
public Tag.Builder clearFields()
Returns
clearName()
public Tag.Builder clearName()
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
clearOneof(Descriptors.OneofDescriptor oneof)
public Tag.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Returns
Overrides
clearScope()
public Tag.Builder clearScope()
Returns
clearTemplate()
public Tag.Builder clearTemplate()
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
clearTemplateDisplayName()
public Tag.Builder clearTemplateDisplayName()
Output only. The display name of the tag template.
string template_display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns
clone()
public Tag.Builder clone()
Returns
Overrides
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
Returns
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
Type | Description |
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
getDefaultInstanceForType()
public Tag getDefaultInstanceForType()
Returns
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns
Overrides
getFields()
public Map<String,TagField> getFields()
Returns
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
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
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
Returns
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
Returns
getMutableFields()
public Map<String,TagField> getMutableFields()
Use alternate mutation accessors instead.
Returns
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
Type | Description |
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
getScopeCase()
public Tag.ScopeCase getScopeCase()
Returns
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
Type | Description |
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
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 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
Type | Description |
boolean | Whether the column field is set.
|
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
internalGetMapField(int number)
protected MapField internalGetMapField(int number)
Parameter
Returns
Overrides
internalGetMutableMapField(int number)
protected MapField internalGetMutableMapField(int number)
Parameter
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
mergeFrom(Tag other)
public Tag.Builder mergeFrom(Tag other)
Parameter
Returns
public Tag.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Overrides
Exceptions
mergeFrom(Message other)
public Tag.Builder mergeFrom(Message other)
Parameter
Returns
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final Tag.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides
putAllFields(Map<String,TagField> values)
public Tag.Builder putAllFields(Map<String,TagField> values)
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
Returns
putFields(String key, TagField value)
public Tag.Builder putFields(String key, TagField value)
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
Returns
removeFields(String key)
public Tag.Builder removeFields(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
Returns
setColumn(String value)
public Tag.Builder setColumn(String value)
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;
Parameter
Name | Description |
value | String
The column to set.
|
Returns
setColumnBytes(ByteString value)
public Tag.Builder setColumnBytes(ByteString value)
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;
Parameter
Name | Description |
value | ByteString
The bytes for column to set.
|
Returns
setField(Descriptors.FieldDescriptor field, Object value)
public Tag.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
setName(String value)
public Tag.Builder setName(String value)
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;
Parameter
Name | Description |
value | String
The name to set.
|
Returns
setNameBytes(ByteString value)
public Tag.Builder setNameBytes(ByteString value)
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;
Parameter
Name | Description |
value | ByteString
The bytes for name to set.
|
Returns
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public Tag.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Returns
Overrides
setTemplate(String value)
public Tag.Builder setTemplate(String value)
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];
Parameter
Name | Description |
value | String
The template to set.
|
Returns
setTemplateBytes(ByteString value)
public Tag.Builder setTemplateBytes(ByteString value)
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];
Parameter
Name | Description |
value | ByteString
The bytes for template to set.
|
Returns
setTemplateDisplayName(String value)
public 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];
Parameter
Name | Description |
value | String
The templateDisplayName to set.
|
Returns
setTemplateDisplayNameBytes(ByteString value)
public Tag.Builder setTemplateDisplayNameBytes(ByteString value)
Output only. The display name of the tag template.
string template_display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter
Name | Description |
value | ByteString
The bytes for templateDisplayName to set.
|
Returns
setUnknownFields(UnknownFieldSet unknownFields)
public final Tag.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides