google-cloud-monitoring-dashboard-v1 0.10.0 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/lib/google/cloud/monitoring/dashboard/v1/dashboards_service/client.rb +6 -8
  4. data/lib/google/cloud/monitoring/dashboard/v1/dashboards_service/rest/client.rb +683 -0
  5. data/lib/google/cloud/monitoring/dashboard/v1/dashboards_service/rest/service_stub.rb +347 -0
  6. data/lib/google/cloud/monitoring/dashboard/v1/dashboards_service/rest.rb +55 -0
  7. data/lib/google/cloud/monitoring/dashboard/v1/dashboards_service.rb +6 -0
  8. data/lib/google/cloud/monitoring/dashboard/v1/rest.rb +39 -0
  9. data/lib/google/cloud/monitoring/dashboard/v1/version.rb +1 -1
  10. data/lib/google/cloud/monitoring/dashboard/v1.rb +5 -0
  11. data/lib/google/monitoring/dashboard/v1/alertchart_pb.rb +24 -4
  12. data/lib/google/monitoring/dashboard/v1/collapsible_group_pb.rb +24 -4
  13. data/lib/google/monitoring/dashboard/v1/common_pb.rb +25 -70
  14. data/lib/google/monitoring/dashboard/v1/dashboard_filter_pb.rb +24 -17
  15. data/lib/google/monitoring/dashboard/v1/dashboard_pb.rb +26 -14
  16. data/lib/google/monitoring/dashboard/v1/dashboards_service_pb.rb +25 -25
  17. data/lib/google/monitoring/dashboard/v1/drilldowns_pb.rb +25 -2
  18. data/lib/google/monitoring/dashboard/v1/layouts_pb.rb +25 -30
  19. data/lib/google/monitoring/dashboard/v1/logs_panel_pb.rb +24 -5
  20. data/lib/google/monitoring/dashboard/v1/metrics_pb.rb +25 -59
  21. data/lib/google/monitoring/dashboard/v1/scorecard_pb.rb +26 -17
  22. data/lib/google/monitoring/dashboard/v1/service_pb.rb +25 -2
  23. data/lib/google/monitoring/dashboard/v1/table_display_options_pb.rb +24 -4
  24. data/lib/google/monitoring/dashboard/v1/table_pb.rb +27 -21
  25. data/lib/google/monitoring/dashboard/v1/text_pb.rb +24 -10
  26. data/lib/google/monitoring/dashboard/v1/widget_pb.rb +32 -14
  27. data/lib/google/monitoring/dashboard/v1/xychart_pb.rb +26 -47
  28. data/proto_docs/google/api/client.rb +67 -4
  29. metadata +11 -7
@@ -0,0 +1,347 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/monitoring/dashboard/v1/dashboards_service_pb"
20
+
21
+ module Google
22
+ module Cloud
23
+ module Monitoring
24
+ module Dashboard
25
+ module V1
26
+ module DashboardsService
27
+ module Rest
28
+ ##
29
+ # REST service stub for the DashboardsService service.
30
+ # Service stub contains baseline method implementations
31
+ # including transcoding, making the REST call, and deserialing the response.
32
+ #
33
+ class ServiceStub
34
+ def initialize endpoint:, credentials:
35
+ # These require statements are intentionally placed here to initialize
36
+ # the REST modules only when it's required.
37
+ require "gapic/rest"
38
+
39
+ @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials,
40
+ numeric_enums: true,
41
+ raise_faraday_errors: false
42
+ end
43
+
44
+ ##
45
+ # Baseline implementation for the create_dashboard REST call
46
+ #
47
+ # @param request_pb [::Google::Cloud::Monitoring::Dashboard::V1::CreateDashboardRequest]
48
+ # A request object representing the call parameters. Required.
49
+ # @param options [::Gapic::CallOptions]
50
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
51
+ #
52
+ # @yield [result, operation] Access the result along with the TransportOperation object
53
+ # @yieldparam result [::Google::Cloud::Monitoring::Dashboard::V1::Dashboard]
54
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
55
+ #
56
+ # @return [::Google::Cloud::Monitoring::Dashboard::V1::Dashboard]
57
+ # A result object deserialized from the server's reply
58
+ def create_dashboard request_pb, options = nil
59
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
60
+
61
+ verb, uri, query_string_params, body = ServiceStub.transcode_create_dashboard_request request_pb
62
+ query_string_params = if query_string_params.any?
63
+ query_string_params.to_h { |p| p.split("=", 2) }
64
+ else
65
+ {}
66
+ end
67
+
68
+ response = @client_stub.make_http_request(
69
+ verb,
70
+ uri: uri,
71
+ body: body || "",
72
+ params: query_string_params,
73
+ options: options
74
+ )
75
+ operation = ::Gapic::Rest::TransportOperation.new response
76
+ result = ::Google::Cloud::Monitoring::Dashboard::V1::Dashboard.decode_json response.body, ignore_unknown_fields: true
77
+
78
+ yield result, operation if block_given?
79
+ result
80
+ end
81
+
82
+ ##
83
+ # Baseline implementation for the list_dashboards REST call
84
+ #
85
+ # @param request_pb [::Google::Cloud::Monitoring::Dashboard::V1::ListDashboardsRequest]
86
+ # A request object representing the call parameters. Required.
87
+ # @param options [::Gapic::CallOptions]
88
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
89
+ #
90
+ # @yield [result, operation] Access the result along with the TransportOperation object
91
+ # @yieldparam result [::Google::Cloud::Monitoring::Dashboard::V1::ListDashboardsResponse]
92
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
93
+ #
94
+ # @return [::Google::Cloud::Monitoring::Dashboard::V1::ListDashboardsResponse]
95
+ # A result object deserialized from the server's reply
96
+ def list_dashboards request_pb, options = nil
97
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
98
+
99
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_dashboards_request request_pb
100
+ query_string_params = if query_string_params.any?
101
+ query_string_params.to_h { |p| p.split("=", 2) }
102
+ else
103
+ {}
104
+ end
105
+
106
+ response = @client_stub.make_http_request(
107
+ verb,
108
+ uri: uri,
109
+ body: body || "",
110
+ params: query_string_params,
111
+ options: options
112
+ )
113
+ operation = ::Gapic::Rest::TransportOperation.new response
114
+ result = ::Google::Cloud::Monitoring::Dashboard::V1::ListDashboardsResponse.decode_json response.body, ignore_unknown_fields: true
115
+
116
+ yield result, operation if block_given?
117
+ result
118
+ end
119
+
120
+ ##
121
+ # Baseline implementation for the get_dashboard REST call
122
+ #
123
+ # @param request_pb [::Google::Cloud::Monitoring::Dashboard::V1::GetDashboardRequest]
124
+ # A request object representing the call parameters. Required.
125
+ # @param options [::Gapic::CallOptions]
126
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
127
+ #
128
+ # @yield [result, operation] Access the result along with the TransportOperation object
129
+ # @yieldparam result [::Google::Cloud::Monitoring::Dashboard::V1::Dashboard]
130
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
131
+ #
132
+ # @return [::Google::Cloud::Monitoring::Dashboard::V1::Dashboard]
133
+ # A result object deserialized from the server's reply
134
+ def get_dashboard request_pb, options = nil
135
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
136
+
137
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_dashboard_request request_pb
138
+ query_string_params = if query_string_params.any?
139
+ query_string_params.to_h { |p| p.split("=", 2) }
140
+ else
141
+ {}
142
+ end
143
+
144
+ response = @client_stub.make_http_request(
145
+ verb,
146
+ uri: uri,
147
+ body: body || "",
148
+ params: query_string_params,
149
+ options: options
150
+ )
151
+ operation = ::Gapic::Rest::TransportOperation.new response
152
+ result = ::Google::Cloud::Monitoring::Dashboard::V1::Dashboard.decode_json response.body, ignore_unknown_fields: true
153
+
154
+ yield result, operation if block_given?
155
+ result
156
+ end
157
+
158
+ ##
159
+ # Baseline implementation for the delete_dashboard REST call
160
+ #
161
+ # @param request_pb [::Google::Cloud::Monitoring::Dashboard::V1::DeleteDashboardRequest]
162
+ # A request object representing the call parameters. Required.
163
+ # @param options [::Gapic::CallOptions]
164
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
165
+ #
166
+ # @yield [result, operation] Access the result along with the TransportOperation object
167
+ # @yieldparam result [::Google::Protobuf::Empty]
168
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
169
+ #
170
+ # @return [::Google::Protobuf::Empty]
171
+ # A result object deserialized from the server's reply
172
+ def delete_dashboard request_pb, options = nil
173
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
174
+
175
+ verb, uri, query_string_params, body = ServiceStub.transcode_delete_dashboard_request request_pb
176
+ query_string_params = if query_string_params.any?
177
+ query_string_params.to_h { |p| p.split("=", 2) }
178
+ else
179
+ {}
180
+ end
181
+
182
+ response = @client_stub.make_http_request(
183
+ verb,
184
+ uri: uri,
185
+ body: body || "",
186
+ params: query_string_params,
187
+ options: options
188
+ )
189
+ operation = ::Gapic::Rest::TransportOperation.new response
190
+ result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
191
+
192
+ yield result, operation if block_given?
193
+ result
194
+ end
195
+
196
+ ##
197
+ # Baseline implementation for the update_dashboard REST call
198
+ #
199
+ # @param request_pb [::Google::Cloud::Monitoring::Dashboard::V1::UpdateDashboardRequest]
200
+ # A request object representing the call parameters. Required.
201
+ # @param options [::Gapic::CallOptions]
202
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
203
+ #
204
+ # @yield [result, operation] Access the result along with the TransportOperation object
205
+ # @yieldparam result [::Google::Cloud::Monitoring::Dashboard::V1::Dashboard]
206
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
207
+ #
208
+ # @return [::Google::Cloud::Monitoring::Dashboard::V1::Dashboard]
209
+ # A result object deserialized from the server's reply
210
+ def update_dashboard request_pb, options = nil
211
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
212
+
213
+ verb, uri, query_string_params, body = ServiceStub.transcode_update_dashboard_request request_pb
214
+ query_string_params = if query_string_params.any?
215
+ query_string_params.to_h { |p| p.split("=", 2) }
216
+ else
217
+ {}
218
+ end
219
+
220
+ response = @client_stub.make_http_request(
221
+ verb,
222
+ uri: uri,
223
+ body: body || "",
224
+ params: query_string_params,
225
+ options: options
226
+ )
227
+ operation = ::Gapic::Rest::TransportOperation.new response
228
+ result = ::Google::Cloud::Monitoring::Dashboard::V1::Dashboard.decode_json response.body, ignore_unknown_fields: true
229
+
230
+ yield result, operation if block_given?
231
+ result
232
+ end
233
+
234
+ ##
235
+ # @private
236
+ #
237
+ # GRPC transcoding helper method for the create_dashboard REST call
238
+ #
239
+ # @param request_pb [::Google::Cloud::Monitoring::Dashboard::V1::CreateDashboardRequest]
240
+ # A request object representing the call parameters. Required.
241
+ # @return [Array(String, [String, nil], Hash{String => String})]
242
+ # Uri, Body, Query string parameters
243
+ def self.transcode_create_dashboard_request request_pb
244
+ transcoder = Gapic::Rest::GrpcTranscoder.new
245
+ .with_bindings(
246
+ uri_method: :post,
247
+ uri_template: "/v1/{parent}/dashboards",
248
+ body: "dashboard",
249
+ matches: [
250
+ ["parent", %r{^projects/[^/]+/?$}, false]
251
+ ]
252
+ )
253
+ transcoder.transcode request_pb
254
+ end
255
+
256
+ ##
257
+ # @private
258
+ #
259
+ # GRPC transcoding helper method for the list_dashboards REST call
260
+ #
261
+ # @param request_pb [::Google::Cloud::Monitoring::Dashboard::V1::ListDashboardsRequest]
262
+ # A request object representing the call parameters. Required.
263
+ # @return [Array(String, [String, nil], Hash{String => String})]
264
+ # Uri, Body, Query string parameters
265
+ def self.transcode_list_dashboards_request request_pb
266
+ transcoder = Gapic::Rest::GrpcTranscoder.new
267
+ .with_bindings(
268
+ uri_method: :get,
269
+ uri_template: "/v1/{parent}/dashboards",
270
+ matches: [
271
+ ["parent", %r{^projects/[^/]+/?$}, false]
272
+ ]
273
+ )
274
+ transcoder.transcode request_pb
275
+ end
276
+
277
+ ##
278
+ # @private
279
+ #
280
+ # GRPC transcoding helper method for the get_dashboard REST call
281
+ #
282
+ # @param request_pb [::Google::Cloud::Monitoring::Dashboard::V1::GetDashboardRequest]
283
+ # A request object representing the call parameters. Required.
284
+ # @return [Array(String, [String, nil], Hash{String => String})]
285
+ # Uri, Body, Query string parameters
286
+ def self.transcode_get_dashboard_request request_pb
287
+ transcoder = Gapic::Rest::GrpcTranscoder.new
288
+ .with_bindings(
289
+ uri_method: :get,
290
+ uri_template: "/v1/{name}",
291
+ matches: [
292
+ ["name", %r{^projects/[^/]+/dashboards/[^/]+/?$}, false]
293
+ ]
294
+ )
295
+ transcoder.transcode request_pb
296
+ end
297
+
298
+ ##
299
+ # @private
300
+ #
301
+ # GRPC transcoding helper method for the delete_dashboard REST call
302
+ #
303
+ # @param request_pb [::Google::Cloud::Monitoring::Dashboard::V1::DeleteDashboardRequest]
304
+ # A request object representing the call parameters. Required.
305
+ # @return [Array(String, [String, nil], Hash{String => String})]
306
+ # Uri, Body, Query string parameters
307
+ def self.transcode_delete_dashboard_request request_pb
308
+ transcoder = Gapic::Rest::GrpcTranscoder.new
309
+ .with_bindings(
310
+ uri_method: :delete,
311
+ uri_template: "/v1/{name}",
312
+ matches: [
313
+ ["name", %r{^projects/[^/]+/dashboards/[^/]+/?$}, false]
314
+ ]
315
+ )
316
+ transcoder.transcode request_pb
317
+ end
318
+
319
+ ##
320
+ # @private
321
+ #
322
+ # GRPC transcoding helper method for the update_dashboard REST call
323
+ #
324
+ # @param request_pb [::Google::Cloud::Monitoring::Dashboard::V1::UpdateDashboardRequest]
325
+ # A request object representing the call parameters. Required.
326
+ # @return [Array(String, [String, nil], Hash{String => String})]
327
+ # Uri, Body, Query string parameters
328
+ def self.transcode_update_dashboard_request request_pb
329
+ transcoder = Gapic::Rest::GrpcTranscoder.new
330
+ .with_bindings(
331
+ uri_method: :patch,
332
+ uri_template: "/v1/{dashboard.name}",
333
+ body: "dashboard",
334
+ matches: [
335
+ ["dashboard.name", %r{^projects/[^/]+/dashboards/[^/]+/?$}, false]
336
+ ]
337
+ )
338
+ transcoder.transcode request_pb
339
+ end
340
+ end
341
+ end
342
+ end
343
+ end
344
+ end
345
+ end
346
+ end
347
+ end
@@ -0,0 +1,55 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "gapic/rest"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/monitoring/dashboard/v1/version"
24
+
25
+ require "google/cloud/monitoring/dashboard/v1/dashboards_service/credentials"
26
+ require "google/cloud/monitoring/dashboard/v1/dashboards_service/paths"
27
+ require "google/cloud/monitoring/dashboard/v1/dashboards_service/rest/client"
28
+
29
+ module Google
30
+ module Cloud
31
+ module Monitoring
32
+ module Dashboard
33
+ module V1
34
+ ##
35
+ # Manages Stackdriver dashboards. A dashboard is an arrangement of data display
36
+ # widgets in a specific layout.
37
+ #
38
+ # To load this service and instantiate a REST client:
39
+ #
40
+ # require "google/cloud/monitoring/dashboard/v1/dashboards_service/rest"
41
+ # client = ::Google::Cloud::Monitoring::Dashboard::V1::DashboardsService::Rest::Client.new
42
+ #
43
+ module DashboardsService
44
+ # Client for the REST transport
45
+ module Rest
46
+ end
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end
53
+
54
+ helper_path = ::File.join __dir__, "rest", "helpers.rb"
55
+ require "google/cloud/monitoring/dashboard/v1/dashboards_service/rest/helpers" if ::File.file? helper_path
@@ -25,6 +25,7 @@ require "google/cloud/monitoring/dashboard/v1/version"
25
25
  require "google/cloud/monitoring/dashboard/v1/dashboards_service/credentials"
26
26
  require "google/cloud/monitoring/dashboard/v1/dashboards_service/paths"
27
27
  require "google/cloud/monitoring/dashboard/v1/dashboards_service/client"
28
+ require "google/cloud/monitoring/dashboard/v1/dashboards_service/rest"
28
29
 
29
30
  module Google
30
31
  module Cloud
@@ -40,6 +41,11 @@ module Google
40
41
  # require "google/cloud/monitoring/dashboard/v1/dashboards_service"
41
42
  # client = ::Google::Cloud::Monitoring::Dashboard::V1::DashboardsService::Client.new
42
43
  #
44
+ # @example Load this service and instantiate a REST client
45
+ #
46
+ # require "google/cloud/monitoring/dashboard/v1/dashboards_service/rest"
47
+ # client = ::Google::Cloud::Monitoring::Dashboard::V1::DashboardsService::Rest::Client.new
48
+ #
43
49
  module DashboardsService
44
50
  end
45
51
  end
@@ -0,0 +1,39 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/monitoring/dashboard/v1/dashboards_service/rest"
20
+ require "google/cloud/monitoring/dashboard/v1/version"
21
+
22
+ module Google
23
+ module Cloud
24
+ module Monitoring
25
+ module Dashboard
26
+ ##
27
+ # To load just the REST part of this package, including all its services, and instantiate a REST client:
28
+ #
29
+ # @example
30
+ #
31
+ # require "google/cloud/monitoring/dashboard/v1/rest"
32
+ # client = ::Google::Cloud::Monitoring::Dashboard::V1::DashboardsService::Rest::Client.new
33
+ #
34
+ module V1
35
+ end
36
+ end
37
+ end
38
+ end
39
+ end
@@ -22,7 +22,7 @@ module Google
22
22
  module Monitoring
23
23
  module Dashboard
24
24
  module V1
25
- VERSION = "0.10.0"
25
+ VERSION = "0.12.0"
26
26
  end
27
27
  end
28
28
  end
@@ -31,6 +31,11 @@ module Google
31
31
  # require "google/cloud/monitoring/dashboard/v1"
32
32
  # client = ::Google::Cloud::Monitoring::Dashboard::V1::DashboardsService::Client.new
33
33
  #
34
+ # @example Load this package, including all its services, and instantiate a REST client
35
+ #
36
+ # require "google/cloud/monitoring/dashboard/v1"
37
+ # client = ::Google::Cloud::Monitoring::Dashboard::V1::DashboardsService::Rest::Client.new
38
+ #
34
39
  module V1
35
40
  end
36
41
  end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/monitoring/dashboard/v1/alertchart.proto
3
4
 
@@ -6,12 +7,31 @@ require 'google/protobuf'
6
7
  require 'google/api/field_behavior_pb'
7
8
  require 'google/api/resource_pb'
8
9
 
9
- Google::Protobuf::DescriptorPool.generated_pool.build do
10
- add_file("google/monitoring/dashboard/v1/alertchart.proto", :syntax => :proto3) do
11
- add_message "google.monitoring.dashboard.v1.AlertChart" do
12
- optional :name, :string, 1
10
+
11
+ descriptor_data = "\n/google/monitoring/dashboard/v1/alertchart.proto\x12\x1egoogle.monitoring.dashboard.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"|\n\nAlertChart\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02:[\xea\x41X\n%monitoring.googleapis.com/AlertPolicy\x12/projects/{project}/alertPolicies/{alert_policy}B\xf8\x01\n\"com.google.monitoring.dashboard.v1B\x0f\x41lertChartProtoP\x01ZFcloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb;dashboardpb\xaa\x02$Google.Cloud.Monitoring.Dashboard.V1\xca\x02$Google\\Cloud\\Monitoring\\Dashboard\\V1\xea\x02(Google::Cloud::Monitoring::Dashboard::V1b\x06proto3"
12
+
13
+ pool = Google::Protobuf::DescriptorPool.generated_pool
14
+
15
+ begin
16
+ pool.add_serialized_file(descriptor_data)
17
+ rescue TypeError => e
18
+ # Compatibility code: will be removed in the next major version.
19
+ require 'google/protobuf/descriptor_pb'
20
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
21
+ parsed.clear_dependency
22
+ serialized = parsed.class.encode(parsed)
23
+ file = pool.add_serialized_file(serialized)
24
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
25
+ imports = [
26
+ ]
27
+ imports.each do |type_name, expected_filename|
28
+ import_file = pool.lookup(type_name).file_descriptor
29
+ if import_file.name != expected_filename
30
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
13
31
  end
14
32
  end
33
+ warn "Each proto file must use a consistent fully-qualified name."
34
+ warn "This will become an error in the next major version."
15
35
  end
16
36
 
17
37
  module Google
@@ -1,14 +1,34 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/monitoring/dashboard/v1/collapsible_group.proto
3
4
 
4
5
  require 'google/protobuf'
5
6
 
6
- Google::Protobuf::DescriptorPool.generated_pool.build do
7
- add_file("google/monitoring/dashboard/v1/collapsible_group.proto", :syntax => :proto3) do
8
- add_message "google.monitoring.dashboard.v1.CollapsibleGroup" do
9
- optional :collapsed, :bool, 1
7
+
8
+ descriptor_data = "\n6google/monitoring/dashboard/v1/collapsible_group.proto\x12\x1egoogle.monitoring.dashboard.v1\"%\n\x10\x43ollapsibleGroup\x12\x11\n\tcollapsed\x18\x01 \x01(\x08\x42\xfe\x01\n\"com.google.monitoring.dashboard.v1B\x15\x43ollapsibleGroupProtoP\x01ZFcloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb;dashboardpb\xaa\x02$Google.Cloud.Monitoring.Dashboard.V1\xca\x02$Google\\Cloud\\Monitoring\\Dashboard\\V1\xea\x02(Google::Cloud::Monitoring::Dashboard::V1b\x06proto3"
9
+
10
+ pool = Google::Protobuf::DescriptorPool.generated_pool
11
+
12
+ begin
13
+ pool.add_serialized_file(descriptor_data)
14
+ rescue TypeError => e
15
+ # Compatibility code: will be removed in the next major version.
16
+ require 'google/protobuf/descriptor_pb'
17
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
18
+ parsed.clear_dependency
19
+ serialized = parsed.class.encode(parsed)
20
+ file = pool.add_serialized_file(serialized)
21
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
22
+ imports = [
23
+ ]
24
+ imports.each do |type_name, expected_filename|
25
+ import_file = pool.lookup(type_name).file_descriptor
26
+ if import_file.name != expected_filename
27
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
10
28
  end
11
29
  end
30
+ warn "Each proto file must use a consistent fully-qualified name."
31
+ warn "This will become an error in the next major version."
12
32
  end
13
33
 
14
34
  module Google