public static final class TagTemplate.Builder extends GeneratedMessageV3.Builder<TagTemplate.Builder> implements TagTemplateOrBuilder
A tag template defines a tag, which can have one or more typed fields.
The template is used to create and attach the tag to GCP resources.
Tag template
roles
provide permissions to create, edit, and use the template. See, for example,
the TagTemplate
User role,
which includes permission to use the tag template to tag resources.
Protobuf type google.cloud.datacatalog.v1beta1.TagTemplate
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public TagTemplate.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Overrides
build()
public TagTemplate build()
buildPartial()
public TagTemplate buildPartial()
clear()
public TagTemplate.Builder clear()
Overrides
clearDisplayName()
public TagTemplate.Builder clearDisplayName()
The display name for this template. Defaults to an empty string.
string display_name = 2;
clearField(Descriptors.FieldDescriptor field)
public TagTemplate.Builder clearField(Descriptors.FieldDescriptor field)
Overrides
clearFields()
public TagTemplate.Builder clearFields()
clearName()
public TagTemplate.Builder clearName()
The resource name of the tag template in URL format. Example:
- projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
Note that this TagTemplate and its child resources may not actually be
stored in the location in this name.
string name = 1;
clearOneof(Descriptors.OneofDescriptor oneof)
public TagTemplate.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Overrides
clone()
public TagTemplate.Builder clone()
Overrides
containsFields(String key)
public boolean containsFields(String key)
Required. Map of tag template field IDs to the settings for the field.
This map is an exhaustive list of the allowed fields. This map must contain
at least one field and at most 500 fields.
The keys to this map are tag template field IDs. Field IDs can contain
letters (both uppercase and lowercase), numbers (0-9) and underscores (_).
Field IDs must be at least 1 character long and at most
64 characters long. Field IDs must start with a letter or underscore.
map<string, .google.cloud.datacatalog.v1beta1.TagTemplateField> fields = 3 [(.google.api.field_behavior) = REQUIRED];
Parameter |
---|
Name | Description |
key | String
|
getDefaultInstanceForType()
public TagTemplate getDefaultInstanceForType()
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Overrides
getDisplayName()
public String getDisplayName()
The display name for this template. Defaults to an empty string.
string display_name = 2;
Returns |
---|
Type | Description |
String | The displayName.
|
getDisplayNameBytes()
public ByteString getDisplayNameBytes()
The display name for this template. Defaults to an empty string.
string display_name = 2;
Returns |
---|
Type | Description |
ByteString | The bytes for displayName.
|
getFields()
public Map<String,TagTemplateField> getFields()
getFieldsCount()
public int getFieldsCount()
Required. Map of tag template field IDs to the settings for the field.
This map is an exhaustive list of the allowed fields. This map must contain
at least one field and at most 500 fields.
The keys to this map are tag template field IDs. Field IDs can contain
letters (both uppercase and lowercase), numbers (0-9) and underscores (_).
Field IDs must be at least 1 character long and at most
64 characters long. Field IDs must start with a letter or underscore.
map<string, .google.cloud.datacatalog.v1beta1.TagTemplateField> fields = 3 [(.google.api.field_behavior) = REQUIRED];
Returns |
---|
Type | Description |
int | |
getFieldsMap()
public Map<String,TagTemplateField> getFieldsMap()
Required. Map of tag template field IDs to the settings for the field.
This map is an exhaustive list of the allowed fields. This map must contain
at least one field and at most 500 fields.
The keys to this map are tag template field IDs. Field IDs can contain
letters (both uppercase and lowercase), numbers (0-9) and underscores (_).
Field IDs must be at least 1 character long and at most
64 characters long. Field IDs must start with a letter or underscore.
map<string, .google.cloud.datacatalog.v1beta1.TagTemplateField> fields = 3 [(.google.api.field_behavior) = REQUIRED];
getFieldsOrDefault(String key, TagTemplateField defaultValue)
public TagTemplateField getFieldsOrDefault(String key, TagTemplateField defaultValue)
Required. Map of tag template field IDs to the settings for the field.
This map is an exhaustive list of the allowed fields. This map must contain
at least one field and at most 500 fields.
The keys to this map are tag template field IDs. Field IDs can contain
letters (both uppercase and lowercase), numbers (0-9) and underscores (_).
Field IDs must be at least 1 character long and at most
64 characters long. Field IDs must start with a letter or underscore.
map<string, .google.cloud.datacatalog.v1beta1.TagTemplateField> fields = 3 [(.google.api.field_behavior) = REQUIRED];
getFieldsOrThrow(String key)
public TagTemplateField getFieldsOrThrow(String key)
Required. Map of tag template field IDs to the settings for the field.
This map is an exhaustive list of the allowed fields. This map must contain
at least one field and at most 500 fields.
The keys to this map are tag template field IDs. Field IDs can contain
letters (both uppercase and lowercase), numbers (0-9) and underscores (_).
Field IDs must be at least 1 character long and at most
64 characters long. Field IDs must start with a letter or underscore.
map<string, .google.cloud.datacatalog.v1beta1.TagTemplateField> fields = 3 [(.google.api.field_behavior) = REQUIRED];
Parameter |
---|
Name | Description |
key | String
|
getMutableFields()
public Map<String,TagTemplateField> getMutableFields()
Use alternate mutation accessors instead.
getName()
The resource name of the tag template in URL format. Example:
- projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
Note that this TagTemplate and its child resources 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 template in URL format. Example:
- projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
Note that this TagTemplate and its child resources may not actually be
stored in the location in this name.
string name = 1;
Returns |
---|
Type | Description |
ByteString | The bytes for name.
|
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
internalGetMapField(int number)
protected MapField internalGetMapField(int number)
Parameter |
---|
Name | Description |
number | int
|
Overrides
internalGetMutableMapField(int number)
protected MapField internalGetMutableMapField(int number)
Parameter |
---|
Name | Description |
number | int
|
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
mergeFrom(TagTemplate other)
public TagTemplate.Builder mergeFrom(TagTemplate other)
public TagTemplate.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Overrides
mergeFrom(Message other)
public TagTemplate.Builder mergeFrom(Message other)
Parameter |
---|
Name | Description |
other | Message
|
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final TagTemplate.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Overrides
putAllFields(Map<String,TagTemplateField> values)
public TagTemplate.Builder putAllFields(Map<String,TagTemplateField> values)
Required. Map of tag template field IDs to the settings for the field.
This map is an exhaustive list of the allowed fields. This map must contain
at least one field and at most 500 fields.
The keys to this map are tag template field IDs. Field IDs can contain
letters (both uppercase and lowercase), numbers (0-9) and underscores (_).
Field IDs must be at least 1 character long and at most
64 characters long. Field IDs must start with a letter or underscore.
map<string, .google.cloud.datacatalog.v1beta1.TagTemplateField> fields = 3 [(.google.api.field_behavior) = REQUIRED];
putFields(String key, TagTemplateField value)
public TagTemplate.Builder putFields(String key, TagTemplateField value)
Required. Map of tag template field IDs to the settings for the field.
This map is an exhaustive list of the allowed fields. This map must contain
at least one field and at most 500 fields.
The keys to this map are tag template field IDs. Field IDs can contain
letters (both uppercase and lowercase), numbers (0-9) and underscores (_).
Field IDs must be at least 1 character long and at most
64 characters long. Field IDs must start with a letter or underscore.
map<string, .google.cloud.datacatalog.v1beta1.TagTemplateField> fields = 3 [(.google.api.field_behavior) = REQUIRED];
removeFields(String key)
public TagTemplate.Builder removeFields(String key)
Required. Map of tag template field IDs to the settings for the field.
This map is an exhaustive list of the allowed fields. This map must contain
at least one field and at most 500 fields.
The keys to this map are tag template field IDs. Field IDs can contain
letters (both uppercase and lowercase), numbers (0-9) and underscores (_).
Field IDs must be at least 1 character long and at most
64 characters long. Field IDs must start with a letter or underscore.
map<string, .google.cloud.datacatalog.v1beta1.TagTemplateField> fields = 3 [(.google.api.field_behavior) = REQUIRED];
Parameter |
---|
Name | Description |
key | String
|
setDisplayName(String value)
public TagTemplate.Builder setDisplayName(String value)
The display name for this template. Defaults to an empty string.
string display_name = 2;
Parameter |
---|
Name | Description |
value | String
The displayName to set.
|
setDisplayNameBytes(ByteString value)
public TagTemplate.Builder setDisplayNameBytes(ByteString value)
The display name for this template. Defaults to an empty string.
string display_name = 2;
Parameter |
---|
Name | Description |
value | ByteString
The bytes for displayName to set.
|
setField(Descriptors.FieldDescriptor field, Object value)
public TagTemplate.Builder setField(Descriptors.FieldDescriptor field, Object value)
Overrides
setName(String value)
public TagTemplate.Builder setName(String value)
The resource name of the tag template in URL format. Example:
- projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
Note that this TagTemplate and its child resources may not actually be
stored in the location in this name.
string name = 1;
Parameter |
---|
Name | Description |
value | String
The name to set.
|
setNameBytes(ByteString value)
public TagTemplate.Builder setNameBytes(ByteString value)
The resource name of the tag template in URL format. Example:
- projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
Note that this TagTemplate and its child resources may not actually be
stored in the location in this name.
string name = 1;
Parameter |
---|
Name | Description |
value | ByteString
The bytes for name to set.
|
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public TagTemplate.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final TagTemplate.Builder setUnknownFields(UnknownFieldSet unknownFields)
Overrides