google-apis-analyticshub_v1beta1 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,769 @@
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 AnalyticshubV1beta1
23
+ # Analytics Hub API
24
+ #
25
+ # Exchange data and analytics assets securely and efficiently.
26
+ #
27
+ # @example
28
+ # require 'google/apis/analyticshub_v1beta1'
29
+ #
30
+ # Analyticshub = Google::Apis::AnalyticshubV1beta1 # 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_v1beta1',
48
+ client_version: Google::Apis::AnalyticshubV1beta1::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::AnalyticshubV1beta1::ListOrgDataExchangesResponse] parsed result object
71
+ # @yieldparam err [StandardError] error object if request failed
72
+ #
73
+ # @return [Google::Apis::AnalyticshubV1beta1::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, 'v1beta1/{+organization}/dataExchanges', options)
80
+ command.response_representation = Google::Apis::AnalyticshubV1beta1::ListOrgDataExchangesResponse::Representation
81
+ command.response_class = Google::Apis::AnalyticshubV1beta1::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
+ # Gets information about a location.
91
+ # @param [String] name
92
+ # Resource name for the location.
93
+ # @param [String] fields
94
+ # Selector specifying which fields to include in a partial response.
95
+ # @param [String] quota_user
96
+ # Available to use for quota purposes for server-side applications. Can be any
97
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
98
+ # @param [Google::Apis::RequestOptions] options
99
+ # Request-specific options
100
+ #
101
+ # @yield [result, err] Result & error if block supplied
102
+ # @yieldparam result [Google::Apis::AnalyticshubV1beta1::Location] parsed result object
103
+ # @yieldparam err [StandardError] error object if request failed
104
+ #
105
+ # @return [Google::Apis::AnalyticshubV1beta1::Location]
106
+ #
107
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
108
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
109
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
110
+ def get_project_location(name, fields: nil, quota_user: nil, options: nil, &block)
111
+ command = make_simple_command(:get, 'v1beta1/{+name}', options)
112
+ command.response_representation = Google::Apis::AnalyticshubV1beta1::Location::Representation
113
+ command.response_class = Google::Apis::AnalyticshubV1beta1::Location
114
+ command.params['name'] = name unless name.nil?
115
+ command.query['fields'] = fields unless fields.nil?
116
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
117
+ execute_or_queue_command(command, &block)
118
+ end
119
+
120
+ # Lists information about the supported locations for this service.
121
+ # @param [String] name
122
+ # The resource that owns the locations collection, if applicable.
123
+ # @param [String] filter
124
+ # A filter to narrow down results to a preferred subset. The filtering language
125
+ # accepts strings like `"displayName=tokyo"`, and is documented in more detail
126
+ # in [AIP-160](https://google.aip.dev/160).
127
+ # @param [Fixnum] page_size
128
+ # The maximum number of results to return. If not set, the service selects a
129
+ # default.
130
+ # @param [String] page_token
131
+ # A page token received from the `next_page_token` field in the response. Send
132
+ # that page token to receive the subsequent page.
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::AnalyticshubV1beta1::ListLocationsResponse] parsed result object
143
+ # @yieldparam err [StandardError] error object if request failed
144
+ #
145
+ # @return [Google::Apis::AnalyticshubV1beta1::ListLocationsResponse]
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 list_project_locations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
151
+ command = make_simple_command(:get, 'v1beta1/{+name}/locations', options)
152
+ command.response_representation = Google::Apis::AnalyticshubV1beta1::ListLocationsResponse::Representation
153
+ command.response_class = Google::Apis::AnalyticshubV1beta1::ListLocationsResponse
154
+ command.params['name'] = name unless name.nil?
155
+ command.query['filter'] = filter unless filter.nil?
156
+ command.query['pageSize'] = page_size unless page_size.nil?
157
+ command.query['pageToken'] = page_token unless page_token.nil?
158
+ command.query['fields'] = fields unless fields.nil?
159
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
160
+ execute_or_queue_command(command, &block)
161
+ end
162
+
163
+ # Creates a new data exchange.
164
+ # @param [String] parent
165
+ # Required. The parent resource path of the data exchange. e.g. `projects/
166
+ # myproject/locations/US`.
167
+ # @param [Google::Apis::AnalyticshubV1beta1::DataExchange] data_exchange_object
168
+ # @param [String] data_exchange_id
169
+ # Required. The ID of the data exchange. Must contain only Unicode letters,
170
+ # numbers (0-9), underscores (_). Should not use characters that require URL-
171
+ # escaping, or characters outside of ASCII, spaces. Max length: 100 bytes.
172
+ # @param [String] fields
173
+ # Selector specifying which fields to include in a partial response.
174
+ # @param [String] quota_user
175
+ # Available to use for quota purposes for server-side applications. Can be any
176
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
177
+ # @param [Google::Apis::RequestOptions] options
178
+ # Request-specific options
179
+ #
180
+ # @yield [result, err] Result & error if block supplied
181
+ # @yieldparam result [Google::Apis::AnalyticshubV1beta1::DataExchange] parsed result object
182
+ # @yieldparam err [StandardError] error object if request failed
183
+ #
184
+ # @return [Google::Apis::AnalyticshubV1beta1::DataExchange]
185
+ #
186
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
187
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
188
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
189
+ def create_project_location_data_exchange(parent, data_exchange_object = nil, data_exchange_id: nil, fields: nil, quota_user: nil, options: nil, &block)
190
+ command = make_simple_command(:post, 'v1beta1/{+parent}/dataExchanges', options)
191
+ command.request_representation = Google::Apis::AnalyticshubV1beta1::DataExchange::Representation
192
+ command.request_object = data_exchange_object
193
+ command.response_representation = Google::Apis::AnalyticshubV1beta1::DataExchange::Representation
194
+ command.response_class = Google::Apis::AnalyticshubV1beta1::DataExchange
195
+ command.params['parent'] = parent unless parent.nil?
196
+ command.query['dataExchangeId'] = data_exchange_id unless data_exchange_id.nil?
197
+ command.query['fields'] = fields unless fields.nil?
198
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
199
+ execute_or_queue_command(command, &block)
200
+ end
201
+
202
+ # Deletes an existing data exchange.
203
+ # @param [String] name
204
+ # Required. The full name of the data exchange resource that you want to delete.
205
+ # For example, `projects/myproject/locations/US/dataExchanges/123`.
206
+ # @param [String] fields
207
+ # Selector specifying which fields to include in a partial response.
208
+ # @param [String] quota_user
209
+ # Available to use for quota purposes for server-side applications. Can be any
210
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
211
+ # @param [Google::Apis::RequestOptions] options
212
+ # Request-specific options
213
+ #
214
+ # @yield [result, err] Result & error if block supplied
215
+ # @yieldparam result [Google::Apis::AnalyticshubV1beta1::Empty] parsed result object
216
+ # @yieldparam err [StandardError] error object if request failed
217
+ #
218
+ # @return [Google::Apis::AnalyticshubV1beta1::Empty]
219
+ #
220
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
221
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
222
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
223
+ def delete_project_location_data_exchange(name, fields: nil, quota_user: nil, options: nil, &block)
224
+ command = make_simple_command(:delete, 'v1beta1/{+name}', options)
225
+ command.response_representation = Google::Apis::AnalyticshubV1beta1::Empty::Representation
226
+ command.response_class = Google::Apis::AnalyticshubV1beta1::Empty
227
+ command.params['name'] = name unless name.nil?
228
+ command.query['fields'] = fields unless fields.nil?
229
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
230
+ execute_or_queue_command(command, &block)
231
+ end
232
+
233
+ # Gets the details of a data exchange.
234
+ # @param [String] name
235
+ # Required. The resource name of the data exchange. e.g. `projects/myproject/
236
+ # locations/US/dataExchanges/123`.
237
+ # @param [String] fields
238
+ # Selector specifying which fields to include in a partial response.
239
+ # @param [String] quota_user
240
+ # Available to use for quota purposes for server-side applications. Can be any
241
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
242
+ # @param [Google::Apis::RequestOptions] options
243
+ # Request-specific options
244
+ #
245
+ # @yield [result, err] Result & error if block supplied
246
+ # @yieldparam result [Google::Apis::AnalyticshubV1beta1::DataExchange] parsed result object
247
+ # @yieldparam err [StandardError] error object if request failed
248
+ #
249
+ # @return [Google::Apis::AnalyticshubV1beta1::DataExchange]
250
+ #
251
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
252
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
253
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
254
+ def get_project_location_data_exchange(name, fields: nil, quota_user: nil, options: nil, &block)
255
+ command = make_simple_command(:get, 'v1beta1/{+name}', options)
256
+ command.response_representation = Google::Apis::AnalyticshubV1beta1::DataExchange::Representation
257
+ command.response_class = Google::Apis::AnalyticshubV1beta1::DataExchange
258
+ command.params['name'] = name unless name.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
+ # Gets the IAM policy.
265
+ # @param [String] resource
266
+ # REQUIRED: The resource for which the policy is being requested. See the
267
+ # operation documentation for the appropriate value for this field.
268
+ # @param [Google::Apis::AnalyticshubV1beta1::GetIamPolicyRequest] get_iam_policy_request_object
269
+ # @param [String] fields
270
+ # Selector specifying which fields to include in a partial response.
271
+ # @param [String] quota_user
272
+ # Available to use for quota purposes for server-side applications. Can be any
273
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
274
+ # @param [Google::Apis::RequestOptions] options
275
+ # Request-specific options
276
+ #
277
+ # @yield [result, err] Result & error if block supplied
278
+ # @yieldparam result [Google::Apis::AnalyticshubV1beta1::Policy] parsed result object
279
+ # @yieldparam err [StandardError] error object if request failed
280
+ #
281
+ # @return [Google::Apis::AnalyticshubV1beta1::Policy]
282
+ #
283
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
284
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
285
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
286
+ def get_data_exchange_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
287
+ command = make_simple_command(:post, 'v1beta1/{+resource}:getIamPolicy', options)
288
+ command.request_representation = Google::Apis::AnalyticshubV1beta1::GetIamPolicyRequest::Representation
289
+ command.request_object = get_iam_policy_request_object
290
+ command.response_representation = Google::Apis::AnalyticshubV1beta1::Policy::Representation
291
+ command.response_class = Google::Apis::AnalyticshubV1beta1::Policy
292
+ command.params['resource'] = resource unless resource.nil?
293
+ command.query['fields'] = fields unless fields.nil?
294
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
295
+ execute_or_queue_command(command, &block)
296
+ end
297
+
298
+ # Lists all data exchanges in a given project and location.
299
+ # @param [String] parent
300
+ # Required. The parent resource path of the data exchanges. e.g. `projects/
301
+ # myproject/locations/US`.
302
+ # @param [Fixnum] page_size
303
+ # The maximum number of results to return in a single response page. Leverage
304
+ # the page tokens to iterate through the entire collection.
305
+ # @param [String] page_token
306
+ # Page token, returned by a previous call, to request the next page of results.
307
+ # @param [String] fields
308
+ # Selector specifying which fields to include in a partial response.
309
+ # @param [String] quota_user
310
+ # Available to use for quota purposes for server-side applications. Can be any
311
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
312
+ # @param [Google::Apis::RequestOptions] options
313
+ # Request-specific options
314
+ #
315
+ # @yield [result, err] Result & error if block supplied
316
+ # @yieldparam result [Google::Apis::AnalyticshubV1beta1::ListDataExchangesResponse] parsed result object
317
+ # @yieldparam err [StandardError] error object if request failed
318
+ #
319
+ # @return [Google::Apis::AnalyticshubV1beta1::ListDataExchangesResponse]
320
+ #
321
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
322
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
323
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
324
+ def list_project_location_data_exchanges(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
325
+ command = make_simple_command(:get, 'v1beta1/{+parent}/dataExchanges', options)
326
+ command.response_representation = Google::Apis::AnalyticshubV1beta1::ListDataExchangesResponse::Representation
327
+ command.response_class = Google::Apis::AnalyticshubV1beta1::ListDataExchangesResponse
328
+ command.params['parent'] = parent unless parent.nil?
329
+ command.query['pageSize'] = page_size unless page_size.nil?
330
+ command.query['pageToken'] = page_token unless page_token.nil?
331
+ command.query['fields'] = fields unless fields.nil?
332
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
333
+ execute_or_queue_command(command, &block)
334
+ end
335
+
336
+ # Updates an existing data exchange.
337
+ # @param [String] name
338
+ # Output only. The resource name of the data exchange. e.g. `projects/myproject/
339
+ # locations/US/dataExchanges/123`.
340
+ # @param [Google::Apis::AnalyticshubV1beta1::DataExchange] data_exchange_object
341
+ # @param [String] update_mask
342
+ # Required. Field mask specifies the fields to update in the data exchange
343
+ # resource. The fields specified in the `updateMask` are relative to the
344
+ # resource and are not a full request.
345
+ # @param [String] fields
346
+ # Selector specifying which fields to include in a partial response.
347
+ # @param [String] quota_user
348
+ # Available to use for quota purposes for server-side applications. Can be any
349
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
350
+ # @param [Google::Apis::RequestOptions] options
351
+ # Request-specific options
352
+ #
353
+ # @yield [result, err] Result & error if block supplied
354
+ # @yieldparam result [Google::Apis::AnalyticshubV1beta1::DataExchange] parsed result object
355
+ # @yieldparam err [StandardError] error object if request failed
356
+ #
357
+ # @return [Google::Apis::AnalyticshubV1beta1::DataExchange]
358
+ #
359
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
360
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
361
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
362
+ def patch_project_location_data_exchange(name, data_exchange_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
363
+ command = make_simple_command(:patch, 'v1beta1/{+name}', options)
364
+ command.request_representation = Google::Apis::AnalyticshubV1beta1::DataExchange::Representation
365
+ command.request_object = data_exchange_object
366
+ command.response_representation = Google::Apis::AnalyticshubV1beta1::DataExchange::Representation
367
+ command.response_class = Google::Apis::AnalyticshubV1beta1::DataExchange
368
+ command.params['name'] = name unless name.nil?
369
+ command.query['updateMask'] = update_mask unless update_mask.nil?
370
+ command.query['fields'] = fields unless fields.nil?
371
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
372
+ execute_or_queue_command(command, &block)
373
+ end
374
+
375
+ # Sets the IAM policy.
376
+ # @param [String] resource
377
+ # REQUIRED: The resource for which the policy is being specified. See the
378
+ # operation documentation for the appropriate value for this field.
379
+ # @param [Google::Apis::AnalyticshubV1beta1::SetIamPolicyRequest] set_iam_policy_request_object
380
+ # @param [String] fields
381
+ # Selector specifying which fields to include in a partial response.
382
+ # @param [String] quota_user
383
+ # Available to use for quota purposes for server-side applications. Can be any
384
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
385
+ # @param [Google::Apis::RequestOptions] options
386
+ # Request-specific options
387
+ #
388
+ # @yield [result, err] Result & error if block supplied
389
+ # @yieldparam result [Google::Apis::AnalyticshubV1beta1::Policy] parsed result object
390
+ # @yieldparam err [StandardError] error object if request failed
391
+ #
392
+ # @return [Google::Apis::AnalyticshubV1beta1::Policy]
393
+ #
394
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
395
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
396
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
397
+ def set_data_exchange_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
398
+ command = make_simple_command(:post, 'v1beta1/{+resource}:setIamPolicy', options)
399
+ command.request_representation = Google::Apis::AnalyticshubV1beta1::SetIamPolicyRequest::Representation
400
+ command.request_object = set_iam_policy_request_object
401
+ command.response_representation = Google::Apis::AnalyticshubV1beta1::Policy::Representation
402
+ command.response_class = Google::Apis::AnalyticshubV1beta1::Policy
403
+ command.params['resource'] = resource unless resource.nil?
404
+ command.query['fields'] = fields unless fields.nil?
405
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
406
+ execute_or_queue_command(command, &block)
407
+ end
408
+
409
+ # Returns the permissions that a caller has.
410
+ # @param [String] resource
411
+ # REQUIRED: The resource for which the policy detail is being requested. See the
412
+ # operation documentation for the appropriate value for this field.
413
+ # @param [Google::Apis::AnalyticshubV1beta1::TestIamPermissionsRequest] test_iam_permissions_request_object
414
+ # @param [String] fields
415
+ # Selector specifying which fields to include in a partial response.
416
+ # @param [String] quota_user
417
+ # Available to use for quota purposes for server-side applications. Can be any
418
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
419
+ # @param [Google::Apis::RequestOptions] options
420
+ # Request-specific options
421
+ #
422
+ # @yield [result, err] Result & error if block supplied
423
+ # @yieldparam result [Google::Apis::AnalyticshubV1beta1::TestIamPermissionsResponse] parsed result object
424
+ # @yieldparam err [StandardError] error object if request failed
425
+ #
426
+ # @return [Google::Apis::AnalyticshubV1beta1::TestIamPermissionsResponse]
427
+ #
428
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
429
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
430
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
431
+ def test_data_exchange_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
432
+ command = make_simple_command(:post, 'v1beta1/{+resource}:testIamPermissions', options)
433
+ command.request_representation = Google::Apis::AnalyticshubV1beta1::TestIamPermissionsRequest::Representation
434
+ command.request_object = test_iam_permissions_request_object
435
+ command.response_representation = Google::Apis::AnalyticshubV1beta1::TestIamPermissionsResponse::Representation
436
+ command.response_class = Google::Apis::AnalyticshubV1beta1::TestIamPermissionsResponse
437
+ command.params['resource'] = resource unless resource.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
+ # Creates a new listing.
444
+ # @param [String] parent
445
+ # Required. The parent resource path of the listing. e.g. `projects/myproject/
446
+ # locations/US/dataExchanges/123`.
447
+ # @param [Google::Apis::AnalyticshubV1beta1::Listing] listing_object
448
+ # @param [String] listing_id
449
+ # Required. The ID of the listing to create. Must contain only Unicode letters,
450
+ # numbers (0-9), underscores (_). Should not use characters that require URL-
451
+ # escaping, or characters outside of ASCII, spaces. Max length: 100 bytes.
452
+ # @param [String] fields
453
+ # Selector specifying which fields to include in a partial response.
454
+ # @param [String] quota_user
455
+ # Available to use for quota purposes for server-side applications. Can be any
456
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
457
+ # @param [Google::Apis::RequestOptions] options
458
+ # Request-specific options
459
+ #
460
+ # @yield [result, err] Result & error if block supplied
461
+ # @yieldparam result [Google::Apis::AnalyticshubV1beta1::Listing] parsed result object
462
+ # @yieldparam err [StandardError] error object if request failed
463
+ #
464
+ # @return [Google::Apis::AnalyticshubV1beta1::Listing]
465
+ #
466
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
467
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
468
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
469
+ def create_project_location_data_exchange_listing(parent, listing_object = nil, listing_id: nil, fields: nil, quota_user: nil, options: nil, &block)
470
+ command = make_simple_command(:post, 'v1beta1/{+parent}/listings', options)
471
+ command.request_representation = Google::Apis::AnalyticshubV1beta1::Listing::Representation
472
+ command.request_object = listing_object
473
+ command.response_representation = Google::Apis::AnalyticshubV1beta1::Listing::Representation
474
+ command.response_class = Google::Apis::AnalyticshubV1beta1::Listing
475
+ command.params['parent'] = parent unless parent.nil?
476
+ command.query['listingId'] = listing_id unless listing_id.nil?
477
+ command.query['fields'] = fields unless fields.nil?
478
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
479
+ execute_or_queue_command(command, &block)
480
+ end
481
+
482
+ # Deletes a listing.
483
+ # @param [String] name
484
+ # Required. Resource name of the listing to delete. e.g. `projects/myproject/
485
+ # locations/US/dataExchanges/123/listings/456`.
486
+ # @param [String] fields
487
+ # Selector specifying which fields to include in a partial response.
488
+ # @param [String] quota_user
489
+ # Available to use for quota purposes for server-side applications. Can be any
490
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
491
+ # @param [Google::Apis::RequestOptions] options
492
+ # Request-specific options
493
+ #
494
+ # @yield [result, err] Result & error if block supplied
495
+ # @yieldparam result [Google::Apis::AnalyticshubV1beta1::Empty] parsed result object
496
+ # @yieldparam err [StandardError] error object if request failed
497
+ #
498
+ # @return [Google::Apis::AnalyticshubV1beta1::Empty]
499
+ #
500
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
501
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
502
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
503
+ def delete_project_location_data_exchange_listing(name, fields: nil, quota_user: nil, options: nil, &block)
504
+ command = make_simple_command(:delete, 'v1beta1/{+name}', options)
505
+ command.response_representation = Google::Apis::AnalyticshubV1beta1::Empty::Representation
506
+ command.response_class = Google::Apis::AnalyticshubV1beta1::Empty
507
+ command.params['name'] = name unless name.nil?
508
+ command.query['fields'] = fields unless fields.nil?
509
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
510
+ execute_or_queue_command(command, &block)
511
+ end
512
+
513
+ # Gets the details of a listing.
514
+ # @param [String] name
515
+ # Required. The resource name of the listing. e.g. `projects/myproject/locations/
516
+ # US/dataExchanges/123/listings/456`.
517
+ # @param [String] fields
518
+ # Selector specifying which fields to include in a partial response.
519
+ # @param [String] quota_user
520
+ # Available to use for quota purposes for server-side applications. Can be any
521
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
522
+ # @param [Google::Apis::RequestOptions] options
523
+ # Request-specific options
524
+ #
525
+ # @yield [result, err] Result & error if block supplied
526
+ # @yieldparam result [Google::Apis::AnalyticshubV1beta1::Listing] parsed result object
527
+ # @yieldparam err [StandardError] error object if request failed
528
+ #
529
+ # @return [Google::Apis::AnalyticshubV1beta1::Listing]
530
+ #
531
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
532
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
533
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
534
+ def get_project_location_data_exchange_listing(name, fields: nil, quota_user: nil, options: nil, &block)
535
+ command = make_simple_command(:get, 'v1beta1/{+name}', options)
536
+ command.response_representation = Google::Apis::AnalyticshubV1beta1::Listing::Representation
537
+ command.response_class = Google::Apis::AnalyticshubV1beta1::Listing
538
+ command.params['name'] = name unless name.nil?
539
+ command.query['fields'] = fields unless fields.nil?
540
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
541
+ execute_or_queue_command(command, &block)
542
+ end
543
+
544
+ # Gets the IAM policy.
545
+ # @param [String] resource
546
+ # REQUIRED: The resource for which the policy is being requested. See the
547
+ # operation documentation for the appropriate value for this field.
548
+ # @param [Google::Apis::AnalyticshubV1beta1::GetIamPolicyRequest] get_iam_policy_request_object
549
+ # @param [String] fields
550
+ # Selector specifying which fields to include in a partial response.
551
+ # @param [String] quota_user
552
+ # Available to use for quota purposes for server-side applications. Can be any
553
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
554
+ # @param [Google::Apis::RequestOptions] options
555
+ # Request-specific options
556
+ #
557
+ # @yield [result, err] Result & error if block supplied
558
+ # @yieldparam result [Google::Apis::AnalyticshubV1beta1::Policy] parsed result object
559
+ # @yieldparam err [StandardError] error object if request failed
560
+ #
561
+ # @return [Google::Apis::AnalyticshubV1beta1::Policy]
562
+ #
563
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
564
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
565
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
566
+ def get_listing_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
567
+ command = make_simple_command(:post, 'v1beta1/{+resource}:getIamPolicy', options)
568
+ command.request_representation = Google::Apis::AnalyticshubV1beta1::GetIamPolicyRequest::Representation
569
+ command.request_object = get_iam_policy_request_object
570
+ command.response_representation = Google::Apis::AnalyticshubV1beta1::Policy::Representation
571
+ command.response_class = Google::Apis::AnalyticshubV1beta1::Policy
572
+ command.params['resource'] = resource unless resource.nil?
573
+ command.query['fields'] = fields unless fields.nil?
574
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
575
+ execute_or_queue_command(command, &block)
576
+ end
577
+
578
+ # Lists all listings in a given project and location.
579
+ # @param [String] parent
580
+ # Required. The parent resource path of the listing. e.g. `projects/myproject/
581
+ # locations/US/dataExchanges/123`.
582
+ # @param [Fixnum] page_size
583
+ # The maximum number of results to return in a single response page. Leverage
584
+ # the page tokens to iterate through the entire collection.
585
+ # @param [String] page_token
586
+ # Page token, returned by a previous call, to request the next page of results.
587
+ # @param [String] fields
588
+ # Selector specifying which fields to include in a partial response.
589
+ # @param [String] quota_user
590
+ # Available to use for quota purposes for server-side applications. Can be any
591
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
592
+ # @param [Google::Apis::RequestOptions] options
593
+ # Request-specific options
594
+ #
595
+ # @yield [result, err] Result & error if block supplied
596
+ # @yieldparam result [Google::Apis::AnalyticshubV1beta1::ListListingsResponse] parsed result object
597
+ # @yieldparam err [StandardError] error object if request failed
598
+ #
599
+ # @return [Google::Apis::AnalyticshubV1beta1::ListListingsResponse]
600
+ #
601
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
602
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
603
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
604
+ def list_project_location_data_exchange_listings(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
605
+ command = make_simple_command(:get, 'v1beta1/{+parent}/listings', options)
606
+ command.response_representation = Google::Apis::AnalyticshubV1beta1::ListListingsResponse::Representation
607
+ command.response_class = Google::Apis::AnalyticshubV1beta1::ListListingsResponse
608
+ command.params['parent'] = parent unless parent.nil?
609
+ command.query['pageSize'] = page_size unless page_size.nil?
610
+ command.query['pageToken'] = page_token unless page_token.nil?
611
+ command.query['fields'] = fields unless fields.nil?
612
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
613
+ execute_or_queue_command(command, &block)
614
+ end
615
+
616
+ # Updates an existing listing.
617
+ # @param [String] name
618
+ # Output only. The resource name of the listing. e.g. `projects/myproject/
619
+ # locations/US/dataExchanges/123/listings/456`
620
+ # @param [Google::Apis::AnalyticshubV1beta1::Listing] listing_object
621
+ # @param [String] update_mask
622
+ # Required. Field mask specifies the fields to update in the listing resource.
623
+ # The fields specified in the `updateMask` are relative to the resource and are
624
+ # not a full request.
625
+ # @param [String] fields
626
+ # Selector specifying which fields to include in a partial response.
627
+ # @param [String] quota_user
628
+ # Available to use for quota purposes for server-side applications. Can be any
629
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
630
+ # @param [Google::Apis::RequestOptions] options
631
+ # Request-specific options
632
+ #
633
+ # @yield [result, err] Result & error if block supplied
634
+ # @yieldparam result [Google::Apis::AnalyticshubV1beta1::Listing] parsed result object
635
+ # @yieldparam err [StandardError] error object if request failed
636
+ #
637
+ # @return [Google::Apis::AnalyticshubV1beta1::Listing]
638
+ #
639
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
640
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
641
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
642
+ def patch_project_location_data_exchange_listing(name, listing_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
643
+ command = make_simple_command(:patch, 'v1beta1/{+name}', options)
644
+ command.request_representation = Google::Apis::AnalyticshubV1beta1::Listing::Representation
645
+ command.request_object = listing_object
646
+ command.response_representation = Google::Apis::AnalyticshubV1beta1::Listing::Representation
647
+ command.response_class = Google::Apis::AnalyticshubV1beta1::Listing
648
+ command.params['name'] = name unless name.nil?
649
+ command.query['updateMask'] = update_mask unless update_mask.nil?
650
+ command.query['fields'] = fields unless fields.nil?
651
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
652
+ execute_or_queue_command(command, &block)
653
+ end
654
+
655
+ # Sets the IAM policy.
656
+ # @param [String] resource
657
+ # REQUIRED: The resource for which the policy is being specified. See the
658
+ # operation documentation for the appropriate value for this field.
659
+ # @param [Google::Apis::AnalyticshubV1beta1::SetIamPolicyRequest] set_iam_policy_request_object
660
+ # @param [String] fields
661
+ # Selector specifying which fields to include in a partial response.
662
+ # @param [String] quota_user
663
+ # Available to use for quota purposes for server-side applications. Can be any
664
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
665
+ # @param [Google::Apis::RequestOptions] options
666
+ # Request-specific options
667
+ #
668
+ # @yield [result, err] Result & error if block supplied
669
+ # @yieldparam result [Google::Apis::AnalyticshubV1beta1::Policy] parsed result object
670
+ # @yieldparam err [StandardError] error object if request failed
671
+ #
672
+ # @return [Google::Apis::AnalyticshubV1beta1::Policy]
673
+ #
674
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
675
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
676
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
677
+ def set_listing_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
678
+ command = make_simple_command(:post, 'v1beta1/{+resource}:setIamPolicy', options)
679
+ command.request_representation = Google::Apis::AnalyticshubV1beta1::SetIamPolicyRequest::Representation
680
+ command.request_object = set_iam_policy_request_object
681
+ command.response_representation = Google::Apis::AnalyticshubV1beta1::Policy::Representation
682
+ command.response_class = Google::Apis::AnalyticshubV1beta1::Policy
683
+ command.params['resource'] = resource unless resource.nil?
684
+ command.query['fields'] = fields unless fields.nil?
685
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
686
+ execute_or_queue_command(command, &block)
687
+ end
688
+
689
+ # Subscribes to a listing. Currently, with Analytics Hub, you can create
690
+ # listings that reference only BigQuery datasets. Upon subscription to a listing
691
+ # for a BigQuery dataset, Analytics Hub creates a linked dataset in the
692
+ # subscriber's project.
693
+ # @param [String] name
694
+ # Required. Resource name of the listing that you want to subscribe to. e.g. `
695
+ # projects/myproject/locations/US/dataExchanges/123/listings/456`.
696
+ # @param [Google::Apis::AnalyticshubV1beta1::SubscribeListingRequest] subscribe_listing_request_object
697
+ # @param [String] fields
698
+ # Selector specifying which fields to include in a partial response.
699
+ # @param [String] quota_user
700
+ # Available to use for quota purposes for server-side applications. Can be any
701
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
702
+ # @param [Google::Apis::RequestOptions] options
703
+ # Request-specific options
704
+ #
705
+ # @yield [result, err] Result & error if block supplied
706
+ # @yieldparam result [Google::Apis::AnalyticshubV1beta1::SubscribeListingResponse] parsed result object
707
+ # @yieldparam err [StandardError] error object if request failed
708
+ #
709
+ # @return [Google::Apis::AnalyticshubV1beta1::SubscribeListingResponse]
710
+ #
711
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
712
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
713
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
714
+ def subscribe_listing(name, subscribe_listing_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
715
+ command = make_simple_command(:post, 'v1beta1/{+name}:subscribe', options)
716
+ command.request_representation = Google::Apis::AnalyticshubV1beta1::SubscribeListingRequest::Representation
717
+ command.request_object = subscribe_listing_request_object
718
+ command.response_representation = Google::Apis::AnalyticshubV1beta1::SubscribeListingResponse::Representation
719
+ command.response_class = Google::Apis::AnalyticshubV1beta1::SubscribeListingResponse
720
+ command.params['name'] = name unless name.nil?
721
+ command.query['fields'] = fields unless fields.nil?
722
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
723
+ execute_or_queue_command(command, &block)
724
+ end
725
+
726
+ # Returns the permissions that a caller has.
727
+ # @param [String] resource
728
+ # REQUIRED: The resource for which the policy detail is being requested. See the
729
+ # operation documentation for the appropriate value for this field.
730
+ # @param [Google::Apis::AnalyticshubV1beta1::TestIamPermissionsRequest] test_iam_permissions_request_object
731
+ # @param [String] fields
732
+ # Selector specifying which fields to include in a partial response.
733
+ # @param [String] quota_user
734
+ # Available to use for quota purposes for server-side applications. Can be any
735
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
736
+ # @param [Google::Apis::RequestOptions] options
737
+ # Request-specific options
738
+ #
739
+ # @yield [result, err] Result & error if block supplied
740
+ # @yieldparam result [Google::Apis::AnalyticshubV1beta1::TestIamPermissionsResponse] parsed result object
741
+ # @yieldparam err [StandardError] error object if request failed
742
+ #
743
+ # @return [Google::Apis::AnalyticshubV1beta1::TestIamPermissionsResponse]
744
+ #
745
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
746
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
747
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
748
+ def test_listing_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
749
+ command = make_simple_command(:post, 'v1beta1/{+resource}:testIamPermissions', options)
750
+ command.request_representation = Google::Apis::AnalyticshubV1beta1::TestIamPermissionsRequest::Representation
751
+ command.request_object = test_iam_permissions_request_object
752
+ command.response_representation = Google::Apis::AnalyticshubV1beta1::TestIamPermissionsResponse::Representation
753
+ command.response_class = Google::Apis::AnalyticshubV1beta1::TestIamPermissionsResponse
754
+ command.params['resource'] = resource unless resource.nil?
755
+ command.query['fields'] = fields unless fields.nil?
756
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
757
+ execute_or_queue_command(command, &block)
758
+ end
759
+
760
+ protected
761
+
762
+ def apply_command_defaults(command)
763
+ command.query['key'] = key unless key.nil?
764
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
765
+ end
766
+ end
767
+ end
768
+ end
769
+ end