Class MonitoredResourceMetadata (2.37.1)

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

USER_LABELS_FIELD_NUMBER

public static final int USER_LABELS_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static MonitoredResourceMetadata getDefaultInstance()
Returns
TypeDescription
MonitoredResourceMetadata

getDescriptor()

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

newBuilder()

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

newBuilder(MonitoredResourceMetadata prototype)

public static MonitoredResourceMetadata.Builder newBuilder(MonitoredResourceMetadata prototype)
Parameter
NameDescription
prototypeMonitoredResourceMetadata
Returns
TypeDescription
MonitoredResourceMetadata.Builder

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

public static Parser<MonitoredResourceMetadata> parser()
Returns
TypeDescription
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
NameDescription
keyString
Returns
TypeDescription
boolean

equals(Object obj)

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

getDefaultInstanceForType()

public MonitoredResourceMetadata getDefaultInstanceForType()
Returns
TypeDescription
MonitoredResourceMetadata

getParserForType()

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

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
StructOrBuilder

getUserLabels() (deprecated)

public Map<String,String> getUserLabels()

Use #getUserLabelsMap() instead.

Returns
TypeDescription
Map<String,String>

getUserLabelsCount()

public int getUserLabelsCount()

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

map<string, string> user_labels = 2;

Returns
TypeDescription
int

getUserLabelsMap()

public Map<String,String> getUserLabelsMap()

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

map<string, string> user_labels = 2;

Returns
TypeDescription
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
NameDescription
keyString
defaultValueString
Returns
TypeDescription
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
NameDescription
keyString
Returns
TypeDescription
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
TypeDescription
boolean

Whether the systemLabels field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

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

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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