google-cloud-netapp-v1 0.a → 0.1.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 (47) 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/cloud_netapp_service_pb.rb +57 -0
  7. data/lib/google/cloud/netapp/v1/cloud_netapp_service_services_pb.rb +120 -0
  8. data/lib/google/cloud/netapp/v1/common_pb.rb +43 -0
  9. data/lib/google/cloud/netapp/v1/kms_pb.rb +59 -0
  10. data/lib/google/cloud/netapp/v1/netapp/client.rb +4110 -0
  11. data/lib/google/cloud/netapp/v1/netapp/credentials.rb +47 -0
  12. data/lib/google/cloud/netapp/v1/netapp/operations.rb +770 -0
  13. data/lib/google/cloud/netapp/v1/netapp/paths.rb +185 -0
  14. data/lib/google/cloud/netapp/v1/netapp/rest/client.rb +3071 -0
  15. data/lib/google/cloud/netapp/v1/netapp/rest/operations.rb +795 -0
  16. data/lib/google/cloud/netapp/v1/netapp/rest/service_stub.rb +2190 -0
  17. data/lib/google/cloud/netapp/v1/netapp/rest.rb +53 -0
  18. data/lib/google/cloud/netapp/v1/netapp.rb +56 -0
  19. data/lib/google/cloud/netapp/v1/replication_pb.rb +66 -0
  20. data/lib/google/cloud/netapp/v1/rest.rb +37 -0
  21. data/lib/google/cloud/netapp/v1/snapshot_pb.rb +56 -0
  22. data/lib/google/cloud/netapp/v1/storage_pool_pb.rb +57 -0
  23. data/lib/google/cloud/netapp/v1/version.rb +8 -3
  24. data/lib/google/cloud/netapp/v1/volume_pb.rb +71 -0
  25. data/lib/google/cloud/netapp/v1.rb +45 -0
  26. data/lib/google-cloud-netapp-v1.rb +21 -0
  27. data/proto_docs/README.md +4 -0
  28. data/proto_docs/google/api/client.rb +381 -0
  29. data/proto_docs/google/api/field_behavior.rb +71 -0
  30. data/proto_docs/google/api/launch_stage.rb +71 -0
  31. data/proto_docs/google/api/resource.rb +222 -0
  32. data/proto_docs/google/cloud/netapp/v1/active_directory.rb +222 -0
  33. data/proto_docs/google/cloud/netapp/v1/cloud_netapp_service.rb +57 -0
  34. data/proto_docs/google/cloud/netapp/v1/common.rb +50 -0
  35. data/proto_docs/google/cloud/netapp/v1/kms.rb +230 -0
  36. data/proto_docs/google/cloud/netapp/v1/replication.rb +349 -0
  37. data/proto_docs/google/cloud/netapp/v1/snapshot.rb +179 -0
  38. data/proto_docs/google/cloud/netapp/v1/storage_pool.rb +205 -0
  39. data/proto_docs/google/cloud/netapp/v1/volume.rb +530 -0
  40. data/proto_docs/google/longrunning/operations.rb +164 -0
  41. data/proto_docs/google/protobuf/any.rb +144 -0
  42. data/proto_docs/google/protobuf/duration.rb +98 -0
  43. data/proto_docs/google/protobuf/empty.rb +34 -0
  44. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  45. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  46. data/proto_docs/google/rpc/status.rb +48 -0
  47. metadata +224 -13
@@ -0,0 +1,3071 @@
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
+ end
253
+
254
+ @net_app_stub = ::Google::Cloud::NetApp::V1::NetApp::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
255
+ end
256
+
257
+ ##
258
+ # Get the associated client for long-running operations.
259
+ #
260
+ # @return [::Google::Cloud::NetApp::V1::NetApp::Rest::Operations]
261
+ #
262
+ attr_reader :operations_client
263
+
264
+ ##
265
+ # Get the associated client for mix-in of the Locations.
266
+ #
267
+ # @return [Google::Cloud::Location::Locations::Rest::Client]
268
+ #
269
+ attr_reader :location_client
270
+
271
+ # Service calls
272
+
273
+ ##
274
+ # Returns descriptions of all storage pools owned by the caller.
275
+ #
276
+ # @overload list_storage_pools(request, options = nil)
277
+ # Pass arguments to `list_storage_pools` via a request object, either of type
278
+ # {::Google::Cloud::NetApp::V1::ListStoragePoolsRequest} or an equivalent Hash.
279
+ #
280
+ # @param request [::Google::Cloud::NetApp::V1::ListStoragePoolsRequest, ::Hash]
281
+ # A request object representing the call parameters. Required. To specify no
282
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
283
+ # @param options [::Gapic::CallOptions, ::Hash]
284
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
285
+ #
286
+ # @overload list_storage_pools(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil)
287
+ # Pass arguments to `list_storage_pools` via keyword arguments. Note that at
288
+ # least one keyword argument is required. To specify no parameters, or to keep all
289
+ # the default parameter values, pass an empty Hash as a request object (see above).
290
+ #
291
+ # @param parent [::String]
292
+ # Required. Parent value
293
+ # @param page_size [::Integer]
294
+ # The maximum number of items to return.
295
+ # @param page_token [::String]
296
+ # The next_page_token value to use if there are additional
297
+ # results to retrieve for this list request.
298
+ # @param order_by [::String]
299
+ # Sort results. Supported values are "name", "name desc" or "" (unsorted).
300
+ # @param filter [::String]
301
+ # List filter.
302
+ # @yield [result, operation] Access the result along with the TransportOperation object
303
+ # @yieldparam result [::Google::Cloud::NetApp::V1::ListStoragePoolsResponse]
304
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
305
+ #
306
+ # @return [::Google::Cloud::NetApp::V1::ListStoragePoolsResponse]
307
+ #
308
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
309
+ def list_storage_pools request, options = nil
310
+ raise ::ArgumentError, "request must be provided" if request.nil?
311
+
312
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::ListStoragePoolsRequest
313
+
314
+ # Converts hash and nil to an options object
315
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
316
+
317
+ # Customize the options with defaults
318
+ call_metadata = @config.rpcs.list_storage_pools.metadata.to_h
319
+
320
+ # Set x-goog-api-client and x-goog-user-project headers
321
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
322
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
323
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
324
+ transports_version_send: [:rest]
325
+
326
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
327
+
328
+ options.apply_defaults timeout: @config.rpcs.list_storage_pools.timeout,
329
+ metadata: call_metadata,
330
+ retry_policy: @config.rpcs.list_storage_pools.retry_policy
331
+
332
+ options.apply_defaults timeout: @config.timeout,
333
+ metadata: @config.metadata,
334
+ retry_policy: @config.retry_policy
335
+
336
+ @net_app_stub.list_storage_pools request, options do |result, operation|
337
+ yield result, operation if block_given?
338
+ return result
339
+ end
340
+ rescue ::Gapic::Rest::Error => e
341
+ raise ::Google::Cloud::Error.from_error(e)
342
+ end
343
+
344
+ ##
345
+ # Creates a new storage pool.
346
+ #
347
+ # @overload create_storage_pool(request, options = nil)
348
+ # Pass arguments to `create_storage_pool` via a request object, either of type
349
+ # {::Google::Cloud::NetApp::V1::CreateStoragePoolRequest} or an equivalent Hash.
350
+ #
351
+ # @param request [::Google::Cloud::NetApp::V1::CreateStoragePoolRequest, ::Hash]
352
+ # A request object representing the call parameters. Required. To specify no
353
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
354
+ # @param options [::Gapic::CallOptions, ::Hash]
355
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
356
+ #
357
+ # @overload create_storage_pool(parent: nil, storage_pool_id: nil, storage_pool: nil)
358
+ # Pass arguments to `create_storage_pool` via keyword arguments. Note that at
359
+ # least one keyword argument is required. To specify no parameters, or to keep all
360
+ # the default parameter values, pass an empty Hash as a request object (see above).
361
+ #
362
+ # @param parent [::String]
363
+ # Required. Value for parent.
364
+ # @param storage_pool_id [::String]
365
+ # Required. Id of the requesting storage pool
366
+ # If auto-generating Id server-side, remove this field and
367
+ # id from the method_signature of Create RPC
368
+ # @param storage_pool [::Google::Cloud::NetApp::V1::StoragePool, ::Hash]
369
+ # Required. The required parameters to create a new storage pool.
370
+ # @yield [result, operation] Access the result along with the TransportOperation object
371
+ # @yieldparam result [::Gapic::Operation]
372
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
373
+ #
374
+ # @return [::Gapic::Operation]
375
+ #
376
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
377
+ def create_storage_pool request, options = nil
378
+ raise ::ArgumentError, "request must be provided" if request.nil?
379
+
380
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::CreateStoragePoolRequest
381
+
382
+ # Converts hash and nil to an options object
383
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
384
+
385
+ # Customize the options with defaults
386
+ call_metadata = @config.rpcs.create_storage_pool.metadata.to_h
387
+
388
+ # Set x-goog-api-client and x-goog-user-project headers
389
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
390
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
391
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
392
+ transports_version_send: [:rest]
393
+
394
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
395
+
396
+ options.apply_defaults timeout: @config.rpcs.create_storage_pool.timeout,
397
+ metadata: call_metadata,
398
+ retry_policy: @config.rpcs.create_storage_pool.retry_policy
399
+
400
+ options.apply_defaults timeout: @config.timeout,
401
+ metadata: @config.metadata,
402
+ retry_policy: @config.retry_policy
403
+
404
+ @net_app_stub.create_storage_pool request, options do |result, operation|
405
+ result = ::Gapic::Operation.new result, @operations_client, options: options
406
+ yield result, operation if block_given?
407
+ return result
408
+ end
409
+ rescue ::Gapic::Rest::Error => e
410
+ raise ::Google::Cloud::Error.from_error(e)
411
+ end
412
+
413
+ ##
414
+ # Returns the description of the specified storage pool by poolId.
415
+ #
416
+ # @overload get_storage_pool(request, options = nil)
417
+ # Pass arguments to `get_storage_pool` via a request object, either of type
418
+ # {::Google::Cloud::NetApp::V1::GetStoragePoolRequest} or an equivalent Hash.
419
+ #
420
+ # @param request [::Google::Cloud::NetApp::V1::GetStoragePoolRequest, ::Hash]
421
+ # A request object representing the call parameters. Required. To specify no
422
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
423
+ # @param options [::Gapic::CallOptions, ::Hash]
424
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
425
+ #
426
+ # @overload get_storage_pool(name: nil)
427
+ # Pass arguments to `get_storage_pool` via keyword arguments. Note that at
428
+ # least one keyword argument is required. To specify no parameters, or to keep all
429
+ # the default parameter values, pass an empty Hash as a request object (see above).
430
+ #
431
+ # @param name [::String]
432
+ # Required. Name of the storage pool
433
+ # @yield [result, operation] Access the result along with the TransportOperation object
434
+ # @yieldparam result [::Google::Cloud::NetApp::V1::StoragePool]
435
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
436
+ #
437
+ # @return [::Google::Cloud::NetApp::V1::StoragePool]
438
+ #
439
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
440
+ def get_storage_pool request, options = nil
441
+ raise ::ArgumentError, "request must be provided" if request.nil?
442
+
443
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::GetStoragePoolRequest
444
+
445
+ # Converts hash and nil to an options object
446
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
447
+
448
+ # Customize the options with defaults
449
+ call_metadata = @config.rpcs.get_storage_pool.metadata.to_h
450
+
451
+ # Set x-goog-api-client and x-goog-user-project headers
452
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
453
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
454
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
455
+ transports_version_send: [:rest]
456
+
457
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
458
+
459
+ options.apply_defaults timeout: @config.rpcs.get_storage_pool.timeout,
460
+ metadata: call_metadata,
461
+ retry_policy: @config.rpcs.get_storage_pool.retry_policy
462
+
463
+ options.apply_defaults timeout: @config.timeout,
464
+ metadata: @config.metadata,
465
+ retry_policy: @config.retry_policy
466
+
467
+ @net_app_stub.get_storage_pool request, options do |result, operation|
468
+ yield result, operation if block_given?
469
+ return result
470
+ end
471
+ rescue ::Gapic::Rest::Error => e
472
+ raise ::Google::Cloud::Error.from_error(e)
473
+ end
474
+
475
+ ##
476
+ # Updates the storage pool properties with the full spec
477
+ #
478
+ # @overload update_storage_pool(request, options = nil)
479
+ # Pass arguments to `update_storage_pool` via a request object, either of type
480
+ # {::Google::Cloud::NetApp::V1::UpdateStoragePoolRequest} or an equivalent Hash.
481
+ #
482
+ # @param request [::Google::Cloud::NetApp::V1::UpdateStoragePoolRequest, ::Hash]
483
+ # A request object representing the call parameters. Required. To specify no
484
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
485
+ # @param options [::Gapic::CallOptions, ::Hash]
486
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
487
+ #
488
+ # @overload update_storage_pool(update_mask: nil, storage_pool: nil)
489
+ # Pass arguments to `update_storage_pool` via keyword arguments. Note that at
490
+ # least one keyword argument is required. To specify no parameters, or to keep all
491
+ # the default parameter values, pass an empty Hash as a request object (see above).
492
+ #
493
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
494
+ # Required. Field mask is used to specify the fields to be overwritten in the
495
+ # StoragePool resource by the update.
496
+ # The fields specified in the update_mask are relative to the resource, not
497
+ # the full request. A field will be overwritten if it is in the mask. If the
498
+ # user does not provide a mask then all fields will be overwritten.
499
+ # @param storage_pool [::Google::Cloud::NetApp::V1::StoragePool, ::Hash]
500
+ # Required. The pool being updated
501
+ # @yield [result, operation] Access the result along with the TransportOperation object
502
+ # @yieldparam result [::Gapic::Operation]
503
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
504
+ #
505
+ # @return [::Gapic::Operation]
506
+ #
507
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
508
+ def update_storage_pool request, options = nil
509
+ raise ::ArgumentError, "request must be provided" if request.nil?
510
+
511
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::UpdateStoragePoolRequest
512
+
513
+ # Converts hash and nil to an options object
514
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
515
+
516
+ # Customize the options with defaults
517
+ call_metadata = @config.rpcs.update_storage_pool.metadata.to_h
518
+
519
+ # Set x-goog-api-client and x-goog-user-project headers
520
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
521
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
522
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
523
+ transports_version_send: [:rest]
524
+
525
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
526
+
527
+ options.apply_defaults timeout: @config.rpcs.update_storage_pool.timeout,
528
+ metadata: call_metadata,
529
+ retry_policy: @config.rpcs.update_storage_pool.retry_policy
530
+
531
+ options.apply_defaults timeout: @config.timeout,
532
+ metadata: @config.metadata,
533
+ retry_policy: @config.retry_policy
534
+
535
+ @net_app_stub.update_storage_pool request, options do |result, operation|
536
+ result = ::Gapic::Operation.new result, @operations_client, options: options
537
+ yield result, operation if block_given?
538
+ return result
539
+ end
540
+ rescue ::Gapic::Rest::Error => e
541
+ raise ::Google::Cloud::Error.from_error(e)
542
+ end
543
+
544
+ ##
545
+ # Warning! This operation will permanently delete the storage pool.
546
+ #
547
+ # @overload delete_storage_pool(request, options = nil)
548
+ # Pass arguments to `delete_storage_pool` via a request object, either of type
549
+ # {::Google::Cloud::NetApp::V1::DeleteStoragePoolRequest} or an equivalent Hash.
550
+ #
551
+ # @param request [::Google::Cloud::NetApp::V1::DeleteStoragePoolRequest, ::Hash]
552
+ # A request object representing the call parameters. Required. To specify no
553
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
554
+ # @param options [::Gapic::CallOptions, ::Hash]
555
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
556
+ #
557
+ # @overload delete_storage_pool(name: nil)
558
+ # Pass arguments to `delete_storage_pool` via keyword arguments. Note that at
559
+ # least one keyword argument is required. To specify no parameters, or to keep all
560
+ # the default parameter values, pass an empty Hash as a request object (see above).
561
+ #
562
+ # @param name [::String]
563
+ # Required. Name of the storage pool
564
+ # @yield [result, operation] Access the result along with the TransportOperation object
565
+ # @yieldparam result [::Gapic::Operation]
566
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
567
+ #
568
+ # @return [::Gapic::Operation]
569
+ #
570
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
571
+ def delete_storage_pool request, options = nil
572
+ raise ::ArgumentError, "request must be provided" if request.nil?
573
+
574
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::DeleteStoragePoolRequest
575
+
576
+ # Converts hash and nil to an options object
577
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
578
+
579
+ # Customize the options with defaults
580
+ call_metadata = @config.rpcs.delete_storage_pool.metadata.to_h
581
+
582
+ # Set x-goog-api-client and x-goog-user-project headers
583
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
584
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
585
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
586
+ transports_version_send: [:rest]
587
+
588
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
589
+
590
+ options.apply_defaults timeout: @config.rpcs.delete_storage_pool.timeout,
591
+ metadata: call_metadata,
592
+ retry_policy: @config.rpcs.delete_storage_pool.retry_policy
593
+
594
+ options.apply_defaults timeout: @config.timeout,
595
+ metadata: @config.metadata,
596
+ retry_policy: @config.retry_policy
597
+
598
+ @net_app_stub.delete_storage_pool request, options do |result, operation|
599
+ result = ::Gapic::Operation.new result, @operations_client, options: options
600
+ yield result, operation if block_given?
601
+ return result
602
+ end
603
+ rescue ::Gapic::Rest::Error => e
604
+ raise ::Google::Cloud::Error.from_error(e)
605
+ end
606
+
607
+ ##
608
+ # Lists Volumes in a given project.
609
+ #
610
+ # @overload list_volumes(request, options = nil)
611
+ # Pass arguments to `list_volumes` via a request object, either of type
612
+ # {::Google::Cloud::NetApp::V1::ListVolumesRequest} or an equivalent Hash.
613
+ #
614
+ # @param request [::Google::Cloud::NetApp::V1::ListVolumesRequest, ::Hash]
615
+ # A request object representing the call parameters. Required. To specify no
616
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
617
+ # @param options [::Gapic::CallOptions, ::Hash]
618
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
619
+ #
620
+ # @overload list_volumes(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
621
+ # Pass arguments to `list_volumes` via keyword arguments. Note that at
622
+ # least one keyword argument is required. To specify no parameters, or to keep all
623
+ # the default parameter values, pass an empty Hash as a request object (see above).
624
+ #
625
+ # @param parent [::String]
626
+ # Required. Parent value for ListVolumesRequest
627
+ # @param page_size [::Integer]
628
+ # Requested page size. Server may return fewer items than requested.
629
+ # If unspecified, the server will pick an appropriate default.
630
+ # @param page_token [::String]
631
+ # A token identifying a page of results the server should return.
632
+ # @param filter [::String]
633
+ # Filtering results
634
+ # @param order_by [::String]
635
+ # Hint for how to order the results
636
+ # @yield [result, operation] Access the result along with the TransportOperation object
637
+ # @yieldparam result [::Google::Cloud::NetApp::V1::ListVolumesResponse]
638
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
639
+ #
640
+ # @return [::Google::Cloud::NetApp::V1::ListVolumesResponse]
641
+ #
642
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
643
+ def list_volumes request, options = nil
644
+ raise ::ArgumentError, "request must be provided" if request.nil?
645
+
646
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::ListVolumesRequest
647
+
648
+ # Converts hash and nil to an options object
649
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
650
+
651
+ # Customize the options with defaults
652
+ call_metadata = @config.rpcs.list_volumes.metadata.to_h
653
+
654
+ # Set x-goog-api-client and x-goog-user-project headers
655
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
656
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
657
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
658
+ transports_version_send: [:rest]
659
+
660
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
661
+
662
+ options.apply_defaults timeout: @config.rpcs.list_volumes.timeout,
663
+ metadata: call_metadata,
664
+ retry_policy: @config.rpcs.list_volumes.retry_policy
665
+
666
+ options.apply_defaults timeout: @config.timeout,
667
+ metadata: @config.metadata,
668
+ retry_policy: @config.retry_policy
669
+
670
+ @net_app_stub.list_volumes request, options do |result, operation|
671
+ yield result, operation if block_given?
672
+ return result
673
+ end
674
+ rescue ::Gapic::Rest::Error => e
675
+ raise ::Google::Cloud::Error.from_error(e)
676
+ end
677
+
678
+ ##
679
+ # Gets details of a single Volume.
680
+ #
681
+ # @overload get_volume(request, options = nil)
682
+ # Pass arguments to `get_volume` via a request object, either of type
683
+ # {::Google::Cloud::NetApp::V1::GetVolumeRequest} or an equivalent Hash.
684
+ #
685
+ # @param request [::Google::Cloud::NetApp::V1::GetVolumeRequest, ::Hash]
686
+ # A request object representing the call parameters. Required. To specify no
687
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
688
+ # @param options [::Gapic::CallOptions, ::Hash]
689
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
690
+ #
691
+ # @overload get_volume(name: nil)
692
+ # Pass arguments to `get_volume` via keyword arguments. Note that at
693
+ # least one keyword argument is required. To specify no parameters, or to keep all
694
+ # the default parameter values, pass an empty Hash as a request object (see above).
695
+ #
696
+ # @param name [::String]
697
+ # Required. Name of the volume
698
+ # @yield [result, operation] Access the result along with the TransportOperation object
699
+ # @yieldparam result [::Google::Cloud::NetApp::V1::Volume]
700
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
701
+ #
702
+ # @return [::Google::Cloud::NetApp::V1::Volume]
703
+ #
704
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
705
+ def get_volume request, options = nil
706
+ raise ::ArgumentError, "request must be provided" if request.nil?
707
+
708
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::GetVolumeRequest
709
+
710
+ # Converts hash and nil to an options object
711
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
712
+
713
+ # Customize the options with defaults
714
+ call_metadata = @config.rpcs.get_volume.metadata.to_h
715
+
716
+ # Set x-goog-api-client and x-goog-user-project headers
717
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
718
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
719
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
720
+ transports_version_send: [:rest]
721
+
722
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
723
+
724
+ options.apply_defaults timeout: @config.rpcs.get_volume.timeout,
725
+ metadata: call_metadata,
726
+ retry_policy: @config.rpcs.get_volume.retry_policy
727
+
728
+ options.apply_defaults timeout: @config.timeout,
729
+ metadata: @config.metadata,
730
+ retry_policy: @config.retry_policy
731
+
732
+ @net_app_stub.get_volume request, options do |result, operation|
733
+ yield result, operation if block_given?
734
+ return result
735
+ end
736
+ rescue ::Gapic::Rest::Error => e
737
+ raise ::Google::Cloud::Error.from_error(e)
738
+ end
739
+
740
+ ##
741
+ # Creates a new Volume in a given project and location.
742
+ #
743
+ # @overload create_volume(request, options = nil)
744
+ # Pass arguments to `create_volume` via a request object, either of type
745
+ # {::Google::Cloud::NetApp::V1::CreateVolumeRequest} or an equivalent Hash.
746
+ #
747
+ # @param request [::Google::Cloud::NetApp::V1::CreateVolumeRequest, ::Hash]
748
+ # A request object representing the call parameters. Required. To specify no
749
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
750
+ # @param options [::Gapic::CallOptions, ::Hash]
751
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
752
+ #
753
+ # @overload create_volume(parent: nil, volume_id: nil, volume: nil)
754
+ # Pass arguments to `create_volume` via keyword arguments. Note that at
755
+ # least one keyword argument is required. To specify no parameters, or to keep all
756
+ # the default parameter values, pass an empty Hash as a request object (see above).
757
+ #
758
+ # @param parent [::String]
759
+ # Required. Value for parent.
760
+ # @param volume_id [::String]
761
+ # Required. Id of the requesting volume
762
+ # If auto-generating Id server-side, remove this field and
763
+ # Id from the method_signature of Create RPC
764
+ # @param volume [::Google::Cloud::NetApp::V1::Volume, ::Hash]
765
+ # Required. The volume being created.
766
+ # @yield [result, operation] Access the result along with the TransportOperation object
767
+ # @yieldparam result [::Gapic::Operation]
768
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
769
+ #
770
+ # @return [::Gapic::Operation]
771
+ #
772
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
773
+ def create_volume request, options = nil
774
+ raise ::ArgumentError, "request must be provided" if request.nil?
775
+
776
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::CreateVolumeRequest
777
+
778
+ # Converts hash and nil to an options object
779
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
780
+
781
+ # Customize the options with defaults
782
+ call_metadata = @config.rpcs.create_volume.metadata.to_h
783
+
784
+ # Set x-goog-api-client and x-goog-user-project headers
785
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
786
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
787
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
788
+ transports_version_send: [:rest]
789
+
790
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
791
+
792
+ options.apply_defaults timeout: @config.rpcs.create_volume.timeout,
793
+ metadata: call_metadata,
794
+ retry_policy: @config.rpcs.create_volume.retry_policy
795
+
796
+ options.apply_defaults timeout: @config.timeout,
797
+ metadata: @config.metadata,
798
+ retry_policy: @config.retry_policy
799
+
800
+ @net_app_stub.create_volume request, options do |result, operation|
801
+ result = ::Gapic::Operation.new result, @operations_client, options: options
802
+ yield result, operation if block_given?
803
+ return result
804
+ end
805
+ rescue ::Gapic::Rest::Error => e
806
+ raise ::Google::Cloud::Error.from_error(e)
807
+ end
808
+
809
+ ##
810
+ # Updates the parameters of a single Volume.
811
+ #
812
+ # @overload update_volume(request, options = nil)
813
+ # Pass arguments to `update_volume` via a request object, either of type
814
+ # {::Google::Cloud::NetApp::V1::UpdateVolumeRequest} or an equivalent Hash.
815
+ #
816
+ # @param request [::Google::Cloud::NetApp::V1::UpdateVolumeRequest, ::Hash]
817
+ # A request object representing the call parameters. Required. To specify no
818
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
819
+ # @param options [::Gapic::CallOptions, ::Hash]
820
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
821
+ #
822
+ # @overload update_volume(update_mask: nil, volume: nil)
823
+ # Pass arguments to `update_volume` via keyword arguments. Note that at
824
+ # least one keyword argument is required. To specify no parameters, or to keep all
825
+ # the default parameter values, pass an empty Hash as a request object (see above).
826
+ #
827
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
828
+ # Required. Field mask is used to specify the fields to be overwritten in the
829
+ # Volume resource by the update.
830
+ # The fields specified in the update_mask are relative to the resource, not
831
+ # the full request. A field will be overwritten if it is in the mask. If the
832
+ # user does not provide a mask then all fields will be overwritten.
833
+ # @param volume [::Google::Cloud::NetApp::V1::Volume, ::Hash]
834
+ # Required. The volume being updated
835
+ # @yield [result, operation] Access the result along with the TransportOperation object
836
+ # @yieldparam result [::Gapic::Operation]
837
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
838
+ #
839
+ # @return [::Gapic::Operation]
840
+ #
841
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
842
+ def update_volume request, options = nil
843
+ raise ::ArgumentError, "request must be provided" if request.nil?
844
+
845
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::UpdateVolumeRequest
846
+
847
+ # Converts hash and nil to an options object
848
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
849
+
850
+ # Customize the options with defaults
851
+ call_metadata = @config.rpcs.update_volume.metadata.to_h
852
+
853
+ # Set x-goog-api-client and x-goog-user-project headers
854
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
855
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
856
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
857
+ transports_version_send: [:rest]
858
+
859
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
860
+
861
+ options.apply_defaults timeout: @config.rpcs.update_volume.timeout,
862
+ metadata: call_metadata,
863
+ retry_policy: @config.rpcs.update_volume.retry_policy
864
+
865
+ options.apply_defaults timeout: @config.timeout,
866
+ metadata: @config.metadata,
867
+ retry_policy: @config.retry_policy
868
+
869
+ @net_app_stub.update_volume request, options do |result, operation|
870
+ result = ::Gapic::Operation.new result, @operations_client, options: options
871
+ yield result, operation if block_given?
872
+ return result
873
+ end
874
+ rescue ::Gapic::Rest::Error => e
875
+ raise ::Google::Cloud::Error.from_error(e)
876
+ end
877
+
878
+ ##
879
+ # Deletes a single Volume.
880
+ #
881
+ # @overload delete_volume(request, options = nil)
882
+ # Pass arguments to `delete_volume` via a request object, either of type
883
+ # {::Google::Cloud::NetApp::V1::DeleteVolumeRequest} or an equivalent Hash.
884
+ #
885
+ # @param request [::Google::Cloud::NetApp::V1::DeleteVolumeRequest, ::Hash]
886
+ # A request object representing the call parameters. Required. To specify no
887
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
888
+ # @param options [::Gapic::CallOptions, ::Hash]
889
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
890
+ #
891
+ # @overload delete_volume(name: nil, force: nil)
892
+ # Pass arguments to `delete_volume` via keyword arguments. Note that at
893
+ # least one keyword argument is required. To specify no parameters, or to keep all
894
+ # the default parameter values, pass an empty Hash as a request object (see above).
895
+ #
896
+ # @param name [::String]
897
+ # Required. Name of the volume
898
+ # @param force [::Boolean]
899
+ # If this field is set as true, CCFE will not block the volume resource
900
+ # deletion even if it has any snapshots resource. (Otherwise, the request
901
+ # will only work if the volume has no snapshots.)
902
+ # @yield [result, operation] Access the result along with the TransportOperation object
903
+ # @yieldparam result [::Gapic::Operation]
904
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
905
+ #
906
+ # @return [::Gapic::Operation]
907
+ #
908
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
909
+ def delete_volume request, options = nil
910
+ raise ::ArgumentError, "request must be provided" if request.nil?
911
+
912
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::DeleteVolumeRequest
913
+
914
+ # Converts hash and nil to an options object
915
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
916
+
917
+ # Customize the options with defaults
918
+ call_metadata = @config.rpcs.delete_volume.metadata.to_h
919
+
920
+ # Set x-goog-api-client and x-goog-user-project headers
921
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
922
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
923
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
924
+ transports_version_send: [:rest]
925
+
926
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
927
+
928
+ options.apply_defaults timeout: @config.rpcs.delete_volume.timeout,
929
+ metadata: call_metadata,
930
+ retry_policy: @config.rpcs.delete_volume.retry_policy
931
+
932
+ options.apply_defaults timeout: @config.timeout,
933
+ metadata: @config.metadata,
934
+ retry_policy: @config.retry_policy
935
+
936
+ @net_app_stub.delete_volume request, options do |result, operation|
937
+ result = ::Gapic::Operation.new result, @operations_client, options: options
938
+ yield result, operation if block_given?
939
+ return result
940
+ end
941
+ rescue ::Gapic::Rest::Error => e
942
+ raise ::Google::Cloud::Error.from_error(e)
943
+ end
944
+
945
+ ##
946
+ # Revert an existing volume to a specified snapshot.
947
+ # Warning! This operation will permanently revert all changes made after the
948
+ # snapshot was created.
949
+ #
950
+ # @overload revert_volume(request, options = nil)
951
+ # Pass arguments to `revert_volume` via a request object, either of type
952
+ # {::Google::Cloud::NetApp::V1::RevertVolumeRequest} or an equivalent Hash.
953
+ #
954
+ # @param request [::Google::Cloud::NetApp::V1::RevertVolumeRequest, ::Hash]
955
+ # A request object representing the call parameters. Required. To specify no
956
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
957
+ # @param options [::Gapic::CallOptions, ::Hash]
958
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
959
+ #
960
+ # @overload revert_volume(name: nil, snapshot_id: nil)
961
+ # Pass arguments to `revert_volume` via keyword arguments. Note that at
962
+ # least one keyword argument is required. To specify no parameters, or to keep all
963
+ # the default parameter values, pass an empty Hash as a request object (see above).
964
+ #
965
+ # @param name [::String]
966
+ # Required. The resource name of the volume, in the format of
967
+ # projects/\\{project_id}/locations/\\{location}/volumes/\\{volume_id}.
968
+ # @param snapshot_id [::String]
969
+ # Required. The snapshot resource ID, in the format 'my-snapshot', where the
970
+ # specified ID is the \\{snapshot_id} of the fully qualified name like
971
+ # projects/\\{project_id}/locations/\\{location_id}/volumes/\\{volume_id}/snapshots/\\{snapshot_id}
972
+ # @yield [result, operation] Access the result along with the TransportOperation object
973
+ # @yieldparam result [::Gapic::Operation]
974
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
975
+ #
976
+ # @return [::Gapic::Operation]
977
+ #
978
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
979
+ def revert_volume request, options = nil
980
+ raise ::ArgumentError, "request must be provided" if request.nil?
981
+
982
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::RevertVolumeRequest
983
+
984
+ # Converts hash and nil to an options object
985
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
986
+
987
+ # Customize the options with defaults
988
+ call_metadata = @config.rpcs.revert_volume.metadata.to_h
989
+
990
+ # Set x-goog-api-client and x-goog-user-project headers
991
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
992
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
993
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
994
+ transports_version_send: [:rest]
995
+
996
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
997
+
998
+ options.apply_defaults timeout: @config.rpcs.revert_volume.timeout,
999
+ metadata: call_metadata,
1000
+ retry_policy: @config.rpcs.revert_volume.retry_policy
1001
+
1002
+ options.apply_defaults timeout: @config.timeout,
1003
+ metadata: @config.metadata,
1004
+ retry_policy: @config.retry_policy
1005
+
1006
+ @net_app_stub.revert_volume request, options do |result, operation|
1007
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1008
+ yield result, operation if block_given?
1009
+ return result
1010
+ end
1011
+ rescue ::Gapic::Rest::Error => e
1012
+ raise ::Google::Cloud::Error.from_error(e)
1013
+ end
1014
+
1015
+ ##
1016
+ # Returns descriptions of all snapshots for a volume.
1017
+ #
1018
+ # @overload list_snapshots(request, options = nil)
1019
+ # Pass arguments to `list_snapshots` via a request object, either of type
1020
+ # {::Google::Cloud::NetApp::V1::ListSnapshotsRequest} or an equivalent Hash.
1021
+ #
1022
+ # @param request [::Google::Cloud::NetApp::V1::ListSnapshotsRequest, ::Hash]
1023
+ # A request object representing the call parameters. Required. To specify no
1024
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1025
+ # @param options [::Gapic::CallOptions, ::Hash]
1026
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1027
+ #
1028
+ # @overload list_snapshots(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil)
1029
+ # Pass arguments to `list_snapshots` via keyword arguments. Note that at
1030
+ # least one keyword argument is required. To specify no parameters, or to keep all
1031
+ # the default parameter values, pass an empty Hash as a request object (see above).
1032
+ #
1033
+ # @param parent [::String]
1034
+ # Required. The volume for which to retrieve snapshot information,
1035
+ # in the format
1036
+ # `projects/{project_id}/locations/{location}/volumes/{volume_id}`.
1037
+ # @param page_size [::Integer]
1038
+ # The maximum number of items to return.
1039
+ # @param page_token [::String]
1040
+ # The next_page_token value to use if there are additional
1041
+ # results to retrieve for this list request.
1042
+ # @param order_by [::String]
1043
+ # Sort results. Supported values are "name", "name desc" or "" (unsorted).
1044
+ # @param filter [::String]
1045
+ # List filter.
1046
+ # @yield [result, operation] Access the result along with the TransportOperation object
1047
+ # @yieldparam result [::Google::Cloud::NetApp::V1::ListSnapshotsResponse]
1048
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1049
+ #
1050
+ # @return [::Google::Cloud::NetApp::V1::ListSnapshotsResponse]
1051
+ #
1052
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1053
+ def list_snapshots request, options = nil
1054
+ raise ::ArgumentError, "request must be provided" if request.nil?
1055
+
1056
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::ListSnapshotsRequest
1057
+
1058
+ # Converts hash and nil to an options object
1059
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1060
+
1061
+ # Customize the options with defaults
1062
+ call_metadata = @config.rpcs.list_snapshots.metadata.to_h
1063
+
1064
+ # Set x-goog-api-client and x-goog-user-project headers
1065
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1066
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1067
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
1068
+ transports_version_send: [:rest]
1069
+
1070
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1071
+
1072
+ options.apply_defaults timeout: @config.rpcs.list_snapshots.timeout,
1073
+ metadata: call_metadata,
1074
+ retry_policy: @config.rpcs.list_snapshots.retry_policy
1075
+
1076
+ options.apply_defaults timeout: @config.timeout,
1077
+ metadata: @config.metadata,
1078
+ retry_policy: @config.retry_policy
1079
+
1080
+ @net_app_stub.list_snapshots request, options do |result, operation|
1081
+ yield result, operation if block_given?
1082
+ return result
1083
+ end
1084
+ rescue ::Gapic::Rest::Error => e
1085
+ raise ::Google::Cloud::Error.from_error(e)
1086
+ end
1087
+
1088
+ ##
1089
+ # Describe a snapshot for a volume.
1090
+ #
1091
+ # @overload get_snapshot(request, options = nil)
1092
+ # Pass arguments to `get_snapshot` via a request object, either of type
1093
+ # {::Google::Cloud::NetApp::V1::GetSnapshotRequest} or an equivalent Hash.
1094
+ #
1095
+ # @param request [::Google::Cloud::NetApp::V1::GetSnapshotRequest, ::Hash]
1096
+ # A request object representing the call parameters. Required. To specify no
1097
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1098
+ # @param options [::Gapic::CallOptions, ::Hash]
1099
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1100
+ #
1101
+ # @overload get_snapshot(name: nil)
1102
+ # Pass arguments to `get_snapshot` via keyword arguments. Note that at
1103
+ # least one keyword argument is required. To specify no parameters, or to keep all
1104
+ # the default parameter values, pass an empty Hash as a request object (see above).
1105
+ #
1106
+ # @param name [::String]
1107
+ # Required. The snapshot resource name, in the format
1108
+ # `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`
1109
+ # @yield [result, operation] Access the result along with the TransportOperation object
1110
+ # @yieldparam result [::Google::Cloud::NetApp::V1::Snapshot]
1111
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1112
+ #
1113
+ # @return [::Google::Cloud::NetApp::V1::Snapshot]
1114
+ #
1115
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1116
+ def get_snapshot request, options = nil
1117
+ raise ::ArgumentError, "request must be provided" if request.nil?
1118
+
1119
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::GetSnapshotRequest
1120
+
1121
+ # Converts hash and nil to an options object
1122
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1123
+
1124
+ # Customize the options with defaults
1125
+ call_metadata = @config.rpcs.get_snapshot.metadata.to_h
1126
+
1127
+ # Set x-goog-api-client and x-goog-user-project headers
1128
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1129
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1130
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
1131
+ transports_version_send: [:rest]
1132
+
1133
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1134
+
1135
+ options.apply_defaults timeout: @config.rpcs.get_snapshot.timeout,
1136
+ metadata: call_metadata,
1137
+ retry_policy: @config.rpcs.get_snapshot.retry_policy
1138
+
1139
+ options.apply_defaults timeout: @config.timeout,
1140
+ metadata: @config.metadata,
1141
+ retry_policy: @config.retry_policy
1142
+
1143
+ @net_app_stub.get_snapshot request, options do |result, operation|
1144
+ yield result, operation if block_given?
1145
+ return result
1146
+ end
1147
+ rescue ::Gapic::Rest::Error => e
1148
+ raise ::Google::Cloud::Error.from_error(e)
1149
+ end
1150
+
1151
+ ##
1152
+ # Create a new snapshot for a volume.
1153
+ #
1154
+ # @overload create_snapshot(request, options = nil)
1155
+ # Pass arguments to `create_snapshot` via a request object, either of type
1156
+ # {::Google::Cloud::NetApp::V1::CreateSnapshotRequest} or an equivalent Hash.
1157
+ #
1158
+ # @param request [::Google::Cloud::NetApp::V1::CreateSnapshotRequest, ::Hash]
1159
+ # A request object representing the call parameters. Required. To specify no
1160
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1161
+ # @param options [::Gapic::CallOptions, ::Hash]
1162
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1163
+ #
1164
+ # @overload create_snapshot(parent: nil, snapshot: nil, snapshot_id: nil)
1165
+ # Pass arguments to `create_snapshot` via keyword arguments. Note that at
1166
+ # least one keyword argument is required. To specify no parameters, or to keep all
1167
+ # the default parameter values, pass an empty Hash as a request object (see above).
1168
+ #
1169
+ # @param parent [::String]
1170
+ # Required. The NetApp volume to create the snapshots of, in the format
1171
+ # `projects/{project_id}/locations/{location}/volumes/{volume_id}`
1172
+ # @param snapshot [::Google::Cloud::NetApp::V1::Snapshot, ::Hash]
1173
+ # Required. A snapshot resource
1174
+ # @param snapshot_id [::String]
1175
+ # Required. ID of the snapshot to create.
1176
+ # This value must start with a lowercase letter followed by up to 62
1177
+ # lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
1178
+ # @yield [result, operation] Access the result along with the TransportOperation object
1179
+ # @yieldparam result [::Gapic::Operation]
1180
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1181
+ #
1182
+ # @return [::Gapic::Operation]
1183
+ #
1184
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1185
+ def create_snapshot request, options = nil
1186
+ raise ::ArgumentError, "request must be provided" if request.nil?
1187
+
1188
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::CreateSnapshotRequest
1189
+
1190
+ # Converts hash and nil to an options object
1191
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1192
+
1193
+ # Customize the options with defaults
1194
+ call_metadata = @config.rpcs.create_snapshot.metadata.to_h
1195
+
1196
+ # Set x-goog-api-client and x-goog-user-project headers
1197
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1198
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1199
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
1200
+ transports_version_send: [:rest]
1201
+
1202
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1203
+
1204
+ options.apply_defaults timeout: @config.rpcs.create_snapshot.timeout,
1205
+ metadata: call_metadata,
1206
+ retry_policy: @config.rpcs.create_snapshot.retry_policy
1207
+
1208
+ options.apply_defaults timeout: @config.timeout,
1209
+ metadata: @config.metadata,
1210
+ retry_policy: @config.retry_policy
1211
+
1212
+ @net_app_stub.create_snapshot request, options do |result, operation|
1213
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1214
+ yield result, operation if block_given?
1215
+ return result
1216
+ end
1217
+ rescue ::Gapic::Rest::Error => e
1218
+ raise ::Google::Cloud::Error.from_error(e)
1219
+ end
1220
+
1221
+ ##
1222
+ # Deletes a snapshot.
1223
+ #
1224
+ # @overload delete_snapshot(request, options = nil)
1225
+ # Pass arguments to `delete_snapshot` via a request object, either of type
1226
+ # {::Google::Cloud::NetApp::V1::DeleteSnapshotRequest} or an equivalent Hash.
1227
+ #
1228
+ # @param request [::Google::Cloud::NetApp::V1::DeleteSnapshotRequest, ::Hash]
1229
+ # A request object representing the call parameters. Required. To specify no
1230
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1231
+ # @param options [::Gapic::CallOptions, ::Hash]
1232
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1233
+ #
1234
+ # @overload delete_snapshot(name: nil)
1235
+ # Pass arguments to `delete_snapshot` via keyword arguments. Note that at
1236
+ # least one keyword argument is required. To specify no parameters, or to keep all
1237
+ # the default parameter values, pass an empty Hash as a request object (see above).
1238
+ #
1239
+ # @param name [::String]
1240
+ # Required. The snapshot resource name, in the format
1241
+ # `projects/*/locations/*/volumes/*/snapshots/{snapshot_id}`
1242
+ # @yield [result, operation] Access the result along with the TransportOperation object
1243
+ # @yieldparam result [::Gapic::Operation]
1244
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1245
+ #
1246
+ # @return [::Gapic::Operation]
1247
+ #
1248
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1249
+ def delete_snapshot request, options = nil
1250
+ raise ::ArgumentError, "request must be provided" if request.nil?
1251
+
1252
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::DeleteSnapshotRequest
1253
+
1254
+ # Converts hash and nil to an options object
1255
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1256
+
1257
+ # Customize the options with defaults
1258
+ call_metadata = @config.rpcs.delete_snapshot.metadata.to_h
1259
+
1260
+ # Set x-goog-api-client and x-goog-user-project headers
1261
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1262
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1263
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
1264
+ transports_version_send: [:rest]
1265
+
1266
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1267
+
1268
+ options.apply_defaults timeout: @config.rpcs.delete_snapshot.timeout,
1269
+ metadata: call_metadata,
1270
+ retry_policy: @config.rpcs.delete_snapshot.retry_policy
1271
+
1272
+ options.apply_defaults timeout: @config.timeout,
1273
+ metadata: @config.metadata,
1274
+ retry_policy: @config.retry_policy
1275
+
1276
+ @net_app_stub.delete_snapshot request, options do |result, operation|
1277
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1278
+ yield result, operation if block_given?
1279
+ return result
1280
+ end
1281
+ rescue ::Gapic::Rest::Error => e
1282
+ raise ::Google::Cloud::Error.from_error(e)
1283
+ end
1284
+
1285
+ ##
1286
+ # Updates the settings of a specific snapshot.
1287
+ #
1288
+ # @overload update_snapshot(request, options = nil)
1289
+ # Pass arguments to `update_snapshot` via a request object, either of type
1290
+ # {::Google::Cloud::NetApp::V1::UpdateSnapshotRequest} or an equivalent Hash.
1291
+ #
1292
+ # @param request [::Google::Cloud::NetApp::V1::UpdateSnapshotRequest, ::Hash]
1293
+ # A request object representing the call parameters. Required. To specify no
1294
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1295
+ # @param options [::Gapic::CallOptions, ::Hash]
1296
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1297
+ #
1298
+ # @overload update_snapshot(update_mask: nil, snapshot: nil)
1299
+ # Pass arguments to `update_snapshot` via keyword arguments. Note that at
1300
+ # least one keyword argument is required. To specify no parameters, or to keep all
1301
+ # the default parameter values, pass an empty Hash as a request object (see above).
1302
+ #
1303
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1304
+ # Required. Mask of fields to update. At least one path must be supplied in
1305
+ # this field.
1306
+ # @param snapshot [::Google::Cloud::NetApp::V1::Snapshot, ::Hash]
1307
+ # Required. A snapshot resource
1308
+ # @yield [result, operation] Access the result along with the TransportOperation object
1309
+ # @yieldparam result [::Gapic::Operation]
1310
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1311
+ #
1312
+ # @return [::Gapic::Operation]
1313
+ #
1314
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1315
+ def update_snapshot request, options = nil
1316
+ raise ::ArgumentError, "request must be provided" if request.nil?
1317
+
1318
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::UpdateSnapshotRequest
1319
+
1320
+ # Converts hash and nil to an options object
1321
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1322
+
1323
+ # Customize the options with defaults
1324
+ call_metadata = @config.rpcs.update_snapshot.metadata.to_h
1325
+
1326
+ # Set x-goog-api-client and x-goog-user-project headers
1327
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1328
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1329
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
1330
+ transports_version_send: [:rest]
1331
+
1332
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1333
+
1334
+ options.apply_defaults timeout: @config.rpcs.update_snapshot.timeout,
1335
+ metadata: call_metadata,
1336
+ retry_policy: @config.rpcs.update_snapshot.retry_policy
1337
+
1338
+ options.apply_defaults timeout: @config.timeout,
1339
+ metadata: @config.metadata,
1340
+ retry_policy: @config.retry_policy
1341
+
1342
+ @net_app_stub.update_snapshot request, options do |result, operation|
1343
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1344
+ yield result, operation if block_given?
1345
+ return result
1346
+ end
1347
+ rescue ::Gapic::Rest::Error => e
1348
+ raise ::Google::Cloud::Error.from_error(e)
1349
+ end
1350
+
1351
+ ##
1352
+ # Lists active directories.
1353
+ #
1354
+ # @overload list_active_directories(request, options = nil)
1355
+ # Pass arguments to `list_active_directories` via a request object, either of type
1356
+ # {::Google::Cloud::NetApp::V1::ListActiveDirectoriesRequest} or an equivalent Hash.
1357
+ #
1358
+ # @param request [::Google::Cloud::NetApp::V1::ListActiveDirectoriesRequest, ::Hash]
1359
+ # A request object representing the call parameters. Required. To specify no
1360
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1361
+ # @param options [::Gapic::CallOptions, ::Hash]
1362
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1363
+ #
1364
+ # @overload list_active_directories(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1365
+ # Pass arguments to `list_active_directories` via keyword arguments. Note that at
1366
+ # least one keyword argument is required. To specify no parameters, or to keep all
1367
+ # the default parameter values, pass an empty Hash as a request object (see above).
1368
+ #
1369
+ # @param parent [::String]
1370
+ # Required. Parent value for ListActiveDirectoriesRequest
1371
+ # @param page_size [::Integer]
1372
+ # Requested page size. Server may return fewer items than requested.
1373
+ # If unspecified, the server will pick an appropriate default.
1374
+ # @param page_token [::String]
1375
+ # A token identifying a page of results the server should return.
1376
+ # @param filter [::String]
1377
+ # Filtering results
1378
+ # @param order_by [::String]
1379
+ # Hint for how to order the results
1380
+ # @yield [result, operation] Access the result along with the TransportOperation object
1381
+ # @yieldparam result [::Google::Cloud::NetApp::V1::ListActiveDirectoriesResponse]
1382
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1383
+ #
1384
+ # @return [::Google::Cloud::NetApp::V1::ListActiveDirectoriesResponse]
1385
+ #
1386
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1387
+ def list_active_directories request, options = nil
1388
+ raise ::ArgumentError, "request must be provided" if request.nil?
1389
+
1390
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::ListActiveDirectoriesRequest
1391
+
1392
+ # Converts hash and nil to an options object
1393
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1394
+
1395
+ # Customize the options with defaults
1396
+ call_metadata = @config.rpcs.list_active_directories.metadata.to_h
1397
+
1398
+ # Set x-goog-api-client and x-goog-user-project headers
1399
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1400
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1401
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
1402
+ transports_version_send: [:rest]
1403
+
1404
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1405
+
1406
+ options.apply_defaults timeout: @config.rpcs.list_active_directories.timeout,
1407
+ metadata: call_metadata,
1408
+ retry_policy: @config.rpcs.list_active_directories.retry_policy
1409
+
1410
+ options.apply_defaults timeout: @config.timeout,
1411
+ metadata: @config.metadata,
1412
+ retry_policy: @config.retry_policy
1413
+
1414
+ @net_app_stub.list_active_directories request, options do |result, operation|
1415
+ yield result, operation if block_given?
1416
+ return result
1417
+ end
1418
+ rescue ::Gapic::Rest::Error => e
1419
+ raise ::Google::Cloud::Error.from_error(e)
1420
+ end
1421
+
1422
+ ##
1423
+ # Describes a specified active directory.
1424
+ #
1425
+ # @overload get_active_directory(request, options = nil)
1426
+ # Pass arguments to `get_active_directory` via a request object, either of type
1427
+ # {::Google::Cloud::NetApp::V1::GetActiveDirectoryRequest} or an equivalent Hash.
1428
+ #
1429
+ # @param request [::Google::Cloud::NetApp::V1::GetActiveDirectoryRequest, ::Hash]
1430
+ # A request object representing the call parameters. Required. To specify no
1431
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1432
+ # @param options [::Gapic::CallOptions, ::Hash]
1433
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1434
+ #
1435
+ # @overload get_active_directory(name: nil)
1436
+ # Pass arguments to `get_active_directory` via keyword arguments. Note that at
1437
+ # least one keyword argument is required. To specify no parameters, or to keep all
1438
+ # the default parameter values, pass an empty Hash as a request object (see above).
1439
+ #
1440
+ # @param name [::String]
1441
+ # Required. Name of the active directory.
1442
+ # @yield [result, operation] Access the result along with the TransportOperation object
1443
+ # @yieldparam result [::Google::Cloud::NetApp::V1::ActiveDirectory]
1444
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1445
+ #
1446
+ # @return [::Google::Cloud::NetApp::V1::ActiveDirectory]
1447
+ #
1448
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1449
+ def get_active_directory request, options = nil
1450
+ raise ::ArgumentError, "request must be provided" if request.nil?
1451
+
1452
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::GetActiveDirectoryRequest
1453
+
1454
+ # Converts hash and nil to an options object
1455
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1456
+
1457
+ # Customize the options with defaults
1458
+ call_metadata = @config.rpcs.get_active_directory.metadata.to_h
1459
+
1460
+ # Set x-goog-api-client and x-goog-user-project headers
1461
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1462
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1463
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
1464
+ transports_version_send: [:rest]
1465
+
1466
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1467
+
1468
+ options.apply_defaults timeout: @config.rpcs.get_active_directory.timeout,
1469
+ metadata: call_metadata,
1470
+ retry_policy: @config.rpcs.get_active_directory.retry_policy
1471
+
1472
+ options.apply_defaults timeout: @config.timeout,
1473
+ metadata: @config.metadata,
1474
+ retry_policy: @config.retry_policy
1475
+
1476
+ @net_app_stub.get_active_directory request, options do |result, operation|
1477
+ yield result, operation if block_given?
1478
+ return result
1479
+ end
1480
+ rescue ::Gapic::Rest::Error => e
1481
+ raise ::Google::Cloud::Error.from_error(e)
1482
+ end
1483
+
1484
+ ##
1485
+ # CreateActiveDirectory
1486
+ # Creates the active directory specified in the request.
1487
+ #
1488
+ # @overload create_active_directory(request, options = nil)
1489
+ # Pass arguments to `create_active_directory` via a request object, either of type
1490
+ # {::Google::Cloud::NetApp::V1::CreateActiveDirectoryRequest} or an equivalent Hash.
1491
+ #
1492
+ # @param request [::Google::Cloud::NetApp::V1::CreateActiveDirectoryRequest, ::Hash]
1493
+ # A request object representing the call parameters. Required. To specify no
1494
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1495
+ # @param options [::Gapic::CallOptions, ::Hash]
1496
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1497
+ #
1498
+ # @overload create_active_directory(parent: nil, active_directory: nil, active_directory_id: nil)
1499
+ # Pass arguments to `create_active_directory` via keyword arguments. Note that at
1500
+ # least one keyword argument is required. To specify no parameters, or to keep all
1501
+ # the default parameter values, pass an empty Hash as a request object (see above).
1502
+ #
1503
+ # @param parent [::String]
1504
+ # Required. Value for parent.
1505
+ # @param active_directory [::Google::Cloud::NetApp::V1::ActiveDirectory, ::Hash]
1506
+ # Required. Fields of the to be created active directory.
1507
+ # @param active_directory_id [::String]
1508
+ # Required. ID of the active directory to create.
1509
+ # @yield [result, operation] Access the result along with the TransportOperation object
1510
+ # @yieldparam result [::Gapic::Operation]
1511
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1512
+ #
1513
+ # @return [::Gapic::Operation]
1514
+ #
1515
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1516
+ def create_active_directory request, options = nil
1517
+ raise ::ArgumentError, "request must be provided" if request.nil?
1518
+
1519
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::CreateActiveDirectoryRequest
1520
+
1521
+ # Converts hash and nil to an options object
1522
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1523
+
1524
+ # Customize the options with defaults
1525
+ call_metadata = @config.rpcs.create_active_directory.metadata.to_h
1526
+
1527
+ # Set x-goog-api-client and x-goog-user-project headers
1528
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1529
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1530
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
1531
+ transports_version_send: [:rest]
1532
+
1533
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1534
+
1535
+ options.apply_defaults timeout: @config.rpcs.create_active_directory.timeout,
1536
+ metadata: call_metadata,
1537
+ retry_policy: @config.rpcs.create_active_directory.retry_policy
1538
+
1539
+ options.apply_defaults timeout: @config.timeout,
1540
+ metadata: @config.metadata,
1541
+ retry_policy: @config.retry_policy
1542
+
1543
+ @net_app_stub.create_active_directory request, options do |result, operation|
1544
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1545
+ yield result, operation if block_given?
1546
+ return result
1547
+ end
1548
+ rescue ::Gapic::Rest::Error => e
1549
+ raise ::Google::Cloud::Error.from_error(e)
1550
+ end
1551
+
1552
+ ##
1553
+ # Update the parameters of an active directories.
1554
+ #
1555
+ # @overload update_active_directory(request, options = nil)
1556
+ # Pass arguments to `update_active_directory` via a request object, either of type
1557
+ # {::Google::Cloud::NetApp::V1::UpdateActiveDirectoryRequest} or an equivalent Hash.
1558
+ #
1559
+ # @param request [::Google::Cloud::NetApp::V1::UpdateActiveDirectoryRequest, ::Hash]
1560
+ # A request object representing the call parameters. Required. To specify no
1561
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1562
+ # @param options [::Gapic::CallOptions, ::Hash]
1563
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1564
+ #
1565
+ # @overload update_active_directory(update_mask: nil, active_directory: nil)
1566
+ # Pass arguments to `update_active_directory` via keyword arguments. Note that at
1567
+ # least one keyword argument is required. To specify no parameters, or to keep all
1568
+ # the default parameter values, pass an empty Hash as a request object (see above).
1569
+ #
1570
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1571
+ # Required. Field mask is used to specify the fields to be overwritten in the
1572
+ # Active Directory resource by the update.
1573
+ # The fields specified in the update_mask are relative to the resource, not
1574
+ # the full request. A field will be overwritten if it is in the mask. If the
1575
+ # user does not provide a mask then all fields will be overwritten.
1576
+ # @param active_directory [::Google::Cloud::NetApp::V1::ActiveDirectory, ::Hash]
1577
+ # Required. The volume being updated
1578
+ # @yield [result, operation] Access the result along with the TransportOperation object
1579
+ # @yieldparam result [::Gapic::Operation]
1580
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1581
+ #
1582
+ # @return [::Gapic::Operation]
1583
+ #
1584
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1585
+ def update_active_directory request, options = nil
1586
+ raise ::ArgumentError, "request must be provided" if request.nil?
1587
+
1588
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::UpdateActiveDirectoryRequest
1589
+
1590
+ # Converts hash and nil to an options object
1591
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1592
+
1593
+ # Customize the options with defaults
1594
+ call_metadata = @config.rpcs.update_active_directory.metadata.to_h
1595
+
1596
+ # Set x-goog-api-client and x-goog-user-project headers
1597
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1598
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1599
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
1600
+ transports_version_send: [:rest]
1601
+
1602
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1603
+
1604
+ options.apply_defaults timeout: @config.rpcs.update_active_directory.timeout,
1605
+ metadata: call_metadata,
1606
+ retry_policy: @config.rpcs.update_active_directory.retry_policy
1607
+
1608
+ options.apply_defaults timeout: @config.timeout,
1609
+ metadata: @config.metadata,
1610
+ retry_policy: @config.retry_policy
1611
+
1612
+ @net_app_stub.update_active_directory request, options do |result, operation|
1613
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1614
+ yield result, operation if block_given?
1615
+ return result
1616
+ end
1617
+ rescue ::Gapic::Rest::Error => e
1618
+ raise ::Google::Cloud::Error.from_error(e)
1619
+ end
1620
+
1621
+ ##
1622
+ # Delete the active directory specified in the request.
1623
+ #
1624
+ # @overload delete_active_directory(request, options = nil)
1625
+ # Pass arguments to `delete_active_directory` via a request object, either of type
1626
+ # {::Google::Cloud::NetApp::V1::DeleteActiveDirectoryRequest} or an equivalent Hash.
1627
+ #
1628
+ # @param request [::Google::Cloud::NetApp::V1::DeleteActiveDirectoryRequest, ::Hash]
1629
+ # A request object representing the call parameters. Required. To specify no
1630
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1631
+ # @param options [::Gapic::CallOptions, ::Hash]
1632
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1633
+ #
1634
+ # @overload delete_active_directory(name: nil)
1635
+ # Pass arguments to `delete_active_directory` via keyword arguments. Note that at
1636
+ # least one keyword argument is required. To specify no parameters, or to keep all
1637
+ # the default parameter values, pass an empty Hash as a request object (see above).
1638
+ #
1639
+ # @param name [::String]
1640
+ # Required. Name of the active directory.
1641
+ # @yield [result, operation] Access the result along with the TransportOperation object
1642
+ # @yieldparam result [::Gapic::Operation]
1643
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1644
+ #
1645
+ # @return [::Gapic::Operation]
1646
+ #
1647
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1648
+ def delete_active_directory request, options = nil
1649
+ raise ::ArgumentError, "request must be provided" if request.nil?
1650
+
1651
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::DeleteActiveDirectoryRequest
1652
+
1653
+ # Converts hash and nil to an options object
1654
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1655
+
1656
+ # Customize the options with defaults
1657
+ call_metadata = @config.rpcs.delete_active_directory.metadata.to_h
1658
+
1659
+ # Set x-goog-api-client and x-goog-user-project headers
1660
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1661
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1662
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
1663
+ transports_version_send: [:rest]
1664
+
1665
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1666
+
1667
+ options.apply_defaults timeout: @config.rpcs.delete_active_directory.timeout,
1668
+ metadata: call_metadata,
1669
+ retry_policy: @config.rpcs.delete_active_directory.retry_policy
1670
+
1671
+ options.apply_defaults timeout: @config.timeout,
1672
+ metadata: @config.metadata,
1673
+ retry_policy: @config.retry_policy
1674
+
1675
+ @net_app_stub.delete_active_directory request, options do |result, operation|
1676
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1677
+ yield result, operation if block_given?
1678
+ return result
1679
+ end
1680
+ rescue ::Gapic::Rest::Error => e
1681
+ raise ::Google::Cloud::Error.from_error(e)
1682
+ end
1683
+
1684
+ ##
1685
+ # Returns descriptions of all KMS configs owned by the caller.
1686
+ #
1687
+ # @overload list_kms_configs(request, options = nil)
1688
+ # Pass arguments to `list_kms_configs` via a request object, either of type
1689
+ # {::Google::Cloud::NetApp::V1::ListKmsConfigsRequest} or an equivalent Hash.
1690
+ #
1691
+ # @param request [::Google::Cloud::NetApp::V1::ListKmsConfigsRequest, ::Hash]
1692
+ # A request object representing the call parameters. Required. To specify no
1693
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1694
+ # @param options [::Gapic::CallOptions, ::Hash]
1695
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1696
+ #
1697
+ # @overload list_kms_configs(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil)
1698
+ # Pass arguments to `list_kms_configs` via keyword arguments. Note that at
1699
+ # least one keyword argument is required. To specify no parameters, or to keep all
1700
+ # the default parameter values, pass an empty Hash as a request object (see above).
1701
+ #
1702
+ # @param parent [::String]
1703
+ # Required. Parent value
1704
+ # @param page_size [::Integer]
1705
+ # The maximum number of items to return.
1706
+ # @param page_token [::String]
1707
+ # The next_page_token value to use if there are additional
1708
+ # results to retrieve for this list request.
1709
+ # @param order_by [::String]
1710
+ # Sort results. Supported values are "name", "name desc" or "" (unsorted).
1711
+ # @param filter [::String]
1712
+ # List filter.
1713
+ # @yield [result, operation] Access the result along with the TransportOperation object
1714
+ # @yieldparam result [::Google::Cloud::NetApp::V1::ListKmsConfigsResponse]
1715
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1716
+ #
1717
+ # @return [::Google::Cloud::NetApp::V1::ListKmsConfigsResponse]
1718
+ #
1719
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1720
+ def list_kms_configs request, options = nil
1721
+ raise ::ArgumentError, "request must be provided" if request.nil?
1722
+
1723
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::ListKmsConfigsRequest
1724
+
1725
+ # Converts hash and nil to an options object
1726
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1727
+
1728
+ # Customize the options with defaults
1729
+ call_metadata = @config.rpcs.list_kms_configs.metadata.to_h
1730
+
1731
+ # Set x-goog-api-client and x-goog-user-project headers
1732
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1733
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1734
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
1735
+ transports_version_send: [:rest]
1736
+
1737
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1738
+
1739
+ options.apply_defaults timeout: @config.rpcs.list_kms_configs.timeout,
1740
+ metadata: call_metadata,
1741
+ retry_policy: @config.rpcs.list_kms_configs.retry_policy
1742
+
1743
+ options.apply_defaults timeout: @config.timeout,
1744
+ metadata: @config.metadata,
1745
+ retry_policy: @config.retry_policy
1746
+
1747
+ @net_app_stub.list_kms_configs request, options do |result, operation|
1748
+ yield result, operation if block_given?
1749
+ return result
1750
+ end
1751
+ rescue ::Gapic::Rest::Error => e
1752
+ raise ::Google::Cloud::Error.from_error(e)
1753
+ end
1754
+
1755
+ ##
1756
+ # Creates a new KMS config.
1757
+ #
1758
+ # @overload create_kms_config(request, options = nil)
1759
+ # Pass arguments to `create_kms_config` via a request object, either of type
1760
+ # {::Google::Cloud::NetApp::V1::CreateKmsConfigRequest} or an equivalent Hash.
1761
+ #
1762
+ # @param request [::Google::Cloud::NetApp::V1::CreateKmsConfigRequest, ::Hash]
1763
+ # A request object representing the call parameters. Required. To specify no
1764
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1765
+ # @param options [::Gapic::CallOptions, ::Hash]
1766
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1767
+ #
1768
+ # @overload create_kms_config(parent: nil, kms_config_id: nil, kms_config: nil)
1769
+ # Pass arguments to `create_kms_config` via keyword arguments. Note that at
1770
+ # least one keyword argument is required. To specify no parameters, or to keep all
1771
+ # the default parameter values, pass an empty Hash as a request object (see above).
1772
+ #
1773
+ # @param parent [::String]
1774
+ # Required. Value for parent.
1775
+ # @param kms_config_id [::String]
1776
+ # Required. Id of the requesting KmsConfig
1777
+ # If auto-generating Id server-side, remove this field and
1778
+ # id from the method_signature of Create RPC
1779
+ # @param kms_config [::Google::Cloud::NetApp::V1::KmsConfig, ::Hash]
1780
+ # Required. The required parameters to create a new KmsConfig.
1781
+ # @yield [result, operation] Access the result along with the TransportOperation object
1782
+ # @yieldparam result [::Gapic::Operation]
1783
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1784
+ #
1785
+ # @return [::Gapic::Operation]
1786
+ #
1787
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1788
+ def create_kms_config request, options = nil
1789
+ raise ::ArgumentError, "request must be provided" if request.nil?
1790
+
1791
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::CreateKmsConfigRequest
1792
+
1793
+ # Converts hash and nil to an options object
1794
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1795
+
1796
+ # Customize the options with defaults
1797
+ call_metadata = @config.rpcs.create_kms_config.metadata.to_h
1798
+
1799
+ # Set x-goog-api-client and x-goog-user-project headers
1800
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1801
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1802
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
1803
+ transports_version_send: [:rest]
1804
+
1805
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1806
+
1807
+ options.apply_defaults timeout: @config.rpcs.create_kms_config.timeout,
1808
+ metadata: call_metadata,
1809
+ retry_policy: @config.rpcs.create_kms_config.retry_policy
1810
+
1811
+ options.apply_defaults timeout: @config.timeout,
1812
+ metadata: @config.metadata,
1813
+ retry_policy: @config.retry_policy
1814
+
1815
+ @net_app_stub.create_kms_config request, options do |result, operation|
1816
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1817
+ yield result, operation if block_given?
1818
+ return result
1819
+ end
1820
+ rescue ::Gapic::Rest::Error => e
1821
+ raise ::Google::Cloud::Error.from_error(e)
1822
+ end
1823
+
1824
+ ##
1825
+ # Returns the description of the specified KMS config by kms_config_id.
1826
+ #
1827
+ # @overload get_kms_config(request, options = nil)
1828
+ # Pass arguments to `get_kms_config` via a request object, either of type
1829
+ # {::Google::Cloud::NetApp::V1::GetKmsConfigRequest} or an equivalent Hash.
1830
+ #
1831
+ # @param request [::Google::Cloud::NetApp::V1::GetKmsConfigRequest, ::Hash]
1832
+ # A request object representing the call parameters. Required. To specify no
1833
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1834
+ # @param options [::Gapic::CallOptions, ::Hash]
1835
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1836
+ #
1837
+ # @overload get_kms_config(name: nil)
1838
+ # Pass arguments to `get_kms_config` via keyword arguments. Note that at
1839
+ # least one keyword argument is required. To specify no parameters, or to keep all
1840
+ # the default parameter values, pass an empty Hash as a request object (see above).
1841
+ #
1842
+ # @param name [::String]
1843
+ # Required. Name of the KmsConfig
1844
+ # @yield [result, operation] Access the result along with the TransportOperation object
1845
+ # @yieldparam result [::Google::Cloud::NetApp::V1::KmsConfig]
1846
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1847
+ #
1848
+ # @return [::Google::Cloud::NetApp::V1::KmsConfig]
1849
+ #
1850
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1851
+ def get_kms_config request, options = nil
1852
+ raise ::ArgumentError, "request must be provided" if request.nil?
1853
+
1854
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::GetKmsConfigRequest
1855
+
1856
+ # Converts hash and nil to an options object
1857
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1858
+
1859
+ # Customize the options with defaults
1860
+ call_metadata = @config.rpcs.get_kms_config.metadata.to_h
1861
+
1862
+ # Set x-goog-api-client and x-goog-user-project headers
1863
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1864
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1865
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
1866
+ transports_version_send: [:rest]
1867
+
1868
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1869
+
1870
+ options.apply_defaults timeout: @config.rpcs.get_kms_config.timeout,
1871
+ metadata: call_metadata,
1872
+ retry_policy: @config.rpcs.get_kms_config.retry_policy
1873
+
1874
+ options.apply_defaults timeout: @config.timeout,
1875
+ metadata: @config.metadata,
1876
+ retry_policy: @config.retry_policy
1877
+
1878
+ @net_app_stub.get_kms_config request, options do |result, operation|
1879
+ yield result, operation if block_given?
1880
+ return result
1881
+ end
1882
+ rescue ::Gapic::Rest::Error => e
1883
+ raise ::Google::Cloud::Error.from_error(e)
1884
+ end
1885
+
1886
+ ##
1887
+ # Updates the Kms config properties with the full spec
1888
+ #
1889
+ # @overload update_kms_config(request, options = nil)
1890
+ # Pass arguments to `update_kms_config` via a request object, either of type
1891
+ # {::Google::Cloud::NetApp::V1::UpdateKmsConfigRequest} or an equivalent Hash.
1892
+ #
1893
+ # @param request [::Google::Cloud::NetApp::V1::UpdateKmsConfigRequest, ::Hash]
1894
+ # A request object representing the call parameters. Required. To specify no
1895
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1896
+ # @param options [::Gapic::CallOptions, ::Hash]
1897
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1898
+ #
1899
+ # @overload update_kms_config(update_mask: nil, kms_config: nil)
1900
+ # Pass arguments to `update_kms_config` via keyword arguments. Note that at
1901
+ # least one keyword argument is required. To specify no parameters, or to keep all
1902
+ # the default parameter values, pass an empty Hash as a request object (see above).
1903
+ #
1904
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1905
+ # Required. Field mask is used to specify the fields to be overwritten in the
1906
+ # KmsConfig resource by the update.
1907
+ # The fields specified in the update_mask are relative to the resource, not
1908
+ # the full request. A field will be overwritten if it is in the mask. If the
1909
+ # user does not provide a mask then all fields will be overwritten.
1910
+ # @param kms_config [::Google::Cloud::NetApp::V1::KmsConfig, ::Hash]
1911
+ # Required. The KmsConfig being updated
1912
+ # @yield [result, operation] Access the result along with the TransportOperation object
1913
+ # @yieldparam result [::Gapic::Operation]
1914
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1915
+ #
1916
+ # @return [::Gapic::Operation]
1917
+ #
1918
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1919
+ def update_kms_config request, options = nil
1920
+ raise ::ArgumentError, "request must be provided" if request.nil?
1921
+
1922
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::UpdateKmsConfigRequest
1923
+
1924
+ # Converts hash and nil to an options object
1925
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1926
+
1927
+ # Customize the options with defaults
1928
+ call_metadata = @config.rpcs.update_kms_config.metadata.to_h
1929
+
1930
+ # Set x-goog-api-client and x-goog-user-project headers
1931
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1932
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1933
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
1934
+ transports_version_send: [:rest]
1935
+
1936
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1937
+
1938
+ options.apply_defaults timeout: @config.rpcs.update_kms_config.timeout,
1939
+ metadata: call_metadata,
1940
+ retry_policy: @config.rpcs.update_kms_config.retry_policy
1941
+
1942
+ options.apply_defaults timeout: @config.timeout,
1943
+ metadata: @config.metadata,
1944
+ retry_policy: @config.retry_policy
1945
+
1946
+ @net_app_stub.update_kms_config request, options do |result, operation|
1947
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1948
+ yield result, operation if block_given?
1949
+ return result
1950
+ end
1951
+ rescue ::Gapic::Rest::Error => e
1952
+ raise ::Google::Cloud::Error.from_error(e)
1953
+ end
1954
+
1955
+ ##
1956
+ # Encrypt the existing volumes without CMEK encryption with the desired the
1957
+ # KMS config for the whole region.
1958
+ #
1959
+ # @overload encrypt_volumes(request, options = nil)
1960
+ # Pass arguments to `encrypt_volumes` via a request object, either of type
1961
+ # {::Google::Cloud::NetApp::V1::EncryptVolumesRequest} or an equivalent Hash.
1962
+ #
1963
+ # @param request [::Google::Cloud::NetApp::V1::EncryptVolumesRequest, ::Hash]
1964
+ # A request object representing the call parameters. Required. To specify no
1965
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1966
+ # @param options [::Gapic::CallOptions, ::Hash]
1967
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1968
+ #
1969
+ # @overload encrypt_volumes(name: nil)
1970
+ # Pass arguments to `encrypt_volumes` via keyword arguments. Note that at
1971
+ # least one keyword argument is required. To specify no parameters, or to keep all
1972
+ # the default parameter values, pass an empty Hash as a request object (see above).
1973
+ #
1974
+ # @param name [::String]
1975
+ # Required. Name of the KmsConfig.
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
+ def encrypt_volumes request, options = nil
1984
+ raise ::ArgumentError, "request must be provided" if request.nil?
1985
+
1986
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::EncryptVolumesRequest
1987
+
1988
+ # Converts hash and nil to an options object
1989
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1990
+
1991
+ # Customize the options with defaults
1992
+ call_metadata = @config.rpcs.encrypt_volumes.metadata.to_h
1993
+
1994
+ # Set x-goog-api-client and x-goog-user-project headers
1995
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1996
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1997
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
1998
+ transports_version_send: [:rest]
1999
+
2000
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2001
+
2002
+ options.apply_defaults timeout: @config.rpcs.encrypt_volumes.timeout,
2003
+ metadata: call_metadata,
2004
+ retry_policy: @config.rpcs.encrypt_volumes.retry_policy
2005
+
2006
+ options.apply_defaults timeout: @config.timeout,
2007
+ metadata: @config.metadata,
2008
+ retry_policy: @config.retry_policy
2009
+
2010
+ @net_app_stub.encrypt_volumes request, options do |result, operation|
2011
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2012
+ yield result, operation if block_given?
2013
+ return result
2014
+ end
2015
+ rescue ::Gapic::Rest::Error => e
2016
+ raise ::Google::Cloud::Error.from_error(e)
2017
+ end
2018
+
2019
+ ##
2020
+ # Verifies KMS config reachability.
2021
+ #
2022
+ # @overload verify_kms_config(request, options = nil)
2023
+ # Pass arguments to `verify_kms_config` via a request object, either of type
2024
+ # {::Google::Cloud::NetApp::V1::VerifyKmsConfigRequest} or an equivalent Hash.
2025
+ #
2026
+ # @param request [::Google::Cloud::NetApp::V1::VerifyKmsConfigRequest, ::Hash]
2027
+ # A request object representing the call parameters. Required. To specify no
2028
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2029
+ # @param options [::Gapic::CallOptions, ::Hash]
2030
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2031
+ #
2032
+ # @overload verify_kms_config(name: nil)
2033
+ # Pass arguments to `verify_kms_config` via keyword arguments. Note that at
2034
+ # least one keyword argument is required. To specify no parameters, or to keep all
2035
+ # the default parameter values, pass an empty Hash as a request object (see above).
2036
+ #
2037
+ # @param name [::String]
2038
+ # Required. Name of the KMS Config to be verified.
2039
+ # @yield [result, operation] Access the result along with the TransportOperation object
2040
+ # @yieldparam result [::Google::Cloud::NetApp::V1::VerifyKmsConfigResponse]
2041
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2042
+ #
2043
+ # @return [::Google::Cloud::NetApp::V1::VerifyKmsConfigResponse]
2044
+ #
2045
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2046
+ def verify_kms_config request, options = nil
2047
+ raise ::ArgumentError, "request must be provided" if request.nil?
2048
+
2049
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::VerifyKmsConfigRequest
2050
+
2051
+ # Converts hash and nil to an options object
2052
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2053
+
2054
+ # Customize the options with defaults
2055
+ call_metadata = @config.rpcs.verify_kms_config.metadata.to_h
2056
+
2057
+ # Set x-goog-api-client and x-goog-user-project headers
2058
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2059
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2060
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
2061
+ transports_version_send: [:rest]
2062
+
2063
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2064
+
2065
+ options.apply_defaults timeout: @config.rpcs.verify_kms_config.timeout,
2066
+ metadata: call_metadata,
2067
+ retry_policy: @config.rpcs.verify_kms_config.retry_policy
2068
+
2069
+ options.apply_defaults timeout: @config.timeout,
2070
+ metadata: @config.metadata,
2071
+ retry_policy: @config.retry_policy
2072
+
2073
+ @net_app_stub.verify_kms_config request, options do |result, operation|
2074
+ yield result, operation if block_given?
2075
+ return result
2076
+ end
2077
+ rescue ::Gapic::Rest::Error => e
2078
+ raise ::Google::Cloud::Error.from_error(e)
2079
+ end
2080
+
2081
+ ##
2082
+ # Warning! This operation will permanently delete the Kms config.
2083
+ #
2084
+ # @overload delete_kms_config(request, options = nil)
2085
+ # Pass arguments to `delete_kms_config` via a request object, either of type
2086
+ # {::Google::Cloud::NetApp::V1::DeleteKmsConfigRequest} or an equivalent Hash.
2087
+ #
2088
+ # @param request [::Google::Cloud::NetApp::V1::DeleteKmsConfigRequest, ::Hash]
2089
+ # A request object representing the call parameters. Required. To specify no
2090
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2091
+ # @param options [::Gapic::CallOptions, ::Hash]
2092
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2093
+ #
2094
+ # @overload delete_kms_config(name: nil)
2095
+ # Pass arguments to `delete_kms_config` via keyword arguments. Note that at
2096
+ # least one keyword argument is required. To specify no parameters, or to keep all
2097
+ # the default parameter values, pass an empty Hash as a request object (see above).
2098
+ #
2099
+ # @param name [::String]
2100
+ # Required. Name of the KmsConfig.
2101
+ # @yield [result, operation] Access the result along with the TransportOperation object
2102
+ # @yieldparam result [::Gapic::Operation]
2103
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2104
+ #
2105
+ # @return [::Gapic::Operation]
2106
+ #
2107
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2108
+ def delete_kms_config request, options = nil
2109
+ raise ::ArgumentError, "request must be provided" if request.nil?
2110
+
2111
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::DeleteKmsConfigRequest
2112
+
2113
+ # Converts hash and nil to an options object
2114
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2115
+
2116
+ # Customize the options with defaults
2117
+ call_metadata = @config.rpcs.delete_kms_config.metadata.to_h
2118
+
2119
+ # Set x-goog-api-client and x-goog-user-project headers
2120
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2121
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2122
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
2123
+ transports_version_send: [:rest]
2124
+
2125
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2126
+
2127
+ options.apply_defaults timeout: @config.rpcs.delete_kms_config.timeout,
2128
+ metadata: call_metadata,
2129
+ retry_policy: @config.rpcs.delete_kms_config.retry_policy
2130
+
2131
+ options.apply_defaults timeout: @config.timeout,
2132
+ metadata: @config.metadata,
2133
+ retry_policy: @config.retry_policy
2134
+
2135
+ @net_app_stub.delete_kms_config request, options do |result, operation|
2136
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2137
+ yield result, operation if block_given?
2138
+ return result
2139
+ end
2140
+ rescue ::Gapic::Rest::Error => e
2141
+ raise ::Google::Cloud::Error.from_error(e)
2142
+ end
2143
+
2144
+ ##
2145
+ # Returns descriptions of all replications for a volume.
2146
+ #
2147
+ # @overload list_replications(request, options = nil)
2148
+ # Pass arguments to `list_replications` via a request object, either of type
2149
+ # {::Google::Cloud::NetApp::V1::ListReplicationsRequest} or an equivalent Hash.
2150
+ #
2151
+ # @param request [::Google::Cloud::NetApp::V1::ListReplicationsRequest, ::Hash]
2152
+ # A request object representing the call parameters. Required. To specify no
2153
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2154
+ # @param options [::Gapic::CallOptions, ::Hash]
2155
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2156
+ #
2157
+ # @overload list_replications(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil)
2158
+ # Pass arguments to `list_replications` via keyword arguments. Note that at
2159
+ # least one keyword argument is required. To specify no parameters, or to keep all
2160
+ # the default parameter values, pass an empty Hash as a request object (see above).
2161
+ #
2162
+ # @param parent [::String]
2163
+ # Required. The volume for which to retrieve replication information,
2164
+ # in the format
2165
+ # `projects/{project_id}/locations/{location}/volumes/{volume_id}`.
2166
+ # @param page_size [::Integer]
2167
+ # The maximum number of items to return.
2168
+ # @param page_token [::String]
2169
+ # The next_page_token value to use if there are additional
2170
+ # results to retrieve for this list request.
2171
+ # @param order_by [::String]
2172
+ # Sort results. Supported values are "name", "name desc" or "" (unsorted).
2173
+ # @param filter [::String]
2174
+ # List filter.
2175
+ # @yield [result, operation] Access the result along with the TransportOperation object
2176
+ # @yieldparam result [::Google::Cloud::NetApp::V1::ListReplicationsResponse]
2177
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2178
+ #
2179
+ # @return [::Google::Cloud::NetApp::V1::ListReplicationsResponse]
2180
+ #
2181
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2182
+ def list_replications request, options = nil
2183
+ raise ::ArgumentError, "request must be provided" if request.nil?
2184
+
2185
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::ListReplicationsRequest
2186
+
2187
+ # Converts hash and nil to an options object
2188
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2189
+
2190
+ # Customize the options with defaults
2191
+ call_metadata = @config.rpcs.list_replications.metadata.to_h
2192
+
2193
+ # Set x-goog-api-client and x-goog-user-project headers
2194
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2195
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2196
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
2197
+ transports_version_send: [:rest]
2198
+
2199
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2200
+
2201
+ options.apply_defaults timeout: @config.rpcs.list_replications.timeout,
2202
+ metadata: call_metadata,
2203
+ retry_policy: @config.rpcs.list_replications.retry_policy
2204
+
2205
+ options.apply_defaults timeout: @config.timeout,
2206
+ metadata: @config.metadata,
2207
+ retry_policy: @config.retry_policy
2208
+
2209
+ @net_app_stub.list_replications request, options do |result, operation|
2210
+ yield result, operation if block_given?
2211
+ return result
2212
+ end
2213
+ rescue ::Gapic::Rest::Error => e
2214
+ raise ::Google::Cloud::Error.from_error(e)
2215
+ end
2216
+
2217
+ ##
2218
+ # Describe a replication for a volume.
2219
+ #
2220
+ # @overload get_replication(request, options = nil)
2221
+ # Pass arguments to `get_replication` via a request object, either of type
2222
+ # {::Google::Cloud::NetApp::V1::GetReplicationRequest} or an equivalent Hash.
2223
+ #
2224
+ # @param request [::Google::Cloud::NetApp::V1::GetReplicationRequest, ::Hash]
2225
+ # A request object representing the call parameters. Required. To specify no
2226
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2227
+ # @param options [::Gapic::CallOptions, ::Hash]
2228
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2229
+ #
2230
+ # @overload get_replication(name: nil)
2231
+ # Pass arguments to `get_replication` via keyword arguments. Note that at
2232
+ # least one keyword argument is required. To specify no parameters, or to keep all
2233
+ # the default parameter values, pass an empty Hash as a request object (see above).
2234
+ #
2235
+ # @param name [::String]
2236
+ # Required. The replication resource name, in the format
2237
+ # `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}`
2238
+ # @yield [result, operation] Access the result along with the TransportOperation object
2239
+ # @yieldparam result [::Google::Cloud::NetApp::V1::Replication]
2240
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2241
+ #
2242
+ # @return [::Google::Cloud::NetApp::V1::Replication]
2243
+ #
2244
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2245
+ def get_replication request, options = nil
2246
+ raise ::ArgumentError, "request must be provided" if request.nil?
2247
+
2248
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::GetReplicationRequest
2249
+
2250
+ # Converts hash and nil to an options object
2251
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2252
+
2253
+ # Customize the options with defaults
2254
+ call_metadata = @config.rpcs.get_replication.metadata.to_h
2255
+
2256
+ # Set x-goog-api-client and x-goog-user-project headers
2257
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2258
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2259
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
2260
+ transports_version_send: [:rest]
2261
+
2262
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2263
+
2264
+ options.apply_defaults timeout: @config.rpcs.get_replication.timeout,
2265
+ metadata: call_metadata,
2266
+ retry_policy: @config.rpcs.get_replication.retry_policy
2267
+
2268
+ options.apply_defaults timeout: @config.timeout,
2269
+ metadata: @config.metadata,
2270
+ retry_policy: @config.retry_policy
2271
+
2272
+ @net_app_stub.get_replication request, options do |result, operation|
2273
+ yield result, operation if block_given?
2274
+ return result
2275
+ end
2276
+ rescue ::Gapic::Rest::Error => e
2277
+ raise ::Google::Cloud::Error.from_error(e)
2278
+ end
2279
+
2280
+ ##
2281
+ # Create a new replication for a volume.
2282
+ #
2283
+ # @overload create_replication(request, options = nil)
2284
+ # Pass arguments to `create_replication` via a request object, either of type
2285
+ # {::Google::Cloud::NetApp::V1::CreateReplicationRequest} or an equivalent Hash.
2286
+ #
2287
+ # @param request [::Google::Cloud::NetApp::V1::CreateReplicationRequest, ::Hash]
2288
+ # A request object representing the call parameters. Required. To specify no
2289
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2290
+ # @param options [::Gapic::CallOptions, ::Hash]
2291
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2292
+ #
2293
+ # @overload create_replication(parent: nil, replication: nil, replication_id: nil)
2294
+ # Pass arguments to `create_replication` via keyword arguments. Note that at
2295
+ # least one keyword argument is required. To specify no parameters, or to keep all
2296
+ # the default parameter values, pass an empty Hash as a request object (see above).
2297
+ #
2298
+ # @param parent [::String]
2299
+ # Required. The NetApp volume to create the replications of, in the format
2300
+ # `projects/{project_id}/locations/{location}/volumes/{volume_id}`
2301
+ # @param replication [::Google::Cloud::NetApp::V1::Replication, ::Hash]
2302
+ # Required. A replication resource
2303
+ # @param replication_id [::String]
2304
+ # Required. ID of the replication to create.
2305
+ # This value must start with a lowercase letter followed by up to 62
2306
+ # lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
2307
+ # @yield [result, operation] Access the result along with the TransportOperation object
2308
+ # @yieldparam result [::Gapic::Operation]
2309
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2310
+ #
2311
+ # @return [::Gapic::Operation]
2312
+ #
2313
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2314
+ def create_replication request, options = nil
2315
+ raise ::ArgumentError, "request must be provided" if request.nil?
2316
+
2317
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::CreateReplicationRequest
2318
+
2319
+ # Converts hash and nil to an options object
2320
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2321
+
2322
+ # Customize the options with defaults
2323
+ call_metadata = @config.rpcs.create_replication.metadata.to_h
2324
+
2325
+ # Set x-goog-api-client and x-goog-user-project headers
2326
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2327
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2328
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
2329
+ transports_version_send: [:rest]
2330
+
2331
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2332
+
2333
+ options.apply_defaults timeout: @config.rpcs.create_replication.timeout,
2334
+ metadata: call_metadata,
2335
+ retry_policy: @config.rpcs.create_replication.retry_policy
2336
+
2337
+ options.apply_defaults timeout: @config.timeout,
2338
+ metadata: @config.metadata,
2339
+ retry_policy: @config.retry_policy
2340
+
2341
+ @net_app_stub.create_replication request, options do |result, operation|
2342
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2343
+ yield result, operation if block_given?
2344
+ return result
2345
+ end
2346
+ rescue ::Gapic::Rest::Error => e
2347
+ raise ::Google::Cloud::Error.from_error(e)
2348
+ end
2349
+
2350
+ ##
2351
+ # Deletes a replication.
2352
+ #
2353
+ # @overload delete_replication(request, options = nil)
2354
+ # Pass arguments to `delete_replication` via a request object, either of type
2355
+ # {::Google::Cloud::NetApp::V1::DeleteReplicationRequest} or an equivalent Hash.
2356
+ #
2357
+ # @param request [::Google::Cloud::NetApp::V1::DeleteReplicationRequest, ::Hash]
2358
+ # A request object representing the call parameters. Required. To specify no
2359
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2360
+ # @param options [::Gapic::CallOptions, ::Hash]
2361
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2362
+ #
2363
+ # @overload delete_replication(name: nil)
2364
+ # Pass arguments to `delete_replication` via keyword arguments. Note that at
2365
+ # least one keyword argument is required. To specify no parameters, or to keep all
2366
+ # the default parameter values, pass an empty Hash as a request object (see above).
2367
+ #
2368
+ # @param name [::String]
2369
+ # Required. The replication resource name, in the format
2370
+ # `projects/*/locations/*/volumes/*/replications/{replication_id}`
2371
+ # @yield [result, operation] Access the result along with the TransportOperation object
2372
+ # @yieldparam result [::Gapic::Operation]
2373
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2374
+ #
2375
+ # @return [::Gapic::Operation]
2376
+ #
2377
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2378
+ def delete_replication request, options = nil
2379
+ raise ::ArgumentError, "request must be provided" if request.nil?
2380
+
2381
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::DeleteReplicationRequest
2382
+
2383
+ # Converts hash and nil to an options object
2384
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2385
+
2386
+ # Customize the options with defaults
2387
+ call_metadata = @config.rpcs.delete_replication.metadata.to_h
2388
+
2389
+ # Set x-goog-api-client and x-goog-user-project headers
2390
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2391
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2392
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
2393
+ transports_version_send: [:rest]
2394
+
2395
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2396
+
2397
+ options.apply_defaults timeout: @config.rpcs.delete_replication.timeout,
2398
+ metadata: call_metadata,
2399
+ retry_policy: @config.rpcs.delete_replication.retry_policy
2400
+
2401
+ options.apply_defaults timeout: @config.timeout,
2402
+ metadata: @config.metadata,
2403
+ retry_policy: @config.retry_policy
2404
+
2405
+ @net_app_stub.delete_replication request, options do |result, operation|
2406
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2407
+ yield result, operation if block_given?
2408
+ return result
2409
+ end
2410
+ rescue ::Gapic::Rest::Error => e
2411
+ raise ::Google::Cloud::Error.from_error(e)
2412
+ end
2413
+
2414
+ ##
2415
+ # Updates the settings of a specific replication.
2416
+ #
2417
+ # @overload update_replication(request, options = nil)
2418
+ # Pass arguments to `update_replication` via a request object, either of type
2419
+ # {::Google::Cloud::NetApp::V1::UpdateReplicationRequest} or an equivalent Hash.
2420
+ #
2421
+ # @param request [::Google::Cloud::NetApp::V1::UpdateReplicationRequest, ::Hash]
2422
+ # A request object representing the call parameters. Required. To specify no
2423
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2424
+ # @param options [::Gapic::CallOptions, ::Hash]
2425
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2426
+ #
2427
+ # @overload update_replication(update_mask: nil, replication: nil)
2428
+ # Pass arguments to `update_replication` via keyword arguments. Note that at
2429
+ # least one keyword argument is required. To specify no parameters, or to keep all
2430
+ # the default parameter values, pass an empty Hash as a request object (see above).
2431
+ #
2432
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
2433
+ # Required. Mask of fields to update. At least one path must be supplied in
2434
+ # this field.
2435
+ # @param replication [::Google::Cloud::NetApp::V1::Replication, ::Hash]
2436
+ # Required. A replication resource
2437
+ # @yield [result, operation] Access the result along with the TransportOperation object
2438
+ # @yieldparam result [::Gapic::Operation]
2439
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2440
+ #
2441
+ # @return [::Gapic::Operation]
2442
+ #
2443
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2444
+ def update_replication request, options = nil
2445
+ raise ::ArgumentError, "request must be provided" if request.nil?
2446
+
2447
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::UpdateReplicationRequest
2448
+
2449
+ # Converts hash and nil to an options object
2450
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2451
+
2452
+ # Customize the options with defaults
2453
+ call_metadata = @config.rpcs.update_replication.metadata.to_h
2454
+
2455
+ # Set x-goog-api-client and x-goog-user-project headers
2456
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2457
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2458
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
2459
+ transports_version_send: [:rest]
2460
+
2461
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2462
+
2463
+ options.apply_defaults timeout: @config.rpcs.update_replication.timeout,
2464
+ metadata: call_metadata,
2465
+ retry_policy: @config.rpcs.update_replication.retry_policy
2466
+
2467
+ options.apply_defaults timeout: @config.timeout,
2468
+ metadata: @config.metadata,
2469
+ retry_policy: @config.retry_policy
2470
+
2471
+ @net_app_stub.update_replication request, options do |result, operation|
2472
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2473
+ yield result, operation if block_given?
2474
+ return result
2475
+ end
2476
+ rescue ::Gapic::Rest::Error => e
2477
+ raise ::Google::Cloud::Error.from_error(e)
2478
+ end
2479
+
2480
+ ##
2481
+ # Stop Cross Region Replication.
2482
+ #
2483
+ # @overload stop_replication(request, options = nil)
2484
+ # Pass arguments to `stop_replication` via a request object, either of type
2485
+ # {::Google::Cloud::NetApp::V1::StopReplicationRequest} or an equivalent Hash.
2486
+ #
2487
+ # @param request [::Google::Cloud::NetApp::V1::StopReplicationRequest, ::Hash]
2488
+ # A request object representing the call parameters. Required. To specify no
2489
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2490
+ # @param options [::Gapic::CallOptions, ::Hash]
2491
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2492
+ #
2493
+ # @overload stop_replication(name: nil, force: nil)
2494
+ # Pass arguments to `stop_replication` via keyword arguments. Note that at
2495
+ # least one keyword argument is required. To specify no parameters, or to keep all
2496
+ # the default parameter values, pass an empty Hash as a request object (see above).
2497
+ #
2498
+ # @param name [::String]
2499
+ # Required. The resource name of the replication, in the format of
2500
+ # projects/\\{project_id}/locations/\\{location}/volumes/\\{volume_id}/replications/\\{replication_id}.
2501
+ # @param force [::Boolean]
2502
+ # Indicates whether to stop replication forcefully while data transfer is in
2503
+ # progress.
2504
+ # Warning! if force is true, this will abort any current transfers
2505
+ # and can lead to data loss due to partial transfer.
2506
+ # If force is false, stop replication will fail while data transfer is in
2507
+ # progress and you will need to retry later.
2508
+ # @yield [result, operation] Access the result along with the TransportOperation object
2509
+ # @yieldparam result [::Gapic::Operation]
2510
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2511
+ #
2512
+ # @return [::Gapic::Operation]
2513
+ #
2514
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2515
+ def stop_replication request, options = nil
2516
+ raise ::ArgumentError, "request must be provided" if request.nil?
2517
+
2518
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::StopReplicationRequest
2519
+
2520
+ # Converts hash and nil to an options object
2521
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2522
+
2523
+ # Customize the options with defaults
2524
+ call_metadata = @config.rpcs.stop_replication.metadata.to_h
2525
+
2526
+ # Set x-goog-api-client and x-goog-user-project headers
2527
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2528
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2529
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
2530
+ transports_version_send: [:rest]
2531
+
2532
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2533
+
2534
+ options.apply_defaults timeout: @config.rpcs.stop_replication.timeout,
2535
+ metadata: call_metadata,
2536
+ retry_policy: @config.rpcs.stop_replication.retry_policy
2537
+
2538
+ options.apply_defaults timeout: @config.timeout,
2539
+ metadata: @config.metadata,
2540
+ retry_policy: @config.retry_policy
2541
+
2542
+ @net_app_stub.stop_replication request, options do |result, operation|
2543
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2544
+ yield result, operation if block_given?
2545
+ return result
2546
+ end
2547
+ rescue ::Gapic::Rest::Error => e
2548
+ raise ::Google::Cloud::Error.from_error(e)
2549
+ end
2550
+
2551
+ ##
2552
+ # Resume Cross Region Replication.
2553
+ #
2554
+ # @overload resume_replication(request, options = nil)
2555
+ # Pass arguments to `resume_replication` via a request object, either of type
2556
+ # {::Google::Cloud::NetApp::V1::ResumeReplicationRequest} or an equivalent Hash.
2557
+ #
2558
+ # @param request [::Google::Cloud::NetApp::V1::ResumeReplicationRequest, ::Hash]
2559
+ # A request object representing the call parameters. Required. To specify no
2560
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2561
+ # @param options [::Gapic::CallOptions, ::Hash]
2562
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2563
+ #
2564
+ # @overload resume_replication(name: nil)
2565
+ # Pass arguments to `resume_replication` via keyword arguments. Note that at
2566
+ # least one keyword argument is required. To specify no parameters, or to keep all
2567
+ # the default parameter values, pass an empty Hash as a request object (see above).
2568
+ #
2569
+ # @param name [::String]
2570
+ # Required. The resource name of the replication, in the format of
2571
+ # projects/\\{project_id}/locations/\\{location}/volumes/\\{volume_id}/replications/\\{replication_id}.
2572
+ # @yield [result, operation] Access the result along with the TransportOperation object
2573
+ # @yieldparam result [::Gapic::Operation]
2574
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2575
+ #
2576
+ # @return [::Gapic::Operation]
2577
+ #
2578
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2579
+ def resume_replication request, options = nil
2580
+ raise ::ArgumentError, "request must be provided" if request.nil?
2581
+
2582
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::ResumeReplicationRequest
2583
+
2584
+ # Converts hash and nil to an options object
2585
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2586
+
2587
+ # Customize the options with defaults
2588
+ call_metadata = @config.rpcs.resume_replication.metadata.to_h
2589
+
2590
+ # Set x-goog-api-client and x-goog-user-project headers
2591
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2592
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2593
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
2594
+ transports_version_send: [:rest]
2595
+
2596
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2597
+
2598
+ options.apply_defaults timeout: @config.rpcs.resume_replication.timeout,
2599
+ metadata: call_metadata,
2600
+ retry_policy: @config.rpcs.resume_replication.retry_policy
2601
+
2602
+ options.apply_defaults timeout: @config.timeout,
2603
+ metadata: @config.metadata,
2604
+ retry_policy: @config.retry_policy
2605
+
2606
+ @net_app_stub.resume_replication request, options do |result, operation|
2607
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2608
+ yield result, operation if block_given?
2609
+ return result
2610
+ end
2611
+ rescue ::Gapic::Rest::Error => e
2612
+ raise ::Google::Cloud::Error.from_error(e)
2613
+ end
2614
+
2615
+ ##
2616
+ # Reverses direction of replication. Source becomes destination and
2617
+ # destination becomes source.
2618
+ #
2619
+ # @overload reverse_replication_direction(request, options = nil)
2620
+ # Pass arguments to `reverse_replication_direction` via a request object, either of type
2621
+ # {::Google::Cloud::NetApp::V1::ReverseReplicationDirectionRequest} or an equivalent Hash.
2622
+ #
2623
+ # @param request [::Google::Cloud::NetApp::V1::ReverseReplicationDirectionRequest, ::Hash]
2624
+ # A request object representing the call parameters. Required. To specify no
2625
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2626
+ # @param options [::Gapic::CallOptions, ::Hash]
2627
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2628
+ #
2629
+ # @overload reverse_replication_direction(name: nil)
2630
+ # Pass arguments to `reverse_replication_direction` via keyword arguments. Note that at
2631
+ # least one keyword argument is required. To specify no parameters, or to keep all
2632
+ # the default parameter values, pass an empty Hash as a request object (see above).
2633
+ #
2634
+ # @param name [::String]
2635
+ # Required. The resource name of the replication, in the format of
2636
+ # projects/\\{project_id}/locations/\\{location}/volumes/\\{volume_id}/replications/\\{replication_id}.
2637
+ # @yield [result, operation] Access the result along with the TransportOperation object
2638
+ # @yieldparam result [::Gapic::Operation]
2639
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2640
+ #
2641
+ # @return [::Gapic::Operation]
2642
+ #
2643
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2644
+ def reverse_replication_direction request, options = nil
2645
+ raise ::ArgumentError, "request must be provided" if request.nil?
2646
+
2647
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::ReverseReplicationDirectionRequest
2648
+
2649
+ # Converts hash and nil to an options object
2650
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2651
+
2652
+ # Customize the options with defaults
2653
+ call_metadata = @config.rpcs.reverse_replication_direction.metadata.to_h
2654
+
2655
+ # Set x-goog-api-client and x-goog-user-project headers
2656
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2657
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2658
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
2659
+ transports_version_send: [:rest]
2660
+
2661
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2662
+
2663
+ options.apply_defaults timeout: @config.rpcs.reverse_replication_direction.timeout,
2664
+ metadata: call_metadata,
2665
+ retry_policy: @config.rpcs.reverse_replication_direction.retry_policy
2666
+
2667
+ options.apply_defaults timeout: @config.timeout,
2668
+ metadata: @config.metadata,
2669
+ retry_policy: @config.retry_policy
2670
+
2671
+ @net_app_stub.reverse_replication_direction request, options do |result, operation|
2672
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2673
+ yield result, operation if block_given?
2674
+ return result
2675
+ end
2676
+ rescue ::Gapic::Rest::Error => e
2677
+ raise ::Google::Cloud::Error.from_error(e)
2678
+ end
2679
+
2680
+ ##
2681
+ # Configuration class for the NetApp REST API.
2682
+ #
2683
+ # This class represents the configuration for NetApp REST,
2684
+ # providing control over timeouts, retry behavior, logging, transport
2685
+ # parameters, and other low-level controls. Certain parameters can also be
2686
+ # applied individually to specific RPCs. See
2687
+ # {::Google::Cloud::NetApp::V1::NetApp::Rest::Client::Configuration::Rpcs}
2688
+ # for a list of RPCs that can be configured independently.
2689
+ #
2690
+ # Configuration can be applied globally to all clients, or to a single client
2691
+ # on construction.
2692
+ #
2693
+ # @example
2694
+ #
2695
+ # # Modify the global config, setting the timeout for
2696
+ # # list_storage_pools to 20 seconds,
2697
+ # # and all remaining timeouts to 10 seconds.
2698
+ # ::Google::Cloud::NetApp::V1::NetApp::Rest::Client.configure do |config|
2699
+ # config.timeout = 10.0
2700
+ # config.rpcs.list_storage_pools.timeout = 20.0
2701
+ # end
2702
+ #
2703
+ # # Apply the above configuration only to a new client.
2704
+ # client = ::Google::Cloud::NetApp::V1::NetApp::Rest::Client.new do |config|
2705
+ # config.timeout = 10.0
2706
+ # config.rpcs.list_storage_pools.timeout = 20.0
2707
+ # end
2708
+ #
2709
+ # @!attribute [rw] endpoint
2710
+ # The hostname or hostname:port of the service endpoint.
2711
+ # Defaults to `"netapp.googleapis.com"`.
2712
+ # @return [::String]
2713
+ # @!attribute [rw] credentials
2714
+ # Credentials to send with calls. You may provide any of the following types:
2715
+ # * (`String`) The path to a service account key file in JSON format
2716
+ # * (`Hash`) A service account key as a Hash
2717
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
2718
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
2719
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
2720
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
2721
+ # * (`nil`) indicating no credentials
2722
+ # @return [::Object]
2723
+ # @!attribute [rw] scope
2724
+ # The OAuth scopes
2725
+ # @return [::Array<::String>]
2726
+ # @!attribute [rw] lib_name
2727
+ # The library name as recorded in instrumentation and logging
2728
+ # @return [::String]
2729
+ # @!attribute [rw] lib_version
2730
+ # The library version as recorded in instrumentation and logging
2731
+ # @return [::String]
2732
+ # @!attribute [rw] timeout
2733
+ # The call timeout in seconds.
2734
+ # @return [::Numeric]
2735
+ # @!attribute [rw] metadata
2736
+ # Additional headers to be sent with the call.
2737
+ # @return [::Hash{::Symbol=>::String}]
2738
+ # @!attribute [rw] retry_policy
2739
+ # The retry policy. The value is a hash with the following keys:
2740
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
2741
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
2742
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
2743
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
2744
+ # trigger a retry.
2745
+ # @return [::Hash]
2746
+ # @!attribute [rw] quota_project
2747
+ # A separate project against which to charge quota.
2748
+ # @return [::String]
2749
+ #
2750
+ class Configuration
2751
+ extend ::Gapic::Config
2752
+
2753
+ DEFAULT_ENDPOINT = "netapp.googleapis.com"
2754
+
2755
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
2756
+ config_attr :credentials, nil do |value|
2757
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
2758
+ allowed.any? { |klass| klass === value }
2759
+ end
2760
+ config_attr :scope, nil, ::String, ::Array, nil
2761
+ config_attr :lib_name, nil, ::String, nil
2762
+ config_attr :lib_version, nil, ::String, nil
2763
+ config_attr :timeout, nil, ::Numeric, nil
2764
+ config_attr :metadata, nil, ::Hash, nil
2765
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
2766
+ config_attr :quota_project, nil, ::String, nil
2767
+
2768
+ # @private
2769
+ def initialize parent_config = nil
2770
+ @parent_config = parent_config unless parent_config.nil?
2771
+
2772
+ yield self if block_given?
2773
+ end
2774
+
2775
+ ##
2776
+ # Configurations for individual RPCs
2777
+ # @return [Rpcs]
2778
+ #
2779
+ def rpcs
2780
+ @rpcs ||= begin
2781
+ parent_rpcs = nil
2782
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
2783
+ Rpcs.new parent_rpcs
2784
+ end
2785
+ end
2786
+
2787
+ ##
2788
+ # Configuration RPC class for the NetApp API.
2789
+ #
2790
+ # Includes fields providing the configuration for each RPC in this service.
2791
+ # Each configuration object is of type `Gapic::Config::Method` and includes
2792
+ # the following configuration fields:
2793
+ #
2794
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
2795
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
2796
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
2797
+ # include the following keys:
2798
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
2799
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
2800
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
2801
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
2802
+ # trigger a retry.
2803
+ #
2804
+ class Rpcs
2805
+ ##
2806
+ # RPC-specific configuration for `list_storage_pools`
2807
+ # @return [::Gapic::Config::Method]
2808
+ #
2809
+ attr_reader :list_storage_pools
2810
+ ##
2811
+ # RPC-specific configuration for `create_storage_pool`
2812
+ # @return [::Gapic::Config::Method]
2813
+ #
2814
+ attr_reader :create_storage_pool
2815
+ ##
2816
+ # RPC-specific configuration for `get_storage_pool`
2817
+ # @return [::Gapic::Config::Method]
2818
+ #
2819
+ attr_reader :get_storage_pool
2820
+ ##
2821
+ # RPC-specific configuration for `update_storage_pool`
2822
+ # @return [::Gapic::Config::Method]
2823
+ #
2824
+ attr_reader :update_storage_pool
2825
+ ##
2826
+ # RPC-specific configuration for `delete_storage_pool`
2827
+ # @return [::Gapic::Config::Method]
2828
+ #
2829
+ attr_reader :delete_storage_pool
2830
+ ##
2831
+ # RPC-specific configuration for `list_volumes`
2832
+ # @return [::Gapic::Config::Method]
2833
+ #
2834
+ attr_reader :list_volumes
2835
+ ##
2836
+ # RPC-specific configuration for `get_volume`
2837
+ # @return [::Gapic::Config::Method]
2838
+ #
2839
+ attr_reader :get_volume
2840
+ ##
2841
+ # RPC-specific configuration for `create_volume`
2842
+ # @return [::Gapic::Config::Method]
2843
+ #
2844
+ attr_reader :create_volume
2845
+ ##
2846
+ # RPC-specific configuration for `update_volume`
2847
+ # @return [::Gapic::Config::Method]
2848
+ #
2849
+ attr_reader :update_volume
2850
+ ##
2851
+ # RPC-specific configuration for `delete_volume`
2852
+ # @return [::Gapic::Config::Method]
2853
+ #
2854
+ attr_reader :delete_volume
2855
+ ##
2856
+ # RPC-specific configuration for `revert_volume`
2857
+ # @return [::Gapic::Config::Method]
2858
+ #
2859
+ attr_reader :revert_volume
2860
+ ##
2861
+ # RPC-specific configuration for `list_snapshots`
2862
+ # @return [::Gapic::Config::Method]
2863
+ #
2864
+ attr_reader :list_snapshots
2865
+ ##
2866
+ # RPC-specific configuration for `get_snapshot`
2867
+ # @return [::Gapic::Config::Method]
2868
+ #
2869
+ attr_reader :get_snapshot
2870
+ ##
2871
+ # RPC-specific configuration for `create_snapshot`
2872
+ # @return [::Gapic::Config::Method]
2873
+ #
2874
+ attr_reader :create_snapshot
2875
+ ##
2876
+ # RPC-specific configuration for `delete_snapshot`
2877
+ # @return [::Gapic::Config::Method]
2878
+ #
2879
+ attr_reader :delete_snapshot
2880
+ ##
2881
+ # RPC-specific configuration for `update_snapshot`
2882
+ # @return [::Gapic::Config::Method]
2883
+ #
2884
+ attr_reader :update_snapshot
2885
+ ##
2886
+ # RPC-specific configuration for `list_active_directories`
2887
+ # @return [::Gapic::Config::Method]
2888
+ #
2889
+ attr_reader :list_active_directories
2890
+ ##
2891
+ # RPC-specific configuration for `get_active_directory`
2892
+ # @return [::Gapic::Config::Method]
2893
+ #
2894
+ attr_reader :get_active_directory
2895
+ ##
2896
+ # RPC-specific configuration for `create_active_directory`
2897
+ # @return [::Gapic::Config::Method]
2898
+ #
2899
+ attr_reader :create_active_directory
2900
+ ##
2901
+ # RPC-specific configuration for `update_active_directory`
2902
+ # @return [::Gapic::Config::Method]
2903
+ #
2904
+ attr_reader :update_active_directory
2905
+ ##
2906
+ # RPC-specific configuration for `delete_active_directory`
2907
+ # @return [::Gapic::Config::Method]
2908
+ #
2909
+ attr_reader :delete_active_directory
2910
+ ##
2911
+ # RPC-specific configuration for `list_kms_configs`
2912
+ # @return [::Gapic::Config::Method]
2913
+ #
2914
+ attr_reader :list_kms_configs
2915
+ ##
2916
+ # RPC-specific configuration for `create_kms_config`
2917
+ # @return [::Gapic::Config::Method]
2918
+ #
2919
+ attr_reader :create_kms_config
2920
+ ##
2921
+ # RPC-specific configuration for `get_kms_config`
2922
+ # @return [::Gapic::Config::Method]
2923
+ #
2924
+ attr_reader :get_kms_config
2925
+ ##
2926
+ # RPC-specific configuration for `update_kms_config`
2927
+ # @return [::Gapic::Config::Method]
2928
+ #
2929
+ attr_reader :update_kms_config
2930
+ ##
2931
+ # RPC-specific configuration for `encrypt_volumes`
2932
+ # @return [::Gapic::Config::Method]
2933
+ #
2934
+ attr_reader :encrypt_volumes
2935
+ ##
2936
+ # RPC-specific configuration for `verify_kms_config`
2937
+ # @return [::Gapic::Config::Method]
2938
+ #
2939
+ attr_reader :verify_kms_config
2940
+ ##
2941
+ # RPC-specific configuration for `delete_kms_config`
2942
+ # @return [::Gapic::Config::Method]
2943
+ #
2944
+ attr_reader :delete_kms_config
2945
+ ##
2946
+ # RPC-specific configuration for `list_replications`
2947
+ # @return [::Gapic::Config::Method]
2948
+ #
2949
+ attr_reader :list_replications
2950
+ ##
2951
+ # RPC-specific configuration for `get_replication`
2952
+ # @return [::Gapic::Config::Method]
2953
+ #
2954
+ attr_reader :get_replication
2955
+ ##
2956
+ # RPC-specific configuration for `create_replication`
2957
+ # @return [::Gapic::Config::Method]
2958
+ #
2959
+ attr_reader :create_replication
2960
+ ##
2961
+ # RPC-specific configuration for `delete_replication`
2962
+ # @return [::Gapic::Config::Method]
2963
+ #
2964
+ attr_reader :delete_replication
2965
+ ##
2966
+ # RPC-specific configuration for `update_replication`
2967
+ # @return [::Gapic::Config::Method]
2968
+ #
2969
+ attr_reader :update_replication
2970
+ ##
2971
+ # RPC-specific configuration for `stop_replication`
2972
+ # @return [::Gapic::Config::Method]
2973
+ #
2974
+ attr_reader :stop_replication
2975
+ ##
2976
+ # RPC-specific configuration for `resume_replication`
2977
+ # @return [::Gapic::Config::Method]
2978
+ #
2979
+ attr_reader :resume_replication
2980
+ ##
2981
+ # RPC-specific configuration for `reverse_replication_direction`
2982
+ # @return [::Gapic::Config::Method]
2983
+ #
2984
+ attr_reader :reverse_replication_direction
2985
+
2986
+ # @private
2987
+ def initialize parent_rpcs = nil
2988
+ list_storage_pools_config = parent_rpcs.list_storage_pools if parent_rpcs.respond_to? :list_storage_pools
2989
+ @list_storage_pools = ::Gapic::Config::Method.new list_storage_pools_config
2990
+ create_storage_pool_config = parent_rpcs.create_storage_pool if parent_rpcs.respond_to? :create_storage_pool
2991
+ @create_storage_pool = ::Gapic::Config::Method.new create_storage_pool_config
2992
+ get_storage_pool_config = parent_rpcs.get_storage_pool if parent_rpcs.respond_to? :get_storage_pool
2993
+ @get_storage_pool = ::Gapic::Config::Method.new get_storage_pool_config
2994
+ update_storage_pool_config = parent_rpcs.update_storage_pool if parent_rpcs.respond_to? :update_storage_pool
2995
+ @update_storage_pool = ::Gapic::Config::Method.new update_storage_pool_config
2996
+ delete_storage_pool_config = parent_rpcs.delete_storage_pool if parent_rpcs.respond_to? :delete_storage_pool
2997
+ @delete_storage_pool = ::Gapic::Config::Method.new delete_storage_pool_config
2998
+ list_volumes_config = parent_rpcs.list_volumes if parent_rpcs.respond_to? :list_volumes
2999
+ @list_volumes = ::Gapic::Config::Method.new list_volumes_config
3000
+ get_volume_config = parent_rpcs.get_volume if parent_rpcs.respond_to? :get_volume
3001
+ @get_volume = ::Gapic::Config::Method.new get_volume_config
3002
+ create_volume_config = parent_rpcs.create_volume if parent_rpcs.respond_to? :create_volume
3003
+ @create_volume = ::Gapic::Config::Method.new create_volume_config
3004
+ update_volume_config = parent_rpcs.update_volume if parent_rpcs.respond_to? :update_volume
3005
+ @update_volume = ::Gapic::Config::Method.new update_volume_config
3006
+ delete_volume_config = parent_rpcs.delete_volume if parent_rpcs.respond_to? :delete_volume
3007
+ @delete_volume = ::Gapic::Config::Method.new delete_volume_config
3008
+ revert_volume_config = parent_rpcs.revert_volume if parent_rpcs.respond_to? :revert_volume
3009
+ @revert_volume = ::Gapic::Config::Method.new revert_volume_config
3010
+ list_snapshots_config = parent_rpcs.list_snapshots if parent_rpcs.respond_to? :list_snapshots
3011
+ @list_snapshots = ::Gapic::Config::Method.new list_snapshots_config
3012
+ get_snapshot_config = parent_rpcs.get_snapshot if parent_rpcs.respond_to? :get_snapshot
3013
+ @get_snapshot = ::Gapic::Config::Method.new get_snapshot_config
3014
+ create_snapshot_config = parent_rpcs.create_snapshot if parent_rpcs.respond_to? :create_snapshot
3015
+ @create_snapshot = ::Gapic::Config::Method.new create_snapshot_config
3016
+ delete_snapshot_config = parent_rpcs.delete_snapshot if parent_rpcs.respond_to? :delete_snapshot
3017
+ @delete_snapshot = ::Gapic::Config::Method.new delete_snapshot_config
3018
+ update_snapshot_config = parent_rpcs.update_snapshot if parent_rpcs.respond_to? :update_snapshot
3019
+ @update_snapshot = ::Gapic::Config::Method.new update_snapshot_config
3020
+ list_active_directories_config = parent_rpcs.list_active_directories if parent_rpcs.respond_to? :list_active_directories
3021
+ @list_active_directories = ::Gapic::Config::Method.new list_active_directories_config
3022
+ get_active_directory_config = parent_rpcs.get_active_directory if parent_rpcs.respond_to? :get_active_directory
3023
+ @get_active_directory = ::Gapic::Config::Method.new get_active_directory_config
3024
+ create_active_directory_config = parent_rpcs.create_active_directory if parent_rpcs.respond_to? :create_active_directory
3025
+ @create_active_directory = ::Gapic::Config::Method.new create_active_directory_config
3026
+ update_active_directory_config = parent_rpcs.update_active_directory if parent_rpcs.respond_to? :update_active_directory
3027
+ @update_active_directory = ::Gapic::Config::Method.new update_active_directory_config
3028
+ delete_active_directory_config = parent_rpcs.delete_active_directory if parent_rpcs.respond_to? :delete_active_directory
3029
+ @delete_active_directory = ::Gapic::Config::Method.new delete_active_directory_config
3030
+ list_kms_configs_config = parent_rpcs.list_kms_configs if parent_rpcs.respond_to? :list_kms_configs
3031
+ @list_kms_configs = ::Gapic::Config::Method.new list_kms_configs_config
3032
+ create_kms_config_config = parent_rpcs.create_kms_config if parent_rpcs.respond_to? :create_kms_config
3033
+ @create_kms_config = ::Gapic::Config::Method.new create_kms_config_config
3034
+ get_kms_config_config = parent_rpcs.get_kms_config if parent_rpcs.respond_to? :get_kms_config
3035
+ @get_kms_config = ::Gapic::Config::Method.new get_kms_config_config
3036
+ update_kms_config_config = parent_rpcs.update_kms_config if parent_rpcs.respond_to? :update_kms_config
3037
+ @update_kms_config = ::Gapic::Config::Method.new update_kms_config_config
3038
+ encrypt_volumes_config = parent_rpcs.encrypt_volumes if parent_rpcs.respond_to? :encrypt_volumes
3039
+ @encrypt_volumes = ::Gapic::Config::Method.new encrypt_volumes_config
3040
+ verify_kms_config_config = parent_rpcs.verify_kms_config if parent_rpcs.respond_to? :verify_kms_config
3041
+ @verify_kms_config = ::Gapic::Config::Method.new verify_kms_config_config
3042
+ delete_kms_config_config = parent_rpcs.delete_kms_config if parent_rpcs.respond_to? :delete_kms_config
3043
+ @delete_kms_config = ::Gapic::Config::Method.new delete_kms_config_config
3044
+ list_replications_config = parent_rpcs.list_replications if parent_rpcs.respond_to? :list_replications
3045
+ @list_replications = ::Gapic::Config::Method.new list_replications_config
3046
+ get_replication_config = parent_rpcs.get_replication if parent_rpcs.respond_to? :get_replication
3047
+ @get_replication = ::Gapic::Config::Method.new get_replication_config
3048
+ create_replication_config = parent_rpcs.create_replication if parent_rpcs.respond_to? :create_replication
3049
+ @create_replication = ::Gapic::Config::Method.new create_replication_config
3050
+ delete_replication_config = parent_rpcs.delete_replication if parent_rpcs.respond_to? :delete_replication
3051
+ @delete_replication = ::Gapic::Config::Method.new delete_replication_config
3052
+ update_replication_config = parent_rpcs.update_replication if parent_rpcs.respond_to? :update_replication
3053
+ @update_replication = ::Gapic::Config::Method.new update_replication_config
3054
+ stop_replication_config = parent_rpcs.stop_replication if parent_rpcs.respond_to? :stop_replication
3055
+ @stop_replication = ::Gapic::Config::Method.new stop_replication_config
3056
+ resume_replication_config = parent_rpcs.resume_replication if parent_rpcs.respond_to? :resume_replication
3057
+ @resume_replication = ::Gapic::Config::Method.new resume_replication_config
3058
+ reverse_replication_direction_config = parent_rpcs.reverse_replication_direction if parent_rpcs.respond_to? :reverse_replication_direction
3059
+ @reverse_replication_direction = ::Gapic::Config::Method.new reverse_replication_direction_config
3060
+
3061
+ yield self if block_given?
3062
+ end
3063
+ end
3064
+ end
3065
+ end
3066
+ end
3067
+ end
3068
+ end
3069
+ end
3070
+ end
3071
+ end