google-cloud-netapp-v1 0.a → 0.2.0

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