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.v1beta1.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 (e.g. ssn). Policy Tags can be defined in a hierarchy. For example, consider the following hierarchy: Geolocation -> (LatLong, City, ZipCode). PolicyTag "Geolocation" contains three child policy tags: "LatLong", "City", and "ZipCode".Protobuf type
google.cloud.datacatalog.v1beta1.PolicyTag-
Method Summary
Modifier and TypeMethodDescriptionaddAllChildPolicyTags(Iterable<String> values) Output only.addChildPolicyTags(String value) Output only.addChildPolicyTagsBytes(com.google.protobuf.ByteString value) Output only.build()clear()Output only.Description of this policy tag.Required.Identifier.Resource name of this policy tag's parent policy tag (e.g. for the "LatLong" policy tag in the example above, this field contains the resource name of the "Geolocation" policy tag).getChildPolicyTags(int index) Output only.com.google.protobuf.ByteStringgetChildPolicyTagsBytes(int index) Output only.intOutput only.com.google.protobuf.ProtocolStringListOutput only.Description of this policy tag.com.google.protobuf.ByteStringDescription of this policy tag.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorRequired.com.google.protobuf.ByteStringRequired.getName()Identifier.com.google.protobuf.ByteStringIdentifier.Resource name of this policy tag's parent policy tag (e.g. for the "LatLong" policy tag in the example above, this field contains the resource name of the "Geolocation" policy tag).com.google.protobuf.ByteStringResource name of this policy tag's parent policy tag (e.g. for the "LatLong" policy tag in the example above, this field contains the resource name of the "Geolocation" policy tag).protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) setChildPolicyTags(int index, String value) Output only.setDescription(String value) Description of this policy tag.setDescriptionBytes(com.google.protobuf.ByteString value) Description of this policy tag.setDisplayName(String value) Required.setDisplayNameBytes(com.google.protobuf.ByteString value) Required.Identifier.setNameBytes(com.google.protobuf.ByteString value) Identifier.setParentPolicyTag(String value) Resource name of this policy tag's parent policy tag (e.g. for the "LatLong" policy tag in the example above, this field contains the resource name of the "Geolocation" policy tag).setParentPolicyTagBytes(com.google.protobuf.ByteString value) Resource name of this policy tag's parent policy tag (e.g. for the "LatLong" policy tag in the example above, this field contains the resource name of the "Geolocation" policy tag).Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<PolicyTag.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<PolicyTag.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<PolicyTag.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<PolicyTag.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.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:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<PolicyTag.Builder>- Throws:
IOException
-
getName
Identifier. Resource name of this policy tag, whose format is: "projects/{project_number}/locations/{location_id}/taxonomies/{taxonomy_id}/policyTags/{id}".string name = 1 [(.google.api.field_behavior) = IDENTIFIER];- Specified by:
getNamein interfacePolicyTagOrBuilder- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.ByteString getNameBytes()Identifier. Resource name of this policy tag, whose format is: "projects/{project_number}/locations/{location_id}/taxonomies/{taxonomy_id}/policyTags/{id}".string name = 1 [(.google.api.field_behavior) = IDENTIFIER];- Specified by:
getNameBytesin interfacePolicyTagOrBuilder- Returns:
- The bytes for name.
-
setName
Identifier. Resource name of this policy tag, whose format is: "projects/{project_number}/locations/{location_id}/taxonomies/{taxonomy_id}/policyTags/{id}".string name = 1 [(.google.api.field_behavior) = IDENTIFIER];- Parameters:
value- The name to set.- Returns:
- This builder for chaining.
-
clearName
Identifier. Resource name of this policy tag, whose format is: "projects/{project_number}/locations/{location_id}/taxonomies/{taxonomy_id}/policyTags/{id}".string name = 1 [(.google.api.field_behavior) = IDENTIFIER];- Returns:
- This builder for chaining.
-
setNameBytes
Identifier. Resource name of this policy tag, whose format is: "projects/{project_number}/locations/{location_id}/taxonomies/{taxonomy_id}/policyTags/{id}".string name = 1 [(.google.api.field_behavior) = IDENTIFIER];- Parameters:
value- The bytes for name to set.- Returns:
- This builder for chaining.
-
getDisplayName
Required. User defined name of this policy tag. It must: be unique within the parent taxonomy; contain only unicode letters, numbers, underscores, dashes and spaces; not start or end with spaces; and be at most 200 bytes long when encoded in UTF-8.
string display_name = 2 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getDisplayNamein interfacePolicyTagOrBuilder- Returns:
- The displayName.
-
getDisplayNameBytes
public com.google.protobuf.ByteString getDisplayNameBytes()Required. User defined name of this policy tag. It must: be unique within the parent taxonomy; contain only unicode letters, numbers, underscores, dashes and spaces; not start or end with spaces; and be at most 200 bytes long when encoded in UTF-8.
string display_name = 2 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getDisplayNameBytesin interfacePolicyTagOrBuilder- Returns:
- The bytes for displayName.
-
setDisplayName
Required. User defined name of this policy tag. It must: be unique within the parent taxonomy; contain only unicode letters, numbers, underscores, dashes and spaces; not start or end with 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
Required. User defined name of this policy tag. It must: be unique within the parent taxonomy; contain only unicode letters, numbers, underscores, dashes and spaces; not start or end with 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
Required. User defined name of this policy tag. It must: be unique within the parent taxonomy; contain only unicode letters, numbers, underscores, dashes and spaces; not start or end with 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
Description of this policy tag. It must: contain only unicode characters, tabs, newlines, carriage returns and page breaks; and be at most 2000 bytes long when encoded in UTF-8. If not set, defaults to an empty description. If not set, defaults to an empty description.
string description = 3;- Specified by:
getDescriptionin interfacePolicyTagOrBuilder- Returns:
- The description.
-
getDescriptionBytes
public com.google.protobuf.ByteString getDescriptionBytes()Description of this policy tag. It must: contain only unicode characters, tabs, newlines, carriage returns and page breaks; and be at most 2000 bytes long when encoded in UTF-8. If not set, defaults to an empty description. If not set, defaults to an empty description.
string description = 3;- Specified by:
getDescriptionBytesin interfacePolicyTagOrBuilder- Returns:
- The bytes for description.
-
setDescription
Description of this policy tag. It must: contain only unicode characters, tabs, newlines, carriage returns and page breaks; and be at most 2000 bytes long when encoded in UTF-8. If not set, defaults to an empty description. If not set, defaults to an empty description.
string description = 3;- Parameters:
value- The description to set.- Returns:
- This builder for chaining.
-
clearDescription
Description of this policy tag. It must: contain only unicode characters, tabs, newlines, carriage returns and page breaks; and be at most 2000 bytes long when encoded in UTF-8. If not set, defaults to an empty description. If not set, defaults to an empty description.
string description = 3;- Returns:
- This builder for chaining.
-
setDescriptionBytes
Description of this policy tag. It must: contain only unicode characters, tabs, newlines, carriage returns and page breaks; and be at most 2000 bytes long when encoded in UTF-8. If not set, defaults to an empty description. If not set, defaults to an empty description.
string description = 3;- Parameters:
value- The bytes for description to set.- Returns:
- This builder for chaining.
-
getParentPolicyTag
Resource name of this policy tag's parent policy tag (e.g. for the "LatLong" policy tag in the example above, this field contains the resource name of the "Geolocation" policy tag). If empty, it means this policy tag is a top level policy tag (e.g. this field is empty for the "Geolocation" policy tag in the example above). If not set, defaults to an empty string.
string parent_policy_tag = 4;- Specified by:
getParentPolicyTagin interfacePolicyTagOrBuilder- Returns:
- The parentPolicyTag.
-
getParentPolicyTagBytes
public com.google.protobuf.ByteString getParentPolicyTagBytes()Resource name of this policy tag's parent policy tag (e.g. for the "LatLong" policy tag in the example above, this field contains the resource name of the "Geolocation" policy tag). If empty, it means this policy tag is a top level policy tag (e.g. this field is empty for the "Geolocation" policy tag in the example above). If not set, defaults to an empty string.
string parent_policy_tag = 4;- Specified by:
getParentPolicyTagBytesin interfacePolicyTagOrBuilder- Returns:
- The bytes for parentPolicyTag.
-
setParentPolicyTag
Resource name of this policy tag's parent policy tag (e.g. for the "LatLong" policy tag in the example above, this field contains the resource name of the "Geolocation" policy tag). If empty, it means this policy tag is a top level policy tag (e.g. this field is empty for the "Geolocation" policy tag in the example above). If not set, defaults to an empty string.
string parent_policy_tag = 4;- Parameters:
value- The parentPolicyTag to set.- Returns:
- This builder for chaining.
-
clearParentPolicyTag
Resource name of this policy tag's parent policy tag (e.g. for the "LatLong" policy tag in the example above, this field contains the resource name of the "Geolocation" policy tag). If empty, it means this policy tag is a top level policy tag (e.g. this field is empty for the "Geolocation" policy tag in the example above). If not set, defaults to an empty string.
string parent_policy_tag = 4;- Returns:
- This builder for chaining.
-
setParentPolicyTagBytes
Resource name of this policy tag's parent policy tag (e.g. for the "LatLong" policy tag in the example above, this field contains the resource name of the "Geolocation" policy tag). If empty, it means this policy tag is a top level policy tag (e.g. this field is empty for the "Geolocation" policy tag in the example above). If not set, defaults to an empty string.
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:
getChildPolicyTagsListin interfacePolicyTagOrBuilder- 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:
getChildPolicyTagsCountin interfacePolicyTagOrBuilder- Returns:
- The count of childPolicyTags.
-
getChildPolicyTags
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:
getChildPolicyTagsin interfacePolicyTagOrBuilder- 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:
getChildPolicyTagsBytesin interfacePolicyTagOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the childPolicyTags at the given index.
-
setChildPolicyTags
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
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
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
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
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.
-