Class TagTemplate.Builder (1.9.0)

public static final class TagTemplate.Builder extends GeneratedMessageV3.Builder<TagTemplate.Builder> implements TagTemplateOrBuilder

A tag template defines a tag that can have one or more typed fields. The template is used to create tags that are attached to GCP resources. Tag template roles provide permissions to create, edit, and use the template. For example, see the TagTemplate User role that includes a permission to use the tag template to tag resources.

Protobuf type google.cloud.datacatalog.v1.TagTemplate

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public TagTemplate.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
TagTemplate.Builder
Overrides

build()

public TagTemplate build()
Returns
TypeDescription
TagTemplate

buildPartial()

public TagTemplate buildPartial()
Returns
TypeDescription
TagTemplate

clear()

public TagTemplate.Builder clear()
Returns
TypeDescription
TagTemplate.Builder
Overrides

clearDisplayName()

public TagTemplate.Builder clearDisplayName()

Display name for this template. Defaults to an empty string. The name must contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces ( ), and can't start or end with spaces. The maximum length is 200 characters.

string display_name = 2;

Returns
TypeDescription
TagTemplate.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public TagTemplate.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
TagTemplate.Builder
Overrides

clearFields()

public TagTemplate.Builder clearFields()
Returns
TypeDescription
TagTemplate.Builder

clearIsPubliclyReadable()

public TagTemplate.Builder clearIsPubliclyReadable()

Indicates whether tags created with this template are public. Public tags do not require tag template access to appear in ListTags API response. Additionally, you can search for a public tag by value with a simple search query in addition to using a tag: predicate.

bool is_publicly_readable = 5;

Returns
TypeDescription
TagTemplate.Builder

This builder for chaining.

clearName()

public TagTemplate.Builder clearName()

The resource name of the tag template in URL format. Note: The tag template itself and its child resources might not be stored in the location specified in its name.

string name = 1;

Returns
TypeDescription
TagTemplate.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public TagTemplate.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
TagTemplate.Builder
Overrides

clone()

public TagTemplate.Builder clone()
Returns
TypeDescription
TagTemplate.Builder
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. The map must contain at least one field and at most 500 fields. The keys to this map are tag template field IDs. The IDs have the following limitations:

  • Can contain uppercase and lowercase letters, numbers (0-9) and underscores (_).
  • Must be at least 1 character and at most 64 characters long.
  • Must start with a letter or underscore.

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

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

getDefaultInstanceForType()

public TagTemplate getDefaultInstanceForType()
Returns
TypeDescription
TagTemplate

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getDisplayName()

public String getDisplayName()

Display name for this template. Defaults to an empty string. The name must contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces ( ), and can't start or end with spaces. The maximum length is 200 characters.

string display_name = 2;

Returns
TypeDescription
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

Display name for this template. Defaults to an empty string. The name must contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces ( ), and can't start or end with spaces. The maximum length is 200 characters.

string display_name = 2;

Returns
TypeDescription
ByteString

The bytes for displayName.

getFields()

public Map<String,TagTemplateField> getFields()

Use #getFieldsMap() instead.

Returns
TypeDescription
Map<String,TagTemplateField>

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. The map must contain at least one field and at most 500 fields. The keys to this map are tag template field IDs. The IDs have the following limitations:

  • Can contain uppercase and lowercase letters, numbers (0-9) and underscores (_).
  • Must be at least 1 character and at most 64 characters long.
  • Must start with a letter or underscore.

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

Returns
TypeDescription
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. The map must contain at least one field and at most 500 fields. The keys to this map are tag template field IDs. The IDs have the following limitations:

  • Can contain uppercase and lowercase letters, numbers (0-9) and underscores (_).
  • Must be at least 1 character and at most 64 characters long.
  • Must start with a letter or underscore.

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

Returns
TypeDescription
Map<String,TagTemplateField>

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. The map must contain at least one field and at most 500 fields. The keys to this map are tag template field IDs. The IDs have the following limitations:

  • Can contain uppercase and lowercase letters, numbers (0-9) and underscores (_).
  • Must be at least 1 character and at most 64 characters long.
  • Must start with a letter or underscore.

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

Parameters
NameDescription
keyString
defaultValueTagTemplateField
Returns
TypeDescription
TagTemplateField

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. The map must contain at least one field and at most 500 fields. The keys to this map are tag template field IDs. The IDs have the following limitations:

  • Can contain uppercase and lowercase letters, numbers (0-9) and underscores (_).
  • Must be at least 1 character and at most 64 characters long.
  • Must start with a letter or underscore.

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

Parameter
NameDescription
keyString
Returns
TypeDescription
TagTemplateField

getIsPubliclyReadable()

public boolean getIsPubliclyReadable()

Indicates whether tags created with this template are public. Public tags do not require tag template access to appear in ListTags API response. Additionally, you can search for a public tag by value with a simple search query in addition to using a tag: predicate.

bool is_publicly_readable = 5;

Returns
TypeDescription
boolean

The isPubliclyReadable.

getMutableFields()

public Map<String,TagTemplateField> getMutableFields()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,TagTemplateField>

getName()

public String getName()

The resource name of the tag template in URL format. Note: The tag template itself and its child resources 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 template in URL format. Note: The tag template itself and its child resources might not be stored in the location specified in its name.

string name = 1;

Returns
TypeDescription
ByteString

The bytes for name.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

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

internalGetMutableMapField(int number)

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

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(TagTemplate other)

public TagTemplate.Builder mergeFrom(TagTemplate other)
Parameter
NameDescription
otherTagTemplate
Returns
TypeDescription
TagTemplate.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public TagTemplate.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TagTemplate.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public TagTemplate.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
TagTemplate.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final TagTemplate.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
TagTemplate.Builder
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. The map must contain at least one field and at most 500 fields. The keys to this map are tag template field IDs. The IDs have the following limitations:

  • Can contain uppercase and lowercase letters, numbers (0-9) and underscores (_).
  • Must be at least 1 character and at most 64 characters long.
  • Must start with a letter or underscore.

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

Parameter
NameDescription
valuesMap<String,TagTemplateField>
Returns
TypeDescription
TagTemplate.Builder

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. The map must contain at least one field and at most 500 fields. The keys to this map are tag template field IDs. The IDs have the following limitations:

  • Can contain uppercase and lowercase letters, numbers (0-9) and underscores (_).
  • Must be at least 1 character and at most 64 characters long.
  • Must start with a letter or underscore.

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

Parameters
NameDescription
keyString
valueTagTemplateField
Returns
TypeDescription
TagTemplate.Builder

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. The map must contain at least one field and at most 500 fields. The keys to this map are tag template field IDs. The IDs have the following limitations:

  • Can contain uppercase and lowercase letters, numbers (0-9) and underscores (_).
  • Must be at least 1 character and at most 64 characters long.
  • Must start with a letter or underscore.

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

Parameter
NameDescription
keyString
Returns
TypeDescription
TagTemplate.Builder

setDisplayName(String value)

public TagTemplate.Builder setDisplayName(String value)

Display name for this template. Defaults to an empty string. The name must contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces ( ), and can't start or end with spaces. The maximum length is 200 characters.

string display_name = 2;

Parameter
NameDescription
valueString

The displayName to set.

Returns
TypeDescription
TagTemplate.Builder

This builder for chaining.

setDisplayNameBytes(ByteString value)

public TagTemplate.Builder setDisplayNameBytes(ByteString value)

Display name for this template. Defaults to an empty string. The name must contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces ( ), and can't start or end with spaces. The maximum length is 200 characters.

string display_name = 2;

Parameter
NameDescription
valueByteString

The bytes for displayName to set.

Returns
TypeDescription
TagTemplate.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public TagTemplate.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
TagTemplate.Builder
Overrides

setIsPubliclyReadable(boolean value)

public TagTemplate.Builder setIsPubliclyReadable(boolean value)

Indicates whether tags created with this template are public. Public tags do not require tag template access to appear in ListTags API response. Additionally, you can search for a public tag by value with a simple search query in addition to using a tag: predicate.

bool is_publicly_readable = 5;

Parameter
NameDescription
valueboolean

The isPubliclyReadable to set.

Returns
TypeDescription
TagTemplate.Builder

This builder for chaining.

setName(String value)

public TagTemplate.Builder setName(String value)

The resource name of the tag template in URL format. Note: The tag template itself and its child resources might not be stored in the location specified in its name.

string name = 1;

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
TagTemplate.Builder

This builder for chaining.

setNameBytes(ByteString value)

public TagTemplate.Builder setNameBytes(ByteString value)

The resource name of the tag template in URL format. Note: The tag template itself and its child resources might not be stored in the location specified in its name.

string name = 1;

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
TagTemplate.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public TagTemplate.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
TagTemplate.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final TagTemplate.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
TagTemplate.Builder
Overrides