Class Taxonomy.Builder

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

public static final class Taxonomy.Builder extends com.google.protobuf.GeneratedMessage.Builder<Taxonomy.Builder> implements TaxonomyOrBuilder
 A taxonomy is a collection of hierarchical policy tags that classify data
 along a common axis.

 For example, a "data sensitivity" taxonomy might contain the following policy
 tags:

 ```
 + PII
 + Account number
 + Age
 + SSN
 + Zipcode
 + Financials
 + Revenue
 ```

 A "data origin" taxonomy might contain the following policy tags:

 ```
 + User data
 + Employee data
 + Partner data
 + Public data
 ```
 
Protobuf type google.cloud.datacatalog.v1.Taxonomy
  • Method Details

    • getDescriptor

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

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

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

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

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

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

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

      public Taxonomy.Builder mergeFrom(Taxonomy other)
    • isInitialized

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

      public Taxonomy.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<Taxonomy.Builder>
      Throws:
      IOException
    • getName

      public String getName()
       Identifier. Resource name of this taxonomy in URL format.
      
       Note: Policy tag manager generates unique taxonomy IDs.
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Specified by:
      getName in interface TaxonomyOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Identifier. Resource name of this taxonomy in URL format.
      
       Note: Policy tag manager generates unique taxonomy IDs.
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Specified by:
      getNameBytes in interface TaxonomyOrBuilder
      Returns:
      The bytes for name.
    • setName

      public Taxonomy.Builder setName(String value)
       Identifier. Resource name of this taxonomy in URL format.
      
       Note: Policy tag manager generates unique taxonomy IDs.
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

      public Taxonomy.Builder clearName()
       Identifier. Resource name of this taxonomy in URL format.
      
       Note: Policy tag manager generates unique taxonomy IDs.
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Returns:
      This builder for chaining.
    • setNameBytes

      public Taxonomy.Builder setNameBytes(com.google.protobuf.ByteString value)
       Identifier. Resource name of this taxonomy in URL format.
      
       Note: Policy tag manager generates unique taxonomy IDs.
       
      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()
       Required. User-defined name of this taxonomy.
      
       The name can't start or end with spaces, must contain only Unicode letters,
       numbers, underscores, dashes, and spaces, and be at most 200 bytes long
       when encoded in UTF-8.
      
       The taxonomy display name must be unique within an organization.
       
      string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getDisplayName in interface TaxonomyOrBuilder
      Returns:
      The displayName.
    • getDisplayNameBytes

      public com.google.protobuf.ByteString getDisplayNameBytes()
       Required. User-defined name of this taxonomy.
      
       The name can't start or end with spaces, must contain only Unicode letters,
       numbers, underscores, dashes, and spaces, and be at most 200 bytes long
       when encoded in UTF-8.
      
       The taxonomy display name must be unique within an organization.
       
      string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getDisplayNameBytes in interface TaxonomyOrBuilder
      Returns:
      The bytes for displayName.
    • setDisplayName

      public Taxonomy.Builder setDisplayName(String value)
       Required. User-defined name of this taxonomy.
      
       The name can't start or end with spaces, must contain only Unicode letters,
       numbers, underscores, dashes, and spaces, and be at most 200 bytes long
       when encoded in UTF-8.
      
       The taxonomy display name must be unique within an organization.
       
      string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The displayName to set.
      Returns:
      This builder for chaining.
    • clearDisplayName

      public Taxonomy.Builder clearDisplayName()
       Required. User-defined name of this taxonomy.
      
       The name can't start or end with spaces, must contain only Unicode letters,
       numbers, underscores, dashes, and spaces, and be at most 200 bytes long
       when encoded in UTF-8.
      
       The taxonomy display name must be unique within an organization.
       
      string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • setDisplayNameBytes

      public Taxonomy.Builder setDisplayNameBytes(com.google.protobuf.ByteString value)
       Required. User-defined name of this taxonomy.
      
       The name can't start or end with spaces, must contain only Unicode letters,
       numbers, underscores, dashes, and spaces, and be at most 200 bytes long
       when encoded in UTF-8.
      
       The taxonomy display name must be unique within an organization.
       
      string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The bytes for displayName to set.
      Returns:
      This builder for chaining.
    • getDescription

      public String getDescription()
       Optional. Description of this taxonomy. If not set, defaults to empty.
      
       The description must contain only Unicode characters, tabs, newlines,
       carriage returns, and page breaks, and be at most 2000 bytes long when
       encoded in UTF-8.
       
      string description = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getDescription in interface TaxonomyOrBuilder
      Returns:
      The description.
    • getDescriptionBytes

      public com.google.protobuf.ByteString getDescriptionBytes()
       Optional. Description of this taxonomy. If not set, defaults to empty.
      
       The description must contain only Unicode characters, tabs, newlines,
       carriage returns, and page breaks, and be at most 2000 bytes long when
       encoded in UTF-8.
       
      string description = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getDescriptionBytes in interface TaxonomyOrBuilder
      Returns:
      The bytes for description.
    • setDescription

      public Taxonomy.Builder setDescription(String value)
       Optional. Description of this taxonomy. If not set, defaults to empty.
      
       The description must contain only Unicode characters, tabs, newlines,
       carriage returns, and page breaks, and be at most 2000 bytes long when
       encoded in UTF-8.
       
      string description = 3 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The description to set.
      Returns:
      This builder for chaining.
    • clearDescription

      public Taxonomy.Builder clearDescription()
       Optional. Description of this taxonomy. If not set, defaults to empty.
      
       The description must contain only Unicode characters, tabs, newlines,
       carriage returns, and page breaks, and be at most 2000 bytes long when
       encoded in UTF-8.
       
      string description = 3 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • setDescriptionBytes

      public Taxonomy.Builder setDescriptionBytes(com.google.protobuf.ByteString value)
       Optional. Description of this taxonomy. If not set, defaults to empty.
      
       The description must contain only Unicode characters, tabs, newlines,
       carriage returns, and page breaks, and be at most 2000 bytes long when
       encoded in UTF-8.
       
      string description = 3 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes for description to set.
      Returns:
      This builder for chaining.
    • getPolicyTagCount

      public int getPolicyTagCount()
       Output only. Number of policy tags in this taxonomy.
       
      int32 policy_tag_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getPolicyTagCount in interface TaxonomyOrBuilder
      Returns:
      The policyTagCount.
    • setPolicyTagCount

      public Taxonomy.Builder setPolicyTagCount(int value)
       Output only. Number of policy tags in this taxonomy.
       
      int32 policy_tag_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The policyTagCount to set.
      Returns:
      This builder for chaining.
    • clearPolicyTagCount

      public Taxonomy.Builder clearPolicyTagCount()
       Output only. Number of policy tags in this taxonomy.
       
      int32 policy_tag_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • hasTaxonomyTimestamps

      public boolean hasTaxonomyTimestamps()
       Output only. Creation and modification timestamps of this taxonomy.
       
      .google.cloud.datacatalog.v1.SystemTimestamps taxonomy_timestamps = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasTaxonomyTimestamps in interface TaxonomyOrBuilder
      Returns:
      Whether the taxonomyTimestamps field is set.
    • getTaxonomyTimestamps

      public SystemTimestamps getTaxonomyTimestamps()
       Output only. Creation and modification timestamps of this taxonomy.
       
      .google.cloud.datacatalog.v1.SystemTimestamps taxonomy_timestamps = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getTaxonomyTimestamps in interface TaxonomyOrBuilder
      Returns:
      The taxonomyTimestamps.
    • setTaxonomyTimestamps

      public Taxonomy.Builder setTaxonomyTimestamps(SystemTimestamps value)
       Output only. Creation and modification timestamps of this taxonomy.
       
      .google.cloud.datacatalog.v1.SystemTimestamps taxonomy_timestamps = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • setTaxonomyTimestamps

      public Taxonomy.Builder setTaxonomyTimestamps(SystemTimestamps.Builder builderForValue)
       Output only. Creation and modification timestamps of this taxonomy.
       
      .google.cloud.datacatalog.v1.SystemTimestamps taxonomy_timestamps = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • mergeTaxonomyTimestamps

      public Taxonomy.Builder mergeTaxonomyTimestamps(SystemTimestamps value)
       Output only. Creation and modification timestamps of this taxonomy.
       
      .google.cloud.datacatalog.v1.SystemTimestamps taxonomy_timestamps = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • clearTaxonomyTimestamps

      public Taxonomy.Builder clearTaxonomyTimestamps()
       Output only. Creation and modification timestamps of this taxonomy.
       
      .google.cloud.datacatalog.v1.SystemTimestamps taxonomy_timestamps = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getTaxonomyTimestampsBuilder

      public SystemTimestamps.Builder getTaxonomyTimestampsBuilder()
       Output only. Creation and modification timestamps of this taxonomy.
       
      .google.cloud.datacatalog.v1.SystemTimestamps taxonomy_timestamps = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getTaxonomyTimestampsOrBuilder

      public SystemTimestampsOrBuilder getTaxonomyTimestampsOrBuilder()
       Output only. Creation and modification timestamps of this taxonomy.
       
      .google.cloud.datacatalog.v1.SystemTimestamps taxonomy_timestamps = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getTaxonomyTimestampsOrBuilder in interface TaxonomyOrBuilder
    • getActivatedPolicyTypesList

      public List<Taxonomy.PolicyType> getActivatedPolicyTypesList()
       Optional. A list of policy types that are activated for this taxonomy. If
       not set, defaults to an empty list.
       
      repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getActivatedPolicyTypesList in interface TaxonomyOrBuilder
      Returns:
      A list containing the activatedPolicyTypes.
    • getActivatedPolicyTypesCount

      public int getActivatedPolicyTypesCount()
       Optional. A list of policy types that are activated for this taxonomy. If
       not set, defaults to an empty list.
       
      repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getActivatedPolicyTypesCount in interface TaxonomyOrBuilder
      Returns:
      The count of activatedPolicyTypes.
    • getActivatedPolicyTypes

      public Taxonomy.PolicyType getActivatedPolicyTypes(int index)
       Optional. A list of policy types that are activated for this taxonomy. If
       not set, defaults to an empty list.
       
      repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getActivatedPolicyTypes in interface TaxonomyOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The activatedPolicyTypes at the given index.
    • setActivatedPolicyTypes

      public Taxonomy.Builder setActivatedPolicyTypes(int index, Taxonomy.PolicyType value)
       Optional. A list of policy types that are activated for this taxonomy. If
       not set, defaults to an empty list.
       
      repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 6 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      index - The index to set the value at.
      value - The activatedPolicyTypes to set.
      Returns:
      This builder for chaining.
    • addActivatedPolicyTypes

      public Taxonomy.Builder addActivatedPolicyTypes(Taxonomy.PolicyType value)
       Optional. A list of policy types that are activated for this taxonomy. If
       not set, defaults to an empty list.
       
      repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 6 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The activatedPolicyTypes to add.
      Returns:
      This builder for chaining.
    • addAllActivatedPolicyTypes

      public Taxonomy.Builder addAllActivatedPolicyTypes(Iterable<? extends Taxonomy.PolicyType> values)
       Optional. A list of policy types that are activated for this taxonomy. If
       not set, defaults to an empty list.
       
      repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 6 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      values - The activatedPolicyTypes to add.
      Returns:
      This builder for chaining.
    • clearActivatedPolicyTypes

      public Taxonomy.Builder clearActivatedPolicyTypes()
       Optional. A list of policy types that are activated for this taxonomy. If
       not set, defaults to an empty list.
       
      repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 6 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • getActivatedPolicyTypesValueList

      public List<Integer> getActivatedPolicyTypesValueList()
       Optional. A list of policy types that are activated for this taxonomy. If
       not set, defaults to an empty list.
       
      repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getActivatedPolicyTypesValueList in interface TaxonomyOrBuilder
      Returns:
      A list containing the enum numeric values on the wire for activatedPolicyTypes.
    • getActivatedPolicyTypesValue

      public int getActivatedPolicyTypesValue(int index)
       Optional. A list of policy types that are activated for this taxonomy. If
       not set, defaults to an empty list.
       
      repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getActivatedPolicyTypesValue in interface TaxonomyOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The enum numeric value on the wire of activatedPolicyTypes at the given index.
    • setActivatedPolicyTypesValue

      public Taxonomy.Builder setActivatedPolicyTypesValue(int index, int value)
       Optional. A list of policy types that are activated for this taxonomy. If
       not set, defaults to an empty list.
       
      repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 6 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      index - The index to set the value at.
      value - The enum numeric value on the wire for activatedPolicyTypes to set.
      Returns:
      This builder for chaining.
    • addActivatedPolicyTypesValue

      public Taxonomy.Builder addActivatedPolicyTypesValue(int value)
       Optional. A list of policy types that are activated for this taxonomy. If
       not set, defaults to an empty list.
       
      repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 6 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The enum numeric value on the wire for activatedPolicyTypes to add.
      Returns:
      This builder for chaining.
    • addAllActivatedPolicyTypesValue

      public Taxonomy.Builder addAllActivatedPolicyTypesValue(Iterable<Integer> values)
       Optional. A list of policy types that are activated for this taxonomy. If
       not set, defaults to an empty list.
       
      repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 6 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      values - The enum numeric values on the wire for activatedPolicyTypes to add.
      Returns:
      This builder for chaining.
    • hasService

      public boolean hasService()
       Output only. Identity of the service which owns the Taxonomy. This field is
       only populated when the taxonomy is created by a Google Cloud service.
       Currently only 'DATAPLEX' is supported.
       
      .google.cloud.datacatalog.v1.Taxonomy.Service service = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasService in interface TaxonomyOrBuilder
      Returns:
      Whether the service field is set.
    • getService

      public Taxonomy.Service getService()
       Output only. Identity of the service which owns the Taxonomy. This field is
       only populated when the taxonomy is created by a Google Cloud service.
       Currently only 'DATAPLEX' is supported.
       
      .google.cloud.datacatalog.v1.Taxonomy.Service service = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getService in interface TaxonomyOrBuilder
      Returns:
      The service.
    • setService

      public Taxonomy.Builder setService(Taxonomy.Service value)
       Output only. Identity of the service which owns the Taxonomy. This field is
       only populated when the taxonomy is created by a Google Cloud service.
       Currently only 'DATAPLEX' is supported.
       
      .google.cloud.datacatalog.v1.Taxonomy.Service service = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • setService

      public Taxonomy.Builder setService(Taxonomy.Service.Builder builderForValue)
       Output only. Identity of the service which owns the Taxonomy. This field is
       only populated when the taxonomy is created by a Google Cloud service.
       Currently only 'DATAPLEX' is supported.
       
      .google.cloud.datacatalog.v1.Taxonomy.Service service = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • mergeService

      public Taxonomy.Builder mergeService(Taxonomy.Service value)
       Output only. Identity of the service which owns the Taxonomy. This field is
       only populated when the taxonomy is created by a Google Cloud service.
       Currently only 'DATAPLEX' is supported.
       
      .google.cloud.datacatalog.v1.Taxonomy.Service service = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • clearService

      public Taxonomy.Builder clearService()
       Output only. Identity of the service which owns the Taxonomy. This field is
       only populated when the taxonomy is created by a Google Cloud service.
       Currently only 'DATAPLEX' is supported.
       
      .google.cloud.datacatalog.v1.Taxonomy.Service service = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getServiceBuilder

      public Taxonomy.Service.Builder getServiceBuilder()
       Output only. Identity of the service which owns the Taxonomy. This field is
       only populated when the taxonomy is created by a Google Cloud service.
       Currently only 'DATAPLEX' is supported.
       
      .google.cloud.datacatalog.v1.Taxonomy.Service service = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getServiceOrBuilder

      public Taxonomy.ServiceOrBuilder getServiceOrBuilder()
       Output only. Identity of the service which owns the Taxonomy. This field is
       only populated when the taxonomy is created by a Google Cloud service.
       Currently only 'DATAPLEX' is supported.
       
      .google.cloud.datacatalog.v1.Taxonomy.Service service = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getServiceOrBuilder in interface TaxonomyOrBuilder