From 45747a861682a93508157c268a989e116ba1aaf7 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 8 Apr 2022 10:21:35 -0700 Subject: [PATCH] feat: Sync public protos with latests public api state. This adds support for collapsible groups, filters, labels, drilldowns, logs panels and tables (#257) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Sync public protos with latests public api state. This adds support for collapsible groups, filters, labels, drilldowns, logs panels and tables PiperOrigin-RevId: 440139643 Source-Link: https://github.com/googleapis/googleapis/commit/2bff0f31f05f5d49ef33a11297cf3640c13ec2ac Source-Link: https://github.com/googleapis/googleapis-gen/commit/8c92aa77466a1fe5016e25d806dd4eb45b62e5a2 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOGM5MmFhNzc0NjZhMWZlNTAxNmUyNWQ4MDZkZDRlYjQ1YjYyZTVhMiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../monitoring/dashboard/v1/alertchart.proto | 2 +- .../dashboard/v1/collapsible_group.proto | 32 + .../monitoring/dashboard/v1/common.proto | 2 +- .../monitoring/dashboard/v1/dashboard.proto | 9 +- .../dashboard/v1/dashboard_filter.proto | 68 + .../dashboard/v1/dashboards_service.proto | 4 +- .../monitoring/dashboard/v1/drilldowns.proto | 2 +- .../monitoring/dashboard/v1/layouts.proto | 2 +- .../monitoring/dashboard/v1/logs_panel.proto | 38 + .../monitoring/dashboard/v1/metrics.proto | 18 +- .../monitoring/dashboard/v1/scorecard.proto | 2 +- .../monitoring/dashboard/v1/service.proto | 2 +- .../monitoring/dashboard/v1/table.proto | 59 + .../dashboard/v1/table_display_options.proto | 34 + .../google/monitoring/dashboard/v1/text.proto | 2 +- .../monitoring/dashboard/v1/widget.proto | 15 +- .../monitoring/dashboard/v1/xychart.proto | 20 +- .../protos/protos.d.ts | 665 +++++- .../protos/protos.js | 2022 +++++++++++++++-- .../protos/protos.json | 177 +- .../src/v1/dashboards_service_proto_list.json | 5 + 21 files changed, 3036 insertions(+), 144 deletions(-) create mode 100644 packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/collapsible_group.proto create mode 100644 packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboard_filter.proto create mode 100644 packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/logs_panel.proto create mode 100644 packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/table.proto create mode 100644 packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/table_display_options.proto diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/alertchart.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/alertchart.proto index a795e063ab6..2a92423b8f7 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/alertchart.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/alertchart.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/collapsible_group.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/collapsible_group.proto new file mode 100644 index 00000000000..513560eb169 --- /dev/null +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/collapsible_group.proto @@ -0,0 +1,32 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.monitoring.dashboard.v1; + +option csharp_namespace = "Google.Cloud.Monitoring.Dashboard.V1"; +option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; +option java_multiple_files = true; +option java_outer_classname = "CollapsibleGroupProto"; +option java_package = "com.google.monitoring.dashboard.v1"; +option php_namespace = "Google\\Cloud\\Monitoring\\Dashboard\\V1"; +option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; + +// A widget that groups the other widgets. All widgets that are within +// the area spanned by the grouping widget are considered member widgets. +message CollapsibleGroup { + // The collapsed state of the widget on first page load. + bool collapsed = 1; +} diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/common.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/common.proto index 2dddf5cd1ff..6b8e6b3d549 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/common.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/common.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboard.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboard.proto index 54c8a013e9a..66f4c530081 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboard.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboard.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -18,6 +18,7 @@ package google.monitoring.dashboard.v1; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/monitoring/dashboard/v1/dashboard_filter.proto"; import "google/monitoring/dashboard/v1/layouts.proto"; option csharp_namespace = "Google.Cloud.Monitoring.Dashboard.V1"; @@ -69,4 +70,10 @@ message Dashboard { // arranged vertically. ColumnLayout column_layout = 9; } + + // Filters to reduce the amount of data charted based on the filter criteria. + repeated DashboardFilter dashboard_filters = 11; + + // Labels applied to the dashboard + map labels = 12; } diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboard_filter.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboard_filter.proto new file mode 100644 index 00000000000..fba5cf63e88 --- /dev/null +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboard_filter.proto @@ -0,0 +1,68 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.monitoring.dashboard.v1; + +import "google/api/field_behavior.proto"; + +option csharp_namespace = "Google.Cloud.Monitoring.Dashboard.V1"; +option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; +option java_multiple_files = true; +option java_outer_classname = "DashboardFilterProto"; +option java_package = "com.google.monitoring.dashboard.v1"; +option php_namespace = "Google\\Cloud\\Monitoring\\Dashboard\\V1"; +option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; + +// A filter to reduce the amount of data charted in relevant widgets. +message DashboardFilter { + // The type for the dashboard filter + enum FilterType { + // Filter type is unspecified. This is not valid in a well-formed request. + FILTER_TYPE_UNSPECIFIED = 0; + + // Filter on a resource label value + RESOURCE_LABEL = 1; + + // Filter on a metrics label value + METRIC_LABEL = 2; + + // Filter on a user metadata label value + USER_METADATA_LABEL = 3; + + // Filter on a system metadata label value + SYSTEM_METADATA_LABEL = 4; + + // Filter on a group id + GROUP = 5; + } + + // Required. The key for the label + string label_key = 1 [(google.api.field_behavior) = REQUIRED]; + + // The placeholder text that can be referenced in a filter string or MQL + // query. If omitted, the dashboard filter will be applied to all relevant + // widgets in the dashboard. + string template_variable = 3; + + // The default value used in the filter comparison + oneof default_value { + // A variable-length string value. + string string_value = 4; + } + + // The specified filter type + FilterType filter_type = 5; +} diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboards_service.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboards_service.proto index 21bedfb0121..4e99c4f7e4d 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboards_service.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboards_service.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,11 +17,11 @@ syntax = "proto3"; package google.monitoring.dashboard.v1; import "google/api/annotations.proto"; +import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/monitoring/dashboard/v1/dashboard.proto"; import "google/protobuf/empty.proto"; -import "google/api/client.proto"; option csharp_namespace = "Google.Cloud.Monitoring.Dashboard.V1"; option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/drilldowns.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/drilldowns.proto index 24541d3814c..b0a11e0a342 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/drilldowns.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/drilldowns.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/layouts.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/layouts.proto index 81d6a5bd032..94be37aa519 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/layouts.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/layouts.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/logs_panel.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/logs_panel.proto new file mode 100644 index 00000000000..a5fb66c7d6c --- /dev/null +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/logs_panel.proto @@ -0,0 +1,38 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.monitoring.dashboard.v1; + +option csharp_namespace = "Google.Cloud.Monitoring.Dashboard.V1"; +option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; +option java_multiple_files = true; +option java_outer_classname = "LogsPanelProto"; +option java_package = "com.google.monitoring.dashboard.v1"; +option php_namespace = "Google\\Cloud\\Monitoring\\Dashboard\\V1"; +option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; + +// A widget that displays a stream of log. +message LogsPanel { + // A filter that chooses which log entries to return. See [Advanced Logs + // Queries](https://cloud.google.com/logging/docs/view/advanced-queries). + // Only log entries that match the filter are returned. An empty filter + // matches all log entries. + string filter = 1; + + // The names of logging resources to collect logs for. Currently only projects + // are supported. If empty, the widget will default to the host project. + repeated string resource_names = 2; +} diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/metrics.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/metrics.proto index dc2bb93dc39..c5ae8f718c2 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/metrics.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/metrics.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -148,6 +148,18 @@ message Threshold { BELOW = 2; } + // An axis identifier. + enum TargetAxis { + // The target axis was not specified. Defaults to Y1. + TARGET_AXIS_UNSPECIFIED = 0; + + // The y_axis (the right axis of chart). + Y1 = 1; + + // The y2_axis (the left axis of chart). + Y2 = 2; + } + // A label for the threshold. string label = 1; @@ -161,6 +173,10 @@ message Threshold { // The direction for the current threshold. Direction is not allowed in a // XyChart. Direction direction = 4; + + // The target axis to use for plotting the threshold. Target axis is not + // allowed in a Scorecard. + TargetAxis target_axis = 5; } // Defines the possible types of spark chart supported by the `Scorecard`. diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/scorecard.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/scorecard.proto index ab2adf1135b..2cb2e4b2eb0 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/scorecard.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/scorecard.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/service.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/service.proto index 6d5d9a357c4..f7e5e44aef1 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/service.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/service.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/table.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/table.proto new file mode 100644 index 00000000000..8165c3a9b79 --- /dev/null +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/table.proto @@ -0,0 +1,59 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.monitoring.dashboard.v1; + +import "google/api/field_behavior.proto"; +import "google/monitoring/dashboard/v1/metrics.proto"; +import "google/monitoring/dashboard/v1/table_display_options.proto"; +import "google/protobuf/duration.proto"; + +option csharp_namespace = "Google.Cloud.Monitoring.Dashboard.V1"; +option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; +option java_multiple_files = true; +option java_outer_classname = "TableProto"; +option java_package = "com.google.monitoring.dashboard.v1"; +option php_namespace = "Google\\Cloud\\Monitoring\\Dashboard\\V1"; +option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; + +// A table that displays time series data. +message TimeSeriesTable { + // Groups a time series query definition with table options. + message TableDataSet { + // Required. Fields for querying time series data from the + // Stackdriver metrics API. + TimeSeriesQuery time_series_query = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A template string for naming `TimeSeries` in the resulting data set. + // This should be a string with interpolations of the form `${label_name}`, + // which will resolve to the label's value i.e. + // "${resource.labels.project_id}." + string table_template = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The lower bound on data point frequency for this data set, implemented by + // specifying the minimum alignment period to use in a time series query + // For example, if the data is published once every 10 minutes, the + // `min_alignment_period` should be at least 10 minutes. It would not + // make sense to fetch and align data at one minute intervals. + google.protobuf.Duration min_alignment_period = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Table display options for configuring how the table is rendered. + TableDisplayOptions table_display_options = 4 [(google.api.field_behavior) = OPTIONAL]; + } + + // Required. The data displayed in this table. + repeated TableDataSet data_sets = 1 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/table_display_options.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/table_display_options.proto new file mode 100644 index 00000000000..b94b20b11bc --- /dev/null +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/table_display_options.proto @@ -0,0 +1,34 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.monitoring.dashboard.v1; + +import "google/api/field_behavior.proto"; + +option csharp_namespace = "Google.Cloud.Monitoring.Dashboard.V1"; +option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; +option java_multiple_files = true; +option java_outer_classname = "TableDisplayOptionsProto"; +option java_package = "com.google.monitoring.dashboard.v1"; +option php_namespace = "Google\\Cloud\\Monitoring\\Dashboard\\V1"; +option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; + +// Table display options that can be reused. +message TableDisplayOptions { + // Optional. Columns to display in the table. Leave empty to display all available + // columns. Note: This field is for future features and is not currently used. + repeated string shown_columns = 1 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/text.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/text.proto index 2b1ddd3bba7..ed75a19f2c6 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/text.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/text.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/widget.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/widget.proto index 8cf3c3f0c92..bb50eec8ed3 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/widget.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/widget.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -18,7 +18,10 @@ package google.monitoring.dashboard.v1; import "google/api/field_behavior.proto"; import "google/monitoring/dashboard/v1/alertchart.proto"; +import "google/monitoring/dashboard/v1/collapsible_group.proto"; +import "google/monitoring/dashboard/v1/logs_panel.proto"; import "google/monitoring/dashboard/v1/scorecard.proto"; +import "google/monitoring/dashboard/v1/table.proto"; import "google/monitoring/dashboard/v1/text.proto"; import "google/monitoring/dashboard/v1/xychart.proto"; import "google/protobuf/empty.proto"; @@ -53,5 +56,15 @@ message Widget { // A chart of alert policy data. AlertChart alert_chart = 7; + + // A widget that displays time series data in a tabular format. + TimeSeriesTable time_series_table = 8; + + // A widget that groups the other widgets. All widgets that are within + // the area spanned by the grouping widget are considered member widgets. + CollapsibleGroup collapsible_group = 9; + + // A widget that shows a stream of logs. + LogsPanel logs_panel = 10; } } diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/xychart.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/xychart.proto index c29542c27e0..11a26a49c3a 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/xychart.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/xychart.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -59,6 +59,18 @@ message XyChart { HEATMAP = 4; } + // An axis identifier. + enum TargetAxis { + // The target axis was not specified. Defaults to Y1. + TARGET_AXIS_UNSPECIFIED = 0; + + // The y_axis (the right axis of chart). + Y1 = 1; + + // The y2_axis (the left axis of chart). + Y2 = 2; + } + // Required. Fields for querying time series data from the // Stackdriver metrics API. TimeSeriesQuery time_series_query = 1 [(google.api.field_behavior) = REQUIRED]; @@ -77,6 +89,9 @@ message XyChart { // `min_alignment_period` should be at least 10 minutes. It would not // make sense to fetch and align data at one minute intervals. google.protobuf.Duration min_alignment_period = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The target axis to use for plotting the metric. + TargetAxis target_axis = 5 [(google.api.field_behavior) = OPTIONAL]; } // A chart axis. @@ -119,6 +134,9 @@ message XyChart { // The properties applied to the Y axis. Axis y_axis = 7; + // The properties applied to the Y2 axis. + Axis y2_axis = 9; + // Display options for the chart. ChartOptions chart_options = 8; } diff --git a/packages/google-monitoring-dashboard/protos/protos.d.ts b/packages/google-monitoring-dashboard/protos/protos.d.ts index a3d38e8774f..38361636eff 100644 --- a/packages/google-monitoring-dashboard/protos/protos.d.ts +++ b/packages/google-monitoring-dashboard/protos/protos.d.ts @@ -116,6 +116,96 @@ export namespace google { public toJSON(): { [k: string]: any }; } + /** Properties of a CollapsibleGroup. */ + interface ICollapsibleGroup { + + /** CollapsibleGroup collapsed */ + collapsed?: (boolean|null); + } + + /** Represents a CollapsibleGroup. */ + class CollapsibleGroup implements ICollapsibleGroup { + + /** + * Constructs a new CollapsibleGroup. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.ICollapsibleGroup); + + /** CollapsibleGroup collapsed. */ + public collapsed: boolean; + + /** + * Creates a new CollapsibleGroup instance using the specified properties. + * @param [properties] Properties to set + * @returns CollapsibleGroup instance + */ + public static create(properties?: google.monitoring.dashboard.v1.ICollapsibleGroup): google.monitoring.dashboard.v1.CollapsibleGroup; + + /** + * Encodes the specified CollapsibleGroup message. Does not implicitly {@link google.monitoring.dashboard.v1.CollapsibleGroup.verify|verify} messages. + * @param message CollapsibleGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.ICollapsibleGroup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CollapsibleGroup message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.CollapsibleGroup.verify|verify} messages. + * @param message CollapsibleGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.ICollapsibleGroup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CollapsibleGroup message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CollapsibleGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.CollapsibleGroup; + + /** + * Decodes a CollapsibleGroup message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CollapsibleGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.CollapsibleGroup; + + /** + * Verifies a CollapsibleGroup message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CollapsibleGroup message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CollapsibleGroup + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.CollapsibleGroup; + + /** + * Creates a plain object from a CollapsibleGroup message. Also converts values to other types if specified. + * @param message CollapsibleGroup + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.CollapsibleGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CollapsibleGroup to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of an Aggregation. */ interface IAggregation { @@ -518,6 +608,12 @@ export namespace google { /** Dashboard columnLayout */ columnLayout?: (google.monitoring.dashboard.v1.IColumnLayout|null); + + /** Dashboard dashboardFilters */ + dashboardFilters?: (google.monitoring.dashboard.v1.IDashboardFilter[]|null); + + /** Dashboard labels */ + labels?: ({ [k: string]: string }|null); } /** Represents a Dashboard. */ @@ -550,6 +646,12 @@ export namespace google { /** Dashboard columnLayout. */ public columnLayout?: (google.monitoring.dashboard.v1.IColumnLayout|null); + /** Dashboard dashboardFilters. */ + public dashboardFilters: google.monitoring.dashboard.v1.IDashboardFilter[]; + + /** Dashboard labels. */ + public labels: { [k: string]: string }; + /** Dashboard layout. */ public layout?: ("gridLayout"|"mosaicLayout"|"rowLayout"|"columnLayout"); @@ -624,6 +726,130 @@ export namespace google { public toJSON(): { [k: string]: any }; } + /** Properties of a DashboardFilter. */ + interface IDashboardFilter { + + /** DashboardFilter labelKey */ + labelKey?: (string|null); + + /** DashboardFilter templateVariable */ + templateVariable?: (string|null); + + /** DashboardFilter stringValue */ + stringValue?: (string|null); + + /** DashboardFilter filterType */ + filterType?: (google.monitoring.dashboard.v1.DashboardFilter.FilterType|keyof typeof google.monitoring.dashboard.v1.DashboardFilter.FilterType|null); + } + + /** Represents a DashboardFilter. */ + class DashboardFilter implements IDashboardFilter { + + /** + * Constructs a new DashboardFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.IDashboardFilter); + + /** DashboardFilter labelKey. */ + public labelKey: string; + + /** DashboardFilter templateVariable. */ + public templateVariable: string; + + /** DashboardFilter stringValue. */ + public stringValue?: (string|null); + + /** DashboardFilter filterType. */ + public filterType: (google.monitoring.dashboard.v1.DashboardFilter.FilterType|keyof typeof google.monitoring.dashboard.v1.DashboardFilter.FilterType); + + /** DashboardFilter defaultValue. */ + public defaultValue?: "stringValue"; + + /** + * Creates a new DashboardFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns DashboardFilter instance + */ + public static create(properties?: google.monitoring.dashboard.v1.IDashboardFilter): google.monitoring.dashboard.v1.DashboardFilter; + + /** + * Encodes the specified DashboardFilter message. Does not implicitly {@link google.monitoring.dashboard.v1.DashboardFilter.verify|verify} messages. + * @param message DashboardFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.IDashboardFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DashboardFilter message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.DashboardFilter.verify|verify} messages. + * @param message DashboardFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.IDashboardFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DashboardFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DashboardFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.DashboardFilter; + + /** + * Decodes a DashboardFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DashboardFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.DashboardFilter; + + /** + * Verifies a DashboardFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DashboardFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DashboardFilter + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.DashboardFilter; + + /** + * Creates a plain object from a DashboardFilter message. Also converts values to other types if specified. + * @param message DashboardFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.DashboardFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DashboardFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace DashboardFilter { + + /** FilterType enum. */ + enum FilterType { + FILTER_TYPE_UNSPECIFIED = 0, + RESOURCE_LABEL = 1, + METRIC_LABEL = 2, + USER_METADATA_LABEL = 3, + SYSTEM_METADATA_LABEL = 4, + GROUP = 5 + } + } + /** Properties of a GridLayout. */ interface IGridLayout { @@ -1331,6 +1557,15 @@ export namespace google { /** Widget alertChart */ alertChart?: (google.monitoring.dashboard.v1.IAlertChart|null); + + /** Widget timeSeriesTable */ + timeSeriesTable?: (google.monitoring.dashboard.v1.ITimeSeriesTable|null); + + /** Widget collapsibleGroup */ + collapsibleGroup?: (google.monitoring.dashboard.v1.ICollapsibleGroup|null); + + /** Widget logsPanel */ + logsPanel?: (google.monitoring.dashboard.v1.ILogsPanel|null); } /** Represents a Widget. */ @@ -1360,8 +1595,17 @@ export namespace google { /** Widget alertChart. */ public alertChart?: (google.monitoring.dashboard.v1.IAlertChart|null); + /** Widget timeSeriesTable. */ + public timeSeriesTable?: (google.monitoring.dashboard.v1.ITimeSeriesTable|null); + + /** Widget collapsibleGroup. */ + public collapsibleGroup?: (google.monitoring.dashboard.v1.ICollapsibleGroup|null); + + /** Widget logsPanel. */ + public logsPanel?: (google.monitoring.dashboard.v1.ILogsPanel|null); + /** Widget content. */ - public content?: ("xyChart"|"scorecard"|"text"|"blank"|"alertChart"); + public content?: ("xyChart"|"scorecard"|"text"|"blank"|"alertChart"|"timeSeriesTable"|"collapsibleGroup"|"logsPanel"); /** * Creates a new Widget instance using the specified properties. @@ -1434,6 +1678,102 @@ export namespace google { public toJSON(): { [k: string]: any }; } + /** Properties of a LogsPanel. */ + interface ILogsPanel { + + /** LogsPanel filter */ + filter?: (string|null); + + /** LogsPanel resourceNames */ + resourceNames?: (string[]|null); + } + + /** Represents a LogsPanel. */ + class LogsPanel implements ILogsPanel { + + /** + * Constructs a new LogsPanel. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.ILogsPanel); + + /** LogsPanel filter. */ + public filter: string; + + /** LogsPanel resourceNames. */ + public resourceNames: string[]; + + /** + * Creates a new LogsPanel instance using the specified properties. + * @param [properties] Properties to set + * @returns LogsPanel instance + */ + public static create(properties?: google.monitoring.dashboard.v1.ILogsPanel): google.monitoring.dashboard.v1.LogsPanel; + + /** + * Encodes the specified LogsPanel message. Does not implicitly {@link google.monitoring.dashboard.v1.LogsPanel.verify|verify} messages. + * @param message LogsPanel message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.ILogsPanel, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LogsPanel message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.LogsPanel.verify|verify} messages. + * @param message LogsPanel message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.ILogsPanel, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LogsPanel message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LogsPanel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.LogsPanel; + + /** + * Decodes a LogsPanel message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LogsPanel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.LogsPanel; + + /** + * Verifies a LogsPanel message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LogsPanel message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LogsPanel + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.LogsPanel; + + /** + * Creates a plain object from a LogsPanel message. Also converts values to other types if specified. + * @param message LogsPanel + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.LogsPanel, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LogsPanel to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a Scorecard. */ interface IScorecard { @@ -2198,6 +2538,9 @@ export namespace google { /** Threshold direction */ direction?: (google.monitoring.dashboard.v1.Threshold.Direction|keyof typeof google.monitoring.dashboard.v1.Threshold.Direction|null); + + /** Threshold targetAxis */ + targetAxis?: (google.monitoring.dashboard.v1.Threshold.TargetAxis|keyof typeof google.monitoring.dashboard.v1.Threshold.TargetAxis|null); } /** Represents a Threshold. */ @@ -2221,6 +2564,9 @@ export namespace google { /** Threshold direction. */ public direction: (google.monitoring.dashboard.v1.Threshold.Direction|keyof typeof google.monitoring.dashboard.v1.Threshold.Direction); + /** Threshold targetAxis. */ + public targetAxis: (google.monitoring.dashboard.v1.Threshold.TargetAxis|keyof typeof google.monitoring.dashboard.v1.Threshold.TargetAxis); + /** * Creates a new Threshold instance using the specified properties. * @param [properties] Properties to set @@ -2307,6 +2653,13 @@ export namespace google { ABOVE = 1, BELOW = 2 } + + /** TargetAxis enum. */ + enum TargetAxis { + TARGET_AXIS_UNSPECIFIED = 0, + Y1 = 1, + Y2 = 2 + } } /** SparkChartType enum. */ @@ -2316,6 +2669,297 @@ export namespace google { SPARK_BAR = 2 } + /** Properties of a TimeSeriesTable. */ + interface ITimeSeriesTable { + + /** TimeSeriesTable dataSets */ + dataSets?: (google.monitoring.dashboard.v1.TimeSeriesTable.ITableDataSet[]|null); + } + + /** Represents a TimeSeriesTable. */ + class TimeSeriesTable implements ITimeSeriesTable { + + /** + * Constructs a new TimeSeriesTable. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.ITimeSeriesTable); + + /** TimeSeriesTable dataSets. */ + public dataSets: google.monitoring.dashboard.v1.TimeSeriesTable.ITableDataSet[]; + + /** + * Creates a new TimeSeriesTable instance using the specified properties. + * @param [properties] Properties to set + * @returns TimeSeriesTable instance + */ + public static create(properties?: google.monitoring.dashboard.v1.ITimeSeriesTable): google.monitoring.dashboard.v1.TimeSeriesTable; + + /** + * Encodes the specified TimeSeriesTable message. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesTable.verify|verify} messages. + * @param message TimeSeriesTable message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.ITimeSeriesTable, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TimeSeriesTable message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesTable.verify|verify} messages. + * @param message TimeSeriesTable message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.ITimeSeriesTable, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TimeSeriesTable message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TimeSeriesTable + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.TimeSeriesTable; + + /** + * Decodes a TimeSeriesTable message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TimeSeriesTable + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.TimeSeriesTable; + + /** + * Verifies a TimeSeriesTable message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TimeSeriesTable message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TimeSeriesTable + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.TimeSeriesTable; + + /** + * Creates a plain object from a TimeSeriesTable message. Also converts values to other types if specified. + * @param message TimeSeriesTable + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.TimeSeriesTable, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TimeSeriesTable to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace TimeSeriesTable { + + /** Properties of a TableDataSet. */ + interface ITableDataSet { + + /** TableDataSet timeSeriesQuery */ + timeSeriesQuery?: (google.monitoring.dashboard.v1.ITimeSeriesQuery|null); + + /** TableDataSet tableTemplate */ + tableTemplate?: (string|null); + + /** TableDataSet minAlignmentPeriod */ + minAlignmentPeriod?: (google.protobuf.IDuration|null); + + /** TableDataSet tableDisplayOptions */ + tableDisplayOptions?: (google.monitoring.dashboard.v1.ITableDisplayOptions|null); + } + + /** Represents a TableDataSet. */ + class TableDataSet implements ITableDataSet { + + /** + * Constructs a new TableDataSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.TimeSeriesTable.ITableDataSet); + + /** TableDataSet timeSeriesQuery. */ + public timeSeriesQuery?: (google.monitoring.dashboard.v1.ITimeSeriesQuery|null); + + /** TableDataSet tableTemplate. */ + public tableTemplate: string; + + /** TableDataSet minAlignmentPeriod. */ + public minAlignmentPeriod?: (google.protobuf.IDuration|null); + + /** TableDataSet tableDisplayOptions. */ + public tableDisplayOptions?: (google.monitoring.dashboard.v1.ITableDisplayOptions|null); + + /** + * Creates a new TableDataSet instance using the specified properties. + * @param [properties] Properties to set + * @returns TableDataSet instance + */ + public static create(properties?: google.monitoring.dashboard.v1.TimeSeriesTable.ITableDataSet): google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet; + + /** + * Encodes the specified TableDataSet message. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet.verify|verify} messages. + * @param message TableDataSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.TimeSeriesTable.ITableDataSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TableDataSet message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet.verify|verify} messages. + * @param message TableDataSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.TimeSeriesTable.ITableDataSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TableDataSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TableDataSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet; + + /** + * Decodes a TableDataSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TableDataSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet; + + /** + * Verifies a TableDataSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TableDataSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TableDataSet + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet; + + /** + * Creates a plain object from a TableDataSet message. Also converts values to other types if specified. + * @param message TableDataSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TableDataSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a TableDisplayOptions. */ + interface ITableDisplayOptions { + + /** TableDisplayOptions shownColumns */ + shownColumns?: (string[]|null); + } + + /** Represents a TableDisplayOptions. */ + class TableDisplayOptions implements ITableDisplayOptions { + + /** + * Constructs a new TableDisplayOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.ITableDisplayOptions); + + /** TableDisplayOptions shownColumns. */ + public shownColumns: string[]; + + /** + * Creates a new TableDisplayOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns TableDisplayOptions instance + */ + public static create(properties?: google.monitoring.dashboard.v1.ITableDisplayOptions): google.monitoring.dashboard.v1.TableDisplayOptions; + + /** + * Encodes the specified TableDisplayOptions message. Does not implicitly {@link google.monitoring.dashboard.v1.TableDisplayOptions.verify|verify} messages. + * @param message TableDisplayOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.ITableDisplayOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TableDisplayOptions message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TableDisplayOptions.verify|verify} messages. + * @param message TableDisplayOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.ITableDisplayOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TableDisplayOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TableDisplayOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.TableDisplayOptions; + + /** + * Decodes a TableDisplayOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TableDisplayOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.TableDisplayOptions; + + /** + * Verifies a TableDisplayOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TableDisplayOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TableDisplayOptions + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.TableDisplayOptions; + + /** + * Creates a plain object from a TableDisplayOptions message. Also converts values to other types if specified. + * @param message TableDisplayOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.TableDisplayOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TableDisplayOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a Text. */ interface IText { @@ -2440,6 +3084,9 @@ export namespace google { /** XyChart yAxis */ yAxis?: (google.monitoring.dashboard.v1.XyChart.IAxis|null); + /** XyChart y2Axis */ + y2Axis?: (google.monitoring.dashboard.v1.XyChart.IAxis|null); + /** XyChart chartOptions */ chartOptions?: (google.monitoring.dashboard.v1.IChartOptions|null); } @@ -2468,6 +3115,9 @@ export namespace google { /** XyChart yAxis. */ public yAxis?: (google.monitoring.dashboard.v1.XyChart.IAxis|null); + /** XyChart y2Axis. */ + public y2Axis?: (google.monitoring.dashboard.v1.XyChart.IAxis|null); + /** XyChart chartOptions. */ public chartOptions?: (google.monitoring.dashboard.v1.IChartOptions|null); @@ -2558,6 +3208,9 @@ export namespace google { /** DataSet minAlignmentPeriod */ minAlignmentPeriod?: (google.protobuf.IDuration|null); + + /** DataSet targetAxis */ + targetAxis?: (google.monitoring.dashboard.v1.XyChart.DataSet.TargetAxis|keyof typeof google.monitoring.dashboard.v1.XyChart.DataSet.TargetAxis|null); } /** Represents a DataSet. */ @@ -2581,6 +3234,9 @@ export namespace google { /** DataSet minAlignmentPeriod. */ public minAlignmentPeriod?: (google.protobuf.IDuration|null); + /** DataSet targetAxis. */ + public targetAxis: (google.monitoring.dashboard.v1.XyChart.DataSet.TargetAxis|keyof typeof google.monitoring.dashboard.v1.XyChart.DataSet.TargetAxis); + /** * Creates a new DataSet instance using the specified properties. * @param [properties] Properties to set @@ -2662,6 +3318,13 @@ export namespace google { STACKED_BAR = 3, HEATMAP = 4 } + + /** TargetAxis enum. */ + enum TargetAxis { + TARGET_AXIS_UNSPECIFIED = 0, + Y1 = 1, + Y2 = 2 + } } /** Properties of an Axis. */ diff --git a/packages/google-monitoring-dashboard/protos/protos.js b/packages/google-monitoring-dashboard/protos/protos.js index bd64c4cdf7c..c2a9f3059b7 100644 --- a/packages/google-monitoring-dashboard/protos/protos.js +++ b/packages/google-monitoring-dashboard/protos/protos.js @@ -253,6 +253,193 @@ return AlertChart; })(); + v1.CollapsibleGroup = (function() { + + /** + * Properties of a CollapsibleGroup. + * @memberof google.monitoring.dashboard.v1 + * @interface ICollapsibleGroup + * @property {boolean|null} [collapsed] CollapsibleGroup collapsed + */ + + /** + * Constructs a new CollapsibleGroup. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a CollapsibleGroup. + * @implements ICollapsibleGroup + * @constructor + * @param {google.monitoring.dashboard.v1.ICollapsibleGroup=} [properties] Properties to set + */ + function CollapsibleGroup(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CollapsibleGroup collapsed. + * @member {boolean} collapsed + * @memberof google.monitoring.dashboard.v1.CollapsibleGroup + * @instance + */ + CollapsibleGroup.prototype.collapsed = false; + + /** + * Creates a new CollapsibleGroup instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.CollapsibleGroup + * @static + * @param {google.monitoring.dashboard.v1.ICollapsibleGroup=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.CollapsibleGroup} CollapsibleGroup instance + */ + CollapsibleGroup.create = function create(properties) { + return new CollapsibleGroup(properties); + }; + + /** + * Encodes the specified CollapsibleGroup message. Does not implicitly {@link google.monitoring.dashboard.v1.CollapsibleGroup.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.CollapsibleGroup + * @static + * @param {google.monitoring.dashboard.v1.ICollapsibleGroup} message CollapsibleGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CollapsibleGroup.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.collapsed != null && Object.hasOwnProperty.call(message, "collapsed")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.collapsed); + return writer; + }; + + /** + * Encodes the specified CollapsibleGroup message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.CollapsibleGroup.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.CollapsibleGroup + * @static + * @param {google.monitoring.dashboard.v1.ICollapsibleGroup} message CollapsibleGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CollapsibleGroup.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CollapsibleGroup message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.CollapsibleGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.CollapsibleGroup} CollapsibleGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CollapsibleGroup.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.CollapsibleGroup(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.collapsed = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CollapsibleGroup message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.CollapsibleGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.CollapsibleGroup} CollapsibleGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CollapsibleGroup.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CollapsibleGroup message. + * @function verify + * @memberof google.monitoring.dashboard.v1.CollapsibleGroup + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CollapsibleGroup.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.collapsed != null && message.hasOwnProperty("collapsed")) + if (typeof message.collapsed !== "boolean") + return "collapsed: boolean expected"; + return null; + }; + + /** + * Creates a CollapsibleGroup message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.CollapsibleGroup + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.CollapsibleGroup} CollapsibleGroup + */ + CollapsibleGroup.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.CollapsibleGroup) + return object; + var message = new $root.google.monitoring.dashboard.v1.CollapsibleGroup(); + if (object.collapsed != null) + message.collapsed = Boolean(object.collapsed); + return message; + }; + + /** + * Creates a plain object from a CollapsibleGroup message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.CollapsibleGroup + * @static + * @param {google.monitoring.dashboard.v1.CollapsibleGroup} message CollapsibleGroup + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CollapsibleGroup.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.collapsed = false; + if (message.collapsed != null && message.hasOwnProperty("collapsed")) + object.collapsed = message.collapsed; + return object; + }; + + /** + * Converts this CollapsibleGroup to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.CollapsibleGroup + * @instance + * @returns {Object.} JSON object + */ + CollapsibleGroup.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CollapsibleGroup; + })(); + v1.Aggregation = (function() { /** @@ -1357,6 +1544,8 @@ * @property {google.monitoring.dashboard.v1.IMosaicLayout|null} [mosaicLayout] Dashboard mosaicLayout * @property {google.monitoring.dashboard.v1.IRowLayout|null} [rowLayout] Dashboard rowLayout * @property {google.monitoring.dashboard.v1.IColumnLayout|null} [columnLayout] Dashboard columnLayout + * @property {Array.|null} [dashboardFilters] Dashboard dashboardFilters + * @property {Object.|null} [labels] Dashboard labels */ /** @@ -1368,6 +1557,8 @@ * @param {google.monitoring.dashboard.v1.IDashboard=} [properties] Properties to set */ function Dashboard(properties) { + this.dashboardFilters = []; + this.labels = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1430,6 +1621,22 @@ */ Dashboard.prototype.columnLayout = null; + /** + * Dashboard dashboardFilters. + * @member {Array.} dashboardFilters + * @memberof google.monitoring.dashboard.v1.Dashboard + * @instance + */ + Dashboard.prototype.dashboardFilters = $util.emptyArray; + + /** + * Dashboard labels. + * @member {Object.} labels + * @memberof google.monitoring.dashboard.v1.Dashboard + * @instance + */ + Dashboard.prototype.labels = $util.emptyObject; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -1482,6 +1689,12 @@ $root.google.monitoring.dashboard.v1.RowLayout.encode(message.rowLayout, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); if (message.columnLayout != null && Object.hasOwnProperty.call(message, "columnLayout")) $root.google.monitoring.dashboard.v1.ColumnLayout.encode(message.columnLayout, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.dashboardFilters != null && message.dashboardFilters.length) + for (var i = 0; i < message.dashboardFilters.length; ++i) + $root.google.monitoring.dashboard.v1.DashboardFilter.encode(message.dashboardFilters[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 12, wireType 2 =*/98).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); return writer; }; @@ -1512,7 +1725,7 @@ Dashboard.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Dashboard(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Dashboard(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -1537,6 +1750,33 @@ case 9: message.columnLayout = $root.google.monitoring.dashboard.v1.ColumnLayout.decode(reader, reader.uint32()); break; + case 11: + if (!(message.dashboardFilters && message.dashboardFilters.length)) + message.dashboardFilters = []; + message.dashboardFilters.push($root.google.monitoring.dashboard.v1.DashboardFilter.decode(reader, reader.uint32())); + break; + case 12: + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; default: reader.skipType(tag & 7); break; @@ -1620,6 +1860,23 @@ return "columnLayout." + error; } } + if (message.dashboardFilters != null && message.hasOwnProperty("dashboardFilters")) { + if (!Array.isArray(message.dashboardFilters)) + return "dashboardFilters: array expected"; + for (var i = 0; i < message.dashboardFilters.length; ++i) { + var error = $root.google.monitoring.dashboard.v1.DashboardFilter.verify(message.dashboardFilters[i]); + if (error) + return "dashboardFilters." + error; + } + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } return null; }; @@ -1661,6 +1918,23 @@ throw TypeError(".google.monitoring.dashboard.v1.Dashboard.columnLayout: object expected"); message.columnLayout = $root.google.monitoring.dashboard.v1.ColumnLayout.fromObject(object.columnLayout); } + if (object.dashboardFilters) { + if (!Array.isArray(object.dashboardFilters)) + throw TypeError(".google.monitoring.dashboard.v1.Dashboard.dashboardFilters: array expected"); + message.dashboardFilters = []; + for (var i = 0; i < object.dashboardFilters.length; ++i) { + if (typeof object.dashboardFilters[i] !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Dashboard.dashboardFilters: object expected"); + message.dashboardFilters[i] = $root.google.monitoring.dashboard.v1.DashboardFilter.fromObject(object.dashboardFilters[i]); + } + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Dashboard.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } return message; }; @@ -1677,6 +1951,10 @@ if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.dashboardFilters = []; + if (options.objects || options.defaults) + object.labels = {}; if (options.defaults) { object.name = ""; object.displayName = ""; @@ -1708,6 +1986,17 @@ if (options.oneofs) object.layout = "columnLayout"; } + if (message.dashboardFilters && message.dashboardFilters.length) { + object.dashboardFilters = []; + for (var j = 0; j < message.dashboardFilters.length; ++j) + object.dashboardFilters[j] = $root.google.monitoring.dashboard.v1.DashboardFilter.toObject(message.dashboardFilters[j], options); + } + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } return object; }; @@ -1725,26 +2014,27 @@ return Dashboard; })(); - v1.GridLayout = (function() { + v1.DashboardFilter = (function() { /** - * Properties of a GridLayout. + * Properties of a DashboardFilter. * @memberof google.monitoring.dashboard.v1 - * @interface IGridLayout - * @property {number|Long|null} [columns] GridLayout columns - * @property {Array.|null} [widgets] GridLayout widgets + * @interface IDashboardFilter + * @property {string|null} [labelKey] DashboardFilter labelKey + * @property {string|null} [templateVariable] DashboardFilter templateVariable + * @property {string|null} [stringValue] DashboardFilter stringValue + * @property {google.monitoring.dashboard.v1.DashboardFilter.FilterType|null} [filterType] DashboardFilter filterType */ /** - * Constructs a new GridLayout. + * Constructs a new DashboardFilter. * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a GridLayout. - * @implements IGridLayout + * @classdesc Represents a DashboardFilter. + * @implements IDashboardFilter * @constructor - * @param {google.monitoring.dashboard.v1.IGridLayout=} [properties] Properties to set + * @param {google.monitoring.dashboard.v1.IDashboardFilter=} [properties] Properties to set */ - function GridLayout(properties) { - this.widgets = []; + function DashboardFilter(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1752,91 +2042,128 @@ } /** - * GridLayout columns. - * @member {number|Long} columns - * @memberof google.monitoring.dashboard.v1.GridLayout + * DashboardFilter labelKey. + * @member {string} labelKey + * @memberof google.monitoring.dashboard.v1.DashboardFilter * @instance */ - GridLayout.prototype.columns = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + DashboardFilter.prototype.labelKey = ""; /** - * GridLayout widgets. - * @member {Array.} widgets - * @memberof google.monitoring.dashboard.v1.GridLayout + * DashboardFilter templateVariable. + * @member {string} templateVariable + * @memberof google.monitoring.dashboard.v1.DashboardFilter * @instance */ - GridLayout.prototype.widgets = $util.emptyArray; + DashboardFilter.prototype.templateVariable = ""; /** - * Creates a new GridLayout instance using the specified properties. + * DashboardFilter stringValue. + * @member {string|null|undefined} stringValue + * @memberof google.monitoring.dashboard.v1.DashboardFilter + * @instance + */ + DashboardFilter.prototype.stringValue = null; + + /** + * DashboardFilter filterType. + * @member {google.monitoring.dashboard.v1.DashboardFilter.FilterType} filterType + * @memberof google.monitoring.dashboard.v1.DashboardFilter + * @instance + */ + DashboardFilter.prototype.filterType = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DashboardFilter defaultValue. + * @member {"stringValue"|undefined} defaultValue + * @memberof google.monitoring.dashboard.v1.DashboardFilter + * @instance + */ + Object.defineProperty(DashboardFilter.prototype, "defaultValue", { + get: $util.oneOfGetter($oneOfFields = ["stringValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DashboardFilter instance using the specified properties. * @function create - * @memberof google.monitoring.dashboard.v1.GridLayout + * @memberof google.monitoring.dashboard.v1.DashboardFilter * @static - * @param {google.monitoring.dashboard.v1.IGridLayout=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.GridLayout} GridLayout instance + * @param {google.monitoring.dashboard.v1.IDashboardFilter=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.DashboardFilter} DashboardFilter instance */ - GridLayout.create = function create(properties) { - return new GridLayout(properties); + DashboardFilter.create = function create(properties) { + return new DashboardFilter(properties); }; /** - * Encodes the specified GridLayout message. Does not implicitly {@link google.monitoring.dashboard.v1.GridLayout.verify|verify} messages. + * Encodes the specified DashboardFilter message. Does not implicitly {@link google.monitoring.dashboard.v1.DashboardFilter.verify|verify} messages. * @function encode - * @memberof google.monitoring.dashboard.v1.GridLayout + * @memberof google.monitoring.dashboard.v1.DashboardFilter * @static - * @param {google.monitoring.dashboard.v1.IGridLayout} message GridLayout message or plain object to encode + * @param {google.monitoring.dashboard.v1.IDashboardFilter} message DashboardFilter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GridLayout.encode = function encode(message, writer) { + DashboardFilter.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.columns != null && Object.hasOwnProperty.call(message, "columns")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.columns); - if (message.widgets != null && message.widgets.length) - for (var i = 0; i < message.widgets.length; ++i) - $root.google.monitoring.dashboard.v1.Widget.encode(message.widgets[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.labelKey != null && Object.hasOwnProperty.call(message, "labelKey")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.labelKey); + if (message.templateVariable != null && Object.hasOwnProperty.call(message, "templateVariable")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.templateVariable); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.stringValue); + if (message.filterType != null && Object.hasOwnProperty.call(message, "filterType")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.filterType); return writer; }; /** - * Encodes the specified GridLayout message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.GridLayout.verify|verify} messages. + * Encodes the specified DashboardFilter message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.DashboardFilter.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.GridLayout + * @memberof google.monitoring.dashboard.v1.DashboardFilter * @static - * @param {google.monitoring.dashboard.v1.IGridLayout} message GridLayout message or plain object to encode + * @param {google.monitoring.dashboard.v1.IDashboardFilter} message DashboardFilter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GridLayout.encodeDelimited = function encodeDelimited(message, writer) { + DashboardFilter.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GridLayout message from the specified reader or buffer. + * Decodes a DashboardFilter message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.dashboard.v1.GridLayout + * @memberof google.monitoring.dashboard.v1.DashboardFilter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.GridLayout} GridLayout + * @returns {google.monitoring.dashboard.v1.DashboardFilter} DashboardFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GridLayout.decode = function decode(reader, length) { + DashboardFilter.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.GridLayout(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.DashboardFilter(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.columns = reader.int64(); + message.labelKey = reader.string(); break; - case 2: - if (!(message.widgets && message.widgets.length)) - message.widgets = []; - message.widgets.push($root.google.monitoring.dashboard.v1.Widget.decode(reader, reader.uint32())); + case 3: + message.templateVariable = reader.string(); + break; + case 4: + message.stringValue = reader.string(); + break; + case 5: + message.filterType = reader.int32(); break; default: reader.skipType(tag & 7); @@ -1847,62 +2174,352 @@ }; /** - * Decodes a GridLayout message from the specified reader or buffer, length delimited. + * Decodes a DashboardFilter message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.GridLayout + * @memberof google.monitoring.dashboard.v1.DashboardFilter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.GridLayout} GridLayout + * @returns {google.monitoring.dashboard.v1.DashboardFilter} DashboardFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GridLayout.decodeDelimited = function decodeDelimited(reader) { + DashboardFilter.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GridLayout message. + * Verifies a DashboardFilter message. * @function verify - * @memberof google.monitoring.dashboard.v1.GridLayout + * @memberof google.monitoring.dashboard.v1.DashboardFilter * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GridLayout.verify = function verify(message) { + DashboardFilter.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.columns != null && message.hasOwnProperty("columns")) - if (!$util.isInteger(message.columns) && !(message.columns && $util.isInteger(message.columns.low) && $util.isInteger(message.columns.high))) - return "columns: integer|Long expected"; - if (message.widgets != null && message.hasOwnProperty("widgets")) { - if (!Array.isArray(message.widgets)) - return "widgets: array expected"; - for (var i = 0; i < message.widgets.length; ++i) { - var error = $root.google.monitoring.dashboard.v1.Widget.verify(message.widgets[i]); - if (error) - return "widgets." + error; - } + var properties = {}; + if (message.labelKey != null && message.hasOwnProperty("labelKey")) + if (!$util.isString(message.labelKey)) + return "labelKey: string expected"; + if (message.templateVariable != null && message.hasOwnProperty("templateVariable")) + if (!$util.isString(message.templateVariable)) + return "templateVariable: string expected"; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + properties.defaultValue = 1; + if (!$util.isString(message.stringValue)) + return "stringValue: string expected"; } + if (message.filterType != null && message.hasOwnProperty("filterType")) + switch (message.filterType) { + default: + return "filterType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } return null; }; /** - * Creates a GridLayout message from a plain object. Also converts values to their respective internal types. + * Creates a DashboardFilter message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.dashboard.v1.GridLayout + * @memberof google.monitoring.dashboard.v1.DashboardFilter * @static * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.GridLayout} GridLayout + * @returns {google.monitoring.dashboard.v1.DashboardFilter} DashboardFilter */ - GridLayout.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.GridLayout) + DashboardFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.DashboardFilter) return object; - var message = new $root.google.monitoring.dashboard.v1.GridLayout(); - if (object.columns != null) - if ($util.Long) - (message.columns = $util.Long.fromValue(object.columns)).unsigned = false; + var message = new $root.google.monitoring.dashboard.v1.DashboardFilter(); + if (object.labelKey != null) + message.labelKey = String(object.labelKey); + if (object.templateVariable != null) + message.templateVariable = String(object.templateVariable); + if (object.stringValue != null) + message.stringValue = String(object.stringValue); + switch (object.filterType) { + case "FILTER_TYPE_UNSPECIFIED": + case 0: + message.filterType = 0; + break; + case "RESOURCE_LABEL": + case 1: + message.filterType = 1; + break; + case "METRIC_LABEL": + case 2: + message.filterType = 2; + break; + case "USER_METADATA_LABEL": + case 3: + message.filterType = 3; + break; + case "SYSTEM_METADATA_LABEL": + case 4: + message.filterType = 4; + break; + case "GROUP": + case 5: + message.filterType = 5; + break; + } + return message; + }; + + /** + * Creates a plain object from a DashboardFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.DashboardFilter + * @static + * @param {google.monitoring.dashboard.v1.DashboardFilter} message DashboardFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DashboardFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.labelKey = ""; + object.templateVariable = ""; + object.filterType = options.enums === String ? "FILTER_TYPE_UNSPECIFIED" : 0; + } + if (message.labelKey != null && message.hasOwnProperty("labelKey")) + object.labelKey = message.labelKey; + if (message.templateVariable != null && message.hasOwnProperty("templateVariable")) + object.templateVariable = message.templateVariable; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + object.stringValue = message.stringValue; + if (options.oneofs) + object.defaultValue = "stringValue"; + } + if (message.filterType != null && message.hasOwnProperty("filterType")) + object.filterType = options.enums === String ? $root.google.monitoring.dashboard.v1.DashboardFilter.FilterType[message.filterType] : message.filterType; + return object; + }; + + /** + * Converts this DashboardFilter to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.DashboardFilter + * @instance + * @returns {Object.} JSON object + */ + DashboardFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * FilterType enum. + * @name google.monitoring.dashboard.v1.DashboardFilter.FilterType + * @enum {number} + * @property {number} FILTER_TYPE_UNSPECIFIED=0 FILTER_TYPE_UNSPECIFIED value + * @property {number} RESOURCE_LABEL=1 RESOURCE_LABEL value + * @property {number} METRIC_LABEL=2 METRIC_LABEL value + * @property {number} USER_METADATA_LABEL=3 USER_METADATA_LABEL value + * @property {number} SYSTEM_METADATA_LABEL=4 SYSTEM_METADATA_LABEL value + * @property {number} GROUP=5 GROUP value + */ + DashboardFilter.FilterType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FILTER_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "RESOURCE_LABEL"] = 1; + values[valuesById[2] = "METRIC_LABEL"] = 2; + values[valuesById[3] = "USER_METADATA_LABEL"] = 3; + values[valuesById[4] = "SYSTEM_METADATA_LABEL"] = 4; + values[valuesById[5] = "GROUP"] = 5; + return values; + })(); + + return DashboardFilter; + })(); + + v1.GridLayout = (function() { + + /** + * Properties of a GridLayout. + * @memberof google.monitoring.dashboard.v1 + * @interface IGridLayout + * @property {number|Long|null} [columns] GridLayout columns + * @property {Array.|null} [widgets] GridLayout widgets + */ + + /** + * Constructs a new GridLayout. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a GridLayout. + * @implements IGridLayout + * @constructor + * @param {google.monitoring.dashboard.v1.IGridLayout=} [properties] Properties to set + */ + function GridLayout(properties) { + this.widgets = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GridLayout columns. + * @member {number|Long} columns + * @memberof google.monitoring.dashboard.v1.GridLayout + * @instance + */ + GridLayout.prototype.columns = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * GridLayout widgets. + * @member {Array.} widgets + * @memberof google.monitoring.dashboard.v1.GridLayout + * @instance + */ + GridLayout.prototype.widgets = $util.emptyArray; + + /** + * Creates a new GridLayout instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.GridLayout + * @static + * @param {google.monitoring.dashboard.v1.IGridLayout=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.GridLayout} GridLayout instance + */ + GridLayout.create = function create(properties) { + return new GridLayout(properties); + }; + + /** + * Encodes the specified GridLayout message. Does not implicitly {@link google.monitoring.dashboard.v1.GridLayout.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.GridLayout + * @static + * @param {google.monitoring.dashboard.v1.IGridLayout} message GridLayout message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GridLayout.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.columns != null && Object.hasOwnProperty.call(message, "columns")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.columns); + if (message.widgets != null && message.widgets.length) + for (var i = 0; i < message.widgets.length; ++i) + $root.google.monitoring.dashboard.v1.Widget.encode(message.widgets[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GridLayout message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.GridLayout.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.GridLayout + * @static + * @param {google.monitoring.dashboard.v1.IGridLayout} message GridLayout message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GridLayout.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GridLayout message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.GridLayout + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.GridLayout} GridLayout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GridLayout.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.GridLayout(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.columns = reader.int64(); + break; + case 2: + if (!(message.widgets && message.widgets.length)) + message.widgets = []; + message.widgets.push($root.google.monitoring.dashboard.v1.Widget.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GridLayout message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.GridLayout + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.GridLayout} GridLayout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GridLayout.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GridLayout message. + * @function verify + * @memberof google.monitoring.dashboard.v1.GridLayout + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GridLayout.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.columns != null && message.hasOwnProperty("columns")) + if (!$util.isInteger(message.columns) && !(message.columns && $util.isInteger(message.columns.low) && $util.isInteger(message.columns.high))) + return "columns: integer|Long expected"; + if (message.widgets != null && message.hasOwnProperty("widgets")) { + if (!Array.isArray(message.widgets)) + return "widgets: array expected"; + for (var i = 0; i < message.widgets.length; ++i) { + var error = $root.google.monitoring.dashboard.v1.Widget.verify(message.widgets[i]); + if (error) + return "widgets." + error; + } + } + return null; + }; + + /** + * Creates a GridLayout message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.GridLayout + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.GridLayout} GridLayout + */ + GridLayout.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.GridLayout) + return object; + var message = new $root.google.monitoring.dashboard.v1.GridLayout(); + if (object.columns != null) + if ($util.Long) + (message.columns = $util.Long.fromValue(object.columns)).unsigned = false; else if (typeof object.columns === "string") message.columns = parseInt(object.columns, 10); else if (typeof object.columns === "number") @@ -3400,6 +4017,9 @@ * @property {google.monitoring.dashboard.v1.IText|null} [text] Widget text * @property {google.protobuf.IEmpty|null} [blank] Widget blank * @property {google.monitoring.dashboard.v1.IAlertChart|null} [alertChart] Widget alertChart + * @property {google.monitoring.dashboard.v1.ITimeSeriesTable|null} [timeSeriesTable] Widget timeSeriesTable + * @property {google.monitoring.dashboard.v1.ICollapsibleGroup|null} [collapsibleGroup] Widget collapsibleGroup + * @property {google.monitoring.dashboard.v1.ILogsPanel|null} [logsPanel] Widget logsPanel */ /** @@ -3465,17 +4085,41 @@ */ Widget.prototype.alertChart = null; + /** + * Widget timeSeriesTable. + * @member {google.monitoring.dashboard.v1.ITimeSeriesTable|null|undefined} timeSeriesTable + * @memberof google.monitoring.dashboard.v1.Widget + * @instance + */ + Widget.prototype.timeSeriesTable = null; + + /** + * Widget collapsibleGroup. + * @member {google.monitoring.dashboard.v1.ICollapsibleGroup|null|undefined} collapsibleGroup + * @memberof google.monitoring.dashboard.v1.Widget + * @instance + */ + Widget.prototype.collapsibleGroup = null; + + /** + * Widget logsPanel. + * @member {google.monitoring.dashboard.v1.ILogsPanel|null|undefined} logsPanel + * @memberof google.monitoring.dashboard.v1.Widget + * @instance + */ + Widget.prototype.logsPanel = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; /** * Widget content. - * @member {"xyChart"|"scorecard"|"text"|"blank"|"alertChart"|undefined} content + * @member {"xyChart"|"scorecard"|"text"|"blank"|"alertChart"|"timeSeriesTable"|"collapsibleGroup"|"logsPanel"|undefined} content * @memberof google.monitoring.dashboard.v1.Widget * @instance */ Object.defineProperty(Widget.prototype, "content", { - get: $util.oneOfGetter($oneOfFields = ["xyChart", "scorecard", "text", "blank", "alertChart"]), + get: $util.oneOfGetter($oneOfFields = ["xyChart", "scorecard", "text", "blank", "alertChart", "timeSeriesTable", "collapsibleGroup", "logsPanel"]), set: $util.oneOfSetter($oneOfFields) }); @@ -3515,6 +4159,12 @@ $root.google.protobuf.Empty.encode(message.blank, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); if (message.alertChart != null && Object.hasOwnProperty.call(message, "alertChart")) $root.google.monitoring.dashboard.v1.AlertChart.encode(message.alertChart, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.timeSeriesTable != null && Object.hasOwnProperty.call(message, "timeSeriesTable")) + $root.google.monitoring.dashboard.v1.TimeSeriesTable.encode(message.timeSeriesTable, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.collapsibleGroup != null && Object.hasOwnProperty.call(message, "collapsibleGroup")) + $root.google.monitoring.dashboard.v1.CollapsibleGroup.encode(message.collapsibleGroup, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.logsPanel != null && Object.hasOwnProperty.call(message, "logsPanel")) + $root.google.monitoring.dashboard.v1.LogsPanel.encode(message.logsPanel, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); return writer; }; @@ -3567,6 +4217,15 @@ case 7: message.alertChart = $root.google.monitoring.dashboard.v1.AlertChart.decode(reader, reader.uint32()); break; + case 8: + message.timeSeriesTable = $root.google.monitoring.dashboard.v1.TimeSeriesTable.decode(reader, reader.uint32()); + break; + case 9: + message.collapsibleGroup = $root.google.monitoring.dashboard.v1.CollapsibleGroup.decode(reader, reader.uint32()); + break; + case 10: + message.logsPanel = $root.google.monitoring.dashboard.v1.LogsPanel.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -3654,15 +4313,45 @@ return "alertChart." + error; } } - return null; - }; - - /** - * Creates a Widget message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.dashboard.v1.Widget - * @static - * @param {Object.} object Plain object + if (message.timeSeriesTable != null && message.hasOwnProperty("timeSeriesTable")) { + if (properties.content === 1) + return "content: multiple values"; + properties.content = 1; + { + var error = $root.google.monitoring.dashboard.v1.TimeSeriesTable.verify(message.timeSeriesTable); + if (error) + return "timeSeriesTable." + error; + } + } + if (message.collapsibleGroup != null && message.hasOwnProperty("collapsibleGroup")) { + if (properties.content === 1) + return "content: multiple values"; + properties.content = 1; + { + var error = $root.google.monitoring.dashboard.v1.CollapsibleGroup.verify(message.collapsibleGroup); + if (error) + return "collapsibleGroup." + error; + } + } + if (message.logsPanel != null && message.hasOwnProperty("logsPanel")) { + if (properties.content === 1) + return "content: multiple values"; + properties.content = 1; + { + var error = $root.google.monitoring.dashboard.v1.LogsPanel.verify(message.logsPanel); + if (error) + return "logsPanel." + error; + } + } + return null; + }; + + /** + * Creates a Widget message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.Widget + * @static + * @param {Object.} object Plain object * @returns {google.monitoring.dashboard.v1.Widget} Widget */ Widget.fromObject = function fromObject(object) { @@ -3696,6 +4385,21 @@ throw TypeError(".google.monitoring.dashboard.v1.Widget.alertChart: object expected"); message.alertChart = $root.google.monitoring.dashboard.v1.AlertChart.fromObject(object.alertChart); } + if (object.timeSeriesTable != null) { + if (typeof object.timeSeriesTable !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Widget.timeSeriesTable: object expected"); + message.timeSeriesTable = $root.google.monitoring.dashboard.v1.TimeSeriesTable.fromObject(object.timeSeriesTable); + } + if (object.collapsibleGroup != null) { + if (typeof object.collapsibleGroup !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Widget.collapsibleGroup: object expected"); + message.collapsibleGroup = $root.google.monitoring.dashboard.v1.CollapsibleGroup.fromObject(object.collapsibleGroup); + } + if (object.logsPanel != null) { + if (typeof object.logsPanel !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Widget.logsPanel: object expected"); + message.logsPanel = $root.google.monitoring.dashboard.v1.LogsPanel.fromObject(object.logsPanel); + } return message; }; @@ -3741,6 +4445,21 @@ if (options.oneofs) object.content = "alertChart"; } + if (message.timeSeriesTable != null && message.hasOwnProperty("timeSeriesTable")) { + object.timeSeriesTable = $root.google.monitoring.dashboard.v1.TimeSeriesTable.toObject(message.timeSeriesTable, options); + if (options.oneofs) + object.content = "timeSeriesTable"; + } + if (message.collapsibleGroup != null && message.hasOwnProperty("collapsibleGroup")) { + object.collapsibleGroup = $root.google.monitoring.dashboard.v1.CollapsibleGroup.toObject(message.collapsibleGroup, options); + if (options.oneofs) + object.content = "collapsibleGroup"; + } + if (message.logsPanel != null && message.hasOwnProperty("logsPanel")) { + object.logsPanel = $root.google.monitoring.dashboard.v1.LogsPanel.toObject(message.logsPanel, options); + if (options.oneofs) + object.content = "logsPanel"; + } return object; }; @@ -3758,6 +4477,232 @@ return Widget; })(); + v1.LogsPanel = (function() { + + /** + * Properties of a LogsPanel. + * @memberof google.monitoring.dashboard.v1 + * @interface ILogsPanel + * @property {string|null} [filter] LogsPanel filter + * @property {Array.|null} [resourceNames] LogsPanel resourceNames + */ + + /** + * Constructs a new LogsPanel. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a LogsPanel. + * @implements ILogsPanel + * @constructor + * @param {google.monitoring.dashboard.v1.ILogsPanel=} [properties] Properties to set + */ + function LogsPanel(properties) { + this.resourceNames = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LogsPanel filter. + * @member {string} filter + * @memberof google.monitoring.dashboard.v1.LogsPanel + * @instance + */ + LogsPanel.prototype.filter = ""; + + /** + * LogsPanel resourceNames. + * @member {Array.} resourceNames + * @memberof google.monitoring.dashboard.v1.LogsPanel + * @instance + */ + LogsPanel.prototype.resourceNames = $util.emptyArray; + + /** + * Creates a new LogsPanel instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.LogsPanel + * @static + * @param {google.monitoring.dashboard.v1.ILogsPanel=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.LogsPanel} LogsPanel instance + */ + LogsPanel.create = function create(properties) { + return new LogsPanel(properties); + }; + + /** + * Encodes the specified LogsPanel message. Does not implicitly {@link google.monitoring.dashboard.v1.LogsPanel.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.LogsPanel + * @static + * @param {google.monitoring.dashboard.v1.ILogsPanel} message LogsPanel message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogsPanel.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); + if (message.resourceNames != null && message.resourceNames.length) + for (var i = 0; i < message.resourceNames.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceNames[i]); + return writer; + }; + + /** + * Encodes the specified LogsPanel message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.LogsPanel.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.LogsPanel + * @static + * @param {google.monitoring.dashboard.v1.ILogsPanel} message LogsPanel message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogsPanel.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LogsPanel message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.LogsPanel + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.LogsPanel} LogsPanel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogsPanel.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.LogsPanel(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.filter = reader.string(); + break; + case 2: + if (!(message.resourceNames && message.resourceNames.length)) + message.resourceNames = []; + message.resourceNames.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LogsPanel message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.LogsPanel + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.LogsPanel} LogsPanel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogsPanel.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LogsPanel message. + * @function verify + * @memberof google.monitoring.dashboard.v1.LogsPanel + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LogsPanel.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.resourceNames != null && message.hasOwnProperty("resourceNames")) { + if (!Array.isArray(message.resourceNames)) + return "resourceNames: array expected"; + for (var i = 0; i < message.resourceNames.length; ++i) + if (!$util.isString(message.resourceNames[i])) + return "resourceNames: string[] expected"; + } + return null; + }; + + /** + * Creates a LogsPanel message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.LogsPanel + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.LogsPanel} LogsPanel + */ + LogsPanel.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.LogsPanel) + return object; + var message = new $root.google.monitoring.dashboard.v1.LogsPanel(); + if (object.filter != null) + message.filter = String(object.filter); + if (object.resourceNames) { + if (!Array.isArray(object.resourceNames)) + throw TypeError(".google.monitoring.dashboard.v1.LogsPanel.resourceNames: array expected"); + message.resourceNames = []; + for (var i = 0; i < object.resourceNames.length; ++i) + message.resourceNames[i] = String(object.resourceNames[i]); + } + return message; + }; + + /** + * Creates a plain object from a LogsPanel message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.LogsPanel + * @static + * @param {google.monitoring.dashboard.v1.LogsPanel} message LogsPanel + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LogsPanel.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.resourceNames = []; + if (options.defaults) + object.filter = ""; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.resourceNames && message.resourceNames.length) { + object.resourceNames = []; + for (var j = 0; j < message.resourceNames.length; ++j) + object.resourceNames[j] = message.resourceNames[j]; + } + return object; + }; + + /** + * Converts this LogsPanel to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.LogsPanel + * @instance + * @returns {Object.} JSON object + */ + LogsPanel.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return LogsPanel; + })(); + v1.Scorecard = (function() { /** @@ -5690,6 +6635,7 @@ * @property {number|null} [value] Threshold value * @property {google.monitoring.dashboard.v1.Threshold.Color|null} [color] Threshold color * @property {google.monitoring.dashboard.v1.Threshold.Direction|null} [direction] Threshold direction + * @property {google.monitoring.dashboard.v1.Threshold.TargetAxis|null} [targetAxis] Threshold targetAxis */ /** @@ -5739,6 +6685,14 @@ */ Threshold.prototype.direction = 0; + /** + * Threshold targetAxis. + * @member {google.monitoring.dashboard.v1.Threshold.TargetAxis} targetAxis + * @memberof google.monitoring.dashboard.v1.Threshold + * @instance + */ + Threshold.prototype.targetAxis = 0; + /** * Creates a new Threshold instance using the specified properties. * @function create @@ -5771,6 +6725,8 @@ writer.uint32(/* id 3, wireType 0 =*/24).int32(message.color); if (message.direction != null && Object.hasOwnProperty.call(message, "direction")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.direction); + if (message.targetAxis != null && Object.hasOwnProperty.call(message, "targetAxis")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.targetAxis); return writer; }; @@ -5817,6 +6773,9 @@ case 4: message.direction = reader.int32(); break; + case 5: + message.targetAxis = reader.int32(); + break; default: reader.skipType(tag & 7); break; @@ -5876,6 +6835,15 @@ case 2: break; } + if (message.targetAxis != null && message.hasOwnProperty("targetAxis")) + switch (message.targetAxis) { + default: + return "targetAxis: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; @@ -5923,6 +6891,20 @@ message.direction = 2; break; } + switch (object.targetAxis) { + case "TARGET_AXIS_UNSPECIFIED": + case 0: + message.targetAxis = 0; + break; + case "Y1": + case 1: + message.targetAxis = 1; + break; + case "Y2": + case 2: + message.targetAxis = 2; + break; + } return message; }; @@ -5944,6 +6926,7 @@ object.value = 0; object.color = options.enums === String ? "COLOR_UNSPECIFIED" : 0; object.direction = options.enums === String ? "DIRECTION_UNSPECIFIED" : 0; + object.targetAxis = options.enums === String ? "TARGET_AXIS_UNSPECIFIED" : 0; } if (message.label != null && message.hasOwnProperty("label")) object.label = message.label; @@ -5953,6 +6936,8 @@ object.color = options.enums === String ? $root.google.monitoring.dashboard.v1.Threshold.Color[message.color] : message.color; if (message.direction != null && message.hasOwnProperty("direction")) object.direction = options.enums === String ? $root.google.monitoring.dashboard.v1.Threshold.Direction[message.direction] : message.direction; + if (message.targetAxis != null && message.hasOwnProperty("targetAxis")) + object.targetAxis = options.enums === String ? $root.google.monitoring.dashboard.v1.Threshold.TargetAxis[message.targetAxis] : message.targetAxis; return object; }; @@ -5999,6 +6984,22 @@ return values; })(); + /** + * TargetAxis enum. + * @name google.monitoring.dashboard.v1.Threshold.TargetAxis + * @enum {number} + * @property {number} TARGET_AXIS_UNSPECIFIED=0 TARGET_AXIS_UNSPECIFIED value + * @property {number} Y1=1 Y1 value + * @property {number} Y2=2 Y2 value + */ + Threshold.TargetAxis = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TARGET_AXIS_UNSPECIFIED"] = 0; + values[valuesById[1] = "Y1"] = 1; + values[valuesById[2] = "Y2"] = 2; + return values; + })(); + return Threshold; })(); @@ -6018,25 +7019,25 @@ return values; })(); - v1.Text = (function() { + v1.TimeSeriesTable = (function() { /** - * Properties of a Text. + * Properties of a TimeSeriesTable. * @memberof google.monitoring.dashboard.v1 - * @interface IText - * @property {string|null} [content] Text content - * @property {google.monitoring.dashboard.v1.Text.Format|null} [format] Text format + * @interface ITimeSeriesTable + * @property {Array.|null} [dataSets] TimeSeriesTable dataSets */ /** - * Constructs a new Text. + * Constructs a new TimeSeriesTable. * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a Text. - * @implements IText + * @classdesc Represents a TimeSeriesTable. + * @implements ITimeSeriesTable * @constructor - * @param {google.monitoring.dashboard.v1.IText=} [properties] Properties to set + * @param {google.monitoring.dashboard.v1.ITimeSeriesTable=} [properties] Properties to set */ - function Text(properties) { + function TimeSeriesTable(properties) { + this.dataSets = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6044,69 +7045,749 @@ } /** - * Text content. - * @member {string} content - * @memberof google.monitoring.dashboard.v1.Text - * @instance - */ - Text.prototype.content = ""; - - /** - * Text format. - * @member {google.monitoring.dashboard.v1.Text.Format} format - * @memberof google.monitoring.dashboard.v1.Text + * TimeSeriesTable dataSets. + * @member {Array.} dataSets + * @memberof google.monitoring.dashboard.v1.TimeSeriesTable * @instance */ - Text.prototype.format = 0; + TimeSeriesTable.prototype.dataSets = $util.emptyArray; /** - * Creates a new Text instance using the specified properties. + * Creates a new TimeSeriesTable instance using the specified properties. * @function create - * @memberof google.monitoring.dashboard.v1.Text + * @memberof google.monitoring.dashboard.v1.TimeSeriesTable * @static - * @param {google.monitoring.dashboard.v1.IText=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.Text} Text instance + * @param {google.monitoring.dashboard.v1.ITimeSeriesTable=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.TimeSeriesTable} TimeSeriesTable instance */ - Text.create = function create(properties) { - return new Text(properties); + TimeSeriesTable.create = function create(properties) { + return new TimeSeriesTable(properties); }; /** - * Encodes the specified Text message. Does not implicitly {@link google.monitoring.dashboard.v1.Text.verify|verify} messages. + * Encodes the specified TimeSeriesTable message. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesTable.verify|verify} messages. * @function encode - * @memberof google.monitoring.dashboard.v1.Text + * @memberof google.monitoring.dashboard.v1.TimeSeriesTable * @static - * @param {google.monitoring.dashboard.v1.IText} message Text message or plain object to encode + * @param {google.monitoring.dashboard.v1.ITimeSeriesTable} message TimeSeriesTable message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Text.encode = function encode(message, writer) { + TimeSeriesTable.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.content != null && Object.hasOwnProperty.call(message, "content")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.content); - if (message.format != null && Object.hasOwnProperty.call(message, "format")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.format); + if (message.dataSets != null && message.dataSets.length) + for (var i = 0; i < message.dataSets.length; ++i) + $root.google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet.encode(message.dataSets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified Text message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Text.verify|verify} messages. + * Encodes the specified TimeSeriesTable message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesTable.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.Text + * @memberof google.monitoring.dashboard.v1.TimeSeriesTable * @static - * @param {google.monitoring.dashboard.v1.IText} message Text message or plain object to encode + * @param {google.monitoring.dashboard.v1.ITimeSeriesTable} message TimeSeriesTable message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Text.encodeDelimited = function encodeDelimited(message, writer) { + TimeSeriesTable.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Text message from the specified reader or buffer. + * Decodes a TimeSeriesTable message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.dashboard.v1.Text + * @memberof google.monitoring.dashboard.v1.TimeSeriesTable + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.TimeSeriesTable} TimeSeriesTable + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeSeriesTable.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.TimeSeriesTable(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.dataSets && message.dataSets.length)) + message.dataSets = []; + message.dataSets.push($root.google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TimeSeriesTable message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.TimeSeriesTable + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.TimeSeriesTable} TimeSeriesTable + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeSeriesTable.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TimeSeriesTable message. + * @function verify + * @memberof google.monitoring.dashboard.v1.TimeSeriesTable + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TimeSeriesTable.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataSets != null && message.hasOwnProperty("dataSets")) { + if (!Array.isArray(message.dataSets)) + return "dataSets: array expected"; + for (var i = 0; i < message.dataSets.length; ++i) { + var error = $root.google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet.verify(message.dataSets[i]); + if (error) + return "dataSets." + error; + } + } + return null; + }; + + /** + * Creates a TimeSeriesTable message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.TimeSeriesTable + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.TimeSeriesTable} TimeSeriesTable + */ + TimeSeriesTable.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.TimeSeriesTable) + return object; + var message = new $root.google.monitoring.dashboard.v1.TimeSeriesTable(); + if (object.dataSets) { + if (!Array.isArray(object.dataSets)) + throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesTable.dataSets: array expected"); + message.dataSets = []; + for (var i = 0; i < object.dataSets.length; ++i) { + if (typeof object.dataSets[i] !== "object") + throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesTable.dataSets: object expected"); + message.dataSets[i] = $root.google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet.fromObject(object.dataSets[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a TimeSeriesTable message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.TimeSeriesTable + * @static + * @param {google.monitoring.dashboard.v1.TimeSeriesTable} message TimeSeriesTable + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TimeSeriesTable.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dataSets = []; + if (message.dataSets && message.dataSets.length) { + object.dataSets = []; + for (var j = 0; j < message.dataSets.length; ++j) + object.dataSets[j] = $root.google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet.toObject(message.dataSets[j], options); + } + return object; + }; + + /** + * Converts this TimeSeriesTable to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.TimeSeriesTable + * @instance + * @returns {Object.} JSON object + */ + TimeSeriesTable.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + TimeSeriesTable.TableDataSet = (function() { + + /** + * Properties of a TableDataSet. + * @memberof google.monitoring.dashboard.v1.TimeSeriesTable + * @interface ITableDataSet + * @property {google.monitoring.dashboard.v1.ITimeSeriesQuery|null} [timeSeriesQuery] TableDataSet timeSeriesQuery + * @property {string|null} [tableTemplate] TableDataSet tableTemplate + * @property {google.protobuf.IDuration|null} [minAlignmentPeriod] TableDataSet minAlignmentPeriod + * @property {google.monitoring.dashboard.v1.ITableDisplayOptions|null} [tableDisplayOptions] TableDataSet tableDisplayOptions + */ + + /** + * Constructs a new TableDataSet. + * @memberof google.monitoring.dashboard.v1.TimeSeriesTable + * @classdesc Represents a TableDataSet. + * @implements ITableDataSet + * @constructor + * @param {google.monitoring.dashboard.v1.TimeSeriesTable.ITableDataSet=} [properties] Properties to set + */ + function TableDataSet(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TableDataSet timeSeriesQuery. + * @member {google.monitoring.dashboard.v1.ITimeSeriesQuery|null|undefined} timeSeriesQuery + * @memberof google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet + * @instance + */ + TableDataSet.prototype.timeSeriesQuery = null; + + /** + * TableDataSet tableTemplate. + * @member {string} tableTemplate + * @memberof google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet + * @instance + */ + TableDataSet.prototype.tableTemplate = ""; + + /** + * TableDataSet minAlignmentPeriod. + * @member {google.protobuf.IDuration|null|undefined} minAlignmentPeriod + * @memberof google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet + * @instance + */ + TableDataSet.prototype.minAlignmentPeriod = null; + + /** + * TableDataSet tableDisplayOptions. + * @member {google.monitoring.dashboard.v1.ITableDisplayOptions|null|undefined} tableDisplayOptions + * @memberof google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet + * @instance + */ + TableDataSet.prototype.tableDisplayOptions = null; + + /** + * Creates a new TableDataSet instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet + * @static + * @param {google.monitoring.dashboard.v1.TimeSeriesTable.ITableDataSet=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet} TableDataSet instance + */ + TableDataSet.create = function create(properties) { + return new TableDataSet(properties); + }; + + /** + * Encodes the specified TableDataSet message. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet + * @static + * @param {google.monitoring.dashboard.v1.TimeSeriesTable.ITableDataSet} message TableDataSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TableDataSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.timeSeriesQuery != null && Object.hasOwnProperty.call(message, "timeSeriesQuery")) + $root.google.monitoring.dashboard.v1.TimeSeriesQuery.encode(message.timeSeriesQuery, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.tableTemplate != null && Object.hasOwnProperty.call(message, "tableTemplate")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.tableTemplate); + if (message.minAlignmentPeriod != null && Object.hasOwnProperty.call(message, "minAlignmentPeriod")) + $root.google.protobuf.Duration.encode(message.minAlignmentPeriod, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.tableDisplayOptions != null && Object.hasOwnProperty.call(message, "tableDisplayOptions")) + $root.google.monitoring.dashboard.v1.TableDisplayOptions.encode(message.tableDisplayOptions, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TableDataSet message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet + * @static + * @param {google.monitoring.dashboard.v1.TimeSeriesTable.ITableDataSet} message TableDataSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TableDataSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TableDataSet message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet} TableDataSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TableDataSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.timeSeriesQuery = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.decode(reader, reader.uint32()); + break; + case 2: + message.tableTemplate = reader.string(); + break; + case 3: + message.minAlignmentPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 4: + message.tableDisplayOptions = $root.google.monitoring.dashboard.v1.TableDisplayOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TableDataSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet} TableDataSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TableDataSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TableDataSet message. + * @function verify + * @memberof google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TableDataSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.timeSeriesQuery != null && message.hasOwnProperty("timeSeriesQuery")) { + var error = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.verify(message.timeSeriesQuery); + if (error) + return "timeSeriesQuery." + error; + } + if (message.tableTemplate != null && message.hasOwnProperty("tableTemplate")) + if (!$util.isString(message.tableTemplate)) + return "tableTemplate: string expected"; + if (message.minAlignmentPeriod != null && message.hasOwnProperty("minAlignmentPeriod")) { + var error = $root.google.protobuf.Duration.verify(message.minAlignmentPeriod); + if (error) + return "minAlignmentPeriod." + error; + } + if (message.tableDisplayOptions != null && message.hasOwnProperty("tableDisplayOptions")) { + var error = $root.google.monitoring.dashboard.v1.TableDisplayOptions.verify(message.tableDisplayOptions); + if (error) + return "tableDisplayOptions." + error; + } + return null; + }; + + /** + * Creates a TableDataSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet} TableDataSet + */ + TableDataSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet) + return object; + var message = new $root.google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet(); + if (object.timeSeriesQuery != null) { + if (typeof object.timeSeriesQuery !== "object") + throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet.timeSeriesQuery: object expected"); + message.timeSeriesQuery = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.fromObject(object.timeSeriesQuery); + } + if (object.tableTemplate != null) + message.tableTemplate = String(object.tableTemplate); + if (object.minAlignmentPeriod != null) { + if (typeof object.minAlignmentPeriod !== "object") + throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet.minAlignmentPeriod: object expected"); + message.minAlignmentPeriod = $root.google.protobuf.Duration.fromObject(object.minAlignmentPeriod); + } + if (object.tableDisplayOptions != null) { + if (typeof object.tableDisplayOptions !== "object") + throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet.tableDisplayOptions: object expected"); + message.tableDisplayOptions = $root.google.monitoring.dashboard.v1.TableDisplayOptions.fromObject(object.tableDisplayOptions); + } + return message; + }; + + /** + * Creates a plain object from a TableDataSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet + * @static + * @param {google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet} message TableDataSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TableDataSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.timeSeriesQuery = null; + object.tableTemplate = ""; + object.minAlignmentPeriod = null; + object.tableDisplayOptions = null; + } + if (message.timeSeriesQuery != null && message.hasOwnProperty("timeSeriesQuery")) + object.timeSeriesQuery = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.toObject(message.timeSeriesQuery, options); + if (message.tableTemplate != null && message.hasOwnProperty("tableTemplate")) + object.tableTemplate = message.tableTemplate; + if (message.minAlignmentPeriod != null && message.hasOwnProperty("minAlignmentPeriod")) + object.minAlignmentPeriod = $root.google.protobuf.Duration.toObject(message.minAlignmentPeriod, options); + if (message.tableDisplayOptions != null && message.hasOwnProperty("tableDisplayOptions")) + object.tableDisplayOptions = $root.google.monitoring.dashboard.v1.TableDisplayOptions.toObject(message.tableDisplayOptions, options); + return object; + }; + + /** + * Converts this TableDataSet to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet + * @instance + * @returns {Object.} JSON object + */ + TableDataSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TableDataSet; + })(); + + return TimeSeriesTable; + })(); + + v1.TableDisplayOptions = (function() { + + /** + * Properties of a TableDisplayOptions. + * @memberof google.monitoring.dashboard.v1 + * @interface ITableDisplayOptions + * @property {Array.|null} [shownColumns] TableDisplayOptions shownColumns + */ + + /** + * Constructs a new TableDisplayOptions. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a TableDisplayOptions. + * @implements ITableDisplayOptions + * @constructor + * @param {google.monitoring.dashboard.v1.ITableDisplayOptions=} [properties] Properties to set + */ + function TableDisplayOptions(properties) { + this.shownColumns = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TableDisplayOptions shownColumns. + * @member {Array.} shownColumns + * @memberof google.monitoring.dashboard.v1.TableDisplayOptions + * @instance + */ + TableDisplayOptions.prototype.shownColumns = $util.emptyArray; + + /** + * Creates a new TableDisplayOptions instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.TableDisplayOptions + * @static + * @param {google.monitoring.dashboard.v1.ITableDisplayOptions=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.TableDisplayOptions} TableDisplayOptions instance + */ + TableDisplayOptions.create = function create(properties) { + return new TableDisplayOptions(properties); + }; + + /** + * Encodes the specified TableDisplayOptions message. Does not implicitly {@link google.monitoring.dashboard.v1.TableDisplayOptions.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.TableDisplayOptions + * @static + * @param {google.monitoring.dashboard.v1.ITableDisplayOptions} message TableDisplayOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TableDisplayOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.shownColumns != null && message.shownColumns.length) + for (var i = 0; i < message.shownColumns.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.shownColumns[i]); + return writer; + }; + + /** + * Encodes the specified TableDisplayOptions message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TableDisplayOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.TableDisplayOptions + * @static + * @param {google.monitoring.dashboard.v1.ITableDisplayOptions} message TableDisplayOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TableDisplayOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TableDisplayOptions message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.TableDisplayOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.TableDisplayOptions} TableDisplayOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TableDisplayOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.TableDisplayOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.shownColumns && message.shownColumns.length)) + message.shownColumns = []; + message.shownColumns.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TableDisplayOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.TableDisplayOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.TableDisplayOptions} TableDisplayOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TableDisplayOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TableDisplayOptions message. + * @function verify + * @memberof google.monitoring.dashboard.v1.TableDisplayOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TableDisplayOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.shownColumns != null && message.hasOwnProperty("shownColumns")) { + if (!Array.isArray(message.shownColumns)) + return "shownColumns: array expected"; + for (var i = 0; i < message.shownColumns.length; ++i) + if (!$util.isString(message.shownColumns[i])) + return "shownColumns: string[] expected"; + } + return null; + }; + + /** + * Creates a TableDisplayOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.TableDisplayOptions + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.TableDisplayOptions} TableDisplayOptions + */ + TableDisplayOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.TableDisplayOptions) + return object; + var message = new $root.google.monitoring.dashboard.v1.TableDisplayOptions(); + if (object.shownColumns) { + if (!Array.isArray(object.shownColumns)) + throw TypeError(".google.monitoring.dashboard.v1.TableDisplayOptions.shownColumns: array expected"); + message.shownColumns = []; + for (var i = 0; i < object.shownColumns.length; ++i) + message.shownColumns[i] = String(object.shownColumns[i]); + } + return message; + }; + + /** + * Creates a plain object from a TableDisplayOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.TableDisplayOptions + * @static + * @param {google.monitoring.dashboard.v1.TableDisplayOptions} message TableDisplayOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TableDisplayOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.shownColumns = []; + if (message.shownColumns && message.shownColumns.length) { + object.shownColumns = []; + for (var j = 0; j < message.shownColumns.length; ++j) + object.shownColumns[j] = message.shownColumns[j]; + } + return object; + }; + + /** + * Converts this TableDisplayOptions to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.TableDisplayOptions + * @instance + * @returns {Object.} JSON object + */ + TableDisplayOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TableDisplayOptions; + })(); + + v1.Text = (function() { + + /** + * Properties of a Text. + * @memberof google.monitoring.dashboard.v1 + * @interface IText + * @property {string|null} [content] Text content + * @property {google.monitoring.dashboard.v1.Text.Format|null} [format] Text format + */ + + /** + * Constructs a new Text. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a Text. + * @implements IText + * @constructor + * @param {google.monitoring.dashboard.v1.IText=} [properties] Properties to set + */ + function Text(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Text content. + * @member {string} content + * @memberof google.monitoring.dashboard.v1.Text + * @instance + */ + Text.prototype.content = ""; + + /** + * Text format. + * @member {google.monitoring.dashboard.v1.Text.Format} format + * @memberof google.monitoring.dashboard.v1.Text + * @instance + */ + Text.prototype.format = 0; + + /** + * Creates a new Text instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.Text + * @static + * @param {google.monitoring.dashboard.v1.IText=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.Text} Text instance + */ + Text.create = function create(properties) { + return new Text(properties); + }; + + /** + * Encodes the specified Text message. Does not implicitly {@link google.monitoring.dashboard.v1.Text.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.Text + * @static + * @param {google.monitoring.dashboard.v1.IText} message Text message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Text.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.content != null && Object.hasOwnProperty.call(message, "content")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.content); + if (message.format != null && Object.hasOwnProperty.call(message, "format")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.format); + return writer; + }; + + /** + * Encodes the specified Text message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Text.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.Text + * @static + * @param {google.monitoring.dashboard.v1.IText} message Text message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Text.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Text message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.Text * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand @@ -6273,6 +7954,7 @@ * @property {Array.|null} [thresholds] XyChart thresholds * @property {google.monitoring.dashboard.v1.XyChart.IAxis|null} [xAxis] XyChart xAxis * @property {google.monitoring.dashboard.v1.XyChart.IAxis|null} [yAxis] XyChart yAxis + * @property {google.monitoring.dashboard.v1.XyChart.IAxis|null} [y2Axis] XyChart y2Axis * @property {google.monitoring.dashboard.v1.IChartOptions|null} [chartOptions] XyChart chartOptions */ @@ -6333,6 +8015,14 @@ */ XyChart.prototype.yAxis = null; + /** + * XyChart y2Axis. + * @member {google.monitoring.dashboard.v1.XyChart.IAxis|null|undefined} y2Axis + * @memberof google.monitoring.dashboard.v1.XyChart + * @instance + */ + XyChart.prototype.y2Axis = null; + /** * XyChart chartOptions. * @member {google.monitoring.dashboard.v1.IChartOptions|null|undefined} chartOptions @@ -6379,6 +8069,8 @@ $root.google.monitoring.dashboard.v1.XyChart.Axis.encode(message.yAxis, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); if (message.chartOptions != null && Object.hasOwnProperty.call(message, "chartOptions")) $root.google.monitoring.dashboard.v1.ChartOptions.encode(message.chartOptions, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.y2Axis != null && Object.hasOwnProperty.call(message, "y2Axis")) + $root.google.monitoring.dashboard.v1.XyChart.Axis.encode(message.y2Axis, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); return writer; }; @@ -6432,6 +8124,9 @@ case 7: message.yAxis = $root.google.monitoring.dashboard.v1.XyChart.Axis.decode(reader, reader.uint32()); break; + case 9: + message.y2Axis = $root.google.monitoring.dashboard.v1.XyChart.Axis.decode(reader, reader.uint32()); + break; case 8: message.chartOptions = $root.google.monitoring.dashboard.v1.ChartOptions.decode(reader, reader.uint32()); break; @@ -6503,6 +8198,11 @@ if (error) return "yAxis." + error; } + if (message.y2Axis != null && message.hasOwnProperty("y2Axis")) { + var error = $root.google.monitoring.dashboard.v1.XyChart.Axis.verify(message.y2Axis); + if (error) + return "y2Axis." + error; + } if (message.chartOptions != null && message.hasOwnProperty("chartOptions")) { var error = $root.google.monitoring.dashboard.v1.ChartOptions.verify(message.chartOptions); if (error) @@ -6558,6 +8258,11 @@ throw TypeError(".google.monitoring.dashboard.v1.XyChart.yAxis: object expected"); message.yAxis = $root.google.monitoring.dashboard.v1.XyChart.Axis.fromObject(object.yAxis); } + if (object.y2Axis != null) { + if (typeof object.y2Axis !== "object") + throw TypeError(".google.monitoring.dashboard.v1.XyChart.y2Axis: object expected"); + message.y2Axis = $root.google.monitoring.dashboard.v1.XyChart.Axis.fromObject(object.y2Axis); + } if (object.chartOptions != null) { if (typeof object.chartOptions !== "object") throw TypeError(".google.monitoring.dashboard.v1.XyChart.chartOptions: object expected"); @@ -6588,6 +8293,7 @@ object.xAxis = null; object.yAxis = null; object.chartOptions = null; + object.y2Axis = null; } if (message.dataSets && message.dataSets.length) { object.dataSets = []; @@ -6607,6 +8313,8 @@ object.yAxis = $root.google.monitoring.dashboard.v1.XyChart.Axis.toObject(message.yAxis, options); if (message.chartOptions != null && message.hasOwnProperty("chartOptions")) object.chartOptions = $root.google.monitoring.dashboard.v1.ChartOptions.toObject(message.chartOptions, options); + if (message.y2Axis != null && message.hasOwnProperty("y2Axis")) + object.y2Axis = $root.google.monitoring.dashboard.v1.XyChart.Axis.toObject(message.y2Axis, options); return object; }; @@ -6631,6 +8339,7 @@ * @property {google.monitoring.dashboard.v1.XyChart.DataSet.PlotType|null} [plotType] DataSet plotType * @property {string|null} [legendTemplate] DataSet legendTemplate * @property {google.protobuf.IDuration|null} [minAlignmentPeriod] DataSet minAlignmentPeriod + * @property {google.monitoring.dashboard.v1.XyChart.DataSet.TargetAxis|null} [targetAxis] DataSet targetAxis */ /** @@ -6680,6 +8389,14 @@ */ DataSet.prototype.minAlignmentPeriod = null; + /** + * DataSet targetAxis. + * @member {google.monitoring.dashboard.v1.XyChart.DataSet.TargetAxis} targetAxis + * @memberof google.monitoring.dashboard.v1.XyChart.DataSet + * @instance + */ + DataSet.prototype.targetAxis = 0; + /** * Creates a new DataSet instance using the specified properties. * @function create @@ -6712,6 +8429,8 @@ writer.uint32(/* id 3, wireType 2 =*/26).string(message.legendTemplate); if (message.minAlignmentPeriod != null && Object.hasOwnProperty.call(message, "minAlignmentPeriod")) $root.google.protobuf.Duration.encode(message.minAlignmentPeriod, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.targetAxis != null && Object.hasOwnProperty.call(message, "targetAxis")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.targetAxis); return writer; }; @@ -6758,6 +8477,9 @@ case 4: message.minAlignmentPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; + case 5: + message.targetAxis = reader.int32(); + break; default: reader.skipType(tag & 7); break; @@ -6817,6 +8539,15 @@ if (error) return "minAlignmentPeriod." + error; } + if (message.targetAxis != null && message.hasOwnProperty("targetAxis")) + switch (message.targetAxis) { + default: + return "targetAxis: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; @@ -6866,6 +8597,20 @@ throw TypeError(".google.monitoring.dashboard.v1.XyChart.DataSet.minAlignmentPeriod: object expected"); message.minAlignmentPeriod = $root.google.protobuf.Duration.fromObject(object.minAlignmentPeriod); } + switch (object.targetAxis) { + case "TARGET_AXIS_UNSPECIFIED": + case 0: + message.targetAxis = 0; + break; + case "Y1": + case 1: + message.targetAxis = 1; + break; + case "Y2": + case 2: + message.targetAxis = 2; + break; + } return message; }; @@ -6887,6 +8632,7 @@ object.plotType = options.enums === String ? "PLOT_TYPE_UNSPECIFIED" : 0; object.legendTemplate = ""; object.minAlignmentPeriod = null; + object.targetAxis = options.enums === String ? "TARGET_AXIS_UNSPECIFIED" : 0; } if (message.timeSeriesQuery != null && message.hasOwnProperty("timeSeriesQuery")) object.timeSeriesQuery = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.toObject(message.timeSeriesQuery, options); @@ -6896,6 +8642,8 @@ object.legendTemplate = message.legendTemplate; if (message.minAlignmentPeriod != null && message.hasOwnProperty("minAlignmentPeriod")) object.minAlignmentPeriod = $root.google.protobuf.Duration.toObject(message.minAlignmentPeriod, options); + if (message.targetAxis != null && message.hasOwnProperty("targetAxis")) + object.targetAxis = options.enums === String ? $root.google.monitoring.dashboard.v1.XyChart.DataSet.TargetAxis[message.targetAxis] : message.targetAxis; return object; }; @@ -6930,6 +8678,22 @@ return values; })(); + /** + * TargetAxis enum. + * @name google.monitoring.dashboard.v1.XyChart.DataSet.TargetAxis + * @enum {number} + * @property {number} TARGET_AXIS_UNSPECIFIED=0 TARGET_AXIS_UNSPECIFIED value + * @property {number} Y1=1 Y1 value + * @property {number} Y2=2 Y2 value + */ + DataSet.TargetAxis = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TARGET_AXIS_UNSPECIFIED"] = 0; + values[valuesById[1] = "Y1"] = 1; + values[valuesById[2] = "Y2"] = 2; + return values; + })(); + return DataSet; })(); diff --git a/packages/google-monitoring-dashboard/protos/protos.json b/packages/google-monitoring-dashboard/protos/protos.json index 4cc5154ada8..d7b61e3950e 100644 --- a/packages/google-monitoring-dashboard/protos/protos.json +++ b/packages/google-monitoring-dashboard/protos/protos.json @@ -32,6 +32,14 @@ } } }, + "CollapsibleGroup": { + "fields": { + "collapsed": { + "type": "bool", + "id": 1 + } + } + }, "Aggregation": { "fields": { "alignmentPeriod": { @@ -200,6 +208,58 @@ "columnLayout": { "type": "ColumnLayout", "id": 9 + }, + "dashboardFilters": { + "rule": "repeated", + "type": "DashboardFilter", + "id": 11 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 12 + } + } + }, + "DashboardFilter": { + "oneofs": { + "defaultValue": { + "oneof": [ + "stringValue" + ] + } + }, + "fields": { + "labelKey": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "templateVariable": { + "type": "string", + "id": 3 + }, + "stringValue": { + "type": "string", + "id": 4 + }, + "filterType": { + "type": "FilterType", + "id": 5 + } + }, + "nested": { + "FilterType": { + "values": { + "FILTER_TYPE_UNSPECIFIED": 0, + "RESOURCE_LABEL": 1, + "METRIC_LABEL": 2, + "USER_METADATA_LABEL": 3, + "SYSTEM_METADATA_LABEL": 4, + "GROUP": 5 + } } } }, @@ -311,7 +371,10 @@ "scorecard", "text", "blank", - "alertChart" + "alertChart", + "timeSeriesTable", + "collapsibleGroup", + "logsPanel" ] } }, @@ -342,6 +405,31 @@ "alertChart": { "type": "AlertChart", "id": 7 + }, + "timeSeriesTable": { + "type": "TimeSeriesTable", + "id": 8 + }, + "collapsibleGroup": { + "type": "CollapsibleGroup", + "id": 9 + }, + "logsPanel": { + "type": "LogsPanel", + "id": 10 + } + } + }, + "LogsPanel": { + "fields": { + "filter": { + "type": "string", + "id": 1 + }, + "resourceNames": { + "rule": "repeated", + "type": "string", + "id": 2 } } }, @@ -542,6 +630,10 @@ "direction": { "type": "Direction", "id": 4 + }, + "targetAxis": { + "type": "TargetAxis", + "id": 5 } }, "nested": { @@ -558,6 +650,13 @@ "ABOVE": 1, "BELOW": 2 } + }, + "TargetAxis": { + "values": { + "TARGET_AXIS_UNSPECIFIED": 0, + "Y1": 1, + "Y2": 2 + } } } }, @@ -568,6 +667,64 @@ "SPARK_BAR": 2 } }, + "TimeSeriesTable": { + "fields": { + "dataSets": { + "rule": "repeated", + "type": "TableDataSet", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "TableDataSet": { + "fields": { + "timeSeriesQuery": { + "type": "TimeSeriesQuery", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "tableTemplate": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "minAlignmentPeriod": { + "type": "google.protobuf.Duration", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "tableDisplayOptions": { + "type": "TableDisplayOptions", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + }, + "TableDisplayOptions": { + "fields": { + "shownColumns": { + "rule": "repeated", + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, "Text": { "fields": { "content": { @@ -616,6 +773,10 @@ "type": "Axis", "id": 7 }, + "y2Axis": { + "type": "Axis", + "id": 9 + }, "chartOptions": { "type": "ChartOptions", "id": 8 @@ -645,6 +806,13 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "targetAxis": { + "type": "TargetAxis", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } }, "nested": { @@ -656,6 +824,13 @@ "STACKED_BAR": 3, "HEATMAP": 4 } + }, + "TargetAxis": { + "values": { + "TARGET_AXIS_UNSPECIFIED": 0, + "Y1": 1, + "Y2": 2 + } } } }, diff --git a/packages/google-monitoring-dashboard/src/v1/dashboards_service_proto_list.json b/packages/google-monitoring-dashboard/src/v1/dashboards_service_proto_list.json index 18264f8d673..c084fbb63f9 100644 --- a/packages/google-monitoring-dashboard/src/v1/dashboards_service_proto_list.json +++ b/packages/google-monitoring-dashboard/src/v1/dashboards_service_proto_list.json @@ -1,13 +1,18 @@ [ "../../protos/google/monitoring/dashboard/v1/alertchart.proto", + "../../protos/google/monitoring/dashboard/v1/collapsible_group.proto", "../../protos/google/monitoring/dashboard/v1/common.proto", "../../protos/google/monitoring/dashboard/v1/dashboard.proto", + "../../protos/google/monitoring/dashboard/v1/dashboard_filter.proto", "../../protos/google/monitoring/dashboard/v1/dashboards_service.proto", "../../protos/google/monitoring/dashboard/v1/drilldowns.proto", "../../protos/google/monitoring/dashboard/v1/layouts.proto", + "../../protos/google/monitoring/dashboard/v1/logs_panel.proto", "../../protos/google/monitoring/dashboard/v1/metrics.proto", "../../protos/google/monitoring/dashboard/v1/scorecard.proto", "../../protos/google/monitoring/dashboard/v1/service.proto", + "../../protos/google/monitoring/dashboard/v1/table.proto", + "../../protos/google/monitoring/dashboard/v1/table_display_options.proto", "../../protos/google/monitoring/dashboard/v1/text.proto", "../../protos/google/monitoring/dashboard/v1/widget.proto", "../../protos/google/monitoring/dashboard/v1/xychart.proto"