google-cloud-metastore-v1beta 0.5.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/lib/google/cloud/metastore/v1beta/bindings_override.rb +231 -0
  4. data/lib/google/cloud/metastore/v1beta/dataproc_metastore/client.rb +2 -2
  5. data/lib/google/cloud/metastore/v1beta/dataproc_metastore/operations.rb +2 -2
  6. data/lib/google/cloud/metastore/v1beta/dataproc_metastore/rest/client.rb +2008 -0
  7. data/lib/google/cloud/metastore/v1beta/dataproc_metastore/rest/operations.rb +793 -0
  8. data/lib/google/cloud/metastore/v1beta/dataproc_metastore/rest/service_stub.rb +1180 -0
  9. data/lib/google/cloud/metastore/v1beta/dataproc_metastore/rest.rb +70 -0
  10. data/lib/google/cloud/metastore/v1beta/dataproc_metastore.rb +6 -0
  11. data/lib/google/cloud/metastore/v1beta/dataproc_metastore_federation/client.rb +2 -2
  12. data/lib/google/cloud/metastore/v1beta/dataproc_metastore_federation/operations.rb +2 -2
  13. data/lib/google/cloud/metastore/v1beta/dataproc_metastore_federation/rest/client.rb +775 -0
  14. data/lib/google/cloud/metastore/v1beta/dataproc_metastore_federation/rest/operations.rb +793 -0
  15. data/lib/google/cloud/metastore/v1beta/dataproc_metastore_federation/rest/service_stub.rb +345 -0
  16. data/lib/google/cloud/metastore/v1beta/dataproc_metastore_federation/rest.rb +66 -0
  17. data/lib/google/cloud/metastore/v1beta/dataproc_metastore_federation.rb +6 -0
  18. data/lib/google/cloud/metastore/v1beta/metastore_federation_pb.rb +3 -0
  19. data/lib/google/cloud/metastore/v1beta/metastore_pb.rb +19 -0
  20. data/lib/google/cloud/metastore/v1beta/rest.rb +39 -0
  21. data/lib/google/cloud/metastore/v1beta/version.rb +1 -1
  22. data/lib/google/cloud/metastore/v1beta.rb +5 -0
  23. data/proto_docs/google/api/client.rb +57 -3
  24. data/proto_docs/google/cloud/metastore/v1beta/metastore.rb +42 -0
  25. data/proto_docs/google/cloud/metastore/v1beta/metastore_federation.rb +5 -4
  26. data/proto_docs/google/type/expr.rb +75 -0
  27. metadata +17 -5
@@ -0,0 +1,2008 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/errors"
20
+ require "google/cloud/metastore/v1beta/metastore_pb"
21
+ require "google/cloud/metastore/v1beta/dataproc_metastore/rest/service_stub"
22
+ require "google/cloud/location/rest"
23
+ require "google/iam/v1/rest"
24
+
25
+ module Google
26
+ module Cloud
27
+ module Metastore
28
+ module V1beta
29
+ module DataprocMetastore
30
+ module Rest
31
+ ##
32
+ # REST client for the DataprocMetastore service.
33
+ #
34
+ # Configures and manages metastore services.
35
+ # Metastore services are fully managed, highly available, autoscaled,
36
+ # autohealing, OSS-native deployments of technical metadata management
37
+ # software. Each metastore service exposes a network endpoint through which
38
+ # metadata queries are served. Metadata queries can originate from a variety
39
+ # of sources, including Apache Hive, Apache Presto, and Apache Spark.
40
+ #
41
+ # The Dataproc Metastore API defines the following resource model:
42
+ #
43
+ # * The service works with a collection of Google Cloud projects, named:
44
+ # `/projects/*`
45
+ # * Each project has a collection of available locations, named: `/locations/*`
46
+ # (a location must refer to a Google Cloud `region`)
47
+ # * Each location has a collection of services, named: `/services/*`
48
+ # * Dataproc Metastore services are resources with names of the form:
49
+ #
50
+ # `/projects/{project_number}/locations/{location_id}/services/{service_id}`.
51
+ #
52
+ class Client
53
+ include Paths
54
+
55
+ # @private
56
+ attr_reader :dataproc_metastore_stub
57
+
58
+ ##
59
+ # Configure the DataprocMetastore Client class.
60
+ #
61
+ # See {::Google::Cloud::Metastore::V1beta::DataprocMetastore::Rest::Client::Configuration}
62
+ # for a description of the configuration fields.
63
+ #
64
+ # @example
65
+ #
66
+ # # Modify the configuration for all DataprocMetastore clients
67
+ # ::Google::Cloud::Metastore::V1beta::DataprocMetastore::Rest::Client.configure do |config|
68
+ # config.timeout = 10.0
69
+ # end
70
+ #
71
+ # @yield [config] Configure the Client client.
72
+ # @yieldparam config [Client::Configuration]
73
+ #
74
+ # @return [Client::Configuration]
75
+ #
76
+ def self.configure
77
+ @configure ||= begin
78
+ namespace = ["Google", "Cloud", "Metastore", "V1beta"]
79
+ parent_config = while namespace.any?
80
+ parent_name = namespace.join "::"
81
+ parent_const = const_get parent_name
82
+ break parent_const.configure if parent_const.respond_to? :configure
83
+ namespace.pop
84
+ end
85
+ default_config = Client::Configuration.new parent_config
86
+
87
+ default_config.timeout = 60.0
88
+ default_config.retry_policy = {
89
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
90
+ }
91
+
92
+ default_config.rpcs.create_service.timeout = 60.0
93
+
94
+ default_config.rpcs.update_service.timeout = 60.0
95
+
96
+ default_config.rpcs.delete_service.timeout = 60.0
97
+
98
+ default_config.rpcs.create_metadata_import.timeout = 60.0
99
+
100
+ default_config.rpcs.update_metadata_import.timeout = 60.0
101
+
102
+ default_config.rpcs.export_metadata.timeout = 60.0
103
+
104
+ default_config.rpcs.restore_service.timeout = 60.0
105
+
106
+ default_config.rpcs.create_backup.timeout = 60.0
107
+
108
+ default_config.rpcs.delete_backup.timeout = 60.0
109
+
110
+ default_config
111
+ end
112
+ yield @configure if block_given?
113
+ @configure
114
+ end
115
+
116
+ ##
117
+ # Configure the DataprocMetastore Client instance.
118
+ #
119
+ # The configuration is set to the derived mode, meaning that values can be changed,
120
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
121
+ # should be made on {Client.configure}.
122
+ #
123
+ # See {::Google::Cloud::Metastore::V1beta::DataprocMetastore::Rest::Client::Configuration}
124
+ # for a description of the configuration fields.
125
+ #
126
+ # @yield [config] Configure the Client client.
127
+ # @yieldparam config [Client::Configuration]
128
+ #
129
+ # @return [Client::Configuration]
130
+ #
131
+ def configure
132
+ yield @config if block_given?
133
+ @config
134
+ end
135
+
136
+ ##
137
+ # Create a new DataprocMetastore REST client object.
138
+ #
139
+ # @example
140
+ #
141
+ # # Create a client using the default configuration
142
+ # client = ::Google::Cloud::Metastore::V1beta::DataprocMetastore::Rest::Client.new
143
+ #
144
+ # # Create a client using a custom configuration
145
+ # client = ::Google::Cloud::Metastore::V1beta::DataprocMetastore::Rest::Client.new do |config|
146
+ # config.timeout = 10.0
147
+ # end
148
+ #
149
+ # @yield [config] Configure the DataprocMetastore client.
150
+ # @yieldparam config [Client::Configuration]
151
+ #
152
+ def initialize
153
+ # Create the configuration object
154
+ @config = Configuration.new Client.configure
155
+
156
+ # Yield the configuration if needed
157
+ yield @config if block_given?
158
+
159
+ # Create credentials
160
+ credentials = @config.credentials
161
+ # Use self-signed JWT if the endpoint is unchanged from default,
162
+ # but only if the default endpoint does not have a region prefix.
163
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
164
+ !@config.endpoint.split(".").first.include?("-")
165
+ credentials ||= Credentials.default scope: @config.scope,
166
+ enable_self_signed_jwt: enable_self_signed_jwt
167
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
168
+ credentials = Credentials.new credentials, scope: @config.scope
169
+ end
170
+
171
+ @quota_project_id = @config.quota_project
172
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
173
+
174
+ @operations_client = ::Google::Cloud::Metastore::V1beta::DataprocMetastore::Rest::Operations.new do |config|
175
+ config.credentials = credentials
176
+ config.quota_project = @quota_project_id
177
+ config.endpoint = @config.endpoint
178
+ end
179
+
180
+ @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
181
+ config.credentials = credentials
182
+ config.quota_project = @quota_project_id
183
+ config.endpoint = @config.endpoint
184
+ config.bindings_override = @config.bindings_override
185
+ end
186
+
187
+ @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
188
+ config.credentials = credentials
189
+ config.quota_project = @quota_project_id
190
+ config.endpoint = @config.endpoint
191
+ config.bindings_override = @config.bindings_override
192
+ end
193
+
194
+ @dataproc_metastore_stub = ::Google::Cloud::Metastore::V1beta::DataprocMetastore::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
195
+ end
196
+
197
+ ##
198
+ # Get the associated client for long-running operations.
199
+ #
200
+ # @return [::Google::Cloud::Metastore::V1beta::DataprocMetastore::Rest::Operations]
201
+ #
202
+ attr_reader :operations_client
203
+
204
+ ##
205
+ # Get the associated client for mix-in of the Locations.
206
+ #
207
+ # @return [Google::Cloud::Location::Locations::Rest::Client]
208
+ #
209
+ attr_reader :location_client
210
+
211
+ ##
212
+ # Get the associated client for mix-in of the IAMPolicy.
213
+ #
214
+ # @return [Google::Iam::V1::IAMPolicy::Rest::Client]
215
+ #
216
+ attr_reader :iam_policy_client
217
+
218
+ # Service calls
219
+
220
+ ##
221
+ # Lists services in a project and location.
222
+ #
223
+ # @overload list_services(request, options = nil)
224
+ # Pass arguments to `list_services` via a request object, either of type
225
+ # {::Google::Cloud::Metastore::V1beta::ListServicesRequest} or an equivalent Hash.
226
+ #
227
+ # @param request [::Google::Cloud::Metastore::V1beta::ListServicesRequest, ::Hash]
228
+ # A request object representing the call parameters. Required. To specify no
229
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
230
+ # @param options [::Gapic::CallOptions, ::Hash]
231
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
232
+ #
233
+ # @overload list_services(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
234
+ # Pass arguments to `list_services` via keyword arguments. Note that at
235
+ # least one keyword argument is required. To specify no parameters, or to keep all
236
+ # the default parameter values, pass an empty Hash as a request object (see above).
237
+ #
238
+ # @param parent [::String]
239
+ # Required. The relative resource name of the location of metastore services
240
+ # to list, in the following form:
241
+ #
242
+ # `projects/{project_number}/locations/{location_id}`.
243
+ # @param page_size [::Integer]
244
+ # Optional. The maximum number of services to return. The response may
245
+ # contain less than the maximum number. If unspecified, no more than 500
246
+ # services are returned. The maximum value is 1000; values above 1000 are
247
+ # changed to 1000.
248
+ # @param page_token [::String]
249
+ # Optional. A page token, received from a previous
250
+ # {::Google::Cloud::Metastore::V1beta::DataprocMetastore::Rest::Client#list_services DataprocMetastore.ListServices}
251
+ # call. Provide this token to retrieve the subsequent page.
252
+ #
253
+ # To retrieve the first page, supply an empty page token.
254
+ #
255
+ # When paginating, other parameters provided to
256
+ # {::Google::Cloud::Metastore::V1beta::DataprocMetastore::Rest::Client#list_services DataprocMetastore.ListServices}
257
+ # must match the call that provided the page token.
258
+ # @param filter [::String]
259
+ # Optional. The filter to apply to list results.
260
+ # @param order_by [::String]
261
+ # Optional. Specify the ordering of results as described in [Sorting
262
+ # Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
263
+ # If not specified, the results will be sorted in the default order.
264
+ # @yield [result, operation] Access the result along with the TransportOperation object
265
+ # @yieldparam result [::Google::Cloud::Metastore::V1beta::ListServicesResponse]
266
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
267
+ #
268
+ # @return [::Google::Cloud::Metastore::V1beta::ListServicesResponse]
269
+ #
270
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
271
+ def list_services request, options = nil
272
+ raise ::ArgumentError, "request must be provided" if request.nil?
273
+
274
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Metastore::V1beta::ListServicesRequest
275
+
276
+ # Converts hash and nil to an options object
277
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
278
+
279
+ # Customize the options with defaults
280
+ call_metadata = @config.rpcs.list_services.metadata.to_h
281
+
282
+ # Set x-goog-api-client and x-goog-user-project headers
283
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
284
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
285
+ gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION,
286
+ transports_version_send: [:rest]
287
+
288
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
289
+
290
+ options.apply_defaults timeout: @config.rpcs.list_services.timeout,
291
+ metadata: call_metadata,
292
+ retry_policy: @config.rpcs.list_services.retry_policy
293
+
294
+ options.apply_defaults timeout: @config.timeout,
295
+ metadata: @config.metadata,
296
+ retry_policy: @config.retry_policy
297
+
298
+ @dataproc_metastore_stub.list_services request, options do |result, operation|
299
+ yield result, operation if block_given?
300
+ return result
301
+ end
302
+ rescue ::Gapic::Rest::Error => e
303
+ raise ::Google::Cloud::Error.from_error(e)
304
+ end
305
+
306
+ ##
307
+ # Gets the details of a single service.
308
+ #
309
+ # @overload get_service(request, options = nil)
310
+ # Pass arguments to `get_service` via a request object, either of type
311
+ # {::Google::Cloud::Metastore::V1beta::GetServiceRequest} or an equivalent Hash.
312
+ #
313
+ # @param request [::Google::Cloud::Metastore::V1beta::GetServiceRequest, ::Hash]
314
+ # A request object representing the call parameters. Required. To specify no
315
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
316
+ # @param options [::Gapic::CallOptions, ::Hash]
317
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
318
+ #
319
+ # @overload get_service(name: nil)
320
+ # Pass arguments to `get_service` via keyword arguments. Note that at
321
+ # least one keyword argument is required. To specify no parameters, or to keep all
322
+ # the default parameter values, pass an empty Hash as a request object (see above).
323
+ #
324
+ # @param name [::String]
325
+ # Required. The relative resource name of the metastore service to retrieve,
326
+ # in the following form:
327
+ #
328
+ # `projects/{project_number}/locations/{location_id}/services/{service_id}`.
329
+ # @yield [result, operation] Access the result along with the TransportOperation object
330
+ # @yieldparam result [::Google::Cloud::Metastore::V1beta::Service]
331
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
332
+ #
333
+ # @return [::Google::Cloud::Metastore::V1beta::Service]
334
+ #
335
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
336
+ def get_service request, options = nil
337
+ raise ::ArgumentError, "request must be provided" if request.nil?
338
+
339
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Metastore::V1beta::GetServiceRequest
340
+
341
+ # Converts hash and nil to an options object
342
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
343
+
344
+ # Customize the options with defaults
345
+ call_metadata = @config.rpcs.get_service.metadata.to_h
346
+
347
+ # Set x-goog-api-client and x-goog-user-project headers
348
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
349
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
350
+ gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION,
351
+ transports_version_send: [:rest]
352
+
353
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
354
+
355
+ options.apply_defaults timeout: @config.rpcs.get_service.timeout,
356
+ metadata: call_metadata,
357
+ retry_policy: @config.rpcs.get_service.retry_policy
358
+
359
+ options.apply_defaults timeout: @config.timeout,
360
+ metadata: @config.metadata,
361
+ retry_policy: @config.retry_policy
362
+
363
+ @dataproc_metastore_stub.get_service request, options do |result, operation|
364
+ yield result, operation if block_given?
365
+ return result
366
+ end
367
+ rescue ::Gapic::Rest::Error => e
368
+ raise ::Google::Cloud::Error.from_error(e)
369
+ end
370
+
371
+ ##
372
+ # Creates a metastore service in a project and location.
373
+ #
374
+ # @overload create_service(request, options = nil)
375
+ # Pass arguments to `create_service` via a request object, either of type
376
+ # {::Google::Cloud::Metastore::V1beta::CreateServiceRequest} or an equivalent Hash.
377
+ #
378
+ # @param request [::Google::Cloud::Metastore::V1beta::CreateServiceRequest, ::Hash]
379
+ # A request object representing the call parameters. Required. To specify no
380
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
381
+ # @param options [::Gapic::CallOptions, ::Hash]
382
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
383
+ #
384
+ # @overload create_service(parent: nil, service_id: nil, service: nil, request_id: nil)
385
+ # Pass arguments to `create_service` via keyword arguments. Note that at
386
+ # least one keyword argument is required. To specify no parameters, or to keep all
387
+ # the default parameter values, pass an empty Hash as a request object (see above).
388
+ #
389
+ # @param parent [::String]
390
+ # Required. The relative resource name of the location in which to create a
391
+ # metastore service, in the following form:
392
+ #
393
+ # `projects/{project_number}/locations/{location_id}`.
394
+ # @param service_id [::String]
395
+ # Required. The ID of the metastore service, which is used as the final
396
+ # component of the metastore service's name.
397
+ #
398
+ # This value must be between 2 and 63 characters long inclusive, begin with a
399
+ # letter, end with a letter or number, and consist of alpha-numeric
400
+ # ASCII characters or hyphens.
401
+ # @param service [::Google::Cloud::Metastore::V1beta::Service, ::Hash]
402
+ # Required. The Metastore service to create. The `name` field is
403
+ # ignored. The ID of the created metastore service must be provided in
404
+ # the request's `service_id` field.
405
+ # @param request_id [::String]
406
+ # Optional. A request ID. Specify a unique request ID to allow the server to
407
+ # ignore the request if it has completed. The server will ignore subsequent
408
+ # requests that provide a duplicate request ID for at least 60 minutes after
409
+ # the first request.
410
+ #
411
+ # For example, if an initial request times out, followed by another request
412
+ # with the same request ID, the server ignores the second request to prevent
413
+ # the creation of duplicate commitments.
414
+ #
415
+ # The request ID must be a valid
416
+ # [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
417
+ # A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
418
+ # @yield [result, operation] Access the result along with the TransportOperation object
419
+ # @yieldparam result [::Gapic::Operation]
420
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
421
+ #
422
+ # @return [::Gapic::Operation]
423
+ #
424
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
425
+ def create_service request, options = nil
426
+ raise ::ArgumentError, "request must be provided" if request.nil?
427
+
428
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Metastore::V1beta::CreateServiceRequest
429
+
430
+ # Converts hash and nil to an options object
431
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
432
+
433
+ # Customize the options with defaults
434
+ call_metadata = @config.rpcs.create_service.metadata.to_h
435
+
436
+ # Set x-goog-api-client and x-goog-user-project headers
437
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
438
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
439
+ gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION,
440
+ transports_version_send: [:rest]
441
+
442
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
443
+
444
+ options.apply_defaults timeout: @config.rpcs.create_service.timeout,
445
+ metadata: call_metadata,
446
+ retry_policy: @config.rpcs.create_service.retry_policy
447
+
448
+ options.apply_defaults timeout: @config.timeout,
449
+ metadata: @config.metadata,
450
+ retry_policy: @config.retry_policy
451
+
452
+ @dataproc_metastore_stub.create_service request, options do |result, operation|
453
+ result = ::Gapic::Operation.new result, @operations_client, options: options
454
+ yield result, operation if block_given?
455
+ return result
456
+ end
457
+ rescue ::Gapic::Rest::Error => e
458
+ raise ::Google::Cloud::Error.from_error(e)
459
+ end
460
+
461
+ ##
462
+ # Updates the parameters of a single service.
463
+ #
464
+ # @overload update_service(request, options = nil)
465
+ # Pass arguments to `update_service` via a request object, either of type
466
+ # {::Google::Cloud::Metastore::V1beta::UpdateServiceRequest} or an equivalent Hash.
467
+ #
468
+ # @param request [::Google::Cloud::Metastore::V1beta::UpdateServiceRequest, ::Hash]
469
+ # A request object representing the call parameters. Required. To specify no
470
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
471
+ # @param options [::Gapic::CallOptions, ::Hash]
472
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
473
+ #
474
+ # @overload update_service(update_mask: nil, service: nil, request_id: nil)
475
+ # Pass arguments to `update_service` via keyword arguments. Note that at
476
+ # least one keyword argument is required. To specify no parameters, or to keep all
477
+ # the default parameter values, pass an empty Hash as a request object (see above).
478
+ #
479
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
480
+ # Required. A field mask used to specify the fields to be overwritten in the
481
+ # metastore service resource by the update.
482
+ # Fields specified in the `update_mask` are relative to the resource (not
483
+ # to the full request). A field is overwritten if it is in the mask.
484
+ # @param service [::Google::Cloud::Metastore::V1beta::Service, ::Hash]
485
+ # Required. The metastore service to update. The server only merges fields
486
+ # in the service if they are specified in `update_mask`.
487
+ #
488
+ # The metastore service's `name` field is used to identify the metastore
489
+ # service to be updated.
490
+ # @param request_id [::String]
491
+ # Optional. A request ID. Specify a unique request ID to allow the server to
492
+ # ignore the request if it has completed. The server will ignore subsequent
493
+ # requests that provide a duplicate request ID for at least 60 minutes after
494
+ # the first request.
495
+ #
496
+ # For example, if an initial request times out, followed by another request
497
+ # with the same request ID, the server ignores the second request to prevent
498
+ # the creation of duplicate commitments.
499
+ #
500
+ # The request ID must be a valid
501
+ # [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
502
+ # A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
503
+ # @yield [result, operation] Access the result along with the TransportOperation object
504
+ # @yieldparam result [::Gapic::Operation]
505
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
506
+ #
507
+ # @return [::Gapic::Operation]
508
+ #
509
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
510
+ def update_service request, options = nil
511
+ raise ::ArgumentError, "request must be provided" if request.nil?
512
+
513
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Metastore::V1beta::UpdateServiceRequest
514
+
515
+ # Converts hash and nil to an options object
516
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
517
+
518
+ # Customize the options with defaults
519
+ call_metadata = @config.rpcs.update_service.metadata.to_h
520
+
521
+ # Set x-goog-api-client and x-goog-user-project headers
522
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
523
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
524
+ gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION,
525
+ transports_version_send: [:rest]
526
+
527
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
528
+
529
+ options.apply_defaults timeout: @config.rpcs.update_service.timeout,
530
+ metadata: call_metadata,
531
+ retry_policy: @config.rpcs.update_service.retry_policy
532
+
533
+ options.apply_defaults timeout: @config.timeout,
534
+ metadata: @config.metadata,
535
+ retry_policy: @config.retry_policy
536
+
537
+ @dataproc_metastore_stub.update_service request, options do |result, operation|
538
+ result = ::Gapic::Operation.new result, @operations_client, options: options
539
+ yield result, operation if block_given?
540
+ return result
541
+ end
542
+ rescue ::Gapic::Rest::Error => e
543
+ raise ::Google::Cloud::Error.from_error(e)
544
+ end
545
+
546
+ ##
547
+ # Deletes a single service.
548
+ #
549
+ # @overload delete_service(request, options = nil)
550
+ # Pass arguments to `delete_service` via a request object, either of type
551
+ # {::Google::Cloud::Metastore::V1beta::DeleteServiceRequest} or an equivalent Hash.
552
+ #
553
+ # @param request [::Google::Cloud::Metastore::V1beta::DeleteServiceRequest, ::Hash]
554
+ # A request object representing the call parameters. Required. To specify no
555
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
556
+ # @param options [::Gapic::CallOptions, ::Hash]
557
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
558
+ #
559
+ # @overload delete_service(name: nil, request_id: nil)
560
+ # Pass arguments to `delete_service` via keyword arguments. Note that at
561
+ # least one keyword argument is required. To specify no parameters, or to keep all
562
+ # the default parameter values, pass an empty Hash as a request object (see above).
563
+ #
564
+ # @param name [::String]
565
+ # Required. The relative resource name of the metastore service to delete, in
566
+ # the following form:
567
+ #
568
+ # `projects/{project_number}/locations/{location_id}/services/{service_id}`.
569
+ # @param request_id [::String]
570
+ # Optional. A request ID. Specify a unique request ID to allow the server to
571
+ # ignore the request if it has completed. The server will ignore subsequent
572
+ # requests that provide a duplicate request ID for at least 60 minutes after
573
+ # the first request.
574
+ #
575
+ # For example, if an initial request times out, followed by another request
576
+ # with the same request ID, the server ignores the second request to prevent
577
+ # the creation of duplicate commitments.
578
+ #
579
+ # The request ID must be a valid
580
+ # [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
581
+ # A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
582
+ # @yield [result, operation] Access the result along with the TransportOperation object
583
+ # @yieldparam result [::Gapic::Operation]
584
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
585
+ #
586
+ # @return [::Gapic::Operation]
587
+ #
588
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
589
+ def delete_service request, options = nil
590
+ raise ::ArgumentError, "request must be provided" if request.nil?
591
+
592
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Metastore::V1beta::DeleteServiceRequest
593
+
594
+ # Converts hash and nil to an options object
595
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
596
+
597
+ # Customize the options with defaults
598
+ call_metadata = @config.rpcs.delete_service.metadata.to_h
599
+
600
+ # Set x-goog-api-client and x-goog-user-project headers
601
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
602
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
603
+ gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION,
604
+ transports_version_send: [:rest]
605
+
606
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
607
+
608
+ options.apply_defaults timeout: @config.rpcs.delete_service.timeout,
609
+ metadata: call_metadata,
610
+ retry_policy: @config.rpcs.delete_service.retry_policy
611
+
612
+ options.apply_defaults timeout: @config.timeout,
613
+ metadata: @config.metadata,
614
+ retry_policy: @config.retry_policy
615
+
616
+ @dataproc_metastore_stub.delete_service request, options do |result, operation|
617
+ result = ::Gapic::Operation.new result, @operations_client, options: options
618
+ yield result, operation if block_given?
619
+ return result
620
+ end
621
+ rescue ::Gapic::Rest::Error => e
622
+ raise ::Google::Cloud::Error.from_error(e)
623
+ end
624
+
625
+ ##
626
+ # Lists imports in a service.
627
+ #
628
+ # @overload list_metadata_imports(request, options = nil)
629
+ # Pass arguments to `list_metadata_imports` via a request object, either of type
630
+ # {::Google::Cloud::Metastore::V1beta::ListMetadataImportsRequest} or an equivalent Hash.
631
+ #
632
+ # @param request [::Google::Cloud::Metastore::V1beta::ListMetadataImportsRequest, ::Hash]
633
+ # A request object representing the call parameters. Required. To specify no
634
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
635
+ # @param options [::Gapic::CallOptions, ::Hash]
636
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
637
+ #
638
+ # @overload list_metadata_imports(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
639
+ # Pass arguments to `list_metadata_imports` via keyword arguments. Note that at
640
+ # least one keyword argument is required. To specify no parameters, or to keep all
641
+ # the default parameter values, pass an empty Hash as a request object (see above).
642
+ #
643
+ # @param parent [::String]
644
+ # Required. The relative resource name of the service whose metadata imports
645
+ # to list, in the following form:
646
+ #
647
+ # `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
648
+ # @param page_size [::Integer]
649
+ # Optional. The maximum number of imports to return. The response may contain
650
+ # less than the maximum number. If unspecified, no more than 500 imports are
651
+ # returned. The maximum value is 1000; values above 1000 are changed to 1000.
652
+ # @param page_token [::String]
653
+ # Optional. A page token, received from a previous
654
+ # {::Google::Cloud::Metastore::V1beta::DataprocMetastore::Rest::Client#list_services DataprocMetastore.ListServices}
655
+ # call. Provide this token to retrieve the subsequent page.
656
+ #
657
+ # To retrieve the first page, supply an empty page token.
658
+ #
659
+ # When paginating, other parameters provided to
660
+ # {::Google::Cloud::Metastore::V1beta::DataprocMetastore::Rest::Client#list_services DataprocMetastore.ListServices}
661
+ # must match the call that provided the page token.
662
+ # @param filter [::String]
663
+ # Optional. The filter to apply to list results.
664
+ # @param order_by [::String]
665
+ # Optional. Specify the ordering of results as described in [Sorting
666
+ # Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
667
+ # If not specified, the results will be sorted in the default order.
668
+ # @yield [result, operation] Access the result along with the TransportOperation object
669
+ # @yieldparam result [::Google::Cloud::Metastore::V1beta::ListMetadataImportsResponse]
670
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
671
+ #
672
+ # @return [::Google::Cloud::Metastore::V1beta::ListMetadataImportsResponse]
673
+ #
674
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
675
+ def list_metadata_imports request, options = nil
676
+ raise ::ArgumentError, "request must be provided" if request.nil?
677
+
678
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Metastore::V1beta::ListMetadataImportsRequest
679
+
680
+ # Converts hash and nil to an options object
681
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
682
+
683
+ # Customize the options with defaults
684
+ call_metadata = @config.rpcs.list_metadata_imports.metadata.to_h
685
+
686
+ # Set x-goog-api-client and x-goog-user-project headers
687
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
688
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
689
+ gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION,
690
+ transports_version_send: [:rest]
691
+
692
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
693
+
694
+ options.apply_defaults timeout: @config.rpcs.list_metadata_imports.timeout,
695
+ metadata: call_metadata,
696
+ retry_policy: @config.rpcs.list_metadata_imports.retry_policy
697
+
698
+ options.apply_defaults timeout: @config.timeout,
699
+ metadata: @config.metadata,
700
+ retry_policy: @config.retry_policy
701
+
702
+ @dataproc_metastore_stub.list_metadata_imports request, options do |result, operation|
703
+ yield result, operation if block_given?
704
+ return result
705
+ end
706
+ rescue ::Gapic::Rest::Error => e
707
+ raise ::Google::Cloud::Error.from_error(e)
708
+ end
709
+
710
+ ##
711
+ # Gets details of a single import.
712
+ #
713
+ # @overload get_metadata_import(request, options = nil)
714
+ # Pass arguments to `get_metadata_import` via a request object, either of type
715
+ # {::Google::Cloud::Metastore::V1beta::GetMetadataImportRequest} or an equivalent Hash.
716
+ #
717
+ # @param request [::Google::Cloud::Metastore::V1beta::GetMetadataImportRequest, ::Hash]
718
+ # A request object representing the call parameters. Required. To specify no
719
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
720
+ # @param options [::Gapic::CallOptions, ::Hash]
721
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
722
+ #
723
+ # @overload get_metadata_import(name: nil)
724
+ # Pass arguments to `get_metadata_import` via keyword arguments. Note that at
725
+ # least one keyword argument is required. To specify no parameters, or to keep all
726
+ # the default parameter values, pass an empty Hash as a request object (see above).
727
+ #
728
+ # @param name [::String]
729
+ # Required. The relative resource name of the metadata import to retrieve, in
730
+ # the following form:
731
+ #
732
+ # `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
733
+ # @yield [result, operation] Access the result along with the TransportOperation object
734
+ # @yieldparam result [::Google::Cloud::Metastore::V1beta::MetadataImport]
735
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
736
+ #
737
+ # @return [::Google::Cloud::Metastore::V1beta::MetadataImport]
738
+ #
739
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
740
+ def get_metadata_import request, options = nil
741
+ raise ::ArgumentError, "request must be provided" if request.nil?
742
+
743
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Metastore::V1beta::GetMetadataImportRequest
744
+
745
+ # Converts hash and nil to an options object
746
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
747
+
748
+ # Customize the options with defaults
749
+ call_metadata = @config.rpcs.get_metadata_import.metadata.to_h
750
+
751
+ # Set x-goog-api-client and x-goog-user-project headers
752
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
753
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
754
+ gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION,
755
+ transports_version_send: [:rest]
756
+
757
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
758
+
759
+ options.apply_defaults timeout: @config.rpcs.get_metadata_import.timeout,
760
+ metadata: call_metadata,
761
+ retry_policy: @config.rpcs.get_metadata_import.retry_policy
762
+
763
+ options.apply_defaults timeout: @config.timeout,
764
+ metadata: @config.metadata,
765
+ retry_policy: @config.retry_policy
766
+
767
+ @dataproc_metastore_stub.get_metadata_import request, options do |result, operation|
768
+ yield result, operation if block_given?
769
+ return result
770
+ end
771
+ rescue ::Gapic::Rest::Error => e
772
+ raise ::Google::Cloud::Error.from_error(e)
773
+ end
774
+
775
+ ##
776
+ # Creates a new MetadataImport in a given project and location.
777
+ #
778
+ # @overload create_metadata_import(request, options = nil)
779
+ # Pass arguments to `create_metadata_import` via a request object, either of type
780
+ # {::Google::Cloud::Metastore::V1beta::CreateMetadataImportRequest} or an equivalent Hash.
781
+ #
782
+ # @param request [::Google::Cloud::Metastore::V1beta::CreateMetadataImportRequest, ::Hash]
783
+ # A request object representing the call parameters. Required. To specify no
784
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
785
+ # @param options [::Gapic::CallOptions, ::Hash]
786
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
787
+ #
788
+ # @overload create_metadata_import(parent: nil, metadata_import_id: nil, metadata_import: nil, request_id: nil)
789
+ # Pass arguments to `create_metadata_import` via keyword arguments. Note that at
790
+ # least one keyword argument is required. To specify no parameters, or to keep all
791
+ # the default parameter values, pass an empty Hash as a request object (see above).
792
+ #
793
+ # @param parent [::String]
794
+ # Required. The relative resource name of the service in which to create a
795
+ # metastore import, in the following form:
796
+ #
797
+ # `projects/{project_number}/locations/{location_id}/services/{service_id}`.
798
+ # @param metadata_import_id [::String]
799
+ # Required. The ID of the metadata import, which is used as the final
800
+ # component of the metadata import's name.
801
+ #
802
+ # This value must be between 1 and 64 characters long, begin with a letter,
803
+ # end with a letter or number, and consist of alpha-numeric ASCII characters
804
+ # or hyphens.
805
+ # @param metadata_import [::Google::Cloud::Metastore::V1beta::MetadataImport, ::Hash]
806
+ # Required. The metadata import to create. The `name` field is ignored. The
807
+ # ID of the created metadata import must be provided in the request's
808
+ # `metadata_import_id` field.
809
+ # @param request_id [::String]
810
+ # Optional. A request ID. Specify a unique request ID to allow the server to
811
+ # ignore the request if it has completed. The server will ignore subsequent
812
+ # requests that provide a duplicate request ID for at least 60 minutes after
813
+ # the first request.
814
+ #
815
+ # For example, if an initial request times out, followed by another request
816
+ # with the same request ID, the server ignores the second request to prevent
817
+ # the creation of duplicate commitments.
818
+ #
819
+ # The request ID must be a valid
820
+ # [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
821
+ # A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
822
+ # @yield [result, operation] Access the result along with the TransportOperation object
823
+ # @yieldparam result [::Gapic::Operation]
824
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
825
+ #
826
+ # @return [::Gapic::Operation]
827
+ #
828
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
829
+ def create_metadata_import request, options = nil
830
+ raise ::ArgumentError, "request must be provided" if request.nil?
831
+
832
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Metastore::V1beta::CreateMetadataImportRequest
833
+
834
+ # Converts hash and nil to an options object
835
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
836
+
837
+ # Customize the options with defaults
838
+ call_metadata = @config.rpcs.create_metadata_import.metadata.to_h
839
+
840
+ # Set x-goog-api-client and x-goog-user-project headers
841
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
842
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
843
+ gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION,
844
+ transports_version_send: [:rest]
845
+
846
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
847
+
848
+ options.apply_defaults timeout: @config.rpcs.create_metadata_import.timeout,
849
+ metadata: call_metadata,
850
+ retry_policy: @config.rpcs.create_metadata_import.retry_policy
851
+
852
+ options.apply_defaults timeout: @config.timeout,
853
+ metadata: @config.metadata,
854
+ retry_policy: @config.retry_policy
855
+
856
+ @dataproc_metastore_stub.create_metadata_import request, options do |result, operation|
857
+ result = ::Gapic::Operation.new result, @operations_client, options: options
858
+ yield result, operation if block_given?
859
+ return result
860
+ end
861
+ rescue ::Gapic::Rest::Error => e
862
+ raise ::Google::Cloud::Error.from_error(e)
863
+ end
864
+
865
+ ##
866
+ # Updates a single import.
867
+ # Only the description field of MetadataImport is supported to be updated.
868
+ #
869
+ # @overload update_metadata_import(request, options = nil)
870
+ # Pass arguments to `update_metadata_import` via a request object, either of type
871
+ # {::Google::Cloud::Metastore::V1beta::UpdateMetadataImportRequest} or an equivalent Hash.
872
+ #
873
+ # @param request [::Google::Cloud::Metastore::V1beta::UpdateMetadataImportRequest, ::Hash]
874
+ # A request object representing the call parameters. Required. To specify no
875
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
876
+ # @param options [::Gapic::CallOptions, ::Hash]
877
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
878
+ #
879
+ # @overload update_metadata_import(update_mask: nil, metadata_import: nil, request_id: nil)
880
+ # Pass arguments to `update_metadata_import` via keyword arguments. Note that at
881
+ # least one keyword argument is required. To specify no parameters, or to keep all
882
+ # the default parameter values, pass an empty Hash as a request object (see above).
883
+ #
884
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
885
+ # Required. A field mask used to specify the fields to be overwritten in the
886
+ # metadata import resource by the update.
887
+ # Fields specified in the `update_mask` are relative to the resource (not
888
+ # to the full request). A field is overwritten if it is in the mask.
889
+ # @param metadata_import [::Google::Cloud::Metastore::V1beta::MetadataImport, ::Hash]
890
+ # Required. The metadata import to update. The server only merges fields
891
+ # in the import if they are specified in `update_mask`.
892
+ #
893
+ # The metadata import's `name` field is used to identify the metastore
894
+ # import to be updated.
895
+ # @param request_id [::String]
896
+ # Optional. A request ID. Specify a unique request ID to allow the server to
897
+ # ignore the request if it has completed. The server will ignore subsequent
898
+ # requests that provide a duplicate request ID for at least 60 minutes after
899
+ # the first request.
900
+ #
901
+ # For example, if an initial request times out, followed by another request
902
+ # with the same request ID, the server ignores the second request to prevent
903
+ # the creation of duplicate commitments.
904
+ #
905
+ # The request ID must be a valid
906
+ # [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
907
+ # A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
908
+ # @yield [result, operation] Access the result along with the TransportOperation object
909
+ # @yieldparam result [::Gapic::Operation]
910
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
911
+ #
912
+ # @return [::Gapic::Operation]
913
+ #
914
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
915
+ def update_metadata_import request, options = nil
916
+ raise ::ArgumentError, "request must be provided" if request.nil?
917
+
918
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Metastore::V1beta::UpdateMetadataImportRequest
919
+
920
+ # Converts hash and nil to an options object
921
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
922
+
923
+ # Customize the options with defaults
924
+ call_metadata = @config.rpcs.update_metadata_import.metadata.to_h
925
+
926
+ # Set x-goog-api-client and x-goog-user-project headers
927
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
928
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
929
+ gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION,
930
+ transports_version_send: [:rest]
931
+
932
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
933
+
934
+ options.apply_defaults timeout: @config.rpcs.update_metadata_import.timeout,
935
+ metadata: call_metadata,
936
+ retry_policy: @config.rpcs.update_metadata_import.retry_policy
937
+
938
+ options.apply_defaults timeout: @config.timeout,
939
+ metadata: @config.metadata,
940
+ retry_policy: @config.retry_policy
941
+
942
+ @dataproc_metastore_stub.update_metadata_import request, options do |result, operation|
943
+ result = ::Gapic::Operation.new result, @operations_client, options: options
944
+ yield result, operation if block_given?
945
+ return result
946
+ end
947
+ rescue ::Gapic::Rest::Error => e
948
+ raise ::Google::Cloud::Error.from_error(e)
949
+ end
950
+
951
+ ##
952
+ # Exports metadata from a service.
953
+ #
954
+ # @overload export_metadata(request, options = nil)
955
+ # Pass arguments to `export_metadata` via a request object, either of type
956
+ # {::Google::Cloud::Metastore::V1beta::ExportMetadataRequest} or an equivalent Hash.
957
+ #
958
+ # @param request [::Google::Cloud::Metastore::V1beta::ExportMetadataRequest, ::Hash]
959
+ # A request object representing the call parameters. Required. To specify no
960
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
961
+ # @param options [::Gapic::CallOptions, ::Hash]
962
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
963
+ #
964
+ # @overload export_metadata(destination_gcs_folder: nil, service: nil, request_id: nil, database_dump_type: nil)
965
+ # Pass arguments to `export_metadata` via keyword arguments. Note that at
966
+ # least one keyword argument is required. To specify no parameters, or to keep all
967
+ # the default parameter values, pass an empty Hash as a request object (see above).
968
+ #
969
+ # @param destination_gcs_folder [::String]
970
+ # A Cloud Storage URI of a folder, in the format
971
+ # `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
972
+ # `<export_folder>` containing exported files will be created below it.
973
+ # @param service [::String]
974
+ # Required. The relative resource name of the metastore service to run
975
+ # export, in the following form:
976
+ #
977
+ # `projects/{project_id}/locations/{location_id}/services/{service_id}`.
978
+ # @param request_id [::String]
979
+ # Optional. A request ID. Specify a unique request ID to allow the server to
980
+ # ignore the request if it has completed. The server will ignore subsequent
981
+ # requests that provide a duplicate request ID for at least 60 minutes after
982
+ # the first request.
983
+ #
984
+ # For example, if an initial request times out, followed by another request
985
+ # with the same request ID, the server ignores the second request to prevent
986
+ # the creation of duplicate commitments.
987
+ #
988
+ # The request ID must be a valid
989
+ # [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
990
+ # A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
991
+ # @param database_dump_type [::Google::Cloud::Metastore::V1beta::DatabaseDumpSpec::Type]
992
+ # Optional. The type of the database dump. If unspecified, defaults to
993
+ # `MYSQL`.
994
+ # @yield [result, operation] Access the result along with the TransportOperation object
995
+ # @yieldparam result [::Gapic::Operation]
996
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
997
+ #
998
+ # @return [::Gapic::Operation]
999
+ #
1000
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1001
+ def export_metadata request, options = nil
1002
+ raise ::ArgumentError, "request must be provided" if request.nil?
1003
+
1004
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Metastore::V1beta::ExportMetadataRequest
1005
+
1006
+ # Converts hash and nil to an options object
1007
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1008
+
1009
+ # Customize the options with defaults
1010
+ call_metadata = @config.rpcs.export_metadata.metadata.to_h
1011
+
1012
+ # Set x-goog-api-client and x-goog-user-project headers
1013
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1014
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1015
+ gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION,
1016
+ transports_version_send: [:rest]
1017
+
1018
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1019
+
1020
+ options.apply_defaults timeout: @config.rpcs.export_metadata.timeout,
1021
+ metadata: call_metadata,
1022
+ retry_policy: @config.rpcs.export_metadata.retry_policy
1023
+
1024
+ options.apply_defaults timeout: @config.timeout,
1025
+ metadata: @config.metadata,
1026
+ retry_policy: @config.retry_policy
1027
+
1028
+ @dataproc_metastore_stub.export_metadata request, options do |result, operation|
1029
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1030
+ yield result, operation if block_given?
1031
+ return result
1032
+ end
1033
+ rescue ::Gapic::Rest::Error => e
1034
+ raise ::Google::Cloud::Error.from_error(e)
1035
+ end
1036
+
1037
+ ##
1038
+ # Restores a service from a backup.
1039
+ #
1040
+ # @overload restore_service(request, options = nil)
1041
+ # Pass arguments to `restore_service` via a request object, either of type
1042
+ # {::Google::Cloud::Metastore::V1beta::RestoreServiceRequest} or an equivalent Hash.
1043
+ #
1044
+ # @param request [::Google::Cloud::Metastore::V1beta::RestoreServiceRequest, ::Hash]
1045
+ # A request object representing the call parameters. Required. To specify no
1046
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1047
+ # @param options [::Gapic::CallOptions, ::Hash]
1048
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1049
+ #
1050
+ # @overload restore_service(service: nil, backup: nil, restore_type: nil, request_id: nil)
1051
+ # Pass arguments to `restore_service` via keyword arguments. Note that at
1052
+ # least one keyword argument is required. To specify no parameters, or to keep all
1053
+ # the default parameter values, pass an empty Hash as a request object (see above).
1054
+ #
1055
+ # @param service [::String]
1056
+ # Required. The relative resource name of the metastore service to run
1057
+ # restore, in the following form:
1058
+ #
1059
+ # `projects/{project_id}/locations/{location_id}/services/{service_id}`.
1060
+ # @param backup [::String]
1061
+ # Required. The relative resource name of the metastore service backup to
1062
+ # restore from, in the following form:
1063
+ #
1064
+ # `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
1065
+ # @param restore_type [::Google::Cloud::Metastore::V1beta::Restore::RestoreType]
1066
+ # Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
1067
+ # @param request_id [::String]
1068
+ # Optional. A request ID. Specify a unique request ID to allow the server to
1069
+ # ignore the request if it has completed. The server will ignore subsequent
1070
+ # requests that provide a duplicate request ID for at least 60 minutes after
1071
+ # the first request.
1072
+ #
1073
+ # For example, if an initial request times out, followed by another request
1074
+ # with the same request ID, the server ignores the second request to prevent
1075
+ # the creation of duplicate commitments.
1076
+ #
1077
+ # The request ID must be a valid
1078
+ # [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
1079
+ # A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
1080
+ # @yield [result, operation] Access the result along with the TransportOperation object
1081
+ # @yieldparam result [::Gapic::Operation]
1082
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1083
+ #
1084
+ # @return [::Gapic::Operation]
1085
+ #
1086
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1087
+ def restore_service request, options = nil
1088
+ raise ::ArgumentError, "request must be provided" if request.nil?
1089
+
1090
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Metastore::V1beta::RestoreServiceRequest
1091
+
1092
+ # Converts hash and nil to an options object
1093
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1094
+
1095
+ # Customize the options with defaults
1096
+ call_metadata = @config.rpcs.restore_service.metadata.to_h
1097
+
1098
+ # Set x-goog-api-client and x-goog-user-project headers
1099
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1100
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1101
+ gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION,
1102
+ transports_version_send: [:rest]
1103
+
1104
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1105
+
1106
+ options.apply_defaults timeout: @config.rpcs.restore_service.timeout,
1107
+ metadata: call_metadata,
1108
+ retry_policy: @config.rpcs.restore_service.retry_policy
1109
+
1110
+ options.apply_defaults timeout: @config.timeout,
1111
+ metadata: @config.metadata,
1112
+ retry_policy: @config.retry_policy
1113
+
1114
+ @dataproc_metastore_stub.restore_service request, options do |result, operation|
1115
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1116
+ yield result, operation if block_given?
1117
+ return result
1118
+ end
1119
+ rescue ::Gapic::Rest::Error => e
1120
+ raise ::Google::Cloud::Error.from_error(e)
1121
+ end
1122
+
1123
+ ##
1124
+ # Lists backups in a service.
1125
+ #
1126
+ # @overload list_backups(request, options = nil)
1127
+ # Pass arguments to `list_backups` via a request object, either of type
1128
+ # {::Google::Cloud::Metastore::V1beta::ListBackupsRequest} or an equivalent Hash.
1129
+ #
1130
+ # @param request [::Google::Cloud::Metastore::V1beta::ListBackupsRequest, ::Hash]
1131
+ # A request object representing the call parameters. Required. To specify no
1132
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1133
+ # @param options [::Gapic::CallOptions, ::Hash]
1134
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1135
+ #
1136
+ # @overload list_backups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1137
+ # Pass arguments to `list_backups` via keyword arguments. Note that at
1138
+ # least one keyword argument is required. To specify no parameters, or to keep all
1139
+ # the default parameter values, pass an empty Hash as a request object (see above).
1140
+ #
1141
+ # @param parent [::String]
1142
+ # Required. The relative resource name of the service whose backups to
1143
+ # list, in the following form:
1144
+ #
1145
+ # `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
1146
+ # @param page_size [::Integer]
1147
+ # Optional. The maximum number of backups to return. The response may contain
1148
+ # less than the maximum number. If unspecified, no more than 500 backups are
1149
+ # returned. The maximum value is 1000; values above 1000 are changed to 1000.
1150
+ # @param page_token [::String]
1151
+ # Optional. A page token, received from a previous
1152
+ # {::Google::Cloud::Metastore::V1beta::DataprocMetastore::Rest::Client#list_backups DataprocMetastore.ListBackups}
1153
+ # call. Provide this token to retrieve the subsequent page.
1154
+ #
1155
+ # To retrieve the first page, supply an empty page token.
1156
+ #
1157
+ # When paginating, other parameters provided to
1158
+ # {::Google::Cloud::Metastore::V1beta::DataprocMetastore::Rest::Client#list_backups DataprocMetastore.ListBackups}
1159
+ # must match the call that provided the page token.
1160
+ # @param filter [::String]
1161
+ # Optional. The filter to apply to list results.
1162
+ # @param order_by [::String]
1163
+ # Optional. Specify the ordering of results as described in [Sorting
1164
+ # Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
1165
+ # If not specified, the results will be sorted in the default order.
1166
+ # @yield [result, operation] Access the result along with the TransportOperation object
1167
+ # @yieldparam result [::Google::Cloud::Metastore::V1beta::ListBackupsResponse]
1168
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1169
+ #
1170
+ # @return [::Google::Cloud::Metastore::V1beta::ListBackupsResponse]
1171
+ #
1172
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1173
+ def list_backups request, options = nil
1174
+ raise ::ArgumentError, "request must be provided" if request.nil?
1175
+
1176
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Metastore::V1beta::ListBackupsRequest
1177
+
1178
+ # Converts hash and nil to an options object
1179
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1180
+
1181
+ # Customize the options with defaults
1182
+ call_metadata = @config.rpcs.list_backups.metadata.to_h
1183
+
1184
+ # Set x-goog-api-client and x-goog-user-project headers
1185
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1186
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1187
+ gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION,
1188
+ transports_version_send: [:rest]
1189
+
1190
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1191
+
1192
+ options.apply_defaults timeout: @config.rpcs.list_backups.timeout,
1193
+ metadata: call_metadata,
1194
+ retry_policy: @config.rpcs.list_backups.retry_policy
1195
+
1196
+ options.apply_defaults timeout: @config.timeout,
1197
+ metadata: @config.metadata,
1198
+ retry_policy: @config.retry_policy
1199
+
1200
+ @dataproc_metastore_stub.list_backups request, options do |result, operation|
1201
+ yield result, operation if block_given?
1202
+ return result
1203
+ end
1204
+ rescue ::Gapic::Rest::Error => e
1205
+ raise ::Google::Cloud::Error.from_error(e)
1206
+ end
1207
+
1208
+ ##
1209
+ # Gets details of a single backup.
1210
+ #
1211
+ # @overload get_backup(request, options = nil)
1212
+ # Pass arguments to `get_backup` via a request object, either of type
1213
+ # {::Google::Cloud::Metastore::V1beta::GetBackupRequest} or an equivalent Hash.
1214
+ #
1215
+ # @param request [::Google::Cloud::Metastore::V1beta::GetBackupRequest, ::Hash]
1216
+ # A request object representing the call parameters. Required. To specify no
1217
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1218
+ # @param options [::Gapic::CallOptions, ::Hash]
1219
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1220
+ #
1221
+ # @overload get_backup(name: nil)
1222
+ # Pass arguments to `get_backup` via keyword arguments. Note that at
1223
+ # least one keyword argument is required. To specify no parameters, or to keep all
1224
+ # the default parameter values, pass an empty Hash as a request object (see above).
1225
+ #
1226
+ # @param name [::String]
1227
+ # Required. The relative resource name of the backup to retrieve, in the
1228
+ # following form:
1229
+ #
1230
+ # `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
1231
+ # @yield [result, operation] Access the result along with the TransportOperation object
1232
+ # @yieldparam result [::Google::Cloud::Metastore::V1beta::Backup]
1233
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1234
+ #
1235
+ # @return [::Google::Cloud::Metastore::V1beta::Backup]
1236
+ #
1237
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1238
+ def get_backup request, options = nil
1239
+ raise ::ArgumentError, "request must be provided" if request.nil?
1240
+
1241
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Metastore::V1beta::GetBackupRequest
1242
+
1243
+ # Converts hash and nil to an options object
1244
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1245
+
1246
+ # Customize the options with defaults
1247
+ call_metadata = @config.rpcs.get_backup.metadata.to_h
1248
+
1249
+ # Set x-goog-api-client and x-goog-user-project headers
1250
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1251
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1252
+ gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION,
1253
+ transports_version_send: [:rest]
1254
+
1255
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1256
+
1257
+ options.apply_defaults timeout: @config.rpcs.get_backup.timeout,
1258
+ metadata: call_metadata,
1259
+ retry_policy: @config.rpcs.get_backup.retry_policy
1260
+
1261
+ options.apply_defaults timeout: @config.timeout,
1262
+ metadata: @config.metadata,
1263
+ retry_policy: @config.retry_policy
1264
+
1265
+ @dataproc_metastore_stub.get_backup request, options do |result, operation|
1266
+ yield result, operation if block_given?
1267
+ return result
1268
+ end
1269
+ rescue ::Gapic::Rest::Error => e
1270
+ raise ::Google::Cloud::Error.from_error(e)
1271
+ end
1272
+
1273
+ ##
1274
+ # Creates a new backup in a given project and location.
1275
+ #
1276
+ # @overload create_backup(request, options = nil)
1277
+ # Pass arguments to `create_backup` via a request object, either of type
1278
+ # {::Google::Cloud::Metastore::V1beta::CreateBackupRequest} or an equivalent Hash.
1279
+ #
1280
+ # @param request [::Google::Cloud::Metastore::V1beta::CreateBackupRequest, ::Hash]
1281
+ # A request object representing the call parameters. Required. To specify no
1282
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1283
+ # @param options [::Gapic::CallOptions, ::Hash]
1284
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1285
+ #
1286
+ # @overload create_backup(parent: nil, backup_id: nil, backup: nil, request_id: nil)
1287
+ # Pass arguments to `create_backup` via keyword arguments. Note that at
1288
+ # least one keyword argument is required. To specify no parameters, or to keep all
1289
+ # the default parameter values, pass an empty Hash as a request object (see above).
1290
+ #
1291
+ # @param parent [::String]
1292
+ # Required. The relative resource name of the service in which to create a
1293
+ # backup of the following form:
1294
+ #
1295
+ # `projects/{project_number}/locations/{location_id}/services/{service_id}`.
1296
+ # @param backup_id [::String]
1297
+ # Required. The ID of the backup, which is used as the final component of the
1298
+ # backup's name.
1299
+ #
1300
+ # This value must be between 1 and 64 characters long, begin with a letter,
1301
+ # end with a letter or number, and consist of alpha-numeric ASCII characters
1302
+ # or hyphens.
1303
+ # @param backup [::Google::Cloud::Metastore::V1beta::Backup, ::Hash]
1304
+ # Required. The backup to create. The `name` field is ignored. The ID of the
1305
+ # created backup must be provided in the request's `backup_id` field.
1306
+ # @param request_id [::String]
1307
+ # Optional. A request ID. Specify a unique request ID to allow the server to
1308
+ # ignore the request if it has completed. The server will ignore subsequent
1309
+ # requests that provide a duplicate request ID for at least 60 minutes after
1310
+ # the first request.
1311
+ #
1312
+ # For example, if an initial request times out, followed by another request
1313
+ # with the same request ID, the server ignores the second request to prevent
1314
+ # the creation of duplicate commitments.
1315
+ #
1316
+ # The request ID must be a valid
1317
+ # [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
1318
+ # A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
1319
+ # @yield [result, operation] Access the result along with the TransportOperation object
1320
+ # @yieldparam result [::Gapic::Operation]
1321
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1322
+ #
1323
+ # @return [::Gapic::Operation]
1324
+ #
1325
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1326
+ def create_backup request, options = nil
1327
+ raise ::ArgumentError, "request must be provided" if request.nil?
1328
+
1329
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Metastore::V1beta::CreateBackupRequest
1330
+
1331
+ # Converts hash and nil to an options object
1332
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1333
+
1334
+ # Customize the options with defaults
1335
+ call_metadata = @config.rpcs.create_backup.metadata.to_h
1336
+
1337
+ # Set x-goog-api-client and x-goog-user-project headers
1338
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1339
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1340
+ gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION,
1341
+ transports_version_send: [:rest]
1342
+
1343
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1344
+
1345
+ options.apply_defaults timeout: @config.rpcs.create_backup.timeout,
1346
+ metadata: call_metadata,
1347
+ retry_policy: @config.rpcs.create_backup.retry_policy
1348
+
1349
+ options.apply_defaults timeout: @config.timeout,
1350
+ metadata: @config.metadata,
1351
+ retry_policy: @config.retry_policy
1352
+
1353
+ @dataproc_metastore_stub.create_backup request, options do |result, operation|
1354
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1355
+ yield result, operation if block_given?
1356
+ return result
1357
+ end
1358
+ rescue ::Gapic::Rest::Error => e
1359
+ raise ::Google::Cloud::Error.from_error(e)
1360
+ end
1361
+
1362
+ ##
1363
+ # Deletes a single backup.
1364
+ #
1365
+ # @overload delete_backup(request, options = nil)
1366
+ # Pass arguments to `delete_backup` via a request object, either of type
1367
+ # {::Google::Cloud::Metastore::V1beta::DeleteBackupRequest} or an equivalent Hash.
1368
+ #
1369
+ # @param request [::Google::Cloud::Metastore::V1beta::DeleteBackupRequest, ::Hash]
1370
+ # A request object representing the call parameters. Required. To specify no
1371
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1372
+ # @param options [::Gapic::CallOptions, ::Hash]
1373
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1374
+ #
1375
+ # @overload delete_backup(name: nil, request_id: nil)
1376
+ # Pass arguments to `delete_backup` via keyword arguments. Note that at
1377
+ # least one keyword argument is required. To specify no parameters, or to keep all
1378
+ # the default parameter values, pass an empty Hash as a request object (see above).
1379
+ #
1380
+ # @param name [::String]
1381
+ # Required. The relative resource name of the backup to delete, in the
1382
+ # following form:
1383
+ #
1384
+ # `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
1385
+ # @param request_id [::String]
1386
+ # Optional. A request ID. Specify a unique request ID to allow the server to
1387
+ # ignore the request if it has completed. The server will ignore subsequent
1388
+ # requests that provide a duplicate request ID for at least 60 minutes after
1389
+ # the first request.
1390
+ #
1391
+ # For example, if an initial request times out, followed by another request
1392
+ # with the same request ID, the server ignores the second request to prevent
1393
+ # the creation of duplicate commitments.
1394
+ #
1395
+ # The request ID must be a valid
1396
+ # [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
1397
+ # A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
1398
+ # @yield [result, operation] Access the result along with the TransportOperation object
1399
+ # @yieldparam result [::Gapic::Operation]
1400
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1401
+ #
1402
+ # @return [::Gapic::Operation]
1403
+ #
1404
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1405
+ def delete_backup request, options = nil
1406
+ raise ::ArgumentError, "request must be provided" if request.nil?
1407
+
1408
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Metastore::V1beta::DeleteBackupRequest
1409
+
1410
+ # Converts hash and nil to an options object
1411
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1412
+
1413
+ # Customize the options with defaults
1414
+ call_metadata = @config.rpcs.delete_backup.metadata.to_h
1415
+
1416
+ # Set x-goog-api-client and x-goog-user-project headers
1417
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1418
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1419
+ gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION,
1420
+ transports_version_send: [:rest]
1421
+
1422
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1423
+
1424
+ options.apply_defaults timeout: @config.rpcs.delete_backup.timeout,
1425
+ metadata: call_metadata,
1426
+ retry_policy: @config.rpcs.delete_backup.retry_policy
1427
+
1428
+ options.apply_defaults timeout: @config.timeout,
1429
+ metadata: @config.metadata,
1430
+ retry_policy: @config.retry_policy
1431
+
1432
+ @dataproc_metastore_stub.delete_backup request, options do |result, operation|
1433
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1434
+ yield result, operation if block_given?
1435
+ return result
1436
+ end
1437
+ rescue ::Gapic::Rest::Error => e
1438
+ raise ::Google::Cloud::Error.from_error(e)
1439
+ end
1440
+
1441
+ ##
1442
+ # Removes the attached IAM policies for a resource
1443
+ #
1444
+ # @overload remove_iam_policy(request, options = nil)
1445
+ # Pass arguments to `remove_iam_policy` via a request object, either of type
1446
+ # {::Google::Cloud::Metastore::V1beta::RemoveIamPolicyRequest} or an equivalent Hash.
1447
+ #
1448
+ # @param request [::Google::Cloud::Metastore::V1beta::RemoveIamPolicyRequest, ::Hash]
1449
+ # A request object representing the call parameters. Required. To specify no
1450
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1451
+ # @param options [::Gapic::CallOptions, ::Hash]
1452
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1453
+ #
1454
+ # @overload remove_iam_policy(resource: nil, asynchronous: nil)
1455
+ # Pass arguments to `remove_iam_policy` via keyword arguments. Note that at
1456
+ # least one keyword argument is required. To specify no parameters, or to keep all
1457
+ # the default parameter values, pass an empty Hash as a request object (see above).
1458
+ #
1459
+ # @param resource [::String]
1460
+ # Required. The relative resource name of the dataplane resource to remove
1461
+ # IAM policy, in the following form:
1462
+ #
1463
+ # `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}`
1464
+ # or
1465
+ # `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`.
1466
+ # @param asynchronous [::Boolean]
1467
+ # Optional. Removes IAM policy attached to database or table asynchronously
1468
+ # when it is set. The default is false.
1469
+ # @yield [result, operation] Access the result along with the TransportOperation object
1470
+ # @yieldparam result [::Google::Cloud::Metastore::V1beta::RemoveIamPolicyResponse]
1471
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1472
+ #
1473
+ # @return [::Google::Cloud::Metastore::V1beta::RemoveIamPolicyResponse]
1474
+ #
1475
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1476
+ def remove_iam_policy request, options = nil
1477
+ raise ::ArgumentError, "request must be provided" if request.nil?
1478
+
1479
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Metastore::V1beta::RemoveIamPolicyRequest
1480
+
1481
+ # Converts hash and nil to an options object
1482
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1483
+
1484
+ # Customize the options with defaults
1485
+ call_metadata = @config.rpcs.remove_iam_policy.metadata.to_h
1486
+
1487
+ # Set x-goog-api-client and x-goog-user-project headers
1488
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1489
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1490
+ gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION,
1491
+ transports_version_send: [:rest]
1492
+
1493
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1494
+
1495
+ options.apply_defaults timeout: @config.rpcs.remove_iam_policy.timeout,
1496
+ metadata: call_metadata,
1497
+ retry_policy: @config.rpcs.remove_iam_policy.retry_policy
1498
+
1499
+ options.apply_defaults timeout: @config.timeout,
1500
+ metadata: @config.metadata,
1501
+ retry_policy: @config.retry_policy
1502
+
1503
+ @dataproc_metastore_stub.remove_iam_policy request, options do |result, operation|
1504
+ yield result, operation if block_given?
1505
+ return result
1506
+ end
1507
+ rescue ::Gapic::Rest::Error => e
1508
+ raise ::Google::Cloud::Error.from_error(e)
1509
+ end
1510
+
1511
+ ##
1512
+ # Query DPMS metadata.
1513
+ #
1514
+ # @overload query_metadata(request, options = nil)
1515
+ # Pass arguments to `query_metadata` via a request object, either of type
1516
+ # {::Google::Cloud::Metastore::V1beta::QueryMetadataRequest} or an equivalent Hash.
1517
+ #
1518
+ # @param request [::Google::Cloud::Metastore::V1beta::QueryMetadataRequest, ::Hash]
1519
+ # A request object representing the call parameters. Required. To specify no
1520
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1521
+ # @param options [::Gapic::CallOptions, ::Hash]
1522
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1523
+ #
1524
+ # @overload query_metadata(service: nil, query: nil)
1525
+ # Pass arguments to `query_metadata` via keyword arguments. Note that at
1526
+ # least one keyword argument is required. To specify no parameters, or to keep all
1527
+ # the default parameter values, pass an empty Hash as a request object (see above).
1528
+ #
1529
+ # @param service [::String]
1530
+ # Required. The relative resource name of the metastore service to query
1531
+ # metadata, in the following format:
1532
+ #
1533
+ # `projects/{project_id}/locations/{location_id}/services/{service_id}`.
1534
+ # @param query [::String]
1535
+ # Required. A read-only SQL query to execute against the metadata database.
1536
+ # The query cannot change or mutate the data.
1537
+ # @yield [result, operation] Access the result along with the TransportOperation object
1538
+ # @yieldparam result [::Gapic::Operation]
1539
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1540
+ #
1541
+ # @return [::Gapic::Operation]
1542
+ #
1543
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1544
+ def query_metadata request, options = nil
1545
+ raise ::ArgumentError, "request must be provided" if request.nil?
1546
+
1547
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Metastore::V1beta::QueryMetadataRequest
1548
+
1549
+ # Converts hash and nil to an options object
1550
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1551
+
1552
+ # Customize the options with defaults
1553
+ call_metadata = @config.rpcs.query_metadata.metadata.to_h
1554
+
1555
+ # Set x-goog-api-client and x-goog-user-project headers
1556
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1557
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1558
+ gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION,
1559
+ transports_version_send: [:rest]
1560
+
1561
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1562
+
1563
+ options.apply_defaults timeout: @config.rpcs.query_metadata.timeout,
1564
+ metadata: call_metadata,
1565
+ retry_policy: @config.rpcs.query_metadata.retry_policy
1566
+
1567
+ options.apply_defaults timeout: @config.timeout,
1568
+ metadata: @config.metadata,
1569
+ retry_policy: @config.retry_policy
1570
+
1571
+ @dataproc_metastore_stub.query_metadata request, options do |result, operation|
1572
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1573
+ yield result, operation if block_given?
1574
+ return result
1575
+ end
1576
+ rescue ::Gapic::Rest::Error => e
1577
+ raise ::Google::Cloud::Error.from_error(e)
1578
+ end
1579
+
1580
+ ##
1581
+ # Move a table to another database.
1582
+ #
1583
+ # @overload move_table_to_database(request, options = nil)
1584
+ # Pass arguments to `move_table_to_database` via a request object, either of type
1585
+ # {::Google::Cloud::Metastore::V1beta::MoveTableToDatabaseRequest} or an equivalent Hash.
1586
+ #
1587
+ # @param request [::Google::Cloud::Metastore::V1beta::MoveTableToDatabaseRequest, ::Hash]
1588
+ # A request object representing the call parameters. Required. To specify no
1589
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1590
+ # @param options [::Gapic::CallOptions, ::Hash]
1591
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1592
+ #
1593
+ # @overload move_table_to_database(service: nil, table_name: nil, db_name: nil, destination_db_name: nil)
1594
+ # Pass arguments to `move_table_to_database` via keyword arguments. Note that at
1595
+ # least one keyword argument is required. To specify no parameters, or to keep all
1596
+ # the default parameter values, pass an empty Hash as a request object (see above).
1597
+ #
1598
+ # @param service [::String]
1599
+ # Required. The relative resource name of the metastore service to mutate
1600
+ # metadata, in the following format:
1601
+ #
1602
+ # `projects/{project_id}/locations/{location_id}/services/{service_id}`.
1603
+ # @param table_name [::String]
1604
+ # Required. The name of the table to be moved.
1605
+ # @param db_name [::String]
1606
+ # Required. The name of the database where the table resides.
1607
+ # @param destination_db_name [::String]
1608
+ # Required. The name of the database where the table should be moved.
1609
+ # @yield [result, operation] Access the result along with the TransportOperation object
1610
+ # @yieldparam result [::Gapic::Operation]
1611
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1612
+ #
1613
+ # @return [::Gapic::Operation]
1614
+ #
1615
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1616
+ def move_table_to_database request, options = nil
1617
+ raise ::ArgumentError, "request must be provided" if request.nil?
1618
+
1619
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Metastore::V1beta::MoveTableToDatabaseRequest
1620
+
1621
+ # Converts hash and nil to an options object
1622
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1623
+
1624
+ # Customize the options with defaults
1625
+ call_metadata = @config.rpcs.move_table_to_database.metadata.to_h
1626
+
1627
+ # Set x-goog-api-client and x-goog-user-project headers
1628
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1629
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1630
+ gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION,
1631
+ transports_version_send: [:rest]
1632
+
1633
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1634
+
1635
+ options.apply_defaults timeout: @config.rpcs.move_table_to_database.timeout,
1636
+ metadata: call_metadata,
1637
+ retry_policy: @config.rpcs.move_table_to_database.retry_policy
1638
+
1639
+ options.apply_defaults timeout: @config.timeout,
1640
+ metadata: @config.metadata,
1641
+ retry_policy: @config.retry_policy
1642
+
1643
+ @dataproc_metastore_stub.move_table_to_database request, options do |result, operation|
1644
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1645
+ yield result, operation if block_given?
1646
+ return result
1647
+ end
1648
+ rescue ::Gapic::Rest::Error => e
1649
+ raise ::Google::Cloud::Error.from_error(e)
1650
+ end
1651
+
1652
+ ##
1653
+ # Alter metadata resource location. The metadata resource can be a database,
1654
+ # table, or partition. This functionality only updates the parent directory
1655
+ # for the respective metadata resource and does not transfer any existing
1656
+ # data to the new location.
1657
+ #
1658
+ # @overload alter_metadata_resource_location(request, options = nil)
1659
+ # Pass arguments to `alter_metadata_resource_location` via a request object, either of type
1660
+ # {::Google::Cloud::Metastore::V1beta::AlterMetadataResourceLocationRequest} or an equivalent Hash.
1661
+ #
1662
+ # @param request [::Google::Cloud::Metastore::V1beta::AlterMetadataResourceLocationRequest, ::Hash]
1663
+ # A request object representing the call parameters. Required. To specify no
1664
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1665
+ # @param options [::Gapic::CallOptions, ::Hash]
1666
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1667
+ #
1668
+ # @overload alter_metadata_resource_location(service: nil, resource_name: nil, location_uri: nil)
1669
+ # Pass arguments to `alter_metadata_resource_location` via keyword arguments. Note that at
1670
+ # least one keyword argument is required. To specify no parameters, or to keep all
1671
+ # the default parameter values, pass an empty Hash as a request object (see above).
1672
+ #
1673
+ # @param service [::String]
1674
+ # Required. The relative resource name of the metastore service to mutate
1675
+ # metadata, in the following format:
1676
+ #
1677
+ # `projects/{project_id}/locations/{location_id}/services/{service_id}`.
1678
+ # @param resource_name [::String]
1679
+ # Required. The relative metadata resource name in the following format.
1680
+ #
1681
+ # `databases/{database_id}`
1682
+ # or
1683
+ # `databases/{database_id}/tables/{table_id}`
1684
+ # or
1685
+ # `databases/{database_id}/tables/{table_id}/partitions/{partition_id}`
1686
+ # @param location_uri [::String]
1687
+ # Required. The new location URI for the metadata resource.
1688
+ # @yield [result, operation] Access the result along with the TransportOperation object
1689
+ # @yieldparam result [::Gapic::Operation]
1690
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1691
+ #
1692
+ # @return [::Gapic::Operation]
1693
+ #
1694
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1695
+ def alter_metadata_resource_location request, options = nil
1696
+ raise ::ArgumentError, "request must be provided" if request.nil?
1697
+
1698
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Metastore::V1beta::AlterMetadataResourceLocationRequest
1699
+
1700
+ # Converts hash and nil to an options object
1701
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1702
+
1703
+ # Customize the options with defaults
1704
+ call_metadata = @config.rpcs.alter_metadata_resource_location.metadata.to_h
1705
+
1706
+ # Set x-goog-api-client and x-goog-user-project headers
1707
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1708
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1709
+ gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION,
1710
+ transports_version_send: [:rest]
1711
+
1712
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1713
+
1714
+ options.apply_defaults timeout: @config.rpcs.alter_metadata_resource_location.timeout,
1715
+ metadata: call_metadata,
1716
+ retry_policy: @config.rpcs.alter_metadata_resource_location.retry_policy
1717
+
1718
+ options.apply_defaults timeout: @config.timeout,
1719
+ metadata: @config.metadata,
1720
+ retry_policy: @config.retry_policy
1721
+
1722
+ @dataproc_metastore_stub.alter_metadata_resource_location request, options do |result, operation|
1723
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1724
+ yield result, operation if block_given?
1725
+ return result
1726
+ end
1727
+ rescue ::Gapic::Rest::Error => e
1728
+ raise ::Google::Cloud::Error.from_error(e)
1729
+ end
1730
+
1731
+ ##
1732
+ # Configuration class for the DataprocMetastore REST API.
1733
+ #
1734
+ # This class represents the configuration for DataprocMetastore REST,
1735
+ # providing control over timeouts, retry behavior, logging, transport
1736
+ # parameters, and other low-level controls. Certain parameters can also be
1737
+ # applied individually to specific RPCs. See
1738
+ # {::Google::Cloud::Metastore::V1beta::DataprocMetastore::Rest::Client::Configuration::Rpcs}
1739
+ # for a list of RPCs that can be configured independently.
1740
+ #
1741
+ # Configuration can be applied globally to all clients, or to a single client
1742
+ # on construction.
1743
+ #
1744
+ # @example
1745
+ #
1746
+ # # Modify the global config, setting the timeout for
1747
+ # # list_services to 20 seconds,
1748
+ # # and all remaining timeouts to 10 seconds.
1749
+ # ::Google::Cloud::Metastore::V1beta::DataprocMetastore::Rest::Client.configure do |config|
1750
+ # config.timeout = 10.0
1751
+ # config.rpcs.list_services.timeout = 20.0
1752
+ # end
1753
+ #
1754
+ # # Apply the above configuration only to a new client.
1755
+ # client = ::Google::Cloud::Metastore::V1beta::DataprocMetastore::Rest::Client.new do |config|
1756
+ # config.timeout = 10.0
1757
+ # config.rpcs.list_services.timeout = 20.0
1758
+ # end
1759
+ #
1760
+ # @!attribute [rw] endpoint
1761
+ # The hostname or hostname:port of the service endpoint.
1762
+ # Defaults to `"metastore.googleapis.com"`.
1763
+ # @return [::String]
1764
+ # @!attribute [rw] credentials
1765
+ # Credentials to send with calls. You may provide any of the following types:
1766
+ # * (`String`) The path to a service account key file in JSON format
1767
+ # * (`Hash`) A service account key as a Hash
1768
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
1769
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
1770
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
1771
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
1772
+ # * (`nil`) indicating no credentials
1773
+ # @return [::Object]
1774
+ # @!attribute [rw] scope
1775
+ # The OAuth scopes
1776
+ # @return [::Array<::String>]
1777
+ # @!attribute [rw] lib_name
1778
+ # The library name as recorded in instrumentation and logging
1779
+ # @return [::String]
1780
+ # @!attribute [rw] lib_version
1781
+ # The library version as recorded in instrumentation and logging
1782
+ # @return [::String]
1783
+ # @!attribute [rw] timeout
1784
+ # The call timeout in seconds.
1785
+ # @return [::Numeric]
1786
+ # @!attribute [rw] metadata
1787
+ # Additional headers to be sent with the call.
1788
+ # @return [::Hash{::Symbol=>::String}]
1789
+ # @!attribute [rw] retry_policy
1790
+ # The retry policy. The value is a hash with the following keys:
1791
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1792
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1793
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1794
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1795
+ # trigger a retry.
1796
+ # @return [::Hash]
1797
+ # @!attribute [rw] quota_project
1798
+ # A separate project against which to charge quota.
1799
+ # @return [::String]
1800
+ #
1801
+ class Configuration
1802
+ extend ::Gapic::Config
1803
+
1804
+ config_attr :endpoint, "metastore.googleapis.com", ::String
1805
+ config_attr :credentials, nil do |value|
1806
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1807
+ allowed.any? { |klass| klass === value }
1808
+ end
1809
+ config_attr :scope, nil, ::String, ::Array, nil
1810
+ config_attr :lib_name, nil, ::String, nil
1811
+ config_attr :lib_version, nil, ::String, nil
1812
+ config_attr :timeout, nil, ::Numeric, nil
1813
+ config_attr :metadata, nil, ::Hash, nil
1814
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1815
+ config_attr :quota_project, nil, ::String, nil
1816
+
1817
+ # @private
1818
+ # Overrides for http bindings for the RPCs of this service
1819
+ # are only used when this service is used as mixin, and only
1820
+ # by the host service.
1821
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
1822
+ config_attr :bindings_override, {}, ::Hash, nil
1823
+
1824
+ # @private
1825
+ def initialize parent_config = nil
1826
+ @parent_config = parent_config unless parent_config.nil?
1827
+
1828
+ yield self if block_given?
1829
+ end
1830
+
1831
+ ##
1832
+ # Configurations for individual RPCs
1833
+ # @return [Rpcs]
1834
+ #
1835
+ def rpcs
1836
+ @rpcs ||= begin
1837
+ parent_rpcs = nil
1838
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
1839
+ Rpcs.new parent_rpcs
1840
+ end
1841
+ end
1842
+
1843
+ ##
1844
+ # Configuration RPC class for the DataprocMetastore API.
1845
+ #
1846
+ # Includes fields providing the configuration for each RPC in this service.
1847
+ # Each configuration object is of type `Gapic::Config::Method` and includes
1848
+ # the following configuration fields:
1849
+ #
1850
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
1851
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
1852
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
1853
+ # include the following keys:
1854
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1855
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1856
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1857
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1858
+ # trigger a retry.
1859
+ #
1860
+ class Rpcs
1861
+ ##
1862
+ # RPC-specific configuration for `list_services`
1863
+ # @return [::Gapic::Config::Method]
1864
+ #
1865
+ attr_reader :list_services
1866
+ ##
1867
+ # RPC-specific configuration for `get_service`
1868
+ # @return [::Gapic::Config::Method]
1869
+ #
1870
+ attr_reader :get_service
1871
+ ##
1872
+ # RPC-specific configuration for `create_service`
1873
+ # @return [::Gapic::Config::Method]
1874
+ #
1875
+ attr_reader :create_service
1876
+ ##
1877
+ # RPC-specific configuration for `update_service`
1878
+ # @return [::Gapic::Config::Method]
1879
+ #
1880
+ attr_reader :update_service
1881
+ ##
1882
+ # RPC-specific configuration for `delete_service`
1883
+ # @return [::Gapic::Config::Method]
1884
+ #
1885
+ attr_reader :delete_service
1886
+ ##
1887
+ # RPC-specific configuration for `list_metadata_imports`
1888
+ # @return [::Gapic::Config::Method]
1889
+ #
1890
+ attr_reader :list_metadata_imports
1891
+ ##
1892
+ # RPC-specific configuration for `get_metadata_import`
1893
+ # @return [::Gapic::Config::Method]
1894
+ #
1895
+ attr_reader :get_metadata_import
1896
+ ##
1897
+ # RPC-specific configuration for `create_metadata_import`
1898
+ # @return [::Gapic::Config::Method]
1899
+ #
1900
+ attr_reader :create_metadata_import
1901
+ ##
1902
+ # RPC-specific configuration for `update_metadata_import`
1903
+ # @return [::Gapic::Config::Method]
1904
+ #
1905
+ attr_reader :update_metadata_import
1906
+ ##
1907
+ # RPC-specific configuration for `export_metadata`
1908
+ # @return [::Gapic::Config::Method]
1909
+ #
1910
+ attr_reader :export_metadata
1911
+ ##
1912
+ # RPC-specific configuration for `restore_service`
1913
+ # @return [::Gapic::Config::Method]
1914
+ #
1915
+ attr_reader :restore_service
1916
+ ##
1917
+ # RPC-specific configuration for `list_backups`
1918
+ # @return [::Gapic::Config::Method]
1919
+ #
1920
+ attr_reader :list_backups
1921
+ ##
1922
+ # RPC-specific configuration for `get_backup`
1923
+ # @return [::Gapic::Config::Method]
1924
+ #
1925
+ attr_reader :get_backup
1926
+ ##
1927
+ # RPC-specific configuration for `create_backup`
1928
+ # @return [::Gapic::Config::Method]
1929
+ #
1930
+ attr_reader :create_backup
1931
+ ##
1932
+ # RPC-specific configuration for `delete_backup`
1933
+ # @return [::Gapic::Config::Method]
1934
+ #
1935
+ attr_reader :delete_backup
1936
+ ##
1937
+ # RPC-specific configuration for `remove_iam_policy`
1938
+ # @return [::Gapic::Config::Method]
1939
+ #
1940
+ attr_reader :remove_iam_policy
1941
+ ##
1942
+ # RPC-specific configuration for `query_metadata`
1943
+ # @return [::Gapic::Config::Method]
1944
+ #
1945
+ attr_reader :query_metadata
1946
+ ##
1947
+ # RPC-specific configuration for `move_table_to_database`
1948
+ # @return [::Gapic::Config::Method]
1949
+ #
1950
+ attr_reader :move_table_to_database
1951
+ ##
1952
+ # RPC-specific configuration for `alter_metadata_resource_location`
1953
+ # @return [::Gapic::Config::Method]
1954
+ #
1955
+ attr_reader :alter_metadata_resource_location
1956
+
1957
+ # @private
1958
+ def initialize parent_rpcs = nil
1959
+ list_services_config = parent_rpcs.list_services if parent_rpcs.respond_to? :list_services
1960
+ @list_services = ::Gapic::Config::Method.new list_services_config
1961
+ get_service_config = parent_rpcs.get_service if parent_rpcs.respond_to? :get_service
1962
+ @get_service = ::Gapic::Config::Method.new get_service_config
1963
+ create_service_config = parent_rpcs.create_service if parent_rpcs.respond_to? :create_service
1964
+ @create_service = ::Gapic::Config::Method.new create_service_config
1965
+ update_service_config = parent_rpcs.update_service if parent_rpcs.respond_to? :update_service
1966
+ @update_service = ::Gapic::Config::Method.new update_service_config
1967
+ delete_service_config = parent_rpcs.delete_service if parent_rpcs.respond_to? :delete_service
1968
+ @delete_service = ::Gapic::Config::Method.new delete_service_config
1969
+ list_metadata_imports_config = parent_rpcs.list_metadata_imports if parent_rpcs.respond_to? :list_metadata_imports
1970
+ @list_metadata_imports = ::Gapic::Config::Method.new list_metadata_imports_config
1971
+ get_metadata_import_config = parent_rpcs.get_metadata_import if parent_rpcs.respond_to? :get_metadata_import
1972
+ @get_metadata_import = ::Gapic::Config::Method.new get_metadata_import_config
1973
+ create_metadata_import_config = parent_rpcs.create_metadata_import if parent_rpcs.respond_to? :create_metadata_import
1974
+ @create_metadata_import = ::Gapic::Config::Method.new create_metadata_import_config
1975
+ update_metadata_import_config = parent_rpcs.update_metadata_import if parent_rpcs.respond_to? :update_metadata_import
1976
+ @update_metadata_import = ::Gapic::Config::Method.new update_metadata_import_config
1977
+ export_metadata_config = parent_rpcs.export_metadata if parent_rpcs.respond_to? :export_metadata
1978
+ @export_metadata = ::Gapic::Config::Method.new export_metadata_config
1979
+ restore_service_config = parent_rpcs.restore_service if parent_rpcs.respond_to? :restore_service
1980
+ @restore_service = ::Gapic::Config::Method.new restore_service_config
1981
+ list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups
1982
+ @list_backups = ::Gapic::Config::Method.new list_backups_config
1983
+ get_backup_config = parent_rpcs.get_backup if parent_rpcs.respond_to? :get_backup
1984
+ @get_backup = ::Gapic::Config::Method.new get_backup_config
1985
+ create_backup_config = parent_rpcs.create_backup if parent_rpcs.respond_to? :create_backup
1986
+ @create_backup = ::Gapic::Config::Method.new create_backup_config
1987
+ delete_backup_config = parent_rpcs.delete_backup if parent_rpcs.respond_to? :delete_backup
1988
+ @delete_backup = ::Gapic::Config::Method.new delete_backup_config
1989
+ remove_iam_policy_config = parent_rpcs.remove_iam_policy if parent_rpcs.respond_to? :remove_iam_policy
1990
+ @remove_iam_policy = ::Gapic::Config::Method.new remove_iam_policy_config
1991
+ query_metadata_config = parent_rpcs.query_metadata if parent_rpcs.respond_to? :query_metadata
1992
+ @query_metadata = ::Gapic::Config::Method.new query_metadata_config
1993
+ move_table_to_database_config = parent_rpcs.move_table_to_database if parent_rpcs.respond_to? :move_table_to_database
1994
+ @move_table_to_database = ::Gapic::Config::Method.new move_table_to_database_config
1995
+ alter_metadata_resource_location_config = parent_rpcs.alter_metadata_resource_location if parent_rpcs.respond_to? :alter_metadata_resource_location
1996
+ @alter_metadata_resource_location = ::Gapic::Config::Method.new alter_metadata_resource_location_config
1997
+
1998
+ yield self if block_given?
1999
+ end
2000
+ end
2001
+ end
2002
+ end
2003
+ end
2004
+ end
2005
+ end
2006
+ end
2007
+ end
2008
+ end