xref: /aosp_15_r20/external/googleapis/google/monitoring/dashboard/v1/piechart.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1// Copyright 2023 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
15syntax = "proto3";
16
17package google.monitoring.dashboard.v1;
18
19import "google/api/field_behavior.proto";
20import "google/monitoring/dashboard/v1/metrics.proto";
21import "google/protobuf/duration.proto";
22
23option csharp_namespace = "Google.Cloud.Monitoring.Dashboard.V1";
24option go_package = "cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb;dashboardpb";
25option java_multiple_files = true;
26option java_outer_classname = "PieChartProto";
27option java_package = "com.google.monitoring.dashboard.v1";
28option php_namespace = "Google\\Cloud\\Monitoring\\Dashboard\\V1";
29option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1";
30
31// A widget that displays timeseries data as a pie or a donut.
32message PieChart {
33  // Groups a time series query definition.
34  message PieChartDataSet {
35    // Required. The query for the PieChart. See,
36    // `google.monitoring.dashboard.v1.TimeSeriesQuery`.
37    TimeSeriesQuery time_series_query = 1
38        [(google.api.field_behavior) = REQUIRED];
39
40    // Optional. A template for the name of the slice. This name will be
41    // displayed in the legend and the tooltip of the pie chart. It replaces the
42    // auto-generated names for the slices. For example, if the template is set
43    // to
44    // `${resource.labels.zone}`, the zone's value will be used for the name
45    // instead of the default name.
46    string slice_name_template = 2 [(google.api.field_behavior) = OPTIONAL];
47
48    // Optional. The lower bound on data point frequency for this data set,
49    // implemented by specifying the minimum alignment period to use in a time
50    // series query. For example, if the data is published once every 10
51    // minutes, the `min_alignment_period` should be at least 10 minutes. It
52    // would not make sense to fetch and align data at one minute intervals.
53    google.protobuf.Duration min_alignment_period = 3
54        [(google.api.field_behavior) = OPTIONAL];
55  }
56
57  // Types for the pie chart.
58  enum PieChartType {
59    // The zero value. No type specified. Do not use.
60    PIE_CHART_TYPE_UNSPECIFIED = 0;
61
62    // A Pie type PieChart.
63    PIE = 1;
64
65    // Similar to PIE, but the DONUT type PieChart has a hole in the middle.
66    DONUT = 2;
67  }
68
69  // Required. The queries for the chart's data.
70  repeated PieChartDataSet data_sets = 1
71      [(google.api.field_behavior) = REQUIRED];
72
73  // Required. Indicates the visualization type for the PieChart.
74  PieChartType chart_type = 2 [(google.api.field_behavior) = REQUIRED];
75
76  // Optional. Indicates whether or not the pie chart should show slices' labels
77  bool show_labels = 4 [(google.api.field_behavior) = OPTIONAL];
78}
79