Class TagValue.Builder

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

    public static final class TagValue.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<TagValue.Builder>
    implements TagValueOrBuilder
     A TagValue is a child of a particular TagKey. This is used to group
     cloud resources for the purpose of controlling them using policies.
     
    Protobuf type google.cloud.resourcemanager.v3.TagValue
    • Method Detail

      • getDescriptor

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

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

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

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

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

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

        public TagValue.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<TagValue.Builder>
      • setField

        public TagValue.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<TagValue.Builder>
      • clearField

        public TagValue.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<TagValue.Builder>
      • clearOneof

        public TagValue.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<TagValue.Builder>
      • setRepeatedField

        public TagValue.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<TagValue.Builder>
      • addRepeatedField

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

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

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

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

        public String getName()
         Immutable. Resource name for TagValue in the format `tagValues/456`.
         
        string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
        Specified by:
        getName in interface TagValueOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         Immutable. Resource name for TagValue in the format `tagValues/456`.
         
        string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
        Specified by:
        getNameBytes in interface TagValueOrBuilder
        Returns:
        The bytes for name.
      • setName

        public TagValue.Builder setName​(String value)
         Immutable. Resource name for TagValue in the format `tagValues/456`.
         
        string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
        Parameters:
        value - The name to set.
        Returns:
        This builder for chaining.
      • clearName

        public TagValue.Builder clearName()
         Immutable. Resource name for TagValue in the format `tagValues/456`.
         
        string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
        Returns:
        This builder for chaining.
      • setNameBytes

        public TagValue.Builder setNameBytes​(com.google.protobuf.ByteString value)
         Immutable. Resource name for TagValue in the format `tagValues/456`.
         
        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 new TagValue's parent TagKey.
         Must be of the form `tagKeys/{tag_key_id}`.
         
        string parent = 2 [(.google.api.field_behavior) = IMMUTABLE];
        Specified by:
        getParent in interface TagValueOrBuilder
        Returns:
        The parent.
      • getParentBytes

        public com.google.protobuf.ByteString getParentBytes()
         Immutable. The resource name of the new TagValue's parent TagKey.
         Must be of the form `tagKeys/{tag_key_id}`.
         
        string parent = 2 [(.google.api.field_behavior) = IMMUTABLE];
        Specified by:
        getParentBytes in interface TagValueOrBuilder
        Returns:
        The bytes for parent.
      • setParent

        public TagValue.Builder setParent​(String value)
         Immutable. The resource name of the new TagValue's parent TagKey.
         Must be of the form `tagKeys/{tag_key_id}`.
         
        string parent = 2 [(.google.api.field_behavior) = IMMUTABLE];
        Parameters:
        value - The parent to set.
        Returns:
        This builder for chaining.
      • clearParent

        public TagValue.Builder clearParent()
         Immutable. The resource name of the new TagValue's parent TagKey.
         Must be of the form `tagKeys/{tag_key_id}`.
         
        string parent = 2 [(.google.api.field_behavior) = IMMUTABLE];
        Returns:
        This builder for chaining.
      • setParentBytes

        public TagValue.Builder setParentBytes​(com.google.protobuf.ByteString value)
         Immutable. The resource name of the new TagValue's parent TagKey.
         Must be of the form `tagKeys/{tag_key_id}`.
         
        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. User-assigned short name for TagValue. The short name
         should be unique for TagValues within the same parent TagKey.
        
         The short name must be 63 characters or less, 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 TagValueOrBuilder
        Returns:
        The shortName.
      • getShortNameBytes

        public com.google.protobuf.ByteString getShortNameBytes()
         Required. Immutable. User-assigned short name for TagValue. The short name
         should be unique for TagValues within the same parent TagKey.
        
         The short name must be 63 characters or less, 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 TagValueOrBuilder
        Returns:
        The bytes for shortName.
      • setShortName

        public TagValue.Builder setShortName​(String value)
         Required. Immutable. User-assigned short name for TagValue. The short name
         should be unique for TagValues within the same parent TagKey.
        
         The short name must be 63 characters or less, 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 TagValue.Builder clearShortName()
         Required. Immutable. User-assigned short name for TagValue. The short name
         should be unique for TagValues within the same parent TagKey.
        
         The short name must be 63 characters or less, 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 TagValue.Builder setShortNameBytes​(com.google.protobuf.ByteString value)
         Required. Immutable. User-assigned short name for TagValue. The short name
         should be unique for TagValues within the same parent TagKey.
        
         The short name must be 63 characters or less, 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. The namespaced name of the TagValue. Can be in the form
         `{organization_id}/{tag_key_short_name}/{tag_value_short_name}` or
         `{project_id}/{tag_key_short_name}/{tag_value_short_name}` or
         `{project_number}/{tag_key_short_name}/{tag_value_short_name}`.
         
        string namespaced_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getNamespacedName in interface TagValueOrBuilder
        Returns:
        The namespacedName.
      • getNamespacedNameBytes

        public com.google.protobuf.ByteString getNamespacedNameBytes()
         Output only. The namespaced name of the TagValue. Can be in the form
         `{organization_id}/{tag_key_short_name}/{tag_value_short_name}` or
         `{project_id}/{tag_key_short_name}/{tag_value_short_name}` or
         `{project_number}/{tag_key_short_name}/{tag_value_short_name}`.
         
        string namespaced_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getNamespacedNameBytes in interface TagValueOrBuilder
        Returns:
        The bytes for namespacedName.
      • setNamespacedName

        public TagValue.Builder setNamespacedName​(String value)
         Output only. The namespaced name of the TagValue. Can be in the form
         `{organization_id}/{tag_key_short_name}/{tag_value_short_name}` or
         `{project_id}/{tag_key_short_name}/{tag_value_short_name}` or
         `{project_number}/{tag_key_short_name}/{tag_value_short_name}`.
         
        string namespaced_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Parameters:
        value - The namespacedName to set.
        Returns:
        This builder for chaining.
      • clearNamespacedName

        public TagValue.Builder clearNamespacedName()
         Output only. The namespaced name of the TagValue. Can be in the form
         `{organization_id}/{tag_key_short_name}/{tag_value_short_name}` or
         `{project_id}/{tag_key_short_name}/{tag_value_short_name}` or
         `{project_number}/{tag_key_short_name}/{tag_value_short_name}`.
         
        string namespaced_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Returns:
        This builder for chaining.
      • setNamespacedNameBytes

        public TagValue.Builder setNamespacedNameBytes​(com.google.protobuf.ByteString value)
         Output only. The namespaced name of the TagValue. Can be in the form
         `{organization_id}/{tag_key_short_name}/{tag_value_short_name}` or
         `{project_id}/{tag_key_short_name}/{tag_value_short_name}` or
         `{project_number}/{tag_key_short_name}/{tag_value_short_name}`.
         
        string namespaced_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Parameters:
        value - The bytes for namespacedName to set.
        Returns:
        This builder for chaining.
      • getDescription

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

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

        public TagValue.Builder setDescription​(String value)
         Optional. User-assigned description of the TagValue.
         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 TagValue.Builder clearDescription()
         Optional. User-assigned description of the TagValue.
         Must not exceed 256 characters.
        
         Read-write.
         
        string description = 5 [(.google.api.field_behavior) = OPTIONAL];
        Returns:
        This builder for chaining.
      • setDescriptionBytes

        public TagValue.Builder setDescriptionBytes​(com.google.protobuf.ByteString value)
         Optional. User-assigned description of the TagValue.
         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 TagValueOrBuilder
        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 TagValueOrBuilder
        Returns:
        The createTime.
      • setCreateTime

        public TagValue.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 TagValue.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 TagValue.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 TagValue.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 TagValueOrBuilder
      • 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 TagValueOrBuilder
        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 TagValueOrBuilder
        Returns:
        The updateTime.
      • setUpdateTime

        public TagValue.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 TagValue.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 TagValue.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 TagValue.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 TagValueOrBuilder
      • getEtag

        public String getEtag()
         Optional. Entity tag which users can pass to prevent race conditions. This
         field is always set in server responses. See UpdateTagValueRequest for
         details.
         
        string etag = 8 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getEtag in interface TagValueOrBuilder
        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 UpdateTagValueRequest for
         details.
         
        string etag = 8 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getEtagBytes in interface TagValueOrBuilder
        Returns:
        The bytes for etag.
      • setEtag

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

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

        public TagValue.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 UpdateTagValueRequest for
         details.
         
        string etag = 8 [(.google.api.field_behavior) = OPTIONAL];
        Parameters:
        value - The bytes for etag to set.
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final TagValue.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<TagValue.Builder>
      • mergeUnknownFields

        public final TagValue.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<TagValue.Builder>