Class MonitoredResourceMetadata.Builder (2.10.0)

Stay organized with collections Save and categorize content based on your preferences.
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