google-apis-metastore_v1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,1496 @@
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 MetastoreV1
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_v1'
30
+ #
31
+ # Metastore = Google::Apis::MetastoreV1 # 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_v1',
49
+ client_version: Google::Apis::MetastoreV1::GEM_VERSION)
50
+ @batch_path = 'batch'
51
+ end
52
+
53
+ # Starts asynchronous cancellation on a long-running operation. The server makes
54
+ # a best effort to cancel the operation, but success is not guaranteed. If the
55
+ # server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.
56
+ # Clients can use Operations.GetOperation or other methods to check whether the
57
+ # cancellation succeeded or whether the operation completed despite cancellation.
58
+ # On successful cancellation, the operation is not deleted; instead, it becomes
59
+ # an operation with an Operation.error value with a google.rpc.Status.code of 1,
60
+ # corresponding to Code.CANCELLED.
61
+ # @param [String] name
62
+ # The name of the operation resource to be cancelled.
63
+ # @param [Google::Apis::MetastoreV1::CancelOperationRequest] cancel_operation_request_object
64
+ # @param [String] fields
65
+ # Selector specifying which fields to include in a partial response.
66
+ # @param [String] quota_user
67
+ # Available to use for quota purposes for server-side applications. Can be any
68
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
69
+ # @param [Google::Apis::RequestOptions] options
70
+ # Request-specific options
71
+ #
72
+ # @yield [result, err] Result & error if block supplied
73
+ # @yieldparam result [Google::Apis::MetastoreV1::Empty] parsed result object
74
+ # @yieldparam err [StandardError] error object if request failed
75
+ #
76
+ # @return [Google::Apis::MetastoreV1::Empty]
77
+ #
78
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
79
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
80
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
81
+ def cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
82
+ command = make_simple_command(:post, 'v1/{+name}:cancel', options)
83
+ command.request_representation = Google::Apis::MetastoreV1::CancelOperationRequest::Representation
84
+ command.request_object = cancel_operation_request_object
85
+ command.response_representation = Google::Apis::MetastoreV1::Empty::Representation
86
+ command.response_class = Google::Apis::MetastoreV1::Empty
87
+ command.params['name'] = name unless name.nil?
88
+ command.query['fields'] = fields unless fields.nil?
89
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
90
+ execute_or_queue_command(command, &block)
91
+ end
92
+
93
+ # Gets information about a location.
94
+ # @param [String] name
95
+ # Resource name for the location.
96
+ # @param [String] fields
97
+ # Selector specifying which fields to include in a partial response.
98
+ # @param [String] quota_user
99
+ # Available to use for quota purposes for server-side applications. Can be any
100
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
101
+ # @param [Google::Apis::RequestOptions] options
102
+ # Request-specific options
103
+ #
104
+ # @yield [result, err] Result & error if block supplied
105
+ # @yieldparam result [Google::Apis::MetastoreV1::Location] parsed result object
106
+ # @yieldparam err [StandardError] error object if request failed
107
+ #
108
+ # @return [Google::Apis::MetastoreV1::Location]
109
+ #
110
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
111
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
112
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
113
+ def get_project_location(name, fields: nil, quota_user: nil, options: nil, &block)
114
+ command = make_simple_command(:get, 'v1/{+name}', options)
115
+ command.response_representation = Google::Apis::MetastoreV1::Location::Representation
116
+ command.response_class = Google::Apis::MetastoreV1::Location
117
+ command.params['name'] = name unless name.nil?
118
+ command.query['fields'] = fields unless fields.nil?
119
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
120
+ execute_or_queue_command(command, &block)
121
+ end
122
+
123
+ # Lists information about the supported locations for this service.
124
+ # @param [String] name
125
+ # The resource that owns the locations collection, if applicable.
126
+ # @param [String] filter
127
+ # A filter to narrow down results to a preferred subset. The filtering language
128
+ # accepts strings like "displayName=tokyo", and is documented in more detail in
129
+ # AIP-160 (https://google.aip.dev/160).
130
+ # @param [Fixnum] page_size
131
+ # The maximum number of results to return. If not set, the service selects a
132
+ # default.
133
+ # @param [String] page_token
134
+ # A page token received from the next_page_token field in the response. Send
135
+ # that page token to receive the subsequent page.
136
+ # @param [String] fields
137
+ # Selector specifying which fields to include in a partial response.
138
+ # @param [String] quota_user
139
+ # Available to use for quota purposes for server-side applications. Can be any
140
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
141
+ # @param [Google::Apis::RequestOptions] options
142
+ # Request-specific options
143
+ #
144
+ # @yield [result, err] Result & error if block supplied
145
+ # @yieldparam result [Google::Apis::MetastoreV1::ListLocationsResponse] parsed result object
146
+ # @yieldparam err [StandardError] error object if request failed
147
+ #
148
+ # @return [Google::Apis::MetastoreV1::ListLocationsResponse]
149
+ #
150
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
151
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
152
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
153
+ def list_project_locations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
154
+ command = make_simple_command(:get, 'v1/{+name}/locations', options)
155
+ command.response_representation = Google::Apis::MetastoreV1::ListLocationsResponse::Representation
156
+ command.response_class = Google::Apis::MetastoreV1::ListLocationsResponse
157
+ command.params['name'] = name unless name.nil?
158
+ command.query['filter'] = filter unless filter.nil?
159
+ command.query['pageSize'] = page_size unless page_size.nil?
160
+ command.query['pageToken'] = page_token unless page_token.nil?
161
+ command.query['fields'] = fields unless fields.nil?
162
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
163
+ execute_or_queue_command(command, &block)
164
+ end
165
+
166
+ # Creates a metastore federation in a project and location.
167
+ # @param [String] parent
168
+ # Required. The relative resource name of the location in which to create a
169
+ # federation service, in the following form:projects/`project_number`/locations/`
170
+ # location_id`.
171
+ # @param [Google::Apis::MetastoreV1::Federation] federation_object
172
+ # @param [String] federation_id
173
+ # Required. The ID of the metastore federation, which is used as the final
174
+ # component of the metastore federation's name.This value must be between 2 and
175
+ # 63 characters long inclusive, begin with a letter, end with a letter or number,
176
+ # and consist of alpha-numeric ASCII characters or hyphens.
177
+ # @param [String] request_id
178
+ # Optional. A request ID. Specify a unique request ID to allow the server to
179
+ # ignore the request if it has completed. The server will ignore subsequent
180
+ # requests that provide a duplicate request ID for at least 60 minutes after the
181
+ # first request.For example, if an initial request times out, followed by
182
+ # another request with the same request ID, the server ignores the second
183
+ # request to prevent the creation of duplicate commitments.The request ID must
184
+ # be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#
185
+ # Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
186
+ # @param [String] fields
187
+ # Selector specifying which fields to include in a partial response.
188
+ # @param [String] quota_user
189
+ # Available to use for quota purposes for server-side applications. Can be any
190
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
191
+ # @param [Google::Apis::RequestOptions] options
192
+ # Request-specific options
193
+ #
194
+ # @yield [result, err] Result & error if block supplied
195
+ # @yieldparam result [Google::Apis::MetastoreV1::Operation] parsed result object
196
+ # @yieldparam err [StandardError] error object if request failed
197
+ #
198
+ # @return [Google::Apis::MetastoreV1::Operation]
199
+ #
200
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
201
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
202
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
203
+ def create_project_location_federation(parent, federation_object = nil, federation_id: nil, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
204
+ command = make_simple_command(:post, 'v1/{+parent}/federations', options)
205
+ command.request_representation = Google::Apis::MetastoreV1::Federation::Representation
206
+ command.request_object = federation_object
207
+ command.response_representation = Google::Apis::MetastoreV1::Operation::Representation
208
+ command.response_class = Google::Apis::MetastoreV1::Operation
209
+ command.params['parent'] = parent unless parent.nil?
210
+ command.query['federationId'] = federation_id unless federation_id.nil?
211
+ command.query['requestId'] = request_id unless request_id.nil?
212
+ command.query['fields'] = fields unless fields.nil?
213
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
214
+ execute_or_queue_command(command, &block)
215
+ end
216
+
217
+ # Deletes a single federation.
218
+ # @param [String] name
219
+ # Required. The relative resource name of the metastore federation to delete, in
220
+ # the following form:projects/`project_number`/locations/`location_id`/
221
+ # federations/`federation_id`.
222
+ # @param [String] request_id
223
+ # Optional. A request ID. Specify a unique request ID to allow the server to
224
+ # ignore the request if it has completed. The server will ignore subsequent
225
+ # requests that provide a duplicate request ID for at least 60 minutes after the
226
+ # first request.For example, if an initial request times out, followed by
227
+ # another request with the same request ID, the server ignores the second
228
+ # request to prevent the creation of duplicate commitments.The request ID must
229
+ # be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#
230
+ # Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
231
+ # @param [String] fields
232
+ # Selector specifying which fields to include in a partial response.
233
+ # @param [String] quota_user
234
+ # Available to use for quota purposes for server-side applications. Can be any
235
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
236
+ # @param [Google::Apis::RequestOptions] options
237
+ # Request-specific options
238
+ #
239
+ # @yield [result, err] Result & error if block supplied
240
+ # @yieldparam result [Google::Apis::MetastoreV1::Operation] parsed result object
241
+ # @yieldparam err [StandardError] error object if request failed
242
+ #
243
+ # @return [Google::Apis::MetastoreV1::Operation]
244
+ #
245
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
246
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
247
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
248
+ def delete_project_location_federation(name, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
249
+ command = make_simple_command(:delete, 'v1/{+name}', options)
250
+ command.response_representation = Google::Apis::MetastoreV1::Operation::Representation
251
+ command.response_class = Google::Apis::MetastoreV1::Operation
252
+ command.params['name'] = name unless name.nil?
253
+ command.query['requestId'] = request_id unless request_id.nil?
254
+ command.query['fields'] = fields unless fields.nil?
255
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
256
+ execute_or_queue_command(command, &block)
257
+ end
258
+
259
+ # Gets the details of a single federation.
260
+ # @param [String] name
261
+ # Required. The relative resource name of the metastore federation to retrieve,
262
+ # in the following form:projects/`project_number`/locations/`location_id`/
263
+ # federations/`federation_id`.
264
+ # @param [String] fields
265
+ # Selector specifying which fields to include in a partial response.
266
+ # @param [String] quota_user
267
+ # Available to use for quota purposes for server-side applications. Can be any
268
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
269
+ # @param [Google::Apis::RequestOptions] options
270
+ # Request-specific options
271
+ #
272
+ # @yield [result, err] Result & error if block supplied
273
+ # @yieldparam result [Google::Apis::MetastoreV1::Federation] parsed result object
274
+ # @yieldparam err [StandardError] error object if request failed
275
+ #
276
+ # @return [Google::Apis::MetastoreV1::Federation]
277
+ #
278
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
279
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
280
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
281
+ def get_project_location_federation(name, fields: nil, quota_user: nil, options: nil, &block)
282
+ command = make_simple_command(:get, 'v1/{+name}', options)
283
+ command.response_representation = Google::Apis::MetastoreV1::Federation::Representation
284
+ command.response_class = Google::Apis::MetastoreV1::Federation
285
+ command.params['name'] = name unless name.nil?
286
+ command.query['fields'] = fields unless fields.nil?
287
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
288
+ execute_or_queue_command(command, &block)
289
+ end
290
+
291
+ # Gets the access control policy for a resource. Returns an empty policy if the
292
+ # resource exists and does not have a policy set.
293
+ # @param [String] resource
294
+ # REQUIRED: The resource for which the policy is being requested. See Resource
295
+ # names (https://cloud.google.com/apis/design/resource_names) for the
296
+ # appropriate value for this field.
297
+ # @param [Fixnum] options_requested_policy_version
298
+ # Optional. The maximum policy version that will be used to format the policy.
299
+ # Valid values are 0, 1, and 3. Requests specifying an invalid value will be
300
+ # rejected.Requests for policies with any conditional role bindings must specify
301
+ # version 3. Policies with no conditional role bindings may specify any valid
302
+ # value or leave the field unset.The policy in the response might use the policy
303
+ # version that you specified, or it might use a lower policy version. For
304
+ # example, if you specify version 3, but the policy has no conditional role
305
+ # bindings, the response uses version 1.To learn which resources support
306
+ # conditions in their IAM policies, see the IAM documentation (https://cloud.
307
+ # google.com/iam/help/conditions/resource-policies).
308
+ # @param [String] fields
309
+ # Selector specifying which fields to include in a partial response.
310
+ # @param [String] quota_user
311
+ # Available to use for quota purposes for server-side applications. Can be any
312
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
313
+ # @param [Google::Apis::RequestOptions] options
314
+ # Request-specific options
315
+ #
316
+ # @yield [result, err] Result & error if block supplied
317
+ # @yieldparam result [Google::Apis::MetastoreV1::Policy] parsed result object
318
+ # @yieldparam err [StandardError] error object if request failed
319
+ #
320
+ # @return [Google::Apis::MetastoreV1::Policy]
321
+ #
322
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
323
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
324
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
325
+ def get_project_location_federation_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil, &block)
326
+ command = make_simple_command(:get, 'v1/{+resource}:getIamPolicy', options)
327
+ command.response_representation = Google::Apis::MetastoreV1::Policy::Representation
328
+ command.response_class = Google::Apis::MetastoreV1::Policy
329
+ command.params['resource'] = resource unless resource.nil?
330
+ command.query['options.requestedPolicyVersion'] = options_requested_policy_version unless options_requested_policy_version.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
+ # Lists federations in a project and location.
337
+ # @param [String] parent
338
+ # Required. The relative resource name of the location of metastore federations
339
+ # to list, in the following form: projects/`project_number`/locations/`
340
+ # location_id`.
341
+ # @param [String] filter
342
+ # Optional. The filter to apply to list results.
343
+ # @param [String] order_by
344
+ # Optional. Specify the ordering of results as described in Sorting Order (https:
345
+ # //cloud.google.com/apis/design/design_patterns#sorting_order). If not
346
+ # specified, the results will be sorted in the default order.
347
+ # @param [Fixnum] page_size
348
+ # Optional. The maximum number of federations to return. The response may
349
+ # contain less than the maximum number. If unspecified, no more than 500
350
+ # services are returned. The maximum value is 1000; values above 1000 are
351
+ # changed to 1000.
352
+ # @param [String] page_token
353
+ # Optional. A page token, received from a previous ListFederationServices call.
354
+ # Provide this token to retrieve the subsequent page.To retrieve the first page,
355
+ # supply an empty page token.When paginating, other parameters provided to
356
+ # ListFederationServices must match the call that provided the page token.
357
+ # @param [String] fields
358
+ # Selector specifying which fields to include in a partial response.
359
+ # @param [String] quota_user
360
+ # Available to use for quota purposes for server-side applications. Can be any
361
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
362
+ # @param [Google::Apis::RequestOptions] options
363
+ # Request-specific options
364
+ #
365
+ # @yield [result, err] Result & error if block supplied
366
+ # @yieldparam result [Google::Apis::MetastoreV1::ListFederationsResponse] parsed result object
367
+ # @yieldparam err [StandardError] error object if request failed
368
+ #
369
+ # @return [Google::Apis::MetastoreV1::ListFederationsResponse]
370
+ #
371
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
372
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
373
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
374
+ def list_project_location_federations(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
375
+ command = make_simple_command(:get, 'v1/{+parent}/federations', options)
376
+ command.response_representation = Google::Apis::MetastoreV1::ListFederationsResponse::Representation
377
+ command.response_class = Google::Apis::MetastoreV1::ListFederationsResponse
378
+ command.params['parent'] = parent unless parent.nil?
379
+ command.query['filter'] = filter unless filter.nil?
380
+ command.query['orderBy'] = order_by unless order_by.nil?
381
+ command.query['pageSize'] = page_size unless page_size.nil?
382
+ command.query['pageToken'] = page_token unless page_token.nil?
383
+ command.query['fields'] = fields unless fields.nil?
384
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
385
+ execute_or_queue_command(command, &block)
386
+ end
387
+
388
+ # Updates the fields of a federation.
389
+ # @param [String] name
390
+ # Immutable. The relative resource name of the federation, of the form: projects/
391
+ # `project_number`/locations/`location_id`/federations/`federation_id``.
392
+ # @param [Google::Apis::MetastoreV1::Federation] federation_object
393
+ # @param [String] request_id
394
+ # Optional. A request ID. Specify a unique request ID to allow the server to
395
+ # ignore the request if it has completed. The server will ignore subsequent
396
+ # requests that provide a duplicate request ID for at least 60 minutes after the
397
+ # first request.For example, if an initial request times out, followed by
398
+ # another request with the same request ID, the server ignores the second
399
+ # request to prevent the creation of duplicate commitments.The request ID must
400
+ # be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#
401
+ # Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
402
+ # @param [String] update_mask
403
+ # Required. A field mask used to specify the fields to be overwritten in the
404
+ # metastore federation resource by the update. Fields specified in the
405
+ # update_mask are relative to the resource (not to the full request). A field is
406
+ # overwritten if it is in the mask.
407
+ # @param [String] fields
408
+ # Selector specifying which fields to include in a partial response.
409
+ # @param [String] quota_user
410
+ # Available to use for quota purposes for server-side applications. Can be any
411
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
412
+ # @param [Google::Apis::RequestOptions] options
413
+ # Request-specific options
414
+ #
415
+ # @yield [result, err] Result & error if block supplied
416
+ # @yieldparam result [Google::Apis::MetastoreV1::Operation] parsed result object
417
+ # @yieldparam err [StandardError] error object if request failed
418
+ #
419
+ # @return [Google::Apis::MetastoreV1::Operation]
420
+ #
421
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
422
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
423
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
424
+ def patch_project_location_federation(name, federation_object = nil, request_id: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
425
+ command = make_simple_command(:patch, 'v1/{+name}', options)
426
+ command.request_representation = Google::Apis::MetastoreV1::Federation::Representation
427
+ command.request_object = federation_object
428
+ command.response_representation = Google::Apis::MetastoreV1::Operation::Representation
429
+ command.response_class = Google::Apis::MetastoreV1::Operation
430
+ command.params['name'] = name unless name.nil?
431
+ command.query['requestId'] = request_id unless request_id.nil?
432
+ command.query['updateMask'] = update_mask unless update_mask.nil?
433
+ command.query['fields'] = fields unless fields.nil?
434
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
435
+ execute_or_queue_command(command, &block)
436
+ end
437
+
438
+ # Sets the access control policy on the specified resource. Replaces any
439
+ # existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED
440
+ # errors.
441
+ # @param [String] resource
442
+ # REQUIRED: The resource for which the policy is being specified. See Resource
443
+ # names (https://cloud.google.com/apis/design/resource_names) for the
444
+ # appropriate value for this field.
445
+ # @param [Google::Apis::MetastoreV1::SetIamPolicyRequest] set_iam_policy_request_object
446
+ # @param [String] fields
447
+ # Selector specifying which fields to include in a partial response.
448
+ # @param [String] quota_user
449
+ # Available to use for quota purposes for server-side applications. Can be any
450
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
451
+ # @param [Google::Apis::RequestOptions] options
452
+ # Request-specific options
453
+ #
454
+ # @yield [result, err] Result & error if block supplied
455
+ # @yieldparam result [Google::Apis::MetastoreV1::Policy] parsed result object
456
+ # @yieldparam err [StandardError] error object if request failed
457
+ #
458
+ # @return [Google::Apis::MetastoreV1::Policy]
459
+ #
460
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
461
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
462
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
463
+ def set_federation_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
464
+ command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
465
+ command.request_representation = Google::Apis::MetastoreV1::SetIamPolicyRequest::Representation
466
+ command.request_object = set_iam_policy_request_object
467
+ command.response_representation = Google::Apis::MetastoreV1::Policy::Representation
468
+ command.response_class = Google::Apis::MetastoreV1::Policy
469
+ command.params['resource'] = resource unless resource.nil?
470
+ command.query['fields'] = fields unless fields.nil?
471
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
472
+ execute_or_queue_command(command, &block)
473
+ end
474
+
475
+ # Returns permissions that a caller has on the specified resource. If the
476
+ # resource does not exist, this will return an empty set of permissions, not a
477
+ # NOT_FOUND error.Note: This operation is designed to be used for building
478
+ # permission-aware UIs and command-line tools, not for authorization checking.
479
+ # This operation may "fail open" without warning.
480
+ # @param [String] resource
481
+ # REQUIRED: The resource for which the policy detail is being requested. See
482
+ # Resource names (https://cloud.google.com/apis/design/resource_names) for the
483
+ # appropriate value for this field.
484
+ # @param [Google::Apis::MetastoreV1::TestIamPermissionsRequest] test_iam_permissions_request_object
485
+ # @param [String] fields
486
+ # Selector specifying which fields to include in a partial response.
487
+ # @param [String] quota_user
488
+ # Available to use for quota purposes for server-side applications. Can be any
489
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
490
+ # @param [Google::Apis::RequestOptions] options
491
+ # Request-specific options
492
+ #
493
+ # @yield [result, err] Result & error if block supplied
494
+ # @yieldparam result [Google::Apis::MetastoreV1::TestIamPermissionsResponse] parsed result object
495
+ # @yieldparam err [StandardError] error object if request failed
496
+ #
497
+ # @return [Google::Apis::MetastoreV1::TestIamPermissionsResponse]
498
+ #
499
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
500
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
501
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
502
+ def test_federation_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
503
+ command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
504
+ command.request_representation = Google::Apis::MetastoreV1::TestIamPermissionsRequest::Representation
505
+ command.request_object = test_iam_permissions_request_object
506
+ command.response_representation = Google::Apis::MetastoreV1::TestIamPermissionsResponse::Representation
507
+ command.response_class = Google::Apis::MetastoreV1::TestIamPermissionsResponse
508
+ command.params['resource'] = resource unless resource.nil?
509
+ command.query['fields'] = fields unless fields.nil?
510
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
511
+ execute_or_queue_command(command, &block)
512
+ end
513
+
514
+ # Deletes a long-running operation. This method indicates that the client is no
515
+ # longer interested in the operation result. It does not cancel the operation.
516
+ # If the server doesn't support this method, it returns google.rpc.Code.
517
+ # UNIMPLEMENTED.
518
+ # @param [String] name
519
+ # The name of the operation resource to be deleted.
520
+ # @param [String] fields
521
+ # Selector specifying which fields to include in a partial response.
522
+ # @param [String] quota_user
523
+ # Available to use for quota purposes for server-side applications. Can be any
524
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
525
+ # @param [Google::Apis::RequestOptions] options
526
+ # Request-specific options
527
+ #
528
+ # @yield [result, err] Result & error if block supplied
529
+ # @yieldparam result [Google::Apis::MetastoreV1::Empty] parsed result object
530
+ # @yieldparam err [StandardError] error object if request failed
531
+ #
532
+ # @return [Google::Apis::MetastoreV1::Empty]
533
+ #
534
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
535
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
536
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
537
+ def delete_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
538
+ command = make_simple_command(:delete, 'v1/{+name}', options)
539
+ command.response_representation = Google::Apis::MetastoreV1::Empty::Representation
540
+ command.response_class = Google::Apis::MetastoreV1::Empty
541
+ command.params['name'] = name unless name.nil?
542
+ command.query['fields'] = fields unless fields.nil?
543
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
544
+ execute_or_queue_command(command, &block)
545
+ end
546
+
547
+ # Gets the latest state of a long-running operation. Clients can use this method
548
+ # to poll the operation result at intervals as recommended by the API service.
549
+ # @param [String] name
550
+ # The name of the operation resource.
551
+ # @param [String] fields
552
+ # Selector specifying which fields to include in a partial response.
553
+ # @param [String] quota_user
554
+ # Available to use for quota purposes for server-side applications. Can be any
555
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
556
+ # @param [Google::Apis::RequestOptions] options
557
+ # Request-specific options
558
+ #
559
+ # @yield [result, err] Result & error if block supplied
560
+ # @yieldparam result [Google::Apis::MetastoreV1::Operation] parsed result object
561
+ # @yieldparam err [StandardError] error object if request failed
562
+ #
563
+ # @return [Google::Apis::MetastoreV1::Operation]
564
+ #
565
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
566
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
567
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
568
+ def get_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
569
+ command = make_simple_command(:get, 'v1/{+name}', options)
570
+ command.response_representation = Google::Apis::MetastoreV1::Operation::Representation
571
+ command.response_class = Google::Apis::MetastoreV1::Operation
572
+ command.params['name'] = name unless name.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 operations that match the specified filter in the request. If the server
579
+ # doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding
580
+ # allows API services to override the binding to use different resource name
581
+ # schemes, such as users/*/operations. To override the binding, API services can
582
+ # add a binding such as "/v1/`name=users/*`/operations" to their service
583
+ # configuration. For backwards compatibility, the default name includes the
584
+ # operations collection id, however overriding users must ensure the name
585
+ # binding is the parent resource, without the operations collection id.
586
+ # @param [String] name
587
+ # The name of the operation's parent resource.
588
+ # @param [String] filter
589
+ # The standard list filter.
590
+ # @param [Fixnum] page_size
591
+ # The standard list page size.
592
+ # @param [String] page_token
593
+ # The standard list page token.
594
+ # @param [String] fields
595
+ # Selector specifying which fields to include in a partial response.
596
+ # @param [String] quota_user
597
+ # Available to use for quota purposes for server-side applications. Can be any
598
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
599
+ # @param [Google::Apis::RequestOptions] options
600
+ # Request-specific options
601
+ #
602
+ # @yield [result, err] Result & error if block supplied
603
+ # @yieldparam result [Google::Apis::MetastoreV1::ListOperationsResponse] parsed result object
604
+ # @yieldparam err [StandardError] error object if request failed
605
+ #
606
+ # @return [Google::Apis::MetastoreV1::ListOperationsResponse]
607
+ #
608
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
609
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
610
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
611
+ def list_project_location_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
612
+ command = make_simple_command(:get, 'v1/{+name}/operations', options)
613
+ command.response_representation = Google::Apis::MetastoreV1::ListOperationsResponse::Representation
614
+ command.response_class = Google::Apis::MetastoreV1::ListOperationsResponse
615
+ command.params['name'] = name unless name.nil?
616
+ command.query['filter'] = filter unless filter.nil?
617
+ command.query['pageSize'] = page_size unless page_size.nil?
618
+ command.query['pageToken'] = page_token unless page_token.nil?
619
+ command.query['fields'] = fields unless fields.nil?
620
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
621
+ execute_or_queue_command(command, &block)
622
+ end
623
+
624
+ # Creates a metastore service in a project and location.
625
+ # @param [String] parent
626
+ # Required. The relative resource name of the location in which to create a
627
+ # metastore service, in the following form:projects/`project_number`/locations/`
628
+ # location_id`.
629
+ # @param [Google::Apis::MetastoreV1::Service] service_object
630
+ # @param [String] request_id
631
+ # Optional. A request ID. Specify a unique request ID to allow the server to
632
+ # ignore the request if it has completed. The server will ignore subsequent
633
+ # requests that provide a duplicate request ID for at least 60 minutes after the
634
+ # first request.For example, if an initial request times out, followed by
635
+ # another request with the same request ID, the server ignores the second
636
+ # request to prevent the creation of duplicate commitments.The request ID must
637
+ # be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#
638
+ # Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
639
+ # @param [String] service_id
640
+ # Required. The ID of the metastore service, which is used as the final
641
+ # component of the metastore service's name.This value must be between 2 and 63
642
+ # characters long inclusive, begin with a letter, end with a letter or number,
643
+ # and consist of alpha-numeric ASCII characters or hyphens.
644
+ # @param [String] fields
645
+ # Selector specifying which fields to include in a partial response.
646
+ # @param [String] quota_user
647
+ # Available to use for quota purposes for server-side applications. Can be any
648
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
649
+ # @param [Google::Apis::RequestOptions] options
650
+ # Request-specific options
651
+ #
652
+ # @yield [result, err] Result & error if block supplied
653
+ # @yieldparam result [Google::Apis::MetastoreV1::Operation] parsed result object
654
+ # @yieldparam err [StandardError] error object if request failed
655
+ #
656
+ # @return [Google::Apis::MetastoreV1::Operation]
657
+ #
658
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
659
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
660
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
661
+ def create_project_location_service(parent, service_object = nil, request_id: nil, service_id: nil, fields: nil, quota_user: nil, options: nil, &block)
662
+ command = make_simple_command(:post, 'v1/{+parent}/services', options)
663
+ command.request_representation = Google::Apis::MetastoreV1::Service::Representation
664
+ command.request_object = service_object
665
+ command.response_representation = Google::Apis::MetastoreV1::Operation::Representation
666
+ command.response_class = Google::Apis::MetastoreV1::Operation
667
+ command.params['parent'] = parent unless parent.nil?
668
+ command.query['requestId'] = request_id unless request_id.nil?
669
+ command.query['serviceId'] = service_id unless service_id.nil?
670
+ command.query['fields'] = fields unless fields.nil?
671
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
672
+ execute_or_queue_command(command, &block)
673
+ end
674
+
675
+ # Deletes a single service.
676
+ # @param [String] name
677
+ # Required. The relative resource name of the metastore service to delete, in
678
+ # the following form:projects/`project_number`/locations/`location_id`/services/`
679
+ # service_id`.
680
+ # @param [String] request_id
681
+ # Optional. A request ID. Specify a unique request ID to allow the server to
682
+ # ignore the request if it has completed. The server will ignore subsequent
683
+ # requests that provide a duplicate request ID for at least 60 minutes after the
684
+ # first request.For example, if an initial request times out, followed by
685
+ # another request with the same request ID, the server ignores the second
686
+ # request to prevent the creation of duplicate commitments.The request ID must
687
+ # be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#
688
+ # Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
689
+ # @param [String] fields
690
+ # Selector specifying which fields to include in a partial response.
691
+ # @param [String] quota_user
692
+ # Available to use for quota purposes for server-side applications. Can be any
693
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
694
+ # @param [Google::Apis::RequestOptions] options
695
+ # Request-specific options
696
+ #
697
+ # @yield [result, err] Result & error if block supplied
698
+ # @yieldparam result [Google::Apis::MetastoreV1::Operation] parsed result object
699
+ # @yieldparam err [StandardError] error object if request failed
700
+ #
701
+ # @return [Google::Apis::MetastoreV1::Operation]
702
+ #
703
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
704
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
705
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
706
+ def delete_project_location_service(name, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
707
+ command = make_simple_command(:delete, 'v1/{+name}', options)
708
+ command.response_representation = Google::Apis::MetastoreV1::Operation::Representation
709
+ command.response_class = Google::Apis::MetastoreV1::Operation
710
+ command.params['name'] = name unless name.nil?
711
+ command.query['requestId'] = request_id unless request_id.nil?
712
+ command.query['fields'] = fields unless fields.nil?
713
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
714
+ execute_or_queue_command(command, &block)
715
+ end
716
+
717
+ # Exports metadata from a service.
718
+ # @param [String] service
719
+ # Required. The relative resource name of the metastore service to run export,
720
+ # in the following form:projects/`project_id`/locations/`location_id`/services/`
721
+ # service_id`.
722
+ # @param [Google::Apis::MetastoreV1::ExportMetadataRequest] export_metadata_request_object
723
+ # @param [String] fields
724
+ # Selector specifying which fields to include in a partial response.
725
+ # @param [String] quota_user
726
+ # Available to use for quota purposes for server-side applications. Can be any
727
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
728
+ # @param [Google::Apis::RequestOptions] options
729
+ # Request-specific options
730
+ #
731
+ # @yield [result, err] Result & error if block supplied
732
+ # @yieldparam result [Google::Apis::MetastoreV1::Operation] parsed result object
733
+ # @yieldparam err [StandardError] error object if request failed
734
+ #
735
+ # @return [Google::Apis::MetastoreV1::Operation]
736
+ #
737
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
738
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
739
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
740
+ def export_service_metadata(service, export_metadata_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
741
+ command = make_simple_command(:post, 'v1/{+service}:exportMetadata', options)
742
+ command.request_representation = Google::Apis::MetastoreV1::ExportMetadataRequest::Representation
743
+ command.request_object = export_metadata_request_object
744
+ command.response_representation = Google::Apis::MetastoreV1::Operation::Representation
745
+ command.response_class = Google::Apis::MetastoreV1::Operation
746
+ command.params['service'] = service unless service.nil?
747
+ command.query['fields'] = fields unless fields.nil?
748
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
749
+ execute_or_queue_command(command, &block)
750
+ end
751
+
752
+ # Gets the details of a single service.
753
+ # @param [String] name
754
+ # Required. The relative resource name of the metastore service to retrieve, in
755
+ # the following form:projects/`project_number`/locations/`location_id`/services/`
756
+ # service_id`.
757
+ # @param [String] fields
758
+ # Selector specifying which fields to include in a partial response.
759
+ # @param [String] quota_user
760
+ # Available to use for quota purposes for server-side applications. Can be any
761
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
762
+ # @param [Google::Apis::RequestOptions] options
763
+ # Request-specific options
764
+ #
765
+ # @yield [result, err] Result & error if block supplied
766
+ # @yieldparam result [Google::Apis::MetastoreV1::Service] parsed result object
767
+ # @yieldparam err [StandardError] error object if request failed
768
+ #
769
+ # @return [Google::Apis::MetastoreV1::Service]
770
+ #
771
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
772
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
773
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
774
+ def get_project_location_service(name, fields: nil, quota_user: nil, options: nil, &block)
775
+ command = make_simple_command(:get, 'v1/{+name}', options)
776
+ command.response_representation = Google::Apis::MetastoreV1::Service::Representation
777
+ command.response_class = Google::Apis::MetastoreV1::Service
778
+ command.params['name'] = name unless name.nil?
779
+ command.query['fields'] = fields unless fields.nil?
780
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
781
+ execute_or_queue_command(command, &block)
782
+ end
783
+
784
+ # Gets the access control policy for a resource. Returns an empty policy if the
785
+ # resource exists and does not have a policy set.
786
+ # @param [String] resource
787
+ # REQUIRED: The resource for which the policy is being requested. See Resource
788
+ # names (https://cloud.google.com/apis/design/resource_names) for the
789
+ # appropriate value for this field.
790
+ # @param [Fixnum] options_requested_policy_version
791
+ # Optional. The maximum policy version that will be used to format the policy.
792
+ # Valid values are 0, 1, and 3. Requests specifying an invalid value will be
793
+ # rejected.Requests for policies with any conditional role bindings must specify
794
+ # version 3. Policies with no conditional role bindings may specify any valid
795
+ # value or leave the field unset.The policy in the response might use the policy
796
+ # version that you specified, or it might use a lower policy version. For
797
+ # example, if you specify version 3, but the policy has no conditional role
798
+ # bindings, the response uses version 1.To learn which resources support
799
+ # conditions in their IAM policies, see the IAM documentation (https://cloud.
800
+ # google.com/iam/help/conditions/resource-policies).
801
+ # @param [String] fields
802
+ # Selector specifying which fields to include in a partial response.
803
+ # @param [String] quota_user
804
+ # Available to use for quota purposes for server-side applications. Can be any
805
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
806
+ # @param [Google::Apis::RequestOptions] options
807
+ # Request-specific options
808
+ #
809
+ # @yield [result, err] Result & error if block supplied
810
+ # @yieldparam result [Google::Apis::MetastoreV1::Policy] parsed result object
811
+ # @yieldparam err [StandardError] error object if request failed
812
+ #
813
+ # @return [Google::Apis::MetastoreV1::Policy]
814
+ #
815
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
816
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
817
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
818
+ def get_project_location_service_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil, &block)
819
+ command = make_simple_command(:get, 'v1/{+resource}:getIamPolicy', options)
820
+ command.response_representation = Google::Apis::MetastoreV1::Policy::Representation
821
+ command.response_class = Google::Apis::MetastoreV1::Policy
822
+ command.params['resource'] = resource unless resource.nil?
823
+ command.query['options.requestedPolicyVersion'] = options_requested_policy_version unless options_requested_policy_version.nil?
824
+ command.query['fields'] = fields unless fields.nil?
825
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
826
+ execute_or_queue_command(command, &block)
827
+ end
828
+
829
+ # Lists services in a project and location.
830
+ # @param [String] parent
831
+ # Required. The relative resource name of the location of metastore services to
832
+ # list, in the following form:projects/`project_number`/locations/`location_id`.
833
+ # @param [String] filter
834
+ # Optional. The filter to apply to list results.
835
+ # @param [String] order_by
836
+ # Optional. Specify the ordering of results as described in Sorting Order (https:
837
+ # //cloud.google.com/apis/design/design_patterns#sorting_order). If not
838
+ # specified, the results will be sorted in the default order.
839
+ # @param [Fixnum] page_size
840
+ # Optional. The maximum number of services to return. The response may contain
841
+ # less than the maximum number. If unspecified, no more than 500 services are
842
+ # returned. The maximum value is 1000; values above 1000 are changed to 1000.
843
+ # @param [String] page_token
844
+ # Optional. A page token, received from a previous DataprocMetastore.
845
+ # ListServices call. Provide this token to retrieve the subsequent page.To
846
+ # retrieve the first page, supply an empty page token.When paginating, other
847
+ # parameters provided to DataprocMetastore.ListServices must match the call that
848
+ # provided the page token.
849
+ # @param [String] fields
850
+ # Selector specifying which fields to include in a partial response.
851
+ # @param [String] quota_user
852
+ # Available to use for quota purposes for server-side applications. Can be any
853
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
854
+ # @param [Google::Apis::RequestOptions] options
855
+ # Request-specific options
856
+ #
857
+ # @yield [result, err] Result & error if block supplied
858
+ # @yieldparam result [Google::Apis::MetastoreV1::ListServicesResponse] parsed result object
859
+ # @yieldparam err [StandardError] error object if request failed
860
+ #
861
+ # @return [Google::Apis::MetastoreV1::ListServicesResponse]
862
+ #
863
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
864
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
865
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
866
+ 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)
867
+ command = make_simple_command(:get, 'v1/{+parent}/services', options)
868
+ command.response_representation = Google::Apis::MetastoreV1::ListServicesResponse::Representation
869
+ command.response_class = Google::Apis::MetastoreV1::ListServicesResponse
870
+ command.params['parent'] = parent unless parent.nil?
871
+ command.query['filter'] = filter unless filter.nil?
872
+ command.query['orderBy'] = order_by unless order_by.nil?
873
+ command.query['pageSize'] = page_size unless page_size.nil?
874
+ command.query['pageToken'] = page_token unless page_token.nil?
875
+ command.query['fields'] = fields unless fields.nil?
876
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
877
+ execute_or_queue_command(command, &block)
878
+ end
879
+
880
+ # Updates the parameters of a single service.
881
+ # @param [String] name
882
+ # Immutable. The relative resource name of the metastore service, in the
883
+ # following format:projects/`project_number`/locations/`location_id`/services/`
884
+ # service_id`.
885
+ # @param [Google::Apis::MetastoreV1::Service] service_object
886
+ # @param [String] request_id
887
+ # Optional. A request ID. Specify a unique request ID to allow the server to
888
+ # ignore the request if it has completed. The server will ignore subsequent
889
+ # requests that provide a duplicate request ID for at least 60 minutes after the
890
+ # first request.For example, if an initial request times out, followed by
891
+ # another request with the same request ID, the server ignores the second
892
+ # request to prevent the creation of duplicate commitments.The request ID must
893
+ # be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#
894
+ # Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
895
+ # @param [String] update_mask
896
+ # Required. A field mask used to specify the fields to be overwritten in the
897
+ # metastore service resource by the update. Fields specified in the update_mask
898
+ # are relative to the resource (not to the full request). A field is overwritten
899
+ # if it is in the mask.
900
+ # @param [String] fields
901
+ # Selector specifying which fields to include in a partial response.
902
+ # @param [String] quota_user
903
+ # Available to use for quota purposes for server-side applications. Can be any
904
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
905
+ # @param [Google::Apis::RequestOptions] options
906
+ # Request-specific options
907
+ #
908
+ # @yield [result, err] Result & error if block supplied
909
+ # @yieldparam result [Google::Apis::MetastoreV1::Operation] parsed result object
910
+ # @yieldparam err [StandardError] error object if request failed
911
+ #
912
+ # @return [Google::Apis::MetastoreV1::Operation]
913
+ #
914
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
915
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
916
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
917
+ def patch_project_location_service(name, service_object = nil, request_id: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
918
+ command = make_simple_command(:patch, 'v1/{+name}', options)
919
+ command.request_representation = Google::Apis::MetastoreV1::Service::Representation
920
+ command.request_object = service_object
921
+ command.response_representation = Google::Apis::MetastoreV1::Operation::Representation
922
+ command.response_class = Google::Apis::MetastoreV1::Operation
923
+ command.params['name'] = name unless name.nil?
924
+ command.query['requestId'] = request_id unless request_id.nil?
925
+ command.query['updateMask'] = update_mask unless update_mask.nil?
926
+ command.query['fields'] = fields unless fields.nil?
927
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
928
+ execute_or_queue_command(command, &block)
929
+ end
930
+
931
+ # Restores a service from a backup.
932
+ # @param [String] service
933
+ # Required. The relative resource name of the metastore service to run restore,
934
+ # in the following form:projects/`project_id`/locations/`location_id`/services/`
935
+ # service_id`.
936
+ # @param [Google::Apis::MetastoreV1::RestoreServiceRequest] restore_service_request_object
937
+ # @param [String] fields
938
+ # Selector specifying which fields to include in a partial response.
939
+ # @param [String] quota_user
940
+ # Available to use for quota purposes for server-side applications. Can be any
941
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
942
+ # @param [Google::Apis::RequestOptions] options
943
+ # Request-specific options
944
+ #
945
+ # @yield [result, err] Result & error if block supplied
946
+ # @yieldparam result [Google::Apis::MetastoreV1::Operation] parsed result object
947
+ # @yieldparam err [StandardError] error object if request failed
948
+ #
949
+ # @return [Google::Apis::MetastoreV1::Operation]
950
+ #
951
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
952
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
953
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
954
+ def restore_service(service, restore_service_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
955
+ command = make_simple_command(:post, 'v1/{+service}:restore', options)
956
+ command.request_representation = Google::Apis::MetastoreV1::RestoreServiceRequest::Representation
957
+ command.request_object = restore_service_request_object
958
+ command.response_representation = Google::Apis::MetastoreV1::Operation::Representation
959
+ command.response_class = Google::Apis::MetastoreV1::Operation
960
+ command.params['service'] = service unless service.nil?
961
+ command.query['fields'] = fields unless fields.nil?
962
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
963
+ execute_or_queue_command(command, &block)
964
+ end
965
+
966
+ # Sets the access control policy on the specified resource. Replaces any
967
+ # existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED
968
+ # errors.
969
+ # @param [String] resource
970
+ # REQUIRED: The resource for which the policy is being specified. See Resource
971
+ # names (https://cloud.google.com/apis/design/resource_names) for the
972
+ # appropriate value for this field.
973
+ # @param [Google::Apis::MetastoreV1::SetIamPolicyRequest] set_iam_policy_request_object
974
+ # @param [String] fields
975
+ # Selector specifying which fields to include in a partial response.
976
+ # @param [String] quota_user
977
+ # Available to use for quota purposes for server-side applications. Can be any
978
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
979
+ # @param [Google::Apis::RequestOptions] options
980
+ # Request-specific options
981
+ #
982
+ # @yield [result, err] Result & error if block supplied
983
+ # @yieldparam result [Google::Apis::MetastoreV1::Policy] parsed result object
984
+ # @yieldparam err [StandardError] error object if request failed
985
+ #
986
+ # @return [Google::Apis::MetastoreV1::Policy]
987
+ #
988
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
989
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
990
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
991
+ def set_service_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
992
+ command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
993
+ command.request_representation = Google::Apis::MetastoreV1::SetIamPolicyRequest::Representation
994
+ command.request_object = set_iam_policy_request_object
995
+ command.response_representation = Google::Apis::MetastoreV1::Policy::Representation
996
+ command.response_class = Google::Apis::MetastoreV1::Policy
997
+ command.params['resource'] = resource unless resource.nil?
998
+ command.query['fields'] = fields unless fields.nil?
999
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1000
+ execute_or_queue_command(command, &block)
1001
+ end
1002
+
1003
+ # Returns permissions that a caller has on the specified resource. If the
1004
+ # resource does not exist, this will return an empty set of permissions, not a
1005
+ # NOT_FOUND error.Note: This operation is designed to be used for building
1006
+ # permission-aware UIs and command-line tools, not for authorization checking.
1007
+ # This operation may "fail open" without warning.
1008
+ # @param [String] resource
1009
+ # REQUIRED: The resource for which the policy detail is being requested. See
1010
+ # Resource names (https://cloud.google.com/apis/design/resource_names) for the
1011
+ # appropriate value for this field.
1012
+ # @param [Google::Apis::MetastoreV1::TestIamPermissionsRequest] test_iam_permissions_request_object
1013
+ # @param [String] fields
1014
+ # Selector specifying which fields to include in a partial response.
1015
+ # @param [String] quota_user
1016
+ # Available to use for quota purposes for server-side applications. Can be any
1017
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1018
+ # @param [Google::Apis::RequestOptions] options
1019
+ # Request-specific options
1020
+ #
1021
+ # @yield [result, err] Result & error if block supplied
1022
+ # @yieldparam result [Google::Apis::MetastoreV1::TestIamPermissionsResponse] parsed result object
1023
+ # @yieldparam err [StandardError] error object if request failed
1024
+ #
1025
+ # @return [Google::Apis::MetastoreV1::TestIamPermissionsResponse]
1026
+ #
1027
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1028
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1029
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1030
+ def test_service_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1031
+ command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
1032
+ command.request_representation = Google::Apis::MetastoreV1::TestIamPermissionsRequest::Representation
1033
+ command.request_object = test_iam_permissions_request_object
1034
+ command.response_representation = Google::Apis::MetastoreV1::TestIamPermissionsResponse::Representation
1035
+ command.response_class = Google::Apis::MetastoreV1::TestIamPermissionsResponse
1036
+ command.params['resource'] = resource unless resource.nil?
1037
+ command.query['fields'] = fields unless fields.nil?
1038
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1039
+ execute_or_queue_command(command, &block)
1040
+ end
1041
+
1042
+ # Creates a new backup in a given project and location.
1043
+ # @param [String] parent
1044
+ # Required. The relative resource name of the service in which to create a
1045
+ # backup of the following form:projects/`project_number`/locations/`location_id`/
1046
+ # services/`service_id`.
1047
+ # @param [Google::Apis::MetastoreV1::Backup] backup_object
1048
+ # @param [String] backup_id
1049
+ # Required. The ID of the backup, which is used as the final component of the
1050
+ # backup's name.This value must be between 1 and 64 characters long, begin with
1051
+ # a letter, end with a letter or number, and consist of alpha-numeric ASCII
1052
+ # characters or hyphens.
1053
+ # @param [String] request_id
1054
+ # Optional. A request ID. Specify a unique request ID to allow the server to
1055
+ # ignore the request if it has completed. The server will ignore subsequent
1056
+ # requests that provide a duplicate request ID for at least 60 minutes after the
1057
+ # first request.For example, if an initial request times out, followed by
1058
+ # another request with the same request ID, the server ignores the second
1059
+ # request to prevent the creation of duplicate commitments.The request ID must
1060
+ # be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#
1061
+ # Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
1062
+ # @param [String] fields
1063
+ # Selector specifying which fields to include in a partial response.
1064
+ # @param [String] quota_user
1065
+ # Available to use for quota purposes for server-side applications. Can be any
1066
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1067
+ # @param [Google::Apis::RequestOptions] options
1068
+ # Request-specific options
1069
+ #
1070
+ # @yield [result, err] Result & error if block supplied
1071
+ # @yieldparam result [Google::Apis::MetastoreV1::Operation] parsed result object
1072
+ # @yieldparam err [StandardError] error object if request failed
1073
+ #
1074
+ # @return [Google::Apis::MetastoreV1::Operation]
1075
+ #
1076
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1077
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1078
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1079
+ def create_project_location_service_backup(parent, backup_object = nil, backup_id: nil, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
1080
+ command = make_simple_command(:post, 'v1/{+parent}/backups', options)
1081
+ command.request_representation = Google::Apis::MetastoreV1::Backup::Representation
1082
+ command.request_object = backup_object
1083
+ command.response_representation = Google::Apis::MetastoreV1::Operation::Representation
1084
+ command.response_class = Google::Apis::MetastoreV1::Operation
1085
+ command.params['parent'] = parent unless parent.nil?
1086
+ command.query['backupId'] = backup_id unless backup_id.nil?
1087
+ command.query['requestId'] = request_id unless request_id.nil?
1088
+ command.query['fields'] = fields unless fields.nil?
1089
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1090
+ execute_or_queue_command(command, &block)
1091
+ end
1092
+
1093
+ # Deletes a single backup.
1094
+ # @param [String] name
1095
+ # Required. The relative resource name of the backup to delete, in the following
1096
+ # form:projects/`project_number`/locations/`location_id`/services/`service_id`/
1097
+ # backups/`backup_id`.
1098
+ # @param [String] request_id
1099
+ # Optional. A request ID. Specify a unique request ID to allow the server to
1100
+ # ignore the request if it has completed. The server will ignore subsequent
1101
+ # requests that provide a duplicate request ID for at least 60 minutes after the
1102
+ # first request.For example, if an initial request times out, followed by
1103
+ # another request with the same request ID, the server ignores the second
1104
+ # request to prevent the creation of duplicate commitments.The request ID must
1105
+ # be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#
1106
+ # Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
1107
+ # @param [String] fields
1108
+ # Selector specifying which fields to include in a partial response.
1109
+ # @param [String] quota_user
1110
+ # Available to use for quota purposes for server-side applications. Can be any
1111
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1112
+ # @param [Google::Apis::RequestOptions] options
1113
+ # Request-specific options
1114
+ #
1115
+ # @yield [result, err] Result & error if block supplied
1116
+ # @yieldparam result [Google::Apis::MetastoreV1::Operation] parsed result object
1117
+ # @yieldparam err [StandardError] error object if request failed
1118
+ #
1119
+ # @return [Google::Apis::MetastoreV1::Operation]
1120
+ #
1121
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1122
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1123
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1124
+ def delete_project_location_service_backup(name, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
1125
+ command = make_simple_command(:delete, 'v1/{+name}', options)
1126
+ command.response_representation = Google::Apis::MetastoreV1::Operation::Representation
1127
+ command.response_class = Google::Apis::MetastoreV1::Operation
1128
+ command.params['name'] = name unless name.nil?
1129
+ command.query['requestId'] = request_id unless request_id.nil?
1130
+ command.query['fields'] = fields unless fields.nil?
1131
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1132
+ execute_or_queue_command(command, &block)
1133
+ end
1134
+
1135
+ # Gets details of a single backup.
1136
+ # @param [String] name
1137
+ # Required. The relative resource name of the backup to retrieve, in the
1138
+ # following form:projects/`project_number`/locations/`location_id`/services/`
1139
+ # service_id`/backups/`backup_id`.
1140
+ # @param [String] fields
1141
+ # Selector specifying which fields to include in a partial response.
1142
+ # @param [String] quota_user
1143
+ # Available to use for quota purposes for server-side applications. Can be any
1144
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1145
+ # @param [Google::Apis::RequestOptions] options
1146
+ # Request-specific options
1147
+ #
1148
+ # @yield [result, err] Result & error if block supplied
1149
+ # @yieldparam result [Google::Apis::MetastoreV1::Backup] parsed result object
1150
+ # @yieldparam err [StandardError] error object if request failed
1151
+ #
1152
+ # @return [Google::Apis::MetastoreV1::Backup]
1153
+ #
1154
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1155
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1156
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1157
+ def get_project_location_service_backup(name, fields: nil, quota_user: nil, options: nil, &block)
1158
+ command = make_simple_command(:get, 'v1/{+name}', options)
1159
+ command.response_representation = Google::Apis::MetastoreV1::Backup::Representation
1160
+ command.response_class = Google::Apis::MetastoreV1::Backup
1161
+ command.params['name'] = name unless name.nil?
1162
+ command.query['fields'] = fields unless fields.nil?
1163
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1164
+ execute_or_queue_command(command, &block)
1165
+ end
1166
+
1167
+ # Gets the access control policy for a resource. Returns an empty policy if the
1168
+ # resource exists and does not have a policy set.
1169
+ # @param [String] resource
1170
+ # REQUIRED: The resource for which the policy is being requested. See Resource
1171
+ # names (https://cloud.google.com/apis/design/resource_names) for the
1172
+ # appropriate value for this field.
1173
+ # @param [Fixnum] options_requested_policy_version
1174
+ # Optional. The maximum policy version that will be used to format the policy.
1175
+ # Valid values are 0, 1, and 3. Requests specifying an invalid value will be
1176
+ # rejected.Requests for policies with any conditional role bindings must specify
1177
+ # version 3. Policies with no conditional role bindings may specify any valid
1178
+ # value or leave the field unset.The policy in the response might use the policy
1179
+ # version that you specified, or it might use a lower policy version. For
1180
+ # example, if you specify version 3, but the policy has no conditional role
1181
+ # bindings, the response uses version 1.To learn which resources support
1182
+ # conditions in their IAM policies, see the IAM documentation (https://cloud.
1183
+ # google.com/iam/help/conditions/resource-policies).
1184
+ # @param [String] fields
1185
+ # Selector specifying which fields to include in a partial response.
1186
+ # @param [String] quota_user
1187
+ # Available to use for quota purposes for server-side applications. Can be any
1188
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1189
+ # @param [Google::Apis::RequestOptions] options
1190
+ # Request-specific options
1191
+ #
1192
+ # @yield [result, err] Result & error if block supplied
1193
+ # @yieldparam result [Google::Apis::MetastoreV1::Policy] parsed result object
1194
+ # @yieldparam err [StandardError] error object if request failed
1195
+ #
1196
+ # @return [Google::Apis::MetastoreV1::Policy]
1197
+ #
1198
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1199
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1200
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1201
+ def get_project_location_service_backup_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil, &block)
1202
+ command = make_simple_command(:get, 'v1/{+resource}:getIamPolicy', options)
1203
+ command.response_representation = Google::Apis::MetastoreV1::Policy::Representation
1204
+ command.response_class = Google::Apis::MetastoreV1::Policy
1205
+ command.params['resource'] = resource unless resource.nil?
1206
+ command.query['options.requestedPolicyVersion'] = options_requested_policy_version unless options_requested_policy_version.nil?
1207
+ command.query['fields'] = fields unless fields.nil?
1208
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1209
+ execute_or_queue_command(command, &block)
1210
+ end
1211
+
1212
+ # Lists backups in a service.
1213
+ # @param [String] parent
1214
+ # Required. The relative resource name of the service whose backups to list, in
1215
+ # the following form:projects/`project_number`/locations/`location_id`/services/`
1216
+ # service_id`/backups.
1217
+ # @param [String] filter
1218
+ # Optional. The filter to apply to list results.
1219
+ # @param [String] order_by
1220
+ # Optional. Specify the ordering of results as described in Sorting Order (https:
1221
+ # //cloud.google.com/apis/design/design_patterns#sorting_order). If not
1222
+ # specified, the results will be sorted in the default order.
1223
+ # @param [Fixnum] page_size
1224
+ # Optional. The maximum number of backups to return. The response may contain
1225
+ # less than the maximum number. If unspecified, no more than 500 backups are
1226
+ # returned. The maximum value is 1000; values above 1000 are changed to 1000.
1227
+ # @param [String] page_token
1228
+ # Optional. A page token, received from a previous DataprocMetastore.ListBackups
1229
+ # call. Provide this token to retrieve the subsequent page.To retrieve the first
1230
+ # page, supply an empty page token.When paginating, other parameters provided to
1231
+ # DataprocMetastore.ListBackups must match the call that provided the page token.
1232
+ # @param [String] fields
1233
+ # Selector specifying which fields to include in a partial response.
1234
+ # @param [String] quota_user
1235
+ # Available to use for quota purposes for server-side applications. Can be any
1236
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1237
+ # @param [Google::Apis::RequestOptions] options
1238
+ # Request-specific options
1239
+ #
1240
+ # @yield [result, err] Result & error if block supplied
1241
+ # @yieldparam result [Google::Apis::MetastoreV1::ListBackupsResponse] parsed result object
1242
+ # @yieldparam err [StandardError] error object if request failed
1243
+ #
1244
+ # @return [Google::Apis::MetastoreV1::ListBackupsResponse]
1245
+ #
1246
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1247
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1248
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1249
+ def list_project_location_service_backups(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1250
+ command = make_simple_command(:get, 'v1/{+parent}/backups', options)
1251
+ command.response_representation = Google::Apis::MetastoreV1::ListBackupsResponse::Representation
1252
+ command.response_class = Google::Apis::MetastoreV1::ListBackupsResponse
1253
+ command.params['parent'] = parent unless parent.nil?
1254
+ command.query['filter'] = filter unless filter.nil?
1255
+ command.query['orderBy'] = order_by unless order_by.nil?
1256
+ command.query['pageSize'] = page_size unless page_size.nil?
1257
+ command.query['pageToken'] = page_token unless page_token.nil?
1258
+ command.query['fields'] = fields unless fields.nil?
1259
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1260
+ execute_or_queue_command(command, &block)
1261
+ end
1262
+
1263
+ # Sets the access control policy on the specified resource. Replaces any
1264
+ # existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED
1265
+ # errors.
1266
+ # @param [String] resource
1267
+ # REQUIRED: The resource for which the policy is being specified. See Resource
1268
+ # names (https://cloud.google.com/apis/design/resource_names) for the
1269
+ # appropriate value for this field.
1270
+ # @param [Google::Apis::MetastoreV1::SetIamPolicyRequest] set_iam_policy_request_object
1271
+ # @param [String] fields
1272
+ # Selector specifying which fields to include in a partial response.
1273
+ # @param [String] quota_user
1274
+ # Available to use for quota purposes for server-side applications. Can be any
1275
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1276
+ # @param [Google::Apis::RequestOptions] options
1277
+ # Request-specific options
1278
+ #
1279
+ # @yield [result, err] Result & error if block supplied
1280
+ # @yieldparam result [Google::Apis::MetastoreV1::Policy] parsed result object
1281
+ # @yieldparam err [StandardError] error object if request failed
1282
+ #
1283
+ # @return [Google::Apis::MetastoreV1::Policy]
1284
+ #
1285
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1286
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1287
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1288
+ def set_backup_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1289
+ command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
1290
+ command.request_representation = Google::Apis::MetastoreV1::SetIamPolicyRequest::Representation
1291
+ command.request_object = set_iam_policy_request_object
1292
+ command.response_representation = Google::Apis::MetastoreV1::Policy::Representation
1293
+ command.response_class = Google::Apis::MetastoreV1::Policy
1294
+ command.params['resource'] = resource unless resource.nil?
1295
+ command.query['fields'] = fields unless fields.nil?
1296
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1297
+ execute_or_queue_command(command, &block)
1298
+ end
1299
+
1300
+ # Creates a new MetadataImport in a given project and location.
1301
+ # @param [String] parent
1302
+ # Required. The relative resource name of the service in which to create a
1303
+ # metastore import, in the following form:projects/`project_number`/locations/`
1304
+ # location_id`/services/`service_id`.
1305
+ # @param [Google::Apis::MetastoreV1::MetadataImport] metadata_import_object
1306
+ # @param [String] metadata_import_id
1307
+ # Required. The ID of the metadata import, which is used as the final component
1308
+ # of the metadata import's name.This value must be between 1 and 64 characters
1309
+ # long, begin with a letter, end with a letter or number, and consist of alpha-
1310
+ # numeric ASCII characters or hyphens.
1311
+ # @param [String] request_id
1312
+ # Optional. A request ID. Specify a unique request ID to allow the server to
1313
+ # ignore the request if it has completed. The server will ignore subsequent
1314
+ # requests that provide a duplicate request ID for at least 60 minutes after the
1315
+ # first request.For example, if an initial request times out, followed by
1316
+ # another request with the same request ID, the server ignores the second
1317
+ # request to prevent the creation of duplicate commitments.The request ID must
1318
+ # be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#
1319
+ # Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
1320
+ # @param [String] fields
1321
+ # Selector specifying which fields to include in a partial response.
1322
+ # @param [String] quota_user
1323
+ # Available to use for quota purposes for server-side applications. Can be any
1324
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1325
+ # @param [Google::Apis::RequestOptions] options
1326
+ # Request-specific options
1327
+ #
1328
+ # @yield [result, err] Result & error if block supplied
1329
+ # @yieldparam result [Google::Apis::MetastoreV1::Operation] parsed result object
1330
+ # @yieldparam err [StandardError] error object if request failed
1331
+ #
1332
+ # @return [Google::Apis::MetastoreV1::Operation]
1333
+ #
1334
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1335
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1336
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1337
+ 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)
1338
+ command = make_simple_command(:post, 'v1/{+parent}/metadataImports', options)
1339
+ command.request_representation = Google::Apis::MetastoreV1::MetadataImport::Representation
1340
+ command.request_object = metadata_import_object
1341
+ command.response_representation = Google::Apis::MetastoreV1::Operation::Representation
1342
+ command.response_class = Google::Apis::MetastoreV1::Operation
1343
+ command.params['parent'] = parent unless parent.nil?
1344
+ command.query['metadataImportId'] = metadata_import_id unless metadata_import_id.nil?
1345
+ command.query['requestId'] = request_id unless request_id.nil?
1346
+ command.query['fields'] = fields unless fields.nil?
1347
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1348
+ execute_or_queue_command(command, &block)
1349
+ end
1350
+
1351
+ # Gets details of a single import.
1352
+ # @param [String] name
1353
+ # Required. The relative resource name of the metadata import to retrieve, in
1354
+ # the following form:projects/`project_number`/locations/`location_id`/services/`
1355
+ # service_id`/metadataImports/`import_id`.
1356
+ # @param [String] fields
1357
+ # Selector specifying which fields to include in a partial response.
1358
+ # @param [String] quota_user
1359
+ # Available to use for quota purposes for server-side applications. Can be any
1360
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1361
+ # @param [Google::Apis::RequestOptions] options
1362
+ # Request-specific options
1363
+ #
1364
+ # @yield [result, err] Result & error if block supplied
1365
+ # @yieldparam result [Google::Apis::MetastoreV1::MetadataImport] parsed result object
1366
+ # @yieldparam err [StandardError] error object if request failed
1367
+ #
1368
+ # @return [Google::Apis::MetastoreV1::MetadataImport]
1369
+ #
1370
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1371
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1372
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1373
+ def get_project_location_service_metadata_import(name, fields: nil, quota_user: nil, options: nil, &block)
1374
+ command = make_simple_command(:get, 'v1/{+name}', options)
1375
+ command.response_representation = Google::Apis::MetastoreV1::MetadataImport::Representation
1376
+ command.response_class = Google::Apis::MetastoreV1::MetadataImport
1377
+ command.params['name'] = name unless name.nil?
1378
+ command.query['fields'] = fields unless fields.nil?
1379
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1380
+ execute_or_queue_command(command, &block)
1381
+ end
1382
+
1383
+ # Lists imports in a service.
1384
+ # @param [String] parent
1385
+ # Required. The relative resource name of the service whose metadata imports to
1386
+ # list, in the following form:projects/`project_number`/locations/`location_id`/
1387
+ # services/`service_id`/metadataImports.
1388
+ # @param [String] filter
1389
+ # Optional. The filter to apply to list results.
1390
+ # @param [String] order_by
1391
+ # Optional. Specify the ordering of results as described in Sorting Order (https:
1392
+ # //cloud.google.com/apis/design/design_patterns#sorting_order). If not
1393
+ # specified, the results will be sorted in the default order.
1394
+ # @param [Fixnum] page_size
1395
+ # Optional. The maximum number of imports to return. The response may contain
1396
+ # less than the maximum number. If unspecified, no more than 500 imports are
1397
+ # returned. The maximum value is 1000; values above 1000 are changed to 1000.
1398
+ # @param [String] page_token
1399
+ # Optional. A page token, received from a previous DataprocMetastore.
1400
+ # ListServices call. Provide this token to retrieve the subsequent page.To
1401
+ # retrieve the first page, supply an empty page token.When paginating, other
1402
+ # parameters provided to DataprocMetastore.ListServices must match the call that
1403
+ # provided the page token.
1404
+ # @param [String] fields
1405
+ # Selector specifying which fields to include in a partial response.
1406
+ # @param [String] quota_user
1407
+ # Available to use for quota purposes for server-side applications. Can be any
1408
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1409
+ # @param [Google::Apis::RequestOptions] options
1410
+ # Request-specific options
1411
+ #
1412
+ # @yield [result, err] Result & error if block supplied
1413
+ # @yieldparam result [Google::Apis::MetastoreV1::ListMetadataImportsResponse] parsed result object
1414
+ # @yieldparam err [StandardError] error object if request failed
1415
+ #
1416
+ # @return [Google::Apis::MetastoreV1::ListMetadataImportsResponse]
1417
+ #
1418
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1419
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1420
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1421
+ 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)
1422
+ command = make_simple_command(:get, 'v1/{+parent}/metadataImports', options)
1423
+ command.response_representation = Google::Apis::MetastoreV1::ListMetadataImportsResponse::Representation
1424
+ command.response_class = Google::Apis::MetastoreV1::ListMetadataImportsResponse
1425
+ command.params['parent'] = parent unless parent.nil?
1426
+ command.query['filter'] = filter unless filter.nil?
1427
+ command.query['orderBy'] = order_by unless order_by.nil?
1428
+ command.query['pageSize'] = page_size unless page_size.nil?
1429
+ command.query['pageToken'] = page_token unless page_token.nil?
1430
+ command.query['fields'] = fields unless fields.nil?
1431
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1432
+ execute_or_queue_command(command, &block)
1433
+ end
1434
+
1435
+ # Updates a single import. Only the description field of MetadataImport is
1436
+ # supported to be updated.
1437
+ # @param [String] name
1438
+ # Immutable. The relative resource name of the metadata import, of the form:
1439
+ # projects/`project_number`/locations/`location_id`/services/`service_id`/
1440
+ # metadataImports/`metadata_import_id`.
1441
+ # @param [Google::Apis::MetastoreV1::MetadataImport] metadata_import_object
1442
+ # @param [String] request_id
1443
+ # Optional. A request ID. Specify a unique request ID to allow the server to
1444
+ # ignore the request if it has completed. The server will ignore subsequent
1445
+ # requests that provide a duplicate request ID for at least 60 minutes after the
1446
+ # first request.For example, if an initial request times out, followed by
1447
+ # another request with the same request ID, the server ignores the second
1448
+ # request to prevent the creation of duplicate commitments.The request ID must
1449
+ # be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#
1450
+ # Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
1451
+ # @param [String] update_mask
1452
+ # Required. A field mask used to specify the fields to be overwritten in the
1453
+ # metadata import resource by the update. Fields specified in the update_mask
1454
+ # are relative to the resource (not to the full request). A field is overwritten
1455
+ # if it is in the mask.
1456
+ # @param [String] fields
1457
+ # Selector specifying which fields to include in a partial response.
1458
+ # @param [String] quota_user
1459
+ # Available to use for quota purposes for server-side applications. Can be any
1460
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1461
+ # @param [Google::Apis::RequestOptions] options
1462
+ # Request-specific options
1463
+ #
1464
+ # @yield [result, err] Result & error if block supplied
1465
+ # @yieldparam result [Google::Apis::MetastoreV1::Operation] parsed result object
1466
+ # @yieldparam err [StandardError] error object if request failed
1467
+ #
1468
+ # @return [Google::Apis::MetastoreV1::Operation]
1469
+ #
1470
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1471
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1472
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1473
+ 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)
1474
+ command = make_simple_command(:patch, 'v1/{+name}', options)
1475
+ command.request_representation = Google::Apis::MetastoreV1::MetadataImport::Representation
1476
+ command.request_object = metadata_import_object
1477
+ command.response_representation = Google::Apis::MetastoreV1::Operation::Representation
1478
+ command.response_class = Google::Apis::MetastoreV1::Operation
1479
+ command.params['name'] = name unless name.nil?
1480
+ command.query['requestId'] = request_id unless request_id.nil?
1481
+ command.query['updateMask'] = update_mask unless update_mask.nil?
1482
+ command.query['fields'] = fields unless fields.nil?
1483
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1484
+ execute_or_queue_command(command, &block)
1485
+ end
1486
+
1487
+ protected
1488
+
1489
+ def apply_command_defaults(command)
1490
+ command.query['key'] = key unless key.nil?
1491
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1492
+ end
1493
+ end
1494
+ end
1495
+ end
1496
+ end