Class TagKey (1.22.0)

public final class TagKey extends GeneratedMessageV3 implements TagKeyOrBuilder

A TagKey, used to group a set of TagValues.

Protobuf type google.cloud.resourcemanager.v3.TagKey

Implements

TagKeyOrBuilder

Static Fields

CREATE_TIME_FIELD_NUMBER

public static final int CREATE_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

DESCRIPTION_FIELD_NUMBER

public static final int DESCRIPTION_FIELD_NUMBER
Field Value
TypeDescription
int

ETAG_FIELD_NUMBER

public static final int ETAG_FIELD_NUMBER
Field Value
TypeDescription
int

NAMESPACED_NAME_FIELD_NUMBER

public static final int NAMESPACED_NAME_FIELD_NUMBER
Field Value
TypeDescription
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

PARENT_FIELD_NUMBER

public static final int PARENT_FIELD_NUMBER
Field Value
TypeDescription
int

PURPOSE_DATA_FIELD_NUMBER

public static final int PURPOSE_DATA_FIELD_NUMBER
Field Value
TypeDescription
int

PURPOSE_FIELD_NUMBER

public static final int PURPOSE_FIELD_NUMBER
Field Value
TypeDescription
int

SHORT_NAME_FIELD_NUMBER

public static final int SHORT_NAME_FIELD_NUMBER
Field Value
TypeDescription
int

UPDATE_TIME_FIELD_NUMBER

public static final int UPDATE_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static TagKey getDefaultInstance()
Returns
TypeDescription
TagKey

getDescriptor()

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

newBuilder()

public static TagKey.Builder newBuilder()
Returns
TypeDescription
TagKey.Builder

newBuilder(TagKey prototype)

public static TagKey.Builder newBuilder(TagKey prototype)
Parameter
NameDescription
prototypeTagKey
Returns
TypeDescription
TagKey.Builder

parseDelimitedFrom(InputStream input)

public static TagKey parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
TagKey
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static TagKey parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TagKey
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static TagKey parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
TagKey
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static TagKey parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TagKey
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static TagKey parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
TagKey
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static TagKey parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TagKey
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static TagKey parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
TagKey
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static TagKey parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TagKey
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static TagKey parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
TagKey
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static TagKey parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TagKey
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static TagKey parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
TagKey
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static TagKey parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TagKey
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<TagKey> parser()
Returns
TypeDescription
Parser<TagKey>

Methods

containsPurposeData(String key)

public boolean containsPurposeData(String key)

Optional. Purpose data corresponds to the policy system that the tag is intended for. See documentation for Purpose for formatting of this field.

Purpose data cannot be changed once set.

map<string, string> purpose_data = 12 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getCreateTime()

public Timestamp getCreateTime()

Output only. Creation time.

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Timestamp

The createTime.

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. Creation time.

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
TimestampOrBuilder

getDefaultInstanceForType()

public TagKey getDefaultInstanceForType()
Returns
TypeDescription
TagKey

getDescription()

public String getDescription()

Optional. User-assigned description of the TagKey. Must not exceed 256 characters.

Read-write.

string description = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Optional. User-assigned description of the TagKey. Must not exceed 256 characters.

Read-write.

string description = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ByteString

The bytes for description.

getEtag()

public String getEtag()

Optional. Entity tag which users can pass to prevent race conditions. This field is always set in server responses. See UpdateTagKeyRequest for details.

string etag = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
String

The etag.

getEtagBytes()

public ByteString getEtagBytes()

Optional. Entity tag which users can pass to prevent race conditions. This field is always set in server responses. See UpdateTagKeyRequest for details.

string etag = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ByteString

The bytes for etag.

getName()

public String getName()

Immutable. The resource name for a TagKey. Must be in the format tagKeys/{tag_key_id}, where tag_key_id is the generated numeric id for the TagKey.

string name = 1 [(.google.api.field_behavior) = IMMUTABLE];

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

Immutable. The resource name for a TagKey. Must be in the format tagKeys/{tag_key_id}, where tag_key_id is the generated numeric id for the TagKey.

string name = 1 [(.google.api.field_behavior) = IMMUTABLE];

Returns
TypeDescription
ByteString

The bytes for name.

getNamespacedName()

public String getNamespacedName()

Output only. Immutable. Namespaced name of the TagKey.

string namespaced_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];

Returns
TypeDescription
String

The namespacedName.

getNamespacedNameBytes()

public ByteString getNamespacedNameBytes()

Output only. Immutable. Namespaced name of the TagKey.

string namespaced_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];

Returns
TypeDescription
ByteString

The bytes for namespacedName.

getParent()

public String getParent()

Immutable. The resource name of the TagKey's parent. A TagKey can be parented by an Organization or a Project. For a TagKey parented by an Organization, its parent must be in the form organizations/{org_id}. For a TagKey parented by a Project, its parent can be in the form projects/{project_id} or projects/{project_number}.

string parent = 2 [(.google.api.field_behavior) = IMMUTABLE];

Returns
TypeDescription
String

The parent.

getParentBytes()

public ByteString getParentBytes()

Immutable. The resource name of the TagKey's parent. A TagKey can be parented by an Organization or a Project. For a TagKey parented by an Organization, its parent must be in the form organizations/{org_id}. For a TagKey parented by a Project, its parent can be in the form projects/{project_id} or projects/{project_number}.

string parent = 2 [(.google.api.field_behavior) = IMMUTABLE];

Returns
TypeDescription
ByteString

The bytes for parent.

getParserForType()

public Parser<TagKey> getParserForType()
Returns
TypeDescription
Parser<TagKey>
Overrides

getPurpose()

public Purpose getPurpose()

Optional. A purpose denotes that this Tag is intended for use in policies of a specific policy engine, and will involve that policy engine in management operations involving this Tag. A purpose does not grant a policy engine exclusive rights to the Tag, and it may be referenced by other policy engines.

A purpose cannot be changed once set.

.google.cloud.resourcemanager.v3.Purpose purpose = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
Purpose

The purpose.

getPurposeData()

public Map<String,String> getPurposeData()

Use #getPurposeDataMap() instead.

Returns
TypeDescription
Map<String,String>

getPurposeDataCount()

public int getPurposeDataCount()

Optional. Purpose data corresponds to the policy system that the tag is intended for. See documentation for Purpose for formatting of this field.

Purpose data cannot be changed once set.

map<string, string> purpose_data = 12 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
int

getPurposeDataMap()

public Map<String,String> getPurposeDataMap()

Optional. Purpose data corresponds to the policy system that the tag is intended for. See documentation for Purpose for formatting of this field.

Purpose data cannot be changed once set.

map<string, string> purpose_data = 12 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
Map<String,String>

getPurposeDataOrDefault(String key, String defaultValue)

public String getPurposeDataOrDefault(String key, String defaultValue)

Optional. Purpose data corresponds to the policy system that the tag is intended for. See documentation for Purpose for formatting of this field.

Purpose data cannot be changed once set.

map<string, string> purpose_data = 12 [(.google.api.field_behavior) = OPTIONAL];

Parameters
NameDescription
keyString
defaultValueString
Returns
TypeDescription
String

getPurposeDataOrThrow(String key)

public String getPurposeDataOrThrow(String key)

Optional. Purpose data corresponds to the policy system that the tag is intended for. See documentation for Purpose for formatting of this field.

Purpose data cannot be changed once set.

map<string, string> purpose_data = 12 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
keyString
Returns
TypeDescription
String

getPurposeValue()

public int getPurposeValue()

Optional. A purpose denotes that this Tag is intended for use in policies of a specific policy engine, and will involve that policy engine in management operations involving this Tag. A purpose does not grant a policy engine exclusive rights to the Tag, and it may be referenced by other policy engines.

A purpose cannot be changed once set.

.google.cloud.resourcemanager.v3.Purpose purpose = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
int

The enum numeric value on the wire for purpose.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getShortName()

public String getShortName()

Required. Immutable. The user friendly name for a TagKey. The short name should be unique for TagKeys within the same tag namespace.

The short name must be 1-63 characters, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between.

string short_name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
TypeDescription
String

The shortName.

getShortNameBytes()

public ByteString getShortNameBytes()

Required. Immutable. The user friendly name for a TagKey. The short name should be unique for TagKeys within the same tag namespace.

The short name must be 1-63 characters, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between.

string short_name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
TypeDescription
ByteString

The bytes for shortName.

getUpdateTime()

public Timestamp getUpdateTime()

Output only. Update time.

.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Timestamp

The updateTime.

getUpdateTimeOrBuilder()

public TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. Update time.

.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
TimestampOrBuilder

hasCreateTime()

public boolean hasCreateTime()

Output only. Creation time.

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
boolean

Whether the createTime field is set.

hasUpdateTime()

public boolean hasUpdateTime()

Output only. Update time.

.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
boolean

Whether the updateTime field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public TagKey.Builder newBuilderForType()
Returns
TypeDescription
TagKey.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected TagKey.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
TagKey.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public TagKey.Builder toBuilder()
Returns
TypeDescription
TagKey.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException