public static final class MonitoredResource.Builder extends GeneratedMessageV3.Builder<MonitoredResource.Builder> implements MonitoredResourceOrBuilder
An object representing a resource that can be used for monitoring, logging, billing, or other purposes. Examples include virtual machine instances, databases, and storage devices such as disks. The `type` field identifies a [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor] object that describes the resource's schema. Information in the `labels` field identifies the actual resource and its attributes according to the schema. For example, a particular Compute Engine VM instance could be represented by the following object, because the [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor] for `"gce_instance"` has labels `"instance_id"` and `"zone"`: { "type": "gce_instance", "labels": { "instance_id": "12345678901234", "zone": "us-central1-a" }}Protobuf type
google.api.MonitoredResource
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, isClean, markClean, newBuilderForField, onBuilt, onChanged, setUnknownFieldsProto3
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
addAll, addAll, mergeFrom, newUninitializedMessageException
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
mergeFrom
public static final Descriptors.Descriptor getDescriptor()
protected MapField internalGetMapField(int number)
internalGetMapField
in class GeneratedMessageV3.Builder<MonitoredResource.Builder>
protected MapField internalGetMutableMapField(int number)
internalGetMutableMapField
in class GeneratedMessageV3.Builder<MonitoredResource.Builder>
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable
in class GeneratedMessageV3.Builder<MonitoredResource.Builder>
public MonitoredResource.Builder clear()
clear
in interface Message.Builder
clear
in interface MessageLite.Builder
clear
in class GeneratedMessageV3.Builder<MonitoredResource.Builder>
public Descriptors.Descriptor getDescriptorForType()
getDescriptorForType
in interface Message.Builder
getDescriptorForType
in interface MessageOrBuilder
getDescriptorForType
in class GeneratedMessageV3.Builder<MonitoredResource.Builder>
public MonitoredResource getDefaultInstanceForType()
getDefaultInstanceForType
in interface MessageLiteOrBuilder
getDefaultInstanceForType
in interface MessageOrBuilder
public MonitoredResource build()
build
in interface Message.Builder
build
in interface MessageLite.Builder
public MonitoredResource buildPartial()
buildPartial
in interface Message.Builder
buildPartial
in interface MessageLite.Builder
public MonitoredResource.Builder clone()
clone
in interface Message.Builder
clone
in interface MessageLite.Builder
clone
in class GeneratedMessageV3.Builder<MonitoredResource.Builder>
public MonitoredResource.Builder setField(Descriptors.FieldDescriptor field, java.lang.Object value)
setField
in interface Message.Builder
setField
in class GeneratedMessageV3.Builder<MonitoredResource.Builder>
public MonitoredResource.Builder clearField(Descriptors.FieldDescriptor field)
clearField
in interface Message.Builder
clearField
in class GeneratedMessageV3.Builder<MonitoredResource.Builder>
public MonitoredResource.Builder clearOneof(Descriptors.OneofDescriptor oneof)
clearOneof
in interface Message.Builder
clearOneof
in class GeneratedMessageV3.Builder<MonitoredResource.Builder>
public MonitoredResource.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, java.lang.Object value)
setRepeatedField
in interface Message.Builder
setRepeatedField
in class GeneratedMessageV3.Builder<MonitoredResource.Builder>
public MonitoredResource.Builder addRepeatedField(Descriptors.FieldDescriptor field, java.lang.Object value)
addRepeatedField
in interface Message.Builder
addRepeatedField
in class GeneratedMessageV3.Builder<MonitoredResource.Builder>
public MonitoredResource.Builder mergeFrom(Message other)
mergeFrom
in interface Message.Builder
mergeFrom
in class AbstractMessage.Builder<MonitoredResource.Builder>
public MonitoredResource.Builder mergeFrom(MonitoredResource other)
public final boolean isInitialized()
isInitialized
in interface MessageLiteOrBuilder
isInitialized
in class GeneratedMessageV3.Builder<MonitoredResource.Builder>
public MonitoredResource.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
mergeFrom
in interface Message.Builder
mergeFrom
in interface MessageLite.Builder
mergeFrom
in class AbstractMessage.Builder<MonitoredResource.Builder>
java.io.IOException
public java.lang.String getType()
Required. The monitored resource type. This field must match the `type` field of a [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor] object. For example, the type of a Compute Engine VM instance is `gce_instance`.
string type = 1;
getType
in interface MonitoredResourceOrBuilder
public ByteString getTypeBytes()
Required. The monitored resource type. This field must match the `type` field of a [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor] object. For example, the type of a Compute Engine VM instance is `gce_instance`.
string type = 1;
getTypeBytes
in interface MonitoredResourceOrBuilder
public MonitoredResource.Builder setType(java.lang.String value)
Required. The monitored resource type. This field must match the `type` field of a [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor] object. For example, the type of a Compute Engine VM instance is `gce_instance`.
string type = 1;
public MonitoredResource.Builder clearType()
Required. The monitored resource type. This field must match the `type` field of a [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor] object. For example, the type of a Compute Engine VM instance is `gce_instance`.
string type = 1;
public MonitoredResource.Builder setTypeBytes(ByteString value)
Required. The monitored resource type. This field must match the `type` field of a [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor] object. For example, the type of a Compute Engine VM instance is `gce_instance`.
string type = 1;
public int getLabelsCount()
MonitoredResourceOrBuilder
Required. Values for all of the labels listed in the associated monitored resource descriptor. For example, Compute Engine VM instances use the labels `"project_id"`, `"instance_id"`, and `"zone"`.
map<string, string> labels = 2;
getLabelsCount
in interface MonitoredResourceOrBuilder
public boolean containsLabels(java.lang.String key)
Required. Values for all of the labels listed in the associated monitored resource descriptor. For example, Compute Engine VM instances use the labels `"project_id"`, `"instance_id"`, and `"zone"`.
map<string, string> labels = 2;
containsLabels
in interface MonitoredResourceOrBuilder
@Deprecated public java.util.Map<java.lang.String,java.lang.String> getLabels()
getLabelsMap()
instead.getLabels
in interface MonitoredResourceOrBuilder
public java.util.Map<java.lang.String,java.lang.String> getLabelsMap()
Required. Values for all of the labels listed in the associated monitored resource descriptor. For example, Compute Engine VM instances use the labels `"project_id"`, `"instance_id"`, and `"zone"`.
map<string, string> labels = 2;
getLabelsMap
in interface MonitoredResourceOrBuilder
public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue)
Required. Values for all of the labels listed in the associated monitored resource descriptor. For example, Compute Engine VM instances use the labels `"project_id"`, `"instance_id"`, and `"zone"`.
map<string, string> labels = 2;
getLabelsOrDefault
in interface MonitoredResourceOrBuilder
public java.lang.String getLabelsOrThrow(java.lang.String key)
Required. Values for all of the labels listed in the associated monitored resource descriptor. For example, Compute Engine VM instances use the labels `"project_id"`, `"instance_id"`, and `"zone"`.
map<string, string> labels = 2;
getLabelsOrThrow
in interface MonitoredResourceOrBuilder
public MonitoredResource.Builder clearLabels()
public MonitoredResource.Builder removeLabels(java.lang.String key)
Required. Values for all of the labels listed in the associated monitored resource descriptor. For example, Compute Engine VM instances use the labels `"project_id"`, `"instance_id"`, and `"zone"`.
map<string, string> labels = 2;
@Deprecated public java.util.Map<java.lang.String,java.lang.String> getMutableLabels()
public MonitoredResource.Builder putLabels(java.lang.String key, java.lang.String value)
Required. Values for all of the labels listed in the associated monitored resource descriptor. For example, Compute Engine VM instances use the labels `"project_id"`, `"instance_id"`, and `"zone"`.
map<string, string> labels = 2;
public MonitoredResource.Builder putAllLabels(java.util.Map<java.lang.String,java.lang.String> values)
Required. Values for all of the labels listed in the associated monitored resource descriptor. For example, Compute Engine VM instances use the labels `"project_id"`, `"instance_id"`, and `"zone"`.
map<string, string> labels = 2;
public final MonitoredResource.Builder setUnknownFields(UnknownFieldSet unknownFields)
setUnknownFields
in interface Message.Builder
setUnknownFields
in class GeneratedMessageV3.Builder<MonitoredResource.Builder>
public final MonitoredResource.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
mergeUnknownFields
in interface Message.Builder
mergeUnknownFields
in class GeneratedMessageV3.Builder<MonitoredResource.Builder>