Class Tag.Builder (0.6.0)

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

Tag is a key value pair attached to a resource.

Protobuf type google.cloud.databasecenter.v1beta.Tag

Implements

TagOrBuilder

Static Methods

getDescriptor()

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

Methods

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

clearInherited()

public Tag.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.

bool inherited = 4;

Returns
Type Description
Tag.Builder

This builder for chaining.

clearKey()

public Tag.Builder clearKey()

string key = 1;

Returns
Type Description
Tag.Builder

This builder for chaining.

clearSource()

public Tag.Builder clearSource()

The source of the tag. According to https://cloud.google.com/resource-manager/docs/tags/tags-overview#tags_and_labels, tags can be created only at the project or organization level. Tags can be inherited from different project as well not just the current project where the database resource is present. Format: "projects/{PROJECT_ID}", "projects/{PROJECT_NUMBER}", "organizations/{ORGANIZATION_ID}"

string source = 3;

Returns
Type Description
Tag.Builder

This builder for chaining.

clearValue()

public Tag.Builder clearValue()

The value part of the tag.

string value = 2;

Returns
Type Description
Tag.Builder

This builder for chaining.

getDefaultInstanceForType()

public Tag getDefaultInstanceForType()
Returns
Type Description
Tag

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
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.

bool inherited = 4;

Returns
Type Description
boolean

The inherited.

getKey()

public String getKey()

string key = 1;

Returns
Type Description
String

The key.

getKeyBytes()

public ByteString getKeyBytes()

string key = 1;

Returns
Type Description
ByteString

The bytes for key.

getSource()

public String getSource()

The source of the tag. According to https://cloud.google.com/resource-manager/docs/tags/tags-overview#tags_and_labels, tags can be created only at the project or organization level. Tags can be inherited from different project as well not just the current project where the database resource is present. Format: "projects/{PROJECT_ID}", "projects/{PROJECT_NUMBER}", "organizations/{ORGANIZATION_ID}"

string source = 3;

Returns
Type Description
String

The source.

getSourceBytes()

public ByteString getSourceBytes()

The source of the tag. According to https://cloud.google.com/resource-manager/docs/tags/tags-overview#tags_and_labels, tags can be created only at the project or organization level. Tags can be inherited from different project as well not just the current project where the database resource is present. Format: "projects/{PROJECT_ID}", "projects/{PROJECT_NUMBER}", "organizations/{ORGANIZATION_ID}"

string source = 3;

Returns
Type Description
ByteString

The bytes for source.

getValue()

public String getValue()

The value part of the tag.

string value = 2;

Returns
Type Description
String

The value.

getValueBytes()

public ByteString getValueBytes()

The value part of the tag.

string value = 2;

Returns
Type Description
ByteString

The bytes for value.

internalGetFieldAccessorTable()

protected GeneratedMessage.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

setInherited(boolean value)

public Tag.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.

bool inherited = 4;

Parameter
Name Description
value boolean

The inherited to set.

Returns
Type Description
Tag.Builder

This builder for chaining.

setKey(String value)

public Tag.Builder setKey(String value)

string key = 1;

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)

string key = 1;

Parameter
Name Description
value ByteString

The bytes for key to set.

Returns
Type Description
Tag.Builder

This builder for chaining.

setSource(String value)

public Tag.Builder setSource(String value)

The source of the tag. According to https://cloud.google.com/resource-manager/docs/tags/tags-overview#tags_and_labels, tags can be created only at the project or organization level. Tags can be inherited from different project as well not just the current project where the database resource is present. Format: "projects/{PROJECT_ID}", "projects/{PROJECT_NUMBER}", "organizations/{ORGANIZATION_ID}"

string source = 3;

Parameter
Name Description
value String

The source to set.

Returns
Type Description
Tag.Builder

This builder for chaining.

setSourceBytes(ByteString value)

public Tag.Builder setSourceBytes(ByteString value)

The source of the tag. According to https://cloud.google.com/resource-manager/docs/tags/tags-overview#tags_and_labels, tags can be created only at the project or organization level. Tags can be inherited from different project as well not just the current project where the database resource is present. Format: "projects/{PROJECT_ID}", "projects/{PROJECT_NUMBER}", "organizations/{ORGANIZATION_ID}"

string source = 3;

Parameter
Name Description
value ByteString

The bytes for source to set.

Returns
Type Description
Tag.Builder

This builder for chaining.

setValue(String value)

public Tag.Builder setValue(String value)

The value part of the tag.

string value = 2;

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 part of the tag.

string value = 2;

Parameter
Name Description
value ByteString

The bytes for value to set.

Returns
Type Description
Tag.Builder

This builder for chaining.