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