Class Tag.Builder

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

public static final class Tag.Builder extends com.google.protobuf.GeneratedMessage.Builder<Tag.Builder> implements TagOrBuilder
 Tags are used to attach custom metadata to Data Catalog resources. Tags
 conform to the specifications within their tag template.

 See [Data Catalog
 IAM](https://cloud.google.com/data-catalog/docs/concepts/iam) for information
 on the permissions needed to create or view tags.
 
Protobuf type google.cloud.datacatalog.v1beta1.Tag
  • 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<Tag.Builder>
    • internalGetMutableMapFieldReflection

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

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

      public Tag.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<Tag.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<Tag.Builder>
    • getDefaultInstanceForType

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

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

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

      public Tag.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<Tag.Builder>
    • mergeFrom

      public Tag.Builder mergeFrom(Tag other)
    • isInitialized

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

      public Tag.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<Tag.Builder>
      Throws:
      IOException
    • getScopeCase

      public Tag.ScopeCase getScopeCase()
      Specified by:
      getScopeCase in interface TagOrBuilder
    • clearScope

      public Tag.Builder clearScope()
    • getName

      public String getName()
       Identifier. The resource name of the tag in URL format. Example:
      
       * projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}
      
       where `tag_id` is a system-generated identifier.
       Note that this Tag may not actually be stored in the location in this name.
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Specified by:
      getName in interface TagOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Identifier. The resource name of the tag in URL format. Example:
      
       * projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}
      
       where `tag_id` is a system-generated identifier.
       Note that this Tag may not actually be stored in the location in this name.
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Specified by:
      getNameBytes in interface TagOrBuilder
      Returns:
      The bytes for name.
    • setName

      public Tag.Builder setName(String value)
       Identifier. The resource name of the tag in URL format. Example:
      
       * projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}
      
       where `tag_id` is a system-generated identifier.
       Note that this Tag 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 Tag.Builder clearName()
       Identifier. The resource name of the tag in URL format. Example:
      
       * projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}
      
       where `tag_id` is a system-generated identifier.
       Note that this Tag 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 Tag.Builder setNameBytes(com.google.protobuf.ByteString value)
       Identifier. The resource name of the tag in URL format. Example:
      
       * projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}
      
       where `tag_id` is a system-generated identifier.
       Note that this Tag 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.
    • getTemplate

      public String getTemplate()
       Required. The resource name of the tag template that this tag uses.
       Example:
      
       * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
      
       This field cannot be modified after creation.
       
      string template = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getTemplate in interface TagOrBuilder
      Returns:
      The template.
    • getTemplateBytes

      public com.google.protobuf.ByteString getTemplateBytes()
       Required. The resource name of the tag template that this tag uses.
       Example:
      
       * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
      
       This field cannot be modified after creation.
       
      string template = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getTemplateBytes in interface TagOrBuilder
      Returns:
      The bytes for template.
    • setTemplate

      public Tag.Builder setTemplate(String value)
       Required. The resource name of the tag template that this tag uses.
       Example:
      
       * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
      
       This field cannot be modified after creation.
       
      string template = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The template to set.
      Returns:
      This builder for chaining.
    • clearTemplate

      public Tag.Builder clearTemplate()
       Required. The resource name of the tag template that this tag uses.
       Example:
      
       * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
      
       This field cannot be modified after creation.
       
      string template = 2 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • setTemplateBytes

      public Tag.Builder setTemplateBytes(com.google.protobuf.ByteString value)
       Required. The resource name of the tag template that this tag uses.
       Example:
      
       * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
      
       This field cannot be modified after creation.
       
      string template = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The bytes for template to set.
      Returns:
      This builder for chaining.
    • getTemplateDisplayName

      public String getTemplateDisplayName()
       Output only. The display name of the tag template.
       
      string template_display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getTemplateDisplayName in interface TagOrBuilder
      Returns:
      The templateDisplayName.
    • getTemplateDisplayNameBytes

      public com.google.protobuf.ByteString getTemplateDisplayNameBytes()
       Output only. The display name of the tag template.
       
      string template_display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getTemplateDisplayNameBytes in interface TagOrBuilder
      Returns:
      The bytes for templateDisplayName.
    • setTemplateDisplayName

      public Tag.Builder setTemplateDisplayName(String value)
       Output only. The display name of the tag template.
       
      string template_display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The templateDisplayName to set.
      Returns:
      This builder for chaining.
    • clearTemplateDisplayName

      public Tag.Builder clearTemplateDisplayName()
       Output only. The display name of the tag template.
       
      string template_display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • setTemplateDisplayNameBytes

      public Tag.Builder setTemplateDisplayNameBytes(com.google.protobuf.ByteString value)
       Output only. The display name of the tag template.
       
      string template_display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The bytes for templateDisplayName to set.
      Returns:
      This builder for chaining.
    • hasColumn

      public boolean hasColumn()
       Resources like Entry can have schemas associated with them. This scope
       allows users to attach tags to an individual column based on that schema.
      
       For attaching a tag to a nested column, use `.` to separate the column
       names. Example:
      
       * `outer_column.inner_column`
       
      string column = 4;
      Specified by:
      hasColumn in interface TagOrBuilder
      Returns:
      Whether the column field is set.
    • getColumn

      public String getColumn()
       Resources like Entry can have schemas associated with them. This scope
       allows users to attach tags to an individual column based on that schema.
      
       For attaching a tag to a nested column, use `.` to separate the column
       names. Example:
      
       * `outer_column.inner_column`
       
      string column = 4;
      Specified by:
      getColumn in interface TagOrBuilder
      Returns:
      The column.
    • getColumnBytes

      public com.google.protobuf.ByteString getColumnBytes()
       Resources like Entry can have schemas associated with them. This scope
       allows users to attach tags to an individual column based on that schema.
      
       For attaching a tag to a nested column, use `.` to separate the column
       names. Example:
      
       * `outer_column.inner_column`
       
      string column = 4;
      Specified by:
      getColumnBytes in interface TagOrBuilder
      Returns:
      The bytes for column.
    • setColumn

      public Tag.Builder setColumn(String value)
       Resources like Entry can have schemas associated with them. This scope
       allows users to attach tags to an individual column based on that schema.
      
       For attaching a tag to a nested column, use `.` to separate the column
       names. Example:
      
       * `outer_column.inner_column`
       
      string column = 4;
      Parameters:
      value - The column to set.
      Returns:
      This builder for chaining.
    • clearColumn

      public Tag.Builder clearColumn()
       Resources like Entry can have schemas associated with them. This scope
       allows users to attach tags to an individual column based on that schema.
      
       For attaching a tag to a nested column, use `.` to separate the column
       names. Example:
      
       * `outer_column.inner_column`
       
      string column = 4;
      Returns:
      This builder for chaining.
    • setColumnBytes

      public Tag.Builder setColumnBytes(com.google.protobuf.ByteString value)
       Resources like Entry can have schemas associated with them. This scope
       allows users to attach tags to an individual column based on that schema.
      
       For attaching a tag to a nested column, use `.` to separate the column
       names. Example:
      
       * `outer_column.inner_column`
       
      string column = 4;
      Parameters:
      value - The bytes for column to set.
      Returns:
      This builder for chaining.
    • getFieldsCount

      public int getFieldsCount()
      Description copied from interface: TagOrBuilder
       Required. This maps the ID of a tag field to the value of and additional
       information about that field. Valid field IDs are defined by the tag's
       template. A tag must have at least 1 field and at most 500 fields.
       
      map<string, .google.cloud.datacatalog.v1beta1.TagField> fields = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getFieldsCount in interface TagOrBuilder
    • containsFields

      public boolean containsFields(String key)
       Required. This maps the ID of a tag field to the value of and additional
       information about that field. Valid field IDs are defined by the tag's
       template. A tag must have at least 1 field and at most 500 fields.
       
      map<string, .google.cloud.datacatalog.v1beta1.TagField> fields = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      containsFields in interface TagOrBuilder
    • getFields

      @Deprecated public Map<String,TagField> getFields()
      Deprecated.
      Use getFieldsMap() instead.
      Specified by:
      getFields in interface TagOrBuilder
    • getFieldsMap

      public Map<String,TagField> getFieldsMap()
       Required. This maps the ID of a tag field to the value of and additional
       information about that field. Valid field IDs are defined by the tag's
       template. A tag must have at least 1 field and at most 500 fields.
       
      map<string, .google.cloud.datacatalog.v1beta1.TagField> fields = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getFieldsMap in interface TagOrBuilder
    • getFieldsOrDefault

      public TagField getFieldsOrDefault(String key, TagField defaultValue)
       Required. This maps the ID of a tag field to the value of and additional
       information about that field. Valid field IDs are defined by the tag's
       template. A tag must have at least 1 field and at most 500 fields.
       
      map<string, .google.cloud.datacatalog.v1beta1.TagField> fields = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getFieldsOrDefault in interface TagOrBuilder
    • getFieldsOrThrow

      public TagField getFieldsOrThrow(String key)
       Required. This maps the ID of a tag field to the value of and additional
       information about that field. Valid field IDs are defined by the tag's
       template. A tag must have at least 1 field and at most 500 fields.
       
      map<string, .google.cloud.datacatalog.v1beta1.TagField> fields = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getFieldsOrThrow in interface TagOrBuilder
    • clearFields

      public Tag.Builder clearFields()
    • removeFields

      public Tag.Builder removeFields(String key)
       Required. This maps the ID of a tag field to the value of and additional
       information about that field. Valid field IDs are defined by the tag's
       template. A tag must have at least 1 field and at most 500 fields.
       
      map<string, .google.cloud.datacatalog.v1beta1.TagField> fields = 3 [(.google.api.field_behavior) = REQUIRED];
    • getMutableFields

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

      public Tag.Builder putFields(String key, TagField value)
       Required. This maps the ID of a tag field to the value of and additional
       information about that field. Valid field IDs are defined by the tag's
       template. A tag must have at least 1 field and at most 500 fields.
       
      map<string, .google.cloud.datacatalog.v1beta1.TagField> fields = 3 [(.google.api.field_behavior) = REQUIRED];
    • putAllFields

      public Tag.Builder putAllFields(Map<String,TagField> values)
       Required. This maps the ID of a tag field to the value of and additional
       information about that field. Valid field IDs are defined by the tag's
       template. A tag must have at least 1 field and at most 500 fields.
       
      map<string, .google.cloud.datacatalog.v1beta1.TagField> fields = 3 [(.google.api.field_behavior) = REQUIRED];
    • putFieldsBuilderIfAbsent

      public TagField.Builder putFieldsBuilderIfAbsent(String key)
       Required. This maps the ID of a tag field to the value of and additional
       information about that field. Valid field IDs are defined by the tag's
       template. A tag must have at least 1 field and at most 500 fields.
       
      map<string, .google.cloud.datacatalog.v1beta1.TagField> fields = 3 [(.google.api.field_behavior) = REQUIRED];