google-apis-metastore_v1beta 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,802 @@
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 MetastoreV1beta
23
+ # Dataproc Metastore API
24
+ #
25
+ # The Dataproc Metastore API is used to manage the lifecycle and configuration
26
+ # of metastore services.
27
+ #
28
+ # @example
29
+ # require 'google/apis/metastore_v1beta'
30
+ #
31
+ # Metastore = Google::Apis::MetastoreV1beta # Alias the module
32
+ # service = Metastore::DataprocMetastoreService.new
33
+ #
34
+ # @see https://cloud.google.com/dataproc-metastore/docs
35
+ class DataprocMetastoreService < Google::Apis::Core::BaseService
36
+ # @return [String]
37
+ # API key. Your API key identifies your project and provides you with API access,
38
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
39
+ attr_accessor :key
40
+
41
+ # @return [String]
42
+ # Available to use for quota purposes for server-side applications. Can be any
43
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
44
+ attr_accessor :quota_user
45
+
46
+ def initialize
47
+ super('https://metastore.googleapis.com/', '',
48
+ client_name: 'google-apis-metastore_v1beta',
49
+ client_version: Google::Apis::MetastoreV1beta::GEM_VERSION)
50
+ @batch_path = 'batch'
51
+ end
52
+
53
+ # Gets information about a location.
54
+ # @param [String] name
55
+ # Resource name for the location.
56
+ # @param [String] fields
57
+ # Selector specifying which fields to include in a partial response.
58
+ # @param [String] quota_user
59
+ # Available to use for quota purposes for server-side applications. Can be any
60
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
61
+ # @param [Google::Apis::RequestOptions] options
62
+ # Request-specific options
63
+ #
64
+ # @yield [result, err] Result & error if block supplied
65
+ # @yieldparam result [Google::Apis::MetastoreV1beta::Location] parsed result object
66
+ # @yieldparam err [StandardError] error object if request failed
67
+ #
68
+ # @return [Google::Apis::MetastoreV1beta::Location]
69
+ #
70
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
71
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
72
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
73
+ def get_project_location(name, fields: nil, quota_user: nil, options: nil, &block)
74
+ command = make_simple_command(:get, 'v1beta/{+name}', options)
75
+ command.response_representation = Google::Apis::MetastoreV1beta::Location::Representation
76
+ command.response_class = Google::Apis::MetastoreV1beta::Location
77
+ command.params['name'] = name unless name.nil?
78
+ command.query['fields'] = fields unless fields.nil?
79
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
80
+ execute_or_queue_command(command, &block)
81
+ end
82
+
83
+ # Lists information about the supported locations for this service.
84
+ # @param [String] name
85
+ # The resource that owns the locations collection, if applicable.
86
+ # @param [String] filter
87
+ # The standard list filter.
88
+ # @param [Fixnum] page_size
89
+ # The standard list page size.
90
+ # @param [String] page_token
91
+ # The standard list page token.
92
+ # @param [String] fields
93
+ # Selector specifying which fields to include in a partial response.
94
+ # @param [String] quota_user
95
+ # Available to use for quota purposes for server-side applications. Can be any
96
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
97
+ # @param [Google::Apis::RequestOptions] options
98
+ # Request-specific options
99
+ #
100
+ # @yield [result, err] Result & error if block supplied
101
+ # @yieldparam result [Google::Apis::MetastoreV1beta::ListLocationsResponse] parsed result object
102
+ # @yieldparam err [StandardError] error object if request failed
103
+ #
104
+ # @return [Google::Apis::MetastoreV1beta::ListLocationsResponse]
105
+ #
106
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
107
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
108
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
109
+ def list_project_locations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
110
+ command = make_simple_command(:get, 'v1beta/{+name}/locations', options)
111
+ command.response_representation = Google::Apis::MetastoreV1beta::ListLocationsResponse::Representation
112
+ command.response_class = Google::Apis::MetastoreV1beta::ListLocationsResponse
113
+ command.params['name'] = name unless name.nil?
114
+ command.query['filter'] = filter unless filter.nil?
115
+ command.query['pageSize'] = page_size unless page_size.nil?
116
+ command.query['pageToken'] = page_token unless page_token.nil?
117
+ command.query['fields'] = fields unless fields.nil?
118
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
119
+ execute_or_queue_command(command, &block)
120
+ end
121
+
122
+ # Deletes a long-running operation. This method indicates that the client is no
123
+ # longer interested in the operation result. It does not cancel the operation.
124
+ # If the server doesn't support this method, it returns google.rpc.Code.
125
+ # UNIMPLEMENTED.
126
+ # @param [String] name
127
+ # The name of the operation resource to be deleted.
128
+ # @param [String] fields
129
+ # Selector specifying which fields to include in a partial response.
130
+ # @param [String] quota_user
131
+ # Available to use for quota purposes for server-side applications. Can be any
132
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
133
+ # @param [Google::Apis::RequestOptions] options
134
+ # Request-specific options
135
+ #
136
+ # @yield [result, err] Result & error if block supplied
137
+ # @yieldparam result [Google::Apis::MetastoreV1beta::Empty] parsed result object
138
+ # @yieldparam err [StandardError] error object if request failed
139
+ #
140
+ # @return [Google::Apis::MetastoreV1beta::Empty]
141
+ #
142
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
143
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
144
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
145
+ def delete_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
146
+ command = make_simple_command(:delete, 'v1beta/{+name}', options)
147
+ command.response_representation = Google::Apis::MetastoreV1beta::Empty::Representation
148
+ command.response_class = Google::Apis::MetastoreV1beta::Empty
149
+ command.params['name'] = name unless name.nil?
150
+ command.query['fields'] = fields unless fields.nil?
151
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
152
+ execute_or_queue_command(command, &block)
153
+ end
154
+
155
+ # Gets the latest state of a long-running operation. Clients can use this method
156
+ # to poll the operation result at intervals as recommended by the API service.
157
+ # @param [String] name
158
+ # The name of the operation resource.
159
+ # @param [String] fields
160
+ # Selector specifying which fields to include in a partial response.
161
+ # @param [String] quota_user
162
+ # Available to use for quota purposes for server-side applications. Can be any
163
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
164
+ # @param [Google::Apis::RequestOptions] options
165
+ # Request-specific options
166
+ #
167
+ # @yield [result, err] Result & error if block supplied
168
+ # @yieldparam result [Google::Apis::MetastoreV1beta::Operation] parsed result object
169
+ # @yieldparam err [StandardError] error object if request failed
170
+ #
171
+ # @return [Google::Apis::MetastoreV1beta::Operation]
172
+ #
173
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
174
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
175
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
176
+ def get_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
177
+ command = make_simple_command(:get, 'v1beta/{+name}', options)
178
+ command.response_representation = Google::Apis::MetastoreV1beta::Operation::Representation
179
+ command.response_class = Google::Apis::MetastoreV1beta::Operation
180
+ command.params['name'] = name unless name.nil?
181
+ command.query['fields'] = fields unless fields.nil?
182
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
183
+ execute_or_queue_command(command, &block)
184
+ end
185
+
186
+ # Lists operations that match the specified filter in the request. If the server
187
+ # doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding
188
+ # allows API services to override the binding to use different resource name
189
+ # schemes, such as users/*/operations. To override the binding, API services can
190
+ # add a binding such as "/v1/`name=users/*`/operations" to their service
191
+ # configuration. For backwards compatibility, the default name includes the
192
+ # operations collection id, however overriding users must ensure the name
193
+ # binding is the parent resource, without the operations collection id.
194
+ # @param [String] name
195
+ # The name of the operation's parent resource.
196
+ # @param [String] filter
197
+ # The standard list filter.
198
+ # @param [Fixnum] page_size
199
+ # The standard list page size.
200
+ # @param [String] page_token
201
+ # The standard list page token.
202
+ # @param [String] fields
203
+ # Selector specifying which fields to include in a partial response.
204
+ # @param [String] quota_user
205
+ # Available to use for quota purposes for server-side applications. Can be any
206
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
207
+ # @param [Google::Apis::RequestOptions] options
208
+ # Request-specific options
209
+ #
210
+ # @yield [result, err] Result & error if block supplied
211
+ # @yieldparam result [Google::Apis::MetastoreV1beta::ListOperationsResponse] parsed result object
212
+ # @yieldparam err [StandardError] error object if request failed
213
+ #
214
+ # @return [Google::Apis::MetastoreV1beta::ListOperationsResponse]
215
+ #
216
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
217
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
218
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
219
+ def list_project_location_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
220
+ command = make_simple_command(:get, 'v1beta/{+name}/operations', options)
221
+ command.response_representation = Google::Apis::MetastoreV1beta::ListOperationsResponse::Representation
222
+ command.response_class = Google::Apis::MetastoreV1beta::ListOperationsResponse
223
+ command.params['name'] = name unless name.nil?
224
+ command.query['filter'] = filter unless filter.nil?
225
+ command.query['pageSize'] = page_size unless page_size.nil?
226
+ command.query['pageToken'] = page_token unless page_token.nil?
227
+ command.query['fields'] = fields unless fields.nil?
228
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
229
+ execute_or_queue_command(command, &block)
230
+ end
231
+
232
+ # Creates a metastore service in a project and location.
233
+ # @param [String] parent
234
+ # Required. The relative resource name of the location in which to create a
235
+ # metastore service, in the following form:"projects/`project_number`/locations/`
236
+ # location_id`".
237
+ # @param [Google::Apis::MetastoreV1beta::Service] service_object
238
+ # @param [String] request_id
239
+ # Optional. A request ID. Specify a unique request ID to allow the server to
240
+ # ignore the request if it has completed. The server will ignore subsequent
241
+ # requests that provide a duplicate request ID for at least 60 minutes after the
242
+ # first request.For example, if an initial request times out, followed by
243
+ # another request with the same request ID, the server ignores the second
244
+ # request to prevent the creation of duplicate commitments.The request ID must
245
+ # be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#
246
+ # Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
247
+ # @param [String] service_id
248
+ # Required. The ID of the metastore service, which is used as the final
249
+ # component of the metastore service's name.This value must be between 2 and 63
250
+ # characters long inclusive, begin with a letter, end with a letter or number,
251
+ # and consist of alpha-numeric ASCII characters or hyphens.
252
+ # @param [String] fields
253
+ # Selector specifying which fields to include in a partial response.
254
+ # @param [String] quota_user
255
+ # Available to use for quota purposes for server-side applications. Can be any
256
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
257
+ # @param [Google::Apis::RequestOptions] options
258
+ # Request-specific options
259
+ #
260
+ # @yield [result, err] Result & error if block supplied
261
+ # @yieldparam result [Google::Apis::MetastoreV1beta::Operation] parsed result object
262
+ # @yieldparam err [StandardError] error object if request failed
263
+ #
264
+ # @return [Google::Apis::MetastoreV1beta::Operation]
265
+ #
266
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
267
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
268
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
269
+ def create_project_location_service(parent, service_object = nil, request_id: nil, service_id: nil, fields: nil, quota_user: nil, options: nil, &block)
270
+ command = make_simple_command(:post, 'v1beta/{+parent}/services', options)
271
+ command.request_representation = Google::Apis::MetastoreV1beta::Service::Representation
272
+ command.request_object = service_object
273
+ command.response_representation = Google::Apis::MetastoreV1beta::Operation::Representation
274
+ command.response_class = Google::Apis::MetastoreV1beta::Operation
275
+ command.params['parent'] = parent unless parent.nil?
276
+ command.query['requestId'] = request_id unless request_id.nil?
277
+ command.query['serviceId'] = service_id unless service_id.nil?
278
+ command.query['fields'] = fields unless fields.nil?
279
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
280
+ execute_or_queue_command(command, &block)
281
+ end
282
+
283
+ # Deletes a single service.
284
+ # @param [String] name
285
+ # Required. The relative resource name of the metastore service to delete, in
286
+ # the following form:"projects/`project_number`/locations/`location_id`/services/
287
+ # `service_id`".
288
+ # @param [String] request_id
289
+ # Optional. A request ID. Specify a unique request ID to allow the server to
290
+ # ignore the request if it has completed. The server will ignore subsequent
291
+ # requests that provide a duplicate request ID for at least 60 minutes after the
292
+ # first request.For example, if an initial request times out, followed by
293
+ # another request with the same request ID, the server ignores the second
294
+ # request to prevent the creation of duplicate commitments.The request ID must
295
+ # be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#
296
+ # Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
297
+ # @param [String] fields
298
+ # Selector specifying which fields to include in a partial response.
299
+ # @param [String] quota_user
300
+ # Available to use for quota purposes for server-side applications. Can be any
301
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
302
+ # @param [Google::Apis::RequestOptions] options
303
+ # Request-specific options
304
+ #
305
+ # @yield [result, err] Result & error if block supplied
306
+ # @yieldparam result [Google::Apis::MetastoreV1beta::Operation] parsed result object
307
+ # @yieldparam err [StandardError] error object if request failed
308
+ #
309
+ # @return [Google::Apis::MetastoreV1beta::Operation]
310
+ #
311
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
312
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
313
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
314
+ def delete_project_location_service(name, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
315
+ command = make_simple_command(:delete, 'v1beta/{+name}', options)
316
+ command.response_representation = Google::Apis::MetastoreV1beta::Operation::Representation
317
+ command.response_class = Google::Apis::MetastoreV1beta::Operation
318
+ command.params['name'] = name unless name.nil?
319
+ command.query['requestId'] = request_id unless request_id.nil?
320
+ command.query['fields'] = fields unless fields.nil?
321
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
322
+ execute_or_queue_command(command, &block)
323
+ end
324
+
325
+ # Exports metadata from a service.
326
+ # @param [String] service
327
+ # Required. The relative resource name of the metastore service to run export,
328
+ # in the following form:"projects/`project_id`/locations/`location_id`/services/`
329
+ # service_id`
330
+ # @param [Google::Apis::MetastoreV1beta::ExportMetadataRequest] export_metadata_request_object
331
+ # @param [String] fields
332
+ # Selector specifying which fields to include in a partial response.
333
+ # @param [String] quota_user
334
+ # Available to use for quota purposes for server-side applications. Can be any
335
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
336
+ # @param [Google::Apis::RequestOptions] options
337
+ # Request-specific options
338
+ #
339
+ # @yield [result, err] Result & error if block supplied
340
+ # @yieldparam result [Google::Apis::MetastoreV1beta::Operation] parsed result object
341
+ # @yieldparam err [StandardError] error object if request failed
342
+ #
343
+ # @return [Google::Apis::MetastoreV1beta::Operation]
344
+ #
345
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
346
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
347
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
348
+ def export_service_metadata(service, export_metadata_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
349
+ command = make_simple_command(:post, 'v1beta/{+service}:exportMetadata', options)
350
+ command.request_representation = Google::Apis::MetastoreV1beta::ExportMetadataRequest::Representation
351
+ command.request_object = export_metadata_request_object
352
+ command.response_representation = Google::Apis::MetastoreV1beta::Operation::Representation
353
+ command.response_class = Google::Apis::MetastoreV1beta::Operation
354
+ command.params['service'] = service unless service.nil?
355
+ command.query['fields'] = fields unless fields.nil?
356
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
357
+ execute_or_queue_command(command, &block)
358
+ end
359
+
360
+ # Gets the details of a single service.
361
+ # @param [String] name
362
+ # Required. The relative resource name of the metastore service to retrieve, in
363
+ # the following form:"projects/`project_number`/locations/`location_id`/services/
364
+ # `service_id`".
365
+ # @param [String] fields
366
+ # Selector specifying which fields to include in a partial response.
367
+ # @param [String] quota_user
368
+ # Available to use for quota purposes for server-side applications. Can be any
369
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
370
+ # @param [Google::Apis::RequestOptions] options
371
+ # Request-specific options
372
+ #
373
+ # @yield [result, err] Result & error if block supplied
374
+ # @yieldparam result [Google::Apis::MetastoreV1beta::Service] parsed result object
375
+ # @yieldparam err [StandardError] error object if request failed
376
+ #
377
+ # @return [Google::Apis::MetastoreV1beta::Service]
378
+ #
379
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
380
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
381
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
382
+ def get_project_location_service(name, fields: nil, quota_user: nil, options: nil, &block)
383
+ command = make_simple_command(:get, 'v1beta/{+name}', options)
384
+ command.response_representation = Google::Apis::MetastoreV1beta::Service::Representation
385
+ command.response_class = Google::Apis::MetastoreV1beta::Service
386
+ command.params['name'] = name unless name.nil?
387
+ command.query['fields'] = fields unless fields.nil?
388
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
389
+ execute_or_queue_command(command, &block)
390
+ end
391
+
392
+ # Gets the access control policy for a resource. Returns an empty policy if the
393
+ # resource exists and does not have a policy set.
394
+ # @param [String] resource
395
+ # REQUIRED: The resource for which the policy is being requested. See the
396
+ # operation documentation for the appropriate value for this field.
397
+ # @param [Fixnum] options_requested_policy_version
398
+ # Optional. The policy format version to be returned.Valid values are 0, 1, and
399
+ # 3. Requests specifying an invalid value will be rejected.Requests for policies
400
+ # with any conditional bindings must specify version 3. Policies without any
401
+ # conditional bindings may specify any valid value or leave the field unset.To
402
+ # learn which resources support conditions in their IAM policies, see the IAM
403
+ # documentation (https://cloud.google.com/iam/help/conditions/resource-policies).
404
+ # @param [String] fields
405
+ # Selector specifying which fields to include in a partial response.
406
+ # @param [String] quota_user
407
+ # Available to use for quota purposes for server-side applications. Can be any
408
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
409
+ # @param [Google::Apis::RequestOptions] options
410
+ # Request-specific options
411
+ #
412
+ # @yield [result, err] Result & error if block supplied
413
+ # @yieldparam result [Google::Apis::MetastoreV1beta::Policy] parsed result object
414
+ # @yieldparam err [StandardError] error object if request failed
415
+ #
416
+ # @return [Google::Apis::MetastoreV1beta::Policy]
417
+ #
418
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
419
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
420
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
421
+ def get_project_location_service_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil, &block)
422
+ command = make_simple_command(:get, 'v1beta/{+resource}:getIamPolicy', options)
423
+ command.response_representation = Google::Apis::MetastoreV1beta::Policy::Representation
424
+ command.response_class = Google::Apis::MetastoreV1beta::Policy
425
+ command.params['resource'] = resource unless resource.nil?
426
+ command.query['options.requestedPolicyVersion'] = options_requested_policy_version unless options_requested_policy_version.nil?
427
+ command.query['fields'] = fields unless fields.nil?
428
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
429
+ execute_or_queue_command(command, &block)
430
+ end
431
+
432
+ # Lists services in a project and location.
433
+ # @param [String] parent
434
+ # Required. The relative resource name of the location of metastore services to
435
+ # list, in the following form:"projects/`project_number`/locations/`location_id`"
436
+ # .
437
+ # @param [String] filter
438
+ # Optional. The filter to apply to list results.
439
+ # @param [String] order_by
440
+ # Optional. Specify the ordering of results as described in Sorting Order. If
441
+ # not specified, the results will be sorted in the default order.
442
+ # @param [Fixnum] page_size
443
+ # Optional. The maximum number of services to return. The response may contain
444
+ # less than the maximum number. If unspecified, no more than 500 services are
445
+ # returned. The maximum value is 1000; values above 1000 are changed to 1000.
446
+ # @param [String] page_token
447
+ # Optional. A page token, received from a previous DataprocMetastore.
448
+ # ListServices call. Provide this token to retrieve the subsequent page.To
449
+ # retrieve the first page, supply an empty page token.When paginating, other
450
+ # parameters provided to DataprocMetastore.ListServices must match the call that
451
+ # provided the page token.
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::MetastoreV1beta::ListServicesResponse] parsed result object
462
+ # @yieldparam err [StandardError] error object if request failed
463
+ #
464
+ # @return [Google::Apis::MetastoreV1beta::ListServicesResponse]
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 list_project_location_services(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
470
+ command = make_simple_command(:get, 'v1beta/{+parent}/services', options)
471
+ command.response_representation = Google::Apis::MetastoreV1beta::ListServicesResponse::Representation
472
+ command.response_class = Google::Apis::MetastoreV1beta::ListServicesResponse
473
+ command.params['parent'] = parent unless parent.nil?
474
+ command.query['filter'] = filter unless filter.nil?
475
+ command.query['orderBy'] = order_by unless order_by.nil?
476
+ command.query['pageSize'] = page_size unless page_size.nil?
477
+ command.query['pageToken'] = page_token unless page_token.nil?
478
+ command.query['fields'] = fields unless fields.nil?
479
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
480
+ execute_or_queue_command(command, &block)
481
+ end
482
+
483
+ # Updates the parameters of a single service.
484
+ # @param [String] name
485
+ # Immutable. The relative resource name of the metastore service, of the form:"
486
+ # projects/`project_number`/locations/`location_id`/services/`service_id`".
487
+ # @param [Google::Apis::MetastoreV1beta::Service] service_object
488
+ # @param [String] request_id
489
+ # Optional. A request ID. Specify a unique request ID to allow the server to
490
+ # ignore the request if it has completed. The server will ignore subsequent
491
+ # requests that provide a duplicate request ID for at least 60 minutes after the
492
+ # first request.For example, if an initial request times out, followed by
493
+ # another request with the same request ID, the server ignores the second
494
+ # request to prevent the creation of duplicate commitments.The request ID must
495
+ # be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#
496
+ # Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
497
+ # @param [String] update_mask
498
+ # Required. A field mask used to specify the fields to be overwritten in the
499
+ # metastore service resource by the update. Fields specified in the update_mask
500
+ # are relative to the resource (not to the full request). A field is overwritten
501
+ # if it is in the mask.
502
+ # @param [String] fields
503
+ # Selector specifying which fields to include in a partial response.
504
+ # @param [String] quota_user
505
+ # Available to use for quota purposes for server-side applications. Can be any
506
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
507
+ # @param [Google::Apis::RequestOptions] options
508
+ # Request-specific options
509
+ #
510
+ # @yield [result, err] Result & error if block supplied
511
+ # @yieldparam result [Google::Apis::MetastoreV1beta::Operation] parsed result object
512
+ # @yieldparam err [StandardError] error object if request failed
513
+ #
514
+ # @return [Google::Apis::MetastoreV1beta::Operation]
515
+ #
516
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
517
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
518
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
519
+ def patch_project_location_service(name, service_object = nil, request_id: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
520
+ command = make_simple_command(:patch, 'v1beta/{+name}', options)
521
+ command.request_representation = Google::Apis::MetastoreV1beta::Service::Representation
522
+ command.request_object = service_object
523
+ command.response_representation = Google::Apis::MetastoreV1beta::Operation::Representation
524
+ command.response_class = Google::Apis::MetastoreV1beta::Operation
525
+ command.params['name'] = name unless name.nil?
526
+ command.query['requestId'] = request_id unless request_id.nil?
527
+ command.query['updateMask'] = update_mask unless update_mask.nil?
528
+ command.query['fields'] = fields unless fields.nil?
529
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
530
+ execute_or_queue_command(command, &block)
531
+ end
532
+
533
+ # Sets the access control policy on the specified resource. Replaces any
534
+ # existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED
535
+ # errors.
536
+ # @param [String] resource
537
+ # REQUIRED: The resource for which the policy is being specified. See the
538
+ # operation documentation for the appropriate value for this field.
539
+ # @param [Google::Apis::MetastoreV1beta::SetIamPolicyRequest] set_iam_policy_request_object
540
+ # @param [String] fields
541
+ # Selector specifying which fields to include in a partial response.
542
+ # @param [String] quota_user
543
+ # Available to use for quota purposes for server-side applications. Can be any
544
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
545
+ # @param [Google::Apis::RequestOptions] options
546
+ # Request-specific options
547
+ #
548
+ # @yield [result, err] Result & error if block supplied
549
+ # @yieldparam result [Google::Apis::MetastoreV1beta::Policy] parsed result object
550
+ # @yieldparam err [StandardError] error object if request failed
551
+ #
552
+ # @return [Google::Apis::MetastoreV1beta::Policy]
553
+ #
554
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
555
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
556
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
557
+ def set_service_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
558
+ command = make_simple_command(:post, 'v1beta/{+resource}:setIamPolicy', options)
559
+ command.request_representation = Google::Apis::MetastoreV1beta::SetIamPolicyRequest::Representation
560
+ command.request_object = set_iam_policy_request_object
561
+ command.response_representation = Google::Apis::MetastoreV1beta::Policy::Representation
562
+ command.response_class = Google::Apis::MetastoreV1beta::Policy
563
+ command.params['resource'] = resource unless resource.nil?
564
+ command.query['fields'] = fields unless fields.nil?
565
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
566
+ execute_or_queue_command(command, &block)
567
+ end
568
+
569
+ # Returns permissions that a caller has on the specified resource. If the
570
+ # resource does not exist, this will return an empty set of permissions, not a
571
+ # NOT_FOUND error.Note: This operation is designed to be used for building
572
+ # permission-aware UIs and command-line tools, not for authorization checking.
573
+ # This operation may "fail open" without warning.
574
+ # @param [String] resource
575
+ # REQUIRED: The resource for which the policy detail is being requested. See the
576
+ # operation documentation for the appropriate value for this field.
577
+ # @param [Google::Apis::MetastoreV1beta::TestIamPermissionsRequest] test_iam_permissions_request_object
578
+ # @param [String] fields
579
+ # Selector specifying which fields to include in a partial response.
580
+ # @param [String] quota_user
581
+ # Available to use for quota purposes for server-side applications. Can be any
582
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
583
+ # @param [Google::Apis::RequestOptions] options
584
+ # Request-specific options
585
+ #
586
+ # @yield [result, err] Result & error if block supplied
587
+ # @yieldparam result [Google::Apis::MetastoreV1beta::TestIamPermissionsResponse] parsed result object
588
+ # @yieldparam err [StandardError] error object if request failed
589
+ #
590
+ # @return [Google::Apis::MetastoreV1beta::TestIamPermissionsResponse]
591
+ #
592
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
593
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
594
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
595
+ def test_service_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
596
+ command = make_simple_command(:post, 'v1beta/{+resource}:testIamPermissions', options)
597
+ command.request_representation = Google::Apis::MetastoreV1beta::TestIamPermissionsRequest::Representation
598
+ command.request_object = test_iam_permissions_request_object
599
+ command.response_representation = Google::Apis::MetastoreV1beta::TestIamPermissionsResponse::Representation
600
+ command.response_class = Google::Apis::MetastoreV1beta::TestIamPermissionsResponse
601
+ command.params['resource'] = resource unless resource.nil?
602
+ command.query['fields'] = fields unless fields.nil?
603
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
604
+ execute_or_queue_command(command, &block)
605
+ end
606
+
607
+ # Creates a new MetadataImport in a given project and location.
608
+ # @param [String] parent
609
+ # Required. The relative resource name of the service in which to create a
610
+ # metastore import, in the following form:"projects/`project_number`/locations/`
611
+ # location_id`/services/`service_id`"
612
+ # @param [Google::Apis::MetastoreV1beta::MetadataImport] metadata_import_object
613
+ # @param [String] metadata_import_id
614
+ # Required. The ID of the metadata import, which is used as the final component
615
+ # of the metadata import's name.This value must be between 1 and 64 characters
616
+ # long, begin with a letter, end with a letter or number, and consist of alpha-
617
+ # numeric ASCII characters or hyphens.
618
+ # @param [String] request_id
619
+ # Optional. A request ID. Specify a unique request ID to allow the server to
620
+ # ignore the request if it has completed. The server will ignore subsequent
621
+ # requests that provide a duplicate request ID for at least 60 minutes after the
622
+ # first request.For example, if an initial request times out, followed by
623
+ # another request with the same request ID, the server ignores the second
624
+ # request to prevent the creation of duplicate commitments.The request ID must
625
+ # be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#
626
+ # Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
627
+ # @param [String] fields
628
+ # Selector specifying which fields to include in a partial response.
629
+ # @param [String] quota_user
630
+ # Available to use for quota purposes for server-side applications. Can be any
631
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
632
+ # @param [Google::Apis::RequestOptions] options
633
+ # Request-specific options
634
+ #
635
+ # @yield [result, err] Result & error if block supplied
636
+ # @yieldparam result [Google::Apis::MetastoreV1beta::Operation] parsed result object
637
+ # @yieldparam err [StandardError] error object if request failed
638
+ #
639
+ # @return [Google::Apis::MetastoreV1beta::Operation]
640
+ #
641
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
642
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
643
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
644
+ def create_project_location_service_metadata_import(parent, metadata_import_object = nil, metadata_import_id: nil, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
645
+ command = make_simple_command(:post, 'v1beta/{+parent}/metadataImports', options)
646
+ command.request_representation = Google::Apis::MetastoreV1beta::MetadataImport::Representation
647
+ command.request_object = metadata_import_object
648
+ command.response_representation = Google::Apis::MetastoreV1beta::Operation::Representation
649
+ command.response_class = Google::Apis::MetastoreV1beta::Operation
650
+ command.params['parent'] = parent unless parent.nil?
651
+ command.query['metadataImportId'] = metadata_import_id unless metadata_import_id.nil?
652
+ command.query['requestId'] = request_id unless request_id.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
+ # Gets details of a single import.
659
+ # @param [String] name
660
+ # Required. The relative resource name of the metadata import to retrieve, in
661
+ # the following form:"projects/`project_number`/locations/`location_id`/services/
662
+ # `service_id`/metadataImports/`import_id`".
663
+ # @param [String] fields
664
+ # Selector specifying which fields to include in a partial response.
665
+ # @param [String] quota_user
666
+ # Available to use for quota purposes for server-side applications. Can be any
667
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
668
+ # @param [Google::Apis::RequestOptions] options
669
+ # Request-specific options
670
+ #
671
+ # @yield [result, err] Result & error if block supplied
672
+ # @yieldparam result [Google::Apis::MetastoreV1beta::MetadataImport] parsed result object
673
+ # @yieldparam err [StandardError] error object if request failed
674
+ #
675
+ # @return [Google::Apis::MetastoreV1beta::MetadataImport]
676
+ #
677
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
678
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
679
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
680
+ def get_project_location_service_metadata_import(name, fields: nil, quota_user: nil, options: nil, &block)
681
+ command = make_simple_command(:get, 'v1beta/{+name}', options)
682
+ command.response_representation = Google::Apis::MetastoreV1beta::MetadataImport::Representation
683
+ command.response_class = Google::Apis::MetastoreV1beta::MetadataImport
684
+ command.params['name'] = name unless name.nil?
685
+ command.query['fields'] = fields unless fields.nil?
686
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
687
+ execute_or_queue_command(command, &block)
688
+ end
689
+
690
+ # Lists imports in a service.
691
+ # @param [String] parent
692
+ # Required. The relative resource name of the service whose metadata imports to
693
+ # list, in the following form:"projects/`project_number`/locations/`location_id`/
694
+ # services/`service_id`/metadataImports".
695
+ # @param [String] filter
696
+ # Optional. The filter to apply to list results.
697
+ # @param [String] order_by
698
+ # Optional. Specify the ordering of results as described in Sorting Order. If
699
+ # not specified, the results will be sorted in the default order.
700
+ # @param [Fixnum] page_size
701
+ # Optional. The maximum number of imports to return. The response may contain
702
+ # less than the maximum number. If unspecified, no more than 500 imports are
703
+ # returned. The maximum value is 1000; values above 1000 are changed to 1000.
704
+ # @param [String] page_token
705
+ # Optional. A page token, received from a previous DataprocMetastore.
706
+ # ListServices call. Provide this token to retrieve the subsequent page.To
707
+ # retrieve the first page, supply an empty page token.When paginating, other
708
+ # parameters provided to DataprocMetastore.ListServices must match the call that
709
+ # provided the page token.
710
+ # @param [String] fields
711
+ # Selector specifying which fields to include in a partial response.
712
+ # @param [String] quota_user
713
+ # Available to use for quota purposes for server-side applications. Can be any
714
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
715
+ # @param [Google::Apis::RequestOptions] options
716
+ # Request-specific options
717
+ #
718
+ # @yield [result, err] Result & error if block supplied
719
+ # @yieldparam result [Google::Apis::MetastoreV1beta::ListMetadataImportsResponse] parsed result object
720
+ # @yieldparam err [StandardError] error object if request failed
721
+ #
722
+ # @return [Google::Apis::MetastoreV1beta::ListMetadataImportsResponse]
723
+ #
724
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
725
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
726
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
727
+ def list_project_location_service_metadata_imports(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
728
+ command = make_simple_command(:get, 'v1beta/{+parent}/metadataImports', options)
729
+ command.response_representation = Google::Apis::MetastoreV1beta::ListMetadataImportsResponse::Representation
730
+ command.response_class = Google::Apis::MetastoreV1beta::ListMetadataImportsResponse
731
+ command.params['parent'] = parent unless parent.nil?
732
+ command.query['filter'] = filter unless filter.nil?
733
+ command.query['orderBy'] = order_by unless order_by.nil?
734
+ command.query['pageSize'] = page_size unless page_size.nil?
735
+ command.query['pageToken'] = page_token unless page_token.nil?
736
+ command.query['fields'] = fields unless fields.nil?
737
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
738
+ execute_or_queue_command(command, &block)
739
+ end
740
+
741
+ # Updates a single import. Only the description field of MetadataImport is
742
+ # supported to be updated.
743
+ # @param [String] name
744
+ # Immutable. The relative resource name of the metadata import, of the form:"
745
+ # projects/`project_number`/locations/`location_id`/services/`service_id`/
746
+ # metadataImports/`metadata_import_id`".
747
+ # @param [Google::Apis::MetastoreV1beta::MetadataImport] metadata_import_object
748
+ # @param [String] request_id
749
+ # Optional. A request ID. Specify a unique request ID to allow the server to
750
+ # ignore the request if it has completed. The server will ignore subsequent
751
+ # requests that provide a duplicate request ID for at least 60 minutes after the
752
+ # first request.For example, if an initial request times out, followed by
753
+ # another request with the same request ID, the server ignores the second
754
+ # request to prevent the creation of duplicate commitments.The request ID must
755
+ # be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#
756
+ # Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
757
+ # @param [String] update_mask
758
+ # Required. A field mask used to specify the fields to be overwritten in the
759
+ # metadata import resource by the update. Fields specified in the update_mask
760
+ # are relative to the resource (not to the full request). A field is overwritten
761
+ # if it is in the mask.
762
+ # @param [String] fields
763
+ # Selector specifying which fields to include in a partial response.
764
+ # @param [String] quota_user
765
+ # Available to use for quota purposes for server-side applications. Can be any
766
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
767
+ # @param [Google::Apis::RequestOptions] options
768
+ # Request-specific options
769
+ #
770
+ # @yield [result, err] Result & error if block supplied
771
+ # @yieldparam result [Google::Apis::MetastoreV1beta::Operation] parsed result object
772
+ # @yieldparam err [StandardError] error object if request failed
773
+ #
774
+ # @return [Google::Apis::MetastoreV1beta::Operation]
775
+ #
776
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
777
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
778
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
779
+ def patch_project_location_service_metadata_import(name, metadata_import_object = nil, request_id: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
780
+ command = make_simple_command(:patch, 'v1beta/{+name}', options)
781
+ command.request_representation = Google::Apis::MetastoreV1beta::MetadataImport::Representation
782
+ command.request_object = metadata_import_object
783
+ command.response_representation = Google::Apis::MetastoreV1beta::Operation::Representation
784
+ command.response_class = Google::Apis::MetastoreV1beta::Operation
785
+ command.params['name'] = name unless name.nil?
786
+ command.query['requestId'] = request_id unless request_id.nil?
787
+ command.query['updateMask'] = update_mask unless update_mask.nil?
788
+ command.query['fields'] = fields unless fields.nil?
789
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
790
+ execute_or_queue_command(command, &block)
791
+ end
792
+
793
+ protected
794
+
795
+ def apply_command_defaults(command)
796
+ command.query['key'] = key unless key.nil?
797
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
798
+ end
799
+ end
800
+ end
801
+ end
802
+ end