Class TagTemplate.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<TagTemplate.Builder>
com.google.cloud.datacatalog.v1.TagTemplate.Builder
All Implemented Interfaces:
TagTemplateOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
TagTemplate

public static final class TagTemplate.Builder extends com.google.protobuf.GeneratedMessage.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 Google Cloud
 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
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<TagTemplate.Builder>
    • internalGetMutableMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
      Overrides:
      internalGetMutableMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<TagTemplate.Builder>
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<TagTemplate.Builder>
    • clear

      public TagTemplate.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<TagTemplate.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<TagTemplate.Builder>
    • getDefaultInstanceForType

      public TagTemplate getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public TagTemplate build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public TagTemplate buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public TagTemplate.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<TagTemplate.Builder>
    • mergeFrom

      public TagTemplate.Builder mergeFrom(TagTemplate other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<TagTemplate.Builder>
    • mergeFrom

      public TagTemplate.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<TagTemplate.Builder>
      Throws:
      IOException
    • getName

      public String getName()
       Identifier. 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 [(.google.api.field_behavior) = IDENTIFIER];
      Specified by:
      getName in interface TagTemplateOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Identifier. 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 [(.google.api.field_behavior) = IDENTIFIER];
      Specified by:
      getNameBytes in interface TagTemplateOrBuilder
      Returns:
      The bytes for name.
    • setName

      public TagTemplate.Builder setName(String value)
       Identifier. 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 [(.google.api.field_behavior) = IDENTIFIER];
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

      public TagTemplate.Builder clearName()
       Identifier. 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 [(.google.api.field_behavior) = IDENTIFIER];
      Returns:
      This builder for chaining.
    • setNameBytes

      public TagTemplate.Builder setNameBytes(com.google.protobuf.ByteString value)
       Identifier. 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 [(.google.api.field_behavior) = IDENTIFIER];
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • 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;
      Specified by:
      getDisplayName in interface TagTemplateOrBuilder
      Returns:
      The displayName.
    • getDisplayNameBytes

      public com.google.protobuf.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;
      Specified by:
      getDisplayNameBytes in interface TagTemplateOrBuilder
      Returns:
      The bytes for displayName.
    • setDisplayName

      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;
      Parameters:
      value - The displayName to set.
      Returns:
      This builder for chaining.
    • 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:
      This builder for chaining.
    • setDisplayNameBytes

      public TagTemplate.Builder setDisplayNameBytes(com.google.protobuf.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;
      Parameters:
      value - The bytes for displayName to set.
      Returns:
      This builder for chaining.
    • 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][google.cloud.datacatalog.v1.DataCatalog.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;
      Specified by:
      getIsPubliclyReadable in interface TagTemplateOrBuilder
      Returns:
      The isPubliclyReadable.
    • setIsPubliclyReadable

      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][google.cloud.datacatalog.v1.DataCatalog.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;
      Parameters:
      value - The isPubliclyReadable to set.
      Returns:
      This builder for chaining.
    • 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][google.cloud.datacatalog.v1.DataCatalog.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:
      This builder for chaining.
    • getFieldsCount

      public int getFieldsCount()
      Description copied from interface: TagTemplateOrBuilder
       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];
      Specified by:
      getFieldsCount in interface TagTemplateOrBuilder
    • containsFields

      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];
      Specified by:
      containsFields in interface TagTemplateOrBuilder
    • getFields

      @Deprecated public Map<String,TagTemplateField> getFields()
      Deprecated.
      Use getFieldsMap() instead.
      Specified by:
      getFields in interface TagTemplateOrBuilder
    • 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];
      Specified by:
      getFieldsMap in interface TagTemplateOrBuilder
    • getFieldsOrDefault

      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];
      Specified by:
      getFieldsOrDefault in interface TagTemplateOrBuilder
    • getFieldsOrThrow

      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];
      Specified by:
      getFieldsOrThrow in interface TagTemplateOrBuilder
    • clearFields

      public TagTemplate.Builder clearFields()
    • removeFields

      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];
    • getMutableFields

      @Deprecated public Map<String,TagTemplateField> getMutableFields()
      Deprecated.
      Use alternate mutation accessors instead.
    • putFields

      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];
    • putAllFields

      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];
    • putFieldsBuilderIfAbsent

      public TagTemplateField.Builder putFieldsBuilderIfAbsent(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];
    • getDataplexTransferStatusValue

      public int getDataplexTransferStatusValue()
       Optional. Transfer status of the TagTemplate
       
      .google.cloud.datacatalog.v1.TagTemplate.DataplexTransferStatus dataplex_transfer_status = 7 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getDataplexTransferStatusValue in interface TagTemplateOrBuilder
      Returns:
      The enum numeric value on the wire for dataplexTransferStatus.
    • setDataplexTransferStatusValue

      public TagTemplate.Builder setDataplexTransferStatusValue(int value)
       Optional. Transfer status of the TagTemplate
       
      .google.cloud.datacatalog.v1.TagTemplate.DataplexTransferStatus dataplex_transfer_status = 7 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The enum numeric value on the wire for dataplexTransferStatus to set.
      Returns:
      This builder for chaining.
    • getDataplexTransferStatus

      public TagTemplate.DataplexTransferStatus getDataplexTransferStatus()
       Optional. Transfer status of the TagTemplate
       
      .google.cloud.datacatalog.v1.TagTemplate.DataplexTransferStatus dataplex_transfer_status = 7 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getDataplexTransferStatus in interface TagTemplateOrBuilder
      Returns:
      The dataplexTransferStatus.
    • setDataplexTransferStatus

      public TagTemplate.Builder setDataplexTransferStatus(TagTemplate.DataplexTransferStatus value)
       Optional. Transfer status of the TagTemplate
       
      .google.cloud.datacatalog.v1.TagTemplate.DataplexTransferStatus dataplex_transfer_status = 7 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The dataplexTransferStatus to set.
      Returns:
      This builder for chaining.
    • clearDataplexTransferStatus

      public TagTemplate.Builder clearDataplexTransferStatus()
       Optional. Transfer status of the TagTemplate
       
      .google.cloud.datacatalog.v1.TagTemplate.DataplexTransferStatus dataplex_transfer_status = 7 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.