google-apis-analyticshub_v1 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,702 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module AnalyticshubV1
23
+ # Analytics Hub API
24
+ #
25
+ # Exchange data and analytics assets securely and efficiently.
26
+ #
27
+ # @example
28
+ # require 'google/apis/analyticshub_v1'
29
+ #
30
+ # Analyticshub = Google::Apis::AnalyticshubV1 # Alias the module
31
+ # service = Analyticshub::AnalyticsHubService.new
32
+ #
33
+ # @see https://cloud.google.com/bigquery/docs/analytics-hub-introduction
34
+ class AnalyticsHubService < Google::Apis::Core::BaseService
35
+ # @return [String]
36
+ # API key. Your API key identifies your project and provides you with API access,
37
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
38
+ attr_accessor :key
39
+
40
+ # @return [String]
41
+ # Available to use for quota purposes for server-side applications. Can be any
42
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
43
+ attr_accessor :quota_user
44
+
45
+ def initialize
46
+ super('https://analyticshub.googleapis.com/', '',
47
+ client_name: 'google-apis-analyticshub_v1',
48
+ client_version: Google::Apis::AnalyticshubV1::GEM_VERSION)
49
+ @batch_path = 'batch'
50
+ end
51
+
52
+ # Lists all data exchanges from projects in a given organization and location.
53
+ # @param [String] organization
54
+ # Required. The organization resource path of the projects containing
55
+ # DataExchanges. e.g. `organizations/myorg/locations/US`.
56
+ # @param [Fixnum] page_size
57
+ # The maximum number of results to return in a single response page. Leverage
58
+ # the page tokens to iterate through the entire collection.
59
+ # @param [String] page_token
60
+ # Page token, returned by a previous call, to request the next page of results.
61
+ # @param [String] fields
62
+ # Selector specifying which fields to include in a partial response.
63
+ # @param [String] quota_user
64
+ # Available to use for quota purposes for server-side applications. Can be any
65
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
66
+ # @param [Google::Apis::RequestOptions] options
67
+ # Request-specific options
68
+ #
69
+ # @yield [result, err] Result & error if block supplied
70
+ # @yieldparam result [Google::Apis::AnalyticshubV1::ListOrgDataExchangesResponse] parsed result object
71
+ # @yieldparam err [StandardError] error object if request failed
72
+ #
73
+ # @return [Google::Apis::AnalyticshubV1::ListOrgDataExchangesResponse]
74
+ #
75
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
76
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
77
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
78
+ def list_organization_location_data_exchanges(organization, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
79
+ command = make_simple_command(:get, 'v1/{+organization}/dataExchanges', options)
80
+ command.response_representation = Google::Apis::AnalyticshubV1::ListOrgDataExchangesResponse::Representation
81
+ command.response_class = Google::Apis::AnalyticshubV1::ListOrgDataExchangesResponse
82
+ command.params['organization'] = organization unless organization.nil?
83
+ command.query['pageSize'] = page_size unless page_size.nil?
84
+ command.query['pageToken'] = page_token unless page_token.nil?
85
+ command.query['fields'] = fields unless fields.nil?
86
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
87
+ execute_or_queue_command(command, &block)
88
+ end
89
+
90
+ # Creates a new data exchange.
91
+ # @param [String] parent
92
+ # Required. The parent resource path of the data exchange. e.g. `projects/
93
+ # myproject/locations/US`.
94
+ # @param [Google::Apis::AnalyticshubV1::DataExchange] data_exchange_object
95
+ # @param [String] data_exchange_id
96
+ # Required. The ID of the data exchange. Must contain only Unicode letters,
97
+ # numbers (0-9), underscores (_). Should not use characters that require URL-
98
+ # escaping, or characters outside of ASCII, spaces. Max length: 100 bytes.
99
+ # @param [String] fields
100
+ # Selector specifying which fields to include in a partial response.
101
+ # @param [String] quota_user
102
+ # Available to use for quota purposes for server-side applications. Can be any
103
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
104
+ # @param [Google::Apis::RequestOptions] options
105
+ # Request-specific options
106
+ #
107
+ # @yield [result, err] Result & error if block supplied
108
+ # @yieldparam result [Google::Apis::AnalyticshubV1::DataExchange] parsed result object
109
+ # @yieldparam err [StandardError] error object if request failed
110
+ #
111
+ # @return [Google::Apis::AnalyticshubV1::DataExchange]
112
+ #
113
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
114
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
115
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
116
+ def create_project_location_data_exchange(parent, data_exchange_object = nil, data_exchange_id: nil, fields: nil, quota_user: nil, options: nil, &block)
117
+ command = make_simple_command(:post, 'v1/{+parent}/dataExchanges', options)
118
+ command.request_representation = Google::Apis::AnalyticshubV1::DataExchange::Representation
119
+ command.request_object = data_exchange_object
120
+ command.response_representation = Google::Apis::AnalyticshubV1::DataExchange::Representation
121
+ command.response_class = Google::Apis::AnalyticshubV1::DataExchange
122
+ command.params['parent'] = parent unless parent.nil?
123
+ command.query['dataExchangeId'] = data_exchange_id unless data_exchange_id.nil?
124
+ command.query['fields'] = fields unless fields.nil?
125
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
126
+ execute_or_queue_command(command, &block)
127
+ end
128
+
129
+ # Deletes an existing data exchange.
130
+ # @param [String] name
131
+ # Required. The full name of the data exchange resource that you want to delete.
132
+ # For example, `projects/myproject/locations/US/dataExchanges/123`.
133
+ # @param [String] fields
134
+ # Selector specifying which fields to include in a partial response.
135
+ # @param [String] quota_user
136
+ # Available to use for quota purposes for server-side applications. Can be any
137
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
138
+ # @param [Google::Apis::RequestOptions] options
139
+ # Request-specific options
140
+ #
141
+ # @yield [result, err] Result & error if block supplied
142
+ # @yieldparam result [Google::Apis::AnalyticshubV1::Empty] parsed result object
143
+ # @yieldparam err [StandardError] error object if request failed
144
+ #
145
+ # @return [Google::Apis::AnalyticshubV1::Empty]
146
+ #
147
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
148
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
149
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
150
+ def delete_project_location_data_exchange(name, fields: nil, quota_user: nil, options: nil, &block)
151
+ command = make_simple_command(:delete, 'v1/{+name}', options)
152
+ command.response_representation = Google::Apis::AnalyticshubV1::Empty::Representation
153
+ command.response_class = Google::Apis::AnalyticshubV1::Empty
154
+ command.params['name'] = name unless name.nil?
155
+ command.query['fields'] = fields unless fields.nil?
156
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
157
+ execute_or_queue_command(command, &block)
158
+ end
159
+
160
+ # Gets the details of a data exchange.
161
+ # @param [String] name
162
+ # Required. The resource name of the data exchange. e.g. `projects/myproject/
163
+ # locations/US/dataExchanges/123`.
164
+ # @param [String] fields
165
+ # Selector specifying which fields to include in a partial response.
166
+ # @param [String] quota_user
167
+ # Available to use for quota purposes for server-side applications. Can be any
168
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
169
+ # @param [Google::Apis::RequestOptions] options
170
+ # Request-specific options
171
+ #
172
+ # @yield [result, err] Result & error if block supplied
173
+ # @yieldparam result [Google::Apis::AnalyticshubV1::DataExchange] parsed result object
174
+ # @yieldparam err [StandardError] error object if request failed
175
+ #
176
+ # @return [Google::Apis::AnalyticshubV1::DataExchange]
177
+ #
178
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
179
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
180
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
181
+ def get_project_location_data_exchange(name, fields: nil, quota_user: nil, options: nil, &block)
182
+ command = make_simple_command(:get, 'v1/{+name}', options)
183
+ command.response_representation = Google::Apis::AnalyticshubV1::DataExchange::Representation
184
+ command.response_class = Google::Apis::AnalyticshubV1::DataExchange
185
+ command.params['name'] = name unless name.nil?
186
+ command.query['fields'] = fields unless fields.nil?
187
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
188
+ execute_or_queue_command(command, &block)
189
+ end
190
+
191
+ # Gets the IAM policy.
192
+ # @param [String] resource
193
+ # REQUIRED: The resource for which the policy is being requested. See [Resource
194
+ # names](https://cloud.google.com/apis/design/resource_names) for the
195
+ # appropriate value for this field.
196
+ # @param [Google::Apis::AnalyticshubV1::GetIamPolicyRequest] get_iam_policy_request_object
197
+ # @param [String] fields
198
+ # Selector specifying which fields to include in a partial response.
199
+ # @param [String] quota_user
200
+ # Available to use for quota purposes for server-side applications. Can be any
201
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
202
+ # @param [Google::Apis::RequestOptions] options
203
+ # Request-specific options
204
+ #
205
+ # @yield [result, err] Result & error if block supplied
206
+ # @yieldparam result [Google::Apis::AnalyticshubV1::Policy] parsed result object
207
+ # @yieldparam err [StandardError] error object if request failed
208
+ #
209
+ # @return [Google::Apis::AnalyticshubV1::Policy]
210
+ #
211
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
212
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
213
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
214
+ def get_data_exchange_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
215
+ command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', options)
216
+ command.request_representation = Google::Apis::AnalyticshubV1::GetIamPolicyRequest::Representation
217
+ command.request_object = get_iam_policy_request_object
218
+ command.response_representation = Google::Apis::AnalyticshubV1::Policy::Representation
219
+ command.response_class = Google::Apis::AnalyticshubV1::Policy
220
+ command.params['resource'] = resource unless resource.nil?
221
+ command.query['fields'] = fields unless fields.nil?
222
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
223
+ execute_or_queue_command(command, &block)
224
+ end
225
+
226
+ # Lists all data exchanges in a given project and location.
227
+ # @param [String] parent
228
+ # Required. The parent resource path of the data exchanges. e.g. `projects/
229
+ # myproject/locations/US`.
230
+ # @param [Fixnum] page_size
231
+ # The maximum number of results to return in a single response page. Leverage
232
+ # the page tokens to iterate through the entire collection.
233
+ # @param [String] page_token
234
+ # Page token, returned by a previous call, to request the next page of results.
235
+ # @param [String] fields
236
+ # Selector specifying which fields to include in a partial response.
237
+ # @param [String] quota_user
238
+ # Available to use for quota purposes for server-side applications. Can be any
239
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
240
+ # @param [Google::Apis::RequestOptions] options
241
+ # Request-specific options
242
+ #
243
+ # @yield [result, err] Result & error if block supplied
244
+ # @yieldparam result [Google::Apis::AnalyticshubV1::ListDataExchangesResponse] parsed result object
245
+ # @yieldparam err [StandardError] error object if request failed
246
+ #
247
+ # @return [Google::Apis::AnalyticshubV1::ListDataExchangesResponse]
248
+ #
249
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
250
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
251
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
252
+ def list_project_location_data_exchanges(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
253
+ command = make_simple_command(:get, 'v1/{+parent}/dataExchanges', options)
254
+ command.response_representation = Google::Apis::AnalyticshubV1::ListDataExchangesResponse::Representation
255
+ command.response_class = Google::Apis::AnalyticshubV1::ListDataExchangesResponse
256
+ command.params['parent'] = parent unless parent.nil?
257
+ command.query['pageSize'] = page_size unless page_size.nil?
258
+ command.query['pageToken'] = page_token unless page_token.nil?
259
+ command.query['fields'] = fields unless fields.nil?
260
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
261
+ execute_or_queue_command(command, &block)
262
+ end
263
+
264
+ # Updates an existing data exchange.
265
+ # @param [String] name
266
+ # Output only. The resource name of the data exchange. e.g. `projects/myproject/
267
+ # locations/US/dataExchanges/123`.
268
+ # @param [Google::Apis::AnalyticshubV1::DataExchange] data_exchange_object
269
+ # @param [String] update_mask
270
+ # Required. Field mask specifies the fields to update in the data exchange
271
+ # resource. The fields specified in the `updateMask` are relative to the
272
+ # resource and are not a full request.
273
+ # @param [String] fields
274
+ # Selector specifying which fields to include in a partial response.
275
+ # @param [String] quota_user
276
+ # Available to use for quota purposes for server-side applications. Can be any
277
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
278
+ # @param [Google::Apis::RequestOptions] options
279
+ # Request-specific options
280
+ #
281
+ # @yield [result, err] Result & error if block supplied
282
+ # @yieldparam result [Google::Apis::AnalyticshubV1::DataExchange] parsed result object
283
+ # @yieldparam err [StandardError] error object if request failed
284
+ #
285
+ # @return [Google::Apis::AnalyticshubV1::DataExchange]
286
+ #
287
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
288
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
289
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
290
+ def patch_project_location_data_exchange(name, data_exchange_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
291
+ command = make_simple_command(:patch, 'v1/{+name}', options)
292
+ command.request_representation = Google::Apis::AnalyticshubV1::DataExchange::Representation
293
+ command.request_object = data_exchange_object
294
+ command.response_representation = Google::Apis::AnalyticshubV1::DataExchange::Representation
295
+ command.response_class = Google::Apis::AnalyticshubV1::DataExchange
296
+ command.params['name'] = name unless name.nil?
297
+ command.query['updateMask'] = update_mask unless update_mask.nil?
298
+ command.query['fields'] = fields unless fields.nil?
299
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
300
+ execute_or_queue_command(command, &block)
301
+ end
302
+
303
+ # Sets the IAM policy.
304
+ # @param [String] resource
305
+ # REQUIRED: The resource for which the policy is being specified. See [Resource
306
+ # names](https://cloud.google.com/apis/design/resource_names) for the
307
+ # appropriate value for this field.
308
+ # @param [Google::Apis::AnalyticshubV1::SetIamPolicyRequest] set_iam_policy_request_object
309
+ # @param [String] fields
310
+ # Selector specifying which fields to include in a partial response.
311
+ # @param [String] quota_user
312
+ # Available to use for quota purposes for server-side applications. Can be any
313
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
314
+ # @param [Google::Apis::RequestOptions] options
315
+ # Request-specific options
316
+ #
317
+ # @yield [result, err] Result & error if block supplied
318
+ # @yieldparam result [Google::Apis::AnalyticshubV1::Policy] parsed result object
319
+ # @yieldparam err [StandardError] error object if request failed
320
+ #
321
+ # @return [Google::Apis::AnalyticshubV1::Policy]
322
+ #
323
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
324
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
325
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
326
+ def set_data_exchange_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
327
+ command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
328
+ command.request_representation = Google::Apis::AnalyticshubV1::SetIamPolicyRequest::Representation
329
+ command.request_object = set_iam_policy_request_object
330
+ command.response_representation = Google::Apis::AnalyticshubV1::Policy::Representation
331
+ command.response_class = Google::Apis::AnalyticshubV1::Policy
332
+ command.params['resource'] = resource unless resource.nil?
333
+ command.query['fields'] = fields unless fields.nil?
334
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
335
+ execute_or_queue_command(command, &block)
336
+ end
337
+
338
+ # Returns the permissions that a caller has.
339
+ # @param [String] resource
340
+ # REQUIRED: The resource for which the policy detail is being requested. See [
341
+ # Resource names](https://cloud.google.com/apis/design/resource_names) for the
342
+ # appropriate value for this field.
343
+ # @param [Google::Apis::AnalyticshubV1::TestIamPermissionsRequest] test_iam_permissions_request_object
344
+ # @param [String] fields
345
+ # Selector specifying which fields to include in a partial response.
346
+ # @param [String] quota_user
347
+ # Available to use for quota purposes for server-side applications. Can be any
348
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
349
+ # @param [Google::Apis::RequestOptions] options
350
+ # Request-specific options
351
+ #
352
+ # @yield [result, err] Result & error if block supplied
353
+ # @yieldparam result [Google::Apis::AnalyticshubV1::TestIamPermissionsResponse] parsed result object
354
+ # @yieldparam err [StandardError] error object if request failed
355
+ #
356
+ # @return [Google::Apis::AnalyticshubV1::TestIamPermissionsResponse]
357
+ #
358
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
359
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
360
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
361
+ def test_data_exchange_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
362
+ command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
363
+ command.request_representation = Google::Apis::AnalyticshubV1::TestIamPermissionsRequest::Representation
364
+ command.request_object = test_iam_permissions_request_object
365
+ command.response_representation = Google::Apis::AnalyticshubV1::TestIamPermissionsResponse::Representation
366
+ command.response_class = Google::Apis::AnalyticshubV1::TestIamPermissionsResponse
367
+ command.params['resource'] = resource unless resource.nil?
368
+ command.query['fields'] = fields unless fields.nil?
369
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
370
+ execute_or_queue_command(command, &block)
371
+ end
372
+
373
+ # Creates a new listing.
374
+ # @param [String] parent
375
+ # Required. The parent resource path of the listing. e.g. `projects/myproject/
376
+ # locations/US/dataExchanges/123`.
377
+ # @param [Google::Apis::AnalyticshubV1::Listing] listing_object
378
+ # @param [String] listing_id
379
+ # Required. The ID of the listing to create. Must contain only Unicode letters,
380
+ # numbers (0-9), underscores (_). Should not use characters that require URL-
381
+ # escaping, or characters outside of ASCII, spaces. Max length: 100 bytes.
382
+ # @param [String] fields
383
+ # Selector specifying which fields to include in a partial response.
384
+ # @param [String] quota_user
385
+ # Available to use for quota purposes for server-side applications. Can be any
386
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
387
+ # @param [Google::Apis::RequestOptions] options
388
+ # Request-specific options
389
+ #
390
+ # @yield [result, err] Result & error if block supplied
391
+ # @yieldparam result [Google::Apis::AnalyticshubV1::Listing] parsed result object
392
+ # @yieldparam err [StandardError] error object if request failed
393
+ #
394
+ # @return [Google::Apis::AnalyticshubV1::Listing]
395
+ #
396
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
397
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
398
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
399
+ def create_project_location_data_exchange_listing(parent, listing_object = nil, listing_id: nil, fields: nil, quota_user: nil, options: nil, &block)
400
+ command = make_simple_command(:post, 'v1/{+parent}/listings', options)
401
+ command.request_representation = Google::Apis::AnalyticshubV1::Listing::Representation
402
+ command.request_object = listing_object
403
+ command.response_representation = Google::Apis::AnalyticshubV1::Listing::Representation
404
+ command.response_class = Google::Apis::AnalyticshubV1::Listing
405
+ command.params['parent'] = parent unless parent.nil?
406
+ command.query['listingId'] = listing_id unless listing_id.nil?
407
+ command.query['fields'] = fields unless fields.nil?
408
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
409
+ execute_or_queue_command(command, &block)
410
+ end
411
+
412
+ # Deletes a listing.
413
+ # @param [String] name
414
+ # Required. Resource name of the listing to delete. e.g. `projects/myproject/
415
+ # locations/US/dataExchanges/123/listings/456`.
416
+ # @param [String] fields
417
+ # Selector specifying which fields to include in a partial response.
418
+ # @param [String] quota_user
419
+ # Available to use for quota purposes for server-side applications. Can be any
420
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
421
+ # @param [Google::Apis::RequestOptions] options
422
+ # Request-specific options
423
+ #
424
+ # @yield [result, err] Result & error if block supplied
425
+ # @yieldparam result [Google::Apis::AnalyticshubV1::Empty] parsed result object
426
+ # @yieldparam err [StandardError] error object if request failed
427
+ #
428
+ # @return [Google::Apis::AnalyticshubV1::Empty]
429
+ #
430
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
431
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
432
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
433
+ def delete_project_location_data_exchange_listing(name, fields: nil, quota_user: nil, options: nil, &block)
434
+ command = make_simple_command(:delete, 'v1/{+name}', options)
435
+ command.response_representation = Google::Apis::AnalyticshubV1::Empty::Representation
436
+ command.response_class = Google::Apis::AnalyticshubV1::Empty
437
+ command.params['name'] = name unless name.nil?
438
+ command.query['fields'] = fields unless fields.nil?
439
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
440
+ execute_or_queue_command(command, &block)
441
+ end
442
+
443
+ # Gets the details of a listing.
444
+ # @param [String] name
445
+ # Required. The resource name of the listing. e.g. `projects/myproject/locations/
446
+ # US/dataExchanges/123/listings/456`.
447
+ # @param [String] fields
448
+ # Selector specifying which fields to include in a partial response.
449
+ # @param [String] quota_user
450
+ # Available to use for quota purposes for server-side applications. Can be any
451
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
452
+ # @param [Google::Apis::RequestOptions] options
453
+ # Request-specific options
454
+ #
455
+ # @yield [result, err] Result & error if block supplied
456
+ # @yieldparam result [Google::Apis::AnalyticshubV1::Listing] parsed result object
457
+ # @yieldparam err [StandardError] error object if request failed
458
+ #
459
+ # @return [Google::Apis::AnalyticshubV1::Listing]
460
+ #
461
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
462
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
463
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
464
+ def get_project_location_data_exchange_listing(name, fields: nil, quota_user: nil, options: nil, &block)
465
+ command = make_simple_command(:get, 'v1/{+name}', options)
466
+ command.response_representation = Google::Apis::AnalyticshubV1::Listing::Representation
467
+ command.response_class = Google::Apis::AnalyticshubV1::Listing
468
+ command.params['name'] = name unless name.nil?
469
+ command.query['fields'] = fields unless fields.nil?
470
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
471
+ execute_or_queue_command(command, &block)
472
+ end
473
+
474
+ # Gets the IAM policy.
475
+ # @param [String] resource
476
+ # REQUIRED: The resource for which the policy is being requested. See [Resource
477
+ # names](https://cloud.google.com/apis/design/resource_names) for the
478
+ # appropriate value for this field.
479
+ # @param [Google::Apis::AnalyticshubV1::GetIamPolicyRequest] get_iam_policy_request_object
480
+ # @param [String] fields
481
+ # Selector specifying which fields to include in a partial response.
482
+ # @param [String] quota_user
483
+ # Available to use for quota purposes for server-side applications. Can be any
484
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
485
+ # @param [Google::Apis::RequestOptions] options
486
+ # Request-specific options
487
+ #
488
+ # @yield [result, err] Result & error if block supplied
489
+ # @yieldparam result [Google::Apis::AnalyticshubV1::Policy] parsed result object
490
+ # @yieldparam err [StandardError] error object if request failed
491
+ #
492
+ # @return [Google::Apis::AnalyticshubV1::Policy]
493
+ #
494
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
495
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
496
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
497
+ def get_listing_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
498
+ command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', options)
499
+ command.request_representation = Google::Apis::AnalyticshubV1::GetIamPolicyRequest::Representation
500
+ command.request_object = get_iam_policy_request_object
501
+ command.response_representation = Google::Apis::AnalyticshubV1::Policy::Representation
502
+ command.response_class = Google::Apis::AnalyticshubV1::Policy
503
+ command.params['resource'] = resource unless resource.nil?
504
+ command.query['fields'] = fields unless fields.nil?
505
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
506
+ execute_or_queue_command(command, &block)
507
+ end
508
+
509
+ # Lists all listings in a given project and location.
510
+ # @param [String] parent
511
+ # Required. The parent resource path of the listing. e.g. `projects/myproject/
512
+ # locations/US/dataExchanges/123`.
513
+ # @param [Fixnum] page_size
514
+ # The maximum number of results to return in a single response page. Leverage
515
+ # the page tokens to iterate through the entire collection.
516
+ # @param [String] page_token
517
+ # Page token, returned by a previous call, to request the next page of results.
518
+ # @param [String] fields
519
+ # Selector specifying which fields to include in a partial response.
520
+ # @param [String] quota_user
521
+ # Available to use for quota purposes for server-side applications. Can be any
522
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
523
+ # @param [Google::Apis::RequestOptions] options
524
+ # Request-specific options
525
+ #
526
+ # @yield [result, err] Result & error if block supplied
527
+ # @yieldparam result [Google::Apis::AnalyticshubV1::ListListingsResponse] parsed result object
528
+ # @yieldparam err [StandardError] error object if request failed
529
+ #
530
+ # @return [Google::Apis::AnalyticshubV1::ListListingsResponse]
531
+ #
532
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
533
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
534
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
535
+ def list_project_location_data_exchange_listings(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
536
+ command = make_simple_command(:get, 'v1/{+parent}/listings', options)
537
+ command.response_representation = Google::Apis::AnalyticshubV1::ListListingsResponse::Representation
538
+ command.response_class = Google::Apis::AnalyticshubV1::ListListingsResponse
539
+ command.params['parent'] = parent unless parent.nil?
540
+ command.query['pageSize'] = page_size unless page_size.nil?
541
+ command.query['pageToken'] = page_token unless page_token.nil?
542
+ command.query['fields'] = fields unless fields.nil?
543
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
544
+ execute_or_queue_command(command, &block)
545
+ end
546
+
547
+ # Updates an existing listing.
548
+ # @param [String] name
549
+ # Output only. The resource name of the listing. e.g. `projects/myproject/
550
+ # locations/US/dataExchanges/123/listings/456`
551
+ # @param [Google::Apis::AnalyticshubV1::Listing] listing_object
552
+ # @param [String] update_mask
553
+ # Required. Field mask specifies the fields to update in the listing resource.
554
+ # The fields specified in the `updateMask` are relative to the resource and are
555
+ # not a full request.
556
+ # @param [String] fields
557
+ # Selector specifying which fields to include in a partial response.
558
+ # @param [String] quota_user
559
+ # Available to use for quota purposes for server-side applications. Can be any
560
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
561
+ # @param [Google::Apis::RequestOptions] options
562
+ # Request-specific options
563
+ #
564
+ # @yield [result, err] Result & error if block supplied
565
+ # @yieldparam result [Google::Apis::AnalyticshubV1::Listing] parsed result object
566
+ # @yieldparam err [StandardError] error object if request failed
567
+ #
568
+ # @return [Google::Apis::AnalyticshubV1::Listing]
569
+ #
570
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
571
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
572
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
573
+ def patch_project_location_data_exchange_listing(name, listing_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
574
+ command = make_simple_command(:patch, 'v1/{+name}', options)
575
+ command.request_representation = Google::Apis::AnalyticshubV1::Listing::Representation
576
+ command.request_object = listing_object
577
+ command.response_representation = Google::Apis::AnalyticshubV1::Listing::Representation
578
+ command.response_class = Google::Apis::AnalyticshubV1::Listing
579
+ command.params['name'] = name unless name.nil?
580
+ command.query['updateMask'] = update_mask unless update_mask.nil?
581
+ command.query['fields'] = fields unless fields.nil?
582
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
583
+ execute_or_queue_command(command, &block)
584
+ end
585
+
586
+ # Sets the IAM policy.
587
+ # @param [String] resource
588
+ # REQUIRED: The resource for which the policy is being specified. See [Resource
589
+ # names](https://cloud.google.com/apis/design/resource_names) for the
590
+ # appropriate value for this field.
591
+ # @param [Google::Apis::AnalyticshubV1::SetIamPolicyRequest] set_iam_policy_request_object
592
+ # @param [String] fields
593
+ # Selector specifying which fields to include in a partial response.
594
+ # @param [String] quota_user
595
+ # Available to use for quota purposes for server-side applications. Can be any
596
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
597
+ # @param [Google::Apis::RequestOptions] options
598
+ # Request-specific options
599
+ #
600
+ # @yield [result, err] Result & error if block supplied
601
+ # @yieldparam result [Google::Apis::AnalyticshubV1::Policy] parsed result object
602
+ # @yieldparam err [StandardError] error object if request failed
603
+ #
604
+ # @return [Google::Apis::AnalyticshubV1::Policy]
605
+ #
606
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
607
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
608
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
609
+ def set_listing_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
610
+ command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
611
+ command.request_representation = Google::Apis::AnalyticshubV1::SetIamPolicyRequest::Representation
612
+ command.request_object = set_iam_policy_request_object
613
+ command.response_representation = Google::Apis::AnalyticshubV1::Policy::Representation
614
+ command.response_class = Google::Apis::AnalyticshubV1::Policy
615
+ command.params['resource'] = resource unless resource.nil?
616
+ command.query['fields'] = fields unless fields.nil?
617
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
618
+ execute_or_queue_command(command, &block)
619
+ end
620
+
621
+ # Subscribes to a listing. Currently, with Analytics Hub, you can create
622
+ # listings that reference only BigQuery datasets. Upon subscription to a listing
623
+ # for a BigQuery dataset, Analytics Hub creates a linked dataset in the
624
+ # subscriber's project.
625
+ # @param [String] name
626
+ # Required. Resource name of the listing that you want to subscribe to. e.g. `
627
+ # projects/myproject/locations/US/dataExchanges/123/listings/456`.
628
+ # @param [Google::Apis::AnalyticshubV1::SubscribeListingRequest] subscribe_listing_request_object
629
+ # @param [String] fields
630
+ # Selector specifying which fields to include in a partial response.
631
+ # @param [String] quota_user
632
+ # Available to use for quota purposes for server-side applications. Can be any
633
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
634
+ # @param [Google::Apis::RequestOptions] options
635
+ # Request-specific options
636
+ #
637
+ # @yield [result, err] Result & error if block supplied
638
+ # @yieldparam result [Google::Apis::AnalyticshubV1::SubscribeListingResponse] parsed result object
639
+ # @yieldparam err [StandardError] error object if request failed
640
+ #
641
+ # @return [Google::Apis::AnalyticshubV1::SubscribeListingResponse]
642
+ #
643
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
644
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
645
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
646
+ def subscribe_listing(name, subscribe_listing_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
647
+ command = make_simple_command(:post, 'v1/{+name}:subscribe', options)
648
+ command.request_representation = Google::Apis::AnalyticshubV1::SubscribeListingRequest::Representation
649
+ command.request_object = subscribe_listing_request_object
650
+ command.response_representation = Google::Apis::AnalyticshubV1::SubscribeListingResponse::Representation
651
+ command.response_class = Google::Apis::AnalyticshubV1::SubscribeListingResponse
652
+ command.params['name'] = name unless name.nil?
653
+ command.query['fields'] = fields unless fields.nil?
654
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
655
+ execute_or_queue_command(command, &block)
656
+ end
657
+
658
+ # Returns the permissions that a caller has.
659
+ # @param [String] resource
660
+ # REQUIRED: The resource for which the policy detail is being requested. See [
661
+ # Resource names](https://cloud.google.com/apis/design/resource_names) for the
662
+ # appropriate value for this field.
663
+ # @param [Google::Apis::AnalyticshubV1::TestIamPermissionsRequest] test_iam_permissions_request_object
664
+ # @param [String] fields
665
+ # Selector specifying which fields to include in a partial response.
666
+ # @param [String] quota_user
667
+ # Available to use for quota purposes for server-side applications. Can be any
668
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
669
+ # @param [Google::Apis::RequestOptions] options
670
+ # Request-specific options
671
+ #
672
+ # @yield [result, err] Result & error if block supplied
673
+ # @yieldparam result [Google::Apis::AnalyticshubV1::TestIamPermissionsResponse] parsed result object
674
+ # @yieldparam err [StandardError] error object if request failed
675
+ #
676
+ # @return [Google::Apis::AnalyticshubV1::TestIamPermissionsResponse]
677
+ #
678
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
679
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
680
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
681
+ def test_listing_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
682
+ command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
683
+ command.request_representation = Google::Apis::AnalyticshubV1::TestIamPermissionsRequest::Representation
684
+ command.request_object = test_iam_permissions_request_object
685
+ command.response_representation = Google::Apis::AnalyticshubV1::TestIamPermissionsResponse::Representation
686
+ command.response_class = Google::Apis::AnalyticshubV1::TestIamPermissionsResponse
687
+ command.params['resource'] = resource unless resource.nil?
688
+ command.query['fields'] = fields unless fields.nil?
689
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
690
+ execute_or_queue_command(command, &block)
691
+ end
692
+
693
+ protected
694
+
695
+ def apply_command_defaults(command)
696
+ command.query['key'] = key unless key.nil?
697
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
698
+ end
699
+ end
700
+ end
701
+ end
702
+ end