Skip to content

Commit 59cea2c

Browse files
Google APIscopybara-github
authored andcommitted
chore: migrate monitoring/dashboard/v1 to the PHP microgenerator
Committer: @miraleung PiperOrigin-RevId: 369326004
1 parent 413135d commit 59cea2c

13 files changed

Lines changed: 42 additions & 37 deletions

google/monitoring/dashboard/v1/BUILD.bazel

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -188,13 +188,14 @@ py_gapic_assembly_pkg(
188188

189189
##############################################################################
190190
# PHP
191+
# DO NOT OVERRIDE this PHP microgenerator section with autogenerated rules.
191192
##############################################################################
192193
load(
193194
"@com_google_googleapis_imports//:imports.bzl",
194-
"php_gapic_assembly_pkg",
195-
"php_gapic_library",
196-
"php_grpc_library",
197-
"php_proto_library",
195+
php_gapic_assembly_pkg = "php_gapic_assembly_pkg2",
196+
php_gapic_library = "php_gapic_library2",
197+
php_grpc_library = "php_grpc_library2",
198+
php_proto_library = "php_proto_library2",
198199
)
199200

200201
php_proto_library(
@@ -210,11 +211,8 @@ php_grpc_library(
210211

211212
php_gapic_library(
212213
name = "dashboard_php_gapic",
213-
src = ":dashboard_proto_with_info",
214-
gapic_yaml = "monitoring_gapic.yaml",
214+
srcs = [":dashboard_proto_with_info"],
215215
grpc_service_config = "dashboards_grpc_service_config.json",
216-
package = "google.monitoring.dashboard.v1",
217-
service_yaml = "monitoring.yaml",
218216
deps = [
219217
":dashboard_php_grpc",
220218
":dashboard_php_proto",

google/monitoring/dashboard/v1/common.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/
2323
option java_multiple_files = true;
2424
option java_outer_classname = "CommonProto";
2525
option java_package = "com.google.monitoring.dashboard.v1";
26+
option php_namespace = "Google\\Cloud\\Monitoring\\Dashboard\\V1";
2627
option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1";
2728

2829
// Describes how to combine multiple time series to provide a different view of

google/monitoring/dashboard/v1/dashboard.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/
2424
option java_multiple_files = true;
2525
option java_outer_classname = "DashboardsProto";
2626
option java_package = "com.google.monitoring.dashboard.v1";
27+
option php_namespace = "Google\\Cloud\\Monitoring\\Dashboard\\V1";
2728
option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1";
2829

2930
// A Google Stackdriver dashboard. Dashboards define the content and layout

google/monitoring/dashboard/v1/dashboards_service.proto

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/
2828
option java_multiple_files = true;
2929
option java_outer_classname = "DashboardsServiceProto";
3030
option java_package = "com.google.monitoring.dashboard.v1";
31+
option php_namespace = "Google\\Cloud\\Monitoring\\Dashboard\\V1";
3132
option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1";
3233

3334
// Manages Stackdriver dashboards. A dashboard is an arrangement of data display
@@ -40,8 +41,12 @@ service DashboardsService {
4041
"https://www.googleapis.com/auth/monitoring.read,"
4142
"https://www.googleapis.com/auth/monitoring.write";
4243

43-
// Creates a new custom dashboard. For examples on how you can use this API to create dashboards, see [Managing dashboards by API](https://cloud.google.com/monitoring/dashboards/api-dashboard).
44-
// This method requires the `monitoring.dashboards.create` permission on the specified project. For more information about permissions, see [Cloud Identity and Access Management](https://cloud.google.com/iam).
44+
// Creates a new custom dashboard. For examples on how you can use this API to
45+
// create dashboards, see [Managing dashboards by
46+
// API](/monitoring/dashboards/api-dashboard). This method requires the
47+
// `monitoring.dashboards.create` permission on the specified project. For
48+
// more information about permissions, see [Cloud Identity and Access
49+
// Management](/iam).
4550
rpc CreateDashboard(CreateDashboardRequest) returns (Dashboard) {
4651
option (google.api.http) = {
4752
post: "/v1/{parent=projects/*}/dashboards"

google/monitoring/dashboard/v1/drilldowns.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@ option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/
2222
option java_multiple_files = true;
2323
option java_outer_classname = "DrilldownsProto";
2424
option java_package = "com.google.monitoring.dashboard.v1";
25+
option php_namespace = "Google\\Cloud\\Monitoring\\Dashboard\\V1";
2526
option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1";

google/monitoring/dashboard/v1/layouts.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/
2222
option java_multiple_files = true;
2323
option java_outer_classname = "LayoutsProto";
2424
option java_package = "com.google.monitoring.dashboard.v1";
25+
option php_namespace = "Google\\Cloud\\Monitoring\\Dashboard\\V1";
2526
option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1";
2627

2728
// A basic layout divides the available space into vertical columns of equal

google/monitoring/dashboard/v1/metrics.proto

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/
2323
option java_multiple_files = true;
2424
option java_outer_classname = "MetricsProto";
2525
option java_package = "com.google.monitoring.dashboard.v1";
26+
option php_namespace = "Google\\Cloud\\Monitoring\\Dashboard\\V1";
2627
option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1";
2728

2829
// TimeSeriesQuery collects the set of supported methods for querying time
@@ -53,8 +54,9 @@ message TimeSeriesQuery {
5354
// [`ListTimeSeries`](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list)
5455
// method.
5556
message TimeSeriesFilter {
56-
// Required. The [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters)
57-
// that identifies the metric types, resources, and projects to query.
57+
// Required. The [monitoring
58+
// filter](https://cloud.google.com/monitoring/api/v3/filters) that identifies
59+
// the metric types, resources, and projects to query.
5860
string filter = 1 [(google.api.field_behavior) = REQUIRED];
5961

6062
// By default, the raw time series data is returned.
@@ -72,7 +74,8 @@ message TimeSeriesFilter {
7274

7375
// Statistics based time series filter.
7476
// Note: This field is deprecated and completely ignored by the API.
75-
StatisticalTimeSeriesFilter statistical_time_series_filter = 5 [deprecated = true];
77+
StatisticalTimeSeriesFilter statistical_time_series_filter = 5
78+
[deprecated = true];
7679
}
7780
}
7881

@@ -111,7 +114,8 @@ message TimeSeriesFilterRatio {
111114

112115
// Statistics based time series filter.
113116
// Note: This field is deprecated and completely ignored by the API.
114-
StatisticalTimeSeriesFilter statistical_time_series_filter = 5 [deprecated = true];
117+
StatisticalTimeSeriesFilter statistical_time_series_filter = 5
118+
[deprecated = true];
115119
}
116120
}
117121

google/monitoring/dashboard/v1/monitoring_gapic.yaml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,3 @@ config_schema_version: 2.0.0
33
language_settings:
44
java:
55
package_name: com.google.cloud.monitoring.dashboard.v1
6-
python:
7-
package_name: google.cloud.monitoring_dashboard.v1.gapic
8-
go:
9-
package_name: cloud.google.com/go/monitoring/dashboard/apiv1
10-
csharp:
11-
package_name: Google.Cloud.Monitoring.Dashboard.V1
12-
ruby:
13-
package_name: Google::Cloud::Monitoring::Dashboard::V1
14-
php:
15-
package_name: Google\Cloud\Monitoring\Dashboard\V1
16-
nodejs:
17-
package_name: monitoring-dashboard.v1
18-
domain_layer_location: google-cloud
19-
interfaces:
20-
- name: google.monitoring.dashboard.v1.DashboardsService

google/monitoring/dashboard/v1/scorecard.proto

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/
2525
option java_multiple_files = true;
2626
option java_outer_classname = "ScorecardProto";
2727
option java_package = "com.google.monitoring.dashboard.v1";
28+
option php_namespace = "Google\\Cloud\\Monitoring\\Dashboard\\V1";
2829
option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1";
2930

3031
// A widget showing the latest value of a metric, and how this value relates to
@@ -49,7 +50,8 @@ message Scorecard {
4950
// timeseries.
5051
message SparkChartView {
5152
// Required. The type of sparkchart to show in this chartView.
52-
SparkChartType spark_chart_type = 1 [(google.api.field_behavior) = REQUIRED];
53+
SparkChartType spark_chart_type = 1
54+
[(google.api.field_behavior) = REQUIRED];
5355

5456
// The lower bound on data point frequency in the chart implemented by
5557
// specifying the minimum alignment period to use in a time series query.
@@ -61,7 +63,8 @@ message Scorecard {
6163

6264
// Required. Fields for querying time series data from the
6365
// Stackdriver metrics API.
64-
TimeSeriesQuery time_series_query = 1 [(google.api.field_behavior) = REQUIRED];
66+
TimeSeriesQuery time_series_query = 1
67+
[(google.api.field_behavior) = REQUIRED];
6568

6669
// Defines the optional additional chart shown on the scorecard. If
6770
// neither is included - then a default scorecard is shown.

google/monitoring/dashboard/v1/service.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@ option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/
2020
option java_multiple_files = true;
2121
option java_outer_classname = "ServiceMonitoringProto";
2222
option java_package = "com.google.monitoring.dashboard.v1";
23+
option php_namespace = "Google\\Cloud\\Monitoring\\Dashboard\\V1";
2324
option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1";

0 commit comments

Comments
 (0)