# Interface TagOrBuilder (0.14.0)

0.14.0 (latest) 0.12.0 0.9.0 0.8.0 0.6.0 0.4.0 0.3.0 0.2.0 0.1.0

    public interface TagOrBuilder extends MessageOrBuilder

## Implements

[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)

## Methods

### getInherited()

    public abstract 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** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The inherited. |

### getKey()

    public abstract String getKey()

`string key = 1;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The key. |

### getKeyBytes()

    public abstract ByteString getKeyBytes()

`string key = 1;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for key. |

### getSource()

    public abstract 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** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The source. |

### getSourceBytes()

    public abstract 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** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for source. |

### getValue()

    public abstract String getValue()

The value part of the tag.

`string value = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The value. |

### getValueBytes()

    public abstract ByteString getValueBytes()

The value part of the tag.

`string value = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for value. |