Class EffectiveTag.Builder (1.33.0)

public static final class EffectiveTag.Builder extends GeneratedMessageV3.Builder<EffectiveTag.Builder> implements EffectiveTagOrBuilder

An EffectiveTag represents a tag that applies to a resource during policy evaluation. Tags can be either directly bound to a resource or inherited from its ancestor. EffectiveTag contains the name and namespaced_name of the tag value and tag key, with additional fields of inherited to indicate the inheritance status of the effective tag.

Protobuf type google.cloud.resourcemanager.v3.EffectiveTag

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public EffectiveTag.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
EffectiveTag.Builder
Overrides

build()

public EffectiveTag build()
Returns
TypeDescription
EffectiveTag

buildPartial()

public EffectiveTag buildPartial()
Returns
TypeDescription
EffectiveTag

clear()

public EffectiveTag.Builder clear()
Returns
TypeDescription
EffectiveTag.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public EffectiveTag.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
EffectiveTag.Builder
Overrides

clearInherited()

public EffectiveTag.Builder clearInherited()

Indicates the inheritance status of a tag value attached to the given resource. If the tag value is inherited from one of the resource's ancestors, inherited will be true. If false, then the tag value is directly attached to the resource, inherited will be false.

bool inherited = 5;

Returns
TypeDescription
EffectiveTag.Builder

This builder for chaining.

clearNamespacedTagKey()

public EffectiveTag.Builder clearNamespacedTagKey()

The namespaced name of the TagKey. Can be in the form {organization_id}/{tag_key_short_name} or {project_id}/{tag_key_short_name} or {project_number}/{tag_key_short_name}.

string namespaced_tag_key = 4;

Returns
TypeDescription
EffectiveTag.Builder

This builder for chaining.

clearNamespacedTagValue()

public EffectiveTag.Builder clearNamespacedTagValue()

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_tag_value = 2;

Returns
TypeDescription
EffectiveTag.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public EffectiveTag.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
EffectiveTag.Builder
Overrides

clearTagKey()

public EffectiveTag.Builder clearTagKey()

The name of the TagKey, in the format tagKeys/{id}, such as tagKeys/123.

string tag_key = 3 [(.google.api.resource_reference) = { ... }

Returns
TypeDescription
EffectiveTag.Builder

This builder for chaining.

clearTagKeyParentName()

public EffectiveTag.Builder clearTagKeyParentName()

The parent name of the tag key. Must be in the format organizations/{organization_id} or projects/{project_number}

string tag_key_parent_name = 6;

Returns
TypeDescription
EffectiveTag.Builder

This builder for chaining.

clearTagValue()

public EffectiveTag.Builder clearTagValue()

Resource name for TagValue in the format tagValues/456.

string tag_value = 1 [(.google.api.resource_reference) = { ... }

Returns
TypeDescription
EffectiveTag.Builder

This builder for chaining.

clone()

public EffectiveTag.Builder clone()
Returns
TypeDescription
EffectiveTag.Builder
Overrides

getDefaultInstanceForType()

public EffectiveTag getDefaultInstanceForType()
Returns
TypeDescription
EffectiveTag

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getInherited()

public boolean getInherited()

Indicates the inheritance status of a tag value attached to the given resource. If the tag value is inherited from one of the resource's ancestors, inherited will be true. If false, then the tag value is directly attached to the resource, inherited will be false.

bool inherited = 5;

Returns
TypeDescription
boolean

The inherited.

getNamespacedTagKey()

public String getNamespacedTagKey()

The namespaced name of the TagKey. Can be in the form {organization_id}/{tag_key_short_name} or {project_id}/{tag_key_short_name} or {project_number}/{tag_key_short_name}.

string namespaced_tag_key = 4;

Returns
TypeDescription
String

The namespacedTagKey.

getNamespacedTagKeyBytes()

public ByteString getNamespacedTagKeyBytes()

The namespaced name of the TagKey. Can be in the form {organization_id}/{tag_key_short_name} or {project_id}/{tag_key_short_name} or {project_number}/{tag_key_short_name}.

string namespaced_tag_key = 4;

Returns
TypeDescription
ByteString

The bytes for namespacedTagKey.

getNamespacedTagValue()

public String getNamespacedTagValue()

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_tag_value = 2;

Returns
TypeDescription
String

The namespacedTagValue.

getNamespacedTagValueBytes()

public ByteString getNamespacedTagValueBytes()

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_tag_value = 2;

Returns
TypeDescription
ByteString

The bytes for namespacedTagValue.

getTagKey()

public String getTagKey()

The name of the TagKey, in the format tagKeys/{id}, such as tagKeys/123.

string tag_key = 3 [(.google.api.resource_reference) = { ... }

Returns
TypeDescription
String

The tagKey.

getTagKeyBytes()

public ByteString getTagKeyBytes()

The name of the TagKey, in the format tagKeys/{id}, such as tagKeys/123.

string tag_key = 3 [(.google.api.resource_reference) = { ... }

Returns
TypeDescription
ByteString

The bytes for tagKey.

getTagKeyParentName()

public String getTagKeyParentName()

The parent name of the tag key. Must be in the format organizations/{organization_id} or projects/{project_number}

string tag_key_parent_name = 6;

Returns
TypeDescription
String

The tagKeyParentName.

getTagKeyParentNameBytes()

public ByteString getTagKeyParentNameBytes()

The parent name of the tag key. Must be in the format organizations/{organization_id} or projects/{project_number}

string tag_key_parent_name = 6;

Returns
TypeDescription
ByteString

The bytes for tagKeyParentName.

getTagValue()

public String getTagValue()

Resource name for TagValue in the format tagValues/456.

string tag_value = 1 [(.google.api.resource_reference) = { ... }

Returns
TypeDescription
String

The tagValue.

getTagValueBytes()

public ByteString getTagValueBytes()

Resource name for TagValue in the format tagValues/456.

string tag_value = 1 [(.google.api.resource_reference) = { ... }

Returns
TypeDescription
ByteString

The bytes for tagValue.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(EffectiveTag other)

public EffectiveTag.Builder mergeFrom(EffectiveTag other)
Parameter
NameDescription
otherEffectiveTag
Returns
TypeDescription
EffectiveTag.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public EffectiveTag.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
EffectiveTag.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public EffectiveTag.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
EffectiveTag.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final EffectiveTag.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
EffectiveTag.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public EffectiveTag.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
EffectiveTag.Builder
Overrides

setInherited(boolean value)

public EffectiveTag.Builder setInherited(boolean value)

Indicates the inheritance status of a tag value attached to the given resource. If the tag value is inherited from one of the resource's ancestors, inherited will be true. If false, then the tag value is directly attached to the resource, inherited will be false.

bool inherited = 5;

Parameter
NameDescription
valueboolean

The inherited to set.

Returns
TypeDescription
EffectiveTag.Builder

This builder for chaining.

setNamespacedTagKey(String value)

public EffectiveTag.Builder setNamespacedTagKey(String value)

The namespaced name of the TagKey. Can be in the form {organization_id}/{tag_key_short_name} or {project_id}/{tag_key_short_name} or {project_number}/{tag_key_short_name}.

string namespaced_tag_key = 4;

Parameter
NameDescription
valueString

The namespacedTagKey to set.

Returns
TypeDescription
EffectiveTag.Builder

This builder for chaining.

setNamespacedTagKeyBytes(ByteString value)

public EffectiveTag.Builder setNamespacedTagKeyBytes(ByteString value)

The namespaced name of the TagKey. Can be in the form {organization_id}/{tag_key_short_name} or {project_id}/{tag_key_short_name} or {project_number}/{tag_key_short_name}.

string namespaced_tag_key = 4;

Parameter
NameDescription
valueByteString

The bytes for namespacedTagKey to set.

Returns
TypeDescription
EffectiveTag.Builder

This builder for chaining.

setNamespacedTagValue(String value)

public EffectiveTag.Builder setNamespacedTagValue(String value)

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_tag_value = 2;

Parameter
NameDescription
valueString

The namespacedTagValue to set.

Returns
TypeDescription
EffectiveTag.Builder

This builder for chaining.

setNamespacedTagValueBytes(ByteString value)

public EffectiveTag.Builder setNamespacedTagValueBytes(ByteString value)

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_tag_value = 2;

Parameter
NameDescription
valueByteString

The bytes for namespacedTagValue to set.

Returns
TypeDescription
EffectiveTag.Builder

This builder for chaining.

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

public EffectiveTag.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
EffectiveTag.Builder
Overrides

setTagKey(String value)

public EffectiveTag.Builder setTagKey(String value)

The name of the TagKey, in the format tagKeys/{id}, such as tagKeys/123.

string tag_key = 3 [(.google.api.resource_reference) = { ... }

Parameter
NameDescription
valueString

The tagKey to set.

Returns
TypeDescription
EffectiveTag.Builder

This builder for chaining.

setTagKeyBytes(ByteString value)

public EffectiveTag.Builder setTagKeyBytes(ByteString value)

The name of the TagKey, in the format tagKeys/{id}, such as tagKeys/123.

string tag_key = 3 [(.google.api.resource_reference) = { ... }

Parameter
NameDescription
valueByteString

The bytes for tagKey to set.

Returns
TypeDescription
EffectiveTag.Builder

This builder for chaining.

setTagKeyParentName(String value)

public EffectiveTag.Builder setTagKeyParentName(String value)

The parent name of the tag key. Must be in the format organizations/{organization_id} or projects/{project_number}

string tag_key_parent_name = 6;

Parameter
NameDescription
valueString

The tagKeyParentName to set.

Returns
TypeDescription
EffectiveTag.Builder

This builder for chaining.

setTagKeyParentNameBytes(ByteString value)

public EffectiveTag.Builder setTagKeyParentNameBytes(ByteString value)

The parent name of the tag key. Must be in the format organizations/{organization_id} or projects/{project_number}

string tag_key_parent_name = 6;

Parameter
NameDescription
valueByteString

The bytes for tagKeyParentName to set.

Returns
TypeDescription
EffectiveTag.Builder

This builder for chaining.

setTagValue(String value)

public EffectiveTag.Builder setTagValue(String value)

Resource name for TagValue in the format tagValues/456.

string tag_value = 1 [(.google.api.resource_reference) = { ... }

Parameter
NameDescription
valueString

The tagValue to set.

Returns
TypeDescription
EffectiveTag.Builder

This builder for chaining.

setTagValueBytes(ByteString value)

public EffectiveTag.Builder setTagValueBytes(ByteString value)

Resource name for TagValue in the format tagValues/456.

string tag_value = 1 [(.google.api.resource_reference) = { ... }

Parameter
NameDescription
valueByteString

The bytes for tagValue to set.

Returns
TypeDescription
EffectiveTag.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final EffectiveTag.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
EffectiveTag.Builder
Overrides