Built motion from commit 6a09e18b.|2.6.11
[motion2.git] / legacy-libs / google-proto-files / google / monitoring / v3 / metric.proto
1 // Copyright 2018 Google LLC.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //     http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 //
15
16 syntax = "proto3";
17
18 package google.monitoring.v3;
19
20 import "google/api/annotations.proto";
21 import "google/api/label.proto";
22 import "google/api/metric.proto";
23 import "google/api/monitored_resource.proto";
24 import "google/monitoring/v3/common.proto";
25
26 option csharp_namespace = "Google.Cloud.Monitoring.V3";
27 option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring";
28 option java_multiple_files = true;
29 option java_outer_classname = "MetricProto";
30 option java_package = "com.google.monitoring.v3";
31 option php_namespace = "Google\\Cloud\\Monitoring\\V3";
32
33 // A single data point in a time series.
34 message Point {
35   // The time interval to which the data point applies.  For `GAUGE` metrics,
36   // only the end time of the interval is used.  For `DELTA` metrics, the start
37   // and end time should specify a non-zero interval, with subsequent points
38   // specifying contiguous and non-overlapping intervals.  For `CUMULATIVE`
39   // metrics, the start and end time should specify a non-zero interval, with
40   // subsequent points specifying the same start time and increasing end times,
41   // until an event resets the cumulative value to zero and sets a new start
42   // time for the following points.
43   TimeInterval interval = 1;
44
45   // The value of the data point.
46   TypedValue value = 2;
47 }
48
49 // A collection of data points that describes the time-varying values
50 // of a metric. A time series is identified by a combination of a
51 // fully-specified monitored resource and a fully-specified metric.
52 // This type is used for both listing and creating time series.
53 message TimeSeries {
54   // The associated metric. A fully-specified metric used to identify the time
55   // series.
56   google.api.Metric metric = 1;
57
58   // The associated monitored resource.  Custom metrics can use only certain
59   // monitored resource types in their time series data.
60   google.api.MonitoredResource resource = 2;
61
62   // Output only. The associated monitored resource metadata. When reading a
63   // a timeseries, this field will include metadata labels that are explicitly
64   // named in the reduction. When creating a timeseries, this field is ignored.
65   google.api.MonitoredResourceMetadata metadata = 7;
66
67   // The metric kind of the time series. When listing time series, this metric
68   // kind might be different from the metric kind of the associated metric if
69   // this time series is an alignment or reduction of other time series.
70   //
71   // When creating a time series, this field is optional. If present, it must be
72   // the same as the metric kind of the associated metric. If the associated
73   // metric's descriptor must be auto-created, then this field specifies the
74   // metric kind of the new descriptor and must be either `GAUGE` (the default)
75   // or `CUMULATIVE`.
76   google.api.MetricDescriptor.MetricKind metric_kind = 3;
77
78   // The value type of the time series. When listing time series, this value
79   // type might be different from the value type of the associated metric if
80   // this time series is an alignment or reduction of other time series.
81   //
82   // When creating a time series, this field is optional. If present, it must be
83   // the same as the type of the data in the `points` field.
84   google.api.MetricDescriptor.ValueType value_type = 4;
85
86   // The data points of this time series. When listing time series, points are
87   // returned in reverse time order.
88   //
89   // When creating a time series, this field must contain exactly one point and
90   // the point's type must be the same as the value type of the associated
91   // metric. If the associated metric's descriptor must be auto-created, then
92   // the value type of the descriptor is determined by the point's type, which
93   // must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`.
94   repeated Point points = 5;
95 }