NAME
Google::Monitoring::V3::Metric - Compiled Protocol Buffers messages for google/monitoring/v3/metric.proto
SYNOPSIS
use Google::Monitoring::V3::Metric;
my $msg = Google::Monitoring::V3::Metric::Point->new({
interval => $interval,
value => $value,
});
# Read or update a field
my $val = $msg->interval();
# Binary wire-format roundtrip
my $bytes = $msg->serialize();
my $decoded = Google::Monitoring::V3::Metric::Point->parse($bytes);
# Canonical ProtoJSON
my $json = $msg->to_json();
DESCRIPTION
Auto-generated Protobuf message classes compiled from google/monitoring/v3/metric.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().
MESSAGES
Google::Monitoring::V3::Metric::Point
A single data point in a time series.
Inherits from Protobuf::Message.
Accessors
$msg->interval()/$msg->interval($value)Type:
Message(Google::Monitoring::V3::Common::TimeInterval)The time interval to which the data point applies. For `GAUGE` metrics, the start time is optional, but if it is supplied, it must equal the end time. For `DELTA` metrics, the start and end time should specify a non-zero interval, with subsequent points specifying contiguous and non-overlapping intervals. For `CUMULATIVE` metrics, the start and end time should specify a non-zero interval, with subsequent points specifying the same start time and increasing end times, until an event resets the cumulative value to zero and sets a new start time for the following points.
$msg->value()/$msg->value($value)Type:
Message(Google::Monitoring::V3::Common::TypedValue)The value of the data point.
Google::Monitoring::V3::Metric::TimeSeries
A collection of data points that describes the time-varying values of a metric. A time series is identified by a combination of a fully-specified monitored resource and a fully-specified metric. This type is used for both listing and creating time series.
Inherits from Protobuf::Message.
Accessors
$msg->metric()/$msg->metric($value)Type:
Message(Google::Api::Metric::Metric)The associated metric. A fully-specified metric used to identify the time series.
$msg->resource()/$msg->resource($value)Type:
Message(Google::Api::MonitoredResource::MonitoredResource)The associated monitored resource. Custom metrics can use only certain monitored resource types in their time series data. For more information, see [Monitored resources for custom metrics](https://cloud.google.com/monitoring/custom-metrics/creating-metrics#custom-metric-resources).
$msg->metadata()/$msg->metadata($value)Type:
Message(Google::Api::MonitoredResource::MonitoredResourceMetadata)Output only. The associated monitored resource metadata. When reading a time series, this field will include metadata labels that are explicitly named in the reduction. When creating a time series, this field is ignored.
$msg->metric_kind()/$msg->metric_kind($value)Type:
Enum(Google::Api::MetricDescriptor::MetricKind)The metric kind of the time series. When listing time series, this metric kind might be different from the metric kind of the associated metric if this time series is an alignment or reduction of other time series.
When creating a time series, this field is optional. If present, it must be the same as the metric kind of the associated metric. If the associated metric's descriptor must be auto-created, then this field specifies the metric kind of the new descriptor and must be either `GAUGE` (the default) or `CUMULATIVE`.
$msg->value_type()/$msg->value_type($value)Type:
Enum(Google::Api::MetricDescriptor::ValueType)The value type of the time series. When listing time series, this value type might be different from the value type of the associated metric if this time series is an alignment or reduction of other time series.
When creating a time series, this field is optional. If present, it must be the same as the type of the data in the `points` field.
$msg->points()/$msg->points($value)Type:
Message(Google::Monitoring::V3::Metric::Point)The data points of this time series. When listing time series, points are returned in reverse time order.
When creating a time series, this field must contain exactly one point and the point's type must be the same as the value type of the associated metric. If the associated metric's descriptor must be auto-created, then the value type of the descriptor is determined by the point's type, which must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`.
$msg->unit()/$msg->unit($value)Type:
StringThe units in which the metric value is reported. It is only applicable if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit` defines the representation of the stored metric values. This field can only be changed through CreateTimeSeries when it is empty.
$msg->description()/$msg->description($value)Type:
StringInput only. A detailed description of the time series that will be associated with the [google.api.MetricDescriptor][google.api.MetricDescriptor] for the metric. Once set, this field cannot be changed through CreateTimeSeries.
Google::Monitoring::V3::Metric::TimeSeriesDescriptor
A descriptor for the labels and points in a time series.
Inherits from Protobuf::Message.
Accessors
$msg->label_descriptors()/$msg->label_descriptors($value)Type:
Message(Google::Api::Label::LabelDescriptor)Descriptors for the labels.
$msg->point_descriptors()/$msg->point_descriptors($value)Type:
Message(Google::Monitoring::V3::Metric::TimeSeriesDescriptor::ValueDescriptor)Descriptors for the point data value columns.
Google::Monitoring::V3::Metric::TimeSeriesData
Represents the values of a time series associated with a TimeSeriesDescriptor.
Inherits from Protobuf::Message.
Accessors
$msg->label_values()/$msg->label_values($value)Type:
Message(Google::Monitoring::V3::Metric::LabelValue)The values of the labels in the time series identifier, given in the same order as the `label_descriptors` field of the TimeSeriesDescriptor associated with this object. Each value must have a value of the type given in the corresponding entry of `label_descriptors`.
$msg->point_data()/$msg->point_data($value)Type:
Message(Google::Monitoring::V3::Metric::TimeSeriesData::PointData)The points in the time series.
Google::Monitoring::V3::Metric::LabelValue
A label value.
Inherits from Protobuf::Message.
Accessors
$msg->bool_value()/$msg->bool_value($value)Type:
BoolA bool label value.
$msg->int64_value()/$msg->int64_value($value)Type:
Int64An int64 label value.
$msg->string_value()/$msg->string_value($value)Type:
StringA string label value.
Google::Monitoring::V3::Metric::QueryError
An error associated with a query in the time series query language format.
Inherits from Protobuf::Message.
Accessors
$msg->locator()/$msg->locator($value)Type:
Message(Google::Monitoring::V3::Metric::TextLocator)The location of the time series query language text that this error applies to.
$msg->message()/$msg->message($value)Type:
StringThe error message.
Google::Monitoring::V3::Metric::TextLocator
A locator for text. Indicates a particular part of the text of a request or of an object referenced in the request.
For example, suppose the request field `text` contains:
text: "The quick brown fox jumps over the lazy dog."
Then the locator:
source: "text"
start_position {
line: 1
column: 17
}
end_position {
line: 1
column: 19
}
refers to the part of the text: "fox".
Inherits from Protobuf::Message.
Accessors
$msg->source()/$msg->source($value)Type:
StringThe source of the text. The source may be a field in the request, in which case its format is the format of the google.rpc.BadRequest.FieldViolation.field field in https://cloud.google.com/apis/design/errors#error_details. It may also be be a source other than the request field (e.g. a macro definition referenced in the text of the query), in which case this is the name of the source (e.g. the macro name).
$msg->start_position()/$msg->start_position($value)Type:
Message(Google::Monitoring::V3::Metric::TextLocator::Position)The position of the first byte within the text.
$msg->end_position()/$msg->end_position($value)Type:
Message(Google::Monitoring::V3::Metric::TextLocator::Position)The position of the last byte within the text.
$msg->nested_locator()/$msg->nested_locator($value)Type:
Message(Google::Monitoring::V3::Metric::TextLocator)If `source`, `start_position`, and `end_position` describe a call on some object (e.g. a macro in the time series query language text) and a location is to be designated in that object's text, `nested_locator` identifies the location within that object.
$msg->nesting_reason()/$msg->nesting_reason($value)Type:
StringWhen `nested_locator` is set, this field gives the reason for the nesting. Usually, the reason is a macro invocation. In that case, the macro name (including the leading '@') signals the location of the macro call in the text and a macro argument name (including the leading '$') signals the location of the macro argument inside the macro body that got substituted away.
SEE ALSO
Protobuf, Protobuf::Message, Google::Monitoring::V3::Metric::Types, https://protobuf.dev/
LICENSE AND COPYRIGHT
Copyright (C) 2026 Google LLC
This program is released under the Apache 2.0 license.