public final class MonitoredResource extends GeneratedMessageV3 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 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 for
"gce_instance"
has labels
"project_id"
, "instance_id"
and "zone"
:
{ "type": "gce_instance",
"labels": { "project_id": "my-project",
"instance_id": "12345678901234",
"zone": "us-central1-a" }}
Protobuf type google.api.MonitoredResource
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
Static Fields
LABELS_FIELD_NUMBER
public static final int LABELS_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
TYPE_FIELD_NUMBER
public static final int TYPE_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
Static Methods
getDefaultInstance()
public static MonitoredResource getDefaultInstance()
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
newBuilder()
public static MonitoredResource.Builder newBuilder()
newBuilder(MonitoredResource prototype)
public static MonitoredResource.Builder newBuilder(MonitoredResource prototype)
public static MonitoredResource parseDelimitedFrom(InputStream input)
public static MonitoredResource parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(byte[] data)
public static MonitoredResource parseFrom(byte[] data)
Parameter |
---|
Name | Description |
data | byte[]
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static MonitoredResource parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteString data)
public static MonitoredResource parseFrom(ByteString data)
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static MonitoredResource parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static MonitoredResource parseFrom(CodedInputStream input)
public static MonitoredResource parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static MonitoredResource parseFrom(InputStream input)
public static MonitoredResource parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteBuffer data)
public static MonitoredResource parseFrom(ByteBuffer data)
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static MonitoredResource parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
parser()
public static Parser<MonitoredResource> parser()
Methods
containsLabels(String key)
public boolean containsLabels(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;
Parameter |
---|
Name | Description |
key | String
|
equals(Object obj)
public boolean equals(Object obj)
Parameter |
---|
Name | Description |
obj | Object
|
Overrides
getDefaultInstanceForType()
public MonitoredResource getDefaultInstanceForType()
getLabels()
public Map<String,String> getLabels()
getLabelsCount()
public int getLabelsCount()
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;
Returns |
---|
Type | Description |
int | |
getLabelsMap()
public Map<String,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;
getLabelsOrDefault(String key, String defaultValue)
public String getLabelsOrDefault(String key, 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;
getLabelsOrThrow(String key)
public String getLabelsOrThrow(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;
Parameter |
---|
Name | Description |
key | String
|
getParserForType()
public Parser<MonitoredResource> getParserForType()
Overrides
getSerializedSize()
public int getSerializedSize()
Returns |
---|
Type | Description |
int | |
Overrides
getType()
Required. The monitored resource type. This field must match
the type
field of a
MonitoredResourceDescriptor
object. For example, the type of a Compute Engine VM instance is
gce_instance
. Some descriptors include the service name in the type; for
example, the type of a Datastream stream is
datastream.googleapis.com/Stream
.
string type = 1;
Returns |
---|
Type | Description |
String | The type.
|
getTypeBytes()
public ByteString getTypeBytes()
Required. The monitored resource type. This field must match
the type
field of a
MonitoredResourceDescriptor
object. For example, the type of a Compute Engine VM instance is
gce_instance
. Some descriptors include the service name in the type; for
example, the type of a Datastream stream is
datastream.googleapis.com/Stream
.
string type = 1;
Returns |
---|
Type | Description |
ByteString | The bytes for type.
|
hashCode()
Returns |
---|
Type | Description |
int | |
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
internalGetMapField(int number)
protected MapField internalGetMapField(int number)
Parameter |
---|
Name | Description |
number | int
|
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
newBuilderForType()
public MonitoredResource.Builder newBuilderForType()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected MonitoredResource.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Overrides
toBuilder()
public MonitoredResource.Builder toBuilder()
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Overrides