Built motion from commit 6a09e18b.|2.6.11
[motion2.git] / legacy-libs / google-proto-files / google / monitoring / v3 / common.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/distribution.proto";
22 import "google/protobuf/duration.proto";
23 import "google/protobuf/timestamp.proto";
24
25 option csharp_namespace = "Google.Cloud.Monitoring.V3";
26 option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring";
27 option java_multiple_files = true;
28 option java_outer_classname = "CommonProto";
29 option java_package = "com.google.monitoring.v3";
30 option php_namespace = "Google\\Cloud\\Monitoring\\V3";
31
32 // A single strongly-typed value.
33 message TypedValue {
34   // The typed value field.
35   oneof value {
36     // A Boolean value: `true` or `false`.
37     bool bool_value = 1;
38
39     // A 64-bit integer. Its range is approximately &plusmn;9.2x10<sup>18</sup>.
40     int64 int64_value = 2;
41
42     // A 64-bit double-precision floating-point number. Its magnitude
43     // is approximately &plusmn;10<sup>&plusmn;300</sup> and it has 16
44     // significant digits of precision.
45     double double_value = 3;
46
47     // A variable-length string value.
48     string string_value = 4;
49
50     // A distribution value.
51     google.api.Distribution distribution_value = 5;
52   }
53 }
54
55 // A time interval extending just after a start time through an end time.
56 // If the start time is the same as the end time, then the interval
57 // represents a single point in time.
58 message TimeInterval {
59   // Required. The end of the time interval.
60   google.protobuf.Timestamp end_time = 2;
61
62   // Optional. The beginning of the time interval.  The default value
63   // for the start time is the end time. The start time must not be
64   // later than the end time.
65   google.protobuf.Timestamp start_time = 1;
66 }
67
68 // Describes how to combine multiple time series to provide different views of
69 // the data.  Aggregation consists of an alignment step on individual time
70 // series (`alignment_period` and `per_series_aligner`) followed by an optional
71 // reduction step of the data across the aligned time series
72 // (`cross_series_reducer` and `group_by_fields`).  For more details, see
73 // [Aggregation](/monitoring/api/learn_more#aggregation).
74 message Aggregation {
75   // The Aligner describes how to bring the data points in a single
76   // time series into temporal alignment.
77   enum Aligner {
78     // No alignment. Raw data is returned. Not valid if cross-time
79     // series reduction is requested. The value type of the result is
80     // the same as the value type of the input.
81     ALIGN_NONE = 0;
82
83     // Align and convert to delta metric type. This alignment is valid
84     // for cumulative metrics and delta metrics. Aligning an existing
85     // delta metric to a delta metric requires that the alignment
86     // period be increased. The value type of the result is the same
87     // as the value type of the input.
88     //
89     // One can think of this aligner as a rate but without time units; that
90     // is, the output is conceptually (second_point - first_point).
91     ALIGN_DELTA = 1;
92
93     // Align and convert to a rate. This alignment is valid for
94     // cumulative metrics and delta metrics with numeric values. The output is a
95     // gauge metric with value type
96     // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE].
97     //
98     // One can think of this aligner as conceptually providing the slope of
99     // the line that passes through the value at the start and end of the
100     // window. In other words, this is conceptually ((y1 - y0)/(t1 - t0)),
101     // and the output unit is one that has a "/time" dimension.
102     //
103     // If, by rate, you are looking for percentage change, see the
104     // `ALIGN_PERCENT_CHANGE` aligner option.
105     ALIGN_RATE = 2;
106
107     // Align by interpolating between adjacent points around the
108     // period boundary. This alignment is valid for gauge
109     // metrics with numeric values. The value type of the result is the same
110     // as the value type of the input.
111     ALIGN_INTERPOLATE = 3;
112
113     // Align by shifting the oldest data point before the period
114     // boundary to the boundary. This alignment is valid for gauge
115     // metrics. The value type of the result is the same as the
116     // value type of the input.
117     ALIGN_NEXT_OLDER = 4;
118
119     // Align time series via aggregation. The resulting data point in
120     // the alignment period is the minimum of all data points in the
121     // period. This alignment is valid for gauge and delta metrics with numeric
122     // values. The value type of the result is the same as the value
123     // type of the input.
124     ALIGN_MIN = 10;
125
126     // Align time series via aggregation. The resulting data point in
127     // the alignment period is the maximum of all data points in the
128     // period. This alignment is valid for gauge and delta metrics with numeric
129     // values. The value type of the result is the same as the value
130     // type of the input.
131     ALIGN_MAX = 11;
132
133     // Align time series via aggregation. The resulting data point in
134     // the alignment period is the average or arithmetic mean of all
135     // data points in the period. This alignment is valid for gauge and delta
136     // metrics with numeric values. The value type of the output is
137     // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE].
138     ALIGN_MEAN = 12;
139
140     // Align time series via aggregation. The resulting data point in
141     // the alignment period is the count of all data points in the
142     // period. This alignment is valid for gauge and delta metrics with numeric
143     // or Boolean values. The value type of the output is
144     // [INT64][google.api.MetricDescriptor.ValueType.INT64].
145     ALIGN_COUNT = 13;
146
147     // Align time series via aggregation. The resulting data point in
148     // the alignment period is the sum of all data points in the
149     // period. This alignment is valid for gauge and delta metrics with numeric
150     // and distribution values. The value type of the output is the
151     // same as the value type of the input.
152     ALIGN_SUM = 14;
153
154     // Align time series via aggregation. The resulting data point in
155     // the alignment period is the standard deviation of all data
156     // points in the period. This alignment is valid for gauge and delta metrics
157     // with numeric values. The value type of the output is
158     // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE].
159     ALIGN_STDDEV = 15;
160
161     // Align time series via aggregation. The resulting data point in
162     // the alignment period is the count of True-valued data points in the
163     // period. This alignment is valid for gauge metrics with
164     // Boolean values. The value type of the output is
165     // [INT64][google.api.MetricDescriptor.ValueType.INT64].
166     ALIGN_COUNT_TRUE = 16;
167
168     // Align time series via aggregation. The resulting data point in
169     // the alignment period is the count of False-valued data points in the
170     // period. This alignment is valid for gauge metrics with
171     // Boolean values. The value type of the output is
172     // [INT64][google.api.MetricDescriptor.ValueType.INT64].
173     ALIGN_COUNT_FALSE = 24;
174
175     // Align time series via aggregation. The resulting data point in
176     // the alignment period is the fraction of True-valued data points in the
177     // period. This alignment is valid for gauge metrics with Boolean values.
178     // The output value is in the range [0, 1] and has value type
179     // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE].
180     ALIGN_FRACTION_TRUE = 17;
181
182     // Align time series via aggregation. The resulting data point in
183     // the alignment period is the 99th percentile of all data
184     // points in the period. This alignment is valid for gauge and delta metrics
185     // with distribution values. The output is a gauge metric with value type
186     // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE].
187     ALIGN_PERCENTILE_99 = 18;
188
189     // Align time series via aggregation. The resulting data point in
190     // the alignment period is the 95th percentile of all data
191     // points in the period. This alignment is valid for gauge and delta metrics
192     // with distribution values. The output is a gauge metric with value type
193     // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE].
194     ALIGN_PERCENTILE_95 = 19;
195
196     // Align time series via aggregation. The resulting data point in
197     // the alignment period is the 50th percentile of all data
198     // points in the period. This alignment is valid for gauge and delta metrics
199     // with distribution values. The output is a gauge metric with value type
200     // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE].
201     ALIGN_PERCENTILE_50 = 20;
202
203     // Align time series via aggregation. The resulting data point in
204     // the alignment period is the 5th percentile of all data
205     // points in the period. This alignment is valid for gauge and delta metrics
206     // with distribution values. The output is a gauge metric with value type
207     // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE].
208     ALIGN_PERCENTILE_05 = 21;
209
210     // Align and convert to a percentage change. This alignment is valid for
211     // gauge and delta metrics with numeric values. This alignment conceptually
212     // computes the equivalent of "((current - previous)/previous)*100"
213     // where previous value is determined based on the alignmentPeriod.
214     // In the event that previous is 0 the calculated value is infinity with the
215     // exception that if both (current - previous) and previous are 0 the
216     // calculated value is 0.
217     // A 10 minute moving mean is computed at each point of the time window
218     // prior to the above calculation to smooth the metric and prevent false
219     // positives from very short lived spikes.
220     // Only applicable for data that is >= 0. Any values < 0 are treated as
221     // no data. While delta metrics are accepted by this alignment special care
222     // should be taken that the values for the metric will always be positive.
223     // The output is a gauge metric with value type
224     // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE].
225     ALIGN_PERCENT_CHANGE = 23;
226   }
227
228   // A Reducer describes how to aggregate data points from multiple
229   // time series into a single time series.
230   enum Reducer {
231     // No cross-time series reduction. The output of the aligner is
232     // returned.
233     REDUCE_NONE = 0;
234
235     // Reduce by computing the mean across time series for each
236     // alignment period. This reducer is valid for delta and
237     // gauge metrics with numeric or distribution values. The value type of the
238     // output is [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE].
239     REDUCE_MEAN = 1;
240
241     // Reduce by computing the minimum across time series for each
242     // alignment period. This reducer is valid for delta and
243     // gauge metrics with numeric values. The value type of the output
244     // is the same as the value type of the input.
245     REDUCE_MIN = 2;
246
247     // Reduce by computing the maximum across time series for each
248     // alignment period. This reducer is valid for delta and
249     // gauge metrics with numeric values. The value type of the output
250     // is the same as the value type of the input.
251     REDUCE_MAX = 3;
252
253     // Reduce by computing the sum across time series for each
254     // alignment period. This reducer is valid for delta and
255     // gauge metrics with numeric and distribution values. The value type of
256     // the output is the same as the value type of the input.
257     REDUCE_SUM = 4;
258
259     // Reduce by computing the standard deviation across time series
260     // for each alignment period. This reducer is valid for delta
261     // and gauge metrics with numeric or distribution values. The value type of
262     // the output is [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE].
263     REDUCE_STDDEV = 5;
264
265     // Reduce by computing the count of data points across time series
266     // for each alignment period. This reducer is valid for delta
267     // and gauge metrics of numeric, Boolean, distribution, and string value
268     // type. The value type of the output is
269     // [INT64][google.api.MetricDescriptor.ValueType.INT64].
270     REDUCE_COUNT = 6;
271
272     // Reduce by computing the count of True-valued data points across time
273     // series for each alignment period. This reducer is valid for delta
274     // and gauge metrics of Boolean value type. The value type of
275     // the output is [INT64][google.api.MetricDescriptor.ValueType.INT64].
276     REDUCE_COUNT_TRUE = 7;
277
278     // Reduce by computing the count of False-valued data points across time
279     // series for each alignment period. This reducer is valid for delta
280     // and gauge metrics of Boolean value type. The value type of
281     // the output is [INT64][google.api.MetricDescriptor.ValueType.INT64].
282     REDUCE_COUNT_FALSE = 15;
283
284     // Reduce by computing the fraction of True-valued data points across time
285     // series for each alignment period. This reducer is valid for delta
286     // and gauge metrics of Boolean value type. The output value is in the
287     // range [0, 1] and has value type
288     // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE].
289     REDUCE_FRACTION_TRUE = 8;
290
291     // Reduce by computing 99th percentile of data points across time series
292     // for each alignment period. This reducer is valid for gauge and delta
293     // metrics of numeric and distribution type. The value of the output is
294     // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]
295     REDUCE_PERCENTILE_99 = 9;
296
297     // Reduce by computing 95th percentile of data points across time series
298     // for each alignment period. This reducer is valid for gauge and delta
299     // metrics of numeric and distribution type. The value of the output is
300     // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]
301     REDUCE_PERCENTILE_95 = 10;
302
303     // Reduce by computing 50th percentile of data points across time series
304     // for each alignment period. This reducer is valid for gauge and delta
305     // metrics of numeric and distribution type. The value of the output is
306     // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]
307     REDUCE_PERCENTILE_50 = 11;
308
309     // Reduce by computing 5th percentile of data points across time series
310     // for each alignment period. This reducer is valid for gauge and delta
311     // metrics of numeric and distribution type. The value of the output is
312     // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]
313     REDUCE_PERCENTILE_05 = 12;
314   }
315
316   // The alignment period for per-[time series][google.monitoring.v3.TimeSeries]
317   // alignment. If present, `alignmentPeriod` must be at least 60
318   // seconds.  After per-time series alignment, each time series will
319   // contain data points only on the period boundaries. If
320   // `perSeriesAligner` is not specified or equals `ALIGN_NONE`, then
321   // this field is ignored. If `perSeriesAligner` is specified and
322   // does not equal `ALIGN_NONE`, then this field must be defined;
323   // otherwise an error is returned.
324   google.protobuf.Duration alignment_period = 1;
325
326   // The approach to be used to align individual time series. Not all
327   // alignment functions may be applied to all time series, depending
328   // on the metric type and value type of the original time
329   // series. Alignment may change the metric type or the value type of
330   // the time series.
331   //
332   // Time series data must be aligned in order to perform cross-time
333   // series reduction. If `crossSeriesReducer` is specified, then
334   // `perSeriesAligner` must be specified and not equal `ALIGN_NONE`
335   // and `alignmentPeriod` must be specified; otherwise, an error is
336   // returned.
337   Aligner per_series_aligner = 2;
338
339   // The approach to be used to combine time series. Not all reducer
340   // functions may be applied to all time series, depending on the
341   // metric type and the value type of the original time
342   // series. Reduction may change the metric type of value type of the
343   // time series.
344   //
345   // Time series data must be aligned in order to perform cross-time
346   // series reduction. If `crossSeriesReducer` is specified, then
347   // `perSeriesAligner` must be specified and not equal `ALIGN_NONE`
348   // and `alignmentPeriod` must be specified; otherwise, an error is
349   // returned.
350   Reducer cross_series_reducer = 4;
351
352   // The set of fields to preserve when `crossSeriesReducer` is
353   // specified. The `groupByFields` determine how the time series are
354   // partitioned into subsets prior to applying the aggregation
355   // function. Each subset contains time series that have the same
356   // value for each of the grouping fields. Each individual time
357   // series is a member of exactly one subset. The
358   // `crossSeriesReducer` is applied to each subset of time series.
359   // It is not possible to reduce across different resource types, so
360   // this field implicitly contains `resource.type`.  Fields not
361   // specified in `groupByFields` are aggregated away.  If
362   // `groupByFields` is not specified and all the time series have
363   // the same resource type, then the time series are aggregated into
364   // a single output time series. If `crossSeriesReducer` is not
365   // defined, this field is ignored.
366   repeated string group_by_fields = 5;
367 }
368
369 // Specifies an ordering relationship on two arguments, here called left and
370 // right.
371 enum ComparisonType {
372   // No ordering relationship is specified.
373   COMPARISON_UNSPECIFIED = 0;
374
375   // The left argument is greater than the right argument.
376   COMPARISON_GT = 1;
377
378   // The left argument is greater than or equal to the right argument.
379   COMPARISON_GE = 2;
380
381   // The left argument is less than the right argument.
382   COMPARISON_LT = 3;
383
384   // The left argument is less than or equal to the right argument.
385   COMPARISON_LE = 4;
386
387   // The left argument is equal to the right argument.
388   COMPARISON_EQ = 5;
389
390   // The left argument is not equal to the right argument.
391   COMPARISON_NE = 6;
392 }
393
394 // The tier of service for a Workspace. Please see the
395 // [service tiers
396 // documentation](https://cloud.google.com/monitoring/workspaces/tiers) for more
397 // details.
398 enum ServiceTier {
399   option deprecated = true;
400
401   // An invalid sentinel value, used to indicate that a tier has not
402   // been provided explicitly.
403   SERVICE_TIER_UNSPECIFIED = 0;
404
405   // The Stackdriver Basic tier, a free tier of service that provides basic
406   // features, a moderate allotment of logs, and access to built-in metrics.
407   // A number of features are not available in this tier. For more details,
408   // see [the service tiers
409   // documentation](https://cloud.google.com/monitoring/workspaces/tiers).
410   SERVICE_TIER_BASIC = 1;
411
412   // The Stackdriver Premium tier, a higher, more expensive tier of service
413   // that provides access to all Stackdriver features, lets you use Stackdriver
414   // with AWS accounts, and has a larger allotments for logs and metrics. For
415   // more details, see [the service tiers
416   // documentation](https://cloud.google.com/monitoring/workspaces/tiers).
417   SERVICE_TIER_PREMIUM = 2;
418 }