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.v1beta1.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, which can have one or more typed fields.
 The template is used to create and attach the tag 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. See, for example,
 the [TagTemplate
 User](https://cloud.google.com/data-catalog/docs/how-to/template-user) role,
 which includes permission to use the tag template to tag resources.
 
Protobuf type google.cloud.datacatalog.v1beta1.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. 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 [(.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. 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 [(.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. 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 [(.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. 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 [(.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. 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 [(.google.api.field_behavior) = IDENTIFIER];
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • getDisplayName

      public String getDisplayName()
       The display name for this template. Defaults to an empty string.
       
      string display_name = 2;
      Specified by:
      getDisplayName in interface TagTemplateOrBuilder
      Returns:
      The displayName.
    • getDisplayNameBytes

      public com.google.protobuf.ByteString getDisplayNameBytes()
       The display name for this template. Defaults to an empty string.
       
      string display_name = 2;
      Specified by:
      getDisplayNameBytes in interface TagTemplateOrBuilder
      Returns:
      The bytes for displayName.
    • setDisplayName

      public TagTemplate.Builder setDisplayName(String value)
       The display name for this template. Defaults to an empty string.
       
      string display_name = 2;
      Parameters:
      value - The displayName to set.
      Returns:
      This builder for chaining.
    • clearDisplayName

      public TagTemplate.Builder clearDisplayName()
       The display name for this template. Defaults to an empty string.
       
      string display_name = 2;
      Returns:
      This builder for chaining.
    • setDisplayNameBytes

      public TagTemplate.Builder setDisplayNameBytes(com.google.protobuf.ByteString value)
       The display name for this template. Defaults to an empty string.
       
      string display_name = 2;
      Parameters:
      value - The bytes for displayName to set.
      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. 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];
      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. 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];
      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. 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];
      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. 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];
      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. 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];
      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. 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];
    • 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. 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];
    • 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. 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];
    • 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. 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];
    • getDataplexTransferStatusValue

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

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

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

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

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