google-cloud-netapp-v1 0.a → 0.2.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 (48) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +149 -0
  4. data/README.md +144 -8
  5. data/lib/google/cloud/netapp/v1/active_directory_pb.rb +56 -0
  6. data/lib/google/cloud/netapp/v1/bindings_override.rb +102 -0
  7. data/lib/google/cloud/netapp/v1/cloud_netapp_service_pb.rb +57 -0
  8. data/lib/google/cloud/netapp/v1/cloud_netapp_service_services_pb.rb +120 -0
  9. data/lib/google/cloud/netapp/v1/common_pb.rb +43 -0
  10. data/lib/google/cloud/netapp/v1/kms_pb.rb +59 -0
  11. data/lib/google/cloud/netapp/v1/netapp/client.rb +4119 -0
  12. data/lib/google/cloud/netapp/v1/netapp/credentials.rb +47 -0
  13. data/lib/google/cloud/netapp/v1/netapp/operations.rb +779 -0
  14. data/lib/google/cloud/netapp/v1/netapp/paths.rb +185 -0
  15. data/lib/google/cloud/netapp/v1/netapp/rest/client.rb +3840 -0
  16. data/lib/google/cloud/netapp/v1/netapp/rest/operations.rb +870 -0
  17. data/lib/google/cloud/netapp/v1/netapp/rest/service_stub.rb +2190 -0
  18. data/lib/google/cloud/netapp/v1/netapp/rest.rb +54 -0
  19. data/lib/google/cloud/netapp/v1/netapp.rb +56 -0
  20. data/lib/google/cloud/netapp/v1/replication_pb.rb +66 -0
  21. data/lib/google/cloud/netapp/v1/rest.rb +38 -0
  22. data/lib/google/cloud/netapp/v1/snapshot_pb.rb +56 -0
  23. data/lib/google/cloud/netapp/v1/storage_pool_pb.rb +57 -0
  24. data/lib/google/cloud/netapp/v1/version.rb +8 -3
  25. data/lib/google/cloud/netapp/v1/volume_pb.rb +72 -0
  26. data/lib/google/cloud/netapp/v1.rb +45 -0
  27. data/lib/google-cloud-netapp-v1.rb +21 -0
  28. data/proto_docs/README.md +4 -0
  29. data/proto_docs/google/api/client.rb +381 -0
  30. data/proto_docs/google/api/field_behavior.rb +85 -0
  31. data/proto_docs/google/api/launch_stage.rb +71 -0
  32. data/proto_docs/google/api/resource.rb +222 -0
  33. data/proto_docs/google/cloud/netapp/v1/active_directory.rb +222 -0
  34. data/proto_docs/google/cloud/netapp/v1/cloud_netapp_service.rb +57 -0
  35. data/proto_docs/google/cloud/netapp/v1/common.rb +50 -0
  36. data/proto_docs/google/cloud/netapp/v1/kms.rb +236 -0
  37. data/proto_docs/google/cloud/netapp/v1/replication.rb +349 -0
  38. data/proto_docs/google/cloud/netapp/v1/snapshot.rb +180 -0
  39. data/proto_docs/google/cloud/netapp/v1/storage_pool.rb +211 -0
  40. data/proto_docs/google/cloud/netapp/v1/volume.rb +542 -0
  41. data/proto_docs/google/longrunning/operations.rb +164 -0
  42. data/proto_docs/google/protobuf/any.rb +144 -0
  43. data/proto_docs/google/protobuf/duration.rb +98 -0
  44. data/proto_docs/google/protobuf/empty.rb +34 -0
  45. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  46. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  47. data/proto_docs/google/rpc/status.rb +48 -0
  48. metadata +225 -13
@@ -0,0 +1,3840 @@
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/netapp/v1/cloud_netapp_service_pb"
21
+ require "google/cloud/netapp/v1/netapp/rest/service_stub"
22
+ require "google/cloud/location/rest"
23
+
24
+ module Google
25
+ module Cloud
26
+ module NetApp
27
+ module V1
28
+ module NetApp
29
+ module Rest
30
+ ##
31
+ # REST client for the NetApp service.
32
+ #
33
+ # NetApp Files Google Cloud Service
34
+ #
35
+ class Client
36
+ include Paths
37
+
38
+ # @private
39
+ attr_reader :net_app_stub
40
+
41
+ ##
42
+ # Configure the NetApp Client class.
43
+ #
44
+ # See {::Google::Cloud::NetApp::V1::NetApp::Rest::Client::Configuration}
45
+ # for a description of the configuration fields.
46
+ #
47
+ # @example
48
+ #
49
+ # # Modify the configuration for all NetApp clients
50
+ # ::Google::Cloud::NetApp::V1::NetApp::Rest::Client.configure do |config|
51
+ # config.timeout = 10.0
52
+ # end
53
+ #
54
+ # @yield [config] Configure the Client client.
55
+ # @yieldparam config [Client::Configuration]
56
+ #
57
+ # @return [Client::Configuration]
58
+ #
59
+ def self.configure
60
+ @configure ||= begin
61
+ namespace = ["Google", "Cloud", "NetApp", "V1"]
62
+ parent_config = while namespace.any?
63
+ parent_name = namespace.join "::"
64
+ parent_const = const_get parent_name
65
+ break parent_const.configure if parent_const.respond_to? :configure
66
+ namespace.pop
67
+ end
68
+ default_config = Client::Configuration.new parent_config
69
+
70
+ default_config.rpcs.list_storage_pools.timeout = 60.0
71
+ default_config.rpcs.list_storage_pools.retry_policy = {
72
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
73
+ }
74
+
75
+ default_config.rpcs.create_storage_pool.timeout = 60.0
76
+
77
+ default_config.rpcs.get_storage_pool.timeout = 60.0
78
+ default_config.rpcs.get_storage_pool.retry_policy = {
79
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
80
+ }
81
+
82
+ default_config.rpcs.update_storage_pool.timeout = 60.0
83
+
84
+ default_config.rpcs.delete_storage_pool.timeout = 60.0
85
+
86
+ default_config.rpcs.list_volumes.timeout = 60.0
87
+ default_config.rpcs.list_volumes.retry_policy = {
88
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
89
+ }
90
+
91
+ default_config.rpcs.get_volume.timeout = 60.0
92
+ default_config.rpcs.get_volume.retry_policy = {
93
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
94
+ }
95
+
96
+ default_config.rpcs.create_volume.timeout = 60.0
97
+
98
+ default_config.rpcs.update_volume.timeout = 60.0
99
+
100
+ default_config.rpcs.delete_volume.timeout = 60.0
101
+
102
+ default_config.rpcs.revert_volume.timeout = 60.0
103
+
104
+ default_config.rpcs.list_snapshots.timeout = 60.0
105
+ default_config.rpcs.list_snapshots.retry_policy = {
106
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
107
+ }
108
+
109
+ default_config.rpcs.get_snapshot.timeout = 60.0
110
+ default_config.rpcs.get_snapshot.retry_policy = {
111
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
112
+ }
113
+
114
+ default_config.rpcs.create_snapshot.timeout = 60.0
115
+
116
+ default_config.rpcs.delete_snapshot.timeout = 60.0
117
+
118
+ default_config.rpcs.update_snapshot.timeout = 60.0
119
+
120
+ default_config.rpcs.list_active_directories.timeout = 60.0
121
+ default_config.rpcs.list_active_directories.retry_policy = {
122
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
123
+ }
124
+
125
+ default_config.rpcs.get_active_directory.timeout = 60.0
126
+ default_config.rpcs.get_active_directory.retry_policy = {
127
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
128
+ }
129
+
130
+ default_config.rpcs.create_active_directory.timeout = 60.0
131
+
132
+ default_config.rpcs.update_active_directory.timeout = 60.0
133
+
134
+ default_config.rpcs.delete_active_directory.timeout = 60.0
135
+
136
+ default_config.rpcs.list_kms_configs.timeout = 60.0
137
+ default_config.rpcs.list_kms_configs.retry_policy = {
138
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
139
+ }
140
+
141
+ default_config.rpcs.create_kms_config.timeout = 60.0
142
+
143
+ default_config.rpcs.get_kms_config.timeout = 60.0
144
+ default_config.rpcs.get_kms_config.retry_policy = {
145
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
146
+ }
147
+
148
+ default_config.rpcs.update_kms_config.timeout = 60.0
149
+
150
+ default_config.rpcs.encrypt_volumes.timeout = 60.0
151
+
152
+ default_config.rpcs.verify_kms_config.timeout = 60.0
153
+
154
+ default_config.rpcs.delete_kms_config.timeout = 60.0
155
+
156
+ default_config.rpcs.list_replications.timeout = 60.0
157
+ default_config.rpcs.list_replications.retry_policy = {
158
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
159
+ }
160
+
161
+ default_config.rpcs.get_replication.timeout = 60.0
162
+ default_config.rpcs.get_replication.retry_policy = {
163
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
164
+ }
165
+
166
+ default_config.rpcs.create_replication.timeout = 60.0
167
+
168
+ default_config.rpcs.delete_replication.timeout = 60.0
169
+
170
+ default_config.rpcs.update_replication.timeout = 60.0
171
+
172
+ default_config.rpcs.stop_replication.timeout = 60.0
173
+
174
+ default_config.rpcs.resume_replication.timeout = 60.0
175
+
176
+ default_config.rpcs.reverse_replication_direction.timeout = 60.0
177
+
178
+ default_config
179
+ end
180
+ yield @configure if block_given?
181
+ @configure
182
+ end
183
+
184
+ ##
185
+ # Configure the NetApp Client instance.
186
+ #
187
+ # The configuration is set to the derived mode, meaning that values can be changed,
188
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
189
+ # should be made on {Client.configure}.
190
+ #
191
+ # See {::Google::Cloud::NetApp::V1::NetApp::Rest::Client::Configuration}
192
+ # for a description of the configuration fields.
193
+ #
194
+ # @yield [config] Configure the Client client.
195
+ # @yieldparam config [Client::Configuration]
196
+ #
197
+ # @return [Client::Configuration]
198
+ #
199
+ def configure
200
+ yield @config if block_given?
201
+ @config
202
+ end
203
+
204
+ ##
205
+ # Create a new NetApp REST client object.
206
+ #
207
+ # @example
208
+ #
209
+ # # Create a client using the default configuration
210
+ # client = ::Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
211
+ #
212
+ # # Create a client using a custom configuration
213
+ # client = ::Google::Cloud::NetApp::V1::NetApp::Rest::Client.new do |config|
214
+ # config.timeout = 10.0
215
+ # end
216
+ #
217
+ # @yield [config] Configure the NetApp client.
218
+ # @yieldparam config [Client::Configuration]
219
+ #
220
+ def initialize
221
+ # Create the configuration object
222
+ @config = Configuration.new Client.configure
223
+
224
+ # Yield the configuration if needed
225
+ yield @config if block_given?
226
+
227
+ # Create credentials
228
+ credentials = @config.credentials
229
+ # Use self-signed JWT if the endpoint is unchanged from default,
230
+ # but only if the default endpoint does not have a region prefix.
231
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
232
+ !@config.endpoint.split(".").first.include?("-")
233
+ credentials ||= Credentials.default scope: @config.scope,
234
+ enable_self_signed_jwt: enable_self_signed_jwt
235
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
236
+ credentials = Credentials.new credentials, scope: @config.scope
237
+ end
238
+
239
+ @quota_project_id = @config.quota_project
240
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
241
+
242
+ @operations_client = ::Google::Cloud::NetApp::V1::NetApp::Rest::Operations.new do |config|
243
+ config.credentials = credentials
244
+ config.quota_project = @quota_project_id
245
+ config.endpoint = @config.endpoint
246
+ end
247
+
248
+ @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
249
+ config.credentials = credentials
250
+ config.quota_project = @quota_project_id
251
+ config.endpoint = @config.endpoint
252
+ config.bindings_override = @config.bindings_override
253
+ end
254
+
255
+ @net_app_stub = ::Google::Cloud::NetApp::V1::NetApp::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
256
+ end
257
+
258
+ ##
259
+ # Get the associated client for long-running operations.
260
+ #
261
+ # @return [::Google::Cloud::NetApp::V1::NetApp::Rest::Operations]
262
+ #
263
+ attr_reader :operations_client
264
+
265
+ ##
266
+ # Get the associated client for mix-in of the Locations.
267
+ #
268
+ # @return [Google::Cloud::Location::Locations::Rest::Client]
269
+ #
270
+ attr_reader :location_client
271
+
272
+ # Service calls
273
+
274
+ ##
275
+ # Returns descriptions of all storage pools owned by the caller.
276
+ #
277
+ # @overload list_storage_pools(request, options = nil)
278
+ # Pass arguments to `list_storage_pools` via a request object, either of type
279
+ # {::Google::Cloud::NetApp::V1::ListStoragePoolsRequest} or an equivalent Hash.
280
+ #
281
+ # @param request [::Google::Cloud::NetApp::V1::ListStoragePoolsRequest, ::Hash]
282
+ # A request object representing the call parameters. Required. To specify no
283
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
284
+ # @param options [::Gapic::CallOptions, ::Hash]
285
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
286
+ #
287
+ # @overload list_storage_pools(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil)
288
+ # Pass arguments to `list_storage_pools` via keyword arguments. Note that at
289
+ # least one keyword argument is required. To specify no parameters, or to keep all
290
+ # the default parameter values, pass an empty Hash as a request object (see above).
291
+ #
292
+ # @param parent [::String]
293
+ # Required. Parent value
294
+ # @param page_size [::Integer]
295
+ # The maximum number of items to return.
296
+ # @param page_token [::String]
297
+ # The next_page_token value to use if there are additional
298
+ # results to retrieve for this list request.
299
+ # @param order_by [::String]
300
+ # Sort results. Supported values are "name", "name desc" or "" (unsorted).
301
+ # @param filter [::String]
302
+ # List filter.
303
+ # @yield [result, operation] Access the result along with the TransportOperation object
304
+ # @yieldparam result [::Google::Cloud::NetApp::V1::ListStoragePoolsResponse]
305
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
306
+ #
307
+ # @return [::Google::Cloud::NetApp::V1::ListStoragePoolsResponse]
308
+ #
309
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
310
+ #
311
+ # @example Basic example
312
+ # require "google/cloud/netapp/v1"
313
+ #
314
+ # # Create a client object. The client can be reused for multiple calls.
315
+ # client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
316
+ #
317
+ # # Create a request. To set request fields, pass in keyword arguments.
318
+ # request = Google::Cloud::NetApp::V1::ListStoragePoolsRequest.new
319
+ #
320
+ # # Call the list_storage_pools method.
321
+ # result = client.list_storage_pools request
322
+ #
323
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
324
+ # # over elements, and API calls will be issued to fetch pages as needed.
325
+ # result.each do |item|
326
+ # # Each element is of type ::Google::Cloud::NetApp::V1::StoragePool.
327
+ # p item
328
+ # end
329
+ #
330
+ def list_storage_pools request, options = nil
331
+ raise ::ArgumentError, "request must be provided" if request.nil?
332
+
333
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::ListStoragePoolsRequest
334
+
335
+ # Converts hash and nil to an options object
336
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
337
+
338
+ # Customize the options with defaults
339
+ call_metadata = @config.rpcs.list_storage_pools.metadata.to_h
340
+
341
+ # Set x-goog-api-client and x-goog-user-project headers
342
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
343
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
344
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
345
+ transports_version_send: [:rest]
346
+
347
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
348
+
349
+ options.apply_defaults timeout: @config.rpcs.list_storage_pools.timeout,
350
+ metadata: call_metadata,
351
+ retry_policy: @config.rpcs.list_storage_pools.retry_policy
352
+
353
+ options.apply_defaults timeout: @config.timeout,
354
+ metadata: @config.metadata,
355
+ retry_policy: @config.retry_policy
356
+
357
+ @net_app_stub.list_storage_pools request, options do |result, operation|
358
+ yield result, operation if block_given?
359
+ return result
360
+ end
361
+ rescue ::Gapic::Rest::Error => e
362
+ raise ::Google::Cloud::Error.from_error(e)
363
+ end
364
+
365
+ ##
366
+ # Creates a new storage pool.
367
+ #
368
+ # @overload create_storage_pool(request, options = nil)
369
+ # Pass arguments to `create_storage_pool` via a request object, either of type
370
+ # {::Google::Cloud::NetApp::V1::CreateStoragePoolRequest} or an equivalent Hash.
371
+ #
372
+ # @param request [::Google::Cloud::NetApp::V1::CreateStoragePoolRequest, ::Hash]
373
+ # A request object representing the call parameters. Required. To specify no
374
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
375
+ # @param options [::Gapic::CallOptions, ::Hash]
376
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
377
+ #
378
+ # @overload create_storage_pool(parent: nil, storage_pool_id: nil, storage_pool: nil)
379
+ # Pass arguments to `create_storage_pool` via keyword arguments. Note that at
380
+ # least one keyword argument is required. To specify no parameters, or to keep all
381
+ # the default parameter values, pass an empty Hash as a request object (see above).
382
+ #
383
+ # @param parent [::String]
384
+ # Required. Value for parent.
385
+ # @param storage_pool_id [::String]
386
+ # Required. Id of the requesting storage pool
387
+ # If auto-generating Id server-side, remove this field and
388
+ # id from the method_signature of Create RPC
389
+ # @param storage_pool [::Google::Cloud::NetApp::V1::StoragePool, ::Hash]
390
+ # Required. The required parameters to create a new storage pool.
391
+ # @yield [result, operation] Access the result along with the TransportOperation object
392
+ # @yieldparam result [::Gapic::Operation]
393
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
394
+ #
395
+ # @return [::Gapic::Operation]
396
+ #
397
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
398
+ #
399
+ # @example Basic example
400
+ # require "google/cloud/netapp/v1"
401
+ #
402
+ # # Create a client object. The client can be reused for multiple calls.
403
+ # client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
404
+ #
405
+ # # Create a request. To set request fields, pass in keyword arguments.
406
+ # request = Google::Cloud::NetApp::V1::CreateStoragePoolRequest.new
407
+ #
408
+ # # Call the create_storage_pool method.
409
+ # result = client.create_storage_pool request
410
+ #
411
+ # # The returned object is of type Gapic::Operation. You can use it to
412
+ # # check the status of an operation, cancel it, or wait for results.
413
+ # # Here is how to wait for a response.
414
+ # result.wait_until_done! timeout: 60
415
+ # if result.response?
416
+ # p result.response
417
+ # else
418
+ # puts "No response received."
419
+ # end
420
+ #
421
+ def create_storage_pool request, options = nil
422
+ raise ::ArgumentError, "request must be provided" if request.nil?
423
+
424
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::CreateStoragePoolRequest
425
+
426
+ # Converts hash and nil to an options object
427
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
428
+
429
+ # Customize the options with defaults
430
+ call_metadata = @config.rpcs.create_storage_pool.metadata.to_h
431
+
432
+ # Set x-goog-api-client and x-goog-user-project headers
433
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
434
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
435
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
436
+ transports_version_send: [:rest]
437
+
438
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
439
+
440
+ options.apply_defaults timeout: @config.rpcs.create_storage_pool.timeout,
441
+ metadata: call_metadata,
442
+ retry_policy: @config.rpcs.create_storage_pool.retry_policy
443
+
444
+ options.apply_defaults timeout: @config.timeout,
445
+ metadata: @config.metadata,
446
+ retry_policy: @config.retry_policy
447
+
448
+ @net_app_stub.create_storage_pool request, options do |result, operation|
449
+ result = ::Gapic::Operation.new result, @operations_client, options: options
450
+ yield result, operation if block_given?
451
+ return result
452
+ end
453
+ rescue ::Gapic::Rest::Error => e
454
+ raise ::Google::Cloud::Error.from_error(e)
455
+ end
456
+
457
+ ##
458
+ # Returns the description of the specified storage pool by poolId.
459
+ #
460
+ # @overload get_storage_pool(request, options = nil)
461
+ # Pass arguments to `get_storage_pool` via a request object, either of type
462
+ # {::Google::Cloud::NetApp::V1::GetStoragePoolRequest} or an equivalent Hash.
463
+ #
464
+ # @param request [::Google::Cloud::NetApp::V1::GetStoragePoolRequest, ::Hash]
465
+ # A request object representing the call parameters. Required. To specify no
466
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
467
+ # @param options [::Gapic::CallOptions, ::Hash]
468
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
469
+ #
470
+ # @overload get_storage_pool(name: nil)
471
+ # Pass arguments to `get_storage_pool` via keyword arguments. Note that at
472
+ # least one keyword argument is required. To specify no parameters, or to keep all
473
+ # the default parameter values, pass an empty Hash as a request object (see above).
474
+ #
475
+ # @param name [::String]
476
+ # Required. Name of the storage pool
477
+ # @yield [result, operation] Access the result along with the TransportOperation object
478
+ # @yieldparam result [::Google::Cloud::NetApp::V1::StoragePool]
479
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
480
+ #
481
+ # @return [::Google::Cloud::NetApp::V1::StoragePool]
482
+ #
483
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
484
+ #
485
+ # @example Basic example
486
+ # require "google/cloud/netapp/v1"
487
+ #
488
+ # # Create a client object. The client can be reused for multiple calls.
489
+ # client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
490
+ #
491
+ # # Create a request. To set request fields, pass in keyword arguments.
492
+ # request = Google::Cloud::NetApp::V1::GetStoragePoolRequest.new
493
+ #
494
+ # # Call the get_storage_pool method.
495
+ # result = client.get_storage_pool request
496
+ #
497
+ # # The returned object is of type Google::Cloud::NetApp::V1::StoragePool.
498
+ # p result
499
+ #
500
+ def get_storage_pool request, options = nil
501
+ raise ::ArgumentError, "request must be provided" if request.nil?
502
+
503
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::GetStoragePoolRequest
504
+
505
+ # Converts hash and nil to an options object
506
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
507
+
508
+ # Customize the options with defaults
509
+ call_metadata = @config.rpcs.get_storage_pool.metadata.to_h
510
+
511
+ # Set x-goog-api-client and x-goog-user-project headers
512
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
513
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
514
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
515
+ transports_version_send: [:rest]
516
+
517
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
518
+
519
+ options.apply_defaults timeout: @config.rpcs.get_storage_pool.timeout,
520
+ metadata: call_metadata,
521
+ retry_policy: @config.rpcs.get_storage_pool.retry_policy
522
+
523
+ options.apply_defaults timeout: @config.timeout,
524
+ metadata: @config.metadata,
525
+ retry_policy: @config.retry_policy
526
+
527
+ @net_app_stub.get_storage_pool request, options do |result, operation|
528
+ yield result, operation if block_given?
529
+ return result
530
+ end
531
+ rescue ::Gapic::Rest::Error => e
532
+ raise ::Google::Cloud::Error.from_error(e)
533
+ end
534
+
535
+ ##
536
+ # Updates the storage pool properties with the full spec
537
+ #
538
+ # @overload update_storage_pool(request, options = nil)
539
+ # Pass arguments to `update_storage_pool` via a request object, either of type
540
+ # {::Google::Cloud::NetApp::V1::UpdateStoragePoolRequest} or an equivalent Hash.
541
+ #
542
+ # @param request [::Google::Cloud::NetApp::V1::UpdateStoragePoolRequest, ::Hash]
543
+ # A request object representing the call parameters. Required. To specify no
544
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
545
+ # @param options [::Gapic::CallOptions, ::Hash]
546
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
547
+ #
548
+ # @overload update_storage_pool(update_mask: nil, storage_pool: nil)
549
+ # Pass arguments to `update_storage_pool` via keyword arguments. Note that at
550
+ # least one keyword argument is required. To specify no parameters, or to keep all
551
+ # the default parameter values, pass an empty Hash as a request object (see above).
552
+ #
553
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
554
+ # Required. Field mask is used to specify the fields to be overwritten in the
555
+ # StoragePool resource by the update.
556
+ # The fields specified in the update_mask are relative to the resource, not
557
+ # the full request. A field will be overwritten if it is in the mask. If the
558
+ # user does not provide a mask then all fields will be overwritten.
559
+ # @param storage_pool [::Google::Cloud::NetApp::V1::StoragePool, ::Hash]
560
+ # Required. The pool being updated
561
+ # @yield [result, operation] Access the result along with the TransportOperation object
562
+ # @yieldparam result [::Gapic::Operation]
563
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
564
+ #
565
+ # @return [::Gapic::Operation]
566
+ #
567
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
568
+ #
569
+ # @example Basic example
570
+ # require "google/cloud/netapp/v1"
571
+ #
572
+ # # Create a client object. The client can be reused for multiple calls.
573
+ # client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
574
+ #
575
+ # # Create a request. To set request fields, pass in keyword arguments.
576
+ # request = Google::Cloud::NetApp::V1::UpdateStoragePoolRequest.new
577
+ #
578
+ # # Call the update_storage_pool method.
579
+ # result = client.update_storage_pool request
580
+ #
581
+ # # The returned object is of type Gapic::Operation. You can use it to
582
+ # # check the status of an operation, cancel it, or wait for results.
583
+ # # Here is how to wait for a response.
584
+ # result.wait_until_done! timeout: 60
585
+ # if result.response?
586
+ # p result.response
587
+ # else
588
+ # puts "No response received."
589
+ # end
590
+ #
591
+ def update_storage_pool request, options = nil
592
+ raise ::ArgumentError, "request must be provided" if request.nil?
593
+
594
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::UpdateStoragePoolRequest
595
+
596
+ # Converts hash and nil to an options object
597
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
598
+
599
+ # Customize the options with defaults
600
+ call_metadata = @config.rpcs.update_storage_pool.metadata.to_h
601
+
602
+ # Set x-goog-api-client and x-goog-user-project headers
603
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
604
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
605
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
606
+ transports_version_send: [:rest]
607
+
608
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
609
+
610
+ options.apply_defaults timeout: @config.rpcs.update_storage_pool.timeout,
611
+ metadata: call_metadata,
612
+ retry_policy: @config.rpcs.update_storage_pool.retry_policy
613
+
614
+ options.apply_defaults timeout: @config.timeout,
615
+ metadata: @config.metadata,
616
+ retry_policy: @config.retry_policy
617
+
618
+ @net_app_stub.update_storage_pool request, options do |result, operation|
619
+ result = ::Gapic::Operation.new result, @operations_client, options: options
620
+ yield result, operation if block_given?
621
+ return result
622
+ end
623
+ rescue ::Gapic::Rest::Error => e
624
+ raise ::Google::Cloud::Error.from_error(e)
625
+ end
626
+
627
+ ##
628
+ # Warning! This operation will permanently delete the storage pool.
629
+ #
630
+ # @overload delete_storage_pool(request, options = nil)
631
+ # Pass arguments to `delete_storage_pool` via a request object, either of type
632
+ # {::Google::Cloud::NetApp::V1::DeleteStoragePoolRequest} or an equivalent Hash.
633
+ #
634
+ # @param request [::Google::Cloud::NetApp::V1::DeleteStoragePoolRequest, ::Hash]
635
+ # A request object representing the call parameters. Required. To specify no
636
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
637
+ # @param options [::Gapic::CallOptions, ::Hash]
638
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
639
+ #
640
+ # @overload delete_storage_pool(name: nil)
641
+ # Pass arguments to `delete_storage_pool` via keyword arguments. Note that at
642
+ # least one keyword argument is required. To specify no parameters, or to keep all
643
+ # the default parameter values, pass an empty Hash as a request object (see above).
644
+ #
645
+ # @param name [::String]
646
+ # Required. Name of the storage pool
647
+ # @yield [result, operation] Access the result along with the TransportOperation object
648
+ # @yieldparam result [::Gapic::Operation]
649
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
650
+ #
651
+ # @return [::Gapic::Operation]
652
+ #
653
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
654
+ #
655
+ # @example Basic example
656
+ # require "google/cloud/netapp/v1"
657
+ #
658
+ # # Create a client object. The client can be reused for multiple calls.
659
+ # client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
660
+ #
661
+ # # Create a request. To set request fields, pass in keyword arguments.
662
+ # request = Google::Cloud::NetApp::V1::DeleteStoragePoolRequest.new
663
+ #
664
+ # # Call the delete_storage_pool method.
665
+ # result = client.delete_storage_pool request
666
+ #
667
+ # # The returned object is of type Gapic::Operation. You can use it to
668
+ # # check the status of an operation, cancel it, or wait for results.
669
+ # # Here is how to wait for a response.
670
+ # result.wait_until_done! timeout: 60
671
+ # if result.response?
672
+ # p result.response
673
+ # else
674
+ # puts "No response received."
675
+ # end
676
+ #
677
+ def delete_storage_pool request, options = nil
678
+ raise ::ArgumentError, "request must be provided" if request.nil?
679
+
680
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::DeleteStoragePoolRequest
681
+
682
+ # Converts hash and nil to an options object
683
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
684
+
685
+ # Customize the options with defaults
686
+ call_metadata = @config.rpcs.delete_storage_pool.metadata.to_h
687
+
688
+ # Set x-goog-api-client and x-goog-user-project headers
689
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
690
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
691
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
692
+ transports_version_send: [:rest]
693
+
694
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
695
+
696
+ options.apply_defaults timeout: @config.rpcs.delete_storage_pool.timeout,
697
+ metadata: call_metadata,
698
+ retry_policy: @config.rpcs.delete_storage_pool.retry_policy
699
+
700
+ options.apply_defaults timeout: @config.timeout,
701
+ metadata: @config.metadata,
702
+ retry_policy: @config.retry_policy
703
+
704
+ @net_app_stub.delete_storage_pool request, options do |result, operation|
705
+ result = ::Gapic::Operation.new result, @operations_client, options: options
706
+ yield result, operation if block_given?
707
+ return result
708
+ end
709
+ rescue ::Gapic::Rest::Error => e
710
+ raise ::Google::Cloud::Error.from_error(e)
711
+ end
712
+
713
+ ##
714
+ # Lists Volumes in a given project.
715
+ #
716
+ # @overload list_volumes(request, options = nil)
717
+ # Pass arguments to `list_volumes` via a request object, either of type
718
+ # {::Google::Cloud::NetApp::V1::ListVolumesRequest} or an equivalent Hash.
719
+ #
720
+ # @param request [::Google::Cloud::NetApp::V1::ListVolumesRequest, ::Hash]
721
+ # A request object representing the call parameters. Required. To specify no
722
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
723
+ # @param options [::Gapic::CallOptions, ::Hash]
724
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
725
+ #
726
+ # @overload list_volumes(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
727
+ # Pass arguments to `list_volumes` via keyword arguments. Note that at
728
+ # least one keyword argument is required. To specify no parameters, or to keep all
729
+ # the default parameter values, pass an empty Hash as a request object (see above).
730
+ #
731
+ # @param parent [::String]
732
+ # Required. Parent value for ListVolumesRequest
733
+ # @param page_size [::Integer]
734
+ # Requested page size. Server may return fewer items than requested.
735
+ # If unspecified, the server will pick an appropriate default.
736
+ # @param page_token [::String]
737
+ # A token identifying a page of results the server should return.
738
+ # @param filter [::String]
739
+ # Filtering results
740
+ # @param order_by [::String]
741
+ # Hint for how to order the results
742
+ # @yield [result, operation] Access the result along with the TransportOperation object
743
+ # @yieldparam result [::Google::Cloud::NetApp::V1::ListVolumesResponse]
744
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
745
+ #
746
+ # @return [::Google::Cloud::NetApp::V1::ListVolumesResponse]
747
+ #
748
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
749
+ #
750
+ # @example Basic example
751
+ # require "google/cloud/netapp/v1"
752
+ #
753
+ # # Create a client object. The client can be reused for multiple calls.
754
+ # client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
755
+ #
756
+ # # Create a request. To set request fields, pass in keyword arguments.
757
+ # request = Google::Cloud::NetApp::V1::ListVolumesRequest.new
758
+ #
759
+ # # Call the list_volumes method.
760
+ # result = client.list_volumes request
761
+ #
762
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
763
+ # # over elements, and API calls will be issued to fetch pages as needed.
764
+ # result.each do |item|
765
+ # # Each element is of type ::Google::Cloud::NetApp::V1::Volume.
766
+ # p item
767
+ # end
768
+ #
769
+ def list_volumes request, options = nil
770
+ raise ::ArgumentError, "request must be provided" if request.nil?
771
+
772
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::ListVolumesRequest
773
+
774
+ # Converts hash and nil to an options object
775
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
776
+
777
+ # Customize the options with defaults
778
+ call_metadata = @config.rpcs.list_volumes.metadata.to_h
779
+
780
+ # Set x-goog-api-client and x-goog-user-project headers
781
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
782
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
783
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
784
+ transports_version_send: [:rest]
785
+
786
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
787
+
788
+ options.apply_defaults timeout: @config.rpcs.list_volumes.timeout,
789
+ metadata: call_metadata,
790
+ retry_policy: @config.rpcs.list_volumes.retry_policy
791
+
792
+ options.apply_defaults timeout: @config.timeout,
793
+ metadata: @config.metadata,
794
+ retry_policy: @config.retry_policy
795
+
796
+ @net_app_stub.list_volumes request, options do |result, operation|
797
+ yield result, operation if block_given?
798
+ return result
799
+ end
800
+ rescue ::Gapic::Rest::Error => e
801
+ raise ::Google::Cloud::Error.from_error(e)
802
+ end
803
+
804
+ ##
805
+ # Gets details of a single Volume.
806
+ #
807
+ # @overload get_volume(request, options = nil)
808
+ # Pass arguments to `get_volume` via a request object, either of type
809
+ # {::Google::Cloud::NetApp::V1::GetVolumeRequest} or an equivalent Hash.
810
+ #
811
+ # @param request [::Google::Cloud::NetApp::V1::GetVolumeRequest, ::Hash]
812
+ # A request object representing the call parameters. Required. To specify no
813
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
814
+ # @param options [::Gapic::CallOptions, ::Hash]
815
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
816
+ #
817
+ # @overload get_volume(name: nil)
818
+ # Pass arguments to `get_volume` via keyword arguments. Note that at
819
+ # least one keyword argument is required. To specify no parameters, or to keep all
820
+ # the default parameter values, pass an empty Hash as a request object (see above).
821
+ #
822
+ # @param name [::String]
823
+ # Required. Name of the volume
824
+ # @yield [result, operation] Access the result along with the TransportOperation object
825
+ # @yieldparam result [::Google::Cloud::NetApp::V1::Volume]
826
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
827
+ #
828
+ # @return [::Google::Cloud::NetApp::V1::Volume]
829
+ #
830
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
831
+ #
832
+ # @example Basic example
833
+ # require "google/cloud/netapp/v1"
834
+ #
835
+ # # Create a client object. The client can be reused for multiple calls.
836
+ # client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
837
+ #
838
+ # # Create a request. To set request fields, pass in keyword arguments.
839
+ # request = Google::Cloud::NetApp::V1::GetVolumeRequest.new
840
+ #
841
+ # # Call the get_volume method.
842
+ # result = client.get_volume request
843
+ #
844
+ # # The returned object is of type Google::Cloud::NetApp::V1::Volume.
845
+ # p result
846
+ #
847
+ def get_volume request, options = nil
848
+ raise ::ArgumentError, "request must be provided" if request.nil?
849
+
850
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::GetVolumeRequest
851
+
852
+ # Converts hash and nil to an options object
853
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
854
+
855
+ # Customize the options with defaults
856
+ call_metadata = @config.rpcs.get_volume.metadata.to_h
857
+
858
+ # Set x-goog-api-client and x-goog-user-project headers
859
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
860
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
861
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
862
+ transports_version_send: [:rest]
863
+
864
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
865
+
866
+ options.apply_defaults timeout: @config.rpcs.get_volume.timeout,
867
+ metadata: call_metadata,
868
+ retry_policy: @config.rpcs.get_volume.retry_policy
869
+
870
+ options.apply_defaults timeout: @config.timeout,
871
+ metadata: @config.metadata,
872
+ retry_policy: @config.retry_policy
873
+
874
+ @net_app_stub.get_volume request, options do |result, operation|
875
+ yield result, operation if block_given?
876
+ return result
877
+ end
878
+ rescue ::Gapic::Rest::Error => e
879
+ raise ::Google::Cloud::Error.from_error(e)
880
+ end
881
+
882
+ ##
883
+ # Creates a new Volume in a given project and location.
884
+ #
885
+ # @overload create_volume(request, options = nil)
886
+ # Pass arguments to `create_volume` via a request object, either of type
887
+ # {::Google::Cloud::NetApp::V1::CreateVolumeRequest} or an equivalent Hash.
888
+ #
889
+ # @param request [::Google::Cloud::NetApp::V1::CreateVolumeRequest, ::Hash]
890
+ # A request object representing the call parameters. Required. To specify no
891
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
892
+ # @param options [::Gapic::CallOptions, ::Hash]
893
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
894
+ #
895
+ # @overload create_volume(parent: nil, volume_id: nil, volume: nil)
896
+ # Pass arguments to `create_volume` via keyword arguments. Note that at
897
+ # least one keyword argument is required. To specify no parameters, or to keep all
898
+ # the default parameter values, pass an empty Hash as a request object (see above).
899
+ #
900
+ # @param parent [::String]
901
+ # Required. Value for parent.
902
+ # @param volume_id [::String]
903
+ # Required. Id of the requesting volume
904
+ # If auto-generating Id server-side, remove this field and
905
+ # Id from the method_signature of Create RPC
906
+ # @param volume [::Google::Cloud::NetApp::V1::Volume, ::Hash]
907
+ # Required. The volume being created.
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
+ #
916
+ # @example Basic example
917
+ # require "google/cloud/netapp/v1"
918
+ #
919
+ # # Create a client object. The client can be reused for multiple calls.
920
+ # client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
921
+ #
922
+ # # Create a request. To set request fields, pass in keyword arguments.
923
+ # request = Google::Cloud::NetApp::V1::CreateVolumeRequest.new
924
+ #
925
+ # # Call the create_volume method.
926
+ # result = client.create_volume request
927
+ #
928
+ # # The returned object is of type Gapic::Operation. You can use it to
929
+ # # check the status of an operation, cancel it, or wait for results.
930
+ # # Here is how to wait for a response.
931
+ # result.wait_until_done! timeout: 60
932
+ # if result.response?
933
+ # p result.response
934
+ # else
935
+ # puts "No response received."
936
+ # end
937
+ #
938
+ def create_volume request, options = nil
939
+ raise ::ArgumentError, "request must be provided" if request.nil?
940
+
941
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::CreateVolumeRequest
942
+
943
+ # Converts hash and nil to an options object
944
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
945
+
946
+ # Customize the options with defaults
947
+ call_metadata = @config.rpcs.create_volume.metadata.to_h
948
+
949
+ # Set x-goog-api-client and x-goog-user-project headers
950
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
951
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
952
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
953
+ transports_version_send: [:rest]
954
+
955
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
956
+
957
+ options.apply_defaults timeout: @config.rpcs.create_volume.timeout,
958
+ metadata: call_metadata,
959
+ retry_policy: @config.rpcs.create_volume.retry_policy
960
+
961
+ options.apply_defaults timeout: @config.timeout,
962
+ metadata: @config.metadata,
963
+ retry_policy: @config.retry_policy
964
+
965
+ @net_app_stub.create_volume request, options do |result, operation|
966
+ result = ::Gapic::Operation.new result, @operations_client, options: options
967
+ yield result, operation if block_given?
968
+ return result
969
+ end
970
+ rescue ::Gapic::Rest::Error => e
971
+ raise ::Google::Cloud::Error.from_error(e)
972
+ end
973
+
974
+ ##
975
+ # Updates the parameters of a single Volume.
976
+ #
977
+ # @overload update_volume(request, options = nil)
978
+ # Pass arguments to `update_volume` via a request object, either of type
979
+ # {::Google::Cloud::NetApp::V1::UpdateVolumeRequest} or an equivalent Hash.
980
+ #
981
+ # @param request [::Google::Cloud::NetApp::V1::UpdateVolumeRequest, ::Hash]
982
+ # A request object representing the call parameters. Required. To specify no
983
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
984
+ # @param options [::Gapic::CallOptions, ::Hash]
985
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
986
+ #
987
+ # @overload update_volume(update_mask: nil, volume: nil)
988
+ # Pass arguments to `update_volume` via keyword arguments. Note that at
989
+ # least one keyword argument is required. To specify no parameters, or to keep all
990
+ # the default parameter values, pass an empty Hash as a request object (see above).
991
+ #
992
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
993
+ # Required. Field mask is used to specify the fields to be overwritten in the
994
+ # Volume resource by the update.
995
+ # The fields specified in the update_mask are relative to the resource, not
996
+ # the full request. A field will be overwritten if it is in the mask. If the
997
+ # user does not provide a mask then all fields will be overwritten.
998
+ # @param volume [::Google::Cloud::NetApp::V1::Volume, ::Hash]
999
+ # Required. The volume being updated
1000
+ # @yield [result, operation] Access the result along with the TransportOperation object
1001
+ # @yieldparam result [::Gapic::Operation]
1002
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1003
+ #
1004
+ # @return [::Gapic::Operation]
1005
+ #
1006
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1007
+ #
1008
+ # @example Basic example
1009
+ # require "google/cloud/netapp/v1"
1010
+ #
1011
+ # # Create a client object. The client can be reused for multiple calls.
1012
+ # client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
1013
+ #
1014
+ # # Create a request. To set request fields, pass in keyword arguments.
1015
+ # request = Google::Cloud::NetApp::V1::UpdateVolumeRequest.new
1016
+ #
1017
+ # # Call the update_volume method.
1018
+ # result = client.update_volume request
1019
+ #
1020
+ # # The returned object is of type Gapic::Operation. You can use it to
1021
+ # # check the status of an operation, cancel it, or wait for results.
1022
+ # # Here is how to wait for a response.
1023
+ # result.wait_until_done! timeout: 60
1024
+ # if result.response?
1025
+ # p result.response
1026
+ # else
1027
+ # puts "No response received."
1028
+ # end
1029
+ #
1030
+ def update_volume request, options = nil
1031
+ raise ::ArgumentError, "request must be provided" if request.nil?
1032
+
1033
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::UpdateVolumeRequest
1034
+
1035
+ # Converts hash and nil to an options object
1036
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1037
+
1038
+ # Customize the options with defaults
1039
+ call_metadata = @config.rpcs.update_volume.metadata.to_h
1040
+
1041
+ # Set x-goog-api-client and x-goog-user-project headers
1042
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1043
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1044
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
1045
+ transports_version_send: [:rest]
1046
+
1047
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1048
+
1049
+ options.apply_defaults timeout: @config.rpcs.update_volume.timeout,
1050
+ metadata: call_metadata,
1051
+ retry_policy: @config.rpcs.update_volume.retry_policy
1052
+
1053
+ options.apply_defaults timeout: @config.timeout,
1054
+ metadata: @config.metadata,
1055
+ retry_policy: @config.retry_policy
1056
+
1057
+ @net_app_stub.update_volume request, options do |result, operation|
1058
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1059
+ yield result, operation if block_given?
1060
+ return result
1061
+ end
1062
+ rescue ::Gapic::Rest::Error => e
1063
+ raise ::Google::Cloud::Error.from_error(e)
1064
+ end
1065
+
1066
+ ##
1067
+ # Deletes a single Volume.
1068
+ #
1069
+ # @overload delete_volume(request, options = nil)
1070
+ # Pass arguments to `delete_volume` via a request object, either of type
1071
+ # {::Google::Cloud::NetApp::V1::DeleteVolumeRequest} or an equivalent Hash.
1072
+ #
1073
+ # @param request [::Google::Cloud::NetApp::V1::DeleteVolumeRequest, ::Hash]
1074
+ # A request object representing the call parameters. Required. To specify no
1075
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1076
+ # @param options [::Gapic::CallOptions, ::Hash]
1077
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1078
+ #
1079
+ # @overload delete_volume(name: nil, force: nil)
1080
+ # Pass arguments to `delete_volume` via keyword arguments. Note that at
1081
+ # least one keyword argument is required. To specify no parameters, or to keep all
1082
+ # the default parameter values, pass an empty Hash as a request object (see above).
1083
+ #
1084
+ # @param name [::String]
1085
+ # Required. Name of the volume
1086
+ # @param force [::Boolean]
1087
+ # If this field is set as true, CCFE will not block the volume resource
1088
+ # deletion even if it has any snapshots resource. (Otherwise, the request
1089
+ # will only work if the volume has no snapshots.)
1090
+ # @yield [result, operation] Access the result along with the TransportOperation object
1091
+ # @yieldparam result [::Gapic::Operation]
1092
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1093
+ #
1094
+ # @return [::Gapic::Operation]
1095
+ #
1096
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1097
+ #
1098
+ # @example Basic example
1099
+ # require "google/cloud/netapp/v1"
1100
+ #
1101
+ # # Create a client object. The client can be reused for multiple calls.
1102
+ # client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
1103
+ #
1104
+ # # Create a request. To set request fields, pass in keyword arguments.
1105
+ # request = Google::Cloud::NetApp::V1::DeleteVolumeRequest.new
1106
+ #
1107
+ # # Call the delete_volume method.
1108
+ # result = client.delete_volume request
1109
+ #
1110
+ # # The returned object is of type Gapic::Operation. You can use it to
1111
+ # # check the status of an operation, cancel it, or wait for results.
1112
+ # # Here is how to wait for a response.
1113
+ # result.wait_until_done! timeout: 60
1114
+ # if result.response?
1115
+ # p result.response
1116
+ # else
1117
+ # puts "No response received."
1118
+ # end
1119
+ #
1120
+ def delete_volume request, options = nil
1121
+ raise ::ArgumentError, "request must be provided" if request.nil?
1122
+
1123
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::DeleteVolumeRequest
1124
+
1125
+ # Converts hash and nil to an options object
1126
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1127
+
1128
+ # Customize the options with defaults
1129
+ call_metadata = @config.rpcs.delete_volume.metadata.to_h
1130
+
1131
+ # Set x-goog-api-client and x-goog-user-project headers
1132
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1133
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1134
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
1135
+ transports_version_send: [:rest]
1136
+
1137
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1138
+
1139
+ options.apply_defaults timeout: @config.rpcs.delete_volume.timeout,
1140
+ metadata: call_metadata,
1141
+ retry_policy: @config.rpcs.delete_volume.retry_policy
1142
+
1143
+ options.apply_defaults timeout: @config.timeout,
1144
+ metadata: @config.metadata,
1145
+ retry_policy: @config.retry_policy
1146
+
1147
+ @net_app_stub.delete_volume request, options do |result, operation|
1148
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1149
+ yield result, operation if block_given?
1150
+ return result
1151
+ end
1152
+ rescue ::Gapic::Rest::Error => e
1153
+ raise ::Google::Cloud::Error.from_error(e)
1154
+ end
1155
+
1156
+ ##
1157
+ # Revert an existing volume to a specified snapshot.
1158
+ # Warning! This operation will permanently revert all changes made after the
1159
+ # snapshot was created.
1160
+ #
1161
+ # @overload revert_volume(request, options = nil)
1162
+ # Pass arguments to `revert_volume` via a request object, either of type
1163
+ # {::Google::Cloud::NetApp::V1::RevertVolumeRequest} or an equivalent Hash.
1164
+ #
1165
+ # @param request [::Google::Cloud::NetApp::V1::RevertVolumeRequest, ::Hash]
1166
+ # A request object representing the call parameters. Required. To specify no
1167
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1168
+ # @param options [::Gapic::CallOptions, ::Hash]
1169
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1170
+ #
1171
+ # @overload revert_volume(name: nil, snapshot_id: nil)
1172
+ # Pass arguments to `revert_volume` via keyword arguments. Note that at
1173
+ # least one keyword argument is required. To specify no parameters, or to keep all
1174
+ # the default parameter values, pass an empty Hash as a request object (see above).
1175
+ #
1176
+ # @param name [::String]
1177
+ # Required. The resource name of the volume, in the format of
1178
+ # projects/\\{project_id}/locations/\\{location}/volumes/\\{volume_id}.
1179
+ # @param snapshot_id [::String]
1180
+ # Required. The snapshot resource ID, in the format 'my-snapshot', where the
1181
+ # specified ID is the \\{snapshot_id} of the fully qualified name like
1182
+ # projects/\\{project_id}/locations/\\{location_id}/volumes/\\{volume_id}/snapshots/\\{snapshot_id}
1183
+ # @yield [result, operation] Access the result along with the TransportOperation object
1184
+ # @yieldparam result [::Gapic::Operation]
1185
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1186
+ #
1187
+ # @return [::Gapic::Operation]
1188
+ #
1189
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1190
+ #
1191
+ # @example Basic example
1192
+ # require "google/cloud/netapp/v1"
1193
+ #
1194
+ # # Create a client object. The client can be reused for multiple calls.
1195
+ # client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
1196
+ #
1197
+ # # Create a request. To set request fields, pass in keyword arguments.
1198
+ # request = Google::Cloud::NetApp::V1::RevertVolumeRequest.new
1199
+ #
1200
+ # # Call the revert_volume method.
1201
+ # result = client.revert_volume request
1202
+ #
1203
+ # # The returned object is of type Gapic::Operation. You can use it to
1204
+ # # check the status of an operation, cancel it, or wait for results.
1205
+ # # Here is how to wait for a response.
1206
+ # result.wait_until_done! timeout: 60
1207
+ # if result.response?
1208
+ # p result.response
1209
+ # else
1210
+ # puts "No response received."
1211
+ # end
1212
+ #
1213
+ def revert_volume request, options = nil
1214
+ raise ::ArgumentError, "request must be provided" if request.nil?
1215
+
1216
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::RevertVolumeRequest
1217
+
1218
+ # Converts hash and nil to an options object
1219
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1220
+
1221
+ # Customize the options with defaults
1222
+ call_metadata = @config.rpcs.revert_volume.metadata.to_h
1223
+
1224
+ # Set x-goog-api-client and x-goog-user-project headers
1225
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1226
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1227
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
1228
+ transports_version_send: [:rest]
1229
+
1230
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1231
+
1232
+ options.apply_defaults timeout: @config.rpcs.revert_volume.timeout,
1233
+ metadata: call_metadata,
1234
+ retry_policy: @config.rpcs.revert_volume.retry_policy
1235
+
1236
+ options.apply_defaults timeout: @config.timeout,
1237
+ metadata: @config.metadata,
1238
+ retry_policy: @config.retry_policy
1239
+
1240
+ @net_app_stub.revert_volume request, options do |result, operation|
1241
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1242
+ yield result, operation if block_given?
1243
+ return result
1244
+ end
1245
+ rescue ::Gapic::Rest::Error => e
1246
+ raise ::Google::Cloud::Error.from_error(e)
1247
+ end
1248
+
1249
+ ##
1250
+ # Returns descriptions of all snapshots for a volume.
1251
+ #
1252
+ # @overload list_snapshots(request, options = nil)
1253
+ # Pass arguments to `list_snapshots` via a request object, either of type
1254
+ # {::Google::Cloud::NetApp::V1::ListSnapshotsRequest} or an equivalent Hash.
1255
+ #
1256
+ # @param request [::Google::Cloud::NetApp::V1::ListSnapshotsRequest, ::Hash]
1257
+ # A request object representing the call parameters. Required. To specify no
1258
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1259
+ # @param options [::Gapic::CallOptions, ::Hash]
1260
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1261
+ #
1262
+ # @overload list_snapshots(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil)
1263
+ # Pass arguments to `list_snapshots` via keyword arguments. Note that at
1264
+ # least one keyword argument is required. To specify no parameters, or to keep all
1265
+ # the default parameter values, pass an empty Hash as a request object (see above).
1266
+ #
1267
+ # @param parent [::String]
1268
+ # Required. The volume for which to retrieve snapshot information,
1269
+ # in the format
1270
+ # `projects/{project_id}/locations/{location}/volumes/{volume_id}`.
1271
+ # @param page_size [::Integer]
1272
+ # The maximum number of items to return.
1273
+ # @param page_token [::String]
1274
+ # The next_page_token value to use if there are additional
1275
+ # results to retrieve for this list request.
1276
+ # @param order_by [::String]
1277
+ # Sort results. Supported values are "name", "name desc" or "" (unsorted).
1278
+ # @param filter [::String]
1279
+ # List filter.
1280
+ # @yield [result, operation] Access the result along with the TransportOperation object
1281
+ # @yieldparam result [::Google::Cloud::NetApp::V1::ListSnapshotsResponse]
1282
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1283
+ #
1284
+ # @return [::Google::Cloud::NetApp::V1::ListSnapshotsResponse]
1285
+ #
1286
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1287
+ #
1288
+ # @example Basic example
1289
+ # require "google/cloud/netapp/v1"
1290
+ #
1291
+ # # Create a client object. The client can be reused for multiple calls.
1292
+ # client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
1293
+ #
1294
+ # # Create a request. To set request fields, pass in keyword arguments.
1295
+ # request = Google::Cloud::NetApp::V1::ListSnapshotsRequest.new
1296
+ #
1297
+ # # Call the list_snapshots method.
1298
+ # result = client.list_snapshots request
1299
+ #
1300
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1301
+ # # over elements, and API calls will be issued to fetch pages as needed.
1302
+ # result.each do |item|
1303
+ # # Each element is of type ::Google::Cloud::NetApp::V1::Snapshot.
1304
+ # p item
1305
+ # end
1306
+ #
1307
+ def list_snapshots request, options = nil
1308
+ raise ::ArgumentError, "request must be provided" if request.nil?
1309
+
1310
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::ListSnapshotsRequest
1311
+
1312
+ # Converts hash and nil to an options object
1313
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1314
+
1315
+ # Customize the options with defaults
1316
+ call_metadata = @config.rpcs.list_snapshots.metadata.to_h
1317
+
1318
+ # Set x-goog-api-client and x-goog-user-project headers
1319
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1320
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1321
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
1322
+ transports_version_send: [:rest]
1323
+
1324
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1325
+
1326
+ options.apply_defaults timeout: @config.rpcs.list_snapshots.timeout,
1327
+ metadata: call_metadata,
1328
+ retry_policy: @config.rpcs.list_snapshots.retry_policy
1329
+
1330
+ options.apply_defaults timeout: @config.timeout,
1331
+ metadata: @config.metadata,
1332
+ retry_policy: @config.retry_policy
1333
+
1334
+ @net_app_stub.list_snapshots request, options do |result, operation|
1335
+ yield result, operation if block_given?
1336
+ return result
1337
+ end
1338
+ rescue ::Gapic::Rest::Error => e
1339
+ raise ::Google::Cloud::Error.from_error(e)
1340
+ end
1341
+
1342
+ ##
1343
+ # Describe a snapshot for a volume.
1344
+ #
1345
+ # @overload get_snapshot(request, options = nil)
1346
+ # Pass arguments to `get_snapshot` via a request object, either of type
1347
+ # {::Google::Cloud::NetApp::V1::GetSnapshotRequest} or an equivalent Hash.
1348
+ #
1349
+ # @param request [::Google::Cloud::NetApp::V1::GetSnapshotRequest, ::Hash]
1350
+ # A request object representing the call parameters. Required. To specify no
1351
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1352
+ # @param options [::Gapic::CallOptions, ::Hash]
1353
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1354
+ #
1355
+ # @overload get_snapshot(name: nil)
1356
+ # Pass arguments to `get_snapshot` via keyword arguments. Note that at
1357
+ # least one keyword argument is required. To specify no parameters, or to keep all
1358
+ # the default parameter values, pass an empty Hash as a request object (see above).
1359
+ #
1360
+ # @param name [::String]
1361
+ # Required. The snapshot resource name, in the format
1362
+ # `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`
1363
+ # @yield [result, operation] Access the result along with the TransportOperation object
1364
+ # @yieldparam result [::Google::Cloud::NetApp::V1::Snapshot]
1365
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1366
+ #
1367
+ # @return [::Google::Cloud::NetApp::V1::Snapshot]
1368
+ #
1369
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1370
+ #
1371
+ # @example Basic example
1372
+ # require "google/cloud/netapp/v1"
1373
+ #
1374
+ # # Create a client object. The client can be reused for multiple calls.
1375
+ # client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
1376
+ #
1377
+ # # Create a request. To set request fields, pass in keyword arguments.
1378
+ # request = Google::Cloud::NetApp::V1::GetSnapshotRequest.new
1379
+ #
1380
+ # # Call the get_snapshot method.
1381
+ # result = client.get_snapshot request
1382
+ #
1383
+ # # The returned object is of type Google::Cloud::NetApp::V1::Snapshot.
1384
+ # p result
1385
+ #
1386
+ def get_snapshot request, options = nil
1387
+ raise ::ArgumentError, "request must be provided" if request.nil?
1388
+
1389
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::GetSnapshotRequest
1390
+
1391
+ # Converts hash and nil to an options object
1392
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1393
+
1394
+ # Customize the options with defaults
1395
+ call_metadata = @config.rpcs.get_snapshot.metadata.to_h
1396
+
1397
+ # Set x-goog-api-client and x-goog-user-project headers
1398
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1399
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1400
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
1401
+ transports_version_send: [:rest]
1402
+
1403
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1404
+
1405
+ options.apply_defaults timeout: @config.rpcs.get_snapshot.timeout,
1406
+ metadata: call_metadata,
1407
+ retry_policy: @config.rpcs.get_snapshot.retry_policy
1408
+
1409
+ options.apply_defaults timeout: @config.timeout,
1410
+ metadata: @config.metadata,
1411
+ retry_policy: @config.retry_policy
1412
+
1413
+ @net_app_stub.get_snapshot request, options do |result, operation|
1414
+ yield result, operation if block_given?
1415
+ return result
1416
+ end
1417
+ rescue ::Gapic::Rest::Error => e
1418
+ raise ::Google::Cloud::Error.from_error(e)
1419
+ end
1420
+
1421
+ ##
1422
+ # Create a new snapshot for a volume.
1423
+ #
1424
+ # @overload create_snapshot(request, options = nil)
1425
+ # Pass arguments to `create_snapshot` via a request object, either of type
1426
+ # {::Google::Cloud::NetApp::V1::CreateSnapshotRequest} or an equivalent Hash.
1427
+ #
1428
+ # @param request [::Google::Cloud::NetApp::V1::CreateSnapshotRequest, ::Hash]
1429
+ # A request object representing the call parameters. Required. To specify no
1430
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1431
+ # @param options [::Gapic::CallOptions, ::Hash]
1432
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1433
+ #
1434
+ # @overload create_snapshot(parent: nil, snapshot: nil, snapshot_id: nil)
1435
+ # Pass arguments to `create_snapshot` via keyword arguments. Note that at
1436
+ # least one keyword argument is required. To specify no parameters, or to keep all
1437
+ # the default parameter values, pass an empty Hash as a request object (see above).
1438
+ #
1439
+ # @param parent [::String]
1440
+ # Required. The NetApp volume to create the snapshots of, in the format
1441
+ # `projects/{project_id}/locations/{location}/volumes/{volume_id}`
1442
+ # @param snapshot [::Google::Cloud::NetApp::V1::Snapshot, ::Hash]
1443
+ # Required. A snapshot resource
1444
+ # @param snapshot_id [::String]
1445
+ # Required. ID of the snapshot to create.
1446
+ # This value must start with a lowercase letter followed by up to 62
1447
+ # lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
1448
+ # @yield [result, operation] Access the result along with the TransportOperation object
1449
+ # @yieldparam result [::Gapic::Operation]
1450
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1451
+ #
1452
+ # @return [::Gapic::Operation]
1453
+ #
1454
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1455
+ #
1456
+ # @example Basic example
1457
+ # require "google/cloud/netapp/v1"
1458
+ #
1459
+ # # Create a client object. The client can be reused for multiple calls.
1460
+ # client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
1461
+ #
1462
+ # # Create a request. To set request fields, pass in keyword arguments.
1463
+ # request = Google::Cloud::NetApp::V1::CreateSnapshotRequest.new
1464
+ #
1465
+ # # Call the create_snapshot method.
1466
+ # result = client.create_snapshot request
1467
+ #
1468
+ # # The returned object is of type Gapic::Operation. You can use it to
1469
+ # # check the status of an operation, cancel it, or wait for results.
1470
+ # # Here is how to wait for a response.
1471
+ # result.wait_until_done! timeout: 60
1472
+ # if result.response?
1473
+ # p result.response
1474
+ # else
1475
+ # puts "No response received."
1476
+ # end
1477
+ #
1478
+ def create_snapshot request, options = nil
1479
+ raise ::ArgumentError, "request must be provided" if request.nil?
1480
+
1481
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::CreateSnapshotRequest
1482
+
1483
+ # Converts hash and nil to an options object
1484
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1485
+
1486
+ # Customize the options with defaults
1487
+ call_metadata = @config.rpcs.create_snapshot.metadata.to_h
1488
+
1489
+ # Set x-goog-api-client and x-goog-user-project headers
1490
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1491
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1492
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
1493
+ transports_version_send: [:rest]
1494
+
1495
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1496
+
1497
+ options.apply_defaults timeout: @config.rpcs.create_snapshot.timeout,
1498
+ metadata: call_metadata,
1499
+ retry_policy: @config.rpcs.create_snapshot.retry_policy
1500
+
1501
+ options.apply_defaults timeout: @config.timeout,
1502
+ metadata: @config.metadata,
1503
+ retry_policy: @config.retry_policy
1504
+
1505
+ @net_app_stub.create_snapshot request, options do |result, operation|
1506
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1507
+ yield result, operation if block_given?
1508
+ return result
1509
+ end
1510
+ rescue ::Gapic::Rest::Error => e
1511
+ raise ::Google::Cloud::Error.from_error(e)
1512
+ end
1513
+
1514
+ ##
1515
+ # Deletes a snapshot.
1516
+ #
1517
+ # @overload delete_snapshot(request, options = nil)
1518
+ # Pass arguments to `delete_snapshot` via a request object, either of type
1519
+ # {::Google::Cloud::NetApp::V1::DeleteSnapshotRequest} or an equivalent Hash.
1520
+ #
1521
+ # @param request [::Google::Cloud::NetApp::V1::DeleteSnapshotRequest, ::Hash]
1522
+ # A request object representing the call parameters. Required. To specify no
1523
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1524
+ # @param options [::Gapic::CallOptions, ::Hash]
1525
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1526
+ #
1527
+ # @overload delete_snapshot(name: nil)
1528
+ # Pass arguments to `delete_snapshot` via keyword arguments. Note that at
1529
+ # least one keyword argument is required. To specify no parameters, or to keep all
1530
+ # the default parameter values, pass an empty Hash as a request object (see above).
1531
+ #
1532
+ # @param name [::String]
1533
+ # Required. The snapshot resource name, in the format
1534
+ # `projects/*/locations/*/volumes/*/snapshots/{snapshot_id}`
1535
+ # @yield [result, operation] Access the result along with the TransportOperation object
1536
+ # @yieldparam result [::Gapic::Operation]
1537
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1538
+ #
1539
+ # @return [::Gapic::Operation]
1540
+ #
1541
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1542
+ #
1543
+ # @example Basic example
1544
+ # require "google/cloud/netapp/v1"
1545
+ #
1546
+ # # Create a client object. The client can be reused for multiple calls.
1547
+ # client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
1548
+ #
1549
+ # # Create a request. To set request fields, pass in keyword arguments.
1550
+ # request = Google::Cloud::NetApp::V1::DeleteSnapshotRequest.new
1551
+ #
1552
+ # # Call the delete_snapshot method.
1553
+ # result = client.delete_snapshot request
1554
+ #
1555
+ # # The returned object is of type Gapic::Operation. You can use it to
1556
+ # # check the status of an operation, cancel it, or wait for results.
1557
+ # # Here is how to wait for a response.
1558
+ # result.wait_until_done! timeout: 60
1559
+ # if result.response?
1560
+ # p result.response
1561
+ # else
1562
+ # puts "No response received."
1563
+ # end
1564
+ #
1565
+ def delete_snapshot request, options = nil
1566
+ raise ::ArgumentError, "request must be provided" if request.nil?
1567
+
1568
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::DeleteSnapshotRequest
1569
+
1570
+ # Converts hash and nil to an options object
1571
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1572
+
1573
+ # Customize the options with defaults
1574
+ call_metadata = @config.rpcs.delete_snapshot.metadata.to_h
1575
+
1576
+ # Set x-goog-api-client and x-goog-user-project headers
1577
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1578
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1579
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
1580
+ transports_version_send: [:rest]
1581
+
1582
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1583
+
1584
+ options.apply_defaults timeout: @config.rpcs.delete_snapshot.timeout,
1585
+ metadata: call_metadata,
1586
+ retry_policy: @config.rpcs.delete_snapshot.retry_policy
1587
+
1588
+ options.apply_defaults timeout: @config.timeout,
1589
+ metadata: @config.metadata,
1590
+ retry_policy: @config.retry_policy
1591
+
1592
+ @net_app_stub.delete_snapshot request, options do |result, operation|
1593
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1594
+ yield result, operation if block_given?
1595
+ return result
1596
+ end
1597
+ rescue ::Gapic::Rest::Error => e
1598
+ raise ::Google::Cloud::Error.from_error(e)
1599
+ end
1600
+
1601
+ ##
1602
+ # Updates the settings of a specific snapshot.
1603
+ #
1604
+ # @overload update_snapshot(request, options = nil)
1605
+ # Pass arguments to `update_snapshot` via a request object, either of type
1606
+ # {::Google::Cloud::NetApp::V1::UpdateSnapshotRequest} or an equivalent Hash.
1607
+ #
1608
+ # @param request [::Google::Cloud::NetApp::V1::UpdateSnapshotRequest, ::Hash]
1609
+ # A request object representing the call parameters. Required. To specify no
1610
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1611
+ # @param options [::Gapic::CallOptions, ::Hash]
1612
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1613
+ #
1614
+ # @overload update_snapshot(update_mask: nil, snapshot: nil)
1615
+ # Pass arguments to `update_snapshot` via keyword arguments. Note that at
1616
+ # least one keyword argument is required. To specify no parameters, or to keep all
1617
+ # the default parameter values, pass an empty Hash as a request object (see above).
1618
+ #
1619
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1620
+ # Required. Mask of fields to update. At least one path must be supplied in
1621
+ # this field.
1622
+ # @param snapshot [::Google::Cloud::NetApp::V1::Snapshot, ::Hash]
1623
+ # Required. A snapshot resource
1624
+ # @yield [result, operation] Access the result along with the TransportOperation object
1625
+ # @yieldparam result [::Gapic::Operation]
1626
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1627
+ #
1628
+ # @return [::Gapic::Operation]
1629
+ #
1630
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1631
+ #
1632
+ # @example Basic example
1633
+ # require "google/cloud/netapp/v1"
1634
+ #
1635
+ # # Create a client object. The client can be reused for multiple calls.
1636
+ # client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
1637
+ #
1638
+ # # Create a request. To set request fields, pass in keyword arguments.
1639
+ # request = Google::Cloud::NetApp::V1::UpdateSnapshotRequest.new
1640
+ #
1641
+ # # Call the update_snapshot method.
1642
+ # result = client.update_snapshot request
1643
+ #
1644
+ # # The returned object is of type Gapic::Operation. You can use it to
1645
+ # # check the status of an operation, cancel it, or wait for results.
1646
+ # # Here is how to wait for a response.
1647
+ # result.wait_until_done! timeout: 60
1648
+ # if result.response?
1649
+ # p result.response
1650
+ # else
1651
+ # puts "No response received."
1652
+ # end
1653
+ #
1654
+ def update_snapshot request, options = nil
1655
+ raise ::ArgumentError, "request must be provided" if request.nil?
1656
+
1657
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::UpdateSnapshotRequest
1658
+
1659
+ # Converts hash and nil to an options object
1660
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1661
+
1662
+ # Customize the options with defaults
1663
+ call_metadata = @config.rpcs.update_snapshot.metadata.to_h
1664
+
1665
+ # Set x-goog-api-client and x-goog-user-project headers
1666
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1667
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1668
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
1669
+ transports_version_send: [:rest]
1670
+
1671
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1672
+
1673
+ options.apply_defaults timeout: @config.rpcs.update_snapshot.timeout,
1674
+ metadata: call_metadata,
1675
+ retry_policy: @config.rpcs.update_snapshot.retry_policy
1676
+
1677
+ options.apply_defaults timeout: @config.timeout,
1678
+ metadata: @config.metadata,
1679
+ retry_policy: @config.retry_policy
1680
+
1681
+ @net_app_stub.update_snapshot request, options do |result, operation|
1682
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1683
+ yield result, operation if block_given?
1684
+ return result
1685
+ end
1686
+ rescue ::Gapic::Rest::Error => e
1687
+ raise ::Google::Cloud::Error.from_error(e)
1688
+ end
1689
+
1690
+ ##
1691
+ # Lists active directories.
1692
+ #
1693
+ # @overload list_active_directories(request, options = nil)
1694
+ # Pass arguments to `list_active_directories` via a request object, either of type
1695
+ # {::Google::Cloud::NetApp::V1::ListActiveDirectoriesRequest} or an equivalent Hash.
1696
+ #
1697
+ # @param request [::Google::Cloud::NetApp::V1::ListActiveDirectoriesRequest, ::Hash]
1698
+ # A request object representing the call parameters. Required. To specify no
1699
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1700
+ # @param options [::Gapic::CallOptions, ::Hash]
1701
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1702
+ #
1703
+ # @overload list_active_directories(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1704
+ # Pass arguments to `list_active_directories` via keyword arguments. Note that at
1705
+ # least one keyword argument is required. To specify no parameters, or to keep all
1706
+ # the default parameter values, pass an empty Hash as a request object (see above).
1707
+ #
1708
+ # @param parent [::String]
1709
+ # Required. Parent value for ListActiveDirectoriesRequest
1710
+ # @param page_size [::Integer]
1711
+ # Requested page size. Server may return fewer items than requested.
1712
+ # If unspecified, the server will pick an appropriate default.
1713
+ # @param page_token [::String]
1714
+ # A token identifying a page of results the server should return.
1715
+ # @param filter [::String]
1716
+ # Filtering results
1717
+ # @param order_by [::String]
1718
+ # Hint for how to order the results
1719
+ # @yield [result, operation] Access the result along with the TransportOperation object
1720
+ # @yieldparam result [::Google::Cloud::NetApp::V1::ListActiveDirectoriesResponse]
1721
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1722
+ #
1723
+ # @return [::Google::Cloud::NetApp::V1::ListActiveDirectoriesResponse]
1724
+ #
1725
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1726
+ #
1727
+ # @example Basic example
1728
+ # require "google/cloud/netapp/v1"
1729
+ #
1730
+ # # Create a client object. The client can be reused for multiple calls.
1731
+ # client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
1732
+ #
1733
+ # # Create a request. To set request fields, pass in keyword arguments.
1734
+ # request = Google::Cloud::NetApp::V1::ListActiveDirectoriesRequest.new
1735
+ #
1736
+ # # Call the list_active_directories method.
1737
+ # result = client.list_active_directories request
1738
+ #
1739
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1740
+ # # over elements, and API calls will be issued to fetch pages as needed.
1741
+ # result.each do |item|
1742
+ # # Each element is of type ::Google::Cloud::NetApp::V1::ActiveDirectory.
1743
+ # p item
1744
+ # end
1745
+ #
1746
+ def list_active_directories request, options = nil
1747
+ raise ::ArgumentError, "request must be provided" if request.nil?
1748
+
1749
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::ListActiveDirectoriesRequest
1750
+
1751
+ # Converts hash and nil to an options object
1752
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1753
+
1754
+ # Customize the options with defaults
1755
+ call_metadata = @config.rpcs.list_active_directories.metadata.to_h
1756
+
1757
+ # Set x-goog-api-client and x-goog-user-project headers
1758
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1759
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1760
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
1761
+ transports_version_send: [:rest]
1762
+
1763
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1764
+
1765
+ options.apply_defaults timeout: @config.rpcs.list_active_directories.timeout,
1766
+ metadata: call_metadata,
1767
+ retry_policy: @config.rpcs.list_active_directories.retry_policy
1768
+
1769
+ options.apply_defaults timeout: @config.timeout,
1770
+ metadata: @config.metadata,
1771
+ retry_policy: @config.retry_policy
1772
+
1773
+ @net_app_stub.list_active_directories request, options do |result, operation|
1774
+ yield result, operation if block_given?
1775
+ return result
1776
+ end
1777
+ rescue ::Gapic::Rest::Error => e
1778
+ raise ::Google::Cloud::Error.from_error(e)
1779
+ end
1780
+
1781
+ ##
1782
+ # Describes a specified active directory.
1783
+ #
1784
+ # @overload get_active_directory(request, options = nil)
1785
+ # Pass arguments to `get_active_directory` via a request object, either of type
1786
+ # {::Google::Cloud::NetApp::V1::GetActiveDirectoryRequest} or an equivalent Hash.
1787
+ #
1788
+ # @param request [::Google::Cloud::NetApp::V1::GetActiveDirectoryRequest, ::Hash]
1789
+ # A request object representing the call parameters. Required. To specify no
1790
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1791
+ # @param options [::Gapic::CallOptions, ::Hash]
1792
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1793
+ #
1794
+ # @overload get_active_directory(name: nil)
1795
+ # Pass arguments to `get_active_directory` via keyword arguments. Note that at
1796
+ # least one keyword argument is required. To specify no parameters, or to keep all
1797
+ # the default parameter values, pass an empty Hash as a request object (see above).
1798
+ #
1799
+ # @param name [::String]
1800
+ # Required. Name of the active directory.
1801
+ # @yield [result, operation] Access the result along with the TransportOperation object
1802
+ # @yieldparam result [::Google::Cloud::NetApp::V1::ActiveDirectory]
1803
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1804
+ #
1805
+ # @return [::Google::Cloud::NetApp::V1::ActiveDirectory]
1806
+ #
1807
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1808
+ #
1809
+ # @example Basic example
1810
+ # require "google/cloud/netapp/v1"
1811
+ #
1812
+ # # Create a client object. The client can be reused for multiple calls.
1813
+ # client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
1814
+ #
1815
+ # # Create a request. To set request fields, pass in keyword arguments.
1816
+ # request = Google::Cloud::NetApp::V1::GetActiveDirectoryRequest.new
1817
+ #
1818
+ # # Call the get_active_directory method.
1819
+ # result = client.get_active_directory request
1820
+ #
1821
+ # # The returned object is of type Google::Cloud::NetApp::V1::ActiveDirectory.
1822
+ # p result
1823
+ #
1824
+ def get_active_directory request, options = nil
1825
+ raise ::ArgumentError, "request must be provided" if request.nil?
1826
+
1827
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::GetActiveDirectoryRequest
1828
+
1829
+ # Converts hash and nil to an options object
1830
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1831
+
1832
+ # Customize the options with defaults
1833
+ call_metadata = @config.rpcs.get_active_directory.metadata.to_h
1834
+
1835
+ # Set x-goog-api-client and x-goog-user-project headers
1836
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1837
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1838
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
1839
+ transports_version_send: [:rest]
1840
+
1841
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1842
+
1843
+ options.apply_defaults timeout: @config.rpcs.get_active_directory.timeout,
1844
+ metadata: call_metadata,
1845
+ retry_policy: @config.rpcs.get_active_directory.retry_policy
1846
+
1847
+ options.apply_defaults timeout: @config.timeout,
1848
+ metadata: @config.metadata,
1849
+ retry_policy: @config.retry_policy
1850
+
1851
+ @net_app_stub.get_active_directory request, options do |result, operation|
1852
+ yield result, operation if block_given?
1853
+ return result
1854
+ end
1855
+ rescue ::Gapic::Rest::Error => e
1856
+ raise ::Google::Cloud::Error.from_error(e)
1857
+ end
1858
+
1859
+ ##
1860
+ # CreateActiveDirectory
1861
+ # Creates the active directory specified in the request.
1862
+ #
1863
+ # @overload create_active_directory(request, options = nil)
1864
+ # Pass arguments to `create_active_directory` via a request object, either of type
1865
+ # {::Google::Cloud::NetApp::V1::CreateActiveDirectoryRequest} or an equivalent Hash.
1866
+ #
1867
+ # @param request [::Google::Cloud::NetApp::V1::CreateActiveDirectoryRequest, ::Hash]
1868
+ # A request object representing the call parameters. Required. To specify no
1869
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1870
+ # @param options [::Gapic::CallOptions, ::Hash]
1871
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1872
+ #
1873
+ # @overload create_active_directory(parent: nil, active_directory: nil, active_directory_id: nil)
1874
+ # Pass arguments to `create_active_directory` via keyword arguments. Note that at
1875
+ # least one keyword argument is required. To specify no parameters, or to keep all
1876
+ # the default parameter values, pass an empty Hash as a request object (see above).
1877
+ #
1878
+ # @param parent [::String]
1879
+ # Required. Value for parent.
1880
+ # @param active_directory [::Google::Cloud::NetApp::V1::ActiveDirectory, ::Hash]
1881
+ # Required. Fields of the to be created active directory.
1882
+ # @param active_directory_id [::String]
1883
+ # Required. ID of the active directory to create.
1884
+ # @yield [result, operation] Access the result along with the TransportOperation object
1885
+ # @yieldparam result [::Gapic::Operation]
1886
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1887
+ #
1888
+ # @return [::Gapic::Operation]
1889
+ #
1890
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1891
+ #
1892
+ # @example Basic example
1893
+ # require "google/cloud/netapp/v1"
1894
+ #
1895
+ # # Create a client object. The client can be reused for multiple calls.
1896
+ # client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
1897
+ #
1898
+ # # Create a request. To set request fields, pass in keyword arguments.
1899
+ # request = Google::Cloud::NetApp::V1::CreateActiveDirectoryRequest.new
1900
+ #
1901
+ # # Call the create_active_directory method.
1902
+ # result = client.create_active_directory request
1903
+ #
1904
+ # # The returned object is of type Gapic::Operation. You can use it to
1905
+ # # check the status of an operation, cancel it, or wait for results.
1906
+ # # Here is how to wait for a response.
1907
+ # result.wait_until_done! timeout: 60
1908
+ # if result.response?
1909
+ # p result.response
1910
+ # else
1911
+ # puts "No response received."
1912
+ # end
1913
+ #
1914
+ def create_active_directory request, options = nil
1915
+ raise ::ArgumentError, "request must be provided" if request.nil?
1916
+
1917
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::CreateActiveDirectoryRequest
1918
+
1919
+ # Converts hash and nil to an options object
1920
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1921
+
1922
+ # Customize the options with defaults
1923
+ call_metadata = @config.rpcs.create_active_directory.metadata.to_h
1924
+
1925
+ # Set x-goog-api-client and x-goog-user-project headers
1926
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1927
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1928
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
1929
+ transports_version_send: [:rest]
1930
+
1931
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1932
+
1933
+ options.apply_defaults timeout: @config.rpcs.create_active_directory.timeout,
1934
+ metadata: call_metadata,
1935
+ retry_policy: @config.rpcs.create_active_directory.retry_policy
1936
+
1937
+ options.apply_defaults timeout: @config.timeout,
1938
+ metadata: @config.metadata,
1939
+ retry_policy: @config.retry_policy
1940
+
1941
+ @net_app_stub.create_active_directory request, options do |result, operation|
1942
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1943
+ yield result, operation if block_given?
1944
+ return result
1945
+ end
1946
+ rescue ::Gapic::Rest::Error => e
1947
+ raise ::Google::Cloud::Error.from_error(e)
1948
+ end
1949
+
1950
+ ##
1951
+ # Update the parameters of an active directories.
1952
+ #
1953
+ # @overload update_active_directory(request, options = nil)
1954
+ # Pass arguments to `update_active_directory` via a request object, either of type
1955
+ # {::Google::Cloud::NetApp::V1::UpdateActiveDirectoryRequest} or an equivalent Hash.
1956
+ #
1957
+ # @param request [::Google::Cloud::NetApp::V1::UpdateActiveDirectoryRequest, ::Hash]
1958
+ # A request object representing the call parameters. Required. To specify no
1959
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1960
+ # @param options [::Gapic::CallOptions, ::Hash]
1961
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1962
+ #
1963
+ # @overload update_active_directory(update_mask: nil, active_directory: nil)
1964
+ # Pass arguments to `update_active_directory` via keyword arguments. Note that at
1965
+ # least one keyword argument is required. To specify no parameters, or to keep all
1966
+ # the default parameter values, pass an empty Hash as a request object (see above).
1967
+ #
1968
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1969
+ # Required. Field mask is used to specify the fields to be overwritten in the
1970
+ # Active Directory resource by the update.
1971
+ # The fields specified in the update_mask are relative to the resource, not
1972
+ # the full request. A field will be overwritten if it is in the mask. If the
1973
+ # user does not provide a mask then all fields will be overwritten.
1974
+ # @param active_directory [::Google::Cloud::NetApp::V1::ActiveDirectory, ::Hash]
1975
+ # Required. The volume being updated
1976
+ # @yield [result, operation] Access the result along with the TransportOperation object
1977
+ # @yieldparam result [::Gapic::Operation]
1978
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1979
+ #
1980
+ # @return [::Gapic::Operation]
1981
+ #
1982
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1983
+ #
1984
+ # @example Basic example
1985
+ # require "google/cloud/netapp/v1"
1986
+ #
1987
+ # # Create a client object. The client can be reused for multiple calls.
1988
+ # client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
1989
+ #
1990
+ # # Create a request. To set request fields, pass in keyword arguments.
1991
+ # request = Google::Cloud::NetApp::V1::UpdateActiveDirectoryRequest.new
1992
+ #
1993
+ # # Call the update_active_directory method.
1994
+ # result = client.update_active_directory request
1995
+ #
1996
+ # # The returned object is of type Gapic::Operation. You can use it to
1997
+ # # check the status of an operation, cancel it, or wait for results.
1998
+ # # Here is how to wait for a response.
1999
+ # result.wait_until_done! timeout: 60
2000
+ # if result.response?
2001
+ # p result.response
2002
+ # else
2003
+ # puts "No response received."
2004
+ # end
2005
+ #
2006
+ def update_active_directory request, options = nil
2007
+ raise ::ArgumentError, "request must be provided" if request.nil?
2008
+
2009
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::UpdateActiveDirectoryRequest
2010
+
2011
+ # Converts hash and nil to an options object
2012
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2013
+
2014
+ # Customize the options with defaults
2015
+ call_metadata = @config.rpcs.update_active_directory.metadata.to_h
2016
+
2017
+ # Set x-goog-api-client and x-goog-user-project headers
2018
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2019
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2020
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
2021
+ transports_version_send: [:rest]
2022
+
2023
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2024
+
2025
+ options.apply_defaults timeout: @config.rpcs.update_active_directory.timeout,
2026
+ metadata: call_metadata,
2027
+ retry_policy: @config.rpcs.update_active_directory.retry_policy
2028
+
2029
+ options.apply_defaults timeout: @config.timeout,
2030
+ metadata: @config.metadata,
2031
+ retry_policy: @config.retry_policy
2032
+
2033
+ @net_app_stub.update_active_directory request, options do |result, operation|
2034
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2035
+ yield result, operation if block_given?
2036
+ return result
2037
+ end
2038
+ rescue ::Gapic::Rest::Error => e
2039
+ raise ::Google::Cloud::Error.from_error(e)
2040
+ end
2041
+
2042
+ ##
2043
+ # Delete the active directory specified in the request.
2044
+ #
2045
+ # @overload delete_active_directory(request, options = nil)
2046
+ # Pass arguments to `delete_active_directory` via a request object, either of type
2047
+ # {::Google::Cloud::NetApp::V1::DeleteActiveDirectoryRequest} or an equivalent Hash.
2048
+ #
2049
+ # @param request [::Google::Cloud::NetApp::V1::DeleteActiveDirectoryRequest, ::Hash]
2050
+ # A request object representing the call parameters. Required. To specify no
2051
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2052
+ # @param options [::Gapic::CallOptions, ::Hash]
2053
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2054
+ #
2055
+ # @overload delete_active_directory(name: nil)
2056
+ # Pass arguments to `delete_active_directory` via keyword arguments. Note that at
2057
+ # least one keyword argument is required. To specify no parameters, or to keep all
2058
+ # the default parameter values, pass an empty Hash as a request object (see above).
2059
+ #
2060
+ # @param name [::String]
2061
+ # Required. Name of the active directory.
2062
+ # @yield [result, operation] Access the result along with the TransportOperation object
2063
+ # @yieldparam result [::Gapic::Operation]
2064
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2065
+ #
2066
+ # @return [::Gapic::Operation]
2067
+ #
2068
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2069
+ #
2070
+ # @example Basic example
2071
+ # require "google/cloud/netapp/v1"
2072
+ #
2073
+ # # Create a client object. The client can be reused for multiple calls.
2074
+ # client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
2075
+ #
2076
+ # # Create a request. To set request fields, pass in keyword arguments.
2077
+ # request = Google::Cloud::NetApp::V1::DeleteActiveDirectoryRequest.new
2078
+ #
2079
+ # # Call the delete_active_directory method.
2080
+ # result = client.delete_active_directory request
2081
+ #
2082
+ # # The returned object is of type Gapic::Operation. You can use it to
2083
+ # # check the status of an operation, cancel it, or wait for results.
2084
+ # # Here is how to wait for a response.
2085
+ # result.wait_until_done! timeout: 60
2086
+ # if result.response?
2087
+ # p result.response
2088
+ # else
2089
+ # puts "No response received."
2090
+ # end
2091
+ #
2092
+ def delete_active_directory request, options = nil
2093
+ raise ::ArgumentError, "request must be provided" if request.nil?
2094
+
2095
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::DeleteActiveDirectoryRequest
2096
+
2097
+ # Converts hash and nil to an options object
2098
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2099
+
2100
+ # Customize the options with defaults
2101
+ call_metadata = @config.rpcs.delete_active_directory.metadata.to_h
2102
+
2103
+ # Set x-goog-api-client and x-goog-user-project headers
2104
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2105
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2106
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
2107
+ transports_version_send: [:rest]
2108
+
2109
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2110
+
2111
+ options.apply_defaults timeout: @config.rpcs.delete_active_directory.timeout,
2112
+ metadata: call_metadata,
2113
+ retry_policy: @config.rpcs.delete_active_directory.retry_policy
2114
+
2115
+ options.apply_defaults timeout: @config.timeout,
2116
+ metadata: @config.metadata,
2117
+ retry_policy: @config.retry_policy
2118
+
2119
+ @net_app_stub.delete_active_directory request, options do |result, operation|
2120
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2121
+ yield result, operation if block_given?
2122
+ return result
2123
+ end
2124
+ rescue ::Gapic::Rest::Error => e
2125
+ raise ::Google::Cloud::Error.from_error(e)
2126
+ end
2127
+
2128
+ ##
2129
+ # Returns descriptions of all KMS configs owned by the caller.
2130
+ #
2131
+ # @overload list_kms_configs(request, options = nil)
2132
+ # Pass arguments to `list_kms_configs` via a request object, either of type
2133
+ # {::Google::Cloud::NetApp::V1::ListKmsConfigsRequest} or an equivalent Hash.
2134
+ #
2135
+ # @param request [::Google::Cloud::NetApp::V1::ListKmsConfigsRequest, ::Hash]
2136
+ # A request object representing the call parameters. Required. To specify no
2137
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2138
+ # @param options [::Gapic::CallOptions, ::Hash]
2139
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2140
+ #
2141
+ # @overload list_kms_configs(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil)
2142
+ # Pass arguments to `list_kms_configs` via keyword arguments. Note that at
2143
+ # least one keyword argument is required. To specify no parameters, or to keep all
2144
+ # the default parameter values, pass an empty Hash as a request object (see above).
2145
+ #
2146
+ # @param parent [::String]
2147
+ # Required. Parent value
2148
+ # @param page_size [::Integer]
2149
+ # The maximum number of items to return.
2150
+ # @param page_token [::String]
2151
+ # The next_page_token value to use if there are additional
2152
+ # results to retrieve for this list request.
2153
+ # @param order_by [::String]
2154
+ # Sort results. Supported values are "name", "name desc" or "" (unsorted).
2155
+ # @param filter [::String]
2156
+ # List filter.
2157
+ # @yield [result, operation] Access the result along with the TransportOperation object
2158
+ # @yieldparam result [::Google::Cloud::NetApp::V1::ListKmsConfigsResponse]
2159
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2160
+ #
2161
+ # @return [::Google::Cloud::NetApp::V1::ListKmsConfigsResponse]
2162
+ #
2163
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2164
+ #
2165
+ # @example Basic example
2166
+ # require "google/cloud/netapp/v1"
2167
+ #
2168
+ # # Create a client object. The client can be reused for multiple calls.
2169
+ # client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
2170
+ #
2171
+ # # Create a request. To set request fields, pass in keyword arguments.
2172
+ # request = Google::Cloud::NetApp::V1::ListKmsConfigsRequest.new
2173
+ #
2174
+ # # Call the list_kms_configs method.
2175
+ # result = client.list_kms_configs request
2176
+ #
2177
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2178
+ # # over elements, and API calls will be issued to fetch pages as needed.
2179
+ # result.each do |item|
2180
+ # # Each element is of type ::Google::Cloud::NetApp::V1::KmsConfig.
2181
+ # p item
2182
+ # end
2183
+ #
2184
+ def list_kms_configs request, options = nil
2185
+ raise ::ArgumentError, "request must be provided" if request.nil?
2186
+
2187
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::ListKmsConfigsRequest
2188
+
2189
+ # Converts hash and nil to an options object
2190
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2191
+
2192
+ # Customize the options with defaults
2193
+ call_metadata = @config.rpcs.list_kms_configs.metadata.to_h
2194
+
2195
+ # Set x-goog-api-client and x-goog-user-project headers
2196
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2197
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2198
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
2199
+ transports_version_send: [:rest]
2200
+
2201
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2202
+
2203
+ options.apply_defaults timeout: @config.rpcs.list_kms_configs.timeout,
2204
+ metadata: call_metadata,
2205
+ retry_policy: @config.rpcs.list_kms_configs.retry_policy
2206
+
2207
+ options.apply_defaults timeout: @config.timeout,
2208
+ metadata: @config.metadata,
2209
+ retry_policy: @config.retry_policy
2210
+
2211
+ @net_app_stub.list_kms_configs request, options do |result, operation|
2212
+ yield result, operation if block_given?
2213
+ return result
2214
+ end
2215
+ rescue ::Gapic::Rest::Error => e
2216
+ raise ::Google::Cloud::Error.from_error(e)
2217
+ end
2218
+
2219
+ ##
2220
+ # Creates a new KMS config.
2221
+ #
2222
+ # @overload create_kms_config(request, options = nil)
2223
+ # Pass arguments to `create_kms_config` via a request object, either of type
2224
+ # {::Google::Cloud::NetApp::V1::CreateKmsConfigRequest} or an equivalent Hash.
2225
+ #
2226
+ # @param request [::Google::Cloud::NetApp::V1::CreateKmsConfigRequest, ::Hash]
2227
+ # A request object representing the call parameters. Required. To specify no
2228
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2229
+ # @param options [::Gapic::CallOptions, ::Hash]
2230
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2231
+ #
2232
+ # @overload create_kms_config(parent: nil, kms_config_id: nil, kms_config: nil)
2233
+ # Pass arguments to `create_kms_config` via keyword arguments. Note that at
2234
+ # least one keyword argument is required. To specify no parameters, or to keep all
2235
+ # the default parameter values, pass an empty Hash as a request object (see above).
2236
+ #
2237
+ # @param parent [::String]
2238
+ # Required. Value for parent.
2239
+ # @param kms_config_id [::String]
2240
+ # Required. Id of the requesting KmsConfig
2241
+ # If auto-generating Id server-side, remove this field and
2242
+ # id from the method_signature of Create RPC
2243
+ # @param kms_config [::Google::Cloud::NetApp::V1::KmsConfig, ::Hash]
2244
+ # Required. The required parameters to create a new KmsConfig.
2245
+ # @yield [result, operation] Access the result along with the TransportOperation object
2246
+ # @yieldparam result [::Gapic::Operation]
2247
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2248
+ #
2249
+ # @return [::Gapic::Operation]
2250
+ #
2251
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2252
+ #
2253
+ # @example Basic example
2254
+ # require "google/cloud/netapp/v1"
2255
+ #
2256
+ # # Create a client object. The client can be reused for multiple calls.
2257
+ # client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
2258
+ #
2259
+ # # Create a request. To set request fields, pass in keyword arguments.
2260
+ # request = Google::Cloud::NetApp::V1::CreateKmsConfigRequest.new
2261
+ #
2262
+ # # Call the create_kms_config method.
2263
+ # result = client.create_kms_config request
2264
+ #
2265
+ # # The returned object is of type Gapic::Operation. You can use it to
2266
+ # # check the status of an operation, cancel it, or wait for results.
2267
+ # # Here is how to wait for a response.
2268
+ # result.wait_until_done! timeout: 60
2269
+ # if result.response?
2270
+ # p result.response
2271
+ # else
2272
+ # puts "No response received."
2273
+ # end
2274
+ #
2275
+ def create_kms_config request, options = nil
2276
+ raise ::ArgumentError, "request must be provided" if request.nil?
2277
+
2278
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::CreateKmsConfigRequest
2279
+
2280
+ # Converts hash and nil to an options object
2281
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2282
+
2283
+ # Customize the options with defaults
2284
+ call_metadata = @config.rpcs.create_kms_config.metadata.to_h
2285
+
2286
+ # Set x-goog-api-client and x-goog-user-project headers
2287
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2288
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2289
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
2290
+ transports_version_send: [:rest]
2291
+
2292
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2293
+
2294
+ options.apply_defaults timeout: @config.rpcs.create_kms_config.timeout,
2295
+ metadata: call_metadata,
2296
+ retry_policy: @config.rpcs.create_kms_config.retry_policy
2297
+
2298
+ options.apply_defaults timeout: @config.timeout,
2299
+ metadata: @config.metadata,
2300
+ retry_policy: @config.retry_policy
2301
+
2302
+ @net_app_stub.create_kms_config request, options do |result, operation|
2303
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2304
+ yield result, operation if block_given?
2305
+ return result
2306
+ end
2307
+ rescue ::Gapic::Rest::Error => e
2308
+ raise ::Google::Cloud::Error.from_error(e)
2309
+ end
2310
+
2311
+ ##
2312
+ # Returns the description of the specified KMS config by kms_config_id.
2313
+ #
2314
+ # @overload get_kms_config(request, options = nil)
2315
+ # Pass arguments to `get_kms_config` via a request object, either of type
2316
+ # {::Google::Cloud::NetApp::V1::GetKmsConfigRequest} or an equivalent Hash.
2317
+ #
2318
+ # @param request [::Google::Cloud::NetApp::V1::GetKmsConfigRequest, ::Hash]
2319
+ # A request object representing the call parameters. Required. To specify no
2320
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2321
+ # @param options [::Gapic::CallOptions, ::Hash]
2322
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2323
+ #
2324
+ # @overload get_kms_config(name: nil)
2325
+ # Pass arguments to `get_kms_config` via keyword arguments. Note that at
2326
+ # least one keyword argument is required. To specify no parameters, or to keep all
2327
+ # the default parameter values, pass an empty Hash as a request object (see above).
2328
+ #
2329
+ # @param name [::String]
2330
+ # Required. Name of the KmsConfig
2331
+ # @yield [result, operation] Access the result along with the TransportOperation object
2332
+ # @yieldparam result [::Google::Cloud::NetApp::V1::KmsConfig]
2333
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2334
+ #
2335
+ # @return [::Google::Cloud::NetApp::V1::KmsConfig]
2336
+ #
2337
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2338
+ #
2339
+ # @example Basic example
2340
+ # require "google/cloud/netapp/v1"
2341
+ #
2342
+ # # Create a client object. The client can be reused for multiple calls.
2343
+ # client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
2344
+ #
2345
+ # # Create a request. To set request fields, pass in keyword arguments.
2346
+ # request = Google::Cloud::NetApp::V1::GetKmsConfigRequest.new
2347
+ #
2348
+ # # Call the get_kms_config method.
2349
+ # result = client.get_kms_config request
2350
+ #
2351
+ # # The returned object is of type Google::Cloud::NetApp::V1::KmsConfig.
2352
+ # p result
2353
+ #
2354
+ def get_kms_config request, options = nil
2355
+ raise ::ArgumentError, "request must be provided" if request.nil?
2356
+
2357
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::GetKmsConfigRequest
2358
+
2359
+ # Converts hash and nil to an options object
2360
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2361
+
2362
+ # Customize the options with defaults
2363
+ call_metadata = @config.rpcs.get_kms_config.metadata.to_h
2364
+
2365
+ # Set x-goog-api-client and x-goog-user-project headers
2366
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2367
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2368
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
2369
+ transports_version_send: [:rest]
2370
+
2371
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2372
+
2373
+ options.apply_defaults timeout: @config.rpcs.get_kms_config.timeout,
2374
+ metadata: call_metadata,
2375
+ retry_policy: @config.rpcs.get_kms_config.retry_policy
2376
+
2377
+ options.apply_defaults timeout: @config.timeout,
2378
+ metadata: @config.metadata,
2379
+ retry_policy: @config.retry_policy
2380
+
2381
+ @net_app_stub.get_kms_config request, options do |result, operation|
2382
+ yield result, operation if block_given?
2383
+ return result
2384
+ end
2385
+ rescue ::Gapic::Rest::Error => e
2386
+ raise ::Google::Cloud::Error.from_error(e)
2387
+ end
2388
+
2389
+ ##
2390
+ # Updates the Kms config properties with the full spec
2391
+ #
2392
+ # @overload update_kms_config(request, options = nil)
2393
+ # Pass arguments to `update_kms_config` via a request object, either of type
2394
+ # {::Google::Cloud::NetApp::V1::UpdateKmsConfigRequest} or an equivalent Hash.
2395
+ #
2396
+ # @param request [::Google::Cloud::NetApp::V1::UpdateKmsConfigRequest, ::Hash]
2397
+ # A request object representing the call parameters. Required. To specify no
2398
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2399
+ # @param options [::Gapic::CallOptions, ::Hash]
2400
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2401
+ #
2402
+ # @overload update_kms_config(update_mask: nil, kms_config: nil)
2403
+ # Pass arguments to `update_kms_config` via keyword arguments. Note that at
2404
+ # least one keyword argument is required. To specify no parameters, or to keep all
2405
+ # the default parameter values, pass an empty Hash as a request object (see above).
2406
+ #
2407
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
2408
+ # Required. Field mask is used to specify the fields to be overwritten in the
2409
+ # KmsConfig resource by the update.
2410
+ # The fields specified in the update_mask are relative to the resource, not
2411
+ # the full request. A field will be overwritten if it is in the mask. If the
2412
+ # user does not provide a mask then all fields will be overwritten.
2413
+ # @param kms_config [::Google::Cloud::NetApp::V1::KmsConfig, ::Hash]
2414
+ # Required. The KmsConfig being updated
2415
+ # @yield [result, operation] Access the result along with the TransportOperation object
2416
+ # @yieldparam result [::Gapic::Operation]
2417
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2418
+ #
2419
+ # @return [::Gapic::Operation]
2420
+ #
2421
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2422
+ #
2423
+ # @example Basic example
2424
+ # require "google/cloud/netapp/v1"
2425
+ #
2426
+ # # Create a client object. The client can be reused for multiple calls.
2427
+ # client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
2428
+ #
2429
+ # # Create a request. To set request fields, pass in keyword arguments.
2430
+ # request = Google::Cloud::NetApp::V1::UpdateKmsConfigRequest.new
2431
+ #
2432
+ # # Call the update_kms_config method.
2433
+ # result = client.update_kms_config request
2434
+ #
2435
+ # # The returned object is of type Gapic::Operation. You can use it to
2436
+ # # check the status of an operation, cancel it, or wait for results.
2437
+ # # Here is how to wait for a response.
2438
+ # result.wait_until_done! timeout: 60
2439
+ # if result.response?
2440
+ # p result.response
2441
+ # else
2442
+ # puts "No response received."
2443
+ # end
2444
+ #
2445
+ def update_kms_config request, options = nil
2446
+ raise ::ArgumentError, "request must be provided" if request.nil?
2447
+
2448
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::UpdateKmsConfigRequest
2449
+
2450
+ # Converts hash and nil to an options object
2451
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2452
+
2453
+ # Customize the options with defaults
2454
+ call_metadata = @config.rpcs.update_kms_config.metadata.to_h
2455
+
2456
+ # Set x-goog-api-client and x-goog-user-project headers
2457
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2458
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2459
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
2460
+ transports_version_send: [:rest]
2461
+
2462
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2463
+
2464
+ options.apply_defaults timeout: @config.rpcs.update_kms_config.timeout,
2465
+ metadata: call_metadata,
2466
+ retry_policy: @config.rpcs.update_kms_config.retry_policy
2467
+
2468
+ options.apply_defaults timeout: @config.timeout,
2469
+ metadata: @config.metadata,
2470
+ retry_policy: @config.retry_policy
2471
+
2472
+ @net_app_stub.update_kms_config request, options do |result, operation|
2473
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2474
+ yield result, operation if block_given?
2475
+ return result
2476
+ end
2477
+ rescue ::Gapic::Rest::Error => e
2478
+ raise ::Google::Cloud::Error.from_error(e)
2479
+ end
2480
+
2481
+ ##
2482
+ # Encrypt the existing volumes without CMEK encryption with the desired the
2483
+ # KMS config for the whole region.
2484
+ #
2485
+ # @overload encrypt_volumes(request, options = nil)
2486
+ # Pass arguments to `encrypt_volumes` via a request object, either of type
2487
+ # {::Google::Cloud::NetApp::V1::EncryptVolumesRequest} or an equivalent Hash.
2488
+ #
2489
+ # @param request [::Google::Cloud::NetApp::V1::EncryptVolumesRequest, ::Hash]
2490
+ # A request object representing the call parameters. Required. To specify no
2491
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2492
+ # @param options [::Gapic::CallOptions, ::Hash]
2493
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2494
+ #
2495
+ # @overload encrypt_volumes(name: nil)
2496
+ # Pass arguments to `encrypt_volumes` via keyword arguments. Note that at
2497
+ # least one keyword argument is required. To specify no parameters, or to keep all
2498
+ # the default parameter values, pass an empty Hash as a request object (see above).
2499
+ #
2500
+ # @param name [::String]
2501
+ # Required. Name of the KmsConfig.
2502
+ # @yield [result, operation] Access the result along with the TransportOperation object
2503
+ # @yieldparam result [::Gapic::Operation]
2504
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2505
+ #
2506
+ # @return [::Gapic::Operation]
2507
+ #
2508
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2509
+ #
2510
+ # @example Basic example
2511
+ # require "google/cloud/netapp/v1"
2512
+ #
2513
+ # # Create a client object. The client can be reused for multiple calls.
2514
+ # client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
2515
+ #
2516
+ # # Create a request. To set request fields, pass in keyword arguments.
2517
+ # request = Google::Cloud::NetApp::V1::EncryptVolumesRequest.new
2518
+ #
2519
+ # # Call the encrypt_volumes method.
2520
+ # result = client.encrypt_volumes request
2521
+ #
2522
+ # # The returned object is of type Gapic::Operation. You can use it to
2523
+ # # check the status of an operation, cancel it, or wait for results.
2524
+ # # Here is how to wait for a response.
2525
+ # result.wait_until_done! timeout: 60
2526
+ # if result.response?
2527
+ # p result.response
2528
+ # else
2529
+ # puts "No response received."
2530
+ # end
2531
+ #
2532
+ def encrypt_volumes request, options = nil
2533
+ raise ::ArgumentError, "request must be provided" if request.nil?
2534
+
2535
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::EncryptVolumesRequest
2536
+
2537
+ # Converts hash and nil to an options object
2538
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2539
+
2540
+ # Customize the options with defaults
2541
+ call_metadata = @config.rpcs.encrypt_volumes.metadata.to_h
2542
+
2543
+ # Set x-goog-api-client and x-goog-user-project headers
2544
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2545
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2546
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
2547
+ transports_version_send: [:rest]
2548
+
2549
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2550
+
2551
+ options.apply_defaults timeout: @config.rpcs.encrypt_volumes.timeout,
2552
+ metadata: call_metadata,
2553
+ retry_policy: @config.rpcs.encrypt_volumes.retry_policy
2554
+
2555
+ options.apply_defaults timeout: @config.timeout,
2556
+ metadata: @config.metadata,
2557
+ retry_policy: @config.retry_policy
2558
+
2559
+ @net_app_stub.encrypt_volumes request, options do |result, operation|
2560
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2561
+ yield result, operation if block_given?
2562
+ return result
2563
+ end
2564
+ rescue ::Gapic::Rest::Error => e
2565
+ raise ::Google::Cloud::Error.from_error(e)
2566
+ end
2567
+
2568
+ ##
2569
+ # Verifies KMS config reachability.
2570
+ #
2571
+ # @overload verify_kms_config(request, options = nil)
2572
+ # Pass arguments to `verify_kms_config` via a request object, either of type
2573
+ # {::Google::Cloud::NetApp::V1::VerifyKmsConfigRequest} or an equivalent Hash.
2574
+ #
2575
+ # @param request [::Google::Cloud::NetApp::V1::VerifyKmsConfigRequest, ::Hash]
2576
+ # A request object representing the call parameters. Required. To specify no
2577
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2578
+ # @param options [::Gapic::CallOptions, ::Hash]
2579
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2580
+ #
2581
+ # @overload verify_kms_config(name: nil)
2582
+ # Pass arguments to `verify_kms_config` via keyword arguments. Note that at
2583
+ # least one keyword argument is required. To specify no parameters, or to keep all
2584
+ # the default parameter values, pass an empty Hash as a request object (see above).
2585
+ #
2586
+ # @param name [::String]
2587
+ # Required. Name of the KMS Config to be verified.
2588
+ # @yield [result, operation] Access the result along with the TransportOperation object
2589
+ # @yieldparam result [::Google::Cloud::NetApp::V1::VerifyKmsConfigResponse]
2590
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2591
+ #
2592
+ # @return [::Google::Cloud::NetApp::V1::VerifyKmsConfigResponse]
2593
+ #
2594
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2595
+ #
2596
+ # @example Basic example
2597
+ # require "google/cloud/netapp/v1"
2598
+ #
2599
+ # # Create a client object. The client can be reused for multiple calls.
2600
+ # client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
2601
+ #
2602
+ # # Create a request. To set request fields, pass in keyword arguments.
2603
+ # request = Google::Cloud::NetApp::V1::VerifyKmsConfigRequest.new
2604
+ #
2605
+ # # Call the verify_kms_config method.
2606
+ # result = client.verify_kms_config request
2607
+ #
2608
+ # # The returned object is of type Google::Cloud::NetApp::V1::VerifyKmsConfigResponse.
2609
+ # p result
2610
+ #
2611
+ def verify_kms_config request, options = nil
2612
+ raise ::ArgumentError, "request must be provided" if request.nil?
2613
+
2614
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::VerifyKmsConfigRequest
2615
+
2616
+ # Converts hash and nil to an options object
2617
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2618
+
2619
+ # Customize the options with defaults
2620
+ call_metadata = @config.rpcs.verify_kms_config.metadata.to_h
2621
+
2622
+ # Set x-goog-api-client and x-goog-user-project headers
2623
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2624
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2625
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
2626
+ transports_version_send: [:rest]
2627
+
2628
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2629
+
2630
+ options.apply_defaults timeout: @config.rpcs.verify_kms_config.timeout,
2631
+ metadata: call_metadata,
2632
+ retry_policy: @config.rpcs.verify_kms_config.retry_policy
2633
+
2634
+ options.apply_defaults timeout: @config.timeout,
2635
+ metadata: @config.metadata,
2636
+ retry_policy: @config.retry_policy
2637
+
2638
+ @net_app_stub.verify_kms_config request, options do |result, operation|
2639
+ yield result, operation if block_given?
2640
+ return result
2641
+ end
2642
+ rescue ::Gapic::Rest::Error => e
2643
+ raise ::Google::Cloud::Error.from_error(e)
2644
+ end
2645
+
2646
+ ##
2647
+ # Warning! This operation will permanently delete the Kms config.
2648
+ #
2649
+ # @overload delete_kms_config(request, options = nil)
2650
+ # Pass arguments to `delete_kms_config` via a request object, either of type
2651
+ # {::Google::Cloud::NetApp::V1::DeleteKmsConfigRequest} or an equivalent Hash.
2652
+ #
2653
+ # @param request [::Google::Cloud::NetApp::V1::DeleteKmsConfigRequest, ::Hash]
2654
+ # A request object representing the call parameters. Required. To specify no
2655
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2656
+ # @param options [::Gapic::CallOptions, ::Hash]
2657
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2658
+ #
2659
+ # @overload delete_kms_config(name: nil)
2660
+ # Pass arguments to `delete_kms_config` via keyword arguments. Note that at
2661
+ # least one keyword argument is required. To specify no parameters, or to keep all
2662
+ # the default parameter values, pass an empty Hash as a request object (see above).
2663
+ #
2664
+ # @param name [::String]
2665
+ # Required. Name of the KmsConfig.
2666
+ # @yield [result, operation] Access the result along with the TransportOperation object
2667
+ # @yieldparam result [::Gapic::Operation]
2668
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2669
+ #
2670
+ # @return [::Gapic::Operation]
2671
+ #
2672
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2673
+ #
2674
+ # @example Basic example
2675
+ # require "google/cloud/netapp/v1"
2676
+ #
2677
+ # # Create a client object. The client can be reused for multiple calls.
2678
+ # client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
2679
+ #
2680
+ # # Create a request. To set request fields, pass in keyword arguments.
2681
+ # request = Google::Cloud::NetApp::V1::DeleteKmsConfigRequest.new
2682
+ #
2683
+ # # Call the delete_kms_config method.
2684
+ # result = client.delete_kms_config request
2685
+ #
2686
+ # # The returned object is of type Gapic::Operation. You can use it to
2687
+ # # check the status of an operation, cancel it, or wait for results.
2688
+ # # Here is how to wait for a response.
2689
+ # result.wait_until_done! timeout: 60
2690
+ # if result.response?
2691
+ # p result.response
2692
+ # else
2693
+ # puts "No response received."
2694
+ # end
2695
+ #
2696
+ def delete_kms_config request, options = nil
2697
+ raise ::ArgumentError, "request must be provided" if request.nil?
2698
+
2699
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::DeleteKmsConfigRequest
2700
+
2701
+ # Converts hash and nil to an options object
2702
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2703
+
2704
+ # Customize the options with defaults
2705
+ call_metadata = @config.rpcs.delete_kms_config.metadata.to_h
2706
+
2707
+ # Set x-goog-api-client and x-goog-user-project headers
2708
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2709
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2710
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
2711
+ transports_version_send: [:rest]
2712
+
2713
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2714
+
2715
+ options.apply_defaults timeout: @config.rpcs.delete_kms_config.timeout,
2716
+ metadata: call_metadata,
2717
+ retry_policy: @config.rpcs.delete_kms_config.retry_policy
2718
+
2719
+ options.apply_defaults timeout: @config.timeout,
2720
+ metadata: @config.metadata,
2721
+ retry_policy: @config.retry_policy
2722
+
2723
+ @net_app_stub.delete_kms_config request, options do |result, operation|
2724
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2725
+ yield result, operation if block_given?
2726
+ return result
2727
+ end
2728
+ rescue ::Gapic::Rest::Error => e
2729
+ raise ::Google::Cloud::Error.from_error(e)
2730
+ end
2731
+
2732
+ ##
2733
+ # Returns descriptions of all replications for a volume.
2734
+ #
2735
+ # @overload list_replications(request, options = nil)
2736
+ # Pass arguments to `list_replications` via a request object, either of type
2737
+ # {::Google::Cloud::NetApp::V1::ListReplicationsRequest} or an equivalent Hash.
2738
+ #
2739
+ # @param request [::Google::Cloud::NetApp::V1::ListReplicationsRequest, ::Hash]
2740
+ # A request object representing the call parameters. Required. To specify no
2741
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2742
+ # @param options [::Gapic::CallOptions, ::Hash]
2743
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2744
+ #
2745
+ # @overload list_replications(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil)
2746
+ # Pass arguments to `list_replications` via keyword arguments. Note that at
2747
+ # least one keyword argument is required. To specify no parameters, or to keep all
2748
+ # the default parameter values, pass an empty Hash as a request object (see above).
2749
+ #
2750
+ # @param parent [::String]
2751
+ # Required. The volume for which to retrieve replication information,
2752
+ # in the format
2753
+ # `projects/{project_id}/locations/{location}/volumes/{volume_id}`.
2754
+ # @param page_size [::Integer]
2755
+ # The maximum number of items to return.
2756
+ # @param page_token [::String]
2757
+ # The next_page_token value to use if there are additional
2758
+ # results to retrieve for this list request.
2759
+ # @param order_by [::String]
2760
+ # Sort results. Supported values are "name", "name desc" or "" (unsorted).
2761
+ # @param filter [::String]
2762
+ # List filter.
2763
+ # @yield [result, operation] Access the result along with the TransportOperation object
2764
+ # @yieldparam result [::Google::Cloud::NetApp::V1::ListReplicationsResponse]
2765
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2766
+ #
2767
+ # @return [::Google::Cloud::NetApp::V1::ListReplicationsResponse]
2768
+ #
2769
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2770
+ #
2771
+ # @example Basic example
2772
+ # require "google/cloud/netapp/v1"
2773
+ #
2774
+ # # Create a client object. The client can be reused for multiple calls.
2775
+ # client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
2776
+ #
2777
+ # # Create a request. To set request fields, pass in keyword arguments.
2778
+ # request = Google::Cloud::NetApp::V1::ListReplicationsRequest.new
2779
+ #
2780
+ # # Call the list_replications method.
2781
+ # result = client.list_replications request
2782
+ #
2783
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2784
+ # # over elements, and API calls will be issued to fetch pages as needed.
2785
+ # result.each do |item|
2786
+ # # Each element is of type ::Google::Cloud::NetApp::V1::Replication.
2787
+ # p item
2788
+ # end
2789
+ #
2790
+ def list_replications request, options = nil
2791
+ raise ::ArgumentError, "request must be provided" if request.nil?
2792
+
2793
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::ListReplicationsRequest
2794
+
2795
+ # Converts hash and nil to an options object
2796
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2797
+
2798
+ # Customize the options with defaults
2799
+ call_metadata = @config.rpcs.list_replications.metadata.to_h
2800
+
2801
+ # Set x-goog-api-client and x-goog-user-project headers
2802
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2803
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2804
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
2805
+ transports_version_send: [:rest]
2806
+
2807
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2808
+
2809
+ options.apply_defaults timeout: @config.rpcs.list_replications.timeout,
2810
+ metadata: call_metadata,
2811
+ retry_policy: @config.rpcs.list_replications.retry_policy
2812
+
2813
+ options.apply_defaults timeout: @config.timeout,
2814
+ metadata: @config.metadata,
2815
+ retry_policy: @config.retry_policy
2816
+
2817
+ @net_app_stub.list_replications request, options do |result, operation|
2818
+ yield result, operation if block_given?
2819
+ return result
2820
+ end
2821
+ rescue ::Gapic::Rest::Error => e
2822
+ raise ::Google::Cloud::Error.from_error(e)
2823
+ end
2824
+
2825
+ ##
2826
+ # Describe a replication for a volume.
2827
+ #
2828
+ # @overload get_replication(request, options = nil)
2829
+ # Pass arguments to `get_replication` via a request object, either of type
2830
+ # {::Google::Cloud::NetApp::V1::GetReplicationRequest} or an equivalent Hash.
2831
+ #
2832
+ # @param request [::Google::Cloud::NetApp::V1::GetReplicationRequest, ::Hash]
2833
+ # A request object representing the call parameters. Required. To specify no
2834
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2835
+ # @param options [::Gapic::CallOptions, ::Hash]
2836
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2837
+ #
2838
+ # @overload get_replication(name: nil)
2839
+ # Pass arguments to `get_replication` via keyword arguments. Note that at
2840
+ # least one keyword argument is required. To specify no parameters, or to keep all
2841
+ # the default parameter values, pass an empty Hash as a request object (see above).
2842
+ #
2843
+ # @param name [::String]
2844
+ # Required. The replication resource name, in the format
2845
+ # `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}`
2846
+ # @yield [result, operation] Access the result along with the TransportOperation object
2847
+ # @yieldparam result [::Google::Cloud::NetApp::V1::Replication]
2848
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2849
+ #
2850
+ # @return [::Google::Cloud::NetApp::V1::Replication]
2851
+ #
2852
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2853
+ #
2854
+ # @example Basic example
2855
+ # require "google/cloud/netapp/v1"
2856
+ #
2857
+ # # Create a client object. The client can be reused for multiple calls.
2858
+ # client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
2859
+ #
2860
+ # # Create a request. To set request fields, pass in keyword arguments.
2861
+ # request = Google::Cloud::NetApp::V1::GetReplicationRequest.new
2862
+ #
2863
+ # # Call the get_replication method.
2864
+ # result = client.get_replication request
2865
+ #
2866
+ # # The returned object is of type Google::Cloud::NetApp::V1::Replication.
2867
+ # p result
2868
+ #
2869
+ def get_replication request, options = nil
2870
+ raise ::ArgumentError, "request must be provided" if request.nil?
2871
+
2872
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::GetReplicationRequest
2873
+
2874
+ # Converts hash and nil to an options object
2875
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2876
+
2877
+ # Customize the options with defaults
2878
+ call_metadata = @config.rpcs.get_replication.metadata.to_h
2879
+
2880
+ # Set x-goog-api-client and x-goog-user-project headers
2881
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2882
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2883
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
2884
+ transports_version_send: [:rest]
2885
+
2886
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2887
+
2888
+ options.apply_defaults timeout: @config.rpcs.get_replication.timeout,
2889
+ metadata: call_metadata,
2890
+ retry_policy: @config.rpcs.get_replication.retry_policy
2891
+
2892
+ options.apply_defaults timeout: @config.timeout,
2893
+ metadata: @config.metadata,
2894
+ retry_policy: @config.retry_policy
2895
+
2896
+ @net_app_stub.get_replication request, options do |result, operation|
2897
+ yield result, operation if block_given?
2898
+ return result
2899
+ end
2900
+ rescue ::Gapic::Rest::Error => e
2901
+ raise ::Google::Cloud::Error.from_error(e)
2902
+ end
2903
+
2904
+ ##
2905
+ # Create a new replication for a volume.
2906
+ #
2907
+ # @overload create_replication(request, options = nil)
2908
+ # Pass arguments to `create_replication` via a request object, either of type
2909
+ # {::Google::Cloud::NetApp::V1::CreateReplicationRequest} or an equivalent Hash.
2910
+ #
2911
+ # @param request [::Google::Cloud::NetApp::V1::CreateReplicationRequest, ::Hash]
2912
+ # A request object representing the call parameters. Required. To specify no
2913
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2914
+ # @param options [::Gapic::CallOptions, ::Hash]
2915
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2916
+ #
2917
+ # @overload create_replication(parent: nil, replication: nil, replication_id: nil)
2918
+ # Pass arguments to `create_replication` via keyword arguments. Note that at
2919
+ # least one keyword argument is required. To specify no parameters, or to keep all
2920
+ # the default parameter values, pass an empty Hash as a request object (see above).
2921
+ #
2922
+ # @param parent [::String]
2923
+ # Required. The NetApp volume to create the replications of, in the format
2924
+ # `projects/{project_id}/locations/{location}/volumes/{volume_id}`
2925
+ # @param replication [::Google::Cloud::NetApp::V1::Replication, ::Hash]
2926
+ # Required. A replication resource
2927
+ # @param replication_id [::String]
2928
+ # Required. ID of the replication to create.
2929
+ # This value must start with a lowercase letter followed by up to 62
2930
+ # lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
2931
+ # @yield [result, operation] Access the result along with the TransportOperation object
2932
+ # @yieldparam result [::Gapic::Operation]
2933
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2934
+ #
2935
+ # @return [::Gapic::Operation]
2936
+ #
2937
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2938
+ #
2939
+ # @example Basic example
2940
+ # require "google/cloud/netapp/v1"
2941
+ #
2942
+ # # Create a client object. The client can be reused for multiple calls.
2943
+ # client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
2944
+ #
2945
+ # # Create a request. To set request fields, pass in keyword arguments.
2946
+ # request = Google::Cloud::NetApp::V1::CreateReplicationRequest.new
2947
+ #
2948
+ # # Call the create_replication method.
2949
+ # result = client.create_replication request
2950
+ #
2951
+ # # The returned object is of type Gapic::Operation. You can use it to
2952
+ # # check the status of an operation, cancel it, or wait for results.
2953
+ # # Here is how to wait for a response.
2954
+ # result.wait_until_done! timeout: 60
2955
+ # if result.response?
2956
+ # p result.response
2957
+ # else
2958
+ # puts "No response received."
2959
+ # end
2960
+ #
2961
+ def create_replication request, options = nil
2962
+ raise ::ArgumentError, "request must be provided" if request.nil?
2963
+
2964
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::CreateReplicationRequest
2965
+
2966
+ # Converts hash and nil to an options object
2967
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2968
+
2969
+ # Customize the options with defaults
2970
+ call_metadata = @config.rpcs.create_replication.metadata.to_h
2971
+
2972
+ # Set x-goog-api-client and x-goog-user-project headers
2973
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2974
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2975
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
2976
+ transports_version_send: [:rest]
2977
+
2978
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2979
+
2980
+ options.apply_defaults timeout: @config.rpcs.create_replication.timeout,
2981
+ metadata: call_metadata,
2982
+ retry_policy: @config.rpcs.create_replication.retry_policy
2983
+
2984
+ options.apply_defaults timeout: @config.timeout,
2985
+ metadata: @config.metadata,
2986
+ retry_policy: @config.retry_policy
2987
+
2988
+ @net_app_stub.create_replication request, options do |result, operation|
2989
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2990
+ yield result, operation if block_given?
2991
+ return result
2992
+ end
2993
+ rescue ::Gapic::Rest::Error => e
2994
+ raise ::Google::Cloud::Error.from_error(e)
2995
+ end
2996
+
2997
+ ##
2998
+ # Deletes a replication.
2999
+ #
3000
+ # @overload delete_replication(request, options = nil)
3001
+ # Pass arguments to `delete_replication` via a request object, either of type
3002
+ # {::Google::Cloud::NetApp::V1::DeleteReplicationRequest} or an equivalent Hash.
3003
+ #
3004
+ # @param request [::Google::Cloud::NetApp::V1::DeleteReplicationRequest, ::Hash]
3005
+ # A request object representing the call parameters. Required. To specify no
3006
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3007
+ # @param options [::Gapic::CallOptions, ::Hash]
3008
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3009
+ #
3010
+ # @overload delete_replication(name: nil)
3011
+ # Pass arguments to `delete_replication` via keyword arguments. Note that at
3012
+ # least one keyword argument is required. To specify no parameters, or to keep all
3013
+ # the default parameter values, pass an empty Hash as a request object (see above).
3014
+ #
3015
+ # @param name [::String]
3016
+ # Required. The replication resource name, in the format
3017
+ # `projects/*/locations/*/volumes/*/replications/{replication_id}`
3018
+ # @yield [result, operation] Access the result along with the TransportOperation object
3019
+ # @yieldparam result [::Gapic::Operation]
3020
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3021
+ #
3022
+ # @return [::Gapic::Operation]
3023
+ #
3024
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3025
+ #
3026
+ # @example Basic example
3027
+ # require "google/cloud/netapp/v1"
3028
+ #
3029
+ # # Create a client object. The client can be reused for multiple calls.
3030
+ # client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
3031
+ #
3032
+ # # Create a request. To set request fields, pass in keyword arguments.
3033
+ # request = Google::Cloud::NetApp::V1::DeleteReplicationRequest.new
3034
+ #
3035
+ # # Call the delete_replication method.
3036
+ # result = client.delete_replication request
3037
+ #
3038
+ # # The returned object is of type Gapic::Operation. You can use it to
3039
+ # # check the status of an operation, cancel it, or wait for results.
3040
+ # # Here is how to wait for a response.
3041
+ # result.wait_until_done! timeout: 60
3042
+ # if result.response?
3043
+ # p result.response
3044
+ # else
3045
+ # puts "No response received."
3046
+ # end
3047
+ #
3048
+ def delete_replication request, options = nil
3049
+ raise ::ArgumentError, "request must be provided" if request.nil?
3050
+
3051
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::DeleteReplicationRequest
3052
+
3053
+ # Converts hash and nil to an options object
3054
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3055
+
3056
+ # Customize the options with defaults
3057
+ call_metadata = @config.rpcs.delete_replication.metadata.to_h
3058
+
3059
+ # Set x-goog-api-client and x-goog-user-project headers
3060
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3061
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3062
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
3063
+ transports_version_send: [:rest]
3064
+
3065
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3066
+
3067
+ options.apply_defaults timeout: @config.rpcs.delete_replication.timeout,
3068
+ metadata: call_metadata,
3069
+ retry_policy: @config.rpcs.delete_replication.retry_policy
3070
+
3071
+ options.apply_defaults timeout: @config.timeout,
3072
+ metadata: @config.metadata,
3073
+ retry_policy: @config.retry_policy
3074
+
3075
+ @net_app_stub.delete_replication request, options do |result, operation|
3076
+ result = ::Gapic::Operation.new result, @operations_client, options: options
3077
+ yield result, operation if block_given?
3078
+ return result
3079
+ end
3080
+ rescue ::Gapic::Rest::Error => e
3081
+ raise ::Google::Cloud::Error.from_error(e)
3082
+ end
3083
+
3084
+ ##
3085
+ # Updates the settings of a specific replication.
3086
+ #
3087
+ # @overload update_replication(request, options = nil)
3088
+ # Pass arguments to `update_replication` via a request object, either of type
3089
+ # {::Google::Cloud::NetApp::V1::UpdateReplicationRequest} or an equivalent Hash.
3090
+ #
3091
+ # @param request [::Google::Cloud::NetApp::V1::UpdateReplicationRequest, ::Hash]
3092
+ # A request object representing the call parameters. Required. To specify no
3093
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3094
+ # @param options [::Gapic::CallOptions, ::Hash]
3095
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3096
+ #
3097
+ # @overload update_replication(update_mask: nil, replication: nil)
3098
+ # Pass arguments to `update_replication` via keyword arguments. Note that at
3099
+ # least one keyword argument is required. To specify no parameters, or to keep all
3100
+ # the default parameter values, pass an empty Hash as a request object (see above).
3101
+ #
3102
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
3103
+ # Required. Mask of fields to update. At least one path must be supplied in
3104
+ # this field.
3105
+ # @param replication [::Google::Cloud::NetApp::V1::Replication, ::Hash]
3106
+ # Required. A replication resource
3107
+ # @yield [result, operation] Access the result along with the TransportOperation object
3108
+ # @yieldparam result [::Gapic::Operation]
3109
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3110
+ #
3111
+ # @return [::Gapic::Operation]
3112
+ #
3113
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3114
+ #
3115
+ # @example Basic example
3116
+ # require "google/cloud/netapp/v1"
3117
+ #
3118
+ # # Create a client object. The client can be reused for multiple calls.
3119
+ # client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
3120
+ #
3121
+ # # Create a request. To set request fields, pass in keyword arguments.
3122
+ # request = Google::Cloud::NetApp::V1::UpdateReplicationRequest.new
3123
+ #
3124
+ # # Call the update_replication method.
3125
+ # result = client.update_replication request
3126
+ #
3127
+ # # The returned object is of type Gapic::Operation. You can use it to
3128
+ # # check the status of an operation, cancel it, or wait for results.
3129
+ # # Here is how to wait for a response.
3130
+ # result.wait_until_done! timeout: 60
3131
+ # if result.response?
3132
+ # p result.response
3133
+ # else
3134
+ # puts "No response received."
3135
+ # end
3136
+ #
3137
+ def update_replication request, options = nil
3138
+ raise ::ArgumentError, "request must be provided" if request.nil?
3139
+
3140
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::UpdateReplicationRequest
3141
+
3142
+ # Converts hash and nil to an options object
3143
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3144
+
3145
+ # Customize the options with defaults
3146
+ call_metadata = @config.rpcs.update_replication.metadata.to_h
3147
+
3148
+ # Set x-goog-api-client and x-goog-user-project headers
3149
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3150
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3151
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
3152
+ transports_version_send: [:rest]
3153
+
3154
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3155
+
3156
+ options.apply_defaults timeout: @config.rpcs.update_replication.timeout,
3157
+ metadata: call_metadata,
3158
+ retry_policy: @config.rpcs.update_replication.retry_policy
3159
+
3160
+ options.apply_defaults timeout: @config.timeout,
3161
+ metadata: @config.metadata,
3162
+ retry_policy: @config.retry_policy
3163
+
3164
+ @net_app_stub.update_replication request, options do |result, operation|
3165
+ result = ::Gapic::Operation.new result, @operations_client, options: options
3166
+ yield result, operation if block_given?
3167
+ return result
3168
+ end
3169
+ rescue ::Gapic::Rest::Error => e
3170
+ raise ::Google::Cloud::Error.from_error(e)
3171
+ end
3172
+
3173
+ ##
3174
+ # Stop Cross Region Replication.
3175
+ #
3176
+ # @overload stop_replication(request, options = nil)
3177
+ # Pass arguments to `stop_replication` via a request object, either of type
3178
+ # {::Google::Cloud::NetApp::V1::StopReplicationRequest} or an equivalent Hash.
3179
+ #
3180
+ # @param request [::Google::Cloud::NetApp::V1::StopReplicationRequest, ::Hash]
3181
+ # A request object representing the call parameters. Required. To specify no
3182
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3183
+ # @param options [::Gapic::CallOptions, ::Hash]
3184
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3185
+ #
3186
+ # @overload stop_replication(name: nil, force: nil)
3187
+ # Pass arguments to `stop_replication` via keyword arguments. Note that at
3188
+ # least one keyword argument is required. To specify no parameters, or to keep all
3189
+ # the default parameter values, pass an empty Hash as a request object (see above).
3190
+ #
3191
+ # @param name [::String]
3192
+ # Required. The resource name of the replication, in the format of
3193
+ # projects/\\{project_id}/locations/\\{location}/volumes/\\{volume_id}/replications/\\{replication_id}.
3194
+ # @param force [::Boolean]
3195
+ # Indicates whether to stop replication forcefully while data transfer is in
3196
+ # progress.
3197
+ # Warning! if force is true, this will abort any current transfers
3198
+ # and can lead to data loss due to partial transfer.
3199
+ # If force is false, stop replication will fail while data transfer is in
3200
+ # progress and you will need to retry later.
3201
+ # @yield [result, operation] Access the result along with the TransportOperation object
3202
+ # @yieldparam result [::Gapic::Operation]
3203
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3204
+ #
3205
+ # @return [::Gapic::Operation]
3206
+ #
3207
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3208
+ #
3209
+ # @example Basic example
3210
+ # require "google/cloud/netapp/v1"
3211
+ #
3212
+ # # Create a client object. The client can be reused for multiple calls.
3213
+ # client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
3214
+ #
3215
+ # # Create a request. To set request fields, pass in keyword arguments.
3216
+ # request = Google::Cloud::NetApp::V1::StopReplicationRequest.new
3217
+ #
3218
+ # # Call the stop_replication method.
3219
+ # result = client.stop_replication request
3220
+ #
3221
+ # # The returned object is of type Gapic::Operation. You can use it to
3222
+ # # check the status of an operation, cancel it, or wait for results.
3223
+ # # Here is how to wait for a response.
3224
+ # result.wait_until_done! timeout: 60
3225
+ # if result.response?
3226
+ # p result.response
3227
+ # else
3228
+ # puts "No response received."
3229
+ # end
3230
+ #
3231
+ def stop_replication request, options = nil
3232
+ raise ::ArgumentError, "request must be provided" if request.nil?
3233
+
3234
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::StopReplicationRequest
3235
+
3236
+ # Converts hash and nil to an options object
3237
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3238
+
3239
+ # Customize the options with defaults
3240
+ call_metadata = @config.rpcs.stop_replication.metadata.to_h
3241
+
3242
+ # Set x-goog-api-client and x-goog-user-project headers
3243
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3244
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3245
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
3246
+ transports_version_send: [:rest]
3247
+
3248
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3249
+
3250
+ options.apply_defaults timeout: @config.rpcs.stop_replication.timeout,
3251
+ metadata: call_metadata,
3252
+ retry_policy: @config.rpcs.stop_replication.retry_policy
3253
+
3254
+ options.apply_defaults timeout: @config.timeout,
3255
+ metadata: @config.metadata,
3256
+ retry_policy: @config.retry_policy
3257
+
3258
+ @net_app_stub.stop_replication request, options do |result, operation|
3259
+ result = ::Gapic::Operation.new result, @operations_client, options: options
3260
+ yield result, operation if block_given?
3261
+ return result
3262
+ end
3263
+ rescue ::Gapic::Rest::Error => e
3264
+ raise ::Google::Cloud::Error.from_error(e)
3265
+ end
3266
+
3267
+ ##
3268
+ # Resume Cross Region Replication.
3269
+ #
3270
+ # @overload resume_replication(request, options = nil)
3271
+ # Pass arguments to `resume_replication` via a request object, either of type
3272
+ # {::Google::Cloud::NetApp::V1::ResumeReplicationRequest} or an equivalent Hash.
3273
+ #
3274
+ # @param request [::Google::Cloud::NetApp::V1::ResumeReplicationRequest, ::Hash]
3275
+ # A request object representing the call parameters. Required. To specify no
3276
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3277
+ # @param options [::Gapic::CallOptions, ::Hash]
3278
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3279
+ #
3280
+ # @overload resume_replication(name: nil)
3281
+ # Pass arguments to `resume_replication` via keyword arguments. Note that at
3282
+ # least one keyword argument is required. To specify no parameters, or to keep all
3283
+ # the default parameter values, pass an empty Hash as a request object (see above).
3284
+ #
3285
+ # @param name [::String]
3286
+ # Required. The resource name of the replication, in the format of
3287
+ # projects/\\{project_id}/locations/\\{location}/volumes/\\{volume_id}/replications/\\{replication_id}.
3288
+ # @yield [result, operation] Access the result along with the TransportOperation object
3289
+ # @yieldparam result [::Gapic::Operation]
3290
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3291
+ #
3292
+ # @return [::Gapic::Operation]
3293
+ #
3294
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3295
+ #
3296
+ # @example Basic example
3297
+ # require "google/cloud/netapp/v1"
3298
+ #
3299
+ # # Create a client object. The client can be reused for multiple calls.
3300
+ # client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
3301
+ #
3302
+ # # Create a request. To set request fields, pass in keyword arguments.
3303
+ # request = Google::Cloud::NetApp::V1::ResumeReplicationRequest.new
3304
+ #
3305
+ # # Call the resume_replication method.
3306
+ # result = client.resume_replication request
3307
+ #
3308
+ # # The returned object is of type Gapic::Operation. You can use it to
3309
+ # # check the status of an operation, cancel it, or wait for results.
3310
+ # # Here is how to wait for a response.
3311
+ # result.wait_until_done! timeout: 60
3312
+ # if result.response?
3313
+ # p result.response
3314
+ # else
3315
+ # puts "No response received."
3316
+ # end
3317
+ #
3318
+ def resume_replication request, options = nil
3319
+ raise ::ArgumentError, "request must be provided" if request.nil?
3320
+
3321
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::ResumeReplicationRequest
3322
+
3323
+ # Converts hash and nil to an options object
3324
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3325
+
3326
+ # Customize the options with defaults
3327
+ call_metadata = @config.rpcs.resume_replication.metadata.to_h
3328
+
3329
+ # Set x-goog-api-client and x-goog-user-project headers
3330
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3331
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3332
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
3333
+ transports_version_send: [:rest]
3334
+
3335
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3336
+
3337
+ options.apply_defaults timeout: @config.rpcs.resume_replication.timeout,
3338
+ metadata: call_metadata,
3339
+ retry_policy: @config.rpcs.resume_replication.retry_policy
3340
+
3341
+ options.apply_defaults timeout: @config.timeout,
3342
+ metadata: @config.metadata,
3343
+ retry_policy: @config.retry_policy
3344
+
3345
+ @net_app_stub.resume_replication request, options do |result, operation|
3346
+ result = ::Gapic::Operation.new result, @operations_client, options: options
3347
+ yield result, operation if block_given?
3348
+ return result
3349
+ end
3350
+ rescue ::Gapic::Rest::Error => e
3351
+ raise ::Google::Cloud::Error.from_error(e)
3352
+ end
3353
+
3354
+ ##
3355
+ # Reverses direction of replication. Source becomes destination and
3356
+ # destination becomes source.
3357
+ #
3358
+ # @overload reverse_replication_direction(request, options = nil)
3359
+ # Pass arguments to `reverse_replication_direction` via a request object, either of type
3360
+ # {::Google::Cloud::NetApp::V1::ReverseReplicationDirectionRequest} or an equivalent Hash.
3361
+ #
3362
+ # @param request [::Google::Cloud::NetApp::V1::ReverseReplicationDirectionRequest, ::Hash]
3363
+ # A request object representing the call parameters. Required. To specify no
3364
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3365
+ # @param options [::Gapic::CallOptions, ::Hash]
3366
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3367
+ #
3368
+ # @overload reverse_replication_direction(name: nil)
3369
+ # Pass arguments to `reverse_replication_direction` via keyword arguments. Note that at
3370
+ # least one keyword argument is required. To specify no parameters, or to keep all
3371
+ # the default parameter values, pass an empty Hash as a request object (see above).
3372
+ #
3373
+ # @param name [::String]
3374
+ # Required. The resource name of the replication, in the format of
3375
+ # projects/\\{project_id}/locations/\\{location}/volumes/\\{volume_id}/replications/\\{replication_id}.
3376
+ # @yield [result, operation] Access the result along with the TransportOperation object
3377
+ # @yieldparam result [::Gapic::Operation]
3378
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3379
+ #
3380
+ # @return [::Gapic::Operation]
3381
+ #
3382
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3383
+ #
3384
+ # @example Basic example
3385
+ # require "google/cloud/netapp/v1"
3386
+ #
3387
+ # # Create a client object. The client can be reused for multiple calls.
3388
+ # client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
3389
+ #
3390
+ # # Create a request. To set request fields, pass in keyword arguments.
3391
+ # request = Google::Cloud::NetApp::V1::ReverseReplicationDirectionRequest.new
3392
+ #
3393
+ # # Call the reverse_replication_direction method.
3394
+ # result = client.reverse_replication_direction request
3395
+ #
3396
+ # # The returned object is of type Gapic::Operation. You can use it to
3397
+ # # check the status of an operation, cancel it, or wait for results.
3398
+ # # Here is how to wait for a response.
3399
+ # result.wait_until_done! timeout: 60
3400
+ # if result.response?
3401
+ # p result.response
3402
+ # else
3403
+ # puts "No response received."
3404
+ # end
3405
+ #
3406
+ def reverse_replication_direction request, options = nil
3407
+ raise ::ArgumentError, "request must be provided" if request.nil?
3408
+
3409
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::ReverseReplicationDirectionRequest
3410
+
3411
+ # Converts hash and nil to an options object
3412
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3413
+
3414
+ # Customize the options with defaults
3415
+ call_metadata = @config.rpcs.reverse_replication_direction.metadata.to_h
3416
+
3417
+ # Set x-goog-api-client and x-goog-user-project headers
3418
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3419
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3420
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
3421
+ transports_version_send: [:rest]
3422
+
3423
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3424
+
3425
+ options.apply_defaults timeout: @config.rpcs.reverse_replication_direction.timeout,
3426
+ metadata: call_metadata,
3427
+ retry_policy: @config.rpcs.reverse_replication_direction.retry_policy
3428
+
3429
+ options.apply_defaults timeout: @config.timeout,
3430
+ metadata: @config.metadata,
3431
+ retry_policy: @config.retry_policy
3432
+
3433
+ @net_app_stub.reverse_replication_direction request, options do |result, operation|
3434
+ result = ::Gapic::Operation.new result, @operations_client, options: options
3435
+ yield result, operation if block_given?
3436
+ return result
3437
+ end
3438
+ rescue ::Gapic::Rest::Error => e
3439
+ raise ::Google::Cloud::Error.from_error(e)
3440
+ end
3441
+
3442
+ ##
3443
+ # Configuration class for the NetApp REST API.
3444
+ #
3445
+ # This class represents the configuration for NetApp REST,
3446
+ # providing control over timeouts, retry behavior, logging, transport
3447
+ # parameters, and other low-level controls. Certain parameters can also be
3448
+ # applied individually to specific RPCs. See
3449
+ # {::Google::Cloud::NetApp::V1::NetApp::Rest::Client::Configuration::Rpcs}
3450
+ # for a list of RPCs that can be configured independently.
3451
+ #
3452
+ # Configuration can be applied globally to all clients, or to a single client
3453
+ # on construction.
3454
+ #
3455
+ # @example
3456
+ #
3457
+ # # Modify the global config, setting the timeout for
3458
+ # # list_storage_pools to 20 seconds,
3459
+ # # and all remaining timeouts to 10 seconds.
3460
+ # ::Google::Cloud::NetApp::V1::NetApp::Rest::Client.configure do |config|
3461
+ # config.timeout = 10.0
3462
+ # config.rpcs.list_storage_pools.timeout = 20.0
3463
+ # end
3464
+ #
3465
+ # # Apply the above configuration only to a new client.
3466
+ # client = ::Google::Cloud::NetApp::V1::NetApp::Rest::Client.new do |config|
3467
+ # config.timeout = 10.0
3468
+ # config.rpcs.list_storage_pools.timeout = 20.0
3469
+ # end
3470
+ #
3471
+ # @!attribute [rw] endpoint
3472
+ # The hostname or hostname:port of the service endpoint.
3473
+ # Defaults to `"netapp.googleapis.com"`.
3474
+ # @return [::String]
3475
+ # @!attribute [rw] credentials
3476
+ # Credentials to send with calls. You may provide any of the following types:
3477
+ # * (`String`) The path to a service account key file in JSON format
3478
+ # * (`Hash`) A service account key as a Hash
3479
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
3480
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
3481
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
3482
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
3483
+ # * (`nil`) indicating no credentials
3484
+ # @return [::Object]
3485
+ # @!attribute [rw] scope
3486
+ # The OAuth scopes
3487
+ # @return [::Array<::String>]
3488
+ # @!attribute [rw] lib_name
3489
+ # The library name as recorded in instrumentation and logging
3490
+ # @return [::String]
3491
+ # @!attribute [rw] lib_version
3492
+ # The library version as recorded in instrumentation and logging
3493
+ # @return [::String]
3494
+ # @!attribute [rw] timeout
3495
+ # The call timeout in seconds.
3496
+ # @return [::Numeric]
3497
+ # @!attribute [rw] metadata
3498
+ # Additional headers to be sent with the call.
3499
+ # @return [::Hash{::Symbol=>::String}]
3500
+ # @!attribute [rw] retry_policy
3501
+ # The retry policy. The value is a hash with the following keys:
3502
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
3503
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
3504
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
3505
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
3506
+ # trigger a retry.
3507
+ # @return [::Hash]
3508
+ # @!attribute [rw] quota_project
3509
+ # A separate project against which to charge quota.
3510
+ # @return [::String]
3511
+ #
3512
+ class Configuration
3513
+ extend ::Gapic::Config
3514
+
3515
+ DEFAULT_ENDPOINT = "netapp.googleapis.com"
3516
+
3517
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
3518
+ config_attr :credentials, nil do |value|
3519
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
3520
+ allowed.any? { |klass| klass === value }
3521
+ end
3522
+ config_attr :scope, nil, ::String, ::Array, nil
3523
+ config_attr :lib_name, nil, ::String, nil
3524
+ config_attr :lib_version, nil, ::String, nil
3525
+ config_attr :timeout, nil, ::Numeric, nil
3526
+ config_attr :metadata, nil, ::Hash, nil
3527
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
3528
+ config_attr :quota_project, nil, ::String, nil
3529
+
3530
+ # @private
3531
+ # Overrides for http bindings for the RPCs of this service
3532
+ # are only used when this service is used as mixin, and only
3533
+ # by the host service.
3534
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
3535
+ config_attr :bindings_override, {}, ::Hash, nil
3536
+
3537
+ # @private
3538
+ def initialize parent_config = nil
3539
+ @parent_config = parent_config unless parent_config.nil?
3540
+
3541
+ yield self if block_given?
3542
+ end
3543
+
3544
+ ##
3545
+ # Configurations for individual RPCs
3546
+ # @return [Rpcs]
3547
+ #
3548
+ def rpcs
3549
+ @rpcs ||= begin
3550
+ parent_rpcs = nil
3551
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
3552
+ Rpcs.new parent_rpcs
3553
+ end
3554
+ end
3555
+
3556
+ ##
3557
+ # Configuration RPC class for the NetApp API.
3558
+ #
3559
+ # Includes fields providing the configuration for each RPC in this service.
3560
+ # Each configuration object is of type `Gapic::Config::Method` and includes
3561
+ # the following configuration fields:
3562
+ #
3563
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
3564
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
3565
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
3566
+ # include the following keys:
3567
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
3568
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
3569
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
3570
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
3571
+ # trigger a retry.
3572
+ #
3573
+ class Rpcs
3574
+ ##
3575
+ # RPC-specific configuration for `list_storage_pools`
3576
+ # @return [::Gapic::Config::Method]
3577
+ #
3578
+ attr_reader :list_storage_pools
3579
+ ##
3580
+ # RPC-specific configuration for `create_storage_pool`
3581
+ # @return [::Gapic::Config::Method]
3582
+ #
3583
+ attr_reader :create_storage_pool
3584
+ ##
3585
+ # RPC-specific configuration for `get_storage_pool`
3586
+ # @return [::Gapic::Config::Method]
3587
+ #
3588
+ attr_reader :get_storage_pool
3589
+ ##
3590
+ # RPC-specific configuration for `update_storage_pool`
3591
+ # @return [::Gapic::Config::Method]
3592
+ #
3593
+ attr_reader :update_storage_pool
3594
+ ##
3595
+ # RPC-specific configuration for `delete_storage_pool`
3596
+ # @return [::Gapic::Config::Method]
3597
+ #
3598
+ attr_reader :delete_storage_pool
3599
+ ##
3600
+ # RPC-specific configuration for `list_volumes`
3601
+ # @return [::Gapic::Config::Method]
3602
+ #
3603
+ attr_reader :list_volumes
3604
+ ##
3605
+ # RPC-specific configuration for `get_volume`
3606
+ # @return [::Gapic::Config::Method]
3607
+ #
3608
+ attr_reader :get_volume
3609
+ ##
3610
+ # RPC-specific configuration for `create_volume`
3611
+ # @return [::Gapic::Config::Method]
3612
+ #
3613
+ attr_reader :create_volume
3614
+ ##
3615
+ # RPC-specific configuration for `update_volume`
3616
+ # @return [::Gapic::Config::Method]
3617
+ #
3618
+ attr_reader :update_volume
3619
+ ##
3620
+ # RPC-specific configuration for `delete_volume`
3621
+ # @return [::Gapic::Config::Method]
3622
+ #
3623
+ attr_reader :delete_volume
3624
+ ##
3625
+ # RPC-specific configuration for `revert_volume`
3626
+ # @return [::Gapic::Config::Method]
3627
+ #
3628
+ attr_reader :revert_volume
3629
+ ##
3630
+ # RPC-specific configuration for `list_snapshots`
3631
+ # @return [::Gapic::Config::Method]
3632
+ #
3633
+ attr_reader :list_snapshots
3634
+ ##
3635
+ # RPC-specific configuration for `get_snapshot`
3636
+ # @return [::Gapic::Config::Method]
3637
+ #
3638
+ attr_reader :get_snapshot
3639
+ ##
3640
+ # RPC-specific configuration for `create_snapshot`
3641
+ # @return [::Gapic::Config::Method]
3642
+ #
3643
+ attr_reader :create_snapshot
3644
+ ##
3645
+ # RPC-specific configuration for `delete_snapshot`
3646
+ # @return [::Gapic::Config::Method]
3647
+ #
3648
+ attr_reader :delete_snapshot
3649
+ ##
3650
+ # RPC-specific configuration for `update_snapshot`
3651
+ # @return [::Gapic::Config::Method]
3652
+ #
3653
+ attr_reader :update_snapshot
3654
+ ##
3655
+ # RPC-specific configuration for `list_active_directories`
3656
+ # @return [::Gapic::Config::Method]
3657
+ #
3658
+ attr_reader :list_active_directories
3659
+ ##
3660
+ # RPC-specific configuration for `get_active_directory`
3661
+ # @return [::Gapic::Config::Method]
3662
+ #
3663
+ attr_reader :get_active_directory
3664
+ ##
3665
+ # RPC-specific configuration for `create_active_directory`
3666
+ # @return [::Gapic::Config::Method]
3667
+ #
3668
+ attr_reader :create_active_directory
3669
+ ##
3670
+ # RPC-specific configuration for `update_active_directory`
3671
+ # @return [::Gapic::Config::Method]
3672
+ #
3673
+ attr_reader :update_active_directory
3674
+ ##
3675
+ # RPC-specific configuration for `delete_active_directory`
3676
+ # @return [::Gapic::Config::Method]
3677
+ #
3678
+ attr_reader :delete_active_directory
3679
+ ##
3680
+ # RPC-specific configuration for `list_kms_configs`
3681
+ # @return [::Gapic::Config::Method]
3682
+ #
3683
+ attr_reader :list_kms_configs
3684
+ ##
3685
+ # RPC-specific configuration for `create_kms_config`
3686
+ # @return [::Gapic::Config::Method]
3687
+ #
3688
+ attr_reader :create_kms_config
3689
+ ##
3690
+ # RPC-specific configuration for `get_kms_config`
3691
+ # @return [::Gapic::Config::Method]
3692
+ #
3693
+ attr_reader :get_kms_config
3694
+ ##
3695
+ # RPC-specific configuration for `update_kms_config`
3696
+ # @return [::Gapic::Config::Method]
3697
+ #
3698
+ attr_reader :update_kms_config
3699
+ ##
3700
+ # RPC-specific configuration for `encrypt_volumes`
3701
+ # @return [::Gapic::Config::Method]
3702
+ #
3703
+ attr_reader :encrypt_volumes
3704
+ ##
3705
+ # RPC-specific configuration for `verify_kms_config`
3706
+ # @return [::Gapic::Config::Method]
3707
+ #
3708
+ attr_reader :verify_kms_config
3709
+ ##
3710
+ # RPC-specific configuration for `delete_kms_config`
3711
+ # @return [::Gapic::Config::Method]
3712
+ #
3713
+ attr_reader :delete_kms_config
3714
+ ##
3715
+ # RPC-specific configuration for `list_replications`
3716
+ # @return [::Gapic::Config::Method]
3717
+ #
3718
+ attr_reader :list_replications
3719
+ ##
3720
+ # RPC-specific configuration for `get_replication`
3721
+ # @return [::Gapic::Config::Method]
3722
+ #
3723
+ attr_reader :get_replication
3724
+ ##
3725
+ # RPC-specific configuration for `create_replication`
3726
+ # @return [::Gapic::Config::Method]
3727
+ #
3728
+ attr_reader :create_replication
3729
+ ##
3730
+ # RPC-specific configuration for `delete_replication`
3731
+ # @return [::Gapic::Config::Method]
3732
+ #
3733
+ attr_reader :delete_replication
3734
+ ##
3735
+ # RPC-specific configuration for `update_replication`
3736
+ # @return [::Gapic::Config::Method]
3737
+ #
3738
+ attr_reader :update_replication
3739
+ ##
3740
+ # RPC-specific configuration for `stop_replication`
3741
+ # @return [::Gapic::Config::Method]
3742
+ #
3743
+ attr_reader :stop_replication
3744
+ ##
3745
+ # RPC-specific configuration for `resume_replication`
3746
+ # @return [::Gapic::Config::Method]
3747
+ #
3748
+ attr_reader :resume_replication
3749
+ ##
3750
+ # RPC-specific configuration for `reverse_replication_direction`
3751
+ # @return [::Gapic::Config::Method]
3752
+ #
3753
+ attr_reader :reverse_replication_direction
3754
+
3755
+ # @private
3756
+ def initialize parent_rpcs = nil
3757
+ list_storage_pools_config = parent_rpcs.list_storage_pools if parent_rpcs.respond_to? :list_storage_pools
3758
+ @list_storage_pools = ::Gapic::Config::Method.new list_storage_pools_config
3759
+ create_storage_pool_config = parent_rpcs.create_storage_pool if parent_rpcs.respond_to? :create_storage_pool
3760
+ @create_storage_pool = ::Gapic::Config::Method.new create_storage_pool_config
3761
+ get_storage_pool_config = parent_rpcs.get_storage_pool if parent_rpcs.respond_to? :get_storage_pool
3762
+ @get_storage_pool = ::Gapic::Config::Method.new get_storage_pool_config
3763
+ update_storage_pool_config = parent_rpcs.update_storage_pool if parent_rpcs.respond_to? :update_storage_pool
3764
+ @update_storage_pool = ::Gapic::Config::Method.new update_storage_pool_config
3765
+ delete_storage_pool_config = parent_rpcs.delete_storage_pool if parent_rpcs.respond_to? :delete_storage_pool
3766
+ @delete_storage_pool = ::Gapic::Config::Method.new delete_storage_pool_config
3767
+ list_volumes_config = parent_rpcs.list_volumes if parent_rpcs.respond_to? :list_volumes
3768
+ @list_volumes = ::Gapic::Config::Method.new list_volumes_config
3769
+ get_volume_config = parent_rpcs.get_volume if parent_rpcs.respond_to? :get_volume
3770
+ @get_volume = ::Gapic::Config::Method.new get_volume_config
3771
+ create_volume_config = parent_rpcs.create_volume if parent_rpcs.respond_to? :create_volume
3772
+ @create_volume = ::Gapic::Config::Method.new create_volume_config
3773
+ update_volume_config = parent_rpcs.update_volume if parent_rpcs.respond_to? :update_volume
3774
+ @update_volume = ::Gapic::Config::Method.new update_volume_config
3775
+ delete_volume_config = parent_rpcs.delete_volume if parent_rpcs.respond_to? :delete_volume
3776
+ @delete_volume = ::Gapic::Config::Method.new delete_volume_config
3777
+ revert_volume_config = parent_rpcs.revert_volume if parent_rpcs.respond_to? :revert_volume
3778
+ @revert_volume = ::Gapic::Config::Method.new revert_volume_config
3779
+ list_snapshots_config = parent_rpcs.list_snapshots if parent_rpcs.respond_to? :list_snapshots
3780
+ @list_snapshots = ::Gapic::Config::Method.new list_snapshots_config
3781
+ get_snapshot_config = parent_rpcs.get_snapshot if parent_rpcs.respond_to? :get_snapshot
3782
+ @get_snapshot = ::Gapic::Config::Method.new get_snapshot_config
3783
+ create_snapshot_config = parent_rpcs.create_snapshot if parent_rpcs.respond_to? :create_snapshot
3784
+ @create_snapshot = ::Gapic::Config::Method.new create_snapshot_config
3785
+ delete_snapshot_config = parent_rpcs.delete_snapshot if parent_rpcs.respond_to? :delete_snapshot
3786
+ @delete_snapshot = ::Gapic::Config::Method.new delete_snapshot_config
3787
+ update_snapshot_config = parent_rpcs.update_snapshot if parent_rpcs.respond_to? :update_snapshot
3788
+ @update_snapshot = ::Gapic::Config::Method.new update_snapshot_config
3789
+ list_active_directories_config = parent_rpcs.list_active_directories if parent_rpcs.respond_to? :list_active_directories
3790
+ @list_active_directories = ::Gapic::Config::Method.new list_active_directories_config
3791
+ get_active_directory_config = parent_rpcs.get_active_directory if parent_rpcs.respond_to? :get_active_directory
3792
+ @get_active_directory = ::Gapic::Config::Method.new get_active_directory_config
3793
+ create_active_directory_config = parent_rpcs.create_active_directory if parent_rpcs.respond_to? :create_active_directory
3794
+ @create_active_directory = ::Gapic::Config::Method.new create_active_directory_config
3795
+ update_active_directory_config = parent_rpcs.update_active_directory if parent_rpcs.respond_to? :update_active_directory
3796
+ @update_active_directory = ::Gapic::Config::Method.new update_active_directory_config
3797
+ delete_active_directory_config = parent_rpcs.delete_active_directory if parent_rpcs.respond_to? :delete_active_directory
3798
+ @delete_active_directory = ::Gapic::Config::Method.new delete_active_directory_config
3799
+ list_kms_configs_config = parent_rpcs.list_kms_configs if parent_rpcs.respond_to? :list_kms_configs
3800
+ @list_kms_configs = ::Gapic::Config::Method.new list_kms_configs_config
3801
+ create_kms_config_config = parent_rpcs.create_kms_config if parent_rpcs.respond_to? :create_kms_config
3802
+ @create_kms_config = ::Gapic::Config::Method.new create_kms_config_config
3803
+ get_kms_config_config = parent_rpcs.get_kms_config if parent_rpcs.respond_to? :get_kms_config
3804
+ @get_kms_config = ::Gapic::Config::Method.new get_kms_config_config
3805
+ update_kms_config_config = parent_rpcs.update_kms_config if parent_rpcs.respond_to? :update_kms_config
3806
+ @update_kms_config = ::Gapic::Config::Method.new update_kms_config_config
3807
+ encrypt_volumes_config = parent_rpcs.encrypt_volumes if parent_rpcs.respond_to? :encrypt_volumes
3808
+ @encrypt_volumes = ::Gapic::Config::Method.new encrypt_volumes_config
3809
+ verify_kms_config_config = parent_rpcs.verify_kms_config if parent_rpcs.respond_to? :verify_kms_config
3810
+ @verify_kms_config = ::Gapic::Config::Method.new verify_kms_config_config
3811
+ delete_kms_config_config = parent_rpcs.delete_kms_config if parent_rpcs.respond_to? :delete_kms_config
3812
+ @delete_kms_config = ::Gapic::Config::Method.new delete_kms_config_config
3813
+ list_replications_config = parent_rpcs.list_replications if parent_rpcs.respond_to? :list_replications
3814
+ @list_replications = ::Gapic::Config::Method.new list_replications_config
3815
+ get_replication_config = parent_rpcs.get_replication if parent_rpcs.respond_to? :get_replication
3816
+ @get_replication = ::Gapic::Config::Method.new get_replication_config
3817
+ create_replication_config = parent_rpcs.create_replication if parent_rpcs.respond_to? :create_replication
3818
+ @create_replication = ::Gapic::Config::Method.new create_replication_config
3819
+ delete_replication_config = parent_rpcs.delete_replication if parent_rpcs.respond_to? :delete_replication
3820
+ @delete_replication = ::Gapic::Config::Method.new delete_replication_config
3821
+ update_replication_config = parent_rpcs.update_replication if parent_rpcs.respond_to? :update_replication
3822
+ @update_replication = ::Gapic::Config::Method.new update_replication_config
3823
+ stop_replication_config = parent_rpcs.stop_replication if parent_rpcs.respond_to? :stop_replication
3824
+ @stop_replication = ::Gapic::Config::Method.new stop_replication_config
3825
+ resume_replication_config = parent_rpcs.resume_replication if parent_rpcs.respond_to? :resume_replication
3826
+ @resume_replication = ::Gapic::Config::Method.new resume_replication_config
3827
+ reverse_replication_direction_config = parent_rpcs.reverse_replication_direction if parent_rpcs.respond_to? :reverse_replication_direction
3828
+ @reverse_replication_direction = ::Gapic::Config::Method.new reverse_replication_direction_config
3829
+
3830
+ yield self if block_given?
3831
+ end
3832
+ end
3833
+ end
3834
+ end
3835
+ end
3836
+ end
3837
+ end
3838
+ end
3839
+ end
3840
+ end