Class Tag (0.6.0)

public final class Tag extends GeneratedMessage implements TagOrBuilder

Tag is a key value pair attached to a resource.

Protobuf type google.cloud.databasecenter.v1beta.Tag

Implements

TagOrBuilder

Static Fields

INHERITED_FIELD_NUMBER

public static final int INHERITED_FIELD_NUMBER
Field Value
Type Description
int

KEY_FIELD_NUMBER

public static final int KEY_FIELD_NUMBER
Field Value
Type Description
int

SOURCE_FIELD_NUMBER

public static final int SOURCE_FIELD_NUMBER
Field Value
Type Description
int

VALUE_FIELD_NUMBER

public static final int VALUE_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static Tag getDefaultInstance()
Returns
Type Description
Tag

getDescriptor()

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

newBuilder()

public static Tag.Builder newBuilder()
Returns
Type Description
Tag.Builder

newBuilder(Tag prototype)

public static Tag.Builder newBuilder(Tag prototype)
Parameter
Name Description
prototype Tag
Returns
Type Description
Tag.Builder

parseDelimitedFrom(InputStream input)

public static Tag parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Tag
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Tag parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Tag
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static Tag parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
Tag
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Tag parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Tag
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Tag parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
Tag
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Tag parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Tag
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Tag parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Tag
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Tag parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Tag
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static Tag parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Tag
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Tag parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Tag
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static Tag parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Tag
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Tag parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Tag
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<Tag> parser()
Returns
Type Description
Parser<Tag>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

public Tag getDefaultInstanceForType()
Returns
Type Description
Tag

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.

getParserForType()

public Parser<Tag> getParserForType()
Returns
Type Description
Parser<Tag>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

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.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public Tag.Builder newBuilderForType()
Returns
Type Description
Tag.Builder

newBuilderForType(AbstractMessage.BuilderParent parent)

protected Tag.Builder newBuilderForType(AbstractMessage.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Tag.Builder
Overrides

toBuilder()

public Tag.Builder toBuilder()
Returns
Type Description
Tag.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException