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,2336 @@
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/errors"
20
+ require "google/cloud/bigquery/analyticshub/v1/analyticshub_pb"
21
+ require "google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/rest/service_stub"
22
+
23
+ module Google
24
+ module Cloud
25
+ module Bigquery
26
+ module AnalyticsHub
27
+ module V1
28
+ module AnalyticsHubService
29
+ module Rest
30
+ ##
31
+ # REST client for the AnalyticsHubService service.
32
+ #
33
+ # The `AnalyticsHubService` API facilitates data sharing within and across
34
+ # organizations. It allows data providers to publish listings that reference
35
+ # shared datasets. With Analytics Hub, users can discover and search for
36
+ # listings that they have access to. Subscribers can view and subscribe to
37
+ # listings. When you subscribe to a listing, Analytics Hub creates a linked
38
+ # dataset in your project.
39
+ #
40
+ class Client
41
+ include Paths
42
+
43
+ # @private
44
+ attr_reader :analytics_hub_service_stub
45
+
46
+ ##
47
+ # Configure the AnalyticsHubService Client class.
48
+ #
49
+ # See {::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client::Configuration}
50
+ # for a description of the configuration fields.
51
+ #
52
+ # @example
53
+ #
54
+ # # Modify the configuration for all AnalyticsHubService clients
55
+ # ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.configure do |config|
56
+ # config.timeout = 10.0
57
+ # end
58
+ #
59
+ # @yield [config] Configure the Client client.
60
+ # @yieldparam config [Client::Configuration]
61
+ #
62
+ # @return [Client::Configuration]
63
+ #
64
+ def self.configure
65
+ @configure ||= begin
66
+ namespace = ["Google", "Cloud", "Bigquery", "AnalyticsHub", "V1"]
67
+ parent_config = while namespace.any?
68
+ parent_name = namespace.join "::"
69
+ parent_const = const_get parent_name
70
+ break parent_const.configure if parent_const.respond_to? :configure
71
+ namespace.pop
72
+ end
73
+ default_config = Client::Configuration.new parent_config
74
+
75
+ default_config.timeout = 60.0
76
+ default_config.retry_policy = {
77
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
78
+ }
79
+
80
+ default_config
81
+ end
82
+ yield @configure if block_given?
83
+ @configure
84
+ end
85
+
86
+ ##
87
+ # Configure the AnalyticsHubService Client instance.
88
+ #
89
+ # The configuration is set to the derived mode, meaning that values can be changed,
90
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
91
+ # should be made on {Client.configure}.
92
+ #
93
+ # See {::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client::Configuration}
94
+ # for a description of the configuration fields.
95
+ #
96
+ # @yield [config] Configure the Client client.
97
+ # @yieldparam config [Client::Configuration]
98
+ #
99
+ # @return [Client::Configuration]
100
+ #
101
+ def configure
102
+ yield @config if block_given?
103
+ @config
104
+ end
105
+
106
+ ##
107
+ # Create a new AnalyticsHubService REST client object.
108
+ #
109
+ # @example
110
+ #
111
+ # # Create a client using the default configuration
112
+ # client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new
113
+ #
114
+ # # Create a client using a custom configuration
115
+ # client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config|
116
+ # config.timeout = 10.0
117
+ # end
118
+ #
119
+ # @yield [config] Configure the AnalyticsHubService client.
120
+ # @yieldparam config [Client::Configuration]
121
+ #
122
+ def initialize
123
+ # Create the configuration object
124
+ @config = Configuration.new Client.configure
125
+
126
+ # Yield the configuration if needed
127
+ yield @config if block_given?
128
+
129
+ # Create credentials
130
+ credentials = @config.credentials
131
+ # Use self-signed JWT if the endpoint is unchanged from default,
132
+ # but only if the default endpoint does not have a region prefix.
133
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
134
+ !@config.endpoint.split(".").first.include?("-")
135
+ credentials ||= Credentials.default scope: @config.scope,
136
+ enable_self_signed_jwt: enable_self_signed_jwt
137
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
138
+ credentials = Credentials.new credentials, scope: @config.scope
139
+ end
140
+
141
+ @quota_project_id = @config.quota_project
142
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
143
+
144
+ @operations_client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Operations.new do |config|
145
+ config.credentials = credentials
146
+ config.quota_project = @quota_project_id
147
+ config.endpoint = @config.endpoint
148
+ end
149
+
150
+ @analytics_hub_service_stub = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
151
+ end
152
+
153
+ ##
154
+ # Get the associated client for long-running operations.
155
+ #
156
+ # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Operations]
157
+ #
158
+ attr_reader :operations_client
159
+
160
+ # Service calls
161
+
162
+ ##
163
+ # Lists all data exchanges in a given project and location.
164
+ #
165
+ # @overload list_data_exchanges(request, options = nil)
166
+ # Pass arguments to `list_data_exchanges` via a request object, either of type
167
+ # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest} or an equivalent Hash.
168
+ #
169
+ # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest, ::Hash]
170
+ # A request object representing the call parameters. Required. To specify no
171
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
172
+ # @param options [::Gapic::CallOptions, ::Hash]
173
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
174
+ #
175
+ # @overload list_data_exchanges(parent: nil, page_size: nil, page_token: nil)
176
+ # Pass arguments to `list_data_exchanges` via keyword arguments. Note that at
177
+ # least one keyword argument is required. To specify no parameters, or to keep all
178
+ # the default parameter values, pass an empty Hash as a request object (see above).
179
+ #
180
+ # @param parent [::String]
181
+ # Required. The parent resource path of the data exchanges.
182
+ # e.g. `projects/myproject/locations/US`.
183
+ # @param page_size [::Integer]
184
+ # The maximum number of results to return in a single response page. Leverage
185
+ # the page tokens to iterate through the entire collection.
186
+ # @param page_token [::String]
187
+ # Page token, returned by a previous call, to request the next page of
188
+ # results.
189
+ # @yield [result, operation] Access the result along with the TransportOperation object
190
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange>]
191
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
192
+ #
193
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange>]
194
+ #
195
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
196
+ #
197
+ # @example Basic example
198
+ # require "google/cloud/bigquery/analytics_hub/v1"
199
+ #
200
+ # # Create a client object. The client can be reused for multiple calls.
201
+ # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new
202
+ #
203
+ # # Create a request. To set request fields, pass in keyword arguments.
204
+ # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest.new
205
+ #
206
+ # # Call the list_data_exchanges method.
207
+ # result = client.list_data_exchanges request
208
+ #
209
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
210
+ # # over elements, and API calls will be issued to fetch pages as needed.
211
+ # result.each do |item|
212
+ # # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange.
213
+ # p item
214
+ # end
215
+ #
216
+ def list_data_exchanges request, options = nil
217
+ raise ::ArgumentError, "request must be provided" if request.nil?
218
+
219
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest
220
+
221
+ # Converts hash and nil to an options object
222
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
223
+
224
+ # Customize the options with defaults
225
+ call_metadata = @config.rpcs.list_data_exchanges.metadata.to_h
226
+
227
+ # Set x-goog-api-client and x-goog-user-project headers
228
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
229
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
230
+ gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION,
231
+ transports_version_send: [:rest]
232
+
233
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
234
+
235
+ options.apply_defaults timeout: @config.rpcs.list_data_exchanges.timeout,
236
+ metadata: call_metadata,
237
+ retry_policy: @config.rpcs.list_data_exchanges.retry_policy
238
+
239
+ options.apply_defaults timeout: @config.timeout,
240
+ metadata: @config.metadata,
241
+ retry_policy: @config.retry_policy
242
+
243
+ @analytics_hub_service_stub.list_data_exchanges request, options do |result, operation|
244
+ result = ::Gapic::Rest::PagedEnumerable.new @analytics_hub_service_stub, :list_data_exchanges, "data_exchanges", request, result, options
245
+ yield result, operation if block_given?
246
+ return result
247
+ end
248
+ rescue ::Gapic::Rest::Error => e
249
+ raise ::Google::Cloud::Error.from_error(e)
250
+ end
251
+
252
+ ##
253
+ # Lists all data exchanges from projects in a given organization and
254
+ # location.
255
+ #
256
+ # @overload list_org_data_exchanges(request, options = nil)
257
+ # Pass arguments to `list_org_data_exchanges` via a request object, either of type
258
+ # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest} or an equivalent Hash.
259
+ #
260
+ # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest, ::Hash]
261
+ # A request object representing the call parameters. Required. To specify no
262
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
263
+ # @param options [::Gapic::CallOptions, ::Hash]
264
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
265
+ #
266
+ # @overload list_org_data_exchanges(organization: nil, page_size: nil, page_token: nil)
267
+ # Pass arguments to `list_org_data_exchanges` via keyword arguments. Note that at
268
+ # least one keyword argument is required. To specify no parameters, or to keep all
269
+ # the default parameter values, pass an empty Hash as a request object (see above).
270
+ #
271
+ # @param organization [::String]
272
+ # Required. The organization resource path of the projects containing
273
+ # DataExchanges. e.g. `organizations/myorg/locations/US`.
274
+ # @param page_size [::Integer]
275
+ # The maximum number of results to return in a single response page. Leverage
276
+ # the page tokens to iterate through the entire collection.
277
+ # @param page_token [::String]
278
+ # Page token, returned by a previous call, to request the next page of
279
+ # results.
280
+ # @yield [result, operation] Access the result along with the TransportOperation object
281
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange>]
282
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
283
+ #
284
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange>]
285
+ #
286
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
287
+ #
288
+ # @example Basic example
289
+ # require "google/cloud/bigquery/analytics_hub/v1"
290
+ #
291
+ # # Create a client object. The client can be reused for multiple calls.
292
+ # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new
293
+ #
294
+ # # Create a request. To set request fields, pass in keyword arguments.
295
+ # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest.new
296
+ #
297
+ # # Call the list_org_data_exchanges method.
298
+ # result = client.list_org_data_exchanges request
299
+ #
300
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
301
+ # # over elements, and API calls will be issued to fetch pages as needed.
302
+ # result.each do |item|
303
+ # # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange.
304
+ # p item
305
+ # end
306
+ #
307
+ def list_org_data_exchanges request, options = nil
308
+ raise ::ArgumentError, "request must be provided" if request.nil?
309
+
310
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest
311
+
312
+ # Converts hash and nil to an options object
313
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
314
+
315
+ # Customize the options with defaults
316
+ call_metadata = @config.rpcs.list_org_data_exchanges.metadata.to_h
317
+
318
+ # Set x-goog-api-client and x-goog-user-project headers
319
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
320
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
321
+ gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION,
322
+ transports_version_send: [:rest]
323
+
324
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
325
+
326
+ options.apply_defaults timeout: @config.rpcs.list_org_data_exchanges.timeout,
327
+ metadata: call_metadata,
328
+ retry_policy: @config.rpcs.list_org_data_exchanges.retry_policy
329
+
330
+ options.apply_defaults timeout: @config.timeout,
331
+ metadata: @config.metadata,
332
+ retry_policy: @config.retry_policy
333
+
334
+ @analytics_hub_service_stub.list_org_data_exchanges request, options do |result, operation|
335
+ result = ::Gapic::Rest::PagedEnumerable.new @analytics_hub_service_stub, :list_org_data_exchanges, "data_exchanges", request, result, options
336
+ yield result, operation if block_given?
337
+ return result
338
+ end
339
+ rescue ::Gapic::Rest::Error => e
340
+ raise ::Google::Cloud::Error.from_error(e)
341
+ end
342
+
343
+ ##
344
+ # Gets the details of a data exchange.
345
+ #
346
+ # @overload get_data_exchange(request, options = nil)
347
+ # Pass arguments to `get_data_exchange` via a request object, either of type
348
+ # {::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest} or an equivalent Hash.
349
+ #
350
+ # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest, ::Hash]
351
+ # A request object representing the call parameters. Required. To specify no
352
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
353
+ # @param options [::Gapic::CallOptions, ::Hash]
354
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
355
+ #
356
+ # @overload get_data_exchange(name: nil)
357
+ # Pass arguments to `get_data_exchange` via keyword arguments. Note that at
358
+ # least one keyword argument is required. To specify no parameters, or to keep all
359
+ # the default parameter values, pass an empty Hash as a request object (see above).
360
+ #
361
+ # @param name [::String]
362
+ # Required. The resource name of the data exchange.
363
+ # e.g. `projects/myproject/locations/US/dataExchanges/123`.
364
+ # @yield [result, operation] Access the result along with the TransportOperation object
365
+ # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange]
366
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
367
+ #
368
+ # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange]
369
+ #
370
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
371
+ #
372
+ # @example Basic example
373
+ # require "google/cloud/bigquery/analytics_hub/v1"
374
+ #
375
+ # # Create a client object. The client can be reused for multiple calls.
376
+ # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new
377
+ #
378
+ # # Create a request. To set request fields, pass in keyword arguments.
379
+ # request = Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest.new
380
+ #
381
+ # # Call the get_data_exchange method.
382
+ # result = client.get_data_exchange request
383
+ #
384
+ # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange.
385
+ # p result
386
+ #
387
+ def get_data_exchange request, options = nil
388
+ raise ::ArgumentError, "request must be provided" if request.nil?
389
+
390
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest
391
+
392
+ # Converts hash and nil to an options object
393
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
394
+
395
+ # Customize the options with defaults
396
+ call_metadata = @config.rpcs.get_data_exchange.metadata.to_h
397
+
398
+ # Set x-goog-api-client and x-goog-user-project headers
399
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
400
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
401
+ gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION,
402
+ transports_version_send: [:rest]
403
+
404
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
405
+
406
+ options.apply_defaults timeout: @config.rpcs.get_data_exchange.timeout,
407
+ metadata: call_metadata,
408
+ retry_policy: @config.rpcs.get_data_exchange.retry_policy
409
+
410
+ options.apply_defaults timeout: @config.timeout,
411
+ metadata: @config.metadata,
412
+ retry_policy: @config.retry_policy
413
+
414
+ @analytics_hub_service_stub.get_data_exchange request, options do |result, operation|
415
+ yield result, operation if block_given?
416
+ return result
417
+ end
418
+ rescue ::Gapic::Rest::Error => e
419
+ raise ::Google::Cloud::Error.from_error(e)
420
+ end
421
+
422
+ ##
423
+ # Creates a new data exchange.
424
+ #
425
+ # @overload create_data_exchange(request, options = nil)
426
+ # Pass arguments to `create_data_exchange` via a request object, either of type
427
+ # {::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest} or an equivalent Hash.
428
+ #
429
+ # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest, ::Hash]
430
+ # A request object representing the call parameters. Required. To specify no
431
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
432
+ # @param options [::Gapic::CallOptions, ::Hash]
433
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
434
+ #
435
+ # @overload create_data_exchange(parent: nil, data_exchange_id: nil, data_exchange: nil)
436
+ # Pass arguments to `create_data_exchange` via keyword arguments. Note that at
437
+ # least one keyword argument is required. To specify no parameters, or to keep all
438
+ # the default parameter values, pass an empty Hash as a request object (see above).
439
+ #
440
+ # @param parent [::String]
441
+ # Required. The parent resource path of the data exchange.
442
+ # e.g. `projects/myproject/locations/US`.
443
+ # @param data_exchange_id [::String]
444
+ # Required. The ID of the data exchange.
445
+ # Must contain only Unicode letters, numbers (0-9), underscores (_).
446
+ # Should not use characters that require URL-escaping, or characters
447
+ # outside of ASCII, spaces.
448
+ # Max length: 100 bytes.
449
+ # @param data_exchange [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange, ::Hash]
450
+ # Required. The data exchange to create.
451
+ # @yield [result, operation] Access the result along with the TransportOperation object
452
+ # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange]
453
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
454
+ #
455
+ # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange]
456
+ #
457
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
458
+ #
459
+ # @example Basic example
460
+ # require "google/cloud/bigquery/analytics_hub/v1"
461
+ #
462
+ # # Create a client object. The client can be reused for multiple calls.
463
+ # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new
464
+ #
465
+ # # Create a request. To set request fields, pass in keyword arguments.
466
+ # request = Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest.new
467
+ #
468
+ # # Call the create_data_exchange method.
469
+ # result = client.create_data_exchange request
470
+ #
471
+ # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange.
472
+ # p result
473
+ #
474
+ def create_data_exchange request, options = nil
475
+ raise ::ArgumentError, "request must be provided" if request.nil?
476
+
477
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest
478
+
479
+ # Converts hash and nil to an options object
480
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
481
+
482
+ # Customize the options with defaults
483
+ call_metadata = @config.rpcs.create_data_exchange.metadata.to_h
484
+
485
+ # Set x-goog-api-client and x-goog-user-project headers
486
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
487
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
488
+ gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION,
489
+ transports_version_send: [:rest]
490
+
491
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
492
+
493
+ options.apply_defaults timeout: @config.rpcs.create_data_exchange.timeout,
494
+ metadata: call_metadata,
495
+ retry_policy: @config.rpcs.create_data_exchange.retry_policy
496
+
497
+ options.apply_defaults timeout: @config.timeout,
498
+ metadata: @config.metadata,
499
+ retry_policy: @config.retry_policy
500
+
501
+ @analytics_hub_service_stub.create_data_exchange request, options do |result, operation|
502
+ yield result, operation if block_given?
503
+ return result
504
+ end
505
+ rescue ::Gapic::Rest::Error => e
506
+ raise ::Google::Cloud::Error.from_error(e)
507
+ end
508
+
509
+ ##
510
+ # Updates an existing data exchange.
511
+ #
512
+ # @overload update_data_exchange(request, options = nil)
513
+ # Pass arguments to `update_data_exchange` via a request object, either of type
514
+ # {::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest} or an equivalent Hash.
515
+ #
516
+ # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest, ::Hash]
517
+ # A request object representing the call parameters. Required. To specify no
518
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
519
+ # @param options [::Gapic::CallOptions, ::Hash]
520
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
521
+ #
522
+ # @overload update_data_exchange(update_mask: nil, data_exchange: nil)
523
+ # Pass arguments to `update_data_exchange` via keyword arguments. Note that at
524
+ # least one keyword argument is required. To specify no parameters, or to keep all
525
+ # the default parameter values, pass an empty Hash as a request object (see above).
526
+ #
527
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
528
+ # Required. Field mask specifies the fields to update in the data exchange
529
+ # resource. The fields specified in the
530
+ # `updateMask` are relative to the resource and are not a full request.
531
+ # @param data_exchange [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange, ::Hash]
532
+ # Required. The data exchange to update.
533
+ # @yield [result, operation] Access the result along with the TransportOperation object
534
+ # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange]
535
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
536
+ #
537
+ # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange]
538
+ #
539
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
540
+ #
541
+ # @example Basic example
542
+ # require "google/cloud/bigquery/analytics_hub/v1"
543
+ #
544
+ # # Create a client object. The client can be reused for multiple calls.
545
+ # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new
546
+ #
547
+ # # Create a request. To set request fields, pass in keyword arguments.
548
+ # request = Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest.new
549
+ #
550
+ # # Call the update_data_exchange method.
551
+ # result = client.update_data_exchange request
552
+ #
553
+ # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange.
554
+ # p result
555
+ #
556
+ def update_data_exchange request, options = nil
557
+ raise ::ArgumentError, "request must be provided" if request.nil?
558
+
559
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest
560
+
561
+ # Converts hash and nil to an options object
562
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
563
+
564
+ # Customize the options with defaults
565
+ call_metadata = @config.rpcs.update_data_exchange.metadata.to_h
566
+
567
+ # Set x-goog-api-client and x-goog-user-project headers
568
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
569
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
570
+ gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION,
571
+ transports_version_send: [:rest]
572
+
573
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
574
+
575
+ options.apply_defaults timeout: @config.rpcs.update_data_exchange.timeout,
576
+ metadata: call_metadata,
577
+ retry_policy: @config.rpcs.update_data_exchange.retry_policy
578
+
579
+ options.apply_defaults timeout: @config.timeout,
580
+ metadata: @config.metadata,
581
+ retry_policy: @config.retry_policy
582
+
583
+ @analytics_hub_service_stub.update_data_exchange request, options do |result, operation|
584
+ yield result, operation if block_given?
585
+ return result
586
+ end
587
+ rescue ::Gapic::Rest::Error => e
588
+ raise ::Google::Cloud::Error.from_error(e)
589
+ end
590
+
591
+ ##
592
+ # Deletes an existing data exchange.
593
+ #
594
+ # @overload delete_data_exchange(request, options = nil)
595
+ # Pass arguments to `delete_data_exchange` via a request object, either of type
596
+ # {::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest} or an equivalent Hash.
597
+ #
598
+ # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest, ::Hash]
599
+ # A request object representing the call parameters. Required. To specify no
600
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
601
+ # @param options [::Gapic::CallOptions, ::Hash]
602
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
603
+ #
604
+ # @overload delete_data_exchange(name: nil)
605
+ # Pass arguments to `delete_data_exchange` via keyword arguments. Note that at
606
+ # least one keyword argument is required. To specify no parameters, or to keep all
607
+ # the default parameter values, pass an empty Hash as a request object (see above).
608
+ #
609
+ # @param name [::String]
610
+ # Required. The full name of the data exchange resource that you want to
611
+ # delete. For example, `projects/myproject/locations/US/dataExchanges/123`.
612
+ # @yield [result, operation] Access the result along with the TransportOperation object
613
+ # @yieldparam result [::Google::Protobuf::Empty]
614
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
615
+ #
616
+ # @return [::Google::Protobuf::Empty]
617
+ #
618
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
619
+ #
620
+ # @example Basic example
621
+ # require "google/cloud/bigquery/analytics_hub/v1"
622
+ #
623
+ # # Create a client object. The client can be reused for multiple calls.
624
+ # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new
625
+ #
626
+ # # Create a request. To set request fields, pass in keyword arguments.
627
+ # request = Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest.new
628
+ #
629
+ # # Call the delete_data_exchange method.
630
+ # result = client.delete_data_exchange request
631
+ #
632
+ # # The returned object is of type Google::Protobuf::Empty.
633
+ # p result
634
+ #
635
+ def delete_data_exchange request, options = nil
636
+ raise ::ArgumentError, "request must be provided" if request.nil?
637
+
638
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest
639
+
640
+ # Converts hash and nil to an options object
641
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
642
+
643
+ # Customize the options with defaults
644
+ call_metadata = @config.rpcs.delete_data_exchange.metadata.to_h
645
+
646
+ # Set x-goog-api-client and x-goog-user-project headers
647
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
648
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
649
+ gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION,
650
+ transports_version_send: [:rest]
651
+
652
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
653
+
654
+ options.apply_defaults timeout: @config.rpcs.delete_data_exchange.timeout,
655
+ metadata: call_metadata,
656
+ retry_policy: @config.rpcs.delete_data_exchange.retry_policy
657
+
658
+ options.apply_defaults timeout: @config.timeout,
659
+ metadata: @config.metadata,
660
+ retry_policy: @config.retry_policy
661
+
662
+ @analytics_hub_service_stub.delete_data_exchange request, options do |result, operation|
663
+ yield result, operation if block_given?
664
+ return result
665
+ end
666
+ rescue ::Gapic::Rest::Error => e
667
+ raise ::Google::Cloud::Error.from_error(e)
668
+ end
669
+
670
+ ##
671
+ # Lists all listings in a given project and location.
672
+ #
673
+ # @overload list_listings(request, options = nil)
674
+ # Pass arguments to `list_listings` via a request object, either of type
675
+ # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest} or an equivalent Hash.
676
+ #
677
+ # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest, ::Hash]
678
+ # A request object representing the call parameters. Required. To specify no
679
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
680
+ # @param options [::Gapic::CallOptions, ::Hash]
681
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
682
+ #
683
+ # @overload list_listings(parent: nil, page_size: nil, page_token: nil)
684
+ # Pass arguments to `list_listings` via keyword arguments. Note that at
685
+ # least one keyword argument is required. To specify no parameters, or to keep all
686
+ # the default parameter values, pass an empty Hash as a request object (see above).
687
+ #
688
+ # @param parent [::String]
689
+ # Required. The parent resource path of the listing.
690
+ # e.g. `projects/myproject/locations/US/dataExchanges/123`.
691
+ # @param page_size [::Integer]
692
+ # The maximum number of results to return in a single response page. Leverage
693
+ # the page tokens to iterate through the entire collection.
694
+ # @param page_token [::String]
695
+ # Page token, returned by a previous call, to request the next page of
696
+ # results.
697
+ # @yield [result, operation] Access the result along with the TransportOperation object
698
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing>]
699
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
700
+ #
701
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing>]
702
+ #
703
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
704
+ #
705
+ # @example Basic example
706
+ # require "google/cloud/bigquery/analytics_hub/v1"
707
+ #
708
+ # # Create a client object. The client can be reused for multiple calls.
709
+ # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new
710
+ #
711
+ # # Create a request. To set request fields, pass in keyword arguments.
712
+ # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest.new
713
+ #
714
+ # # Call the list_listings method.
715
+ # result = client.list_listings request
716
+ #
717
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
718
+ # # over elements, and API calls will be issued to fetch pages as needed.
719
+ # result.each do |item|
720
+ # # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing.
721
+ # p item
722
+ # end
723
+ #
724
+ def list_listings request, options = nil
725
+ raise ::ArgumentError, "request must be provided" if request.nil?
726
+
727
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest
728
+
729
+ # Converts hash and nil to an options object
730
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
731
+
732
+ # Customize the options with defaults
733
+ call_metadata = @config.rpcs.list_listings.metadata.to_h
734
+
735
+ # Set x-goog-api-client and x-goog-user-project headers
736
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
737
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
738
+ gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION,
739
+ transports_version_send: [:rest]
740
+
741
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
742
+
743
+ options.apply_defaults timeout: @config.rpcs.list_listings.timeout,
744
+ metadata: call_metadata,
745
+ retry_policy: @config.rpcs.list_listings.retry_policy
746
+
747
+ options.apply_defaults timeout: @config.timeout,
748
+ metadata: @config.metadata,
749
+ retry_policy: @config.retry_policy
750
+
751
+ @analytics_hub_service_stub.list_listings request, options do |result, operation|
752
+ result = ::Gapic::Rest::PagedEnumerable.new @analytics_hub_service_stub, :list_listings, "listings", request, result, options
753
+ yield result, operation if block_given?
754
+ return result
755
+ end
756
+ rescue ::Gapic::Rest::Error => e
757
+ raise ::Google::Cloud::Error.from_error(e)
758
+ end
759
+
760
+ ##
761
+ # Gets the details of a listing.
762
+ #
763
+ # @overload get_listing(request, options = nil)
764
+ # Pass arguments to `get_listing` via a request object, either of type
765
+ # {::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest} or an equivalent Hash.
766
+ #
767
+ # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest, ::Hash]
768
+ # A request object representing the call parameters. Required. To specify no
769
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
770
+ # @param options [::Gapic::CallOptions, ::Hash]
771
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
772
+ #
773
+ # @overload get_listing(name: nil)
774
+ # Pass arguments to `get_listing` via keyword arguments. Note that at
775
+ # least one keyword argument is required. To specify no parameters, or to keep all
776
+ # the default parameter values, pass an empty Hash as a request object (see above).
777
+ #
778
+ # @param name [::String]
779
+ # Required. The resource name of the listing.
780
+ # e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`.
781
+ # @yield [result, operation] Access the result along with the TransportOperation object
782
+ # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing]
783
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
784
+ #
785
+ # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing]
786
+ #
787
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
788
+ #
789
+ # @example Basic example
790
+ # require "google/cloud/bigquery/analytics_hub/v1"
791
+ #
792
+ # # Create a client object. The client can be reused for multiple calls.
793
+ # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new
794
+ #
795
+ # # Create a request. To set request fields, pass in keyword arguments.
796
+ # request = Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest.new
797
+ #
798
+ # # Call the get_listing method.
799
+ # result = client.get_listing request
800
+ #
801
+ # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::Listing.
802
+ # p result
803
+ #
804
+ def get_listing request, options = nil
805
+ raise ::ArgumentError, "request must be provided" if request.nil?
806
+
807
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest
808
+
809
+ # Converts hash and nil to an options object
810
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
811
+
812
+ # Customize the options with defaults
813
+ call_metadata = @config.rpcs.get_listing.metadata.to_h
814
+
815
+ # Set x-goog-api-client and x-goog-user-project headers
816
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
817
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
818
+ gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION,
819
+ transports_version_send: [:rest]
820
+
821
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
822
+
823
+ options.apply_defaults timeout: @config.rpcs.get_listing.timeout,
824
+ metadata: call_metadata,
825
+ retry_policy: @config.rpcs.get_listing.retry_policy
826
+
827
+ options.apply_defaults timeout: @config.timeout,
828
+ metadata: @config.metadata,
829
+ retry_policy: @config.retry_policy
830
+
831
+ @analytics_hub_service_stub.get_listing request, options do |result, operation|
832
+ yield result, operation if block_given?
833
+ return result
834
+ end
835
+ rescue ::Gapic::Rest::Error => e
836
+ raise ::Google::Cloud::Error.from_error(e)
837
+ end
838
+
839
+ ##
840
+ # Creates a new listing.
841
+ #
842
+ # @overload create_listing(request, options = nil)
843
+ # Pass arguments to `create_listing` via a request object, either of type
844
+ # {::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest} or an equivalent Hash.
845
+ #
846
+ # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest, ::Hash]
847
+ # A request object representing the call parameters. Required. To specify no
848
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
849
+ # @param options [::Gapic::CallOptions, ::Hash]
850
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
851
+ #
852
+ # @overload create_listing(parent: nil, listing_id: nil, listing: nil)
853
+ # Pass arguments to `create_listing` via keyword arguments. Note that at
854
+ # least one keyword argument is required. To specify no parameters, or to keep all
855
+ # the default parameter values, pass an empty Hash as a request object (see above).
856
+ #
857
+ # @param parent [::String]
858
+ # Required. The parent resource path of the listing.
859
+ # e.g. `projects/myproject/locations/US/dataExchanges/123`.
860
+ # @param listing_id [::String]
861
+ # Required. The ID of the listing to create.
862
+ # Must contain only Unicode letters, numbers (0-9), underscores (_).
863
+ # Should not use characters that require URL-escaping, or characters
864
+ # outside of ASCII, spaces.
865
+ # Max length: 100 bytes.
866
+ # @param listing [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing, ::Hash]
867
+ # Required. The listing to create.
868
+ # @yield [result, operation] Access the result along with the TransportOperation object
869
+ # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing]
870
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
871
+ #
872
+ # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing]
873
+ #
874
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
875
+ #
876
+ # @example Basic example
877
+ # require "google/cloud/bigquery/analytics_hub/v1"
878
+ #
879
+ # # Create a client object. The client can be reused for multiple calls.
880
+ # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new
881
+ #
882
+ # # Create a request. To set request fields, pass in keyword arguments.
883
+ # request = Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest.new
884
+ #
885
+ # # Call the create_listing method.
886
+ # result = client.create_listing request
887
+ #
888
+ # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::Listing.
889
+ # p result
890
+ #
891
+ def create_listing request, options = nil
892
+ raise ::ArgumentError, "request must be provided" if request.nil?
893
+
894
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest
895
+
896
+ # Converts hash and nil to an options object
897
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
898
+
899
+ # Customize the options with defaults
900
+ call_metadata = @config.rpcs.create_listing.metadata.to_h
901
+
902
+ # Set x-goog-api-client and x-goog-user-project headers
903
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
904
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
905
+ gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION,
906
+ transports_version_send: [:rest]
907
+
908
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
909
+
910
+ options.apply_defaults timeout: @config.rpcs.create_listing.timeout,
911
+ metadata: call_metadata,
912
+ retry_policy: @config.rpcs.create_listing.retry_policy
913
+
914
+ options.apply_defaults timeout: @config.timeout,
915
+ metadata: @config.metadata,
916
+ retry_policy: @config.retry_policy
917
+
918
+ @analytics_hub_service_stub.create_listing request, options do |result, operation|
919
+ yield result, operation if block_given?
920
+ return result
921
+ end
922
+ rescue ::Gapic::Rest::Error => e
923
+ raise ::Google::Cloud::Error.from_error(e)
924
+ end
925
+
926
+ ##
927
+ # Updates an existing listing.
928
+ #
929
+ # @overload update_listing(request, options = nil)
930
+ # Pass arguments to `update_listing` via a request object, either of type
931
+ # {::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest} or an equivalent Hash.
932
+ #
933
+ # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest, ::Hash]
934
+ # A request object representing the call parameters. Required. To specify no
935
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
936
+ # @param options [::Gapic::CallOptions, ::Hash]
937
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
938
+ #
939
+ # @overload update_listing(update_mask: nil, listing: nil)
940
+ # Pass arguments to `update_listing` via keyword arguments. Note that at
941
+ # least one keyword argument is required. To specify no parameters, or to keep all
942
+ # the default parameter values, pass an empty Hash as a request object (see above).
943
+ #
944
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
945
+ # Required. Field mask specifies the fields to update in the listing
946
+ # resource. The fields specified in the `updateMask` are relative to the
947
+ # resource and are not a full request.
948
+ # @param listing [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing, ::Hash]
949
+ # Required. The listing to update.
950
+ # @yield [result, operation] Access the result along with the TransportOperation object
951
+ # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing]
952
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
953
+ #
954
+ # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing]
955
+ #
956
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
957
+ #
958
+ # @example Basic example
959
+ # require "google/cloud/bigquery/analytics_hub/v1"
960
+ #
961
+ # # Create a client object. The client can be reused for multiple calls.
962
+ # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new
963
+ #
964
+ # # Create a request. To set request fields, pass in keyword arguments.
965
+ # request = Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest.new
966
+ #
967
+ # # Call the update_listing method.
968
+ # result = client.update_listing request
969
+ #
970
+ # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::Listing.
971
+ # p result
972
+ #
973
+ def update_listing request, options = nil
974
+ raise ::ArgumentError, "request must be provided" if request.nil?
975
+
976
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest
977
+
978
+ # Converts hash and nil to an options object
979
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
980
+
981
+ # Customize the options with defaults
982
+ call_metadata = @config.rpcs.update_listing.metadata.to_h
983
+
984
+ # Set x-goog-api-client and x-goog-user-project headers
985
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
986
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
987
+ gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION,
988
+ transports_version_send: [:rest]
989
+
990
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
991
+
992
+ options.apply_defaults timeout: @config.rpcs.update_listing.timeout,
993
+ metadata: call_metadata,
994
+ retry_policy: @config.rpcs.update_listing.retry_policy
995
+
996
+ options.apply_defaults timeout: @config.timeout,
997
+ metadata: @config.metadata,
998
+ retry_policy: @config.retry_policy
999
+
1000
+ @analytics_hub_service_stub.update_listing request, options do |result, operation|
1001
+ yield result, operation if block_given?
1002
+ return result
1003
+ end
1004
+ rescue ::Gapic::Rest::Error => e
1005
+ raise ::Google::Cloud::Error.from_error(e)
1006
+ end
1007
+
1008
+ ##
1009
+ # Deletes a listing.
1010
+ #
1011
+ # @overload delete_listing(request, options = nil)
1012
+ # Pass arguments to `delete_listing` via a request object, either of type
1013
+ # {::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest} or an equivalent Hash.
1014
+ #
1015
+ # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest, ::Hash]
1016
+ # A request object representing the call parameters. Required. To specify no
1017
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1018
+ # @param options [::Gapic::CallOptions, ::Hash]
1019
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1020
+ #
1021
+ # @overload delete_listing(name: nil)
1022
+ # Pass arguments to `delete_listing` via keyword arguments. Note that at
1023
+ # least one keyword argument is required. To specify no parameters, or to keep all
1024
+ # the default parameter values, pass an empty Hash as a request object (see above).
1025
+ #
1026
+ # @param name [::String]
1027
+ # Required. Resource name of the listing to delete.
1028
+ # e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`.
1029
+ # @yield [result, operation] Access the result along with the TransportOperation object
1030
+ # @yieldparam result [::Google::Protobuf::Empty]
1031
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1032
+ #
1033
+ # @return [::Google::Protobuf::Empty]
1034
+ #
1035
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1036
+ #
1037
+ # @example Basic example
1038
+ # require "google/cloud/bigquery/analytics_hub/v1"
1039
+ #
1040
+ # # Create a client object. The client can be reused for multiple calls.
1041
+ # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new
1042
+ #
1043
+ # # Create a request. To set request fields, pass in keyword arguments.
1044
+ # request = Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest.new
1045
+ #
1046
+ # # Call the delete_listing method.
1047
+ # result = client.delete_listing request
1048
+ #
1049
+ # # The returned object is of type Google::Protobuf::Empty.
1050
+ # p result
1051
+ #
1052
+ def delete_listing request, options = nil
1053
+ raise ::ArgumentError, "request must be provided" if request.nil?
1054
+
1055
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest
1056
+
1057
+ # Converts hash and nil to an options object
1058
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1059
+
1060
+ # Customize the options with defaults
1061
+ call_metadata = @config.rpcs.delete_listing.metadata.to_h
1062
+
1063
+ # Set x-goog-api-client and x-goog-user-project headers
1064
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1065
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1066
+ gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION,
1067
+ transports_version_send: [:rest]
1068
+
1069
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1070
+
1071
+ options.apply_defaults timeout: @config.rpcs.delete_listing.timeout,
1072
+ metadata: call_metadata,
1073
+ retry_policy: @config.rpcs.delete_listing.retry_policy
1074
+
1075
+ options.apply_defaults timeout: @config.timeout,
1076
+ metadata: @config.metadata,
1077
+ retry_policy: @config.retry_policy
1078
+
1079
+ @analytics_hub_service_stub.delete_listing request, options do |result, operation|
1080
+ yield result, operation if block_given?
1081
+ return result
1082
+ end
1083
+ rescue ::Gapic::Rest::Error => e
1084
+ raise ::Google::Cloud::Error.from_error(e)
1085
+ end
1086
+
1087
+ ##
1088
+ # Subscribes to a listing.
1089
+ #
1090
+ # Currently, with Analytics Hub, you can create listings that
1091
+ # reference only BigQuery datasets.
1092
+ # Upon subscription to a listing for a BigQuery dataset, Analytics Hub
1093
+ # creates a linked dataset in the subscriber's project.
1094
+ #
1095
+ # @overload subscribe_listing(request, options = nil)
1096
+ # Pass arguments to `subscribe_listing` via a request object, either of type
1097
+ # {::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest} or an equivalent Hash.
1098
+ #
1099
+ # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest, ::Hash]
1100
+ # A request object representing the call parameters. Required. To specify no
1101
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1102
+ # @param options [::Gapic::CallOptions, ::Hash]
1103
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1104
+ #
1105
+ # @overload subscribe_listing(destination_dataset: nil, name: nil)
1106
+ # Pass arguments to `subscribe_listing` via keyword arguments. Note that at
1107
+ # least one keyword argument is required. To specify no parameters, or to keep all
1108
+ # the default parameter values, pass an empty Hash as a request object (see above).
1109
+ #
1110
+ # @param destination_dataset [::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationDataset, ::Hash]
1111
+ # BigQuery destination dataset to create for the subscriber.
1112
+ # @param name [::String]
1113
+ # Required. Resource name of the listing that you want to subscribe to.
1114
+ # e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`.
1115
+ # @yield [result, operation] Access the result along with the TransportOperation object
1116
+ # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse]
1117
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1118
+ #
1119
+ # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse]
1120
+ #
1121
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1122
+ #
1123
+ # @example Basic example
1124
+ # require "google/cloud/bigquery/analytics_hub/v1"
1125
+ #
1126
+ # # Create a client object. The client can be reused for multiple calls.
1127
+ # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new
1128
+ #
1129
+ # # Create a request. To set request fields, pass in keyword arguments.
1130
+ # request = Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest.new
1131
+ #
1132
+ # # Call the subscribe_listing method.
1133
+ # result = client.subscribe_listing request
1134
+ #
1135
+ # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse.
1136
+ # p result
1137
+ #
1138
+ def subscribe_listing request, options = nil
1139
+ raise ::ArgumentError, "request must be provided" if request.nil?
1140
+
1141
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest
1142
+
1143
+ # Converts hash and nil to an options object
1144
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1145
+
1146
+ # Customize the options with defaults
1147
+ call_metadata = @config.rpcs.subscribe_listing.metadata.to_h
1148
+
1149
+ # Set x-goog-api-client and x-goog-user-project headers
1150
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1151
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1152
+ gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION,
1153
+ transports_version_send: [:rest]
1154
+
1155
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1156
+
1157
+ options.apply_defaults timeout: @config.rpcs.subscribe_listing.timeout,
1158
+ metadata: call_metadata,
1159
+ retry_policy: @config.rpcs.subscribe_listing.retry_policy
1160
+
1161
+ options.apply_defaults timeout: @config.timeout,
1162
+ metadata: @config.metadata,
1163
+ retry_policy: @config.retry_policy
1164
+
1165
+ @analytics_hub_service_stub.subscribe_listing request, options do |result, operation|
1166
+ yield result, operation if block_given?
1167
+ return result
1168
+ end
1169
+ rescue ::Gapic::Rest::Error => e
1170
+ raise ::Google::Cloud::Error.from_error(e)
1171
+ end
1172
+
1173
+ ##
1174
+ # Creates a Subscription to a Data Exchange. This is a long-running operation
1175
+ # as it will create one or more linked datasets.
1176
+ #
1177
+ # @overload subscribe_data_exchange(request, options = nil)
1178
+ # Pass arguments to `subscribe_data_exchange` via a request object, either of type
1179
+ # {::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest} or an equivalent Hash.
1180
+ #
1181
+ # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest, ::Hash]
1182
+ # A request object representing the call parameters. Required. To specify no
1183
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1184
+ # @param options [::Gapic::CallOptions, ::Hash]
1185
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1186
+ #
1187
+ # @overload subscribe_data_exchange(name: nil, destination: nil, subscription: nil, subscriber_contact: nil)
1188
+ # Pass arguments to `subscribe_data_exchange` via keyword arguments. Note that at
1189
+ # least one keyword argument is required. To specify no parameters, or to keep all
1190
+ # the default parameter values, pass an empty Hash as a request object (see above).
1191
+ #
1192
+ # @param name [::String]
1193
+ # Required. Resource name of the Data Exchange.
1194
+ # e.g. `projects/publisherproject/locations/US/dataExchanges/123`
1195
+ # @param destination [::String]
1196
+ # Required. The parent resource path of the Subscription.
1197
+ # e.g. `projects/subscriberproject/locations/US`
1198
+ # @param subscription [::String]
1199
+ # Required. Name of the subscription to create.
1200
+ # e.g. `subscription1`
1201
+ # @param subscriber_contact [::String]
1202
+ # Email of the subscriber.
1203
+ # @yield [result, operation] Access the result along with the TransportOperation object
1204
+ # @yieldparam result [::Gapic::Operation]
1205
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1206
+ #
1207
+ # @return [::Gapic::Operation]
1208
+ #
1209
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1210
+ #
1211
+ # @example Basic example
1212
+ # require "google/cloud/bigquery/analytics_hub/v1"
1213
+ #
1214
+ # # Create a client object. The client can be reused for multiple calls.
1215
+ # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new
1216
+ #
1217
+ # # Create a request. To set request fields, pass in keyword arguments.
1218
+ # request = Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest.new
1219
+ #
1220
+ # # Call the subscribe_data_exchange method.
1221
+ # result = client.subscribe_data_exchange request
1222
+ #
1223
+ # # The returned object is of type Gapic::Operation. You can use it to
1224
+ # # check the status of an operation, cancel it, or wait for results.
1225
+ # # Here is how to wait for a response.
1226
+ # result.wait_until_done! timeout: 60
1227
+ # if result.response?
1228
+ # p result.response
1229
+ # else
1230
+ # puts "No response received."
1231
+ # end
1232
+ #
1233
+ def subscribe_data_exchange request, options = nil
1234
+ raise ::ArgumentError, "request must be provided" if request.nil?
1235
+
1236
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeDataExchangeRequest
1237
+
1238
+ # Converts hash and nil to an options object
1239
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1240
+
1241
+ # Customize the options with defaults
1242
+ call_metadata = @config.rpcs.subscribe_data_exchange.metadata.to_h
1243
+
1244
+ # Set x-goog-api-client and x-goog-user-project headers
1245
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1246
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1247
+ gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION,
1248
+ transports_version_send: [:rest]
1249
+
1250
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1251
+
1252
+ options.apply_defaults timeout: @config.rpcs.subscribe_data_exchange.timeout,
1253
+ metadata: call_metadata,
1254
+ retry_policy: @config.rpcs.subscribe_data_exchange.retry_policy
1255
+
1256
+ options.apply_defaults timeout: @config.timeout,
1257
+ metadata: @config.metadata,
1258
+ retry_policy: @config.retry_policy
1259
+
1260
+ @analytics_hub_service_stub.subscribe_data_exchange request, options do |result, operation|
1261
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1262
+ yield result, operation if block_given?
1263
+ return result
1264
+ end
1265
+ rescue ::Gapic::Rest::Error => e
1266
+ raise ::Google::Cloud::Error.from_error(e)
1267
+ end
1268
+
1269
+ ##
1270
+ # Refreshes a Subscription to a Data Exchange. A Data Exchange can become
1271
+ # stale when a publisher adds or removes data. This is a long-running
1272
+ # operation as it may create many linked datasets.
1273
+ #
1274
+ # @overload refresh_subscription(request, options = nil)
1275
+ # Pass arguments to `refresh_subscription` via a request object, either of type
1276
+ # {::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest} or an equivalent Hash.
1277
+ #
1278
+ # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest, ::Hash]
1279
+ # A request object representing the call parameters. Required. To specify no
1280
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1281
+ # @param options [::Gapic::CallOptions, ::Hash]
1282
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1283
+ #
1284
+ # @overload refresh_subscription(name: nil)
1285
+ # Pass arguments to `refresh_subscription` via keyword arguments. Note that at
1286
+ # least one keyword argument is required. To specify no parameters, or to keep all
1287
+ # the default parameter values, pass an empty Hash as a request object (see above).
1288
+ #
1289
+ # @param name [::String]
1290
+ # Required. Resource name of the Subscription to refresh.
1291
+ # e.g. `projects/subscriberproject/locations/US/subscriptions/123`
1292
+ # @yield [result, operation] Access the result along with the TransportOperation object
1293
+ # @yieldparam result [::Gapic::Operation]
1294
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1295
+ #
1296
+ # @return [::Gapic::Operation]
1297
+ #
1298
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1299
+ #
1300
+ # @example Basic example
1301
+ # require "google/cloud/bigquery/analytics_hub/v1"
1302
+ #
1303
+ # # Create a client object. The client can be reused for multiple calls.
1304
+ # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new
1305
+ #
1306
+ # # Create a request. To set request fields, pass in keyword arguments.
1307
+ # request = Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest.new
1308
+ #
1309
+ # # Call the refresh_subscription method.
1310
+ # result = client.refresh_subscription request
1311
+ #
1312
+ # # The returned object is of type Gapic::Operation. You can use it to
1313
+ # # check the status of an operation, cancel it, or wait for results.
1314
+ # # Here is how to wait for a response.
1315
+ # result.wait_until_done! timeout: 60
1316
+ # if result.response?
1317
+ # p result.response
1318
+ # else
1319
+ # puts "No response received."
1320
+ # end
1321
+ #
1322
+ def refresh_subscription request, options = nil
1323
+ raise ::ArgumentError, "request must be provided" if request.nil?
1324
+
1325
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::RefreshSubscriptionRequest
1326
+
1327
+ # Converts hash and nil to an options object
1328
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1329
+
1330
+ # Customize the options with defaults
1331
+ call_metadata = @config.rpcs.refresh_subscription.metadata.to_h
1332
+
1333
+ # Set x-goog-api-client and x-goog-user-project headers
1334
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1335
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1336
+ gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION,
1337
+ transports_version_send: [:rest]
1338
+
1339
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1340
+
1341
+ options.apply_defaults timeout: @config.rpcs.refresh_subscription.timeout,
1342
+ metadata: call_metadata,
1343
+ retry_policy: @config.rpcs.refresh_subscription.retry_policy
1344
+
1345
+ options.apply_defaults timeout: @config.timeout,
1346
+ metadata: @config.metadata,
1347
+ retry_policy: @config.retry_policy
1348
+
1349
+ @analytics_hub_service_stub.refresh_subscription request, options do |result, operation|
1350
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1351
+ yield result, operation if block_given?
1352
+ return result
1353
+ end
1354
+ rescue ::Gapic::Rest::Error => e
1355
+ raise ::Google::Cloud::Error.from_error(e)
1356
+ end
1357
+
1358
+ ##
1359
+ # Gets the details of a Subscription.
1360
+ #
1361
+ # @overload get_subscription(request, options = nil)
1362
+ # Pass arguments to `get_subscription` via a request object, either of type
1363
+ # {::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest} or an equivalent Hash.
1364
+ #
1365
+ # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest, ::Hash]
1366
+ # A request object representing the call parameters. Required. To specify no
1367
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1368
+ # @param options [::Gapic::CallOptions, ::Hash]
1369
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1370
+ #
1371
+ # @overload get_subscription(name: nil)
1372
+ # Pass arguments to `get_subscription` via keyword arguments. Note that at
1373
+ # least one keyword argument is required. To specify no parameters, or to keep all
1374
+ # the default parameter values, pass an empty Hash as a request object (see above).
1375
+ #
1376
+ # @param name [::String]
1377
+ # Required. Resource name of the subscription.
1378
+ # e.g. projects/123/locations/US/subscriptions/456
1379
+ # @yield [result, operation] Access the result along with the TransportOperation object
1380
+ # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription]
1381
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1382
+ #
1383
+ # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription]
1384
+ #
1385
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1386
+ #
1387
+ # @example Basic example
1388
+ # require "google/cloud/bigquery/analytics_hub/v1"
1389
+ #
1390
+ # # Create a client object. The client can be reused for multiple calls.
1391
+ # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new
1392
+ #
1393
+ # # Create a request. To set request fields, pass in keyword arguments.
1394
+ # request = Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest.new
1395
+ #
1396
+ # # Call the get_subscription method.
1397
+ # result = client.get_subscription request
1398
+ #
1399
+ # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription.
1400
+ # p result
1401
+ #
1402
+ def get_subscription request, options = nil
1403
+ raise ::ArgumentError, "request must be provided" if request.nil?
1404
+
1405
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetSubscriptionRequest
1406
+
1407
+ # Converts hash and nil to an options object
1408
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1409
+
1410
+ # Customize the options with defaults
1411
+ call_metadata = @config.rpcs.get_subscription.metadata.to_h
1412
+
1413
+ # Set x-goog-api-client and x-goog-user-project headers
1414
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1415
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1416
+ gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION,
1417
+ transports_version_send: [:rest]
1418
+
1419
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1420
+
1421
+ options.apply_defaults timeout: @config.rpcs.get_subscription.timeout,
1422
+ metadata: call_metadata,
1423
+ retry_policy: @config.rpcs.get_subscription.retry_policy
1424
+
1425
+ options.apply_defaults timeout: @config.timeout,
1426
+ metadata: @config.metadata,
1427
+ retry_policy: @config.retry_policy
1428
+
1429
+ @analytics_hub_service_stub.get_subscription request, options do |result, operation|
1430
+ yield result, operation if block_given?
1431
+ return result
1432
+ end
1433
+ rescue ::Gapic::Rest::Error => e
1434
+ raise ::Google::Cloud::Error.from_error(e)
1435
+ end
1436
+
1437
+ ##
1438
+ # Lists all subscriptions in a given project and location.
1439
+ #
1440
+ # @overload list_subscriptions(request, options = nil)
1441
+ # Pass arguments to `list_subscriptions` via a request object, either of type
1442
+ # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest} or an equivalent Hash.
1443
+ #
1444
+ # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest, ::Hash]
1445
+ # A request object representing the call parameters. Required. To specify no
1446
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1447
+ # @param options [::Gapic::CallOptions, ::Hash]
1448
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1449
+ #
1450
+ # @overload list_subscriptions(parent: nil, filter: nil, page_size: nil, page_token: nil)
1451
+ # Pass arguments to `list_subscriptions` via keyword arguments. Note that at
1452
+ # least one keyword argument is required. To specify no parameters, or to keep all
1453
+ # the default parameter values, pass an empty Hash as a request object (see above).
1454
+ #
1455
+ # @param parent [::String]
1456
+ # Required. The parent resource path of the subscription.
1457
+ # e.g. projects/myproject/locations/US
1458
+ # @param filter [::String]
1459
+ # The filter expression may be used to filter by Data Exchange or Listing.
1460
+ # @param page_size [::Integer]
1461
+ # The maximum number of results to return in a single response page.
1462
+ # @param page_token [::String]
1463
+ # Page token, returned by a previous call.
1464
+ # @yield [result, operation] Access the result along with the TransportOperation object
1465
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription>]
1466
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1467
+ #
1468
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription>]
1469
+ #
1470
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1471
+ #
1472
+ # @example Basic example
1473
+ # require "google/cloud/bigquery/analytics_hub/v1"
1474
+ #
1475
+ # # Create a client object. The client can be reused for multiple calls.
1476
+ # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new
1477
+ #
1478
+ # # Create a request. To set request fields, pass in keyword arguments.
1479
+ # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest.new
1480
+ #
1481
+ # # Call the list_subscriptions method.
1482
+ # result = client.list_subscriptions request
1483
+ #
1484
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1485
+ # # over elements, and API calls will be issued to fetch pages as needed.
1486
+ # result.each do |item|
1487
+ # # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription.
1488
+ # p item
1489
+ # end
1490
+ #
1491
+ def list_subscriptions request, options = nil
1492
+ raise ::ArgumentError, "request must be provided" if request.nil?
1493
+
1494
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSubscriptionsRequest
1495
+
1496
+ # Converts hash and nil to an options object
1497
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1498
+
1499
+ # Customize the options with defaults
1500
+ call_metadata = @config.rpcs.list_subscriptions.metadata.to_h
1501
+
1502
+ # Set x-goog-api-client and x-goog-user-project headers
1503
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1504
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1505
+ gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION,
1506
+ transports_version_send: [:rest]
1507
+
1508
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1509
+
1510
+ options.apply_defaults timeout: @config.rpcs.list_subscriptions.timeout,
1511
+ metadata: call_metadata,
1512
+ retry_policy: @config.rpcs.list_subscriptions.retry_policy
1513
+
1514
+ options.apply_defaults timeout: @config.timeout,
1515
+ metadata: @config.metadata,
1516
+ retry_policy: @config.retry_policy
1517
+
1518
+ @analytics_hub_service_stub.list_subscriptions request, options do |result, operation|
1519
+ result = ::Gapic::Rest::PagedEnumerable.new @analytics_hub_service_stub, :list_subscriptions, "subscriptions", request, result, options
1520
+ yield result, operation if block_given?
1521
+ return result
1522
+ end
1523
+ rescue ::Gapic::Rest::Error => e
1524
+ raise ::Google::Cloud::Error.from_error(e)
1525
+ end
1526
+
1527
+ ##
1528
+ # Lists all subscriptions on a given Data Exchange or Listing.
1529
+ #
1530
+ # @overload list_shared_resource_subscriptions(request, options = nil)
1531
+ # Pass arguments to `list_shared_resource_subscriptions` via a request object, either of type
1532
+ # {::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest} or an equivalent Hash.
1533
+ #
1534
+ # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest, ::Hash]
1535
+ # A request object representing the call parameters. Required. To specify no
1536
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1537
+ # @param options [::Gapic::CallOptions, ::Hash]
1538
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1539
+ #
1540
+ # @overload list_shared_resource_subscriptions(resource: nil, include_deleted_subscriptions: nil, page_size: nil, page_token: nil)
1541
+ # Pass arguments to `list_shared_resource_subscriptions` via keyword arguments. Note that at
1542
+ # least one keyword argument is required. To specify no parameters, or to keep all
1543
+ # the default parameter values, pass an empty Hash as a request object (see above).
1544
+ #
1545
+ # @param resource [::String]
1546
+ # Required. Resource name of the requested target. This resource may be
1547
+ # either a Listing or a DataExchange. e.g.
1548
+ # projects/123/locations/US/dataExchanges/456 OR e.g.
1549
+ # projects/123/locations/US/dataExchanges/456/listings/789
1550
+ # @param include_deleted_subscriptions [::Boolean]
1551
+ # If selected, includes deleted subscriptions in the response
1552
+ # (up to 63 days after deletion).
1553
+ # @param page_size [::Integer]
1554
+ # The maximum number of results to return in a single response page.
1555
+ # @param page_token [::String]
1556
+ # Page token, returned by a previous call.
1557
+ # @yield [result, operation] Access the result along with the TransportOperation object
1558
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription>]
1559
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1560
+ #
1561
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription>]
1562
+ #
1563
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1564
+ #
1565
+ # @example Basic example
1566
+ # require "google/cloud/bigquery/analytics_hub/v1"
1567
+ #
1568
+ # # Create a client object. The client can be reused for multiple calls.
1569
+ # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new
1570
+ #
1571
+ # # Create a request. To set request fields, pass in keyword arguments.
1572
+ # request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest.new
1573
+ #
1574
+ # # Call the list_shared_resource_subscriptions method.
1575
+ # result = client.list_shared_resource_subscriptions request
1576
+ #
1577
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1578
+ # # over elements, and API calls will be issued to fetch pages as needed.
1579
+ # result.each do |item|
1580
+ # # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription.
1581
+ # p item
1582
+ # end
1583
+ #
1584
+ def list_shared_resource_subscriptions request, options = nil
1585
+ raise ::ArgumentError, "request must be provided" if request.nil?
1586
+
1587
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListSharedResourceSubscriptionsRequest
1588
+
1589
+ # Converts hash and nil to an options object
1590
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1591
+
1592
+ # Customize the options with defaults
1593
+ call_metadata = @config.rpcs.list_shared_resource_subscriptions.metadata.to_h
1594
+
1595
+ # Set x-goog-api-client and x-goog-user-project headers
1596
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1597
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1598
+ gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION,
1599
+ transports_version_send: [:rest]
1600
+
1601
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1602
+
1603
+ options.apply_defaults timeout: @config.rpcs.list_shared_resource_subscriptions.timeout,
1604
+ metadata: call_metadata,
1605
+ retry_policy: @config.rpcs.list_shared_resource_subscriptions.retry_policy
1606
+
1607
+ options.apply_defaults timeout: @config.timeout,
1608
+ metadata: @config.metadata,
1609
+ retry_policy: @config.retry_policy
1610
+
1611
+ @analytics_hub_service_stub.list_shared_resource_subscriptions request, options do |result, operation|
1612
+ result = ::Gapic::Rest::PagedEnumerable.new @analytics_hub_service_stub, :list_shared_resource_subscriptions, "shared_resource_subscriptions", request, result, options
1613
+ yield result, operation if block_given?
1614
+ return result
1615
+ end
1616
+ rescue ::Gapic::Rest::Error => e
1617
+ raise ::Google::Cloud::Error.from_error(e)
1618
+ end
1619
+
1620
+ ##
1621
+ # Revokes a given subscription.
1622
+ #
1623
+ # @overload revoke_subscription(request, options = nil)
1624
+ # Pass arguments to `revoke_subscription` via a request object, either of type
1625
+ # {::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest} or an equivalent Hash.
1626
+ #
1627
+ # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest, ::Hash]
1628
+ # A request object representing the call parameters. Required. To specify no
1629
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1630
+ # @param options [::Gapic::CallOptions, ::Hash]
1631
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1632
+ #
1633
+ # @overload revoke_subscription(name: nil)
1634
+ # Pass arguments to `revoke_subscription` via keyword arguments. Note that at
1635
+ # least one keyword argument is required. To specify no parameters, or to keep all
1636
+ # the default parameter values, pass an empty Hash as a request object (see above).
1637
+ #
1638
+ # @param name [::String]
1639
+ # Required. Resource name of the subscription to revoke.
1640
+ # e.g. projects/123/locations/US/subscriptions/456
1641
+ # @yield [result, operation] Access the result along with the TransportOperation object
1642
+ # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse]
1643
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1644
+ #
1645
+ # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse]
1646
+ #
1647
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1648
+ #
1649
+ # @example Basic example
1650
+ # require "google/cloud/bigquery/analytics_hub/v1"
1651
+ #
1652
+ # # Create a client object. The client can be reused for multiple calls.
1653
+ # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new
1654
+ #
1655
+ # # Create a request. To set request fields, pass in keyword arguments.
1656
+ # request = Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest.new
1657
+ #
1658
+ # # Call the revoke_subscription method.
1659
+ # result = client.revoke_subscription request
1660
+ #
1661
+ # # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionResponse.
1662
+ # p result
1663
+ #
1664
+ def revoke_subscription request, options = nil
1665
+ raise ::ArgumentError, "request must be provided" if request.nil?
1666
+
1667
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::RevokeSubscriptionRequest
1668
+
1669
+ # Converts hash and nil to an options object
1670
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1671
+
1672
+ # Customize the options with defaults
1673
+ call_metadata = @config.rpcs.revoke_subscription.metadata.to_h
1674
+
1675
+ # Set x-goog-api-client and x-goog-user-project headers
1676
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1677
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1678
+ gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION,
1679
+ transports_version_send: [:rest]
1680
+
1681
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1682
+
1683
+ options.apply_defaults timeout: @config.rpcs.revoke_subscription.timeout,
1684
+ metadata: call_metadata,
1685
+ retry_policy: @config.rpcs.revoke_subscription.retry_policy
1686
+
1687
+ options.apply_defaults timeout: @config.timeout,
1688
+ metadata: @config.metadata,
1689
+ retry_policy: @config.retry_policy
1690
+
1691
+ @analytics_hub_service_stub.revoke_subscription request, options do |result, operation|
1692
+ yield result, operation if block_given?
1693
+ return result
1694
+ end
1695
+ rescue ::Gapic::Rest::Error => e
1696
+ raise ::Google::Cloud::Error.from_error(e)
1697
+ end
1698
+
1699
+ ##
1700
+ # Deletes a subscription.
1701
+ #
1702
+ # @overload delete_subscription(request, options = nil)
1703
+ # Pass arguments to `delete_subscription` via a request object, either of type
1704
+ # {::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest} or an equivalent Hash.
1705
+ #
1706
+ # @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest, ::Hash]
1707
+ # A request object representing the call parameters. Required. To specify no
1708
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1709
+ # @param options [::Gapic::CallOptions, ::Hash]
1710
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1711
+ #
1712
+ # @overload delete_subscription(name: nil)
1713
+ # Pass arguments to `delete_subscription` via keyword arguments. Note that at
1714
+ # least one keyword argument is required. To specify no parameters, or to keep all
1715
+ # the default parameter values, pass an empty Hash as a request object (see above).
1716
+ #
1717
+ # @param name [::String]
1718
+ # Required. Resource name of the subscription to delete.
1719
+ # e.g. projects/123/locations/US/subscriptions/456
1720
+ # @yield [result, operation] Access the result along with the TransportOperation object
1721
+ # @yieldparam result [::Gapic::Operation]
1722
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1723
+ #
1724
+ # @return [::Gapic::Operation]
1725
+ #
1726
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1727
+ #
1728
+ # @example Basic example
1729
+ # require "google/cloud/bigquery/analytics_hub/v1"
1730
+ #
1731
+ # # Create a client object. The client can be reused for multiple calls.
1732
+ # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new
1733
+ #
1734
+ # # Create a request. To set request fields, pass in keyword arguments.
1735
+ # request = Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest.new
1736
+ #
1737
+ # # Call the delete_subscription method.
1738
+ # result = client.delete_subscription request
1739
+ #
1740
+ # # The returned object is of type Gapic::Operation. You can use it to
1741
+ # # check the status of an operation, cancel it, or wait for results.
1742
+ # # Here is how to wait for a response.
1743
+ # result.wait_until_done! timeout: 60
1744
+ # if result.response?
1745
+ # p result.response
1746
+ # else
1747
+ # puts "No response received."
1748
+ # end
1749
+ #
1750
+ def delete_subscription request, options = nil
1751
+ raise ::ArgumentError, "request must be provided" if request.nil?
1752
+
1753
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteSubscriptionRequest
1754
+
1755
+ # Converts hash and nil to an options object
1756
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1757
+
1758
+ # Customize the options with defaults
1759
+ call_metadata = @config.rpcs.delete_subscription.metadata.to_h
1760
+
1761
+ # Set x-goog-api-client and x-goog-user-project headers
1762
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1763
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1764
+ gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION,
1765
+ transports_version_send: [:rest]
1766
+
1767
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1768
+
1769
+ options.apply_defaults timeout: @config.rpcs.delete_subscription.timeout,
1770
+ metadata: call_metadata,
1771
+ retry_policy: @config.rpcs.delete_subscription.retry_policy
1772
+
1773
+ options.apply_defaults timeout: @config.timeout,
1774
+ metadata: @config.metadata,
1775
+ retry_policy: @config.retry_policy
1776
+
1777
+ @analytics_hub_service_stub.delete_subscription request, options do |result, operation|
1778
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1779
+ yield result, operation if block_given?
1780
+ return result
1781
+ end
1782
+ rescue ::Gapic::Rest::Error => e
1783
+ raise ::Google::Cloud::Error.from_error(e)
1784
+ end
1785
+
1786
+ ##
1787
+ # Gets the IAM policy.
1788
+ #
1789
+ # @overload get_iam_policy(request, options = nil)
1790
+ # Pass arguments to `get_iam_policy` via a request object, either of type
1791
+ # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash.
1792
+ #
1793
+ # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash]
1794
+ # A request object representing the call parameters. Required. To specify no
1795
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1796
+ # @param options [::Gapic::CallOptions, ::Hash]
1797
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1798
+ #
1799
+ # @overload get_iam_policy(resource: nil, options: nil)
1800
+ # Pass arguments to `get_iam_policy` via keyword arguments. Note that at
1801
+ # least one keyword argument is required. To specify no parameters, or to keep all
1802
+ # the default parameter values, pass an empty Hash as a request object (see above).
1803
+ #
1804
+ # @param resource [::String]
1805
+ # REQUIRED: The resource for which the policy is being requested.
1806
+ # See the operation documentation for the appropriate value for this field.
1807
+ # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash]
1808
+ # OPTIONAL: A `GetPolicyOptions` object for specifying options to
1809
+ # `GetIamPolicy`.
1810
+ # @yield [result, operation] Access the result along with the TransportOperation object
1811
+ # @yieldparam result [::Google::Iam::V1::Policy]
1812
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1813
+ #
1814
+ # @return [::Google::Iam::V1::Policy]
1815
+ #
1816
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1817
+ #
1818
+ # @example Basic example
1819
+ # require "google/cloud/bigquery/analytics_hub/v1"
1820
+ #
1821
+ # # Create a client object. The client can be reused for multiple calls.
1822
+ # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new
1823
+ #
1824
+ # # Create a request. To set request fields, pass in keyword arguments.
1825
+ # request = Google::Iam::V1::GetIamPolicyRequest.new
1826
+ #
1827
+ # # Call the get_iam_policy method.
1828
+ # result = client.get_iam_policy request
1829
+ #
1830
+ # # The returned object is of type Google::Iam::V1::Policy.
1831
+ # p result
1832
+ #
1833
+ def get_iam_policy request, options = nil
1834
+ raise ::ArgumentError, "request must be provided" if request.nil?
1835
+
1836
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest
1837
+
1838
+ # Converts hash and nil to an options object
1839
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1840
+
1841
+ # Customize the options with defaults
1842
+ call_metadata = @config.rpcs.get_iam_policy.metadata.to_h
1843
+
1844
+ # Set x-goog-api-client and x-goog-user-project headers
1845
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1846
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1847
+ gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION,
1848
+ transports_version_send: [:rest]
1849
+
1850
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1851
+
1852
+ options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
1853
+ metadata: call_metadata,
1854
+ retry_policy: @config.rpcs.get_iam_policy.retry_policy
1855
+
1856
+ options.apply_defaults timeout: @config.timeout,
1857
+ metadata: @config.metadata,
1858
+ retry_policy: @config.retry_policy
1859
+
1860
+ @analytics_hub_service_stub.get_iam_policy request, options do |result, operation|
1861
+ yield result, operation if block_given?
1862
+ return result
1863
+ end
1864
+ rescue ::Gapic::Rest::Error => e
1865
+ raise ::Google::Cloud::Error.from_error(e)
1866
+ end
1867
+
1868
+ ##
1869
+ # Sets the IAM policy.
1870
+ #
1871
+ # @overload set_iam_policy(request, options = nil)
1872
+ # Pass arguments to `set_iam_policy` via a request object, either of type
1873
+ # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash.
1874
+ #
1875
+ # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash]
1876
+ # A request object representing the call parameters. Required. To specify no
1877
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1878
+ # @param options [::Gapic::CallOptions, ::Hash]
1879
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1880
+ #
1881
+ # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil)
1882
+ # Pass arguments to `set_iam_policy` via keyword arguments. Note that at
1883
+ # least one keyword argument is required. To specify no parameters, or to keep all
1884
+ # the default parameter values, pass an empty Hash as a request object (see above).
1885
+ #
1886
+ # @param resource [::String]
1887
+ # REQUIRED: The resource for which the policy is being specified.
1888
+ # See the operation documentation for the appropriate value for this field.
1889
+ # @param policy [::Google::Iam::V1::Policy, ::Hash]
1890
+ # REQUIRED: The complete policy to be applied to the `resource`. The size of
1891
+ # the policy is limited to a few 10s of KB. An empty policy is a
1892
+ # valid policy but certain Cloud Platform services (such as Projects)
1893
+ # might reject them.
1894
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1895
+ # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
1896
+ # the fields in the mask will be modified. If no mask is provided, the
1897
+ # following default mask is used:
1898
+ #
1899
+ # `paths: "bindings, etag"`
1900
+ # @yield [result, operation] Access the result along with the TransportOperation object
1901
+ # @yieldparam result [::Google::Iam::V1::Policy]
1902
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1903
+ #
1904
+ # @return [::Google::Iam::V1::Policy]
1905
+ #
1906
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1907
+ #
1908
+ # @example Basic example
1909
+ # require "google/cloud/bigquery/analytics_hub/v1"
1910
+ #
1911
+ # # Create a client object. The client can be reused for multiple calls.
1912
+ # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new
1913
+ #
1914
+ # # Create a request. To set request fields, pass in keyword arguments.
1915
+ # request = Google::Iam::V1::SetIamPolicyRequest.new
1916
+ #
1917
+ # # Call the set_iam_policy method.
1918
+ # result = client.set_iam_policy request
1919
+ #
1920
+ # # The returned object is of type Google::Iam::V1::Policy.
1921
+ # p result
1922
+ #
1923
+ def set_iam_policy request, options = nil
1924
+ raise ::ArgumentError, "request must be provided" if request.nil?
1925
+
1926
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest
1927
+
1928
+ # Converts hash and nil to an options object
1929
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1930
+
1931
+ # Customize the options with defaults
1932
+ call_metadata = @config.rpcs.set_iam_policy.metadata.to_h
1933
+
1934
+ # Set x-goog-api-client and x-goog-user-project headers
1935
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1936
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1937
+ gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION,
1938
+ transports_version_send: [:rest]
1939
+
1940
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1941
+
1942
+ options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
1943
+ metadata: call_metadata,
1944
+ retry_policy: @config.rpcs.set_iam_policy.retry_policy
1945
+
1946
+ options.apply_defaults timeout: @config.timeout,
1947
+ metadata: @config.metadata,
1948
+ retry_policy: @config.retry_policy
1949
+
1950
+ @analytics_hub_service_stub.set_iam_policy request, options do |result, operation|
1951
+ yield result, operation if block_given?
1952
+ return result
1953
+ end
1954
+ rescue ::Gapic::Rest::Error => e
1955
+ raise ::Google::Cloud::Error.from_error(e)
1956
+ end
1957
+
1958
+ ##
1959
+ # Returns the permissions that a caller has.
1960
+ #
1961
+ # @overload test_iam_permissions(request, options = nil)
1962
+ # Pass arguments to `test_iam_permissions` via a request object, either of type
1963
+ # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash.
1964
+ #
1965
+ # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash]
1966
+ # A request object representing the call parameters. Required. To specify no
1967
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1968
+ # @param options [::Gapic::CallOptions, ::Hash]
1969
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1970
+ #
1971
+ # @overload test_iam_permissions(resource: nil, permissions: nil)
1972
+ # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at
1973
+ # least one keyword argument is required. To specify no parameters, or to keep all
1974
+ # the default parameter values, pass an empty Hash as a request object (see above).
1975
+ #
1976
+ # @param resource [::String]
1977
+ # REQUIRED: The resource for which the policy detail is being requested.
1978
+ # See the operation documentation for the appropriate value for this field.
1979
+ # @param permissions [::Array<::String>]
1980
+ # The set of permissions to check for the `resource`. Permissions with
1981
+ # wildcards (such as '*' or 'storage.*') are not allowed. For more
1982
+ # information see
1983
+ # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
1984
+ # @yield [result, operation] Access the result along with the TransportOperation object
1985
+ # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse]
1986
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1987
+ #
1988
+ # @return [::Google::Iam::V1::TestIamPermissionsResponse]
1989
+ #
1990
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1991
+ #
1992
+ # @example Basic example
1993
+ # require "google/cloud/bigquery/analytics_hub/v1"
1994
+ #
1995
+ # # Create a client object. The client can be reused for multiple calls.
1996
+ # client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new
1997
+ #
1998
+ # # Create a request. To set request fields, pass in keyword arguments.
1999
+ # request = Google::Iam::V1::TestIamPermissionsRequest.new
2000
+ #
2001
+ # # Call the test_iam_permissions method.
2002
+ # result = client.test_iam_permissions request
2003
+ #
2004
+ # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse.
2005
+ # p result
2006
+ #
2007
+ def test_iam_permissions request, options = nil
2008
+ raise ::ArgumentError, "request must be provided" if request.nil?
2009
+
2010
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest
2011
+
2012
+ # Converts hash and nil to an options object
2013
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2014
+
2015
+ # Customize the options with defaults
2016
+ call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h
2017
+
2018
+ # Set x-goog-api-client and x-goog-user-project headers
2019
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2020
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2021
+ gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION,
2022
+ transports_version_send: [:rest]
2023
+
2024
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2025
+
2026
+ options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
2027
+ metadata: call_metadata,
2028
+ retry_policy: @config.rpcs.test_iam_permissions.retry_policy
2029
+
2030
+ options.apply_defaults timeout: @config.timeout,
2031
+ metadata: @config.metadata,
2032
+ retry_policy: @config.retry_policy
2033
+
2034
+ @analytics_hub_service_stub.test_iam_permissions request, options do |result, operation|
2035
+ yield result, operation if block_given?
2036
+ return result
2037
+ end
2038
+ rescue ::Gapic::Rest::Error => e
2039
+ raise ::Google::Cloud::Error.from_error(e)
2040
+ end
2041
+
2042
+ ##
2043
+ # Configuration class for the AnalyticsHubService REST API.
2044
+ #
2045
+ # This class represents the configuration for AnalyticsHubService REST,
2046
+ # providing control over timeouts, retry behavior, logging, transport
2047
+ # parameters, and other low-level controls. Certain parameters can also be
2048
+ # applied individually to specific RPCs. See
2049
+ # {::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client::Configuration::Rpcs}
2050
+ # for a list of RPCs that can be configured independently.
2051
+ #
2052
+ # Configuration can be applied globally to all clients, or to a single client
2053
+ # on construction.
2054
+ #
2055
+ # @example
2056
+ #
2057
+ # # Modify the global config, setting the timeout for
2058
+ # # list_data_exchanges to 20 seconds,
2059
+ # # and all remaining timeouts to 10 seconds.
2060
+ # ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.configure do |config|
2061
+ # config.timeout = 10.0
2062
+ # config.rpcs.list_data_exchanges.timeout = 20.0
2063
+ # end
2064
+ #
2065
+ # # Apply the above configuration only to a new client.
2066
+ # client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Rest::Client.new do |config|
2067
+ # config.timeout = 10.0
2068
+ # config.rpcs.list_data_exchanges.timeout = 20.0
2069
+ # end
2070
+ #
2071
+ # @!attribute [rw] endpoint
2072
+ # The hostname or hostname:port of the service endpoint.
2073
+ # Defaults to `"analyticshub.googleapis.com"`.
2074
+ # @return [::String]
2075
+ # @!attribute [rw] credentials
2076
+ # Credentials to send with calls. You may provide any of the following types:
2077
+ # * (`String`) The path to a service account key file in JSON format
2078
+ # * (`Hash`) A service account key as a Hash
2079
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
2080
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
2081
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
2082
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
2083
+ # * (`nil`) indicating no credentials
2084
+ # @return [::Object]
2085
+ # @!attribute [rw] scope
2086
+ # The OAuth scopes
2087
+ # @return [::Array<::String>]
2088
+ # @!attribute [rw] lib_name
2089
+ # The library name as recorded in instrumentation and logging
2090
+ # @return [::String]
2091
+ # @!attribute [rw] lib_version
2092
+ # The library version as recorded in instrumentation and logging
2093
+ # @return [::String]
2094
+ # @!attribute [rw] timeout
2095
+ # The call timeout in seconds.
2096
+ # @return [::Numeric]
2097
+ # @!attribute [rw] metadata
2098
+ # Additional headers to be sent with the call.
2099
+ # @return [::Hash{::Symbol=>::String}]
2100
+ # @!attribute [rw] retry_policy
2101
+ # The retry policy. The value is a hash with the following keys:
2102
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
2103
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
2104
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
2105
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
2106
+ # trigger a retry.
2107
+ # @return [::Hash]
2108
+ # @!attribute [rw] quota_project
2109
+ # A separate project against which to charge quota.
2110
+ # @return [::String]
2111
+ #
2112
+ class Configuration
2113
+ extend ::Gapic::Config
2114
+
2115
+ DEFAULT_ENDPOINT = "analyticshub.googleapis.com"
2116
+
2117
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
2118
+ config_attr :credentials, nil do |value|
2119
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
2120
+ allowed.any? { |klass| klass === value }
2121
+ end
2122
+ config_attr :scope, nil, ::String, ::Array, nil
2123
+ config_attr :lib_name, nil, ::String, nil
2124
+ config_attr :lib_version, nil, ::String, nil
2125
+ config_attr :timeout, nil, ::Numeric, nil
2126
+ config_attr :metadata, nil, ::Hash, nil
2127
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
2128
+ config_attr :quota_project, nil, ::String, nil
2129
+
2130
+ # @private
2131
+ def initialize parent_config = nil
2132
+ @parent_config = parent_config unless parent_config.nil?
2133
+
2134
+ yield self if block_given?
2135
+ end
2136
+
2137
+ ##
2138
+ # Configurations for individual RPCs
2139
+ # @return [Rpcs]
2140
+ #
2141
+ def rpcs
2142
+ @rpcs ||= begin
2143
+ parent_rpcs = nil
2144
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
2145
+ Rpcs.new parent_rpcs
2146
+ end
2147
+ end
2148
+
2149
+ ##
2150
+ # Configuration RPC class for the AnalyticsHubService API.
2151
+ #
2152
+ # Includes fields providing the configuration for each RPC in this service.
2153
+ # Each configuration object is of type `Gapic::Config::Method` and includes
2154
+ # the following configuration fields:
2155
+ #
2156
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
2157
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
2158
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
2159
+ # include the following keys:
2160
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
2161
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
2162
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
2163
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
2164
+ # trigger a retry.
2165
+ #
2166
+ class Rpcs
2167
+ ##
2168
+ # RPC-specific configuration for `list_data_exchanges`
2169
+ # @return [::Gapic::Config::Method]
2170
+ #
2171
+ attr_reader :list_data_exchanges
2172
+ ##
2173
+ # RPC-specific configuration for `list_org_data_exchanges`
2174
+ # @return [::Gapic::Config::Method]
2175
+ #
2176
+ attr_reader :list_org_data_exchanges
2177
+ ##
2178
+ # RPC-specific configuration for `get_data_exchange`
2179
+ # @return [::Gapic::Config::Method]
2180
+ #
2181
+ attr_reader :get_data_exchange
2182
+ ##
2183
+ # RPC-specific configuration for `create_data_exchange`
2184
+ # @return [::Gapic::Config::Method]
2185
+ #
2186
+ attr_reader :create_data_exchange
2187
+ ##
2188
+ # RPC-specific configuration for `update_data_exchange`
2189
+ # @return [::Gapic::Config::Method]
2190
+ #
2191
+ attr_reader :update_data_exchange
2192
+ ##
2193
+ # RPC-specific configuration for `delete_data_exchange`
2194
+ # @return [::Gapic::Config::Method]
2195
+ #
2196
+ attr_reader :delete_data_exchange
2197
+ ##
2198
+ # RPC-specific configuration for `list_listings`
2199
+ # @return [::Gapic::Config::Method]
2200
+ #
2201
+ attr_reader :list_listings
2202
+ ##
2203
+ # RPC-specific configuration for `get_listing`
2204
+ # @return [::Gapic::Config::Method]
2205
+ #
2206
+ attr_reader :get_listing
2207
+ ##
2208
+ # RPC-specific configuration for `create_listing`
2209
+ # @return [::Gapic::Config::Method]
2210
+ #
2211
+ attr_reader :create_listing
2212
+ ##
2213
+ # RPC-specific configuration for `update_listing`
2214
+ # @return [::Gapic::Config::Method]
2215
+ #
2216
+ attr_reader :update_listing
2217
+ ##
2218
+ # RPC-specific configuration for `delete_listing`
2219
+ # @return [::Gapic::Config::Method]
2220
+ #
2221
+ attr_reader :delete_listing
2222
+ ##
2223
+ # RPC-specific configuration for `subscribe_listing`
2224
+ # @return [::Gapic::Config::Method]
2225
+ #
2226
+ attr_reader :subscribe_listing
2227
+ ##
2228
+ # RPC-specific configuration for `subscribe_data_exchange`
2229
+ # @return [::Gapic::Config::Method]
2230
+ #
2231
+ attr_reader :subscribe_data_exchange
2232
+ ##
2233
+ # RPC-specific configuration for `refresh_subscription`
2234
+ # @return [::Gapic::Config::Method]
2235
+ #
2236
+ attr_reader :refresh_subscription
2237
+ ##
2238
+ # RPC-specific configuration for `get_subscription`
2239
+ # @return [::Gapic::Config::Method]
2240
+ #
2241
+ attr_reader :get_subscription
2242
+ ##
2243
+ # RPC-specific configuration for `list_subscriptions`
2244
+ # @return [::Gapic::Config::Method]
2245
+ #
2246
+ attr_reader :list_subscriptions
2247
+ ##
2248
+ # RPC-specific configuration for `list_shared_resource_subscriptions`
2249
+ # @return [::Gapic::Config::Method]
2250
+ #
2251
+ attr_reader :list_shared_resource_subscriptions
2252
+ ##
2253
+ # RPC-specific configuration for `revoke_subscription`
2254
+ # @return [::Gapic::Config::Method]
2255
+ #
2256
+ attr_reader :revoke_subscription
2257
+ ##
2258
+ # RPC-specific configuration for `delete_subscription`
2259
+ # @return [::Gapic::Config::Method]
2260
+ #
2261
+ attr_reader :delete_subscription
2262
+ ##
2263
+ # RPC-specific configuration for `get_iam_policy`
2264
+ # @return [::Gapic::Config::Method]
2265
+ #
2266
+ attr_reader :get_iam_policy
2267
+ ##
2268
+ # RPC-specific configuration for `set_iam_policy`
2269
+ # @return [::Gapic::Config::Method]
2270
+ #
2271
+ attr_reader :set_iam_policy
2272
+ ##
2273
+ # RPC-specific configuration for `test_iam_permissions`
2274
+ # @return [::Gapic::Config::Method]
2275
+ #
2276
+ attr_reader :test_iam_permissions
2277
+
2278
+ # @private
2279
+ def initialize parent_rpcs = nil
2280
+ list_data_exchanges_config = parent_rpcs.list_data_exchanges if parent_rpcs.respond_to? :list_data_exchanges
2281
+ @list_data_exchanges = ::Gapic::Config::Method.new list_data_exchanges_config
2282
+ list_org_data_exchanges_config = parent_rpcs.list_org_data_exchanges if parent_rpcs.respond_to? :list_org_data_exchanges
2283
+ @list_org_data_exchanges = ::Gapic::Config::Method.new list_org_data_exchanges_config
2284
+ get_data_exchange_config = parent_rpcs.get_data_exchange if parent_rpcs.respond_to? :get_data_exchange
2285
+ @get_data_exchange = ::Gapic::Config::Method.new get_data_exchange_config
2286
+ create_data_exchange_config = parent_rpcs.create_data_exchange if parent_rpcs.respond_to? :create_data_exchange
2287
+ @create_data_exchange = ::Gapic::Config::Method.new create_data_exchange_config
2288
+ update_data_exchange_config = parent_rpcs.update_data_exchange if parent_rpcs.respond_to? :update_data_exchange
2289
+ @update_data_exchange = ::Gapic::Config::Method.new update_data_exchange_config
2290
+ delete_data_exchange_config = parent_rpcs.delete_data_exchange if parent_rpcs.respond_to? :delete_data_exchange
2291
+ @delete_data_exchange = ::Gapic::Config::Method.new delete_data_exchange_config
2292
+ list_listings_config = parent_rpcs.list_listings if parent_rpcs.respond_to? :list_listings
2293
+ @list_listings = ::Gapic::Config::Method.new list_listings_config
2294
+ get_listing_config = parent_rpcs.get_listing if parent_rpcs.respond_to? :get_listing
2295
+ @get_listing = ::Gapic::Config::Method.new get_listing_config
2296
+ create_listing_config = parent_rpcs.create_listing if parent_rpcs.respond_to? :create_listing
2297
+ @create_listing = ::Gapic::Config::Method.new create_listing_config
2298
+ update_listing_config = parent_rpcs.update_listing if parent_rpcs.respond_to? :update_listing
2299
+ @update_listing = ::Gapic::Config::Method.new update_listing_config
2300
+ delete_listing_config = parent_rpcs.delete_listing if parent_rpcs.respond_to? :delete_listing
2301
+ @delete_listing = ::Gapic::Config::Method.new delete_listing_config
2302
+ subscribe_listing_config = parent_rpcs.subscribe_listing if parent_rpcs.respond_to? :subscribe_listing
2303
+ @subscribe_listing = ::Gapic::Config::Method.new subscribe_listing_config
2304
+ subscribe_data_exchange_config = parent_rpcs.subscribe_data_exchange if parent_rpcs.respond_to? :subscribe_data_exchange
2305
+ @subscribe_data_exchange = ::Gapic::Config::Method.new subscribe_data_exchange_config
2306
+ refresh_subscription_config = parent_rpcs.refresh_subscription if parent_rpcs.respond_to? :refresh_subscription
2307
+ @refresh_subscription = ::Gapic::Config::Method.new refresh_subscription_config
2308
+ get_subscription_config = parent_rpcs.get_subscription if parent_rpcs.respond_to? :get_subscription
2309
+ @get_subscription = ::Gapic::Config::Method.new get_subscription_config
2310
+ list_subscriptions_config = parent_rpcs.list_subscriptions if parent_rpcs.respond_to? :list_subscriptions
2311
+ @list_subscriptions = ::Gapic::Config::Method.new list_subscriptions_config
2312
+ list_shared_resource_subscriptions_config = parent_rpcs.list_shared_resource_subscriptions if parent_rpcs.respond_to? :list_shared_resource_subscriptions
2313
+ @list_shared_resource_subscriptions = ::Gapic::Config::Method.new list_shared_resource_subscriptions_config
2314
+ revoke_subscription_config = parent_rpcs.revoke_subscription if parent_rpcs.respond_to? :revoke_subscription
2315
+ @revoke_subscription = ::Gapic::Config::Method.new revoke_subscription_config
2316
+ delete_subscription_config = parent_rpcs.delete_subscription if parent_rpcs.respond_to? :delete_subscription
2317
+ @delete_subscription = ::Gapic::Config::Method.new delete_subscription_config
2318
+ get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy
2319
+ @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
2320
+ set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy
2321
+ @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
2322
+ test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
2323
+ @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
2324
+
2325
+ yield self if block_given?
2326
+ end
2327
+ end
2328
+ end
2329
+ end
2330
+ end
2331
+ end
2332
+ end
2333
+ end
2334
+ end
2335
+ end
2336
+ end