Class TagValue.Builder (1.56.0)

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

Implements

TagValueOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public TagValue.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
TagValue.Builder
Overrides

build()

public TagValue build()
Returns
Type Description
TagValue

buildPartial()

public TagValue buildPartial()
Returns
Type Description
TagValue

clear()

public TagValue.Builder clear()
Returns
Type Description
TagValue.Builder
Overrides

clearCreateTime()

public TagValue.Builder clearCreateTime()

Output only. Creation time.

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TagValue.Builder

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
Type Description
TagValue.Builder

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
Type Description
TagValue.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public TagValue.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
TagValue.Builder
Overrides

clearName()

public TagValue.Builder clearName()

Immutable. Resource name for TagValue in the format tagValues/456.

string name = 1 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
TagValue.Builder

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
Type Description
TagValue.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public TagValue.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
TagValue.Builder
Overrides

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
Type Description
TagValue.Builder

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
Type Description
TagValue.Builder

This builder for chaining.

clearUpdateTime()

public TagValue.Builder clearUpdateTime()

Output only. Update time.

.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TagValue.Builder

clone()

public TagValue.Builder clone()
Returns
Type Description
TagValue.Builder
Overrides

getCreateTime()

public Timestamp getCreateTime()

Output only. Creation time.

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The createTime.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

Output only. Creation time.

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. Creation time.

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getDefaultInstanceForType()

public TagValue getDefaultInstanceForType()
Returns
Type Description
TagValue

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

Returns
Type Description
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Optional. User-assigned description of the TagValue. Must not exceed 256 characters.

Read-write.

string description = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for description.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

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

Returns
Type Description
String

The etag.

getEtagBytes()

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

Returns
Type Description
ByteString

The bytes for etag.

getName()

public String getName()

Immutable. Resource name for TagValue in the format tagValues/456.

string name = 1 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Immutable. Resource name for TagValue in the format tagValues/456.

string name = 1 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
ByteString

The bytes for name.

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

Returns
Type Description
String

The namespacedName.

getNamespacedNameBytes()

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

Returns
Type Description
ByteString

The bytes for namespacedName.

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

Returns
Type Description
String

The parent.

getParentBytes()

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

Returns
Type Description
ByteString

The bytes for parent.

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

Returns
Type Description
String

The shortName.

getShortNameBytes()

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

Returns
Type Description
ByteString

The bytes for shortName.

getUpdateTime()

public Timestamp getUpdateTime()

Output only. Update time.

.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The updateTime.

getUpdateTimeBuilder()

public Timestamp.Builder getUpdateTimeBuilder()

Output only. Update time.

.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getUpdateTimeOrBuilder()

public TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. Update time.

.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

hasCreateTime()

public boolean hasCreateTime()

Output only. Creation time.

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the createTime field is set.

hasUpdateTime()

public boolean hasUpdateTime()

Output only. Update time.

.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the updateTime field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeCreateTime(Timestamp value)

public TagValue.Builder mergeCreateTime(Timestamp value)

Output only. Creation time.

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
TagValue.Builder

mergeFrom(TagValue other)

public TagValue.Builder mergeFrom(TagValue other)
Parameter
Name Description
other TagValue
Returns
Type Description
TagValue.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public TagValue.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TagValue.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public TagValue.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
TagValue.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final TagValue.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
TagValue.Builder
Overrides

mergeUpdateTime(Timestamp value)

public TagValue.Builder mergeUpdateTime(Timestamp value)

Output only. Update time.

.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
TagValue.Builder

setCreateTime(Timestamp value)

public TagValue.Builder setCreateTime(Timestamp value)

Output only. Creation time.

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
TagValue.Builder

setCreateTime(Timestamp.Builder builderForValue)

public TagValue.Builder setCreateTime(Timestamp.Builder builderForValue)

Output only. Creation time.

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
TagValue.Builder

setDescription(String value)

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

Parameter
Name Description
value String

The description to set.

Returns
Type Description
TagValue.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public TagValue.Builder setDescriptionBytes(ByteString value)

Optional. User-assigned description of the TagValue. Must not exceed 256 characters.

Read-write.

string description = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for description to set.

Returns
Type Description
TagValue.Builder

This builder for chaining.

setEtag(String value)

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

Parameter
Name Description
value String

The etag to set.

Returns
Type Description
TagValue.Builder

This builder for chaining.

setEtagBytes(ByteString value)

public TagValue.Builder setEtagBytes(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];

Parameter
Name Description
value ByteString

The bytes for etag to set.

Returns
Type Description
TagValue.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public TagValue.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
TagValue.Builder
Overrides

setName(String value)

public TagValue.Builder setName(String value)

Immutable. Resource name for TagValue in the format tagValues/456.

string name = 1 [(.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value String

The name to set.

Returns
Type Description
TagValue.Builder

This builder for chaining.

setNameBytes(ByteString value)

public TagValue.Builder setNameBytes(ByteString value)

Immutable. Resource name for TagValue in the format tagValues/456.

string name = 1 [(.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
TagValue.Builder

This builder for chaining.

setNamespacedName(String value)

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

Parameter
Name Description
value String

The namespacedName to set.

Returns
Type Description
TagValue.Builder

This builder for chaining.

setNamespacedNameBytes(ByteString value)

public TagValue.Builder setNamespacedNameBytes(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];

Parameter
Name Description
value ByteString

The bytes for namespacedName to set.

Returns
Type Description
TagValue.Builder

This builder for chaining.

setParent(String value)

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

Parameter
Name Description
value String

The parent to set.

Returns
Type Description
TagValue.Builder

This builder for chaining.

setParentBytes(ByteString value)

public TagValue.Builder setParentBytes(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];

Parameter
Name Description
value ByteString

The bytes for parent to set.

Returns
Type Description
TagValue.Builder

This builder for chaining.

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

public TagValue.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
TagValue.Builder
Overrides

setShortName(String value)

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

Parameter
Name Description
value String

The shortName to set.

Returns
Type Description
TagValue.Builder

This builder for chaining.

setShortNameBytes(ByteString value)

public TagValue.Builder setShortNameBytes(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];

Parameter
Name Description
value ByteString

The bytes for shortName to set.

Returns
Type Description
TagValue.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final TagValue.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
TagValue.Builder
Overrides

setUpdateTime(Timestamp value)

public TagValue.Builder setUpdateTime(Timestamp value)

Output only. Update time.

.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
TagValue.Builder

setUpdateTime(Timestamp.Builder builderForValue)

public TagValue.Builder setUpdateTime(Timestamp.Builder builderForValue)

Output only. Update time.

.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
TagValue.Builder