Class PolicyTag.Builder (1.15.0)

public static final class PolicyTag.Builder extends GeneratedMessageV3.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

Implements

PolicyTagOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllChildPolicyTags(Iterable<String> values)

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

Parameter
NameDescription
valuesIterable<String>

The childPolicyTags to add.

Returns
TypeDescription
PolicyTag.Builder

This builder for chaining.

addChildPolicyTags(String value)

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

Parameter
NameDescription
valueString

The childPolicyTags to add.

Returns
TypeDescription
PolicyTag.Builder

This builder for chaining.

addChildPolicyTagsBytes(ByteString value)

public PolicyTag.Builder addChildPolicyTagsBytes(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];

Parameter
NameDescription
valueByteString

The bytes of the childPolicyTags to add.

Returns
TypeDescription
PolicyTag.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public PolicyTag.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
PolicyTag.Builder
Overrides

build()

public PolicyTag build()
Returns
TypeDescription
PolicyTag

buildPartial()

public PolicyTag buildPartial()
Returns
TypeDescription
PolicyTag

clear()

public PolicyTag.Builder clear()
Returns
TypeDescription
PolicyTag.Builder
Overrides

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
TypeDescription
PolicyTag.Builder

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
TypeDescription
PolicyTag.Builder

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
TypeDescription
PolicyTag.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public PolicyTag.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
PolicyTag.Builder
Overrides

clearName()

public PolicyTag.Builder clearName()

Output only. 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) = OUTPUT_ONLY];

Returns
TypeDescription
PolicyTag.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public PolicyTag.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
PolicyTag.Builder
Overrides

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
TypeDescription
PolicyTag.Builder

This builder for chaining.

clone()

public PolicyTag.Builder clone()
Returns
TypeDescription
PolicyTag.Builder
Overrides

getChildPolicyTags(int index)

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

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The childPolicyTags at the given index.

getChildPolicyTagsBytes(int index)

public 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];

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the childPolicyTags at the given index.

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

Returns
TypeDescription
int

The count of childPolicyTags.

getChildPolicyTagsList()

public 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];

Returns
TypeDescription
ProtocolStringList

A list containing the childPolicyTags.

getDefaultInstanceForType()

public PolicyTag getDefaultInstanceForType()
Returns
TypeDescription
PolicyTag

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;

Returns
TypeDescription
String

The description.

getDescriptionBytes()

public 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;

Returns
TypeDescription
ByteString

The bytes for description.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

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

Returns
TypeDescription
String

The displayName.

getDisplayNameBytes()

public 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];

Returns
TypeDescription
ByteString

The bytes for displayName.

getName()

public String getName()

Output only. 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) = OUTPUT_ONLY];

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

Output only. 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) = OUTPUT_ONLY];

Returns
TypeDescription
ByteString

The bytes for name.

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;

Returns
TypeDescription
String

The parentPolicyTag.

getParentPolicyTagBytes()

public 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;

Returns
TypeDescription
ByteString

The bytes for parentPolicyTag.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(PolicyTag other)

public PolicyTag.Builder mergeFrom(PolicyTag other)
Parameter
NameDescription
otherPolicyTag
Returns
TypeDescription
PolicyTag.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public PolicyTag.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
PolicyTag.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public PolicyTag.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
PolicyTag.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final PolicyTag.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
PolicyTag.Builder
Overrides

setChildPolicyTags(int index, String value)

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
NameDescription
indexint

The index to set the value at.

valueString

The childPolicyTags to set.

Returns
TypeDescription
PolicyTag.Builder

This builder for chaining.

setDescription(String value)

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;

Parameter
NameDescription
valueString

The description to set.

Returns
TypeDescription
PolicyTag.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public PolicyTag.Builder setDescriptionBytes(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;

Parameter
NameDescription
valueByteString

The bytes for description to set.

Returns
TypeDescription
PolicyTag.Builder

This builder for chaining.

setDisplayName(String value)

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

Parameter
NameDescription
valueString

The displayName to set.

Returns
TypeDescription
PolicyTag.Builder

This builder for chaining.

setDisplayNameBytes(ByteString value)

public PolicyTag.Builder setDisplayNameBytes(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];

Parameter
NameDescription
valueByteString

The bytes for displayName to set.

Returns
TypeDescription
PolicyTag.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public PolicyTag.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
PolicyTag.Builder
Overrides

setName(String value)

public PolicyTag.Builder setName(String value)

Output only. 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) = OUTPUT_ONLY];

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
PolicyTag.Builder

This builder for chaining.

setNameBytes(ByteString value)

public PolicyTag.Builder setNameBytes(ByteString value)

Output only. 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) = OUTPUT_ONLY];

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
PolicyTag.Builder

This builder for chaining.

setParentPolicyTag(String value)

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;

Parameter
NameDescription
valueString

The parentPolicyTag to set.

Returns
TypeDescription
PolicyTag.Builder

This builder for chaining.

setParentPolicyTagBytes(ByteString value)

public PolicyTag.Builder setParentPolicyTagBytes(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;

Parameter
NameDescription
valueByteString

The bytes for parentPolicyTag to set.

Returns
TypeDescription
PolicyTag.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public PolicyTag.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
PolicyTag.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final PolicyTag.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
PolicyTag.Builder
Overrides