google-cloud-bigquery-analytics_hub-v1 0.a → 0.2.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.
- checksums.yaml +4 -4
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +149 -0
- data/README.md +144 -8
- data/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/client.rb +1786 -0
- data/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/credentials.rb +50 -0
- data/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service/paths.rb +109 -0
- data/lib/google/cloud/bigquery/analytics_hub/v1/analytics_hub_service.rb +56 -0
- data/lib/google/cloud/bigquery/analytics_hub/v1/version.rb +7 -2
- data/lib/google/cloud/bigquery/analytics_hub/v1.rb +42 -0
- data/lib/google/cloud/bigquery/analyticshub/v1/analyticshub_pb.rb +80 -0
- data/lib/google/cloud/bigquery/analyticshub/v1/analyticshub_services_pb.rb +86 -0
- data/lib/google-cloud-bigquery-analytics_hub-v1.rb +21 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/client.rb +381 -0
- data/proto_docs/google/api/field_behavior.rb +71 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/api/resource.rb +222 -0
- data/proto_docs/google/cloud/bigquery/analyticshub/v1/analyticshub.rb +497 -0
- data/proto_docs/google/iam/v1/iam_policy.rb +87 -0
- data/proto_docs/google/iam/v1/options.rb +50 -0
- data/proto_docs/google/iam/v1/policy.rb +422 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/empty.rb +34 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/wrappers.rb +121 -0
- data/proto_docs/google/type/expr.rb +75 -0
- metadata +199 -13
@@ -0,0 +1,1786 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2022 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
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module Bigquery
|
25
|
+
module AnalyticsHub
|
26
|
+
module V1
|
27
|
+
module AnalyticsHubService
|
28
|
+
##
|
29
|
+
# Client for the AnalyticsHubService service.
|
30
|
+
#
|
31
|
+
# The `AnalyticsHubService` API facilitates data sharing within and across
|
32
|
+
# organizations. It allows data providers to publish listings that reference
|
33
|
+
# shared datasets. With Analytics Hub, users can discover and search for
|
34
|
+
# listings that they have access to. Subscribers can view and subscribe to
|
35
|
+
# listings. When you subscribe to a listing, Analytics Hub creates a linked
|
36
|
+
# dataset in your project.
|
37
|
+
#
|
38
|
+
class Client
|
39
|
+
include Paths
|
40
|
+
|
41
|
+
# @private
|
42
|
+
attr_reader :analytics_hub_service_stub
|
43
|
+
|
44
|
+
##
|
45
|
+
# Configure the AnalyticsHubService Client class.
|
46
|
+
#
|
47
|
+
# See {::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client::Configuration}
|
48
|
+
# for a description of the configuration fields.
|
49
|
+
#
|
50
|
+
# @example
|
51
|
+
#
|
52
|
+
# # Modify the configuration for all AnalyticsHubService clients
|
53
|
+
# ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.configure do |config|
|
54
|
+
# config.timeout = 10.0
|
55
|
+
# end
|
56
|
+
#
|
57
|
+
# @yield [config] Configure the Client client.
|
58
|
+
# @yieldparam config [Client::Configuration]
|
59
|
+
#
|
60
|
+
# @return [Client::Configuration]
|
61
|
+
#
|
62
|
+
def self.configure
|
63
|
+
@configure ||= begin
|
64
|
+
namespace = ["Google", "Cloud", "Bigquery", "AnalyticsHub", "V1"]
|
65
|
+
parent_config = while namespace.any?
|
66
|
+
parent_name = namespace.join "::"
|
67
|
+
parent_const = const_get parent_name
|
68
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
69
|
+
namespace.pop
|
70
|
+
end
|
71
|
+
default_config = Client::Configuration.new parent_config
|
72
|
+
|
73
|
+
default_config.timeout = 60.0
|
74
|
+
default_config.retry_policy = {
|
75
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
76
|
+
}
|
77
|
+
|
78
|
+
default_config
|
79
|
+
end
|
80
|
+
yield @configure if block_given?
|
81
|
+
@configure
|
82
|
+
end
|
83
|
+
|
84
|
+
##
|
85
|
+
# Configure the AnalyticsHubService Client instance.
|
86
|
+
#
|
87
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
88
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
89
|
+
# should be made on {Client.configure}.
|
90
|
+
#
|
91
|
+
# See {::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client::Configuration}
|
92
|
+
# for a description of the configuration fields.
|
93
|
+
#
|
94
|
+
# @yield [config] Configure the Client client.
|
95
|
+
# @yieldparam config [Client::Configuration]
|
96
|
+
#
|
97
|
+
# @return [Client::Configuration]
|
98
|
+
#
|
99
|
+
def configure
|
100
|
+
yield @config if block_given?
|
101
|
+
@config
|
102
|
+
end
|
103
|
+
|
104
|
+
##
|
105
|
+
# Create a new AnalyticsHubService client object.
|
106
|
+
#
|
107
|
+
# @example
|
108
|
+
#
|
109
|
+
# # Create a client using the default configuration
|
110
|
+
# client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new
|
111
|
+
#
|
112
|
+
# # Create a client using a custom configuration
|
113
|
+
# client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config|
|
114
|
+
# config.timeout = 10.0
|
115
|
+
# end
|
116
|
+
#
|
117
|
+
# @yield [config] Configure the AnalyticsHubService client.
|
118
|
+
# @yieldparam config [Client::Configuration]
|
119
|
+
#
|
120
|
+
def initialize
|
121
|
+
# These require statements are intentionally placed here to initialize
|
122
|
+
# the gRPC module only when it's required.
|
123
|
+
# See https://github.com/googleapis/toolkit/issues/446
|
124
|
+
require "gapic/grpc"
|
125
|
+
require "google/cloud/bigquery/analyticshub/v1/analyticshub_services_pb"
|
126
|
+
|
127
|
+
# Create the configuration object
|
128
|
+
@config = Configuration.new Client.configure
|
129
|
+
|
130
|
+
# Yield the configuration if needed
|
131
|
+
yield @config if block_given?
|
132
|
+
|
133
|
+
# Create credentials
|
134
|
+
credentials = @config.credentials
|
135
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
136
|
+
# but only if the default endpoint does not have a region prefix.
|
137
|
+
enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
138
|
+
!@config.endpoint.split(".").first.include?("-")
|
139
|
+
credentials ||= Credentials.default scope: @config.scope,
|
140
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
141
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
142
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
143
|
+
end
|
144
|
+
@quota_project_id = @config.quota_project
|
145
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
146
|
+
|
147
|
+
@analytics_hub_service_stub = ::Gapic::ServiceStub.new(
|
148
|
+
::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Stub,
|
149
|
+
credentials: credentials,
|
150
|
+
endpoint: @config.endpoint,
|
151
|
+
channel_args: @config.channel_args,
|
152
|
+
interceptors: @config.interceptors
|
153
|
+
)
|
154
|
+
end
|
155
|
+
|
156
|
+
# Service calls
|
157
|
+
|
158
|
+
##
|
159
|
+
# Lists all data exchanges in a given project and location.
|
160
|
+
#
|
161
|
+
# @overload list_data_exchanges(request, options = nil)
|
162
|
+
# Pass arguments to `list_data_exchanges` via a request object, either of type
|
163
|
+
# {::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest} or an equivalent Hash.
|
164
|
+
#
|
165
|
+
# @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest, ::Hash]
|
166
|
+
# A request object representing the call parameters. Required. To specify no
|
167
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
168
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
169
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
170
|
+
#
|
171
|
+
# @overload list_data_exchanges(parent: nil, page_size: nil, page_token: nil)
|
172
|
+
# Pass arguments to `list_data_exchanges` via keyword arguments. Note that at
|
173
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
174
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
175
|
+
#
|
176
|
+
# @param parent [::String]
|
177
|
+
# Required. The parent resource path of the data exchanges.
|
178
|
+
# e.g. `projects/myproject/locations/US`.
|
179
|
+
# @param page_size [::Integer]
|
180
|
+
# The maximum number of results to return in a single response page. Leverage
|
181
|
+
# the page tokens to iterate through the entire collection.
|
182
|
+
# @param page_token [::String]
|
183
|
+
# Page token, returned by a previous call, to request the next page of
|
184
|
+
# results.
|
185
|
+
#
|
186
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
187
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange>]
|
188
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
189
|
+
#
|
190
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange>]
|
191
|
+
#
|
192
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
193
|
+
#
|
194
|
+
# @example Basic example
|
195
|
+
# require "google/cloud/bigquery/analytics_hub/v1"
|
196
|
+
#
|
197
|
+
# # Create a client object. The client can be reused for multiple calls.
|
198
|
+
# client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new
|
199
|
+
#
|
200
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
201
|
+
# request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest.new
|
202
|
+
#
|
203
|
+
# # Call the list_data_exchanges method.
|
204
|
+
# result = client.list_data_exchanges request
|
205
|
+
#
|
206
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
207
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
208
|
+
# result.each do |item|
|
209
|
+
# # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange.
|
210
|
+
# p item
|
211
|
+
# end
|
212
|
+
#
|
213
|
+
def list_data_exchanges request, options = nil
|
214
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
215
|
+
|
216
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListDataExchangesRequest
|
217
|
+
|
218
|
+
# Converts hash and nil to an options object
|
219
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
220
|
+
|
221
|
+
# Customize the options with defaults
|
222
|
+
metadata = @config.rpcs.list_data_exchanges.metadata.to_h
|
223
|
+
|
224
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
225
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
226
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
227
|
+
gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION
|
228
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
229
|
+
|
230
|
+
header_params = {}
|
231
|
+
if request.parent
|
232
|
+
header_params["parent"] = request.parent
|
233
|
+
end
|
234
|
+
|
235
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
236
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
237
|
+
|
238
|
+
options.apply_defaults timeout: @config.rpcs.list_data_exchanges.timeout,
|
239
|
+
metadata: metadata,
|
240
|
+
retry_policy: @config.rpcs.list_data_exchanges.retry_policy
|
241
|
+
|
242
|
+
options.apply_defaults timeout: @config.timeout,
|
243
|
+
metadata: @config.metadata,
|
244
|
+
retry_policy: @config.retry_policy
|
245
|
+
|
246
|
+
@analytics_hub_service_stub.call_rpc :list_data_exchanges, request, options: options do |response, operation|
|
247
|
+
response = ::Gapic::PagedEnumerable.new @analytics_hub_service_stub, :list_data_exchanges, request, response, operation, options
|
248
|
+
yield response, operation if block_given?
|
249
|
+
return response
|
250
|
+
end
|
251
|
+
rescue ::GRPC::BadStatus => e
|
252
|
+
raise ::Google::Cloud::Error.from_error(e)
|
253
|
+
end
|
254
|
+
|
255
|
+
##
|
256
|
+
# Lists all data exchanges from projects in a given organization and
|
257
|
+
# location.
|
258
|
+
#
|
259
|
+
# @overload list_org_data_exchanges(request, options = nil)
|
260
|
+
# Pass arguments to `list_org_data_exchanges` via a request object, either of type
|
261
|
+
# {::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest} or an equivalent Hash.
|
262
|
+
#
|
263
|
+
# @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest, ::Hash]
|
264
|
+
# A request object representing the call parameters. Required. To specify no
|
265
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
266
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
267
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
268
|
+
#
|
269
|
+
# @overload list_org_data_exchanges(organization: nil, page_size: nil, page_token: nil)
|
270
|
+
# Pass arguments to `list_org_data_exchanges` via keyword arguments. Note that at
|
271
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
272
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
273
|
+
#
|
274
|
+
# @param organization [::String]
|
275
|
+
# Required. The organization resource path of the projects containing DataExchanges.
|
276
|
+
# e.g. `organizations/myorg/locations/US`.
|
277
|
+
# @param page_size [::Integer]
|
278
|
+
# The maximum number of results to return in a single response page. Leverage
|
279
|
+
# the page tokens to iterate through the entire collection.
|
280
|
+
# @param page_token [::String]
|
281
|
+
# Page token, returned by a previous call, to request the next page of
|
282
|
+
# results.
|
283
|
+
#
|
284
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
285
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange>]
|
286
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
287
|
+
#
|
288
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange>]
|
289
|
+
#
|
290
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
291
|
+
#
|
292
|
+
# @example Basic example
|
293
|
+
# require "google/cloud/bigquery/analytics_hub/v1"
|
294
|
+
#
|
295
|
+
# # Create a client object. The client can be reused for multiple calls.
|
296
|
+
# client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new
|
297
|
+
#
|
298
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
299
|
+
# request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest.new
|
300
|
+
#
|
301
|
+
# # Call the list_org_data_exchanges method.
|
302
|
+
# result = client.list_org_data_exchanges request
|
303
|
+
#
|
304
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
305
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
306
|
+
# result.each do |item|
|
307
|
+
# # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange.
|
308
|
+
# p item
|
309
|
+
# end
|
310
|
+
#
|
311
|
+
def list_org_data_exchanges request, options = nil
|
312
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
313
|
+
|
314
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListOrgDataExchangesRequest
|
315
|
+
|
316
|
+
# Converts hash and nil to an options object
|
317
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
318
|
+
|
319
|
+
# Customize the options with defaults
|
320
|
+
metadata = @config.rpcs.list_org_data_exchanges.metadata.to_h
|
321
|
+
|
322
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
323
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
324
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
325
|
+
gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION
|
326
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
327
|
+
|
328
|
+
header_params = {}
|
329
|
+
if request.organization
|
330
|
+
header_params["organization"] = request.organization
|
331
|
+
end
|
332
|
+
|
333
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
334
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
335
|
+
|
336
|
+
options.apply_defaults timeout: @config.rpcs.list_org_data_exchanges.timeout,
|
337
|
+
metadata: metadata,
|
338
|
+
retry_policy: @config.rpcs.list_org_data_exchanges.retry_policy
|
339
|
+
|
340
|
+
options.apply_defaults timeout: @config.timeout,
|
341
|
+
metadata: @config.metadata,
|
342
|
+
retry_policy: @config.retry_policy
|
343
|
+
|
344
|
+
@analytics_hub_service_stub.call_rpc :list_org_data_exchanges, request, options: options do |response, operation|
|
345
|
+
response = ::Gapic::PagedEnumerable.new @analytics_hub_service_stub, :list_org_data_exchanges, request, response, operation, options
|
346
|
+
yield response, operation if block_given?
|
347
|
+
return response
|
348
|
+
end
|
349
|
+
rescue ::GRPC::BadStatus => e
|
350
|
+
raise ::Google::Cloud::Error.from_error(e)
|
351
|
+
end
|
352
|
+
|
353
|
+
##
|
354
|
+
# Gets the details of a data exchange.
|
355
|
+
#
|
356
|
+
# @overload get_data_exchange(request, options = nil)
|
357
|
+
# Pass arguments to `get_data_exchange` via a request object, either of type
|
358
|
+
# {::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest} or an equivalent Hash.
|
359
|
+
#
|
360
|
+
# @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest, ::Hash]
|
361
|
+
# A request object representing the call parameters. Required. To specify no
|
362
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
363
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
364
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
365
|
+
#
|
366
|
+
# @overload get_data_exchange(name: nil)
|
367
|
+
# Pass arguments to `get_data_exchange` via keyword arguments. Note that at
|
368
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
369
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
370
|
+
#
|
371
|
+
# @param name [::String]
|
372
|
+
# Required. The resource name of the data exchange.
|
373
|
+
# e.g. `projects/myproject/locations/US/dataExchanges/123`.
|
374
|
+
#
|
375
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
376
|
+
# @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange]
|
377
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
378
|
+
#
|
379
|
+
# @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange]
|
380
|
+
#
|
381
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
382
|
+
#
|
383
|
+
# @example Basic example
|
384
|
+
# require "google/cloud/bigquery/analytics_hub/v1"
|
385
|
+
#
|
386
|
+
# # Create a client object. The client can be reused for multiple calls.
|
387
|
+
# client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new
|
388
|
+
#
|
389
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
390
|
+
# request = Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest.new
|
391
|
+
#
|
392
|
+
# # Call the get_data_exchange method.
|
393
|
+
# result = client.get_data_exchange request
|
394
|
+
#
|
395
|
+
# # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange.
|
396
|
+
# p result
|
397
|
+
#
|
398
|
+
def get_data_exchange request, options = nil
|
399
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
400
|
+
|
401
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetDataExchangeRequest
|
402
|
+
|
403
|
+
# Converts hash and nil to an options object
|
404
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
405
|
+
|
406
|
+
# Customize the options with defaults
|
407
|
+
metadata = @config.rpcs.get_data_exchange.metadata.to_h
|
408
|
+
|
409
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
410
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
411
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
412
|
+
gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION
|
413
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
414
|
+
|
415
|
+
header_params = {}
|
416
|
+
if request.name
|
417
|
+
header_params["name"] = request.name
|
418
|
+
end
|
419
|
+
|
420
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
421
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
422
|
+
|
423
|
+
options.apply_defaults timeout: @config.rpcs.get_data_exchange.timeout,
|
424
|
+
metadata: metadata,
|
425
|
+
retry_policy: @config.rpcs.get_data_exchange.retry_policy
|
426
|
+
|
427
|
+
options.apply_defaults timeout: @config.timeout,
|
428
|
+
metadata: @config.metadata,
|
429
|
+
retry_policy: @config.retry_policy
|
430
|
+
|
431
|
+
@analytics_hub_service_stub.call_rpc :get_data_exchange, request, options: options do |response, operation|
|
432
|
+
yield response, operation if block_given?
|
433
|
+
return response
|
434
|
+
end
|
435
|
+
rescue ::GRPC::BadStatus => e
|
436
|
+
raise ::Google::Cloud::Error.from_error(e)
|
437
|
+
end
|
438
|
+
|
439
|
+
##
|
440
|
+
# Creates a new data exchange.
|
441
|
+
#
|
442
|
+
# @overload create_data_exchange(request, options = nil)
|
443
|
+
# Pass arguments to `create_data_exchange` via a request object, either of type
|
444
|
+
# {::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest} or an equivalent Hash.
|
445
|
+
#
|
446
|
+
# @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest, ::Hash]
|
447
|
+
# A request object representing the call parameters. Required. To specify no
|
448
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
449
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
450
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
451
|
+
#
|
452
|
+
# @overload create_data_exchange(parent: nil, data_exchange_id: nil, data_exchange: nil)
|
453
|
+
# Pass arguments to `create_data_exchange` via keyword arguments. Note that at
|
454
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
455
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
456
|
+
#
|
457
|
+
# @param parent [::String]
|
458
|
+
# Required. The parent resource path of the data exchange.
|
459
|
+
# e.g. `projects/myproject/locations/US`.
|
460
|
+
# @param data_exchange_id [::String]
|
461
|
+
# Required. The ID of the data exchange.
|
462
|
+
# Must contain only Unicode letters, numbers (0-9), underscores (_).
|
463
|
+
# Should not use characters that require URL-escaping, or characters
|
464
|
+
# outside of ASCII, spaces.
|
465
|
+
# Max length: 100 bytes.
|
466
|
+
# @param data_exchange [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange, ::Hash]
|
467
|
+
# Required. The data exchange to create.
|
468
|
+
#
|
469
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
470
|
+
# @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange]
|
471
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
472
|
+
#
|
473
|
+
# @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange]
|
474
|
+
#
|
475
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
476
|
+
#
|
477
|
+
# @example Basic example
|
478
|
+
# require "google/cloud/bigquery/analytics_hub/v1"
|
479
|
+
#
|
480
|
+
# # Create a client object. The client can be reused for multiple calls.
|
481
|
+
# client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new
|
482
|
+
#
|
483
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
484
|
+
# request = Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest.new
|
485
|
+
#
|
486
|
+
# # Call the create_data_exchange method.
|
487
|
+
# result = client.create_data_exchange request
|
488
|
+
#
|
489
|
+
# # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange.
|
490
|
+
# p result
|
491
|
+
#
|
492
|
+
def create_data_exchange request, options = nil
|
493
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
494
|
+
|
495
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateDataExchangeRequest
|
496
|
+
|
497
|
+
# Converts hash and nil to an options object
|
498
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
499
|
+
|
500
|
+
# Customize the options with defaults
|
501
|
+
metadata = @config.rpcs.create_data_exchange.metadata.to_h
|
502
|
+
|
503
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
504
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
505
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
506
|
+
gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION
|
507
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
508
|
+
|
509
|
+
header_params = {}
|
510
|
+
if request.parent
|
511
|
+
header_params["parent"] = request.parent
|
512
|
+
end
|
513
|
+
|
514
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
515
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
516
|
+
|
517
|
+
options.apply_defaults timeout: @config.rpcs.create_data_exchange.timeout,
|
518
|
+
metadata: metadata,
|
519
|
+
retry_policy: @config.rpcs.create_data_exchange.retry_policy
|
520
|
+
|
521
|
+
options.apply_defaults timeout: @config.timeout,
|
522
|
+
metadata: @config.metadata,
|
523
|
+
retry_policy: @config.retry_policy
|
524
|
+
|
525
|
+
@analytics_hub_service_stub.call_rpc :create_data_exchange, request, options: options do |response, operation|
|
526
|
+
yield response, operation if block_given?
|
527
|
+
return response
|
528
|
+
end
|
529
|
+
rescue ::GRPC::BadStatus => e
|
530
|
+
raise ::Google::Cloud::Error.from_error(e)
|
531
|
+
end
|
532
|
+
|
533
|
+
##
|
534
|
+
# Updates an existing data exchange.
|
535
|
+
#
|
536
|
+
# @overload update_data_exchange(request, options = nil)
|
537
|
+
# Pass arguments to `update_data_exchange` via a request object, either of type
|
538
|
+
# {::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest} or an equivalent Hash.
|
539
|
+
#
|
540
|
+
# @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest, ::Hash]
|
541
|
+
# A request object representing the call parameters. Required. To specify no
|
542
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
543
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
544
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
545
|
+
#
|
546
|
+
# @overload update_data_exchange(update_mask: nil, data_exchange: nil)
|
547
|
+
# Pass arguments to `update_data_exchange` via keyword arguments. Note that at
|
548
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
549
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
550
|
+
#
|
551
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
552
|
+
# Required. Field mask specifies the fields to update in the data exchange
|
553
|
+
# resource. The fields specified in the
|
554
|
+
# `updateMask` are relative to the resource and are not a full request.
|
555
|
+
# @param data_exchange [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange, ::Hash]
|
556
|
+
# Required. The data exchange to update.
|
557
|
+
#
|
558
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
559
|
+
# @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange]
|
560
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
561
|
+
#
|
562
|
+
# @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange]
|
563
|
+
#
|
564
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
565
|
+
#
|
566
|
+
# @example Basic example
|
567
|
+
# require "google/cloud/bigquery/analytics_hub/v1"
|
568
|
+
#
|
569
|
+
# # Create a client object. The client can be reused for multiple calls.
|
570
|
+
# client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new
|
571
|
+
#
|
572
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
573
|
+
# request = Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest.new
|
574
|
+
#
|
575
|
+
# # Call the update_data_exchange method.
|
576
|
+
# result = client.update_data_exchange request
|
577
|
+
#
|
578
|
+
# # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::DataExchange.
|
579
|
+
# p result
|
580
|
+
#
|
581
|
+
def update_data_exchange request, options = nil
|
582
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
583
|
+
|
584
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateDataExchangeRequest
|
585
|
+
|
586
|
+
# Converts hash and nil to an options object
|
587
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
588
|
+
|
589
|
+
# Customize the options with defaults
|
590
|
+
metadata = @config.rpcs.update_data_exchange.metadata.to_h
|
591
|
+
|
592
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
593
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
594
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
595
|
+
gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION
|
596
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
597
|
+
|
598
|
+
header_params = {}
|
599
|
+
if request.data_exchange&.name
|
600
|
+
header_params["data_exchange.name"] = request.data_exchange.name
|
601
|
+
end
|
602
|
+
|
603
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
604
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
605
|
+
|
606
|
+
options.apply_defaults timeout: @config.rpcs.update_data_exchange.timeout,
|
607
|
+
metadata: metadata,
|
608
|
+
retry_policy: @config.rpcs.update_data_exchange.retry_policy
|
609
|
+
|
610
|
+
options.apply_defaults timeout: @config.timeout,
|
611
|
+
metadata: @config.metadata,
|
612
|
+
retry_policy: @config.retry_policy
|
613
|
+
|
614
|
+
@analytics_hub_service_stub.call_rpc :update_data_exchange, request, options: options do |response, operation|
|
615
|
+
yield response, operation if block_given?
|
616
|
+
return response
|
617
|
+
end
|
618
|
+
rescue ::GRPC::BadStatus => e
|
619
|
+
raise ::Google::Cloud::Error.from_error(e)
|
620
|
+
end
|
621
|
+
|
622
|
+
##
|
623
|
+
# Deletes an existing data exchange.
|
624
|
+
#
|
625
|
+
# @overload delete_data_exchange(request, options = nil)
|
626
|
+
# Pass arguments to `delete_data_exchange` via a request object, either of type
|
627
|
+
# {::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest} or an equivalent Hash.
|
628
|
+
#
|
629
|
+
# @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest, ::Hash]
|
630
|
+
# A request object representing the call parameters. Required. To specify no
|
631
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
632
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
633
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
634
|
+
#
|
635
|
+
# @overload delete_data_exchange(name: nil)
|
636
|
+
# Pass arguments to `delete_data_exchange` via keyword arguments. Note that at
|
637
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
638
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
639
|
+
#
|
640
|
+
# @param name [::String]
|
641
|
+
# Required. The full name of the data exchange resource that you want to delete.
|
642
|
+
# For example, `projects/myproject/locations/US/dataExchanges/123`.
|
643
|
+
#
|
644
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
645
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
646
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
647
|
+
#
|
648
|
+
# @return [::Google::Protobuf::Empty]
|
649
|
+
#
|
650
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
651
|
+
#
|
652
|
+
# @example Basic example
|
653
|
+
# require "google/cloud/bigquery/analytics_hub/v1"
|
654
|
+
#
|
655
|
+
# # Create a client object. The client can be reused for multiple calls.
|
656
|
+
# client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new
|
657
|
+
#
|
658
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
659
|
+
# request = Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest.new
|
660
|
+
#
|
661
|
+
# # Call the delete_data_exchange method.
|
662
|
+
# result = client.delete_data_exchange request
|
663
|
+
#
|
664
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
665
|
+
# p result
|
666
|
+
#
|
667
|
+
def delete_data_exchange request, options = nil
|
668
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
669
|
+
|
670
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteDataExchangeRequest
|
671
|
+
|
672
|
+
# Converts hash and nil to an options object
|
673
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
674
|
+
|
675
|
+
# Customize the options with defaults
|
676
|
+
metadata = @config.rpcs.delete_data_exchange.metadata.to_h
|
677
|
+
|
678
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
679
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
680
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
681
|
+
gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION
|
682
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
683
|
+
|
684
|
+
header_params = {}
|
685
|
+
if request.name
|
686
|
+
header_params["name"] = request.name
|
687
|
+
end
|
688
|
+
|
689
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
690
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
691
|
+
|
692
|
+
options.apply_defaults timeout: @config.rpcs.delete_data_exchange.timeout,
|
693
|
+
metadata: metadata,
|
694
|
+
retry_policy: @config.rpcs.delete_data_exchange.retry_policy
|
695
|
+
|
696
|
+
options.apply_defaults timeout: @config.timeout,
|
697
|
+
metadata: @config.metadata,
|
698
|
+
retry_policy: @config.retry_policy
|
699
|
+
|
700
|
+
@analytics_hub_service_stub.call_rpc :delete_data_exchange, request, options: options do |response, operation|
|
701
|
+
yield response, operation if block_given?
|
702
|
+
return response
|
703
|
+
end
|
704
|
+
rescue ::GRPC::BadStatus => e
|
705
|
+
raise ::Google::Cloud::Error.from_error(e)
|
706
|
+
end
|
707
|
+
|
708
|
+
##
|
709
|
+
# Lists all listings in a given project and location.
|
710
|
+
#
|
711
|
+
# @overload list_listings(request, options = nil)
|
712
|
+
# Pass arguments to `list_listings` via a request object, either of type
|
713
|
+
# {::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest} or an equivalent Hash.
|
714
|
+
#
|
715
|
+
# @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest, ::Hash]
|
716
|
+
# A request object representing the call parameters. Required. To specify no
|
717
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
718
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
719
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
720
|
+
#
|
721
|
+
# @overload list_listings(parent: nil, page_size: nil, page_token: nil)
|
722
|
+
# Pass arguments to `list_listings` via keyword arguments. Note that at
|
723
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
724
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
725
|
+
#
|
726
|
+
# @param parent [::String]
|
727
|
+
# Required. The parent resource path of the listing.
|
728
|
+
# e.g. `projects/myproject/locations/US/dataExchanges/123`.
|
729
|
+
# @param page_size [::Integer]
|
730
|
+
# The maximum number of results to return in a single response page. Leverage
|
731
|
+
# the page tokens to iterate through the entire collection.
|
732
|
+
# @param page_token [::String]
|
733
|
+
# Page token, returned by a previous call, to request the next page of
|
734
|
+
# results.
|
735
|
+
#
|
736
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
737
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing>]
|
738
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
739
|
+
#
|
740
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing>]
|
741
|
+
#
|
742
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
743
|
+
#
|
744
|
+
# @example Basic example
|
745
|
+
# require "google/cloud/bigquery/analytics_hub/v1"
|
746
|
+
#
|
747
|
+
# # Create a client object. The client can be reused for multiple calls.
|
748
|
+
# client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new
|
749
|
+
#
|
750
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
751
|
+
# request = Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest.new
|
752
|
+
#
|
753
|
+
# # Call the list_listings method.
|
754
|
+
# result = client.list_listings request
|
755
|
+
#
|
756
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
757
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
758
|
+
# result.each do |item|
|
759
|
+
# # Each element is of type ::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing.
|
760
|
+
# p item
|
761
|
+
# end
|
762
|
+
#
|
763
|
+
def list_listings request, options = nil
|
764
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
765
|
+
|
766
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListListingsRequest
|
767
|
+
|
768
|
+
# Converts hash and nil to an options object
|
769
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
770
|
+
|
771
|
+
# Customize the options with defaults
|
772
|
+
metadata = @config.rpcs.list_listings.metadata.to_h
|
773
|
+
|
774
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
775
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
776
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
777
|
+
gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION
|
778
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
779
|
+
|
780
|
+
header_params = {}
|
781
|
+
if request.parent
|
782
|
+
header_params["parent"] = request.parent
|
783
|
+
end
|
784
|
+
|
785
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
786
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
787
|
+
|
788
|
+
options.apply_defaults timeout: @config.rpcs.list_listings.timeout,
|
789
|
+
metadata: metadata,
|
790
|
+
retry_policy: @config.rpcs.list_listings.retry_policy
|
791
|
+
|
792
|
+
options.apply_defaults timeout: @config.timeout,
|
793
|
+
metadata: @config.metadata,
|
794
|
+
retry_policy: @config.retry_policy
|
795
|
+
|
796
|
+
@analytics_hub_service_stub.call_rpc :list_listings, request, options: options do |response, operation|
|
797
|
+
response = ::Gapic::PagedEnumerable.new @analytics_hub_service_stub, :list_listings, request, response, operation, options
|
798
|
+
yield response, operation if block_given?
|
799
|
+
return response
|
800
|
+
end
|
801
|
+
rescue ::GRPC::BadStatus => e
|
802
|
+
raise ::Google::Cloud::Error.from_error(e)
|
803
|
+
end
|
804
|
+
|
805
|
+
##
|
806
|
+
# Gets the details of a listing.
|
807
|
+
#
|
808
|
+
# @overload get_listing(request, options = nil)
|
809
|
+
# Pass arguments to `get_listing` via a request object, either of type
|
810
|
+
# {::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest} or an equivalent Hash.
|
811
|
+
#
|
812
|
+
# @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest, ::Hash]
|
813
|
+
# A request object representing the call parameters. Required. To specify no
|
814
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
815
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
816
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
817
|
+
#
|
818
|
+
# @overload get_listing(name: nil)
|
819
|
+
# Pass arguments to `get_listing` via keyword arguments. Note that at
|
820
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
821
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
822
|
+
#
|
823
|
+
# @param name [::String]
|
824
|
+
# Required. The resource name of the listing.
|
825
|
+
# e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`.
|
826
|
+
#
|
827
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
828
|
+
# @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing]
|
829
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
830
|
+
#
|
831
|
+
# @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing]
|
832
|
+
#
|
833
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
834
|
+
#
|
835
|
+
# @example Basic example
|
836
|
+
# require "google/cloud/bigquery/analytics_hub/v1"
|
837
|
+
#
|
838
|
+
# # Create a client object. The client can be reused for multiple calls.
|
839
|
+
# client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new
|
840
|
+
#
|
841
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
842
|
+
# request = Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest.new
|
843
|
+
#
|
844
|
+
# # Call the get_listing method.
|
845
|
+
# result = client.get_listing request
|
846
|
+
#
|
847
|
+
# # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::Listing.
|
848
|
+
# p result
|
849
|
+
#
|
850
|
+
def get_listing request, options = nil
|
851
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
852
|
+
|
853
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::GetListingRequest
|
854
|
+
|
855
|
+
# Converts hash and nil to an options object
|
856
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
857
|
+
|
858
|
+
# Customize the options with defaults
|
859
|
+
metadata = @config.rpcs.get_listing.metadata.to_h
|
860
|
+
|
861
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
862
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
863
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
864
|
+
gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION
|
865
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
866
|
+
|
867
|
+
header_params = {}
|
868
|
+
if request.name
|
869
|
+
header_params["name"] = request.name
|
870
|
+
end
|
871
|
+
|
872
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
873
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
874
|
+
|
875
|
+
options.apply_defaults timeout: @config.rpcs.get_listing.timeout,
|
876
|
+
metadata: metadata,
|
877
|
+
retry_policy: @config.rpcs.get_listing.retry_policy
|
878
|
+
|
879
|
+
options.apply_defaults timeout: @config.timeout,
|
880
|
+
metadata: @config.metadata,
|
881
|
+
retry_policy: @config.retry_policy
|
882
|
+
|
883
|
+
@analytics_hub_service_stub.call_rpc :get_listing, request, options: options do |response, operation|
|
884
|
+
yield response, operation if block_given?
|
885
|
+
return response
|
886
|
+
end
|
887
|
+
rescue ::GRPC::BadStatus => e
|
888
|
+
raise ::Google::Cloud::Error.from_error(e)
|
889
|
+
end
|
890
|
+
|
891
|
+
##
|
892
|
+
# Creates a new listing.
|
893
|
+
#
|
894
|
+
# @overload create_listing(request, options = nil)
|
895
|
+
# Pass arguments to `create_listing` via a request object, either of type
|
896
|
+
# {::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest} or an equivalent Hash.
|
897
|
+
#
|
898
|
+
# @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest, ::Hash]
|
899
|
+
# A request object representing the call parameters. Required. To specify no
|
900
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
901
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
902
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
903
|
+
#
|
904
|
+
# @overload create_listing(parent: nil, listing_id: nil, listing: nil)
|
905
|
+
# Pass arguments to `create_listing` via keyword arguments. Note that at
|
906
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
907
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
908
|
+
#
|
909
|
+
# @param parent [::String]
|
910
|
+
# Required. The parent resource path of the listing.
|
911
|
+
# e.g. `projects/myproject/locations/US/dataExchanges/123`.
|
912
|
+
# @param listing_id [::String]
|
913
|
+
# Required. The ID of the listing to create.
|
914
|
+
# Must contain only Unicode letters, numbers (0-9), underscores (_).
|
915
|
+
# Should not use characters that require URL-escaping, or characters
|
916
|
+
# outside of ASCII, spaces.
|
917
|
+
# Max length: 100 bytes.
|
918
|
+
# @param listing [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing, ::Hash]
|
919
|
+
# Required. The listing to create.
|
920
|
+
#
|
921
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
922
|
+
# @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing]
|
923
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
924
|
+
#
|
925
|
+
# @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing]
|
926
|
+
#
|
927
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
928
|
+
#
|
929
|
+
# @example Basic example
|
930
|
+
# require "google/cloud/bigquery/analytics_hub/v1"
|
931
|
+
#
|
932
|
+
# # Create a client object. The client can be reused for multiple calls.
|
933
|
+
# client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new
|
934
|
+
#
|
935
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
936
|
+
# request = Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest.new
|
937
|
+
#
|
938
|
+
# # Call the create_listing method.
|
939
|
+
# result = client.create_listing request
|
940
|
+
#
|
941
|
+
# # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::Listing.
|
942
|
+
# p result
|
943
|
+
#
|
944
|
+
def create_listing request, options = nil
|
945
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
946
|
+
|
947
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateListingRequest
|
948
|
+
|
949
|
+
# Converts hash and nil to an options object
|
950
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
951
|
+
|
952
|
+
# Customize the options with defaults
|
953
|
+
metadata = @config.rpcs.create_listing.metadata.to_h
|
954
|
+
|
955
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
956
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
957
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
958
|
+
gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION
|
959
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
960
|
+
|
961
|
+
header_params = {}
|
962
|
+
if request.parent
|
963
|
+
header_params["parent"] = request.parent
|
964
|
+
end
|
965
|
+
|
966
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
967
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
968
|
+
|
969
|
+
options.apply_defaults timeout: @config.rpcs.create_listing.timeout,
|
970
|
+
metadata: metadata,
|
971
|
+
retry_policy: @config.rpcs.create_listing.retry_policy
|
972
|
+
|
973
|
+
options.apply_defaults timeout: @config.timeout,
|
974
|
+
metadata: @config.metadata,
|
975
|
+
retry_policy: @config.retry_policy
|
976
|
+
|
977
|
+
@analytics_hub_service_stub.call_rpc :create_listing, request, options: options do |response, operation|
|
978
|
+
yield response, operation if block_given?
|
979
|
+
return response
|
980
|
+
end
|
981
|
+
rescue ::GRPC::BadStatus => e
|
982
|
+
raise ::Google::Cloud::Error.from_error(e)
|
983
|
+
end
|
984
|
+
|
985
|
+
##
|
986
|
+
# Updates an existing listing.
|
987
|
+
#
|
988
|
+
# @overload update_listing(request, options = nil)
|
989
|
+
# Pass arguments to `update_listing` via a request object, either of type
|
990
|
+
# {::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest} or an equivalent Hash.
|
991
|
+
#
|
992
|
+
# @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest, ::Hash]
|
993
|
+
# A request object representing the call parameters. Required. To specify no
|
994
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
995
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
996
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
997
|
+
#
|
998
|
+
# @overload update_listing(update_mask: nil, listing: nil)
|
999
|
+
# Pass arguments to `update_listing` via keyword arguments. Note that at
|
1000
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1001
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1002
|
+
#
|
1003
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
1004
|
+
# Required. Field mask specifies the fields to update in the listing resource. The
|
1005
|
+
# fields specified in the `updateMask` are relative to the resource and are
|
1006
|
+
# not a full request.
|
1007
|
+
# @param listing [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing, ::Hash]
|
1008
|
+
# Required. The listing to update.
|
1009
|
+
#
|
1010
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1011
|
+
# @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing]
|
1012
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1013
|
+
#
|
1014
|
+
# @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::Listing]
|
1015
|
+
#
|
1016
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1017
|
+
#
|
1018
|
+
# @example Basic example
|
1019
|
+
# require "google/cloud/bigquery/analytics_hub/v1"
|
1020
|
+
#
|
1021
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1022
|
+
# client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new
|
1023
|
+
#
|
1024
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1025
|
+
# request = Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest.new
|
1026
|
+
#
|
1027
|
+
# # Call the update_listing method.
|
1028
|
+
# result = client.update_listing request
|
1029
|
+
#
|
1030
|
+
# # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::Listing.
|
1031
|
+
# p result
|
1032
|
+
#
|
1033
|
+
def update_listing request, options = nil
|
1034
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1035
|
+
|
1036
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateListingRequest
|
1037
|
+
|
1038
|
+
# Converts hash and nil to an options object
|
1039
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1040
|
+
|
1041
|
+
# Customize the options with defaults
|
1042
|
+
metadata = @config.rpcs.update_listing.metadata.to_h
|
1043
|
+
|
1044
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1045
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1046
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1047
|
+
gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION
|
1048
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1049
|
+
|
1050
|
+
header_params = {}
|
1051
|
+
if request.listing&.name
|
1052
|
+
header_params["listing.name"] = request.listing.name
|
1053
|
+
end
|
1054
|
+
|
1055
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1056
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1057
|
+
|
1058
|
+
options.apply_defaults timeout: @config.rpcs.update_listing.timeout,
|
1059
|
+
metadata: metadata,
|
1060
|
+
retry_policy: @config.rpcs.update_listing.retry_policy
|
1061
|
+
|
1062
|
+
options.apply_defaults timeout: @config.timeout,
|
1063
|
+
metadata: @config.metadata,
|
1064
|
+
retry_policy: @config.retry_policy
|
1065
|
+
|
1066
|
+
@analytics_hub_service_stub.call_rpc :update_listing, request, options: options do |response, operation|
|
1067
|
+
yield response, operation if block_given?
|
1068
|
+
return response
|
1069
|
+
end
|
1070
|
+
rescue ::GRPC::BadStatus => e
|
1071
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1072
|
+
end
|
1073
|
+
|
1074
|
+
##
|
1075
|
+
# Deletes a listing.
|
1076
|
+
#
|
1077
|
+
# @overload delete_listing(request, options = nil)
|
1078
|
+
# Pass arguments to `delete_listing` via a request object, either of type
|
1079
|
+
# {::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest} or an equivalent Hash.
|
1080
|
+
#
|
1081
|
+
# @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest, ::Hash]
|
1082
|
+
# A request object representing the call parameters. Required. To specify no
|
1083
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1084
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1085
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1086
|
+
#
|
1087
|
+
# @overload delete_listing(name: nil)
|
1088
|
+
# Pass arguments to `delete_listing` via keyword arguments. Note that at
|
1089
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1090
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1091
|
+
#
|
1092
|
+
# @param name [::String]
|
1093
|
+
# Required. Resource name of the listing to delete.
|
1094
|
+
# e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`.
|
1095
|
+
#
|
1096
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1097
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
1098
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1099
|
+
#
|
1100
|
+
# @return [::Google::Protobuf::Empty]
|
1101
|
+
#
|
1102
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1103
|
+
#
|
1104
|
+
# @example Basic example
|
1105
|
+
# require "google/cloud/bigquery/analytics_hub/v1"
|
1106
|
+
#
|
1107
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1108
|
+
# client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new
|
1109
|
+
#
|
1110
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1111
|
+
# request = Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest.new
|
1112
|
+
#
|
1113
|
+
# # Call the delete_listing method.
|
1114
|
+
# result = client.delete_listing request
|
1115
|
+
#
|
1116
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
1117
|
+
# p result
|
1118
|
+
#
|
1119
|
+
def delete_listing request, options = nil
|
1120
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1121
|
+
|
1122
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteListingRequest
|
1123
|
+
|
1124
|
+
# Converts hash and nil to an options object
|
1125
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1126
|
+
|
1127
|
+
# Customize the options with defaults
|
1128
|
+
metadata = @config.rpcs.delete_listing.metadata.to_h
|
1129
|
+
|
1130
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1131
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1132
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1133
|
+
gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION
|
1134
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1135
|
+
|
1136
|
+
header_params = {}
|
1137
|
+
if request.name
|
1138
|
+
header_params["name"] = request.name
|
1139
|
+
end
|
1140
|
+
|
1141
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1142
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1143
|
+
|
1144
|
+
options.apply_defaults timeout: @config.rpcs.delete_listing.timeout,
|
1145
|
+
metadata: metadata,
|
1146
|
+
retry_policy: @config.rpcs.delete_listing.retry_policy
|
1147
|
+
|
1148
|
+
options.apply_defaults timeout: @config.timeout,
|
1149
|
+
metadata: @config.metadata,
|
1150
|
+
retry_policy: @config.retry_policy
|
1151
|
+
|
1152
|
+
@analytics_hub_service_stub.call_rpc :delete_listing, request, options: options do |response, operation|
|
1153
|
+
yield response, operation if block_given?
|
1154
|
+
return response
|
1155
|
+
end
|
1156
|
+
rescue ::GRPC::BadStatus => e
|
1157
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1158
|
+
end
|
1159
|
+
|
1160
|
+
##
|
1161
|
+
# Subscribes to a listing.
|
1162
|
+
#
|
1163
|
+
# Currently, with Analytics Hub, you can create listings that
|
1164
|
+
# reference only BigQuery datasets.
|
1165
|
+
# Upon subscription to a listing for a BigQuery dataset, Analytics Hub
|
1166
|
+
# creates a linked dataset in the subscriber's project.
|
1167
|
+
#
|
1168
|
+
# @overload subscribe_listing(request, options = nil)
|
1169
|
+
# Pass arguments to `subscribe_listing` via a request object, either of type
|
1170
|
+
# {::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest} or an equivalent Hash.
|
1171
|
+
#
|
1172
|
+
# @param request [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest, ::Hash]
|
1173
|
+
# A request object representing the call parameters. Required. To specify no
|
1174
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1175
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1176
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1177
|
+
#
|
1178
|
+
# @overload subscribe_listing(destination_dataset: nil, name: nil)
|
1179
|
+
# Pass arguments to `subscribe_listing` via keyword arguments. Note that at
|
1180
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1181
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1182
|
+
#
|
1183
|
+
# @param destination_dataset [::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationDataset, ::Hash]
|
1184
|
+
# BigQuery destination dataset to create for the subscriber.
|
1185
|
+
# @param name [::String]
|
1186
|
+
# Required. Resource name of the listing that you want to subscribe to.
|
1187
|
+
# e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`.
|
1188
|
+
#
|
1189
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1190
|
+
# @yieldparam response [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse]
|
1191
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1192
|
+
#
|
1193
|
+
# @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse]
|
1194
|
+
#
|
1195
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1196
|
+
#
|
1197
|
+
# @example Basic example
|
1198
|
+
# require "google/cloud/bigquery/analytics_hub/v1"
|
1199
|
+
#
|
1200
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1201
|
+
# client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new
|
1202
|
+
#
|
1203
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1204
|
+
# request = Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest.new
|
1205
|
+
#
|
1206
|
+
# # Call the subscribe_listing method.
|
1207
|
+
# result = client.subscribe_listing request
|
1208
|
+
#
|
1209
|
+
# # The returned object is of type Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingResponse.
|
1210
|
+
# p result
|
1211
|
+
#
|
1212
|
+
def subscribe_listing request, options = nil
|
1213
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1214
|
+
|
1215
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::AnalyticsHub::V1::SubscribeListingRequest
|
1216
|
+
|
1217
|
+
# Converts hash and nil to an options object
|
1218
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1219
|
+
|
1220
|
+
# Customize the options with defaults
|
1221
|
+
metadata = @config.rpcs.subscribe_listing.metadata.to_h
|
1222
|
+
|
1223
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1224
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1225
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1226
|
+
gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION
|
1227
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1228
|
+
|
1229
|
+
header_params = {}
|
1230
|
+
if request.name
|
1231
|
+
header_params["name"] = request.name
|
1232
|
+
end
|
1233
|
+
|
1234
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1235
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1236
|
+
|
1237
|
+
options.apply_defaults timeout: @config.rpcs.subscribe_listing.timeout,
|
1238
|
+
metadata: metadata,
|
1239
|
+
retry_policy: @config.rpcs.subscribe_listing.retry_policy
|
1240
|
+
|
1241
|
+
options.apply_defaults timeout: @config.timeout,
|
1242
|
+
metadata: @config.metadata,
|
1243
|
+
retry_policy: @config.retry_policy
|
1244
|
+
|
1245
|
+
@analytics_hub_service_stub.call_rpc :subscribe_listing, request, options: options do |response, operation|
|
1246
|
+
yield response, operation if block_given?
|
1247
|
+
return response
|
1248
|
+
end
|
1249
|
+
rescue ::GRPC::BadStatus => e
|
1250
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1251
|
+
end
|
1252
|
+
|
1253
|
+
##
|
1254
|
+
# Gets the IAM policy.
|
1255
|
+
#
|
1256
|
+
# @overload get_iam_policy(request, options = nil)
|
1257
|
+
# Pass arguments to `get_iam_policy` via a request object, either of type
|
1258
|
+
# {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash.
|
1259
|
+
#
|
1260
|
+
# @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash]
|
1261
|
+
# A request object representing the call parameters. Required. To specify no
|
1262
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1263
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1264
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1265
|
+
#
|
1266
|
+
# @overload get_iam_policy(resource: nil, options: nil)
|
1267
|
+
# Pass arguments to `get_iam_policy` via keyword arguments. Note that at
|
1268
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1269
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1270
|
+
#
|
1271
|
+
# @param resource [::String]
|
1272
|
+
# REQUIRED: The resource for which the policy is being requested.
|
1273
|
+
# See the operation documentation for the appropriate value for this field.
|
1274
|
+
# @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash]
|
1275
|
+
# OPTIONAL: A `GetPolicyOptions` object for specifying options to
|
1276
|
+
# `GetIamPolicy`.
|
1277
|
+
#
|
1278
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1279
|
+
# @yieldparam response [::Google::Iam::V1::Policy]
|
1280
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1281
|
+
#
|
1282
|
+
# @return [::Google::Iam::V1::Policy]
|
1283
|
+
#
|
1284
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1285
|
+
#
|
1286
|
+
# @example Basic example
|
1287
|
+
# require "google/cloud/bigquery/analytics_hub/v1"
|
1288
|
+
#
|
1289
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1290
|
+
# client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new
|
1291
|
+
#
|
1292
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1293
|
+
# request = Google::Iam::V1::GetIamPolicyRequest.new
|
1294
|
+
#
|
1295
|
+
# # Call the get_iam_policy method.
|
1296
|
+
# result = client.get_iam_policy request
|
1297
|
+
#
|
1298
|
+
# # The returned object is of type Google::Iam::V1::Policy.
|
1299
|
+
# p result
|
1300
|
+
#
|
1301
|
+
def get_iam_policy request, options = nil
|
1302
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1303
|
+
|
1304
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest
|
1305
|
+
|
1306
|
+
# Converts hash and nil to an options object
|
1307
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1308
|
+
|
1309
|
+
# Customize the options with defaults
|
1310
|
+
metadata = @config.rpcs.get_iam_policy.metadata.to_h
|
1311
|
+
|
1312
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1313
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1314
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1315
|
+
gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION
|
1316
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1317
|
+
|
1318
|
+
header_params = {}
|
1319
|
+
if request.resource
|
1320
|
+
header_params["resource"] = request.resource
|
1321
|
+
end
|
1322
|
+
|
1323
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1324
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1325
|
+
|
1326
|
+
options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
|
1327
|
+
metadata: metadata,
|
1328
|
+
retry_policy: @config.rpcs.get_iam_policy.retry_policy
|
1329
|
+
|
1330
|
+
options.apply_defaults timeout: @config.timeout,
|
1331
|
+
metadata: @config.metadata,
|
1332
|
+
retry_policy: @config.retry_policy
|
1333
|
+
|
1334
|
+
@analytics_hub_service_stub.call_rpc :get_iam_policy, request, options: options do |response, operation|
|
1335
|
+
yield response, operation if block_given?
|
1336
|
+
return response
|
1337
|
+
end
|
1338
|
+
rescue ::GRPC::BadStatus => e
|
1339
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1340
|
+
end
|
1341
|
+
|
1342
|
+
##
|
1343
|
+
# Sets the IAM policy.
|
1344
|
+
#
|
1345
|
+
# @overload set_iam_policy(request, options = nil)
|
1346
|
+
# Pass arguments to `set_iam_policy` via a request object, either of type
|
1347
|
+
# {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash.
|
1348
|
+
#
|
1349
|
+
# @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash]
|
1350
|
+
# A request object representing the call parameters. Required. To specify no
|
1351
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1352
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1353
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1354
|
+
#
|
1355
|
+
# @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil)
|
1356
|
+
# Pass arguments to `set_iam_policy` via keyword arguments. Note that at
|
1357
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1358
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1359
|
+
#
|
1360
|
+
# @param resource [::String]
|
1361
|
+
# REQUIRED: The resource for which the policy is being specified.
|
1362
|
+
# See the operation documentation for the appropriate value for this field.
|
1363
|
+
# @param policy [::Google::Iam::V1::Policy, ::Hash]
|
1364
|
+
# REQUIRED: The complete policy to be applied to the `resource`. The size of
|
1365
|
+
# the policy is limited to a few 10s of KB. An empty policy is a
|
1366
|
+
# valid policy but certain Cloud Platform services (such as Projects)
|
1367
|
+
# might reject them.
|
1368
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
1369
|
+
# OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
|
1370
|
+
# the fields in the mask will be modified. If no mask is provided, the
|
1371
|
+
# following default mask is used:
|
1372
|
+
#
|
1373
|
+
# `paths: "bindings, etag"`
|
1374
|
+
#
|
1375
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1376
|
+
# @yieldparam response [::Google::Iam::V1::Policy]
|
1377
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1378
|
+
#
|
1379
|
+
# @return [::Google::Iam::V1::Policy]
|
1380
|
+
#
|
1381
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1382
|
+
#
|
1383
|
+
# @example Basic example
|
1384
|
+
# require "google/cloud/bigquery/analytics_hub/v1"
|
1385
|
+
#
|
1386
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1387
|
+
# client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new
|
1388
|
+
#
|
1389
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1390
|
+
# request = Google::Iam::V1::SetIamPolicyRequest.new
|
1391
|
+
#
|
1392
|
+
# # Call the set_iam_policy method.
|
1393
|
+
# result = client.set_iam_policy request
|
1394
|
+
#
|
1395
|
+
# # The returned object is of type Google::Iam::V1::Policy.
|
1396
|
+
# p result
|
1397
|
+
#
|
1398
|
+
def set_iam_policy request, options = nil
|
1399
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1400
|
+
|
1401
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest
|
1402
|
+
|
1403
|
+
# Converts hash and nil to an options object
|
1404
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1405
|
+
|
1406
|
+
# Customize the options with defaults
|
1407
|
+
metadata = @config.rpcs.set_iam_policy.metadata.to_h
|
1408
|
+
|
1409
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1410
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1411
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1412
|
+
gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION
|
1413
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1414
|
+
|
1415
|
+
header_params = {}
|
1416
|
+
if request.resource
|
1417
|
+
header_params["resource"] = request.resource
|
1418
|
+
end
|
1419
|
+
|
1420
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1421
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1422
|
+
|
1423
|
+
options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
|
1424
|
+
metadata: metadata,
|
1425
|
+
retry_policy: @config.rpcs.set_iam_policy.retry_policy
|
1426
|
+
|
1427
|
+
options.apply_defaults timeout: @config.timeout,
|
1428
|
+
metadata: @config.metadata,
|
1429
|
+
retry_policy: @config.retry_policy
|
1430
|
+
|
1431
|
+
@analytics_hub_service_stub.call_rpc :set_iam_policy, request, options: options do |response, operation|
|
1432
|
+
yield response, operation if block_given?
|
1433
|
+
return response
|
1434
|
+
end
|
1435
|
+
rescue ::GRPC::BadStatus => e
|
1436
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1437
|
+
end
|
1438
|
+
|
1439
|
+
##
|
1440
|
+
# Returns the permissions that a caller has.
|
1441
|
+
#
|
1442
|
+
# @overload test_iam_permissions(request, options = nil)
|
1443
|
+
# Pass arguments to `test_iam_permissions` via a request object, either of type
|
1444
|
+
# {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash.
|
1445
|
+
#
|
1446
|
+
# @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash]
|
1447
|
+
# A request object representing the call parameters. Required. To specify no
|
1448
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1449
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1450
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1451
|
+
#
|
1452
|
+
# @overload test_iam_permissions(resource: nil, permissions: nil)
|
1453
|
+
# Pass arguments to `test_iam_permissions` via keyword arguments. Note that at
|
1454
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1455
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1456
|
+
#
|
1457
|
+
# @param resource [::String]
|
1458
|
+
# REQUIRED: The resource for which the policy detail is being requested.
|
1459
|
+
# See the operation documentation for the appropriate value for this field.
|
1460
|
+
# @param permissions [::Array<::String>]
|
1461
|
+
# The set of permissions to check for the `resource`. Permissions with
|
1462
|
+
# wildcards (such as '*' or 'storage.*') are not allowed. For more
|
1463
|
+
# information see
|
1464
|
+
# [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
|
1465
|
+
#
|
1466
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1467
|
+
# @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse]
|
1468
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1469
|
+
#
|
1470
|
+
# @return [::Google::Iam::V1::TestIamPermissionsResponse]
|
1471
|
+
#
|
1472
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1473
|
+
#
|
1474
|
+
# @example Basic example
|
1475
|
+
# require "google/cloud/bigquery/analytics_hub/v1"
|
1476
|
+
#
|
1477
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1478
|
+
# client = Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new
|
1479
|
+
#
|
1480
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1481
|
+
# request = Google::Iam::V1::TestIamPermissionsRequest.new
|
1482
|
+
#
|
1483
|
+
# # Call the test_iam_permissions method.
|
1484
|
+
# result = client.test_iam_permissions request
|
1485
|
+
#
|
1486
|
+
# # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse.
|
1487
|
+
# p result
|
1488
|
+
#
|
1489
|
+
def test_iam_permissions request, options = nil
|
1490
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1491
|
+
|
1492
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest
|
1493
|
+
|
1494
|
+
# Converts hash and nil to an options object
|
1495
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1496
|
+
|
1497
|
+
# Customize the options with defaults
|
1498
|
+
metadata = @config.rpcs.test_iam_permissions.metadata.to_h
|
1499
|
+
|
1500
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1501
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1502
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1503
|
+
gapic_version: ::Google::Cloud::Bigquery::AnalyticsHub::V1::VERSION
|
1504
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1505
|
+
|
1506
|
+
header_params = {}
|
1507
|
+
if request.resource
|
1508
|
+
header_params["resource"] = request.resource
|
1509
|
+
end
|
1510
|
+
|
1511
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1512
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1513
|
+
|
1514
|
+
options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
|
1515
|
+
metadata: metadata,
|
1516
|
+
retry_policy: @config.rpcs.test_iam_permissions.retry_policy
|
1517
|
+
|
1518
|
+
options.apply_defaults timeout: @config.timeout,
|
1519
|
+
metadata: @config.metadata,
|
1520
|
+
retry_policy: @config.retry_policy
|
1521
|
+
|
1522
|
+
@analytics_hub_service_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation|
|
1523
|
+
yield response, operation if block_given?
|
1524
|
+
return response
|
1525
|
+
end
|
1526
|
+
rescue ::GRPC::BadStatus => e
|
1527
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1528
|
+
end
|
1529
|
+
|
1530
|
+
##
|
1531
|
+
# Configuration class for the AnalyticsHubService API.
|
1532
|
+
#
|
1533
|
+
# This class represents the configuration for AnalyticsHubService,
|
1534
|
+
# providing control over timeouts, retry behavior, logging, transport
|
1535
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
1536
|
+
# applied individually to specific RPCs. See
|
1537
|
+
# {::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client::Configuration::Rpcs}
|
1538
|
+
# for a list of RPCs that can be configured independently.
|
1539
|
+
#
|
1540
|
+
# Configuration can be applied globally to all clients, or to a single client
|
1541
|
+
# on construction.
|
1542
|
+
#
|
1543
|
+
# @example
|
1544
|
+
#
|
1545
|
+
# # Modify the global config, setting the timeout for
|
1546
|
+
# # list_data_exchanges to 20 seconds,
|
1547
|
+
# # and all remaining timeouts to 10 seconds.
|
1548
|
+
# ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.configure do |config|
|
1549
|
+
# config.timeout = 10.0
|
1550
|
+
# config.rpcs.list_data_exchanges.timeout = 20.0
|
1551
|
+
# end
|
1552
|
+
#
|
1553
|
+
# # Apply the above configuration only to a new client.
|
1554
|
+
# client = ::Google::Cloud::Bigquery::AnalyticsHub::V1::AnalyticsHubService::Client.new do |config|
|
1555
|
+
# config.timeout = 10.0
|
1556
|
+
# config.rpcs.list_data_exchanges.timeout = 20.0
|
1557
|
+
# end
|
1558
|
+
#
|
1559
|
+
# @!attribute [rw] endpoint
|
1560
|
+
# The hostname or hostname:port of the service endpoint.
|
1561
|
+
# Defaults to `"analyticshub.googleapis.com"`.
|
1562
|
+
# @return [::String]
|
1563
|
+
# @!attribute [rw] credentials
|
1564
|
+
# Credentials to send with calls. You may provide any of the following types:
|
1565
|
+
# * (`String`) The path to a service account key file in JSON format
|
1566
|
+
# * (`Hash`) A service account key as a Hash
|
1567
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
1568
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
1569
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
1570
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
1571
|
+
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
1572
|
+
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
1573
|
+
# * (`nil`) indicating no credentials
|
1574
|
+
# @return [::Object]
|
1575
|
+
# @!attribute [rw] scope
|
1576
|
+
# The OAuth scopes
|
1577
|
+
# @return [::Array<::String>]
|
1578
|
+
# @!attribute [rw] lib_name
|
1579
|
+
# The library name as recorded in instrumentation and logging
|
1580
|
+
# @return [::String]
|
1581
|
+
# @!attribute [rw] lib_version
|
1582
|
+
# The library version as recorded in instrumentation and logging
|
1583
|
+
# @return [::String]
|
1584
|
+
# @!attribute [rw] channel_args
|
1585
|
+
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
1586
|
+
# `GRPC::Core::Channel` object is provided as the credential.
|
1587
|
+
# @return [::Hash]
|
1588
|
+
# @!attribute [rw] interceptors
|
1589
|
+
# An array of interceptors that are run before calls are executed.
|
1590
|
+
# @return [::Array<::GRPC::ClientInterceptor>]
|
1591
|
+
# @!attribute [rw] timeout
|
1592
|
+
# The call timeout in seconds.
|
1593
|
+
# @return [::Numeric]
|
1594
|
+
# @!attribute [rw] metadata
|
1595
|
+
# Additional gRPC headers to be sent with the call.
|
1596
|
+
# @return [::Hash{::Symbol=>::String}]
|
1597
|
+
# @!attribute [rw] retry_policy
|
1598
|
+
# The retry policy. The value is a hash with the following keys:
|
1599
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
1600
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
1601
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
1602
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
1603
|
+
# trigger a retry.
|
1604
|
+
# @return [::Hash]
|
1605
|
+
# @!attribute [rw] quota_project
|
1606
|
+
# A separate project against which to charge quota.
|
1607
|
+
# @return [::String]
|
1608
|
+
#
|
1609
|
+
class Configuration
|
1610
|
+
extend ::Gapic::Config
|
1611
|
+
|
1612
|
+
DEFAULT_ENDPOINT = "analyticshub.googleapis.com"
|
1613
|
+
|
1614
|
+
config_attr :endpoint, DEFAULT_ENDPOINT, ::String
|
1615
|
+
config_attr :credentials, nil do |value|
|
1616
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
1617
|
+
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
1618
|
+
allowed.any? { |klass| klass === value }
|
1619
|
+
end
|
1620
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
1621
|
+
config_attr :lib_name, nil, ::String, nil
|
1622
|
+
config_attr :lib_version, nil, ::String, nil
|
1623
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
|
1624
|
+
config_attr :interceptors, nil, ::Array, nil
|
1625
|
+
config_attr :timeout, nil, ::Numeric, nil
|
1626
|
+
config_attr :metadata, nil, ::Hash, nil
|
1627
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1628
|
+
config_attr :quota_project, nil, ::String, nil
|
1629
|
+
|
1630
|
+
# @private
|
1631
|
+
def initialize parent_config = nil
|
1632
|
+
@parent_config = parent_config unless parent_config.nil?
|
1633
|
+
|
1634
|
+
yield self if block_given?
|
1635
|
+
end
|
1636
|
+
|
1637
|
+
##
|
1638
|
+
# Configurations for individual RPCs
|
1639
|
+
# @return [Rpcs]
|
1640
|
+
#
|
1641
|
+
def rpcs
|
1642
|
+
@rpcs ||= begin
|
1643
|
+
parent_rpcs = nil
|
1644
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
1645
|
+
Rpcs.new parent_rpcs
|
1646
|
+
end
|
1647
|
+
end
|
1648
|
+
|
1649
|
+
##
|
1650
|
+
# Configuration RPC class for the AnalyticsHubService API.
|
1651
|
+
#
|
1652
|
+
# Includes fields providing the configuration for each RPC in this service.
|
1653
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
1654
|
+
# the following configuration fields:
|
1655
|
+
#
|
1656
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
1657
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
1658
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
1659
|
+
# include the following keys:
|
1660
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
1661
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
1662
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
1663
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
1664
|
+
# trigger a retry.
|
1665
|
+
#
|
1666
|
+
class Rpcs
|
1667
|
+
##
|
1668
|
+
# RPC-specific configuration for `list_data_exchanges`
|
1669
|
+
# @return [::Gapic::Config::Method]
|
1670
|
+
#
|
1671
|
+
attr_reader :list_data_exchanges
|
1672
|
+
##
|
1673
|
+
# RPC-specific configuration for `list_org_data_exchanges`
|
1674
|
+
# @return [::Gapic::Config::Method]
|
1675
|
+
#
|
1676
|
+
attr_reader :list_org_data_exchanges
|
1677
|
+
##
|
1678
|
+
# RPC-specific configuration for `get_data_exchange`
|
1679
|
+
# @return [::Gapic::Config::Method]
|
1680
|
+
#
|
1681
|
+
attr_reader :get_data_exchange
|
1682
|
+
##
|
1683
|
+
# RPC-specific configuration for `create_data_exchange`
|
1684
|
+
# @return [::Gapic::Config::Method]
|
1685
|
+
#
|
1686
|
+
attr_reader :create_data_exchange
|
1687
|
+
##
|
1688
|
+
# RPC-specific configuration for `update_data_exchange`
|
1689
|
+
# @return [::Gapic::Config::Method]
|
1690
|
+
#
|
1691
|
+
attr_reader :update_data_exchange
|
1692
|
+
##
|
1693
|
+
# RPC-specific configuration for `delete_data_exchange`
|
1694
|
+
# @return [::Gapic::Config::Method]
|
1695
|
+
#
|
1696
|
+
attr_reader :delete_data_exchange
|
1697
|
+
##
|
1698
|
+
# RPC-specific configuration for `list_listings`
|
1699
|
+
# @return [::Gapic::Config::Method]
|
1700
|
+
#
|
1701
|
+
attr_reader :list_listings
|
1702
|
+
##
|
1703
|
+
# RPC-specific configuration for `get_listing`
|
1704
|
+
# @return [::Gapic::Config::Method]
|
1705
|
+
#
|
1706
|
+
attr_reader :get_listing
|
1707
|
+
##
|
1708
|
+
# RPC-specific configuration for `create_listing`
|
1709
|
+
# @return [::Gapic::Config::Method]
|
1710
|
+
#
|
1711
|
+
attr_reader :create_listing
|
1712
|
+
##
|
1713
|
+
# RPC-specific configuration for `update_listing`
|
1714
|
+
# @return [::Gapic::Config::Method]
|
1715
|
+
#
|
1716
|
+
attr_reader :update_listing
|
1717
|
+
##
|
1718
|
+
# RPC-specific configuration for `delete_listing`
|
1719
|
+
# @return [::Gapic::Config::Method]
|
1720
|
+
#
|
1721
|
+
attr_reader :delete_listing
|
1722
|
+
##
|
1723
|
+
# RPC-specific configuration for `subscribe_listing`
|
1724
|
+
# @return [::Gapic::Config::Method]
|
1725
|
+
#
|
1726
|
+
attr_reader :subscribe_listing
|
1727
|
+
##
|
1728
|
+
# RPC-specific configuration for `get_iam_policy`
|
1729
|
+
# @return [::Gapic::Config::Method]
|
1730
|
+
#
|
1731
|
+
attr_reader :get_iam_policy
|
1732
|
+
##
|
1733
|
+
# RPC-specific configuration for `set_iam_policy`
|
1734
|
+
# @return [::Gapic::Config::Method]
|
1735
|
+
#
|
1736
|
+
attr_reader :set_iam_policy
|
1737
|
+
##
|
1738
|
+
# RPC-specific configuration for `test_iam_permissions`
|
1739
|
+
# @return [::Gapic::Config::Method]
|
1740
|
+
#
|
1741
|
+
attr_reader :test_iam_permissions
|
1742
|
+
|
1743
|
+
# @private
|
1744
|
+
def initialize parent_rpcs = nil
|
1745
|
+
list_data_exchanges_config = parent_rpcs.list_data_exchanges if parent_rpcs.respond_to? :list_data_exchanges
|
1746
|
+
@list_data_exchanges = ::Gapic::Config::Method.new list_data_exchanges_config
|
1747
|
+
list_org_data_exchanges_config = parent_rpcs.list_org_data_exchanges if parent_rpcs.respond_to? :list_org_data_exchanges
|
1748
|
+
@list_org_data_exchanges = ::Gapic::Config::Method.new list_org_data_exchanges_config
|
1749
|
+
get_data_exchange_config = parent_rpcs.get_data_exchange if parent_rpcs.respond_to? :get_data_exchange
|
1750
|
+
@get_data_exchange = ::Gapic::Config::Method.new get_data_exchange_config
|
1751
|
+
create_data_exchange_config = parent_rpcs.create_data_exchange if parent_rpcs.respond_to? :create_data_exchange
|
1752
|
+
@create_data_exchange = ::Gapic::Config::Method.new create_data_exchange_config
|
1753
|
+
update_data_exchange_config = parent_rpcs.update_data_exchange if parent_rpcs.respond_to? :update_data_exchange
|
1754
|
+
@update_data_exchange = ::Gapic::Config::Method.new update_data_exchange_config
|
1755
|
+
delete_data_exchange_config = parent_rpcs.delete_data_exchange if parent_rpcs.respond_to? :delete_data_exchange
|
1756
|
+
@delete_data_exchange = ::Gapic::Config::Method.new delete_data_exchange_config
|
1757
|
+
list_listings_config = parent_rpcs.list_listings if parent_rpcs.respond_to? :list_listings
|
1758
|
+
@list_listings = ::Gapic::Config::Method.new list_listings_config
|
1759
|
+
get_listing_config = parent_rpcs.get_listing if parent_rpcs.respond_to? :get_listing
|
1760
|
+
@get_listing = ::Gapic::Config::Method.new get_listing_config
|
1761
|
+
create_listing_config = parent_rpcs.create_listing if parent_rpcs.respond_to? :create_listing
|
1762
|
+
@create_listing = ::Gapic::Config::Method.new create_listing_config
|
1763
|
+
update_listing_config = parent_rpcs.update_listing if parent_rpcs.respond_to? :update_listing
|
1764
|
+
@update_listing = ::Gapic::Config::Method.new update_listing_config
|
1765
|
+
delete_listing_config = parent_rpcs.delete_listing if parent_rpcs.respond_to? :delete_listing
|
1766
|
+
@delete_listing = ::Gapic::Config::Method.new delete_listing_config
|
1767
|
+
subscribe_listing_config = parent_rpcs.subscribe_listing if parent_rpcs.respond_to? :subscribe_listing
|
1768
|
+
@subscribe_listing = ::Gapic::Config::Method.new subscribe_listing_config
|
1769
|
+
get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy
|
1770
|
+
@get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
|
1771
|
+
set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy
|
1772
|
+
@set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
|
1773
|
+
test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
|
1774
|
+
@test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
|
1775
|
+
|
1776
|
+
yield self if block_given?
|
1777
|
+
end
|
1778
|
+
end
|
1779
|
+
end
|
1780
|
+
end
|
1781
|
+
end
|
1782
|
+
end
|
1783
|
+
end
|
1784
|
+
end
|
1785
|
+
end
|
1786
|
+
end
|