Class TagTemplate

public final class TagTemplate extends GeneratedMessageV3 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]
 (https://cloud.google.com/iam/docs/understanding-roles#data-catalog-roles)
 provide permissions to create, edit, and use the template. For example,
 see the [TagTemplate User]
 (https://cloud.google.com/data-catalog/docs/how-to/template-user) role
 that includes a permission to use the tag template to tag resources.

Protobuf type google.cloud.datacatalog.v1.TagTemplate

Fields

DISPLAY_NAME_FIELD_NUMBER

public static final int DISPLAY_NAME_FIELD_NUMBER
Field Value
TypeDescription
int

FIELDS_FIELD_NUMBER

public static final int FIELDS_FIELD_NUMBER
Field Value
TypeDescription
int

IS_PUBLICLY_READABLE_FIELD_NUMBER

public static final int IS_PUBLICLY_READABLE_FIELD_NUMBER
Field Value
TypeDescription
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

Methods

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

equals(Object obj)

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

getDefaultInstance()

public static TagTemplate getDefaultInstance()
Returns
TypeDescription
TagTemplate

getDefaultInstanceForType()

public TagTemplate getDefaultInstanceForType()
Returns
TypeDescription
TagTemplate

getDescriptor()

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

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 this is a public tag template.
 Every user has view access to a *public* tag template by default.
 This means that:
   * Every user can use this tag template to tag an entry.
   * If an entry is tagged using the tag template, the tag is always
     shown in the response to ``ListTags`` called on the entry.
   * To get the template using the GetTagTemplate method, you
     need view access either on the project or the organization the tag
     template resides in but no other permission is needed.
   * Operations on the tag template other than viewing (for example,
     editing IAM policies) follow standard IAM structures.
 Tags created with a public tag template are referred to as public tags.
 You can search for a public tag by value with a
 simple search query instead of using a ``tag:`` predicate.
 Public tag templates may not appear in search results depending on scope,
 see:
 [include_public_tag_templates][google.cloud.datacatalog.v1.SearchCatalogRequest.Scope.include_public_tag_templates]
 Note: If an [IAM domain
 restriction](https://cloud.google.com/resource-manager/docs/organization-policy/restricting-domains)
 is configured in the tag template's location, the public access will not be
 enabled but the simple search for tag values will still work.

bool is_publicly_readable = 5;

Returns
TypeDescription
boolean

The isPubliclyReadable.

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.

getParserForType()

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

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

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

newBuilder()

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

newBuilder(TagTemplate prototype)

public static TagTemplate.Builder newBuilder(TagTemplate prototype)
Parameter
NameDescription
prototypeTagTemplate
Returns
TypeDescription
TagTemplate.Builder

newBuilderForType()

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

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

toBuilder()

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

writeTo(CodedOutputStream output)

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