Class MonitoredResourceMetadata.Builder (2.48.0)

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
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public MonitoredResourceMetadata.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
MonitoredResourceMetadata.Builder
Overrides

build()

public MonitoredResourceMetadata build()
Returns
Type Description
MonitoredResourceMetadata

buildPartial()

public MonitoredResourceMetadata buildPartial()
Returns
Type Description
MonitoredResourceMetadata

clear()

public MonitoredResourceMetadata.Builder clear()
Returns
Type Description
MonitoredResourceMetadata.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public MonitoredResourceMetadata.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
MonitoredResourceMetadata.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public MonitoredResourceMetadata.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
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
Type Description
MonitoredResourceMetadata.Builder

clearUserLabels()

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

clone()

public MonitoredResourceMetadata.Builder clone()
Returns
Type Description
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
Name Description
key String
Returns
Type Description
boolean

getDefaultInstanceForType()

public MonitoredResourceMetadata getDefaultInstanceForType()
Returns
Type Description
MonitoredResourceMetadata

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getMutableUserLabels() (deprecated)

public Map<String,String> getMutableUserLabels()

Use alternate mutation accessors instead.

Returns
Type Description
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
Type Description
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
Type Description
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
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.

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.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(MonitoredResourceMetadata other)

public MonitoredResourceMetadata.Builder mergeFrom(MonitoredResourceMetadata other)
Parameter
Name Description
other MonitoredResourceMetadata
Returns
Type Description
MonitoredResourceMetadata.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public MonitoredResourceMetadata.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
MonitoredResourceMetadata.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public MonitoredResourceMetadata.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
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
Name Description
value Struct
Returns
Type Description
MonitoredResourceMetadata.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final MonitoredResourceMetadata.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
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
Name Description
values Map<String,String>
Returns
Type Description
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
Name Description
key String
value String
Returns
Type Description
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
Name Description
key String
Returns
Type Description
MonitoredResourceMetadata.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public MonitoredResourceMetadata.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
MonitoredResourceMetadata.Builder
Overrides

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

public MonitoredResourceMetadata.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
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
Name Description
value Struct
Returns
Type Description
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
Name Description
builderForValue Builder
Returns
Type Description
MonitoredResourceMetadata.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final MonitoredResourceMetadata.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
MonitoredResourceMetadata.Builder
Overrides