Class TagKey.Builder

  • All Implemented Interfaces:
    TagKeyOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    TagKey

    public static final class TagKey.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<TagKey.Builder>
    implements TagKeyOrBuilder
     A TagKey, used to group a set of TagValues.
     
    Protobuf type google.cloud.resourcemanager.v3.TagKey
    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField in class com.google.protobuf.GeneratedMessageV3.Builder<TagKey.Builder>
      • internalGetMutableMapField

        protected com.google.protobuf.MapField internalGetMutableMapField​(int number)
        Overrides:
        internalGetMutableMapField in class com.google.protobuf.GeneratedMessageV3.Builder<TagKey.Builder>
      • internalGetFieldAccessorTable

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

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

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

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

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

        public TagKey.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<TagKey.Builder>
      • setField

        public TagKey.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                       Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<TagKey.Builder>
      • clearField

        public TagKey.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<TagKey.Builder>
      • clearOneof

        public TagKey.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<TagKey.Builder>
      • setRepeatedField

        public TagKey.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                               int index,
                                               Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<TagKey.Builder>
      • addRepeatedField

        public TagKey.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                               Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<TagKey.Builder>
      • mergeFrom

        public TagKey.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<TagKey.Builder>
      • isInitialized

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

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

        public String getName()
         Immutable. The resource name for a TagKey. Must be in the format
         `tagKeys/{tag_key_id}`, where `tag_key_id` is the generated numeric id for
         the TagKey.
         
        string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
        Specified by:
        getName in interface TagKeyOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         Immutable. The resource name for a TagKey. Must be in the format
         `tagKeys/{tag_key_id}`, where `tag_key_id` is the generated numeric id for
         the TagKey.
         
        string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
        Specified by:
        getNameBytes in interface TagKeyOrBuilder
        Returns:
        The bytes for name.
      • setName

        public TagKey.Builder setName​(String value)
         Immutable. The resource name for a TagKey. Must be in the format
         `tagKeys/{tag_key_id}`, where `tag_key_id` is the generated numeric id for
         the TagKey.
         
        string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
        Parameters:
        value - The name to set.
        Returns:
        This builder for chaining.
      • clearName

        public TagKey.Builder clearName()
         Immutable. The resource name for a TagKey. Must be in the format
         `tagKeys/{tag_key_id}`, where `tag_key_id` is the generated numeric id for
         the TagKey.
         
        string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
        Returns:
        This builder for chaining.
      • setNameBytes

        public TagKey.Builder setNameBytes​(com.google.protobuf.ByteString value)
         Immutable. The resource name for a TagKey. Must be in the format
         `tagKeys/{tag_key_id}`, where `tag_key_id` is the generated numeric id for
         the TagKey.
         
        string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
        Parameters:
        value - The bytes for name to set.
        Returns:
        This builder for chaining.
      • getParent

        public String getParent()
         Immutable. The resource name of the TagKey's parent. A TagKey can be
         parented by an Organization or a Project. For a TagKey parented by an
         Organization, its parent must be in the form `organizations/{org_id}`. For
         a TagKey parented by a Project, its parent can be in the form
         `projects/{project_id}` or `projects/{project_number}`.
         
        string parent = 2 [(.google.api.field_behavior) = IMMUTABLE];
        Specified by:
        getParent in interface TagKeyOrBuilder
        Returns:
        The parent.
      • getParentBytes

        public com.google.protobuf.ByteString getParentBytes()
         Immutable. The resource name of the TagKey's parent. A TagKey can be
         parented by an Organization or a Project. For a TagKey parented by an
         Organization, its parent must be in the form `organizations/{org_id}`. For
         a TagKey parented by a Project, its parent can be in the form
         `projects/{project_id}` or `projects/{project_number}`.
         
        string parent = 2 [(.google.api.field_behavior) = IMMUTABLE];
        Specified by:
        getParentBytes in interface TagKeyOrBuilder
        Returns:
        The bytes for parent.
      • setParent

        public TagKey.Builder setParent​(String value)
         Immutable. The resource name of the TagKey's parent. A TagKey can be
         parented by an Organization or a Project. For a TagKey parented by an
         Organization, its parent must be in the form `organizations/{org_id}`. For
         a TagKey parented by a Project, its parent can be in the form
         `projects/{project_id}` or `projects/{project_number}`.
         
        string parent = 2 [(.google.api.field_behavior) = IMMUTABLE];
        Parameters:
        value - The parent to set.
        Returns:
        This builder for chaining.
      • clearParent

        public TagKey.Builder clearParent()
         Immutable. The resource name of the TagKey's parent. A TagKey can be
         parented by an Organization or a Project. For a TagKey parented by an
         Organization, its parent must be in the form `organizations/{org_id}`. For
         a TagKey parented by a Project, its parent can be in the form
         `projects/{project_id}` or `projects/{project_number}`.
         
        string parent = 2 [(.google.api.field_behavior) = IMMUTABLE];
        Returns:
        This builder for chaining.
      • setParentBytes

        public TagKey.Builder setParentBytes​(com.google.protobuf.ByteString value)
         Immutable. The resource name of the TagKey's parent. A TagKey can be
         parented by an Organization or a Project. For a TagKey parented by an
         Organization, its parent must be in the form `organizations/{org_id}`. For
         a TagKey parented by a Project, its parent can be in the form
         `projects/{project_id}` or `projects/{project_number}`.
         
        string parent = 2 [(.google.api.field_behavior) = IMMUTABLE];
        Parameters:
        value - The bytes for parent to set.
        Returns:
        This builder for chaining.
      • getShortName

        public String getShortName()
         Required. Immutable. The user friendly name for a TagKey. The short name
         should be unique for TagKeys within the same tag namespace.
        
         The short name must be 1-63 characters, beginning and ending with
         an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_),
         dots (.), and alphanumerics between.
         
        string short_name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
        Specified by:
        getShortName in interface TagKeyOrBuilder
        Returns:
        The shortName.
      • getShortNameBytes

        public com.google.protobuf.ByteString getShortNameBytes()
         Required. Immutable. The user friendly name for a TagKey. The short name
         should be unique for TagKeys within the same tag namespace.
        
         The short name must be 1-63 characters, beginning and ending with
         an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_),
         dots (.), and alphanumerics between.
         
        string short_name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
        Specified by:
        getShortNameBytes in interface TagKeyOrBuilder
        Returns:
        The bytes for shortName.
      • setShortName

        public TagKey.Builder setShortName​(String value)
         Required. Immutable. The user friendly name for a TagKey. The short name
         should be unique for TagKeys within the same tag namespace.
        
         The short name must be 1-63 characters, beginning and ending with
         an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_),
         dots (.), and alphanumerics between.
         
        string short_name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
        Parameters:
        value - The shortName to set.
        Returns:
        This builder for chaining.
      • clearShortName

        public TagKey.Builder clearShortName()
         Required. Immutable. The user friendly name for a TagKey. The short name
         should be unique for TagKeys within the same tag namespace.
        
         The short name must be 1-63 characters, beginning and ending with
         an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_),
         dots (.), and alphanumerics between.
         
        string short_name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
        Returns:
        This builder for chaining.
      • setShortNameBytes

        public TagKey.Builder setShortNameBytes​(com.google.protobuf.ByteString value)
         Required. Immutable. The user friendly name for a TagKey. The short name
         should be unique for TagKeys within the same tag namespace.
        
         The short name must be 1-63 characters, beginning and ending with
         an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_),
         dots (.), and alphanumerics between.
         
        string short_name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
        Parameters:
        value - The bytes for shortName to set.
        Returns:
        This builder for chaining.
      • getNamespacedName

        public String getNamespacedName()
         Output only. Immutable. Namespaced name of the TagKey.
         
        string namespaced_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];
        Specified by:
        getNamespacedName in interface TagKeyOrBuilder
        Returns:
        The namespacedName.
      • getNamespacedNameBytes

        public com.google.protobuf.ByteString getNamespacedNameBytes()
         Output only. Immutable. Namespaced name of the TagKey.
         
        string namespaced_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];
        Specified by:
        getNamespacedNameBytes in interface TagKeyOrBuilder
        Returns:
        The bytes for namespacedName.
      • setNamespacedName

        public TagKey.Builder setNamespacedName​(String value)
         Output only. Immutable. Namespaced name of the TagKey.
         
        string namespaced_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];
        Parameters:
        value - The namespacedName to set.
        Returns:
        This builder for chaining.
      • clearNamespacedName

        public TagKey.Builder clearNamespacedName()
         Output only. Immutable. Namespaced name of the TagKey.
         
        string namespaced_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];
        Returns:
        This builder for chaining.
      • setNamespacedNameBytes

        public TagKey.Builder setNamespacedNameBytes​(com.google.protobuf.ByteString value)
         Output only. Immutable. Namespaced name of the TagKey.
         
        string namespaced_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];
        Parameters:
        value - The bytes for namespacedName to set.
        Returns:
        This builder for chaining.
      • getDescription

        public String getDescription()
         Optional. User-assigned description of the TagKey. Must not exceed 256
         characters.
        
         Read-write.
         
        string description = 5 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getDescription in interface TagKeyOrBuilder
        Returns:
        The description.
      • getDescriptionBytes

        public com.google.protobuf.ByteString getDescriptionBytes()
         Optional. User-assigned description of the TagKey. Must not exceed 256
         characters.
        
         Read-write.
         
        string description = 5 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getDescriptionBytes in interface TagKeyOrBuilder
        Returns:
        The bytes for description.
      • setDescription

        public TagKey.Builder setDescription​(String value)
         Optional. User-assigned description of the TagKey. Must not exceed 256
         characters.
        
         Read-write.
         
        string description = 5 [(.google.api.field_behavior) = OPTIONAL];
        Parameters:
        value - The description to set.
        Returns:
        This builder for chaining.
      • clearDescription

        public TagKey.Builder clearDescription()
         Optional. User-assigned description of the TagKey. Must not exceed 256
         characters.
        
         Read-write.
         
        string description = 5 [(.google.api.field_behavior) = OPTIONAL];
        Returns:
        This builder for chaining.
      • setDescriptionBytes

        public TagKey.Builder setDescriptionBytes​(com.google.protobuf.ByteString value)
         Optional. User-assigned description of the TagKey. Must not exceed 256
         characters.
        
         Read-write.
         
        string description = 5 [(.google.api.field_behavior) = OPTIONAL];
        Parameters:
        value - The bytes for description to set.
        Returns:
        This builder for chaining.
      • hasCreateTime

        public boolean hasCreateTime()
         Output only. Creation time.
         
        .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        hasCreateTime in interface TagKeyOrBuilder
        Returns:
        Whether the createTime field is set.
      • getCreateTime

        public com.google.protobuf.Timestamp getCreateTime()
         Output only. Creation time.
         
        .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getCreateTime in interface TagKeyOrBuilder
        Returns:
        The createTime.
      • setCreateTime

        public TagKey.Builder setCreateTime​(com.google.protobuf.Timestamp value)
         Output only. Creation time.
         
        .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • setCreateTime

        public TagKey.Builder setCreateTime​(com.google.protobuf.Timestamp.Builder builderForValue)
         Output only. Creation time.
         
        .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • mergeCreateTime

        public TagKey.Builder mergeCreateTime​(com.google.protobuf.Timestamp value)
         Output only. Creation time.
         
        .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • clearCreateTime

        public TagKey.Builder clearCreateTime()
         Output only. Creation time.
         
        .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • getCreateTimeBuilder

        public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder()
         Output only. Creation time.
         
        .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • getCreateTimeOrBuilder

        public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder()
         Output only. Creation time.
         
        .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getCreateTimeOrBuilder in interface TagKeyOrBuilder
      • hasUpdateTime

        public boolean hasUpdateTime()
         Output only. Update time.
         
        .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        hasUpdateTime in interface TagKeyOrBuilder
        Returns:
        Whether the updateTime field is set.
      • getUpdateTime

        public com.google.protobuf.Timestamp getUpdateTime()
         Output only. Update time.
         
        .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getUpdateTime in interface TagKeyOrBuilder
        Returns:
        The updateTime.
      • setUpdateTime

        public TagKey.Builder setUpdateTime​(com.google.protobuf.Timestamp value)
         Output only. Update time.
         
        .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • setUpdateTime

        public TagKey.Builder setUpdateTime​(com.google.protobuf.Timestamp.Builder builderForValue)
         Output only. Update time.
         
        .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • mergeUpdateTime

        public TagKey.Builder mergeUpdateTime​(com.google.protobuf.Timestamp value)
         Output only. Update time.
         
        .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • clearUpdateTime

        public TagKey.Builder clearUpdateTime()
         Output only. Update time.
         
        .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • getUpdateTimeBuilder

        public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder()
         Output only. Update time.
         
        .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • getUpdateTimeOrBuilder

        public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder()
         Output only. Update time.
         
        .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getUpdateTimeOrBuilder in interface TagKeyOrBuilder
      • getEtag

        public String getEtag()
         Optional. Entity tag which users can pass to prevent race conditions. This
         field is always set in server responses. See UpdateTagKeyRequest for
         details.
         
        string etag = 8 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getEtag in interface TagKeyOrBuilder
        Returns:
        The etag.
      • getEtagBytes

        public com.google.protobuf.ByteString getEtagBytes()
         Optional. Entity tag which users can pass to prevent race conditions. This
         field is always set in server responses. See UpdateTagKeyRequest for
         details.
         
        string etag = 8 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getEtagBytes in interface TagKeyOrBuilder
        Returns:
        The bytes for etag.
      • setEtag

        public TagKey.Builder setEtag​(String value)
         Optional. Entity tag which users can pass to prevent race conditions. This
         field is always set in server responses. See UpdateTagKeyRequest for
         details.
         
        string etag = 8 [(.google.api.field_behavior) = OPTIONAL];
        Parameters:
        value - The etag to set.
        Returns:
        This builder for chaining.
      • clearEtag

        public TagKey.Builder clearEtag()
         Optional. Entity tag which users can pass to prevent race conditions. This
         field is always set in server responses. See UpdateTagKeyRequest for
         details.
         
        string etag = 8 [(.google.api.field_behavior) = OPTIONAL];
        Returns:
        This builder for chaining.
      • setEtagBytes

        public TagKey.Builder setEtagBytes​(com.google.protobuf.ByteString value)
         Optional. Entity tag which users can pass to prevent race conditions. This
         field is always set in server responses. See UpdateTagKeyRequest for
         details.
         
        string etag = 8 [(.google.api.field_behavior) = OPTIONAL];
        Parameters:
        value - The bytes for etag to set.
        Returns:
        This builder for chaining.
      • getPurposeValue

        public int getPurposeValue()
         Optional. A purpose denotes that this Tag is intended for use in policies
         of a specific policy engine, and will involve that policy engine in
         management operations involving this Tag. A purpose does not grant a
         policy engine exclusive rights to the Tag, and it may be referenced by
         other policy engines.
        
         A purpose cannot be changed once set.
         
        .google.cloud.resourcemanager.v3.Purpose purpose = 11 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getPurposeValue in interface TagKeyOrBuilder
        Returns:
        The enum numeric value on the wire for purpose.
      • setPurposeValue

        public TagKey.Builder setPurposeValue​(int value)
         Optional. A purpose denotes that this Tag is intended for use in policies
         of a specific policy engine, and will involve that policy engine in
         management operations involving this Tag. A purpose does not grant a
         policy engine exclusive rights to the Tag, and it may be referenced by
         other policy engines.
        
         A purpose cannot be changed once set.
         
        .google.cloud.resourcemanager.v3.Purpose purpose = 11 [(.google.api.field_behavior) = OPTIONAL];
        Parameters:
        value - The enum numeric value on the wire for purpose to set.
        Returns:
        This builder for chaining.
      • getPurpose

        public Purpose getPurpose()
         Optional. A purpose denotes that this Tag is intended for use in policies
         of a specific policy engine, and will involve that policy engine in
         management operations involving this Tag. A purpose does not grant a
         policy engine exclusive rights to the Tag, and it may be referenced by
         other policy engines.
        
         A purpose cannot be changed once set.
         
        .google.cloud.resourcemanager.v3.Purpose purpose = 11 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getPurpose in interface TagKeyOrBuilder
        Returns:
        The purpose.
      • setPurpose

        public TagKey.Builder setPurpose​(Purpose value)
         Optional. A purpose denotes that this Tag is intended for use in policies
         of a specific policy engine, and will involve that policy engine in
         management operations involving this Tag. A purpose does not grant a
         policy engine exclusive rights to the Tag, and it may be referenced by
         other policy engines.
        
         A purpose cannot be changed once set.
         
        .google.cloud.resourcemanager.v3.Purpose purpose = 11 [(.google.api.field_behavior) = OPTIONAL];
        Parameters:
        value - The purpose to set.
        Returns:
        This builder for chaining.
      • clearPurpose

        public TagKey.Builder clearPurpose()
         Optional. A purpose denotes that this Tag is intended for use in policies
         of a specific policy engine, and will involve that policy engine in
         management operations involving this Tag. A purpose does not grant a
         policy engine exclusive rights to the Tag, and it may be referenced by
         other policy engines.
        
         A purpose cannot be changed once set.
         
        .google.cloud.resourcemanager.v3.Purpose purpose = 11 [(.google.api.field_behavior) = OPTIONAL];
        Returns:
        This builder for chaining.
      • getPurposeDataCount

        public int getPurposeDataCount()
        Description copied from interface: TagKeyOrBuilder
         Optional. Purpose data corresponds to the policy system that the tag is
         intended for. See documentation for `Purpose` for formatting of this field.
        
         Purpose data cannot be changed once set.
         
        map<string, string> purpose_data = 12 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getPurposeDataCount in interface TagKeyOrBuilder
      • containsPurposeData

        public boolean containsPurposeData​(String key)
         Optional. Purpose data corresponds to the policy system that the tag is
         intended for. See documentation for `Purpose` for formatting of this field.
        
         Purpose data cannot be changed once set.
         
        map<string, string> purpose_data = 12 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        containsPurposeData in interface TagKeyOrBuilder
      • getPurposeDataMap

        public Map<String,​String> getPurposeDataMap()
         Optional. Purpose data corresponds to the policy system that the tag is
         intended for. See documentation for `Purpose` for formatting of this field.
        
         Purpose data cannot be changed once set.
         
        map<string, string> purpose_data = 12 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getPurposeDataMap in interface TagKeyOrBuilder
      • getPurposeDataOrDefault

        public String getPurposeDataOrDefault​(String key,
                                              String defaultValue)
         Optional. Purpose data corresponds to the policy system that the tag is
         intended for. See documentation for `Purpose` for formatting of this field.
        
         Purpose data cannot be changed once set.
         
        map<string, string> purpose_data = 12 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getPurposeDataOrDefault in interface TagKeyOrBuilder
      • getPurposeDataOrThrow

        public String getPurposeDataOrThrow​(String key)
         Optional. Purpose data corresponds to the policy system that the tag is
         intended for. See documentation for `Purpose` for formatting of this field.
        
         Purpose data cannot be changed once set.
         
        map<string, string> purpose_data = 12 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getPurposeDataOrThrow in interface TagKeyOrBuilder
      • removePurposeData

        public TagKey.Builder removePurposeData​(String key)
         Optional. Purpose data corresponds to the policy system that the tag is
         intended for. See documentation for `Purpose` for formatting of this field.
        
         Purpose data cannot be changed once set.
         
        map<string, string> purpose_data = 12 [(.google.api.field_behavior) = OPTIONAL];
      • getMutablePurposeData

        @Deprecated
        public Map<String,​String> getMutablePurposeData()
        Deprecated.
        Use alternate mutation accessors instead.
      • putPurposeData

        public TagKey.Builder putPurposeData​(String key,
                                             String value)
         Optional. Purpose data corresponds to the policy system that the tag is
         intended for. See documentation for `Purpose` for formatting of this field.
        
         Purpose data cannot be changed once set.
         
        map<string, string> purpose_data = 12 [(.google.api.field_behavior) = OPTIONAL];
      • putAllPurposeData

        public TagKey.Builder putAllPurposeData​(Map<String,​String> values)
         Optional. Purpose data corresponds to the policy system that the tag is
         intended for. See documentation for `Purpose` for formatting of this field.
        
         Purpose data cannot be changed once set.
         
        map<string, string> purpose_data = 12 [(.google.api.field_behavior) = OPTIONAL];
      • setUnknownFields

        public final TagKey.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<TagKey.Builder>
      • mergeUnknownFields

        public final TagKey.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<TagKey.Builder>