google-cloud-bigquery-analytics_hub-v1 0.2.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1390 @@
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/bigquery/analyticshub/v1/analyticshub_pb"
20
+
21
+ module Google
22
+ module Cloud
23
+ module Bigquery
24
+ module AnalyticsHub
25
+ module V1
26
+ module AnalyticsHubService
27
+ module Rest
28
+ ##
29
+ # REST service stub for the AnalyticsHubService 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: false,
41
+ raise_faraday_errors: false
42
+ end
43
+
44
+ ##
45
+ # Baseline implementation for the list_data_exchanges REST call
46
+ #
47
+ # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest]
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::Bigquery::AnalyticsHub::V1::ListDataExchangesResponse]
54
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
55
+ #
56
+ # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesResponse]
57
+ # A result object deserialized from the server's reply
58
+ def list_data_exchanges 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_list_data_exchanges_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::Bigquery::AnalyticsHub::V1::ListDataExchangesResponse.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_org_data_exchanges REST call
84
+ #
85
+ # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest]
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::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesResponse]
92
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
93
+ #
94
+ # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesResponse]
95
+ # A result object deserialized from the server's reply
96
+ def list_org_data_exchanges 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_org_data_exchanges_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::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesResponse.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_data_exchange REST call
122
+ #
123
+ # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest]
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::Bigquery::AnalyticsHub::V1::DataExchange]
130
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
131
+ #
132
+ # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange]
133
+ # A result object deserialized from the server's reply
134
+ def get_data_exchange 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_data_exchange_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::Bigquery::AnalyticsHub::V1::DataExchange.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 create_data_exchange REST call
160
+ #
161
+ # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest]
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::Cloud::Bigquery::AnalyticsHub::V1::DataExchange]
168
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
169
+ #
170
+ # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange]
171
+ # A result object deserialized from the server's reply
172
+ def create_data_exchange 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_create_data_exchange_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::Cloud::Bigquery::AnalyticsHub::V1::DataExchange.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_data_exchange REST call
198
+ #
199
+ # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest]
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::Bigquery::AnalyticsHub::V1::DataExchange]
206
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
207
+ #
208
+ # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange]
209
+ # A result object deserialized from the server's reply
210
+ def update_data_exchange 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_data_exchange_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::Bigquery::AnalyticsHub::V1::DataExchange.decode_json response.body, ignore_unknown_fields: true
229
+
230
+ yield result, operation if block_given?
231
+ result
232
+ end
233
+
234
+ ##
235
+ # Baseline implementation for the delete_data_exchange REST call
236
+ #
237
+ # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest]
238
+ # A request object representing the call parameters. Required.
239
+ # @param options [::Gapic::CallOptions]
240
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
241
+ #
242
+ # @yield [result, operation] Access the result along with the TransportOperation object
243
+ # @yieldparam result [::Google::Protobuf::Empty]
244
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
245
+ #
246
+ # @return [::Google::Protobuf::Empty]
247
+ # A result object deserialized from the server's reply
248
+ def delete_data_exchange request_pb, options = nil
249
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
250
+
251
+ verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_exchange_request request_pb
252
+ query_string_params = if query_string_params.any?
253
+ query_string_params.to_h { |p| p.split "=", 2 }
254
+ else
255
+ {}
256
+ end
257
+
258
+ response = @client_stub.make_http_request(
259
+ verb,
260
+ uri: uri,
261
+ body: body || "",
262
+ params: query_string_params,
263
+ options: options
264
+ )
265
+ operation = ::Gapic::Rest::TransportOperation.new response
266
+ result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
267
+
268
+ yield result, operation if block_given?
269
+ result
270
+ end
271
+
272
+ ##
273
+ # Baseline implementation for the list_listings REST call
274
+ #
275
+ # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest]
276
+ # A request object representing the call parameters. Required.
277
+ # @param options [::Gapic::CallOptions]
278
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
279
+ #
280
+ # @yield [result, operation] Access the result along with the TransportOperation object
281
+ # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsResponse]
282
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
283
+ #
284
+ # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsResponse]
285
+ # A result object deserialized from the server's reply
286
+ def list_listings request_pb, options = nil
287
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
288
+
289
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_listings_request request_pb
290
+ query_string_params = if query_string_params.any?
291
+ query_string_params.to_h { |p| p.split "=", 2 }
292
+ else
293
+ {}
294
+ end
295
+
296
+ response = @client_stub.make_http_request(
297
+ verb,
298
+ uri: uri,
299
+ body: body || "",
300
+ params: query_string_params,
301
+ options: options
302
+ )
303
+ operation = ::Gapic::Rest::TransportOperation.new response
304
+ result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsResponse.decode_json response.body, ignore_unknown_fields: true
305
+
306
+ yield result, operation if block_given?
307
+ result
308
+ end
309
+
310
+ ##
311
+ # Baseline implementation for the get_listing REST call
312
+ #
313
+ # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest]
314
+ # A request object representing the call parameters. Required.
315
+ # @param options [::Gapic::CallOptions]
316
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
317
+ #
318
+ # @yield [result, operation] Access the result along with the TransportOperation object
319
+ # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing]
320
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
321
+ #
322
+ # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing]
323
+ # A result object deserialized from the server's reply
324
+ def get_listing request_pb, options = nil
325
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
326
+
327
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_listing_request request_pb
328
+ query_string_params = if query_string_params.any?
329
+ query_string_params.to_h { |p| p.split "=", 2 }
330
+ else
331
+ {}
332
+ end
333
+
334
+ response = @client_stub.make_http_request(
335
+ verb,
336
+ uri: uri,
337
+ body: body || "",
338
+ params: query_string_params,
339
+ options: options
340
+ )
341
+ operation = ::Gapic::Rest::TransportOperation.new response
342
+ result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing.decode_json response.body, ignore_unknown_fields: true
343
+
344
+ yield result, operation if block_given?
345
+ result
346
+ end
347
+
348
+ ##
349
+ # Baseline implementation for the create_listing REST call
350
+ #
351
+ # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest]
352
+ # A request object representing the call parameters. Required.
353
+ # @param options [::Gapic::CallOptions]
354
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
355
+ #
356
+ # @yield [result, operation] Access the result along with the TransportOperation object
357
+ # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing]
358
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
359
+ #
360
+ # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing]
361
+ # A result object deserialized from the server's reply
362
+ def create_listing request_pb, options = nil
363
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
364
+
365
+ verb, uri, query_string_params, body = ServiceStub.transcode_create_listing_request request_pb
366
+ query_string_params = if query_string_params.any?
367
+ query_string_params.to_h { |p| p.split "=", 2 }
368
+ else
369
+ {}
370
+ end
371
+
372
+ response = @client_stub.make_http_request(
373
+ verb,
374
+ uri: uri,
375
+ body: body || "",
376
+ params: query_string_params,
377
+ options: options
378
+ )
379
+ operation = ::Gapic::Rest::TransportOperation.new response
380
+ result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing.decode_json response.body, ignore_unknown_fields: true
381
+
382
+ yield result, operation if block_given?
383
+ result
384
+ end
385
+
386
+ ##
387
+ # Baseline implementation for the update_listing REST call
388
+ #
389
+ # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest]
390
+ # A request object representing the call parameters. Required.
391
+ # @param options [::Gapic::CallOptions]
392
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
393
+ #
394
+ # @yield [result, operation] Access the result along with the TransportOperation object
395
+ # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing]
396
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
397
+ #
398
+ # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing]
399
+ # A result object deserialized from the server's reply
400
+ def update_listing request_pb, options = nil
401
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
402
+
403
+ verb, uri, query_string_params, body = ServiceStub.transcode_update_listing_request request_pb
404
+ query_string_params = if query_string_params.any?
405
+ query_string_params.to_h { |p| p.split "=", 2 }
406
+ else
407
+ {}
408
+ end
409
+
410
+ response = @client_stub.make_http_request(
411
+ verb,
412
+ uri: uri,
413
+ body: body || "",
414
+ params: query_string_params,
415
+ options: options
416
+ )
417
+ operation = ::Gapic::Rest::TransportOperation.new response
418
+ result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing.decode_json response.body, ignore_unknown_fields: true
419
+
420
+ yield result, operation if block_given?
421
+ result
422
+ end
423
+
424
+ ##
425
+ # Baseline implementation for the delete_listing REST call
426
+ #
427
+ # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest]
428
+ # A request object representing the call parameters. Required.
429
+ # @param options [::Gapic::CallOptions]
430
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
431
+ #
432
+ # @yield [result, operation] Access the result along with the TransportOperation object
433
+ # @yieldparam result [::Google::Protobuf::Empty]
434
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
435
+ #
436
+ # @return [::Google::Protobuf::Empty]
437
+ # A result object deserialized from the server's reply
438
+ def delete_listing request_pb, options = nil
439
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
440
+
441
+ verb, uri, query_string_params, body = ServiceStub.transcode_delete_listing_request request_pb
442
+ query_string_params = if query_string_params.any?
443
+ query_string_params.to_h { |p| p.split "=", 2 }
444
+ else
445
+ {}
446
+ end
447
+
448
+ response = @client_stub.make_http_request(
449
+ verb,
450
+ uri: uri,
451
+ body: body || "",
452
+ params: query_string_params,
453
+ options: options
454
+ )
455
+ operation = ::Gapic::Rest::TransportOperation.new response
456
+ result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
457
+
458
+ yield result, operation if block_given?
459
+ result
460
+ end
461
+
462
+ ##
463
+ # Baseline implementation for the subscribe_listing REST call
464
+ #
465
+ # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest]
466
+ # A request object representing the call parameters. Required.
467
+ # @param options [::Gapic::CallOptions]
468
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
469
+ #
470
+ # @yield [result, operation] Access the result along with the TransportOperation object
471
+ # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse]
472
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
473
+ #
474
+ # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse]
475
+ # A result object deserialized from the server's reply
476
+ def subscribe_listing request_pb, options = nil
477
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
478
+
479
+ verb, uri, query_string_params, body = ServiceStub.transcode_subscribe_listing_request request_pb
480
+ query_string_params = if query_string_params.any?
481
+ query_string_params.to_h { |p| p.split "=", 2 }
482
+ else
483
+ {}
484
+ end
485
+
486
+ response = @client_stub.make_http_request(
487
+ verb,
488
+ uri: uri,
489
+ body: body || "",
490
+ params: query_string_params,
491
+ options: options
492
+ )
493
+ operation = ::Gapic::Rest::TransportOperation.new response
494
+ result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse.decode_json response.body, ignore_unknown_fields: true
495
+
496
+ yield result, operation if block_given?
497
+ result
498
+ end
499
+
500
+ ##
501
+ # Baseline implementation for the subscribe_data_exchange REST call
502
+ #
503
+ # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest]
504
+ # A request object representing the call parameters. Required.
505
+ # @param options [::Gapic::CallOptions]
506
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
507
+ #
508
+ # @yield [result, operation] Access the result along with the TransportOperation object
509
+ # @yieldparam result [::Google::Longrunning::Operation]
510
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
511
+ #
512
+ # @return [::Google::Longrunning::Operation]
513
+ # A result object deserialized from the server's reply
514
+ def subscribe_data_exchange request_pb, options = nil
515
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
516
+
517
+ verb, uri, query_string_params, body = ServiceStub.transcode_subscribe_data_exchange_request request_pb
518
+ query_string_params = if query_string_params.any?
519
+ query_string_params.to_h { |p| p.split "=", 2 }
520
+ else
521
+ {}
522
+ end
523
+
524
+ response = @client_stub.make_http_request(
525
+ verb,
526
+ uri: uri,
527
+ body: body || "",
528
+ params: query_string_params,
529
+ options: options
530
+ )
531
+ operation = ::Gapic::Rest::TransportOperation.new response
532
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
533
+
534
+ yield result, operation if block_given?
535
+ result
536
+ end
537
+
538
+ ##
539
+ # Baseline implementation for the refresh_subscription REST call
540
+ #
541
+ # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest]
542
+ # A request object representing the call parameters. Required.
543
+ # @param options [::Gapic::CallOptions]
544
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
545
+ #
546
+ # @yield [result, operation] Access the result along with the TransportOperation object
547
+ # @yieldparam result [::Google::Longrunning::Operation]
548
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
549
+ #
550
+ # @return [::Google::Longrunning::Operation]
551
+ # A result object deserialized from the server's reply
552
+ def refresh_subscription request_pb, options = nil
553
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
554
+
555
+ verb, uri, query_string_params, body = ServiceStub.transcode_refresh_subscription_request request_pb
556
+ query_string_params = if query_string_params.any?
557
+ query_string_params.to_h { |p| p.split "=", 2 }
558
+ else
559
+ {}
560
+ end
561
+
562
+ response = @client_stub.make_http_request(
563
+ verb,
564
+ uri: uri,
565
+ body: body || "",
566
+ params: query_string_params,
567
+ options: options
568
+ )
569
+ operation = ::Gapic::Rest::TransportOperation.new response
570
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
571
+
572
+ yield result, operation if block_given?
573
+ result
574
+ end
575
+
576
+ ##
577
+ # Baseline implementation for the get_subscription REST call
578
+ #
579
+ # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest]
580
+ # A request object representing the call parameters. Required.
581
+ # @param options [::Gapic::CallOptions]
582
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
583
+ #
584
+ # @yield [result, operation] Access the result along with the TransportOperation object
585
+ # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription]
586
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
587
+ #
588
+ # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription]
589
+ # A result object deserialized from the server's reply
590
+ def get_subscription request_pb, options = nil
591
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
592
+
593
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_subscription_request request_pb
594
+ query_string_params = if query_string_params.any?
595
+ query_string_params.to_h { |p| p.split "=", 2 }
596
+ else
597
+ {}
598
+ end
599
+
600
+ response = @client_stub.make_http_request(
601
+ verb,
602
+ uri: uri,
603
+ body: body || "",
604
+ params: query_string_params,
605
+ options: options
606
+ )
607
+ operation = ::Gapic::Rest::TransportOperation.new response
608
+ result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription.decode_json response.body, ignore_unknown_fields: true
609
+
610
+ yield result, operation if block_given?
611
+ result
612
+ end
613
+
614
+ ##
615
+ # Baseline implementation for the list_subscriptions REST call
616
+ #
617
+ # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest]
618
+ # A request object representing the call parameters. Required.
619
+ # @param options [::Gapic::CallOptions]
620
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
621
+ #
622
+ # @yield [result, operation] Access the result along with the TransportOperation object
623
+ # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsResponse]
624
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
625
+ #
626
+ # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsResponse]
627
+ # A result object deserialized from the server's reply
628
+ def list_subscriptions request_pb, options = nil
629
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
630
+
631
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_subscriptions_request request_pb
632
+ query_string_params = if query_string_params.any?
633
+ query_string_params.to_h { |p| p.split "=", 2 }
634
+ else
635
+ {}
636
+ end
637
+
638
+ response = @client_stub.make_http_request(
639
+ verb,
640
+ uri: uri,
641
+ body: body || "",
642
+ params: query_string_params,
643
+ options: options
644
+ )
645
+ operation = ::Gapic::Rest::TransportOperation.new response
646
+ result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsResponse.decode_json response.body, ignore_unknown_fields: true
647
+
648
+ yield result, operation if block_given?
649
+ result
650
+ end
651
+
652
+ ##
653
+ # Baseline implementation for the list_shared_resource_subscriptions REST call
654
+ #
655
+ # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest]
656
+ # A request object representing the call parameters. Required.
657
+ # @param options [::Gapic::CallOptions]
658
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
659
+ #
660
+ # @yield [result, operation] Access the result along with the TransportOperation object
661
+ # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsResponse]
662
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
663
+ #
664
+ # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsResponse]
665
+ # A result object deserialized from the server's reply
666
+ def list_shared_resource_subscriptions request_pb, options = nil
667
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
668
+
669
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_shared_resource_subscriptions_request request_pb
670
+ query_string_params = if query_string_params.any?
671
+ query_string_params.to_h { |p| p.split "=", 2 }
672
+ else
673
+ {}
674
+ end
675
+
676
+ response = @client_stub.make_http_request(
677
+ verb,
678
+ uri: uri,
679
+ body: body || "",
680
+ params: query_string_params,
681
+ options: options
682
+ )
683
+ operation = ::Gapic::Rest::TransportOperation.new response
684
+ result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsResponse.decode_json response.body, ignore_unknown_fields: true
685
+
686
+ yield result, operation if block_given?
687
+ result
688
+ end
689
+
690
+ ##
691
+ # Baseline implementation for the revoke_subscription REST call
692
+ #
693
+ # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest]
694
+ # A request object representing the call parameters. Required.
695
+ # @param options [::Gapic::CallOptions]
696
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
697
+ #
698
+ # @yield [result, operation] Access the result along with the TransportOperation object
699
+ # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse]
700
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
701
+ #
702
+ # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse]
703
+ # A result object deserialized from the server's reply
704
+ def revoke_subscription request_pb, options = nil
705
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
706
+
707
+ verb, uri, query_string_params, body = ServiceStub.transcode_revoke_subscription_request request_pb
708
+ query_string_params = if query_string_params.any?
709
+ query_string_params.to_h { |p| p.split "=", 2 }
710
+ else
711
+ {}
712
+ end
713
+
714
+ response = @client_stub.make_http_request(
715
+ verb,
716
+ uri: uri,
717
+ body: body || "",
718
+ params: query_string_params,
719
+ options: options
720
+ )
721
+ operation = ::Gapic::Rest::TransportOperation.new response
722
+ result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse.decode_json response.body, ignore_unknown_fields: true
723
+
724
+ yield result, operation if block_given?
725
+ result
726
+ end
727
+
728
+ ##
729
+ # Baseline implementation for the delete_subscription REST call
730
+ #
731
+ # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest]
732
+ # A request object representing the call parameters. Required.
733
+ # @param options [::Gapic::CallOptions]
734
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
735
+ #
736
+ # @yield [result, operation] Access the result along with the TransportOperation object
737
+ # @yieldparam result [::Google::Longrunning::Operation]
738
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
739
+ #
740
+ # @return [::Google::Longrunning::Operation]
741
+ # A result object deserialized from the server's reply
742
+ def delete_subscription request_pb, options = nil
743
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
744
+
745
+ verb, uri, query_string_params, body = ServiceStub.transcode_delete_subscription_request request_pb
746
+ query_string_params = if query_string_params.any?
747
+ query_string_params.to_h { |p| p.split "=", 2 }
748
+ else
749
+ {}
750
+ end
751
+
752
+ response = @client_stub.make_http_request(
753
+ verb,
754
+ uri: uri,
755
+ body: body || "",
756
+ params: query_string_params,
757
+ options: options
758
+ )
759
+ operation = ::Gapic::Rest::TransportOperation.new response
760
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
761
+
762
+ yield result, operation if block_given?
763
+ result
764
+ end
765
+
766
+ ##
767
+ # Baseline implementation for the get_iam_policy REST call
768
+ #
769
+ # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest]
770
+ # A request object representing the call parameters. Required.
771
+ # @param options [::Gapic::CallOptions]
772
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
773
+ #
774
+ # @yield [result, operation] Access the result along with the TransportOperation object
775
+ # @yieldparam result [::Google::Iam::V1::Policy]
776
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
777
+ #
778
+ # @return [::Google::Iam::V1::Policy]
779
+ # A result object deserialized from the server's reply
780
+ def get_iam_policy request_pb, options = nil
781
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
782
+
783
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb
784
+ query_string_params = if query_string_params.any?
785
+ query_string_params.to_h { |p| p.split "=", 2 }
786
+ else
787
+ {}
788
+ end
789
+
790
+ response = @client_stub.make_http_request(
791
+ verb,
792
+ uri: uri,
793
+ body: body || "",
794
+ params: query_string_params,
795
+ options: options
796
+ )
797
+ operation = ::Gapic::Rest::TransportOperation.new response
798
+ result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true
799
+
800
+ yield result, operation if block_given?
801
+ result
802
+ end
803
+
804
+ ##
805
+ # Baseline implementation for the set_iam_policy REST call
806
+ #
807
+ # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest]
808
+ # A request object representing the call parameters. Required.
809
+ # @param options [::Gapic::CallOptions]
810
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
811
+ #
812
+ # @yield [result, operation] Access the result along with the TransportOperation object
813
+ # @yieldparam result [::Google::Iam::V1::Policy]
814
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
815
+ #
816
+ # @return [::Google::Iam::V1::Policy]
817
+ # A result object deserialized from the server's reply
818
+ def set_iam_policy request_pb, options = nil
819
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
820
+
821
+ verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb
822
+ query_string_params = if query_string_params.any?
823
+ query_string_params.to_h { |p| p.split "=", 2 }
824
+ else
825
+ {}
826
+ end
827
+
828
+ response = @client_stub.make_http_request(
829
+ verb,
830
+ uri: uri,
831
+ body: body || "",
832
+ params: query_string_params,
833
+ options: options
834
+ )
835
+ operation = ::Gapic::Rest::TransportOperation.new response
836
+ result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true
837
+
838
+ yield result, operation if block_given?
839
+ result
840
+ end
841
+
842
+ ##
843
+ # Baseline implementation for the test_iam_permissions REST call
844
+ #
845
+ # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest]
846
+ # A request object representing the call parameters. Required.
847
+ # @param options [::Gapic::CallOptions]
848
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
849
+ #
850
+ # @yield [result, operation] Access the result along with the TransportOperation object
851
+ # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse]
852
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
853
+ #
854
+ # @return [::Google::Iam::V1::TestIamPermissionsResponse]
855
+ # A result object deserialized from the server's reply
856
+ def test_iam_permissions request_pb, options = nil
857
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
858
+
859
+ verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb
860
+ query_string_params = if query_string_params.any?
861
+ query_string_params.to_h { |p| p.split "=", 2 }
862
+ else
863
+ {}
864
+ end
865
+
866
+ response = @client_stub.make_http_request(
867
+ verb,
868
+ uri: uri,
869
+ body: body || "",
870
+ params: query_string_params,
871
+ options: options
872
+ )
873
+ operation = ::Gapic::Rest::TransportOperation.new response
874
+ result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true
875
+
876
+ yield result, operation if block_given?
877
+ result
878
+ end
879
+
880
+ ##
881
+ # @private
882
+ #
883
+ # GRPC transcoding helper method for the list_data_exchanges REST call
884
+ #
885
+ # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest]
886
+ # A request object representing the call parameters. Required.
887
+ # @return [Array(String, [String, nil], Hash{String => String})]
888
+ # Uri, Body, Query string parameters
889
+ def self.transcode_list_data_exchanges_request request_pb
890
+ transcoder = Gapic::Rest::GrpcTranscoder.new
891
+ .with_bindings(
892
+ uri_method: :get,
893
+ uri_template: "/v1/{parent}/dataExchanges",
894
+ matches: [
895
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
896
+ ]
897
+ )
898
+ transcoder.transcode request_pb
899
+ end
900
+
901
+ ##
902
+ # @private
903
+ #
904
+ # GRPC transcoding helper method for the list_org_data_exchanges REST call
905
+ #
906
+ # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest]
907
+ # A request object representing the call parameters. Required.
908
+ # @return [Array(String, [String, nil], Hash{String => String})]
909
+ # Uri, Body, Query string parameters
910
+ def self.transcode_list_org_data_exchanges_request request_pb
911
+ transcoder = Gapic::Rest::GrpcTranscoder.new
912
+ .with_bindings(
913
+ uri_method: :get,
914
+ uri_template: "/v1/{organization}/dataExchanges",
915
+ matches: [
916
+ ["organization", %r{^organizations/[^/]+/locations/[^/]+/?$}, false]
917
+ ]
918
+ )
919
+ transcoder.transcode request_pb
920
+ end
921
+
922
+ ##
923
+ # @private
924
+ #
925
+ # GRPC transcoding helper method for the get_data_exchange REST call
926
+ #
927
+ # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest]
928
+ # A request object representing the call parameters. Required.
929
+ # @return [Array(String, [String, nil], Hash{String => String})]
930
+ # Uri, Body, Query string parameters
931
+ def self.transcode_get_data_exchange_request request_pb
932
+ transcoder = Gapic::Rest::GrpcTranscoder.new
933
+ .with_bindings(
934
+ uri_method: :get,
935
+ uri_template: "/v1/{name}",
936
+ matches: [
937
+ ["name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false]
938
+ ]
939
+ )
940
+ transcoder.transcode request_pb
941
+ end
942
+
943
+ ##
944
+ # @private
945
+ #
946
+ # GRPC transcoding helper method for the create_data_exchange REST call
947
+ #
948
+ # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest]
949
+ # A request object representing the call parameters. Required.
950
+ # @return [Array(String, [String, nil], Hash{String => String})]
951
+ # Uri, Body, Query string parameters
952
+ def self.transcode_create_data_exchange_request request_pb
953
+ transcoder = Gapic::Rest::GrpcTranscoder.new
954
+ .with_bindings(
955
+ uri_method: :post,
956
+ uri_template: "/v1/{parent}/dataExchanges",
957
+ body: "data_exchange",
958
+ matches: [
959
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
960
+ ]
961
+ )
962
+ transcoder.transcode request_pb
963
+ end
964
+
965
+ ##
966
+ # @private
967
+ #
968
+ # GRPC transcoding helper method for the update_data_exchange REST call
969
+ #
970
+ # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest]
971
+ # A request object representing the call parameters. Required.
972
+ # @return [Array(String, [String, nil], Hash{String => String})]
973
+ # Uri, Body, Query string parameters
974
+ def self.transcode_update_data_exchange_request request_pb
975
+ transcoder = Gapic::Rest::GrpcTranscoder.new
976
+ .with_bindings(
977
+ uri_method: :patch,
978
+ uri_template: "/v1/{data_exchange.name}",
979
+ body: "data_exchange",
980
+ matches: [
981
+ ["data_exchange.name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false]
982
+ ]
983
+ )
984
+ transcoder.transcode request_pb
985
+ end
986
+
987
+ ##
988
+ # @private
989
+ #
990
+ # GRPC transcoding helper method for the delete_data_exchange REST call
991
+ #
992
+ # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest]
993
+ # A request object representing the call parameters. Required.
994
+ # @return [Array(String, [String, nil], Hash{String => String})]
995
+ # Uri, Body, Query string parameters
996
+ def self.transcode_delete_data_exchange_request request_pb
997
+ transcoder = Gapic::Rest::GrpcTranscoder.new
998
+ .with_bindings(
999
+ uri_method: :delete,
1000
+ uri_template: "/v1/{name}",
1001
+ matches: [
1002
+ ["name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false]
1003
+ ]
1004
+ )
1005
+ transcoder.transcode request_pb
1006
+ end
1007
+
1008
+ ##
1009
+ # @private
1010
+ #
1011
+ # GRPC transcoding helper method for the list_listings REST call
1012
+ #
1013
+ # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest]
1014
+ # A request object representing the call parameters. Required.
1015
+ # @return [Array(String, [String, nil], Hash{String => String})]
1016
+ # Uri, Body, Query string parameters
1017
+ def self.transcode_list_listings_request request_pb
1018
+ transcoder = Gapic::Rest::GrpcTranscoder.new
1019
+ .with_bindings(
1020
+ uri_method: :get,
1021
+ uri_template: "/v1/{parent}/listings",
1022
+ matches: [
1023
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false]
1024
+ ]
1025
+ )
1026
+ transcoder.transcode request_pb
1027
+ end
1028
+
1029
+ ##
1030
+ # @private
1031
+ #
1032
+ # GRPC transcoding helper method for the get_listing REST call
1033
+ #
1034
+ # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest]
1035
+ # A request object representing the call parameters. Required.
1036
+ # @return [Array(String, [String, nil], Hash{String => String})]
1037
+ # Uri, Body, Query string parameters
1038
+ def self.transcode_get_listing_request request_pb
1039
+ transcoder = Gapic::Rest::GrpcTranscoder.new
1040
+ .with_bindings(
1041
+ uri_method: :get,
1042
+ uri_template: "/v1/{name}",
1043
+ matches: [
1044
+ ["name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/listings/[^/]+/?$}, false]
1045
+ ]
1046
+ )
1047
+ transcoder.transcode request_pb
1048
+ end
1049
+
1050
+ ##
1051
+ # @private
1052
+ #
1053
+ # GRPC transcoding helper method for the create_listing REST call
1054
+ #
1055
+ # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest]
1056
+ # A request object representing the call parameters. Required.
1057
+ # @return [Array(String, [String, nil], Hash{String => String})]
1058
+ # Uri, Body, Query string parameters
1059
+ def self.transcode_create_listing_request request_pb
1060
+ transcoder = Gapic::Rest::GrpcTranscoder.new
1061
+ .with_bindings(
1062
+ uri_method: :post,
1063
+ uri_template: "/v1/{parent}/listings",
1064
+ body: "listing",
1065
+ matches: [
1066
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false]
1067
+ ]
1068
+ )
1069
+ transcoder.transcode request_pb
1070
+ end
1071
+
1072
+ ##
1073
+ # @private
1074
+ #
1075
+ # GRPC transcoding helper method for the update_listing REST call
1076
+ #
1077
+ # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest]
1078
+ # A request object representing the call parameters. Required.
1079
+ # @return [Array(String, [String, nil], Hash{String => String})]
1080
+ # Uri, Body, Query string parameters
1081
+ def self.transcode_update_listing_request request_pb
1082
+ transcoder = Gapic::Rest::GrpcTranscoder.new
1083
+ .with_bindings(
1084
+ uri_method: :patch,
1085
+ uri_template: "/v1/{listing.name}",
1086
+ body: "listing",
1087
+ matches: [
1088
+ ["listing.name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/listings/[^/]+/?$}, false]
1089
+ ]
1090
+ )
1091
+ transcoder.transcode request_pb
1092
+ end
1093
+
1094
+ ##
1095
+ # @private
1096
+ #
1097
+ # GRPC transcoding helper method for the delete_listing REST call
1098
+ #
1099
+ # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest]
1100
+ # A request object representing the call parameters. Required.
1101
+ # @return [Array(String, [String, nil], Hash{String => String})]
1102
+ # Uri, Body, Query string parameters
1103
+ def self.transcode_delete_listing_request request_pb
1104
+ transcoder = Gapic::Rest::GrpcTranscoder.new
1105
+ .with_bindings(
1106
+ uri_method: :delete,
1107
+ uri_template: "/v1/{name}",
1108
+ matches: [
1109
+ ["name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/listings/[^/]+/?$}, false]
1110
+ ]
1111
+ )
1112
+ transcoder.transcode request_pb
1113
+ end
1114
+
1115
+ ##
1116
+ # @private
1117
+ #
1118
+ # GRPC transcoding helper method for the subscribe_listing REST call
1119
+ #
1120
+ # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest]
1121
+ # A request object representing the call parameters. Required.
1122
+ # @return [Array(String, [String, nil], Hash{String => String})]
1123
+ # Uri, Body, Query string parameters
1124
+ def self.transcode_subscribe_listing_request request_pb
1125
+ transcoder = Gapic::Rest::GrpcTranscoder.new
1126
+ .with_bindings(
1127
+ uri_method: :post,
1128
+ uri_template: "/v1/{name}:subscribe",
1129
+ body: "*",
1130
+ matches: [
1131
+ ["name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/listings/[^/]+/?$}, false]
1132
+ ]
1133
+ )
1134
+ transcoder.transcode request_pb
1135
+ end
1136
+
1137
+ ##
1138
+ # @private
1139
+ #
1140
+ # GRPC transcoding helper method for the subscribe_data_exchange REST call
1141
+ #
1142
+ # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest]
1143
+ # A request object representing the call parameters. Required.
1144
+ # @return [Array(String, [String, nil], Hash{String => String})]
1145
+ # Uri, Body, Query string parameters
1146
+ def self.transcode_subscribe_data_exchange_request request_pb
1147
+ transcoder = Gapic::Rest::GrpcTranscoder.new
1148
+ .with_bindings(
1149
+ uri_method: :post,
1150
+ uri_template: "/v1/{name}:subscribe",
1151
+ body: "*",
1152
+ matches: [
1153
+ ["name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false]
1154
+ ]
1155
+ )
1156
+ transcoder.transcode request_pb
1157
+ end
1158
+
1159
+ ##
1160
+ # @private
1161
+ #
1162
+ # GRPC transcoding helper method for the refresh_subscription REST call
1163
+ #
1164
+ # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest]
1165
+ # A request object representing the call parameters. Required.
1166
+ # @return [Array(String, [String, nil], Hash{String => String})]
1167
+ # Uri, Body, Query string parameters
1168
+ def self.transcode_refresh_subscription_request request_pb
1169
+ transcoder = Gapic::Rest::GrpcTranscoder.new
1170
+ .with_bindings(
1171
+ uri_method: :post,
1172
+ uri_template: "/v1/{name}:refresh",
1173
+ body: "*",
1174
+ matches: [
1175
+ ["name", %r{^projects/[^/]+/locations/[^/]+/subscriptions/[^/]+/?$}, false]
1176
+ ]
1177
+ )
1178
+ transcoder.transcode request_pb
1179
+ end
1180
+
1181
+ ##
1182
+ # @private
1183
+ #
1184
+ # GRPC transcoding helper method for the get_subscription REST call
1185
+ #
1186
+ # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest]
1187
+ # A request object representing the call parameters. Required.
1188
+ # @return [Array(String, [String, nil], Hash{String => String})]
1189
+ # Uri, Body, Query string parameters
1190
+ def self.transcode_get_subscription_request request_pb
1191
+ transcoder = Gapic::Rest::GrpcTranscoder.new
1192
+ .with_bindings(
1193
+ uri_method: :get,
1194
+ uri_template: "/v1/{name}",
1195
+ matches: [
1196
+ ["name", %r{^projects/[^/]+/locations/[^/]+/subscriptions/[^/]+/?$}, false]
1197
+ ]
1198
+ )
1199
+ transcoder.transcode request_pb
1200
+ end
1201
+
1202
+ ##
1203
+ # @private
1204
+ #
1205
+ # GRPC transcoding helper method for the list_subscriptions REST call
1206
+ #
1207
+ # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest]
1208
+ # A request object representing the call parameters. Required.
1209
+ # @return [Array(String, [String, nil], Hash{String => String})]
1210
+ # Uri, Body, Query string parameters
1211
+ def self.transcode_list_subscriptions_request request_pb
1212
+ transcoder = Gapic::Rest::GrpcTranscoder.new
1213
+ .with_bindings(
1214
+ uri_method: :get,
1215
+ uri_template: "/v1/{parent}/subscriptions",
1216
+ matches: [
1217
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
1218
+ ]
1219
+ )
1220
+ transcoder.transcode request_pb
1221
+ end
1222
+
1223
+ ##
1224
+ # @private
1225
+ #
1226
+ # GRPC transcoding helper method for the list_shared_resource_subscriptions REST call
1227
+ #
1228
+ # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest]
1229
+ # A request object representing the call parameters. Required.
1230
+ # @return [Array(String, [String, nil], Hash{String => String})]
1231
+ # Uri, Body, Query string parameters
1232
+ def self.transcode_list_shared_resource_subscriptions_request request_pb
1233
+ transcoder = Gapic::Rest::GrpcTranscoder.new
1234
+ .with_bindings(
1235
+ uri_method: :get,
1236
+ uri_template: "/v1/{resource}:listSubscriptions",
1237
+ matches: [
1238
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false]
1239
+ ]
1240
+ )
1241
+ .with_bindings(
1242
+ uri_method: :get,
1243
+ uri_template: "/v1/{resource}:listSubscriptions",
1244
+ matches: [
1245
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/listings/[^/]+/?$}, false]
1246
+ ]
1247
+ )
1248
+ transcoder.transcode request_pb
1249
+ end
1250
+
1251
+ ##
1252
+ # @private
1253
+ #
1254
+ # GRPC transcoding helper method for the revoke_subscription REST call
1255
+ #
1256
+ # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest]
1257
+ # A request object representing the call parameters. Required.
1258
+ # @return [Array(String, [String, nil], Hash{String => String})]
1259
+ # Uri, Body, Query string parameters
1260
+ def self.transcode_revoke_subscription_request request_pb
1261
+ transcoder = Gapic::Rest::GrpcTranscoder.new
1262
+ .with_bindings(
1263
+ uri_method: :post,
1264
+ uri_template: "/v1/{name}:revoke",
1265
+ body: "*",
1266
+ matches: [
1267
+ ["name", %r{^projects/[^/]+/locations/[^/]+/subscriptions/[^/]+/?$}, false]
1268
+ ]
1269
+ )
1270
+ transcoder.transcode request_pb
1271
+ end
1272
+
1273
+ ##
1274
+ # @private
1275
+ #
1276
+ # GRPC transcoding helper method for the delete_subscription REST call
1277
+ #
1278
+ # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest]
1279
+ # A request object representing the call parameters. Required.
1280
+ # @return [Array(String, [String, nil], Hash{String => String})]
1281
+ # Uri, Body, Query string parameters
1282
+ def self.transcode_delete_subscription_request request_pb
1283
+ transcoder = Gapic::Rest::GrpcTranscoder.new
1284
+ .with_bindings(
1285
+ uri_method: :delete,
1286
+ uri_template: "/v1/{name}",
1287
+ matches: [
1288
+ ["name", %r{^projects/[^/]+/locations/[^/]+/subscriptions/[^/]+/?$}, false]
1289
+ ]
1290
+ )
1291
+ transcoder.transcode request_pb
1292
+ end
1293
+
1294
+ ##
1295
+ # @private
1296
+ #
1297
+ # GRPC transcoding helper method for the get_iam_policy REST call
1298
+ #
1299
+ # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest]
1300
+ # A request object representing the call parameters. Required.
1301
+ # @return [Array(String, [String, nil], Hash{String => String})]
1302
+ # Uri, Body, Query string parameters
1303
+ def self.transcode_get_iam_policy_request request_pb
1304
+ transcoder = Gapic::Rest::GrpcTranscoder.new
1305
+ .with_bindings(
1306
+ uri_method: :post,
1307
+ uri_template: "/v1/{resource}:getIamPolicy",
1308
+ body: "*",
1309
+ matches: [
1310
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false]
1311
+ ]
1312
+ )
1313
+ .with_bindings(
1314
+ uri_method: :post,
1315
+ uri_template: "/v1/{resource}:getIamPolicy",
1316
+ body: "*",
1317
+ matches: [
1318
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/listings/[^/]+/?$}, false]
1319
+ ]
1320
+ )
1321
+ transcoder.transcode request_pb
1322
+ end
1323
+
1324
+ ##
1325
+ # @private
1326
+ #
1327
+ # GRPC transcoding helper method for the set_iam_policy REST call
1328
+ #
1329
+ # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest]
1330
+ # A request object representing the call parameters. Required.
1331
+ # @return [Array(String, [String, nil], Hash{String => String})]
1332
+ # Uri, Body, Query string parameters
1333
+ def self.transcode_set_iam_policy_request request_pb
1334
+ transcoder = Gapic::Rest::GrpcTranscoder.new
1335
+ .with_bindings(
1336
+ uri_method: :post,
1337
+ uri_template: "/v1/{resource}:setIamPolicy",
1338
+ body: "*",
1339
+ matches: [
1340
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false]
1341
+ ]
1342
+ )
1343
+ .with_bindings(
1344
+ uri_method: :post,
1345
+ uri_template: "/v1/{resource}:setIamPolicy",
1346
+ body: "*",
1347
+ matches: [
1348
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/listings/[^/]+/?$}, false]
1349
+ ]
1350
+ )
1351
+ transcoder.transcode request_pb
1352
+ end
1353
+
1354
+ ##
1355
+ # @private
1356
+ #
1357
+ # GRPC transcoding helper method for the test_iam_permissions REST call
1358
+ #
1359
+ # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest]
1360
+ # A request object representing the call parameters. Required.
1361
+ # @return [Array(String, [String, nil], Hash{String => String})]
1362
+ # Uri, Body, Query string parameters
1363
+ def self.transcode_test_iam_permissions_request request_pb
1364
+ transcoder = Gapic::Rest::GrpcTranscoder.new
1365
+ .with_bindings(
1366
+ uri_method: :post,
1367
+ uri_template: "/v1/{resource}:testIamPermissions",
1368
+ body: "*",
1369
+ matches: [
1370
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false]
1371
+ ]
1372
+ )
1373
+ .with_bindings(
1374
+ uri_method: :post,
1375
+ uri_template: "/v1/{resource}:testIamPermissions",
1376
+ body: "*",
1377
+ matches: [
1378
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/listings/[^/]+/?$}, false]
1379
+ ]
1380
+ )
1381
+ transcoder.transcode request_pb
1382
+ end
1383
+ end
1384
+ end
1385
+ end
1386
+ end
1387
+ end
1388
+ end
1389
+ end
1390
+ end