Class MonitoredResourceMetadata (2.50.0)

public final class MonitoredResourceMetadata extends GeneratedMessageV3 implements MonitoredResourceMetadataOrBuilder

Auxiliary metadata for a MonitoredResource object. MonitoredResource objects contain the minimum set of information to uniquely identify a monitored resource instance. There is some other useful auxiliary metadata. Monitoring and Logging use an ingestion pipeline to extract metadata for cloud resources of all types, and store the metadata in this message.

Protobuf type google.api.MonitoredResourceMetadata

Static Fields

SYSTEM_LABELS_FIELD_NUMBER

public static final int SYSTEM_LABELS_FIELD_NUMBER
Field Value
Type Description
int

USER_LABELS_FIELD_NUMBER

public static final int USER_LABELS_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static MonitoredResourceMetadata getDefaultInstance()
Returns
Type Description
MonitoredResourceMetadata

getDescriptor()

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

newBuilder()

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

newBuilder(MonitoredResourceMetadata prototype)

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

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

containsUserLabels(String key)

public boolean containsUserLabels(String key)

Output only. A map of user-defined metadata labels.

map<string, string> user_labels = 2;

Parameter
Name Description
key String
Returns
Type Description
boolean

equals(Object obj)

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

getDefaultInstanceForType()

public MonitoredResourceMetadata getDefaultInstanceForType()
Returns
Type Description
MonitoredResourceMetadata

getParserForType()

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

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getSystemLabels()

public Struct getSystemLabels()

Output only. Values for predefined system metadata labels. System labels are a kind of metadata extracted by Google, including "machine_image", "vpc", "subnet_id", "security_group", "name", etc. System label values can be only strings, Boolean values, or a list of strings. For example:

 { "name": "my-test-instance",
   "security_group": ["a", "b", "c"],
   "spot_instance": false }

.google.protobuf.Struct system_labels = 1;

Returns
Type Description
Struct

The systemLabels.

getSystemLabelsOrBuilder()

public StructOrBuilder getSystemLabelsOrBuilder()

Output only. Values for predefined system metadata labels. System labels are a kind of metadata extracted by Google, including "machine_image", "vpc", "subnet_id", "security_group", "name", etc. System label values can be only strings, Boolean values, or a list of strings. For example:

 { "name": "my-test-instance",
   "security_group": ["a", "b", "c"],
   "spot_instance": false }

.google.protobuf.Struct system_labels = 1;

Returns
Type Description
StructOrBuilder

getUserLabels() (deprecated)

public Map<String,String> getUserLabels()

Use #getUserLabelsMap() instead.

Returns
Type Description
Map<String,String>

getUserLabelsCount()

public int getUserLabelsCount()

Output only. A map of user-defined metadata labels.

map<string, string> user_labels = 2;

Returns
Type Description
int

getUserLabelsMap()

public Map<String,String> getUserLabelsMap()

Output only. A map of user-defined metadata labels.

map<string, string> user_labels = 2;

Returns
Type Description
Map<String,String>

getUserLabelsOrDefault(String key, String defaultValue)

public String getUserLabelsOrDefault(String key, String defaultValue)

Output only. A map of user-defined metadata labels.

map<string, string> user_labels = 2;

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getUserLabelsOrThrow(String key)

public String getUserLabelsOrThrow(String key)

Output only. A map of user-defined metadata labels.

map<string, string> user_labels = 2;

Parameter
Name Description
key String
Returns
Type Description
String

hasSystemLabels()

public boolean hasSystemLabels()

Output only. Values for predefined system metadata labels. System labels are a kind of metadata extracted by Google, including "machine_image", "vpc", "subnet_id", "security_group", "name", etc. System label values can be only strings, Boolean values, or a list of strings. For example:

 { "name": "my-test-instance",
   "security_group": ["a", "b", "c"],
   "spot_instance": false }

.google.protobuf.Struct system_labels = 1;

Returns
Type Description
boolean

Whether the systemLabels field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

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

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected MonitoredResourceMetadata.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
MonitoredResourceMetadata.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

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

writeTo(CodedOutputStream output)

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