google-cloud-filestore-v1 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1562 @@
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/filestore/v1/cloud_filestore_service_pb"
21
+ require "google/cloud/filestore/v1/cloud_filestore_manager/rest/service_stub"
22
+
23
+ module Google
24
+ module Cloud
25
+ module Filestore
26
+ module V1
27
+ module CloudFilestoreManager
28
+ module Rest
29
+ ##
30
+ # REST client for the CloudFilestoreManager service.
31
+ #
32
+ # Configures and manages Filestore resources.
33
+ #
34
+ # Filestore Manager v1.
35
+ #
36
+ # The `file.googleapis.com` service implements the Filestore API and
37
+ # defines the following resource model for managing instances:
38
+ # * The service works with a collection of cloud projects, named: `/projects/*`
39
+ # * Each project has a collection of available locations, named: `/locations/*`
40
+ # * Each location has a collection of instances and backups, named:
41
+ # `/instances/*` and `/backups/*` respectively.
42
+ # * As such, Filestore instances are resources of the form:
43
+ # `/projects/{project_number}/locations/{location_id}/instances/{instance_id}`
44
+ # and backups are resources of the form:
45
+ # `/projects/{project_number}/locations/{location_id}/backup/{backup_id}`
46
+ #
47
+ # Note that location_id must be a Google Cloud `zone` for instances, but
48
+ # a Google Cloud `region` for backups; for example:
49
+ # * `projects/12345/locations/us-central1-c/instances/my-filestore`
50
+ # * `projects/12345/locations/us-central1/backups/my-backup`
51
+ #
52
+ class Client
53
+ include Paths
54
+
55
+ # @private
56
+ attr_reader :cloud_filestore_manager_stub
57
+
58
+ ##
59
+ # Configure the CloudFilestoreManager Client class.
60
+ #
61
+ # See {::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client::Configuration}
62
+ # for a description of the configuration fields.
63
+ #
64
+ # @example
65
+ #
66
+ # # Modify the configuration for all CloudFilestoreManager clients
67
+ # ::Google::Cloud::Filestore::V1::CloudFilestoreManager::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", "Filestore", "V1"]
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.rpcs.list_instances.timeout = 60.0
88
+ default_config.rpcs.list_instances.retry_policy = {
89
+ initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14]
90
+ }
91
+
92
+ default_config.rpcs.get_instance.timeout = 60.0
93
+ default_config.rpcs.get_instance.retry_policy = {
94
+ initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14]
95
+ }
96
+
97
+ default_config.rpcs.create_instance.timeout = 60_000.0
98
+
99
+ default_config.rpcs.update_instance.timeout = 14_400.0
100
+
101
+ default_config.rpcs.restore_instance.timeout = 60_000.0
102
+
103
+ default_config.rpcs.delete_instance.timeout = 600.0
104
+
105
+ default_config.rpcs.list_backups.timeout = 60.0
106
+ default_config.rpcs.list_backups.retry_policy = {
107
+ initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14]
108
+ }
109
+
110
+ default_config.rpcs.get_backup.timeout = 60.0
111
+ default_config.rpcs.get_backup.retry_policy = {
112
+ initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14]
113
+ }
114
+
115
+ default_config.rpcs.create_backup.timeout = 60_000.0
116
+
117
+ default_config.rpcs.delete_backup.timeout = 600.0
118
+
119
+ default_config.rpcs.update_backup.timeout = 600.0
120
+
121
+ default_config
122
+ end
123
+ yield @configure if block_given?
124
+ @configure
125
+ end
126
+
127
+ ##
128
+ # Configure the CloudFilestoreManager Client instance.
129
+ #
130
+ # The configuration is set to the derived mode, meaning that values can be changed,
131
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
132
+ # should be made on {Client.configure}.
133
+ #
134
+ # See {::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client::Configuration}
135
+ # for a description of the configuration fields.
136
+ #
137
+ # @yield [config] Configure the Client client.
138
+ # @yieldparam config [Client::Configuration]
139
+ #
140
+ # @return [Client::Configuration]
141
+ #
142
+ def configure
143
+ yield @config if block_given?
144
+ @config
145
+ end
146
+
147
+ ##
148
+ # Create a new CloudFilestoreManager REST client object.
149
+ #
150
+ # @example
151
+ #
152
+ # # Create a client using the default configuration
153
+ # client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new
154
+ #
155
+ # # Create a client using a custom configuration
156
+ # client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new do |config|
157
+ # config.timeout = 10.0
158
+ # end
159
+ #
160
+ # @yield [config] Configure the CloudFilestoreManager client.
161
+ # @yieldparam config [Client::Configuration]
162
+ #
163
+ def initialize
164
+ # Create the configuration object
165
+ @config = Configuration.new Client.configure
166
+
167
+ # Yield the configuration if needed
168
+ yield @config if block_given?
169
+
170
+ # Create credentials
171
+ credentials = @config.credentials
172
+ # Use self-signed JWT if the endpoint is unchanged from default,
173
+ # but only if the default endpoint does not have a region prefix.
174
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
175
+ !@config.endpoint.split(".").first.include?("-")
176
+ credentials ||= Credentials.default scope: @config.scope,
177
+ enable_self_signed_jwt: enable_self_signed_jwt
178
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
179
+ credentials = Credentials.new credentials, scope: @config.scope
180
+ end
181
+
182
+ @quota_project_id = @config.quota_project
183
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
184
+
185
+ @operations_client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Operations.new do |config|
186
+ config.credentials = credentials
187
+ config.quota_project = @quota_project_id
188
+ config.endpoint = @config.endpoint
189
+ end
190
+
191
+ @cloud_filestore_manager_stub = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
192
+ end
193
+
194
+ ##
195
+ # Get the associated client for long-running operations.
196
+ #
197
+ # @return [::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Operations]
198
+ #
199
+ attr_reader :operations_client
200
+
201
+ # Service calls
202
+
203
+ ##
204
+ # Lists all instances in a project for either a specified location
205
+ # or for all locations.
206
+ #
207
+ # @overload list_instances(request, options = nil)
208
+ # Pass arguments to `list_instances` via a request object, either of type
209
+ # {::Google::Cloud::Filestore::V1::ListInstancesRequest} or an equivalent Hash.
210
+ #
211
+ # @param request [::Google::Cloud::Filestore::V1::ListInstancesRequest, ::Hash]
212
+ # A request object representing the call parameters. Required. To specify no
213
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
214
+ # @param options [::Gapic::CallOptions, ::Hash]
215
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
216
+ #
217
+ # @overload list_instances(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil)
218
+ # Pass arguments to `list_instances` via keyword arguments. Note that at
219
+ # least one keyword argument is required. To specify no parameters, or to keep all
220
+ # the default parameter values, pass an empty Hash as a request object (see above).
221
+ #
222
+ # @param parent [::String]
223
+ # Required. The project and location for which to retrieve instance
224
+ # information, in the format `projects/{project_id}/locations/{location}`. In
225
+ # Cloud Filestore, locations map to Google Cloud zones, for example
226
+ # **us-west1-b**. To retrieve instance information for all locations, use "-"
227
+ # for the
228
+ # `{location}` value.
229
+ # @param page_size [::Integer]
230
+ # The maximum number of items to return.
231
+ # @param page_token [::String]
232
+ # The next_page_token value to use if there are additional
233
+ # results to retrieve for this list request.
234
+ # @param order_by [::String]
235
+ # Sort results. Supported values are "name", "name desc" or "" (unsorted).
236
+ # @param filter [::String]
237
+ # List filter.
238
+ # @yield [result, operation] Access the result along with the TransportOperation object
239
+ # @yieldparam result [::Google::Cloud::Filestore::V1::ListInstancesResponse]
240
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
241
+ #
242
+ # @return [::Google::Cloud::Filestore::V1::ListInstancesResponse]
243
+ #
244
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
245
+ def list_instances request, options = nil
246
+ raise ::ArgumentError, "request must be provided" if request.nil?
247
+
248
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::ListInstancesRequest
249
+
250
+ # Converts hash and nil to an options object
251
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
252
+
253
+ # Customize the options with defaults
254
+ call_metadata = @config.rpcs.list_instances.metadata.to_h
255
+
256
+ # Set x-goog-api-client and x-goog-user-project headers
257
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
258
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
259
+ gapic_version: ::Google::Cloud::Filestore::V1::VERSION,
260
+ transports_version_send: [:rest]
261
+
262
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
263
+
264
+ options.apply_defaults timeout: @config.rpcs.list_instances.timeout,
265
+ metadata: call_metadata,
266
+ retry_policy: @config.rpcs.list_instances.retry_policy
267
+
268
+ options.apply_defaults timeout: @config.timeout,
269
+ metadata: @config.metadata,
270
+ retry_policy: @config.retry_policy
271
+
272
+ @cloud_filestore_manager_stub.list_instances request, options do |result, operation|
273
+ yield result, operation if block_given?
274
+ return result
275
+ end
276
+ rescue ::Gapic::Rest::Error => e
277
+ raise ::Google::Cloud::Error.from_error(e)
278
+ end
279
+
280
+ ##
281
+ # Gets the details of a specific instance.
282
+ #
283
+ # @overload get_instance(request, options = nil)
284
+ # Pass arguments to `get_instance` via a request object, either of type
285
+ # {::Google::Cloud::Filestore::V1::GetInstanceRequest} or an equivalent Hash.
286
+ #
287
+ # @param request [::Google::Cloud::Filestore::V1::GetInstanceRequest, ::Hash]
288
+ # A request object representing the call parameters. Required. To specify no
289
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
290
+ # @param options [::Gapic::CallOptions, ::Hash]
291
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
292
+ #
293
+ # @overload get_instance(name: nil)
294
+ # Pass arguments to `get_instance` via keyword arguments. Note that at
295
+ # least one keyword argument is required. To specify no parameters, or to keep all
296
+ # the default parameter values, pass an empty Hash as a request object (see above).
297
+ #
298
+ # @param name [::String]
299
+ # Required. The instance resource name, in the format
300
+ # `projects/{project_id}/locations/{location}/instances/{instance_id}`.
301
+ # @yield [result, operation] Access the result along with the TransportOperation object
302
+ # @yieldparam result [::Google::Cloud::Filestore::V1::Instance]
303
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
304
+ #
305
+ # @return [::Google::Cloud::Filestore::V1::Instance]
306
+ #
307
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
308
+ def get_instance request, options = nil
309
+ raise ::ArgumentError, "request must be provided" if request.nil?
310
+
311
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::GetInstanceRequest
312
+
313
+ # Converts hash and nil to an options object
314
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
315
+
316
+ # Customize the options with defaults
317
+ call_metadata = @config.rpcs.get_instance.metadata.to_h
318
+
319
+ # Set x-goog-api-client and x-goog-user-project headers
320
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
321
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
322
+ gapic_version: ::Google::Cloud::Filestore::V1::VERSION,
323
+ transports_version_send: [:rest]
324
+
325
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
326
+
327
+ options.apply_defaults timeout: @config.rpcs.get_instance.timeout,
328
+ metadata: call_metadata,
329
+ retry_policy: @config.rpcs.get_instance.retry_policy
330
+
331
+ options.apply_defaults timeout: @config.timeout,
332
+ metadata: @config.metadata,
333
+ retry_policy: @config.retry_policy
334
+
335
+ @cloud_filestore_manager_stub.get_instance request, options do |result, operation|
336
+ yield result, operation if block_given?
337
+ return result
338
+ end
339
+ rescue ::Gapic::Rest::Error => e
340
+ raise ::Google::Cloud::Error.from_error(e)
341
+ end
342
+
343
+ ##
344
+ # Creates an instance.
345
+ # When creating from a backup, the capacity of the new instance needs to be
346
+ # equal to or larger than the capacity of the backup (and also equal to or
347
+ # larger than the minimum capacity of the tier).
348
+ #
349
+ # @overload create_instance(request, options = nil)
350
+ # Pass arguments to `create_instance` via a request object, either of type
351
+ # {::Google::Cloud::Filestore::V1::CreateInstanceRequest} or an equivalent Hash.
352
+ #
353
+ # @param request [::Google::Cloud::Filestore::V1::CreateInstanceRequest, ::Hash]
354
+ # A request object representing the call parameters. Required. To specify no
355
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
356
+ # @param options [::Gapic::CallOptions, ::Hash]
357
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
358
+ #
359
+ # @overload create_instance(parent: nil, instance_id: nil, instance: nil)
360
+ # Pass arguments to `create_instance` via keyword arguments. Note that at
361
+ # least one keyword argument is required. To specify no parameters, or to keep all
362
+ # the default parameter values, pass an empty Hash as a request object (see above).
363
+ #
364
+ # @param parent [::String]
365
+ # Required. The instance's project and location, in the format
366
+ # `projects/{project_id}/locations/{location}`. In Filestore,
367
+ # locations map to Google Cloud zones, for example **us-west1-b**.
368
+ # @param instance_id [::String]
369
+ # Required. The name of the instance to create.
370
+ # The name must be unique for the specified project and location.
371
+ # @param instance [::Google::Cloud::Filestore::V1::Instance, ::Hash]
372
+ # Required. An {::Google::Cloud::Filestore::V1::Instance instance resource}
373
+ # @yield [result, operation] Access the result along with the TransportOperation object
374
+ # @yieldparam result [::Gapic::Operation]
375
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
376
+ #
377
+ # @return [::Gapic::Operation]
378
+ #
379
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
380
+ def create_instance request, options = nil
381
+ raise ::ArgumentError, "request must be provided" if request.nil?
382
+
383
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::CreateInstanceRequest
384
+
385
+ # Converts hash and nil to an options object
386
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
387
+
388
+ # Customize the options with defaults
389
+ call_metadata = @config.rpcs.create_instance.metadata.to_h
390
+
391
+ # Set x-goog-api-client and x-goog-user-project headers
392
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
393
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
394
+ gapic_version: ::Google::Cloud::Filestore::V1::VERSION,
395
+ transports_version_send: [:rest]
396
+
397
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
398
+
399
+ options.apply_defaults timeout: @config.rpcs.create_instance.timeout,
400
+ metadata: call_metadata,
401
+ retry_policy: @config.rpcs.create_instance.retry_policy
402
+
403
+ options.apply_defaults timeout: @config.timeout,
404
+ metadata: @config.metadata,
405
+ retry_policy: @config.retry_policy
406
+
407
+ @cloud_filestore_manager_stub.create_instance request, options do |result, operation|
408
+ result = ::Gapic::Operation.new result, @operations_client, options: options
409
+ yield result, operation if block_given?
410
+ return result
411
+ end
412
+ rescue ::Gapic::Rest::Error => e
413
+ raise ::Google::Cloud::Error.from_error(e)
414
+ end
415
+
416
+ ##
417
+ # Updates the settings of a specific instance.
418
+ #
419
+ # @overload update_instance(request, options = nil)
420
+ # Pass arguments to `update_instance` via a request object, either of type
421
+ # {::Google::Cloud::Filestore::V1::UpdateInstanceRequest} or an equivalent Hash.
422
+ #
423
+ # @param request [::Google::Cloud::Filestore::V1::UpdateInstanceRequest, ::Hash]
424
+ # A request object representing the call parameters. Required. To specify no
425
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
426
+ # @param options [::Gapic::CallOptions, ::Hash]
427
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
428
+ #
429
+ # @overload update_instance(update_mask: nil, instance: nil)
430
+ # Pass arguments to `update_instance` via keyword arguments. Note that at
431
+ # least one keyword argument is required. To specify no parameters, or to keep all
432
+ # the default parameter values, pass an empty Hash as a request object (see above).
433
+ #
434
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
435
+ # Mask of fields to update. At least one path must be supplied in this
436
+ # field. The elements of the repeated paths field may only include these
437
+ # fields:
438
+ #
439
+ # * "description"
440
+ # * "file_shares"
441
+ # * "labels"
442
+ # @param instance [::Google::Cloud::Filestore::V1::Instance, ::Hash]
443
+ # Only fields specified in update_mask are updated.
444
+ # @yield [result, operation] Access the result along with the TransportOperation object
445
+ # @yieldparam result [::Gapic::Operation]
446
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
447
+ #
448
+ # @return [::Gapic::Operation]
449
+ #
450
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
451
+ def update_instance request, options = nil
452
+ raise ::ArgumentError, "request must be provided" if request.nil?
453
+
454
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::UpdateInstanceRequest
455
+
456
+ # Converts hash and nil to an options object
457
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
458
+
459
+ # Customize the options with defaults
460
+ call_metadata = @config.rpcs.update_instance.metadata.to_h
461
+
462
+ # Set x-goog-api-client and x-goog-user-project headers
463
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
464
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
465
+ gapic_version: ::Google::Cloud::Filestore::V1::VERSION,
466
+ transports_version_send: [:rest]
467
+
468
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
469
+
470
+ options.apply_defaults timeout: @config.rpcs.update_instance.timeout,
471
+ metadata: call_metadata,
472
+ retry_policy: @config.rpcs.update_instance.retry_policy
473
+
474
+ options.apply_defaults timeout: @config.timeout,
475
+ metadata: @config.metadata,
476
+ retry_policy: @config.retry_policy
477
+
478
+ @cloud_filestore_manager_stub.update_instance request, options do |result, operation|
479
+ result = ::Gapic::Operation.new result, @operations_client, options: options
480
+ yield result, operation if block_given?
481
+ return result
482
+ end
483
+ rescue ::Gapic::Rest::Error => e
484
+ raise ::Google::Cloud::Error.from_error(e)
485
+ end
486
+
487
+ ##
488
+ # Restores an existing instance's file share from a backup.
489
+ #
490
+ # The capacity of the instance needs to be equal to or larger than the
491
+ # capacity of the backup (and also equal to or larger than the minimum
492
+ # capacity of the tier).
493
+ #
494
+ # @overload restore_instance(request, options = nil)
495
+ # Pass arguments to `restore_instance` via a request object, either of type
496
+ # {::Google::Cloud::Filestore::V1::RestoreInstanceRequest} or an equivalent Hash.
497
+ #
498
+ # @param request [::Google::Cloud::Filestore::V1::RestoreInstanceRequest, ::Hash]
499
+ # A request object representing the call parameters. Required. To specify no
500
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
501
+ # @param options [::Gapic::CallOptions, ::Hash]
502
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
503
+ #
504
+ # @overload restore_instance(name: nil, file_share: nil, source_backup: nil)
505
+ # Pass arguments to `restore_instance` via keyword arguments. Note that at
506
+ # least one keyword argument is required. To specify no parameters, or to keep all
507
+ # the default parameter values, pass an empty Hash as a request object (see above).
508
+ #
509
+ # @param name [::String]
510
+ # Required. The resource name of the instance, in the format
511
+ # `projects/{project_number}/locations/{location_id}/instances/{instance_id}`.
512
+ # @param file_share [::String]
513
+ # Required. Name of the file share in the Filestore instance that the backup
514
+ # is being restored to.
515
+ # @param source_backup [::String]
516
+ # The resource name of the backup, in the format
517
+ # `projects/{project_number}/locations/{location_id}/backups/{backup_id}`.
518
+ # @yield [result, operation] Access the result along with the TransportOperation object
519
+ # @yieldparam result [::Gapic::Operation]
520
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
521
+ #
522
+ # @return [::Gapic::Operation]
523
+ #
524
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
525
+ def restore_instance request, options = nil
526
+ raise ::ArgumentError, "request must be provided" if request.nil?
527
+
528
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::RestoreInstanceRequest
529
+
530
+ # Converts hash and nil to an options object
531
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
532
+
533
+ # Customize the options with defaults
534
+ call_metadata = @config.rpcs.restore_instance.metadata.to_h
535
+
536
+ # Set x-goog-api-client and x-goog-user-project headers
537
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
538
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
539
+ gapic_version: ::Google::Cloud::Filestore::V1::VERSION,
540
+ transports_version_send: [:rest]
541
+
542
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
543
+
544
+ options.apply_defaults timeout: @config.rpcs.restore_instance.timeout,
545
+ metadata: call_metadata,
546
+ retry_policy: @config.rpcs.restore_instance.retry_policy
547
+
548
+ options.apply_defaults timeout: @config.timeout,
549
+ metadata: @config.metadata,
550
+ retry_policy: @config.retry_policy
551
+
552
+ @cloud_filestore_manager_stub.restore_instance request, options do |result, operation|
553
+ result = ::Gapic::Operation.new result, @operations_client, options: options
554
+ yield result, operation if block_given?
555
+ return result
556
+ end
557
+ rescue ::Gapic::Rest::Error => e
558
+ raise ::Google::Cloud::Error.from_error(e)
559
+ end
560
+
561
+ ##
562
+ # Deletes an instance.
563
+ #
564
+ # @overload delete_instance(request, options = nil)
565
+ # Pass arguments to `delete_instance` via a request object, either of type
566
+ # {::Google::Cloud::Filestore::V1::DeleteInstanceRequest} or an equivalent Hash.
567
+ #
568
+ # @param request [::Google::Cloud::Filestore::V1::DeleteInstanceRequest, ::Hash]
569
+ # A request object representing the call parameters. Required. To specify no
570
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
571
+ # @param options [::Gapic::CallOptions, ::Hash]
572
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
573
+ #
574
+ # @overload delete_instance(name: nil, force: nil)
575
+ # Pass arguments to `delete_instance` via keyword arguments. Note that at
576
+ # least one keyword argument is required. To specify no parameters, or to keep all
577
+ # the default parameter values, pass an empty Hash as a request object (see above).
578
+ #
579
+ # @param name [::String]
580
+ # Required. The instance resource name, in the format
581
+ # `projects/{project_id}/locations/{location}/instances/{instance_id}`
582
+ # @param force [::Boolean]
583
+ # If set to true, all snapshots of the instance will also be deleted.
584
+ # (Otherwise, the request will only work if the instance has no snapshots.)
585
+ # @yield [result, operation] Access the result along with the TransportOperation object
586
+ # @yieldparam result [::Gapic::Operation]
587
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
588
+ #
589
+ # @return [::Gapic::Operation]
590
+ #
591
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
592
+ def delete_instance request, options = nil
593
+ raise ::ArgumentError, "request must be provided" if request.nil?
594
+
595
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::DeleteInstanceRequest
596
+
597
+ # Converts hash and nil to an options object
598
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
599
+
600
+ # Customize the options with defaults
601
+ call_metadata = @config.rpcs.delete_instance.metadata.to_h
602
+
603
+ # Set x-goog-api-client and x-goog-user-project headers
604
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
605
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
606
+ gapic_version: ::Google::Cloud::Filestore::V1::VERSION,
607
+ transports_version_send: [:rest]
608
+
609
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
610
+
611
+ options.apply_defaults timeout: @config.rpcs.delete_instance.timeout,
612
+ metadata: call_metadata,
613
+ retry_policy: @config.rpcs.delete_instance.retry_policy
614
+
615
+ options.apply_defaults timeout: @config.timeout,
616
+ metadata: @config.metadata,
617
+ retry_policy: @config.retry_policy
618
+
619
+ @cloud_filestore_manager_stub.delete_instance request, options do |result, operation|
620
+ result = ::Gapic::Operation.new result, @operations_client, options: options
621
+ yield result, operation if block_given?
622
+ return result
623
+ end
624
+ rescue ::Gapic::Rest::Error => e
625
+ raise ::Google::Cloud::Error.from_error(e)
626
+ end
627
+
628
+ ##
629
+ # Lists all snapshots in a project for either a specified location
630
+ # or for all locations.
631
+ #
632
+ # @overload list_snapshots(request, options = nil)
633
+ # Pass arguments to `list_snapshots` via a request object, either of type
634
+ # {::Google::Cloud::Filestore::V1::ListSnapshotsRequest} or an equivalent Hash.
635
+ #
636
+ # @param request [::Google::Cloud::Filestore::V1::ListSnapshotsRequest, ::Hash]
637
+ # A request object representing the call parameters. Required. To specify no
638
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
639
+ # @param options [::Gapic::CallOptions, ::Hash]
640
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
641
+ #
642
+ # @overload list_snapshots(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil)
643
+ # Pass arguments to `list_snapshots` via keyword arguments. Note that at
644
+ # least one keyword argument is required. To specify no parameters, or to keep all
645
+ # the default parameter values, pass an empty Hash as a request object (see above).
646
+ #
647
+ # @param parent [::String]
648
+ # Required. The instance for which to retrieve snapshot information,
649
+ # in the format
650
+ # `projects/{project_id}/locations/{location}/instances/{instance_id}`.
651
+ # @param page_size [::Integer]
652
+ # The maximum number of items to return.
653
+ # @param page_token [::String]
654
+ # The next_page_token value to use if there are additional
655
+ # results to retrieve for this list request.
656
+ # @param order_by [::String]
657
+ # Sort results. Supported values are "name", "name desc" or "" (unsorted).
658
+ # @param filter [::String]
659
+ # List filter.
660
+ # @yield [result, operation] Access the result along with the TransportOperation object
661
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Filestore::V1::Snapshot>]
662
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
663
+ #
664
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Filestore::V1::Snapshot>]
665
+ #
666
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
667
+ def list_snapshots request, options = nil
668
+ raise ::ArgumentError, "request must be provided" if request.nil?
669
+
670
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::ListSnapshotsRequest
671
+
672
+ # Converts hash and nil to an options object
673
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
674
+
675
+ # Customize the options with defaults
676
+ call_metadata = @config.rpcs.list_snapshots.metadata.to_h
677
+
678
+ # Set x-goog-api-client and x-goog-user-project headers
679
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
680
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
681
+ gapic_version: ::Google::Cloud::Filestore::V1::VERSION,
682
+ transports_version_send: [:rest]
683
+
684
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
685
+
686
+ options.apply_defaults timeout: @config.rpcs.list_snapshots.timeout,
687
+ metadata: call_metadata,
688
+ retry_policy: @config.rpcs.list_snapshots.retry_policy
689
+
690
+ options.apply_defaults timeout: @config.timeout,
691
+ metadata: @config.metadata,
692
+ retry_policy: @config.retry_policy
693
+
694
+ @cloud_filestore_manager_stub.list_snapshots request, options do |result, operation|
695
+ result = ::Gapic::Rest::PagedEnumerable.new @cloud_filestore_manager_stub, :list_snapshots, "snapshots", request, result, options
696
+ yield result, operation if block_given?
697
+ return result
698
+ end
699
+ rescue ::Gapic::Rest::Error => e
700
+ raise ::Google::Cloud::Error.from_error(e)
701
+ end
702
+
703
+ ##
704
+ # Gets the details of a specific snapshot.
705
+ #
706
+ # @overload get_snapshot(request, options = nil)
707
+ # Pass arguments to `get_snapshot` via a request object, either of type
708
+ # {::Google::Cloud::Filestore::V1::GetSnapshotRequest} or an equivalent Hash.
709
+ #
710
+ # @param request [::Google::Cloud::Filestore::V1::GetSnapshotRequest, ::Hash]
711
+ # A request object representing the call parameters. Required. To specify no
712
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
713
+ # @param options [::Gapic::CallOptions, ::Hash]
714
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
715
+ #
716
+ # @overload get_snapshot(name: nil)
717
+ # Pass arguments to `get_snapshot` via keyword arguments. Note that at
718
+ # least one keyword argument is required. To specify no parameters, or to keep all
719
+ # the default parameter values, pass an empty Hash as a request object (see above).
720
+ #
721
+ # @param name [::String]
722
+ # Required. The snapshot resource name, in the format
723
+ # `projects/{project_id}/locations/{location}/instances/{instance_id}/snapshots/{snapshot_id}`
724
+ # @yield [result, operation] Access the result along with the TransportOperation object
725
+ # @yieldparam result [::Google::Cloud::Filestore::V1::Snapshot]
726
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
727
+ #
728
+ # @return [::Google::Cloud::Filestore::V1::Snapshot]
729
+ #
730
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
731
+ def get_snapshot request, options = nil
732
+ raise ::ArgumentError, "request must be provided" if request.nil?
733
+
734
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::GetSnapshotRequest
735
+
736
+ # Converts hash and nil to an options object
737
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
738
+
739
+ # Customize the options with defaults
740
+ call_metadata = @config.rpcs.get_snapshot.metadata.to_h
741
+
742
+ # Set x-goog-api-client and x-goog-user-project headers
743
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
744
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
745
+ gapic_version: ::Google::Cloud::Filestore::V1::VERSION,
746
+ transports_version_send: [:rest]
747
+
748
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
749
+
750
+ options.apply_defaults timeout: @config.rpcs.get_snapshot.timeout,
751
+ metadata: call_metadata,
752
+ retry_policy: @config.rpcs.get_snapshot.retry_policy
753
+
754
+ options.apply_defaults timeout: @config.timeout,
755
+ metadata: @config.metadata,
756
+ retry_policy: @config.retry_policy
757
+
758
+ @cloud_filestore_manager_stub.get_snapshot request, options do |result, operation|
759
+ yield result, operation if block_given?
760
+ return result
761
+ end
762
+ rescue ::Gapic::Rest::Error => e
763
+ raise ::Google::Cloud::Error.from_error(e)
764
+ end
765
+
766
+ ##
767
+ # Creates a snapshot.
768
+ #
769
+ # @overload create_snapshot(request, options = nil)
770
+ # Pass arguments to `create_snapshot` via a request object, either of type
771
+ # {::Google::Cloud::Filestore::V1::CreateSnapshotRequest} or an equivalent Hash.
772
+ #
773
+ # @param request [::Google::Cloud::Filestore::V1::CreateSnapshotRequest, ::Hash]
774
+ # A request object representing the call parameters. Required. To specify no
775
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
776
+ # @param options [::Gapic::CallOptions, ::Hash]
777
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
778
+ #
779
+ # @overload create_snapshot(parent: nil, snapshot_id: nil, snapshot: nil)
780
+ # Pass arguments to `create_snapshot` via keyword arguments. Note that at
781
+ # least one keyword argument is required. To specify no parameters, or to keep all
782
+ # the default parameter values, pass an empty Hash as a request object (see above).
783
+ #
784
+ # @param parent [::String]
785
+ # Required. The Filestore Instance to create the snapshots of, in the format
786
+ # `projects/{project_id}/locations/{location}/instances/{instance_id}`
787
+ # @param snapshot_id [::String]
788
+ # Required. The ID to use for the snapshot.
789
+ # The ID must be unique within the specified instance.
790
+ #
791
+ # This value must start with a lowercase letter followed by up to 62
792
+ # lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
793
+ # @param snapshot [::Google::Cloud::Filestore::V1::Snapshot, ::Hash]
794
+ # Required. A snapshot resource.
795
+ # @yield [result, operation] Access the result along with the TransportOperation object
796
+ # @yieldparam result [::Gapic::Operation]
797
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
798
+ #
799
+ # @return [::Gapic::Operation]
800
+ #
801
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
802
+ def create_snapshot request, options = nil
803
+ raise ::ArgumentError, "request must be provided" if request.nil?
804
+
805
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::CreateSnapshotRequest
806
+
807
+ # Converts hash and nil to an options object
808
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
809
+
810
+ # Customize the options with defaults
811
+ call_metadata = @config.rpcs.create_snapshot.metadata.to_h
812
+
813
+ # Set x-goog-api-client and x-goog-user-project headers
814
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
815
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
816
+ gapic_version: ::Google::Cloud::Filestore::V1::VERSION,
817
+ transports_version_send: [:rest]
818
+
819
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
820
+
821
+ options.apply_defaults timeout: @config.rpcs.create_snapshot.timeout,
822
+ metadata: call_metadata,
823
+ retry_policy: @config.rpcs.create_snapshot.retry_policy
824
+
825
+ options.apply_defaults timeout: @config.timeout,
826
+ metadata: @config.metadata,
827
+ retry_policy: @config.retry_policy
828
+
829
+ @cloud_filestore_manager_stub.create_snapshot request, options do |result, operation|
830
+ result = ::Gapic::Operation.new result, @operations_client, options: options
831
+ yield result, operation if block_given?
832
+ return result
833
+ end
834
+ rescue ::Gapic::Rest::Error => e
835
+ raise ::Google::Cloud::Error.from_error(e)
836
+ end
837
+
838
+ ##
839
+ # Deletes a snapshot.
840
+ #
841
+ # @overload delete_snapshot(request, options = nil)
842
+ # Pass arguments to `delete_snapshot` via a request object, either of type
843
+ # {::Google::Cloud::Filestore::V1::DeleteSnapshotRequest} or an equivalent Hash.
844
+ #
845
+ # @param request [::Google::Cloud::Filestore::V1::DeleteSnapshotRequest, ::Hash]
846
+ # A request object representing the call parameters. Required. To specify no
847
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
848
+ # @param options [::Gapic::CallOptions, ::Hash]
849
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
850
+ #
851
+ # @overload delete_snapshot(name: nil)
852
+ # Pass arguments to `delete_snapshot` via keyword arguments. Note that at
853
+ # least one keyword argument is required. To specify no parameters, or to keep all
854
+ # the default parameter values, pass an empty Hash as a request object (see above).
855
+ #
856
+ # @param name [::String]
857
+ # Required. The snapshot resource name, in the format
858
+ # `projects/{project_id}/locations/{location}/instances/{instance_id}/snapshots/{snapshot_id}`
859
+ # @yield [result, operation] Access the result along with the TransportOperation object
860
+ # @yieldparam result [::Gapic::Operation]
861
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
862
+ #
863
+ # @return [::Gapic::Operation]
864
+ #
865
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
866
+ def delete_snapshot request, options = nil
867
+ raise ::ArgumentError, "request must be provided" if request.nil?
868
+
869
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::DeleteSnapshotRequest
870
+
871
+ # Converts hash and nil to an options object
872
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
873
+
874
+ # Customize the options with defaults
875
+ call_metadata = @config.rpcs.delete_snapshot.metadata.to_h
876
+
877
+ # Set x-goog-api-client and x-goog-user-project headers
878
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
879
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
880
+ gapic_version: ::Google::Cloud::Filestore::V1::VERSION,
881
+ transports_version_send: [:rest]
882
+
883
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
884
+
885
+ options.apply_defaults timeout: @config.rpcs.delete_snapshot.timeout,
886
+ metadata: call_metadata,
887
+ retry_policy: @config.rpcs.delete_snapshot.retry_policy
888
+
889
+ options.apply_defaults timeout: @config.timeout,
890
+ metadata: @config.metadata,
891
+ retry_policy: @config.retry_policy
892
+
893
+ @cloud_filestore_manager_stub.delete_snapshot request, options do |result, operation|
894
+ result = ::Gapic::Operation.new result, @operations_client, options: options
895
+ yield result, operation if block_given?
896
+ return result
897
+ end
898
+ rescue ::Gapic::Rest::Error => e
899
+ raise ::Google::Cloud::Error.from_error(e)
900
+ end
901
+
902
+ ##
903
+ # Updates the settings of a specific snapshot.
904
+ #
905
+ # @overload update_snapshot(request, options = nil)
906
+ # Pass arguments to `update_snapshot` via a request object, either of type
907
+ # {::Google::Cloud::Filestore::V1::UpdateSnapshotRequest} or an equivalent Hash.
908
+ #
909
+ # @param request [::Google::Cloud::Filestore::V1::UpdateSnapshotRequest, ::Hash]
910
+ # A request object representing the call parameters. Required. To specify no
911
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
912
+ # @param options [::Gapic::CallOptions, ::Hash]
913
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
914
+ #
915
+ # @overload update_snapshot(update_mask: nil, snapshot: nil)
916
+ # Pass arguments to `update_snapshot` via keyword arguments. Note that at
917
+ # least one keyword argument is required. To specify no parameters, or to keep all
918
+ # the default parameter values, pass an empty Hash as a request object (see above).
919
+ #
920
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
921
+ # Required. Mask of fields to update. At least one path must be supplied in
922
+ # this field.
923
+ # @param snapshot [::Google::Cloud::Filestore::V1::Snapshot, ::Hash]
924
+ # Required. A snapshot resource.
925
+ # @yield [result, operation] Access the result along with the TransportOperation object
926
+ # @yieldparam result [::Gapic::Operation]
927
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
928
+ #
929
+ # @return [::Gapic::Operation]
930
+ #
931
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
932
+ def update_snapshot request, options = nil
933
+ raise ::ArgumentError, "request must be provided" if request.nil?
934
+
935
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::UpdateSnapshotRequest
936
+
937
+ # Converts hash and nil to an options object
938
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
939
+
940
+ # Customize the options with defaults
941
+ call_metadata = @config.rpcs.update_snapshot.metadata.to_h
942
+
943
+ # Set x-goog-api-client and x-goog-user-project headers
944
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
945
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
946
+ gapic_version: ::Google::Cloud::Filestore::V1::VERSION,
947
+ transports_version_send: [:rest]
948
+
949
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
950
+
951
+ options.apply_defaults timeout: @config.rpcs.update_snapshot.timeout,
952
+ metadata: call_metadata,
953
+ retry_policy: @config.rpcs.update_snapshot.retry_policy
954
+
955
+ options.apply_defaults timeout: @config.timeout,
956
+ metadata: @config.metadata,
957
+ retry_policy: @config.retry_policy
958
+
959
+ @cloud_filestore_manager_stub.update_snapshot request, options do |result, operation|
960
+ result = ::Gapic::Operation.new result, @operations_client, options: options
961
+ yield result, operation if block_given?
962
+ return result
963
+ end
964
+ rescue ::Gapic::Rest::Error => e
965
+ raise ::Google::Cloud::Error.from_error(e)
966
+ end
967
+
968
+ ##
969
+ # Lists all backups in a project for either a specified location or for all
970
+ # locations.
971
+ #
972
+ # @overload list_backups(request, options = nil)
973
+ # Pass arguments to `list_backups` via a request object, either of type
974
+ # {::Google::Cloud::Filestore::V1::ListBackupsRequest} or an equivalent Hash.
975
+ #
976
+ # @param request [::Google::Cloud::Filestore::V1::ListBackupsRequest, ::Hash]
977
+ # A request object representing the call parameters. Required. To specify no
978
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
979
+ # @param options [::Gapic::CallOptions, ::Hash]
980
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
981
+ #
982
+ # @overload list_backups(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil)
983
+ # Pass arguments to `list_backups` via keyword arguments. Note that at
984
+ # least one keyword argument is required. To specify no parameters, or to keep all
985
+ # the default parameter values, pass an empty Hash as a request object (see above).
986
+ #
987
+ # @param parent [::String]
988
+ # Required. The project and location for which to retrieve backup
989
+ # information, in the format
990
+ # `projects/{project_number}/locations/{location}`. In Filestore, backup
991
+ # locations map to Google Cloud regions, for example **us-west1**. To
992
+ # retrieve backup information for all locations, use "-" for the
993
+ # `{location}` value.
994
+ # @param page_size [::Integer]
995
+ # The maximum number of items to return.
996
+ # @param page_token [::String]
997
+ # The next_page_token value to use if there are additional
998
+ # results to retrieve for this list request.
999
+ # @param order_by [::String]
1000
+ # Sort results. Supported values are "name", "name desc" or "" (unsorted).
1001
+ # @param filter [::String]
1002
+ # List filter.
1003
+ # @yield [result, operation] Access the result along with the TransportOperation object
1004
+ # @yieldparam result [::Google::Cloud::Filestore::V1::ListBackupsResponse]
1005
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1006
+ #
1007
+ # @return [::Google::Cloud::Filestore::V1::ListBackupsResponse]
1008
+ #
1009
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1010
+ def list_backups request, options = nil
1011
+ raise ::ArgumentError, "request must be provided" if request.nil?
1012
+
1013
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::ListBackupsRequest
1014
+
1015
+ # Converts hash and nil to an options object
1016
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1017
+
1018
+ # Customize the options with defaults
1019
+ call_metadata = @config.rpcs.list_backups.metadata.to_h
1020
+
1021
+ # Set x-goog-api-client and x-goog-user-project headers
1022
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1023
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1024
+ gapic_version: ::Google::Cloud::Filestore::V1::VERSION,
1025
+ transports_version_send: [:rest]
1026
+
1027
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1028
+
1029
+ options.apply_defaults timeout: @config.rpcs.list_backups.timeout,
1030
+ metadata: call_metadata,
1031
+ retry_policy: @config.rpcs.list_backups.retry_policy
1032
+
1033
+ options.apply_defaults timeout: @config.timeout,
1034
+ metadata: @config.metadata,
1035
+ retry_policy: @config.retry_policy
1036
+
1037
+ @cloud_filestore_manager_stub.list_backups request, options do |result, operation|
1038
+ yield result, operation if block_given?
1039
+ return result
1040
+ end
1041
+ rescue ::Gapic::Rest::Error => e
1042
+ raise ::Google::Cloud::Error.from_error(e)
1043
+ end
1044
+
1045
+ ##
1046
+ # Gets the details of a specific backup.
1047
+ #
1048
+ # @overload get_backup(request, options = nil)
1049
+ # Pass arguments to `get_backup` via a request object, either of type
1050
+ # {::Google::Cloud::Filestore::V1::GetBackupRequest} or an equivalent Hash.
1051
+ #
1052
+ # @param request [::Google::Cloud::Filestore::V1::GetBackupRequest, ::Hash]
1053
+ # A request object representing the call parameters. Required. To specify no
1054
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1055
+ # @param options [::Gapic::CallOptions, ::Hash]
1056
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1057
+ #
1058
+ # @overload get_backup(name: nil)
1059
+ # Pass arguments to `get_backup` via keyword arguments. Note that at
1060
+ # least one keyword argument is required. To specify no parameters, or to keep all
1061
+ # the default parameter values, pass an empty Hash as a request object (see above).
1062
+ #
1063
+ # @param name [::String]
1064
+ # Required. The backup resource name, in the format
1065
+ # `projects/{project_number}/locations/{location}/backups/{backup_id}`.
1066
+ # @yield [result, operation] Access the result along with the TransportOperation object
1067
+ # @yieldparam result [::Google::Cloud::Filestore::V1::Backup]
1068
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1069
+ #
1070
+ # @return [::Google::Cloud::Filestore::V1::Backup]
1071
+ #
1072
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1073
+ def get_backup request, options = nil
1074
+ raise ::ArgumentError, "request must be provided" if request.nil?
1075
+
1076
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::GetBackupRequest
1077
+
1078
+ # Converts hash and nil to an options object
1079
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1080
+
1081
+ # Customize the options with defaults
1082
+ call_metadata = @config.rpcs.get_backup.metadata.to_h
1083
+
1084
+ # Set x-goog-api-client and x-goog-user-project headers
1085
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1086
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1087
+ gapic_version: ::Google::Cloud::Filestore::V1::VERSION,
1088
+ transports_version_send: [:rest]
1089
+
1090
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1091
+
1092
+ options.apply_defaults timeout: @config.rpcs.get_backup.timeout,
1093
+ metadata: call_metadata,
1094
+ retry_policy: @config.rpcs.get_backup.retry_policy
1095
+
1096
+ options.apply_defaults timeout: @config.timeout,
1097
+ metadata: @config.metadata,
1098
+ retry_policy: @config.retry_policy
1099
+
1100
+ @cloud_filestore_manager_stub.get_backup request, options do |result, operation|
1101
+ yield result, operation if block_given?
1102
+ return result
1103
+ end
1104
+ rescue ::Gapic::Rest::Error => e
1105
+ raise ::Google::Cloud::Error.from_error(e)
1106
+ end
1107
+
1108
+ ##
1109
+ # Creates a backup.
1110
+ #
1111
+ # @overload create_backup(request, options = nil)
1112
+ # Pass arguments to `create_backup` via a request object, either of type
1113
+ # {::Google::Cloud::Filestore::V1::CreateBackupRequest} or an equivalent Hash.
1114
+ #
1115
+ # @param request [::Google::Cloud::Filestore::V1::CreateBackupRequest, ::Hash]
1116
+ # A request object representing the call parameters. Required. To specify no
1117
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1118
+ # @param options [::Gapic::CallOptions, ::Hash]
1119
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1120
+ #
1121
+ # @overload create_backup(parent: nil, backup: nil, backup_id: nil)
1122
+ # Pass arguments to `create_backup` via keyword arguments. Note that at
1123
+ # least one keyword argument is required. To specify no parameters, or to keep all
1124
+ # the default parameter values, pass an empty Hash as a request object (see above).
1125
+ #
1126
+ # @param parent [::String]
1127
+ # Required. The backup's project and location, in the format
1128
+ # `projects/{project_number}/locations/{location}`. In Filestore,
1129
+ # backup locations map to Google Cloud regions, for example **us-west1**.
1130
+ # @param backup [::Google::Cloud::Filestore::V1::Backup, ::Hash]
1131
+ # Required. A {::Google::Cloud::Filestore::V1::Backup backup resource}
1132
+ # @param backup_id [::String]
1133
+ # Required. The ID to use for the backup.
1134
+ # The ID must be unique within the specified project and location.
1135
+ #
1136
+ # This value must start with a lowercase letter followed by up to 62
1137
+ # lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
1138
+ # Values that do not match this pattern will trigger an INVALID_ARGUMENT
1139
+ # error.
1140
+ # @yield [result, operation] Access the result along with the TransportOperation object
1141
+ # @yieldparam result [::Gapic::Operation]
1142
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1143
+ #
1144
+ # @return [::Gapic::Operation]
1145
+ #
1146
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1147
+ def create_backup request, options = nil
1148
+ raise ::ArgumentError, "request must be provided" if request.nil?
1149
+
1150
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::CreateBackupRequest
1151
+
1152
+ # Converts hash and nil to an options object
1153
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1154
+
1155
+ # Customize the options with defaults
1156
+ call_metadata = @config.rpcs.create_backup.metadata.to_h
1157
+
1158
+ # Set x-goog-api-client and x-goog-user-project headers
1159
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1160
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1161
+ gapic_version: ::Google::Cloud::Filestore::V1::VERSION,
1162
+ transports_version_send: [:rest]
1163
+
1164
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1165
+
1166
+ options.apply_defaults timeout: @config.rpcs.create_backup.timeout,
1167
+ metadata: call_metadata,
1168
+ retry_policy: @config.rpcs.create_backup.retry_policy
1169
+
1170
+ options.apply_defaults timeout: @config.timeout,
1171
+ metadata: @config.metadata,
1172
+ retry_policy: @config.retry_policy
1173
+
1174
+ @cloud_filestore_manager_stub.create_backup request, options do |result, operation|
1175
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1176
+ yield result, operation if block_given?
1177
+ return result
1178
+ end
1179
+ rescue ::Gapic::Rest::Error => e
1180
+ raise ::Google::Cloud::Error.from_error(e)
1181
+ end
1182
+
1183
+ ##
1184
+ # Deletes a backup.
1185
+ #
1186
+ # @overload delete_backup(request, options = nil)
1187
+ # Pass arguments to `delete_backup` via a request object, either of type
1188
+ # {::Google::Cloud::Filestore::V1::DeleteBackupRequest} or an equivalent Hash.
1189
+ #
1190
+ # @param request [::Google::Cloud::Filestore::V1::DeleteBackupRequest, ::Hash]
1191
+ # A request object representing the call parameters. Required. To specify no
1192
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1193
+ # @param options [::Gapic::CallOptions, ::Hash]
1194
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1195
+ #
1196
+ # @overload delete_backup(name: nil)
1197
+ # Pass arguments to `delete_backup` via keyword arguments. Note that at
1198
+ # least one keyword argument is required. To specify no parameters, or to keep all
1199
+ # the default parameter values, pass an empty Hash as a request object (see above).
1200
+ #
1201
+ # @param name [::String]
1202
+ # Required. The backup resource name, in the format
1203
+ # `projects/{project_number}/locations/{location}/backups/{backup_id}`
1204
+ # @yield [result, operation] Access the result along with the TransportOperation object
1205
+ # @yieldparam result [::Gapic::Operation]
1206
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1207
+ #
1208
+ # @return [::Gapic::Operation]
1209
+ #
1210
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1211
+ def delete_backup request, options = nil
1212
+ raise ::ArgumentError, "request must be provided" if request.nil?
1213
+
1214
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::DeleteBackupRequest
1215
+
1216
+ # Converts hash and nil to an options object
1217
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1218
+
1219
+ # Customize the options with defaults
1220
+ call_metadata = @config.rpcs.delete_backup.metadata.to_h
1221
+
1222
+ # Set x-goog-api-client and x-goog-user-project headers
1223
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1224
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1225
+ gapic_version: ::Google::Cloud::Filestore::V1::VERSION,
1226
+ transports_version_send: [:rest]
1227
+
1228
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1229
+
1230
+ options.apply_defaults timeout: @config.rpcs.delete_backup.timeout,
1231
+ metadata: call_metadata,
1232
+ retry_policy: @config.rpcs.delete_backup.retry_policy
1233
+
1234
+ options.apply_defaults timeout: @config.timeout,
1235
+ metadata: @config.metadata,
1236
+ retry_policy: @config.retry_policy
1237
+
1238
+ @cloud_filestore_manager_stub.delete_backup request, options do |result, operation|
1239
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1240
+ yield result, operation if block_given?
1241
+ return result
1242
+ end
1243
+ rescue ::Gapic::Rest::Error => e
1244
+ raise ::Google::Cloud::Error.from_error(e)
1245
+ end
1246
+
1247
+ ##
1248
+ # Updates the settings of a specific backup.
1249
+ #
1250
+ # @overload update_backup(request, options = nil)
1251
+ # Pass arguments to `update_backup` via a request object, either of type
1252
+ # {::Google::Cloud::Filestore::V1::UpdateBackupRequest} or an equivalent Hash.
1253
+ #
1254
+ # @param request [::Google::Cloud::Filestore::V1::UpdateBackupRequest, ::Hash]
1255
+ # A request object representing the call parameters. Required. To specify no
1256
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1257
+ # @param options [::Gapic::CallOptions, ::Hash]
1258
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1259
+ #
1260
+ # @overload update_backup(backup: nil, update_mask: nil)
1261
+ # Pass arguments to `update_backup` via keyword arguments. Note that at
1262
+ # least one keyword argument is required. To specify no parameters, or to keep all
1263
+ # the default parameter values, pass an empty Hash as a request object (see above).
1264
+ #
1265
+ # @param backup [::Google::Cloud::Filestore::V1::Backup, ::Hash]
1266
+ # Required. A {::Google::Cloud::Filestore::V1::Backup backup resource}
1267
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1268
+ # Required. Mask of fields to update. At least one path must be supplied in
1269
+ # this field.
1270
+ # @yield [result, operation] Access the result along with the TransportOperation object
1271
+ # @yieldparam result [::Gapic::Operation]
1272
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1273
+ #
1274
+ # @return [::Gapic::Operation]
1275
+ #
1276
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1277
+ def update_backup request, options = nil
1278
+ raise ::ArgumentError, "request must be provided" if request.nil?
1279
+
1280
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::UpdateBackupRequest
1281
+
1282
+ # Converts hash and nil to an options object
1283
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1284
+
1285
+ # Customize the options with defaults
1286
+ call_metadata = @config.rpcs.update_backup.metadata.to_h
1287
+
1288
+ # Set x-goog-api-client and x-goog-user-project headers
1289
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1290
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1291
+ gapic_version: ::Google::Cloud::Filestore::V1::VERSION,
1292
+ transports_version_send: [:rest]
1293
+
1294
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1295
+
1296
+ options.apply_defaults timeout: @config.rpcs.update_backup.timeout,
1297
+ metadata: call_metadata,
1298
+ retry_policy: @config.rpcs.update_backup.retry_policy
1299
+
1300
+ options.apply_defaults timeout: @config.timeout,
1301
+ metadata: @config.metadata,
1302
+ retry_policy: @config.retry_policy
1303
+
1304
+ @cloud_filestore_manager_stub.update_backup request, options do |result, operation|
1305
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1306
+ yield result, operation if block_given?
1307
+ return result
1308
+ end
1309
+ rescue ::Gapic::Rest::Error => e
1310
+ raise ::Google::Cloud::Error.from_error(e)
1311
+ end
1312
+
1313
+ ##
1314
+ # Configuration class for the CloudFilestoreManager REST API.
1315
+ #
1316
+ # This class represents the configuration for CloudFilestoreManager REST,
1317
+ # providing control over timeouts, retry behavior, logging, transport
1318
+ # parameters, and other low-level controls. Certain parameters can also be
1319
+ # applied individually to specific RPCs. See
1320
+ # {::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client::Configuration::Rpcs}
1321
+ # for a list of RPCs that can be configured independently.
1322
+ #
1323
+ # Configuration can be applied globally to all clients, or to a single client
1324
+ # on construction.
1325
+ #
1326
+ # @example
1327
+ #
1328
+ # # Modify the global config, setting the timeout for
1329
+ # # list_instances to 20 seconds,
1330
+ # # and all remaining timeouts to 10 seconds.
1331
+ # ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.configure do |config|
1332
+ # config.timeout = 10.0
1333
+ # config.rpcs.list_instances.timeout = 20.0
1334
+ # end
1335
+ #
1336
+ # # Apply the above configuration only to a new client.
1337
+ # client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new do |config|
1338
+ # config.timeout = 10.0
1339
+ # config.rpcs.list_instances.timeout = 20.0
1340
+ # end
1341
+ #
1342
+ # @!attribute [rw] endpoint
1343
+ # The hostname or hostname:port of the service endpoint.
1344
+ # Defaults to `"file.googleapis.com"`.
1345
+ # @return [::String]
1346
+ # @!attribute [rw] credentials
1347
+ # Credentials to send with calls. You may provide any of the following types:
1348
+ # * (`String`) The path to a service account key file in JSON format
1349
+ # * (`Hash`) A service account key as a Hash
1350
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
1351
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
1352
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
1353
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
1354
+ # * (`nil`) indicating no credentials
1355
+ # @return [::Object]
1356
+ # @!attribute [rw] scope
1357
+ # The OAuth scopes
1358
+ # @return [::Array<::String>]
1359
+ # @!attribute [rw] lib_name
1360
+ # The library name as recorded in instrumentation and logging
1361
+ # @return [::String]
1362
+ # @!attribute [rw] lib_version
1363
+ # The library version as recorded in instrumentation and logging
1364
+ # @return [::String]
1365
+ # @!attribute [rw] timeout
1366
+ # The call timeout in seconds.
1367
+ # @return [::Numeric]
1368
+ # @!attribute [rw] metadata
1369
+ # Additional headers to be sent with the call.
1370
+ # @return [::Hash{::Symbol=>::String}]
1371
+ # @!attribute [rw] retry_policy
1372
+ # The retry policy. The value is a hash with the following keys:
1373
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1374
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1375
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1376
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1377
+ # trigger a retry.
1378
+ # @return [::Hash]
1379
+ # @!attribute [rw] quota_project
1380
+ # A separate project against which to charge quota.
1381
+ # @return [::String]
1382
+ #
1383
+ class Configuration
1384
+ extend ::Gapic::Config
1385
+
1386
+ config_attr :endpoint, "file.googleapis.com", ::String
1387
+ config_attr :credentials, nil do |value|
1388
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1389
+ allowed.any? { |klass| klass === value }
1390
+ end
1391
+ config_attr :scope, nil, ::String, ::Array, nil
1392
+ config_attr :lib_name, nil, ::String, nil
1393
+ config_attr :lib_version, nil, ::String, nil
1394
+ config_attr :timeout, nil, ::Numeric, nil
1395
+ config_attr :metadata, nil, ::Hash, nil
1396
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1397
+ config_attr :quota_project, nil, ::String, nil
1398
+
1399
+ # @private
1400
+ def initialize parent_config = nil
1401
+ @parent_config = parent_config unless parent_config.nil?
1402
+
1403
+ yield self if block_given?
1404
+ end
1405
+
1406
+ ##
1407
+ # Configurations for individual RPCs
1408
+ # @return [Rpcs]
1409
+ #
1410
+ def rpcs
1411
+ @rpcs ||= begin
1412
+ parent_rpcs = nil
1413
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
1414
+ Rpcs.new parent_rpcs
1415
+ end
1416
+ end
1417
+
1418
+ ##
1419
+ # Configuration RPC class for the CloudFilestoreManager API.
1420
+ #
1421
+ # Includes fields providing the configuration for each RPC in this service.
1422
+ # Each configuration object is of type `Gapic::Config::Method` and includes
1423
+ # the following configuration fields:
1424
+ #
1425
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
1426
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
1427
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
1428
+ # include the following keys:
1429
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1430
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1431
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1432
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1433
+ # trigger a retry.
1434
+ #
1435
+ class Rpcs
1436
+ ##
1437
+ # RPC-specific configuration for `list_instances`
1438
+ # @return [::Gapic::Config::Method]
1439
+ #
1440
+ attr_reader :list_instances
1441
+ ##
1442
+ # RPC-specific configuration for `get_instance`
1443
+ # @return [::Gapic::Config::Method]
1444
+ #
1445
+ attr_reader :get_instance
1446
+ ##
1447
+ # RPC-specific configuration for `create_instance`
1448
+ # @return [::Gapic::Config::Method]
1449
+ #
1450
+ attr_reader :create_instance
1451
+ ##
1452
+ # RPC-specific configuration for `update_instance`
1453
+ # @return [::Gapic::Config::Method]
1454
+ #
1455
+ attr_reader :update_instance
1456
+ ##
1457
+ # RPC-specific configuration for `restore_instance`
1458
+ # @return [::Gapic::Config::Method]
1459
+ #
1460
+ attr_reader :restore_instance
1461
+ ##
1462
+ # RPC-specific configuration for `delete_instance`
1463
+ # @return [::Gapic::Config::Method]
1464
+ #
1465
+ attr_reader :delete_instance
1466
+ ##
1467
+ # RPC-specific configuration for `list_snapshots`
1468
+ # @return [::Gapic::Config::Method]
1469
+ #
1470
+ attr_reader :list_snapshots
1471
+ ##
1472
+ # RPC-specific configuration for `get_snapshot`
1473
+ # @return [::Gapic::Config::Method]
1474
+ #
1475
+ attr_reader :get_snapshot
1476
+ ##
1477
+ # RPC-specific configuration for `create_snapshot`
1478
+ # @return [::Gapic::Config::Method]
1479
+ #
1480
+ attr_reader :create_snapshot
1481
+ ##
1482
+ # RPC-specific configuration for `delete_snapshot`
1483
+ # @return [::Gapic::Config::Method]
1484
+ #
1485
+ attr_reader :delete_snapshot
1486
+ ##
1487
+ # RPC-specific configuration for `update_snapshot`
1488
+ # @return [::Gapic::Config::Method]
1489
+ #
1490
+ attr_reader :update_snapshot
1491
+ ##
1492
+ # RPC-specific configuration for `list_backups`
1493
+ # @return [::Gapic::Config::Method]
1494
+ #
1495
+ attr_reader :list_backups
1496
+ ##
1497
+ # RPC-specific configuration for `get_backup`
1498
+ # @return [::Gapic::Config::Method]
1499
+ #
1500
+ attr_reader :get_backup
1501
+ ##
1502
+ # RPC-specific configuration for `create_backup`
1503
+ # @return [::Gapic::Config::Method]
1504
+ #
1505
+ attr_reader :create_backup
1506
+ ##
1507
+ # RPC-specific configuration for `delete_backup`
1508
+ # @return [::Gapic::Config::Method]
1509
+ #
1510
+ attr_reader :delete_backup
1511
+ ##
1512
+ # RPC-specific configuration for `update_backup`
1513
+ # @return [::Gapic::Config::Method]
1514
+ #
1515
+ attr_reader :update_backup
1516
+
1517
+ # @private
1518
+ def initialize parent_rpcs = nil
1519
+ list_instances_config = parent_rpcs.list_instances if parent_rpcs.respond_to? :list_instances
1520
+ @list_instances = ::Gapic::Config::Method.new list_instances_config
1521
+ get_instance_config = parent_rpcs.get_instance if parent_rpcs.respond_to? :get_instance
1522
+ @get_instance = ::Gapic::Config::Method.new get_instance_config
1523
+ create_instance_config = parent_rpcs.create_instance if parent_rpcs.respond_to? :create_instance
1524
+ @create_instance = ::Gapic::Config::Method.new create_instance_config
1525
+ update_instance_config = parent_rpcs.update_instance if parent_rpcs.respond_to? :update_instance
1526
+ @update_instance = ::Gapic::Config::Method.new update_instance_config
1527
+ restore_instance_config = parent_rpcs.restore_instance if parent_rpcs.respond_to? :restore_instance
1528
+ @restore_instance = ::Gapic::Config::Method.new restore_instance_config
1529
+ delete_instance_config = parent_rpcs.delete_instance if parent_rpcs.respond_to? :delete_instance
1530
+ @delete_instance = ::Gapic::Config::Method.new delete_instance_config
1531
+ list_snapshots_config = parent_rpcs.list_snapshots if parent_rpcs.respond_to? :list_snapshots
1532
+ @list_snapshots = ::Gapic::Config::Method.new list_snapshots_config
1533
+ get_snapshot_config = parent_rpcs.get_snapshot if parent_rpcs.respond_to? :get_snapshot
1534
+ @get_snapshot = ::Gapic::Config::Method.new get_snapshot_config
1535
+ create_snapshot_config = parent_rpcs.create_snapshot if parent_rpcs.respond_to? :create_snapshot
1536
+ @create_snapshot = ::Gapic::Config::Method.new create_snapshot_config
1537
+ delete_snapshot_config = parent_rpcs.delete_snapshot if parent_rpcs.respond_to? :delete_snapshot
1538
+ @delete_snapshot = ::Gapic::Config::Method.new delete_snapshot_config
1539
+ update_snapshot_config = parent_rpcs.update_snapshot if parent_rpcs.respond_to? :update_snapshot
1540
+ @update_snapshot = ::Gapic::Config::Method.new update_snapshot_config
1541
+ list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups
1542
+ @list_backups = ::Gapic::Config::Method.new list_backups_config
1543
+ get_backup_config = parent_rpcs.get_backup if parent_rpcs.respond_to? :get_backup
1544
+ @get_backup = ::Gapic::Config::Method.new get_backup_config
1545
+ create_backup_config = parent_rpcs.create_backup if parent_rpcs.respond_to? :create_backup
1546
+ @create_backup = ::Gapic::Config::Method.new create_backup_config
1547
+ delete_backup_config = parent_rpcs.delete_backup if parent_rpcs.respond_to? :delete_backup
1548
+ @delete_backup = ::Gapic::Config::Method.new delete_backup_config
1549
+ update_backup_config = parent_rpcs.update_backup if parent_rpcs.respond_to? :update_backup
1550
+ @update_backup = ::Gapic::Config::Method.new update_backup_config
1551
+
1552
+ yield self if block_given?
1553
+ end
1554
+ end
1555
+ end
1556
+ end
1557
+ end
1558
+ end
1559
+ end
1560
+ end
1561
+ end
1562
+ end