Class MonitoredResourceMetadata.Builder

public static final class MonitoredResourceMetadata.Builder extends GeneratedMessageV3.Builder<MonitoredResourceMetadata.Builder> 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 Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public MonitoredResourceMetadata.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
MonitoredResourceMetadata.Builder
Overrides

build()

public MonitoredResourceMetadata build()
Returns
TypeDescription
MonitoredResourceMetadata

buildPartial()

public MonitoredResourceMetadata buildPartial()
Returns
TypeDescription
MonitoredResourceMetadata

clear()

public MonitoredResourceMetadata.Builder clear()
Returns
TypeDescription
MonitoredResourceMetadata.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public MonitoredResourceMetadata.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
MonitoredResourceMetadata.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public MonitoredResourceMetadata.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
MonitoredResourceMetadata.Builder
Overrides

clearSystemLabels()

public MonitoredResourceMetadata.Builder clearSystemLabels()

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
MonitoredResourceMetadata.Builder

clearUserLabels()

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

clone()

public MonitoredResourceMetadata.Builder clone()
Returns
TypeDescription
MonitoredResourceMetadata.Builder
Overrides

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

getDefaultInstanceForType()

public MonitoredResourceMetadata getDefaultInstanceForType()
Returns
TypeDescription
MonitoredResourceMetadata

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getMutableUserLabels()

public Map<String,String> getMutableUserLabels()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,String>

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.

getSystemLabelsBuilder()

public Struct.Builder getSystemLabelsBuilder()

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
Builder

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()

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.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

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

internalGetMutableMapField(int number)

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

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(MonitoredResourceMetadata other)

public MonitoredResourceMetadata.Builder mergeFrom(MonitoredResourceMetadata other)
Parameter
NameDescription
otherMonitoredResourceMetadata
Returns
TypeDescription
MonitoredResourceMetadata.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public MonitoredResourceMetadata.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
MonitoredResourceMetadata.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public MonitoredResourceMetadata.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
MonitoredResourceMetadata.Builder
Overrides

mergeSystemLabels(Struct value)

public MonitoredResourceMetadata.Builder mergeSystemLabels(Struct value)

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;

Parameter
NameDescription
valueStruct
Returns
TypeDescription
MonitoredResourceMetadata.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final MonitoredResourceMetadata.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
MonitoredResourceMetadata.Builder
Overrides

putAllUserLabels(Map<String,String> values)

public MonitoredResourceMetadata.Builder putAllUserLabels(Map<String,String> values)

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

map<string, string> user_labels = 2;

Parameter
NameDescription
valuesMap<String,String>
Returns
TypeDescription
MonitoredResourceMetadata.Builder

putUserLabels(String key, String value)

public MonitoredResourceMetadata.Builder putUserLabels(String key, String value)

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

map<string, string> user_labels = 2;

Parameters
NameDescription
keyString
valueString
Returns
TypeDescription
MonitoredResourceMetadata.Builder

removeUserLabels(String key)

public MonitoredResourceMetadata.Builder removeUserLabels(String key)

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

map<string, string> user_labels = 2;

Parameter
NameDescription
keyString
Returns
TypeDescription
MonitoredResourceMetadata.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public MonitoredResourceMetadata.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
MonitoredResourceMetadata.Builder
Overrides

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public MonitoredResourceMetadata.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
MonitoredResourceMetadata.Builder
Overrides

setSystemLabels(Struct value)

public MonitoredResourceMetadata.Builder setSystemLabels(Struct value)

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;

Parameter
NameDescription
valueStruct
Returns
TypeDescription
MonitoredResourceMetadata.Builder

setSystemLabels(Struct.Builder builderForValue)

public MonitoredResourceMetadata.Builder setSystemLabels(Struct.Builder builderForValue)

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;

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
MonitoredResourceMetadata.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final MonitoredResourceMetadata.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
MonitoredResourceMetadata.Builder
Overrides