Class PolicyTag.Builder

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

public static final class PolicyTag.Builder extends com.google.protobuf.GeneratedMessage.Builder<PolicyTag.Builder> implements PolicyTagOrBuilder
 Denotes one policy tag in a taxonomy, for example, SSN.

 Policy tags can be defined in a hierarchy. For example:

 ```
 + Geolocation
 + LatLong
 + City
 + ZipCode
 ```

 Where the "Geolocation" policy tag contains three children.
 
Protobuf type google.cloud.datacatalog.v1.PolicyTag
  • 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<PolicyTag.Builder>
    • clear

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

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

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

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

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

      public PolicyTag.Builder mergeFrom(PolicyTag other)
    • isInitialized

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

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

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

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

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

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

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

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

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

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

      public PolicyTag.Builder setDisplayNameBytes(com.google.protobuf.ByteString value)
       Required. User-defined name of this policy tag.
      
       The name can't start or end with spaces and must be unique within the
       parent taxonomy, contain only Unicode letters, numbers, underscores, dashes
       and spaces, and be at most 200 bytes long when encoded in UTF-8.
       
      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()
       Description of this policy tag. 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;
      Specified by:
      getDescription in interface PolicyTagOrBuilder
      Returns:
      The description.
    • getDescriptionBytes

      public com.google.protobuf.ByteString getDescriptionBytes()
       Description of this policy tag. 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;
      Specified by:
      getDescriptionBytes in interface PolicyTagOrBuilder
      Returns:
      The bytes for description.
    • setDescription

      public PolicyTag.Builder setDescription(String value)
       Description of this policy tag. 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;
      Parameters:
      value - The description to set.
      Returns:
      This builder for chaining.
    • clearDescription

      public PolicyTag.Builder clearDescription()
       Description of this policy tag. 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;
      Returns:
      This builder for chaining.
    • setDescriptionBytes

      public PolicyTag.Builder setDescriptionBytes(com.google.protobuf.ByteString value)
       Description of this policy tag. 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;
      Parameters:
      value - The bytes for description to set.
      Returns:
      This builder for chaining.
    • getParentPolicyTag

      public String getParentPolicyTag()
       Resource name of this policy tag's parent policy tag. If empty, this is a
       top level tag. If not set, defaults to an empty string.
      
       For example, for the "LatLong" policy tag in the example above, this field
       contains the resource name of the "Geolocation" policy tag, and, for
       "Geolocation", this field is empty.
       
      string parent_policy_tag = 4;
      Specified by:
      getParentPolicyTag in interface PolicyTagOrBuilder
      Returns:
      The parentPolicyTag.
    • getParentPolicyTagBytes

      public com.google.protobuf.ByteString getParentPolicyTagBytes()
       Resource name of this policy tag's parent policy tag. If empty, this is a
       top level tag. If not set, defaults to an empty string.
      
       For example, for the "LatLong" policy tag in the example above, this field
       contains the resource name of the "Geolocation" policy tag, and, for
       "Geolocation", this field is empty.
       
      string parent_policy_tag = 4;
      Specified by:
      getParentPolicyTagBytes in interface PolicyTagOrBuilder
      Returns:
      The bytes for parentPolicyTag.
    • setParentPolicyTag

      public PolicyTag.Builder setParentPolicyTag(String value)
       Resource name of this policy tag's parent policy tag. If empty, this is a
       top level tag. If not set, defaults to an empty string.
      
       For example, for the "LatLong" policy tag in the example above, this field
       contains the resource name of the "Geolocation" policy tag, and, for
       "Geolocation", this field is empty.
       
      string parent_policy_tag = 4;
      Parameters:
      value - The parentPolicyTag to set.
      Returns:
      This builder for chaining.
    • clearParentPolicyTag

      public PolicyTag.Builder clearParentPolicyTag()
       Resource name of this policy tag's parent policy tag. If empty, this is a
       top level tag. If not set, defaults to an empty string.
      
       For example, for the "LatLong" policy tag in the example above, this field
       contains the resource name of the "Geolocation" policy tag, and, for
       "Geolocation", this field is empty.
       
      string parent_policy_tag = 4;
      Returns:
      This builder for chaining.
    • setParentPolicyTagBytes

      public PolicyTag.Builder setParentPolicyTagBytes(com.google.protobuf.ByteString value)
       Resource name of this policy tag's parent policy tag. If empty, this is a
       top level tag. If not set, defaults to an empty string.
      
       For example, for the "LatLong" policy tag in the example above, this field
       contains the resource name of the "Geolocation" policy tag, and, for
       "Geolocation", this field is empty.
       
      string parent_policy_tag = 4;
      Parameters:
      value - The bytes for parentPolicyTag to set.
      Returns:
      This builder for chaining.
    • getChildPolicyTagsList

      public com.google.protobuf.ProtocolStringList getChildPolicyTagsList()
       Output only. Resource names of child policy tags of this policy tag.
       
      repeated string child_policy_tags = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getChildPolicyTagsList in interface PolicyTagOrBuilder
      Returns:
      A list containing the childPolicyTags.
    • getChildPolicyTagsCount

      public int getChildPolicyTagsCount()
       Output only. Resource names of child policy tags of this policy tag.
       
      repeated string child_policy_tags = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getChildPolicyTagsCount in interface PolicyTagOrBuilder
      Returns:
      The count of childPolicyTags.
    • getChildPolicyTags

      public String getChildPolicyTags(int index)
       Output only. Resource names of child policy tags of this policy tag.
       
      repeated string child_policy_tags = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getChildPolicyTags in interface PolicyTagOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The childPolicyTags at the given index.
    • getChildPolicyTagsBytes

      public com.google.protobuf.ByteString getChildPolicyTagsBytes(int index)
       Output only. Resource names of child policy tags of this policy tag.
       
      repeated string child_policy_tags = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getChildPolicyTagsBytes in interface PolicyTagOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the childPolicyTags at the given index.
    • setChildPolicyTags

      public PolicyTag.Builder setChildPolicyTags(int index, String value)
       Output only. Resource names of child policy tags of this policy tag.
       
      repeated string child_policy_tags = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      index - The index to set the value at.
      value - The childPolicyTags to set.
      Returns:
      This builder for chaining.
    • addChildPolicyTags

      public PolicyTag.Builder addChildPolicyTags(String value)
       Output only. Resource names of child policy tags of this policy tag.
       
      repeated string child_policy_tags = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The childPolicyTags to add.
      Returns:
      This builder for chaining.
    • addAllChildPolicyTags

      public PolicyTag.Builder addAllChildPolicyTags(Iterable<String> values)
       Output only. Resource names of child policy tags of this policy tag.
       
      repeated string child_policy_tags = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      values - The childPolicyTags to add.
      Returns:
      This builder for chaining.
    • clearChildPolicyTags

      public PolicyTag.Builder clearChildPolicyTags()
       Output only. Resource names of child policy tags of this policy tag.
       
      repeated string child_policy_tags = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • addChildPolicyTagsBytes

      public PolicyTag.Builder addChildPolicyTagsBytes(com.google.protobuf.ByteString value)
       Output only. Resource names of child policy tags of this policy tag.
       
      repeated string child_policy_tags = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The bytes of the childPolicyTags to add.
      Returns:
      This builder for chaining.