google-cloud-bigquery-data_exchange-v1beta1 0.13.0 → 0.14.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.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +1 -1
  3. data/README.md +2 -6
  4. data/lib/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service/client.rb +1 -1
  5. data/lib/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service/credentials.rb +1 -1
  6. data/lib/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service/paths.rb +1 -1
  7. data/lib/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service/rest/client.rb +1752 -0
  8. data/lib/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service/rest/service_stub.rb +1030 -0
  9. data/lib/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service/rest.rb +60 -0
  10. data/lib/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service.rb +7 -1
  11. data/lib/google/cloud/bigquery/data_exchange/v1beta1/bindings_override.rb +77 -0
  12. data/lib/google/cloud/bigquery/data_exchange/v1beta1/rest.rb +40 -0
  13. data/lib/google/cloud/bigquery/data_exchange/v1beta1/version.rb +1 -1
  14. data/lib/google/cloud/bigquery/data_exchange/v1beta1.rb +6 -1
  15. data/lib/google/cloud/bigquery/dataexchange/v1beta1/dataexchange_pb.rb +1 -1
  16. data/lib/google/cloud/bigquery/dataexchange/v1beta1/dataexchange_services_pb.rb +1 -1
  17. data/lib/google-cloud-bigquery-data_exchange-v1beta1.rb +1 -1
  18. data/proto_docs/README.md +1 -1
  19. data/proto_docs/google/api/client.rb +1 -1
  20. data/proto_docs/google/api/field_behavior.rb +1 -1
  21. data/proto_docs/google/api/launch_stage.rb +1 -1
  22. data/proto_docs/google/api/resource.rb +1 -1
  23. data/proto_docs/google/cloud/bigquery/dataexchange/v1beta1/dataexchange.rb +1 -1
  24. data/proto_docs/google/iam/v1/iam_policy.rb +1 -1
  25. data/proto_docs/google/iam/v1/options.rb +1 -1
  26. data/proto_docs/google/iam/v1/policy.rb +1 -1
  27. data/proto_docs/google/protobuf/duration.rb +1 -1
  28. data/proto_docs/google/protobuf/empty.rb +1 -1
  29. data/proto_docs/google/protobuf/field_mask.rb +1 -1
  30. data/proto_docs/google/protobuf/wrappers.rb +1 -1
  31. data/proto_docs/google/type/expr.rb +1 -1
  32. metadata +12 -11
  33. data/proto_docs/google/protobuf/any.rb +0 -145
@@ -0,0 +1,1030 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2026 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/dataexchange/v1beta1/dataexchange_pb"
20
+
21
+ module Google
22
+ module Cloud
23
+ module Bigquery
24
+ module DataExchange
25
+ module V1beta1
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
+ # @private
35
+ def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
36
+ # These require statements are intentionally placed here to initialize
37
+ # the REST modules only when it's required.
38
+ require "gapic/rest"
39
+
40
+ @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
41
+ endpoint_template: endpoint_template,
42
+ universe_domain: universe_domain,
43
+ credentials: credentials,
44
+ numeric_enums: false,
45
+ service_name: self.class,
46
+ raise_faraday_errors: false,
47
+ logger: logger
48
+ end
49
+
50
+ ##
51
+ # The effective universe domain
52
+ #
53
+ # @return [String]
54
+ #
55
+ def universe_domain
56
+ @client_stub.universe_domain
57
+ end
58
+
59
+ ##
60
+ # The effective endpoint
61
+ #
62
+ # @return [String]
63
+ #
64
+ def endpoint
65
+ @client_stub.endpoint
66
+ end
67
+
68
+ ##
69
+ # The logger used for request/response debug logging.
70
+ #
71
+ # @return [Logger]
72
+ #
73
+ def logger stub: false
74
+ stub ? @client_stub.stub_logger : @client_stub.logger
75
+ end
76
+
77
+ ##
78
+ # Baseline implementation for the list_data_exchanges REST call
79
+ #
80
+ # @param request_pb [::Google::Cloud::Bigquery::DataExchange::V1beta1::ListDataExchangesRequest]
81
+ # A request object representing the call parameters. Required.
82
+ # @param options [::Gapic::CallOptions]
83
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
84
+ #
85
+ # @yield [result, operation] Access the result along with the TransportOperation object
86
+ # @yieldparam result [::Google::Cloud::Bigquery::DataExchange::V1beta1::ListDataExchangesResponse]
87
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
88
+ #
89
+ # @return [::Google::Cloud::Bigquery::DataExchange::V1beta1::ListDataExchangesResponse]
90
+ # A result object deserialized from the server's reply
91
+ def list_data_exchanges request_pb, options = nil
92
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
93
+
94
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_data_exchanges_request request_pb
95
+ query_string_params = if query_string_params.any?
96
+ query_string_params.to_h { |p| p.split "=", 2 }
97
+ else
98
+ {}
99
+ end
100
+
101
+ response = @client_stub.make_http_request(
102
+ verb,
103
+ uri: uri,
104
+ body: body || "",
105
+ params: query_string_params,
106
+ method_name: "list_data_exchanges",
107
+ options: options
108
+ )
109
+ operation = ::Gapic::Rest::TransportOperation.new response
110
+ result = ::Google::Cloud::Bigquery::DataExchange::V1beta1::ListDataExchangesResponse.decode_json response.body, ignore_unknown_fields: true
111
+ catch :response do
112
+ yield result, operation if block_given?
113
+ result
114
+ end
115
+ end
116
+
117
+ ##
118
+ # Baseline implementation for the list_org_data_exchanges REST call
119
+ #
120
+ # @param request_pb [::Google::Cloud::Bigquery::DataExchange::V1beta1::ListOrgDataExchangesRequest]
121
+ # A request object representing the call parameters. Required.
122
+ # @param options [::Gapic::CallOptions]
123
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
124
+ #
125
+ # @yield [result, operation] Access the result along with the TransportOperation object
126
+ # @yieldparam result [::Google::Cloud::Bigquery::DataExchange::V1beta1::ListOrgDataExchangesResponse]
127
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
128
+ #
129
+ # @return [::Google::Cloud::Bigquery::DataExchange::V1beta1::ListOrgDataExchangesResponse]
130
+ # A result object deserialized from the server's reply
131
+ def list_org_data_exchanges request_pb, options = nil
132
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
133
+
134
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_org_data_exchanges_request request_pb
135
+ query_string_params = if query_string_params.any?
136
+ query_string_params.to_h { |p| p.split "=", 2 }
137
+ else
138
+ {}
139
+ end
140
+
141
+ response = @client_stub.make_http_request(
142
+ verb,
143
+ uri: uri,
144
+ body: body || "",
145
+ params: query_string_params,
146
+ method_name: "list_org_data_exchanges",
147
+ options: options
148
+ )
149
+ operation = ::Gapic::Rest::TransportOperation.new response
150
+ result = ::Google::Cloud::Bigquery::DataExchange::V1beta1::ListOrgDataExchangesResponse.decode_json response.body, ignore_unknown_fields: true
151
+ catch :response do
152
+ yield result, operation if block_given?
153
+ result
154
+ end
155
+ end
156
+
157
+ ##
158
+ # Baseline implementation for the get_data_exchange REST call
159
+ #
160
+ # @param request_pb [::Google::Cloud::Bigquery::DataExchange::V1beta1::GetDataExchangeRequest]
161
+ # A request object representing the call parameters. Required.
162
+ # @param options [::Gapic::CallOptions]
163
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
164
+ #
165
+ # @yield [result, operation] Access the result along with the TransportOperation object
166
+ # @yieldparam result [::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange]
167
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
168
+ #
169
+ # @return [::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange]
170
+ # A result object deserialized from the server's reply
171
+ def get_data_exchange request_pb, options = nil
172
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
173
+
174
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_data_exchange_request request_pb
175
+ query_string_params = if query_string_params.any?
176
+ query_string_params.to_h { |p| p.split "=", 2 }
177
+ else
178
+ {}
179
+ end
180
+
181
+ response = @client_stub.make_http_request(
182
+ verb,
183
+ uri: uri,
184
+ body: body || "",
185
+ params: query_string_params,
186
+ method_name: "get_data_exchange",
187
+ options: options
188
+ )
189
+ operation = ::Gapic::Rest::TransportOperation.new response
190
+ result = ::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange.decode_json response.body, ignore_unknown_fields: true
191
+ catch :response do
192
+ yield result, operation if block_given?
193
+ result
194
+ end
195
+ end
196
+
197
+ ##
198
+ # Baseline implementation for the create_data_exchange REST call
199
+ #
200
+ # @param request_pb [::Google::Cloud::Bigquery::DataExchange::V1beta1::CreateDataExchangeRequest]
201
+ # A request object representing the call parameters. Required.
202
+ # @param options [::Gapic::CallOptions]
203
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
204
+ #
205
+ # @yield [result, operation] Access the result along with the TransportOperation object
206
+ # @yieldparam result [::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange]
207
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
208
+ #
209
+ # @return [::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange]
210
+ # A result object deserialized from the server's reply
211
+ def create_data_exchange request_pb, options = nil
212
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
213
+
214
+ verb, uri, query_string_params, body = ServiceStub.transcode_create_data_exchange_request request_pb
215
+ query_string_params = if query_string_params.any?
216
+ query_string_params.to_h { |p| p.split "=", 2 }
217
+ else
218
+ {}
219
+ end
220
+
221
+ response = @client_stub.make_http_request(
222
+ verb,
223
+ uri: uri,
224
+ body: body || "",
225
+ params: query_string_params,
226
+ method_name: "create_data_exchange",
227
+ options: options
228
+ )
229
+ operation = ::Gapic::Rest::TransportOperation.new response
230
+ result = ::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange.decode_json response.body, ignore_unknown_fields: true
231
+ catch :response do
232
+ yield result, operation if block_given?
233
+ result
234
+ end
235
+ end
236
+
237
+ ##
238
+ # Baseline implementation for the update_data_exchange REST call
239
+ #
240
+ # @param request_pb [::Google::Cloud::Bigquery::DataExchange::V1beta1::UpdateDataExchangeRequest]
241
+ # A request object representing the call parameters. Required.
242
+ # @param options [::Gapic::CallOptions]
243
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
244
+ #
245
+ # @yield [result, operation] Access the result along with the TransportOperation object
246
+ # @yieldparam result [::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange]
247
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
248
+ #
249
+ # @return [::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange]
250
+ # A result object deserialized from the server's reply
251
+ def update_data_exchange request_pb, options = nil
252
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
253
+
254
+ verb, uri, query_string_params, body = ServiceStub.transcode_update_data_exchange_request request_pb
255
+ query_string_params = if query_string_params.any?
256
+ query_string_params.to_h { |p| p.split "=", 2 }
257
+ else
258
+ {}
259
+ end
260
+
261
+ response = @client_stub.make_http_request(
262
+ verb,
263
+ uri: uri,
264
+ body: body || "",
265
+ params: query_string_params,
266
+ method_name: "update_data_exchange",
267
+ options: options
268
+ )
269
+ operation = ::Gapic::Rest::TransportOperation.new response
270
+ result = ::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange.decode_json response.body, ignore_unknown_fields: true
271
+ catch :response do
272
+ yield result, operation if block_given?
273
+ result
274
+ end
275
+ end
276
+
277
+ ##
278
+ # Baseline implementation for the delete_data_exchange REST call
279
+ #
280
+ # @param request_pb [::Google::Cloud::Bigquery::DataExchange::V1beta1::DeleteDataExchangeRequest]
281
+ # A request object representing the call parameters. Required.
282
+ # @param options [::Gapic::CallOptions]
283
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
284
+ #
285
+ # @yield [result, operation] Access the result along with the TransportOperation object
286
+ # @yieldparam result [::Google::Protobuf::Empty]
287
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
288
+ #
289
+ # @return [::Google::Protobuf::Empty]
290
+ # A result object deserialized from the server's reply
291
+ def delete_data_exchange request_pb, options = nil
292
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
293
+
294
+ verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_exchange_request request_pb
295
+ query_string_params = if query_string_params.any?
296
+ query_string_params.to_h { |p| p.split "=", 2 }
297
+ else
298
+ {}
299
+ end
300
+
301
+ response = @client_stub.make_http_request(
302
+ verb,
303
+ uri: uri,
304
+ body: body || "",
305
+ params: query_string_params,
306
+ method_name: "delete_data_exchange",
307
+ options: options
308
+ )
309
+ operation = ::Gapic::Rest::TransportOperation.new response
310
+ result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
311
+ catch :response do
312
+ yield result, operation if block_given?
313
+ result
314
+ end
315
+ end
316
+
317
+ ##
318
+ # Baseline implementation for the list_listings REST call
319
+ #
320
+ # @param request_pb [::Google::Cloud::Bigquery::DataExchange::V1beta1::ListListingsRequest]
321
+ # A request object representing the call parameters. Required.
322
+ # @param options [::Gapic::CallOptions]
323
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
324
+ #
325
+ # @yield [result, operation] Access the result along with the TransportOperation object
326
+ # @yieldparam result [::Google::Cloud::Bigquery::DataExchange::V1beta1::ListListingsResponse]
327
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
328
+ #
329
+ # @return [::Google::Cloud::Bigquery::DataExchange::V1beta1::ListListingsResponse]
330
+ # A result object deserialized from the server's reply
331
+ def list_listings request_pb, options = nil
332
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
333
+
334
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_listings_request request_pb
335
+ query_string_params = if query_string_params.any?
336
+ query_string_params.to_h { |p| p.split "=", 2 }
337
+ else
338
+ {}
339
+ end
340
+
341
+ response = @client_stub.make_http_request(
342
+ verb,
343
+ uri: uri,
344
+ body: body || "",
345
+ params: query_string_params,
346
+ method_name: "list_listings",
347
+ options: options
348
+ )
349
+ operation = ::Gapic::Rest::TransportOperation.new response
350
+ result = ::Google::Cloud::Bigquery::DataExchange::V1beta1::ListListingsResponse.decode_json response.body, ignore_unknown_fields: true
351
+ catch :response do
352
+ yield result, operation if block_given?
353
+ result
354
+ end
355
+ end
356
+
357
+ ##
358
+ # Baseline implementation for the get_listing REST call
359
+ #
360
+ # @param request_pb [::Google::Cloud::Bigquery::DataExchange::V1beta1::GetListingRequest]
361
+ # A request object representing the call parameters. Required.
362
+ # @param options [::Gapic::CallOptions]
363
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
364
+ #
365
+ # @yield [result, operation] Access the result along with the TransportOperation object
366
+ # @yieldparam result [::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing]
367
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
368
+ #
369
+ # @return [::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing]
370
+ # A result object deserialized from the server's reply
371
+ def get_listing request_pb, options = nil
372
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
373
+
374
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_listing_request request_pb
375
+ query_string_params = if query_string_params.any?
376
+ query_string_params.to_h { |p| p.split "=", 2 }
377
+ else
378
+ {}
379
+ end
380
+
381
+ response = @client_stub.make_http_request(
382
+ verb,
383
+ uri: uri,
384
+ body: body || "",
385
+ params: query_string_params,
386
+ method_name: "get_listing",
387
+ options: options
388
+ )
389
+ operation = ::Gapic::Rest::TransportOperation.new response
390
+ result = ::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing.decode_json response.body, ignore_unknown_fields: true
391
+ catch :response do
392
+ yield result, operation if block_given?
393
+ result
394
+ end
395
+ end
396
+
397
+ ##
398
+ # Baseline implementation for the create_listing REST call
399
+ #
400
+ # @param request_pb [::Google::Cloud::Bigquery::DataExchange::V1beta1::CreateListingRequest]
401
+ # A request object representing the call parameters. Required.
402
+ # @param options [::Gapic::CallOptions]
403
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
404
+ #
405
+ # @yield [result, operation] Access the result along with the TransportOperation object
406
+ # @yieldparam result [::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing]
407
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
408
+ #
409
+ # @return [::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing]
410
+ # A result object deserialized from the server's reply
411
+ def create_listing request_pb, options = nil
412
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
413
+
414
+ verb, uri, query_string_params, body = ServiceStub.transcode_create_listing_request request_pb
415
+ query_string_params = if query_string_params.any?
416
+ query_string_params.to_h { |p| p.split "=", 2 }
417
+ else
418
+ {}
419
+ end
420
+
421
+ response = @client_stub.make_http_request(
422
+ verb,
423
+ uri: uri,
424
+ body: body || "",
425
+ params: query_string_params,
426
+ method_name: "create_listing",
427
+ options: options
428
+ )
429
+ operation = ::Gapic::Rest::TransportOperation.new response
430
+ result = ::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing.decode_json response.body, ignore_unknown_fields: true
431
+ catch :response do
432
+ yield result, operation if block_given?
433
+ result
434
+ end
435
+ end
436
+
437
+ ##
438
+ # Baseline implementation for the update_listing REST call
439
+ #
440
+ # @param request_pb [::Google::Cloud::Bigquery::DataExchange::V1beta1::UpdateListingRequest]
441
+ # A request object representing the call parameters. Required.
442
+ # @param options [::Gapic::CallOptions]
443
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
444
+ #
445
+ # @yield [result, operation] Access the result along with the TransportOperation object
446
+ # @yieldparam result [::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing]
447
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
448
+ #
449
+ # @return [::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing]
450
+ # A result object deserialized from the server's reply
451
+ def update_listing request_pb, options = nil
452
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
453
+
454
+ verb, uri, query_string_params, body = ServiceStub.transcode_update_listing_request request_pb
455
+ query_string_params = if query_string_params.any?
456
+ query_string_params.to_h { |p| p.split "=", 2 }
457
+ else
458
+ {}
459
+ end
460
+
461
+ response = @client_stub.make_http_request(
462
+ verb,
463
+ uri: uri,
464
+ body: body || "",
465
+ params: query_string_params,
466
+ method_name: "update_listing",
467
+ options: options
468
+ )
469
+ operation = ::Gapic::Rest::TransportOperation.new response
470
+ result = ::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing.decode_json response.body, ignore_unknown_fields: true
471
+ catch :response do
472
+ yield result, operation if block_given?
473
+ result
474
+ end
475
+ end
476
+
477
+ ##
478
+ # Baseline implementation for the delete_listing REST call
479
+ #
480
+ # @param request_pb [::Google::Cloud::Bigquery::DataExchange::V1beta1::DeleteListingRequest]
481
+ # A request object representing the call parameters. Required.
482
+ # @param options [::Gapic::CallOptions]
483
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
484
+ #
485
+ # @yield [result, operation] Access the result along with the TransportOperation object
486
+ # @yieldparam result [::Google::Protobuf::Empty]
487
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
488
+ #
489
+ # @return [::Google::Protobuf::Empty]
490
+ # A result object deserialized from the server's reply
491
+ def delete_listing request_pb, options = nil
492
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
493
+
494
+ verb, uri, query_string_params, body = ServiceStub.transcode_delete_listing_request request_pb
495
+ query_string_params = if query_string_params.any?
496
+ query_string_params.to_h { |p| p.split "=", 2 }
497
+ else
498
+ {}
499
+ end
500
+
501
+ response = @client_stub.make_http_request(
502
+ verb,
503
+ uri: uri,
504
+ body: body || "",
505
+ params: query_string_params,
506
+ method_name: "delete_listing",
507
+ options: options
508
+ )
509
+ operation = ::Gapic::Rest::TransportOperation.new response
510
+ result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
511
+ catch :response do
512
+ yield result, operation if block_given?
513
+ result
514
+ end
515
+ end
516
+
517
+ ##
518
+ # Baseline implementation for the subscribe_listing REST call
519
+ #
520
+ # @param request_pb [::Google::Cloud::Bigquery::DataExchange::V1beta1::SubscribeListingRequest]
521
+ # A request object representing the call parameters. Required.
522
+ # @param options [::Gapic::CallOptions]
523
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
524
+ #
525
+ # @yield [result, operation] Access the result along with the TransportOperation object
526
+ # @yieldparam result [::Google::Cloud::Bigquery::DataExchange::V1beta1::SubscribeListingResponse]
527
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
528
+ #
529
+ # @return [::Google::Cloud::Bigquery::DataExchange::V1beta1::SubscribeListingResponse]
530
+ # A result object deserialized from the server's reply
531
+ def subscribe_listing request_pb, options = nil
532
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
533
+
534
+ verb, uri, query_string_params, body = ServiceStub.transcode_subscribe_listing_request request_pb
535
+ query_string_params = if query_string_params.any?
536
+ query_string_params.to_h { |p| p.split "=", 2 }
537
+ else
538
+ {}
539
+ end
540
+
541
+ response = @client_stub.make_http_request(
542
+ verb,
543
+ uri: uri,
544
+ body: body || "",
545
+ params: query_string_params,
546
+ method_name: "subscribe_listing",
547
+ options: options
548
+ )
549
+ operation = ::Gapic::Rest::TransportOperation.new response
550
+ result = ::Google::Cloud::Bigquery::DataExchange::V1beta1::SubscribeListingResponse.decode_json response.body, ignore_unknown_fields: true
551
+ catch :response do
552
+ yield result, operation if block_given?
553
+ result
554
+ end
555
+ end
556
+
557
+ ##
558
+ # Baseline implementation for the get_iam_policy REST call
559
+ #
560
+ # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest]
561
+ # A request object representing the call parameters. Required.
562
+ # @param options [::Gapic::CallOptions]
563
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
564
+ #
565
+ # @yield [result, operation] Access the result along with the TransportOperation object
566
+ # @yieldparam result [::Google::Iam::V1::Policy]
567
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
568
+ #
569
+ # @return [::Google::Iam::V1::Policy]
570
+ # A result object deserialized from the server's reply
571
+ def get_iam_policy request_pb, options = nil
572
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
573
+
574
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb
575
+ query_string_params = if query_string_params.any?
576
+ query_string_params.to_h { |p| p.split "=", 2 }
577
+ else
578
+ {}
579
+ end
580
+
581
+ response = @client_stub.make_http_request(
582
+ verb,
583
+ uri: uri,
584
+ body: body || "",
585
+ params: query_string_params,
586
+ method_name: "get_iam_policy",
587
+ options: options
588
+ )
589
+ operation = ::Gapic::Rest::TransportOperation.new response
590
+ result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true
591
+ catch :response do
592
+ yield result, operation if block_given?
593
+ result
594
+ end
595
+ end
596
+
597
+ ##
598
+ # Baseline implementation for the set_iam_policy REST call
599
+ #
600
+ # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest]
601
+ # A request object representing the call parameters. Required.
602
+ # @param options [::Gapic::CallOptions]
603
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
604
+ #
605
+ # @yield [result, operation] Access the result along with the TransportOperation object
606
+ # @yieldparam result [::Google::Iam::V1::Policy]
607
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
608
+ #
609
+ # @return [::Google::Iam::V1::Policy]
610
+ # A result object deserialized from the server's reply
611
+ def set_iam_policy request_pb, options = nil
612
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
613
+
614
+ verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb
615
+ query_string_params = if query_string_params.any?
616
+ query_string_params.to_h { |p| p.split "=", 2 }
617
+ else
618
+ {}
619
+ end
620
+
621
+ response = @client_stub.make_http_request(
622
+ verb,
623
+ uri: uri,
624
+ body: body || "",
625
+ params: query_string_params,
626
+ method_name: "set_iam_policy",
627
+ options: options
628
+ )
629
+ operation = ::Gapic::Rest::TransportOperation.new response
630
+ result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true
631
+ catch :response do
632
+ yield result, operation if block_given?
633
+ result
634
+ end
635
+ end
636
+
637
+ ##
638
+ # Baseline implementation for the test_iam_permissions REST call
639
+ #
640
+ # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest]
641
+ # A request object representing the call parameters. Required.
642
+ # @param options [::Gapic::CallOptions]
643
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
644
+ #
645
+ # @yield [result, operation] Access the result along with the TransportOperation object
646
+ # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse]
647
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
648
+ #
649
+ # @return [::Google::Iam::V1::TestIamPermissionsResponse]
650
+ # A result object deserialized from the server's reply
651
+ def test_iam_permissions request_pb, options = nil
652
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
653
+
654
+ verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb
655
+ query_string_params = if query_string_params.any?
656
+ query_string_params.to_h { |p| p.split "=", 2 }
657
+ else
658
+ {}
659
+ end
660
+
661
+ response = @client_stub.make_http_request(
662
+ verb,
663
+ uri: uri,
664
+ body: body || "",
665
+ params: query_string_params,
666
+ method_name: "test_iam_permissions",
667
+ options: options
668
+ )
669
+ operation = ::Gapic::Rest::TransportOperation.new response
670
+ result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true
671
+ catch :response do
672
+ yield result, operation if block_given?
673
+ result
674
+ end
675
+ end
676
+
677
+ ##
678
+ # @private
679
+ #
680
+ # GRPC transcoding helper method for the list_data_exchanges REST call
681
+ #
682
+ # @param request_pb [::Google::Cloud::Bigquery::DataExchange::V1beta1::ListDataExchangesRequest]
683
+ # A request object representing the call parameters. Required.
684
+ # @return [Array(String, [String, nil], Hash{String => String})]
685
+ # Uri, Body, Query string parameters
686
+ def self.transcode_list_data_exchanges_request request_pb
687
+ transcoder = Gapic::Rest::GrpcTranscoder.new
688
+ .with_bindings(
689
+ uri_method: :get,
690
+ uri_template: "/v1beta1/{parent}/dataExchanges",
691
+ matches: [
692
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
693
+ ]
694
+ )
695
+ transcoder.transcode request_pb
696
+ end
697
+
698
+ ##
699
+ # @private
700
+ #
701
+ # GRPC transcoding helper method for the list_org_data_exchanges REST call
702
+ #
703
+ # @param request_pb [::Google::Cloud::Bigquery::DataExchange::V1beta1::ListOrgDataExchangesRequest]
704
+ # A request object representing the call parameters. Required.
705
+ # @return [Array(String, [String, nil], Hash{String => String})]
706
+ # Uri, Body, Query string parameters
707
+ def self.transcode_list_org_data_exchanges_request request_pb
708
+ transcoder = Gapic::Rest::GrpcTranscoder.new
709
+ .with_bindings(
710
+ uri_method: :get,
711
+ uri_template: "/v1beta1/{organization}/dataExchanges",
712
+ matches: [
713
+ ["organization", %r{^organizations/[^/]+/locations/[^/]+/?$}, false]
714
+ ]
715
+ )
716
+ transcoder.transcode request_pb
717
+ end
718
+
719
+ ##
720
+ # @private
721
+ #
722
+ # GRPC transcoding helper method for the get_data_exchange REST call
723
+ #
724
+ # @param request_pb [::Google::Cloud::Bigquery::DataExchange::V1beta1::GetDataExchangeRequest]
725
+ # A request object representing the call parameters. Required.
726
+ # @return [Array(String, [String, nil], Hash{String => String})]
727
+ # Uri, Body, Query string parameters
728
+ def self.transcode_get_data_exchange_request request_pb
729
+ transcoder = Gapic::Rest::GrpcTranscoder.new
730
+ .with_bindings(
731
+ uri_method: :get,
732
+ uri_template: "/v1beta1/{name}",
733
+ matches: [
734
+ ["name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false]
735
+ ]
736
+ )
737
+ transcoder.transcode request_pb
738
+ end
739
+
740
+ ##
741
+ # @private
742
+ #
743
+ # GRPC transcoding helper method for the create_data_exchange REST call
744
+ #
745
+ # @param request_pb [::Google::Cloud::Bigquery::DataExchange::V1beta1::CreateDataExchangeRequest]
746
+ # A request object representing the call parameters. Required.
747
+ # @return [Array(String, [String, nil], Hash{String => String})]
748
+ # Uri, Body, Query string parameters
749
+ def self.transcode_create_data_exchange_request request_pb
750
+ transcoder = Gapic::Rest::GrpcTranscoder.new
751
+ .with_bindings(
752
+ uri_method: :post,
753
+ uri_template: "/v1beta1/{parent}/dataExchanges",
754
+ body: "data_exchange",
755
+ matches: [
756
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
757
+ ]
758
+ )
759
+ transcoder.transcode request_pb
760
+ end
761
+
762
+ ##
763
+ # @private
764
+ #
765
+ # GRPC transcoding helper method for the update_data_exchange REST call
766
+ #
767
+ # @param request_pb [::Google::Cloud::Bigquery::DataExchange::V1beta1::UpdateDataExchangeRequest]
768
+ # A request object representing the call parameters. Required.
769
+ # @return [Array(String, [String, nil], Hash{String => String})]
770
+ # Uri, Body, Query string parameters
771
+ def self.transcode_update_data_exchange_request request_pb
772
+ transcoder = Gapic::Rest::GrpcTranscoder.new
773
+ .with_bindings(
774
+ uri_method: :patch,
775
+ uri_template: "/v1beta1/{data_exchange.name}",
776
+ body: "data_exchange",
777
+ matches: [
778
+ ["data_exchange.name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false]
779
+ ]
780
+ )
781
+ transcoder.transcode request_pb
782
+ end
783
+
784
+ ##
785
+ # @private
786
+ #
787
+ # GRPC transcoding helper method for the delete_data_exchange REST call
788
+ #
789
+ # @param request_pb [::Google::Cloud::Bigquery::DataExchange::V1beta1::DeleteDataExchangeRequest]
790
+ # A request object representing the call parameters. Required.
791
+ # @return [Array(String, [String, nil], Hash{String => String})]
792
+ # Uri, Body, Query string parameters
793
+ def self.transcode_delete_data_exchange_request request_pb
794
+ transcoder = Gapic::Rest::GrpcTranscoder.new
795
+ .with_bindings(
796
+ uri_method: :delete,
797
+ uri_template: "/v1beta1/{name}",
798
+ matches: [
799
+ ["name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false]
800
+ ]
801
+ )
802
+ transcoder.transcode request_pb
803
+ end
804
+
805
+ ##
806
+ # @private
807
+ #
808
+ # GRPC transcoding helper method for the list_listings REST call
809
+ #
810
+ # @param request_pb [::Google::Cloud::Bigquery::DataExchange::V1beta1::ListListingsRequest]
811
+ # A request object representing the call parameters. Required.
812
+ # @return [Array(String, [String, nil], Hash{String => String})]
813
+ # Uri, Body, Query string parameters
814
+ def self.transcode_list_listings_request request_pb
815
+ transcoder = Gapic::Rest::GrpcTranscoder.new
816
+ .with_bindings(
817
+ uri_method: :get,
818
+ uri_template: "/v1beta1/{parent}/listings",
819
+ matches: [
820
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false]
821
+ ]
822
+ )
823
+ transcoder.transcode request_pb
824
+ end
825
+
826
+ ##
827
+ # @private
828
+ #
829
+ # GRPC transcoding helper method for the get_listing REST call
830
+ #
831
+ # @param request_pb [::Google::Cloud::Bigquery::DataExchange::V1beta1::GetListingRequest]
832
+ # A request object representing the call parameters. Required.
833
+ # @return [Array(String, [String, nil], Hash{String => String})]
834
+ # Uri, Body, Query string parameters
835
+ def self.transcode_get_listing_request request_pb
836
+ transcoder = Gapic::Rest::GrpcTranscoder.new
837
+ .with_bindings(
838
+ uri_method: :get,
839
+ uri_template: "/v1beta1/{name}",
840
+ matches: [
841
+ ["name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/listings/[^/]+/?$}, false]
842
+ ]
843
+ )
844
+ transcoder.transcode request_pb
845
+ end
846
+
847
+ ##
848
+ # @private
849
+ #
850
+ # GRPC transcoding helper method for the create_listing REST call
851
+ #
852
+ # @param request_pb [::Google::Cloud::Bigquery::DataExchange::V1beta1::CreateListingRequest]
853
+ # A request object representing the call parameters. Required.
854
+ # @return [Array(String, [String, nil], Hash{String => String})]
855
+ # Uri, Body, Query string parameters
856
+ def self.transcode_create_listing_request request_pb
857
+ transcoder = Gapic::Rest::GrpcTranscoder.new
858
+ .with_bindings(
859
+ uri_method: :post,
860
+ uri_template: "/v1beta1/{parent}/listings",
861
+ body: "listing",
862
+ matches: [
863
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false]
864
+ ]
865
+ )
866
+ transcoder.transcode request_pb
867
+ end
868
+
869
+ ##
870
+ # @private
871
+ #
872
+ # GRPC transcoding helper method for the update_listing REST call
873
+ #
874
+ # @param request_pb [::Google::Cloud::Bigquery::DataExchange::V1beta1::UpdateListingRequest]
875
+ # A request object representing the call parameters. Required.
876
+ # @return [Array(String, [String, nil], Hash{String => String})]
877
+ # Uri, Body, Query string parameters
878
+ def self.transcode_update_listing_request request_pb
879
+ transcoder = Gapic::Rest::GrpcTranscoder.new
880
+ .with_bindings(
881
+ uri_method: :patch,
882
+ uri_template: "/v1beta1/{listing.name}",
883
+ body: "listing",
884
+ matches: [
885
+ ["listing.name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/listings/[^/]+/?$}, false]
886
+ ]
887
+ )
888
+ transcoder.transcode request_pb
889
+ end
890
+
891
+ ##
892
+ # @private
893
+ #
894
+ # GRPC transcoding helper method for the delete_listing REST call
895
+ #
896
+ # @param request_pb [::Google::Cloud::Bigquery::DataExchange::V1beta1::DeleteListingRequest]
897
+ # A request object representing the call parameters. Required.
898
+ # @return [Array(String, [String, nil], Hash{String => String})]
899
+ # Uri, Body, Query string parameters
900
+ def self.transcode_delete_listing_request request_pb
901
+ transcoder = Gapic::Rest::GrpcTranscoder.new
902
+ .with_bindings(
903
+ uri_method: :delete,
904
+ uri_template: "/v1beta1/{name}",
905
+ matches: [
906
+ ["name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/listings/[^/]+/?$}, false]
907
+ ]
908
+ )
909
+ transcoder.transcode request_pb
910
+ end
911
+
912
+ ##
913
+ # @private
914
+ #
915
+ # GRPC transcoding helper method for the subscribe_listing REST call
916
+ #
917
+ # @param request_pb [::Google::Cloud::Bigquery::DataExchange::V1beta1::SubscribeListingRequest]
918
+ # A request object representing the call parameters. Required.
919
+ # @return [Array(String, [String, nil], Hash{String => String})]
920
+ # Uri, Body, Query string parameters
921
+ def self.transcode_subscribe_listing_request request_pb
922
+ transcoder = Gapic::Rest::GrpcTranscoder.new
923
+ .with_bindings(
924
+ uri_method: :post,
925
+ uri_template: "/v1beta1/{name}:subscribe",
926
+ body: "*",
927
+ matches: [
928
+ ["name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/listings/[^/]+/?$}, false]
929
+ ]
930
+ )
931
+ transcoder.transcode request_pb
932
+ end
933
+
934
+ ##
935
+ # @private
936
+ #
937
+ # GRPC transcoding helper method for the get_iam_policy REST call
938
+ #
939
+ # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest]
940
+ # A request object representing the call parameters. Required.
941
+ # @return [Array(String, [String, nil], Hash{String => String})]
942
+ # Uri, Body, Query string parameters
943
+ def self.transcode_get_iam_policy_request request_pb
944
+ transcoder = Gapic::Rest::GrpcTranscoder.new
945
+ .with_bindings(
946
+ uri_method: :post,
947
+ uri_template: "/v1beta1/{resource}:getIamPolicy",
948
+ body: "*",
949
+ matches: [
950
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false]
951
+ ]
952
+ )
953
+ .with_bindings(
954
+ uri_method: :post,
955
+ uri_template: "/v1beta1/{resource}:getIamPolicy",
956
+ body: "*",
957
+ matches: [
958
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/listings/[^/]+/?$}, false]
959
+ ]
960
+ )
961
+ transcoder.transcode request_pb
962
+ end
963
+
964
+ ##
965
+ # @private
966
+ #
967
+ # GRPC transcoding helper method for the set_iam_policy REST call
968
+ #
969
+ # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest]
970
+ # A request object representing the call parameters. Required.
971
+ # @return [Array(String, [String, nil], Hash{String => String})]
972
+ # Uri, Body, Query string parameters
973
+ def self.transcode_set_iam_policy_request request_pb
974
+ transcoder = Gapic::Rest::GrpcTranscoder.new
975
+ .with_bindings(
976
+ uri_method: :post,
977
+ uri_template: "/v1beta1/{resource}:setIamPolicy",
978
+ body: "*",
979
+ matches: [
980
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false]
981
+ ]
982
+ )
983
+ .with_bindings(
984
+ uri_method: :post,
985
+ uri_template: "/v1beta1/{resource}:setIamPolicy",
986
+ body: "*",
987
+ matches: [
988
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/listings/[^/]+/?$}, false]
989
+ ]
990
+ )
991
+ transcoder.transcode request_pb
992
+ end
993
+
994
+ ##
995
+ # @private
996
+ #
997
+ # GRPC transcoding helper method for the test_iam_permissions REST call
998
+ #
999
+ # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest]
1000
+ # A request object representing the call parameters. Required.
1001
+ # @return [Array(String, [String, nil], Hash{String => String})]
1002
+ # Uri, Body, Query string parameters
1003
+ def self.transcode_test_iam_permissions_request request_pb
1004
+ transcoder = Gapic::Rest::GrpcTranscoder.new
1005
+ .with_bindings(
1006
+ uri_method: :post,
1007
+ uri_template: "/v1beta1/{resource}:testIamPermissions",
1008
+ body: "*",
1009
+ matches: [
1010
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false]
1011
+ ]
1012
+ )
1013
+ .with_bindings(
1014
+ uri_method: :post,
1015
+ uri_template: "/v1beta1/{resource}:testIamPermissions",
1016
+ body: "*",
1017
+ matches: [
1018
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/listings/[^/]+/?$}, false]
1019
+ ]
1020
+ )
1021
+ transcoder.transcode request_pb
1022
+ end
1023
+ end
1024
+ end
1025
+ end
1026
+ end
1027
+ end
1028
+ end
1029
+ end
1030
+ end