Class Tag.Builder (3.66.0)

public static final class Tag.Builder extends GeneratedMessageV3.Builder<Tag.Builder> implements TagOrBuilder

A tag associated with a resource.

Protobuf type google.privacy.dlp.v2.Tag

Implements

TagOrBuilder

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Tag build()
Returns
Type Description
Tag

buildPartial()

public Tag buildPartial()
Returns
Type Description
Tag

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearKey()

public Tag.Builder clearKey()

The key of a tag key-value pair. For Google Cloud resources, this is the resource name of the key, for example, "tagKeys/123456".

string key = 2;

Returns
Type Description
Tag.Builder

This builder for chaining.

clearNamespacedTagValue()

public Tag.Builder clearNamespacedTagValue()

The namespaced name for the tag value to attach to Google Cloud resources. Must be in the format {parent_id}/{tag_key_short_name}/{short_name}, for example, "123456/environment/prod". This is only set for Google Cloud resources.

string namespaced_tag_value = 1;

Returns
Type Description
Tag.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearValue()

public Tag.Builder clearValue()

The value of a tag key-value pair. For Google Cloud resources, this is the resource name of the value, for example, "tagValues/123456".

string value = 3;

Returns
Type Description
Tag.Builder

This builder for chaining.

clone()

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

getDefaultInstanceForType()

public Tag getDefaultInstanceForType()
Returns
Type Description
Tag

getDescriptorForType()

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

getKey()

public String getKey()

The key of a tag key-value pair. For Google Cloud resources, this is the resource name of the key, for example, "tagKeys/123456".

string key = 2;

Returns
Type Description
String

The key.

getKeyBytes()

public ByteString getKeyBytes()

The key of a tag key-value pair. For Google Cloud resources, this is the resource name of the key, for example, "tagKeys/123456".

string key = 2;

Returns
Type Description
ByteString

The bytes for key.

getNamespacedTagValue()

public String getNamespacedTagValue()

The namespaced name for the tag value to attach to Google Cloud resources. Must be in the format {parent_id}/{tag_key_short_name}/{short_name}, for example, "123456/environment/prod". This is only set for Google Cloud resources.

string namespaced_tag_value = 1;

Returns
Type Description
String

The namespacedTagValue.

getNamespacedTagValueBytes()

public ByteString getNamespacedTagValueBytes()

The namespaced name for the tag value to attach to Google Cloud resources. Must be in the format {parent_id}/{tag_key_short_name}/{short_name}, for example, "123456/environment/prod". This is only set for Google Cloud resources.

string namespaced_tag_value = 1;

Returns
Type Description
ByteString

The bytes for namespacedTagValue.

getValue()

public String getValue()

The value of a tag key-value pair. For Google Cloud resources, this is the resource name of the value, for example, "tagValues/123456".

string value = 3;

Returns
Type Description
String

The value.

getValueBytes()

public ByteString getValueBytes()

The value of a tag key-value pair. For Google Cloud resources, this is the resource name of the value, for example, "tagValues/123456".

string value = 3;

Returns
Type Description
ByteString

The bytes for value.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Tag other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

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

setKey(String value)

public Tag.Builder setKey(String value)

The key of a tag key-value pair. For Google Cloud resources, this is the resource name of the key, for example, "tagKeys/123456".

string key = 2;

Parameter
Name Description
value String

The key to set.

Returns
Type Description
Tag.Builder

This builder for chaining.

setKeyBytes(ByteString value)

public Tag.Builder setKeyBytes(ByteString value)

The key of a tag key-value pair. For Google Cloud resources, this is the resource name of the key, for example, "tagKeys/123456".

string key = 2;

Parameter
Name Description
value ByteString

The bytes for key to set.

Returns
Type Description
Tag.Builder

This builder for chaining.

setNamespacedTagValue(String value)

public Tag.Builder setNamespacedTagValue(String value)

The namespaced name for the tag value to attach to Google Cloud resources. Must be in the format {parent_id}/{tag_key_short_name}/{short_name}, for example, "123456/environment/prod". This is only set for Google Cloud resources.

string namespaced_tag_value = 1;

Parameter
Name Description
value String

The namespacedTagValue to set.

Returns
Type Description
Tag.Builder

This builder for chaining.

setNamespacedTagValueBytes(ByteString value)

public Tag.Builder setNamespacedTagValueBytes(ByteString value)

The namespaced name for the tag value to attach to Google Cloud resources. Must be in the format {parent_id}/{tag_key_short_name}/{short_name}, for example, "123456/environment/prod". This is only set for Google Cloud resources.

string namespaced_tag_value = 1;

Parameter
Name Description
value ByteString

The bytes for namespacedTagValue to set.

Returns
Type Description
Tag.Builder

This builder for chaining.

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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

setValue(String value)

public Tag.Builder setValue(String value)

The value of a tag key-value pair. For Google Cloud resources, this is the resource name of the value, for example, "tagValues/123456".

string value = 3;

Parameter
Name Description
value String

The value to set.

Returns
Type Description
Tag.Builder

This builder for chaining.

setValueBytes(ByteString value)

public Tag.Builder setValueBytes(ByteString value)

The value of a tag key-value pair. For Google Cloud resources, this is the resource name of the value, for example, "tagValues/123456".

string value = 3;

Parameter
Name Description
value ByteString

The bytes for value to set.

Returns
Type Description
Tag.Builder

This builder for chaining.