Class Tag.Builder (0.3.0)

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

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

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.

clearOneof(Descriptors.OneofDescriptor oneof)

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

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.

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

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

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.

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

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.

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