google-cloud-netapp-v1 1.5.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/google/cloud/netapp/v1/backup_pb.rb +1 -1
- data/lib/google/cloud/netapp/v1/cloud_netapp_service_pb.rb +2 -1
- data/lib/google/cloud/netapp/v1/cloud_netapp_service_services_pb.rb +10 -0
- data/lib/google/cloud/netapp/v1/common_pb.rb +2 -1
- data/lib/google/cloud/netapp/v1/netapp/client.rb +522 -0
- data/lib/google/cloud/netapp/v1/netapp/operations.rb +7 -0
- data/lib/google/cloud/netapp/v1/netapp/paths.rb +21 -0
- data/lib/google/cloud/netapp/v1/netapp/rest/client.rb +523 -18
- data/lib/google/cloud/netapp/v1/netapp/rest/operations.rb +7 -0
- data/lib/google/cloud/netapp/v1/netapp/rest/service_stub.rb +307 -0
- data/lib/google/cloud/netapp/v1/quota_rule_pb.rb +57 -0
- data/lib/google/cloud/netapp/v1/replication_pb.rb +1 -1
- data/lib/google/cloud/netapp/v1/storage_pool_pb.rb +1 -1
- data/lib/google/cloud/netapp/v1/version.rb +1 -1
- data/lib/google/cloud/netapp/v1/volume_pb.rb +1 -1
- data/proto_docs/google/api/client.rb +8 -0
- data/proto_docs/google/cloud/netapp/v1/backup.rb +6 -0
- data/proto_docs/google/cloud/netapp/v1/common.rb +15 -0
- data/proto_docs/google/cloud/netapp/v1/quota_rule.rb +200 -0
- data/proto_docs/google/cloud/netapp/v1/replication.rb +12 -0
- data/proto_docs/google/cloud/netapp/v1/storage_pool.rb +6 -0
- data/proto_docs/google/cloud/netapp/v1/volume.rb +7 -0
- data/proto_docs/google/longrunning/operations.rb +4 -0
- metadata +8 -6
@@ -394,10 +394,10 @@ module Google
|
|
394
394
|
# @param filter [::String]
|
395
395
|
# Optional. List filter.
|
396
396
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
397
|
-
# @yieldparam result [::Google::Cloud::NetApp::V1::
|
397
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetApp::V1::StoragePool>]
|
398
398
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
399
399
|
#
|
400
|
-
# @return [::Google::Cloud::NetApp::V1::
|
400
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetApp::V1::StoragePool>]
|
401
401
|
#
|
402
402
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
403
403
|
#
|
@@ -449,7 +449,9 @@ module Google
|
|
449
449
|
retry_policy: @config.retry_policy
|
450
450
|
|
451
451
|
@net_app_stub.list_storage_pools request, options do |result, operation|
|
452
|
+
result = ::Gapic::Rest::PagedEnumerable.new @net_app_stub, :list_storage_pools, "storage_pools", request, result, options
|
452
453
|
yield result, operation if block_given?
|
454
|
+
throw :response, result
|
453
455
|
end
|
454
456
|
rescue ::Gapic::Rest::Error => e
|
455
457
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1015,10 +1017,10 @@ module Google
|
|
1015
1017
|
# @param order_by [::String]
|
1016
1018
|
# Hint for how to order the results
|
1017
1019
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
1018
|
-
# @yieldparam result [::Google::Cloud::NetApp::V1::
|
1020
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetApp::V1::Volume>]
|
1019
1021
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1020
1022
|
#
|
1021
|
-
# @return [::Google::Cloud::NetApp::V1::
|
1023
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetApp::V1::Volume>]
|
1022
1024
|
#
|
1023
1025
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1024
1026
|
#
|
@@ -1070,7 +1072,9 @@ module Google
|
|
1070
1072
|
retry_policy: @config.retry_policy
|
1071
1073
|
|
1072
1074
|
@net_app_stub.list_volumes request, options do |result, operation|
|
1075
|
+
result = ::Gapic::Rest::PagedEnumerable.new @net_app_stub, :list_volumes, "volumes", request, result, options
|
1073
1076
|
yield result, operation if block_given?
|
1077
|
+
throw :response, result
|
1074
1078
|
end
|
1075
1079
|
rescue ::Gapic::Rest::Error => e
|
1076
1080
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1558,10 +1562,10 @@ module Google
|
|
1558
1562
|
# @param filter [::String]
|
1559
1563
|
# List filter.
|
1560
1564
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
1561
|
-
# @yieldparam result [::Google::Cloud::NetApp::V1::
|
1565
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetApp::V1::Snapshot>]
|
1562
1566
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1563
1567
|
#
|
1564
|
-
# @return [::Google::Cloud::NetApp::V1::
|
1568
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetApp::V1::Snapshot>]
|
1565
1569
|
#
|
1566
1570
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1567
1571
|
#
|
@@ -1613,7 +1617,9 @@ module Google
|
|
1613
1617
|
retry_policy: @config.retry_policy
|
1614
1618
|
|
1615
1619
|
@net_app_stub.list_snapshots request, options do |result, operation|
|
1620
|
+
result = ::Gapic::Rest::PagedEnumerable.new @net_app_stub, :list_snapshots, "snapshots", request, result, options
|
1616
1621
|
yield result, operation if block_given?
|
1622
|
+
throw :response, result
|
1617
1623
|
end
|
1618
1624
|
rescue ::Gapic::Rest::Error => e
|
1619
1625
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2001,10 +2007,10 @@ module Google
|
|
2001
2007
|
# @param order_by [::String]
|
2002
2008
|
# Hint for how to order the results
|
2003
2009
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
2004
|
-
# @yieldparam result [::Google::Cloud::NetApp::V1::
|
2010
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetApp::V1::ActiveDirectory>]
|
2005
2011
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2006
2012
|
#
|
2007
|
-
# @return [::Google::Cloud::NetApp::V1::
|
2013
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetApp::V1::ActiveDirectory>]
|
2008
2014
|
#
|
2009
2015
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2010
2016
|
#
|
@@ -2056,7 +2062,9 @@ module Google
|
|
2056
2062
|
retry_policy: @config.retry_policy
|
2057
2063
|
|
2058
2064
|
@net_app_stub.list_active_directories request, options do |result, operation|
|
2065
|
+
result = ::Gapic::Rest::PagedEnumerable.new @net_app_stub, :list_active_directories, "active_directories", request, result, options
|
2059
2066
|
yield result, operation if block_given?
|
2067
|
+
throw :response, result
|
2060
2068
|
end
|
2061
2069
|
rescue ::Gapic::Rest::Error => e
|
2062
2070
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2445,10 +2453,10 @@ module Google
|
|
2445
2453
|
# @param filter [::String]
|
2446
2454
|
# List filter.
|
2447
2455
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
2448
|
-
# @yieldparam result [::Google::Cloud::NetApp::V1::
|
2456
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetApp::V1::KmsConfig>]
|
2449
2457
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2450
2458
|
#
|
2451
|
-
# @return [::Google::Cloud::NetApp::V1::
|
2459
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetApp::V1::KmsConfig>]
|
2452
2460
|
#
|
2453
2461
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2454
2462
|
#
|
@@ -2500,7 +2508,9 @@ module Google
|
|
2500
2508
|
retry_policy: @config.retry_policy
|
2501
2509
|
|
2502
2510
|
@net_app_stub.list_kms_configs request, options do |result, operation|
|
2511
|
+
result = ::Gapic::Rest::PagedEnumerable.new @net_app_stub, :list_kms_configs, "kms_configs", request, result, options
|
2503
2512
|
yield result, operation if block_given?
|
2513
|
+
throw :response, result
|
2504
2514
|
end
|
2505
2515
|
rescue ::Gapic::Rest::Error => e
|
2506
2516
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3056,10 +3066,10 @@ module Google
|
|
3056
3066
|
# @param filter [::String]
|
3057
3067
|
# List filter.
|
3058
3068
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
3059
|
-
# @yieldparam result [::Google::Cloud::NetApp::V1::
|
3069
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetApp::V1::Replication>]
|
3060
3070
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
3061
3071
|
#
|
3062
|
-
# @return [::Google::Cloud::NetApp::V1::
|
3072
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetApp::V1::Replication>]
|
3063
3073
|
#
|
3064
3074
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
3065
3075
|
#
|
@@ -3111,7 +3121,9 @@ module Google
|
|
3111
3121
|
retry_policy: @config.retry_policy
|
3112
3122
|
|
3113
3123
|
@net_app_stub.list_replications request, options do |result, operation|
|
3124
|
+
result = ::Gapic::Rest::PagedEnumerable.new @net_app_stub, :list_replications, "replications", request, result, options
|
3114
3125
|
yield result, operation if block_given?
|
3126
|
+
throw :response, result
|
3115
3127
|
end
|
3116
3128
|
rescue ::Gapic::Rest::Error => e
|
3117
3129
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4136,10 +4148,10 @@ module Google
|
|
4136
4148
|
# @param filter [::String]
|
4137
4149
|
# List filter.
|
4138
4150
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
4139
|
-
# @yieldparam result [::Google::Cloud::NetApp::V1::
|
4151
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetApp::V1::BackupVault>]
|
4140
4152
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
4141
4153
|
#
|
4142
|
-
# @return [::Google::Cloud::NetApp::V1::
|
4154
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetApp::V1::BackupVault>]
|
4143
4155
|
#
|
4144
4156
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
4145
4157
|
#
|
@@ -4191,7 +4203,9 @@ module Google
|
|
4191
4203
|
retry_policy: @config.retry_policy
|
4192
4204
|
|
4193
4205
|
@net_app_stub.list_backup_vaults request, options do |result, operation|
|
4206
|
+
result = ::Gapic::Rest::PagedEnumerable.new @net_app_stub, :list_backup_vaults, "backup_vaults", request, result, options
|
4194
4207
|
yield result, operation if block_given?
|
4208
|
+
throw :response, result
|
4195
4209
|
end
|
4196
4210
|
rescue ::Gapic::Rest::Error => e
|
4197
4211
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4599,10 +4613,10 @@ module Google
|
|
4599
4613
|
# matches the filter expression. If empty, then no backups are filtered out.
|
4600
4614
|
# See https://google.aip.dev/160
|
4601
4615
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
4602
|
-
# @yieldparam result [::Google::Cloud::NetApp::V1::
|
4616
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetApp::V1::Backup>]
|
4603
4617
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
4604
4618
|
#
|
4605
|
-
# @return [::Google::Cloud::NetApp::V1::
|
4619
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetApp::V1::Backup>]
|
4606
4620
|
#
|
4607
4621
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
4608
4622
|
#
|
@@ -4654,7 +4668,9 @@ module Google
|
|
4654
4668
|
retry_policy: @config.retry_policy
|
4655
4669
|
|
4656
4670
|
@net_app_stub.list_backups request, options do |result, operation|
|
4671
|
+
result = ::Gapic::Rest::PagedEnumerable.new @net_app_stub, :list_backups, "backups", request, result, options
|
4657
4672
|
yield result, operation if block_given?
|
4673
|
+
throw :response, result
|
4658
4674
|
end
|
4659
4675
|
rescue ::Gapic::Rest::Error => e
|
4660
4676
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -5046,10 +5062,10 @@ module Google
|
|
5046
5062
|
# @param order_by [::String]
|
5047
5063
|
# Hint for how to order the results
|
5048
5064
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
5049
|
-
# @yieldparam result [::Google::Cloud::NetApp::V1::
|
5065
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetApp::V1::BackupPolicy>]
|
5050
5066
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
5051
5067
|
#
|
5052
|
-
# @return [::Google::Cloud::NetApp::V1::
|
5068
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetApp::V1::BackupPolicy>]
|
5053
5069
|
#
|
5054
5070
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
5055
5071
|
#
|
@@ -5101,7 +5117,9 @@ module Google
|
|
5101
5117
|
retry_policy: @config.retry_policy
|
5102
5118
|
|
5103
5119
|
@net_app_stub.list_backup_policies request, options do |result, operation|
|
5120
|
+
result = ::Gapic::Rest::PagedEnumerable.new @net_app_stub, :list_backup_policies, "backup_policies", request, result, options
|
5104
5121
|
yield result, operation if block_given?
|
5122
|
+
throw :response, result
|
5105
5123
|
end
|
5106
5124
|
rescue ::Gapic::Rest::Error => e
|
5107
5125
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -5288,6 +5306,451 @@ module Google
|
|
5288
5306
|
raise ::Google::Cloud::Error.from_error(e)
|
5289
5307
|
end
|
5290
5308
|
|
5309
|
+
##
|
5310
|
+
# Returns list of all quota rules in a location.
|
5311
|
+
#
|
5312
|
+
# @overload list_quota_rules(request, options = nil)
|
5313
|
+
# Pass arguments to `list_quota_rules` via a request object, either of type
|
5314
|
+
# {::Google::Cloud::NetApp::V1::ListQuotaRulesRequest} or an equivalent Hash.
|
5315
|
+
#
|
5316
|
+
# @param request [::Google::Cloud::NetApp::V1::ListQuotaRulesRequest, ::Hash]
|
5317
|
+
# A request object representing the call parameters. Required. To specify no
|
5318
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
5319
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
5320
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
5321
|
+
#
|
5322
|
+
# @overload list_quota_rules(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
5323
|
+
# Pass arguments to `list_quota_rules` via keyword arguments. Note that at
|
5324
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
5325
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
5326
|
+
#
|
5327
|
+
# @param parent [::String]
|
5328
|
+
# Required. Parent value for ListQuotaRulesRequest
|
5329
|
+
# @param page_size [::Integer]
|
5330
|
+
# Optional. Requested page size. Server may return fewer items than
|
5331
|
+
# requested. If unspecified, the server will pick an appropriate default.
|
5332
|
+
# @param page_token [::String]
|
5333
|
+
# Optional. A token identifying a page of results the server should return.
|
5334
|
+
# @param filter [::String]
|
5335
|
+
# Optional. Filtering results
|
5336
|
+
# @param order_by [::String]
|
5337
|
+
# Optional. Hint for how to order the results
|
5338
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
5339
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetApp::V1::QuotaRule>]
|
5340
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
5341
|
+
#
|
5342
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetApp::V1::QuotaRule>]
|
5343
|
+
#
|
5344
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
5345
|
+
#
|
5346
|
+
# @example Basic example
|
5347
|
+
# require "google/cloud/netapp/v1"
|
5348
|
+
#
|
5349
|
+
# # Create a client object. The client can be reused for multiple calls.
|
5350
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
|
5351
|
+
#
|
5352
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
5353
|
+
# request = Google::Cloud::NetApp::V1::ListQuotaRulesRequest.new
|
5354
|
+
#
|
5355
|
+
# # Call the list_quota_rules method.
|
5356
|
+
# result = client.list_quota_rules request
|
5357
|
+
#
|
5358
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
5359
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
5360
|
+
# result.each do |item|
|
5361
|
+
# # Each element is of type ::Google::Cloud::NetApp::V1::QuotaRule.
|
5362
|
+
# p item
|
5363
|
+
# end
|
5364
|
+
#
|
5365
|
+
def list_quota_rules request, options = nil
|
5366
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
5367
|
+
|
5368
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::ListQuotaRulesRequest
|
5369
|
+
|
5370
|
+
# Converts hash and nil to an options object
|
5371
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
5372
|
+
|
5373
|
+
# Customize the options with defaults
|
5374
|
+
call_metadata = @config.rpcs.list_quota_rules.metadata.to_h
|
5375
|
+
|
5376
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
5377
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
5378
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
5379
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
|
5380
|
+
transports_version_send: [:rest]
|
5381
|
+
|
5382
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
5383
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
5384
|
+
|
5385
|
+
options.apply_defaults timeout: @config.rpcs.list_quota_rules.timeout,
|
5386
|
+
metadata: call_metadata,
|
5387
|
+
retry_policy: @config.rpcs.list_quota_rules.retry_policy
|
5388
|
+
|
5389
|
+
options.apply_defaults timeout: @config.timeout,
|
5390
|
+
metadata: @config.metadata,
|
5391
|
+
retry_policy: @config.retry_policy
|
5392
|
+
|
5393
|
+
@net_app_stub.list_quota_rules request, options do |result, operation|
|
5394
|
+
result = ::Gapic::Rest::PagedEnumerable.new @net_app_stub, :list_quota_rules, "quota_rules", request, result, options
|
5395
|
+
yield result, operation if block_given?
|
5396
|
+
throw :response, result
|
5397
|
+
end
|
5398
|
+
rescue ::Gapic::Rest::Error => e
|
5399
|
+
raise ::Google::Cloud::Error.from_error(e)
|
5400
|
+
end
|
5401
|
+
|
5402
|
+
##
|
5403
|
+
# Returns details of the specified quota rule.
|
5404
|
+
#
|
5405
|
+
# @overload get_quota_rule(request, options = nil)
|
5406
|
+
# Pass arguments to `get_quota_rule` via a request object, either of type
|
5407
|
+
# {::Google::Cloud::NetApp::V1::GetQuotaRuleRequest} or an equivalent Hash.
|
5408
|
+
#
|
5409
|
+
# @param request [::Google::Cloud::NetApp::V1::GetQuotaRuleRequest, ::Hash]
|
5410
|
+
# A request object representing the call parameters. Required. To specify no
|
5411
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
5412
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
5413
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
5414
|
+
#
|
5415
|
+
# @overload get_quota_rule(name: nil)
|
5416
|
+
# Pass arguments to `get_quota_rule` via keyword arguments. Note that at
|
5417
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
5418
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
5419
|
+
#
|
5420
|
+
# @param name [::String]
|
5421
|
+
# Required. Name of the quota rule
|
5422
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
5423
|
+
# @yieldparam result [::Google::Cloud::NetApp::V1::QuotaRule]
|
5424
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
5425
|
+
#
|
5426
|
+
# @return [::Google::Cloud::NetApp::V1::QuotaRule]
|
5427
|
+
#
|
5428
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
5429
|
+
#
|
5430
|
+
# @example Basic example
|
5431
|
+
# require "google/cloud/netapp/v1"
|
5432
|
+
#
|
5433
|
+
# # Create a client object. The client can be reused for multiple calls.
|
5434
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
|
5435
|
+
#
|
5436
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
5437
|
+
# request = Google::Cloud::NetApp::V1::GetQuotaRuleRequest.new
|
5438
|
+
#
|
5439
|
+
# # Call the get_quota_rule method.
|
5440
|
+
# result = client.get_quota_rule request
|
5441
|
+
#
|
5442
|
+
# # The returned object is of type Google::Cloud::NetApp::V1::QuotaRule.
|
5443
|
+
# p result
|
5444
|
+
#
|
5445
|
+
def get_quota_rule request, options = nil
|
5446
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
5447
|
+
|
5448
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::GetQuotaRuleRequest
|
5449
|
+
|
5450
|
+
# Converts hash and nil to an options object
|
5451
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
5452
|
+
|
5453
|
+
# Customize the options with defaults
|
5454
|
+
call_metadata = @config.rpcs.get_quota_rule.metadata.to_h
|
5455
|
+
|
5456
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
5457
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
5458
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
5459
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
|
5460
|
+
transports_version_send: [:rest]
|
5461
|
+
|
5462
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
5463
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
5464
|
+
|
5465
|
+
options.apply_defaults timeout: @config.rpcs.get_quota_rule.timeout,
|
5466
|
+
metadata: call_metadata,
|
5467
|
+
retry_policy: @config.rpcs.get_quota_rule.retry_policy
|
5468
|
+
|
5469
|
+
options.apply_defaults timeout: @config.timeout,
|
5470
|
+
metadata: @config.metadata,
|
5471
|
+
retry_policy: @config.retry_policy
|
5472
|
+
|
5473
|
+
@net_app_stub.get_quota_rule request, options do |result, operation|
|
5474
|
+
yield result, operation if block_given?
|
5475
|
+
end
|
5476
|
+
rescue ::Gapic::Rest::Error => e
|
5477
|
+
raise ::Google::Cloud::Error.from_error(e)
|
5478
|
+
end
|
5479
|
+
|
5480
|
+
##
|
5481
|
+
# Creates a new quota rule.
|
5482
|
+
#
|
5483
|
+
# @overload create_quota_rule(request, options = nil)
|
5484
|
+
# Pass arguments to `create_quota_rule` via a request object, either of type
|
5485
|
+
# {::Google::Cloud::NetApp::V1::CreateQuotaRuleRequest} or an equivalent Hash.
|
5486
|
+
#
|
5487
|
+
# @param request [::Google::Cloud::NetApp::V1::CreateQuotaRuleRequest, ::Hash]
|
5488
|
+
# A request object representing the call parameters. Required. To specify no
|
5489
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
5490
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
5491
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
5492
|
+
#
|
5493
|
+
# @overload create_quota_rule(parent: nil, quota_rule: nil, quota_rule_id: nil)
|
5494
|
+
# Pass arguments to `create_quota_rule` via keyword arguments. Note that at
|
5495
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
5496
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
5497
|
+
#
|
5498
|
+
# @param parent [::String]
|
5499
|
+
# Required. Parent value for CreateQuotaRuleRequest
|
5500
|
+
# @param quota_rule [::Google::Cloud::NetApp::V1::QuotaRule, ::Hash]
|
5501
|
+
# Required. Fields of the to be created quota rule.
|
5502
|
+
# @param quota_rule_id [::String]
|
5503
|
+
# Required. ID of the quota rule to create. Must be unique within the parent
|
5504
|
+
# resource. Must contain only letters, numbers, underscore and hyphen, with
|
5505
|
+
# the first character a letter or underscore, the last a letter or underscore
|
5506
|
+
# or a number, and a 63 character maximum.
|
5507
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
5508
|
+
# @yieldparam result [::Gapic::Operation]
|
5509
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
5510
|
+
#
|
5511
|
+
# @return [::Gapic::Operation]
|
5512
|
+
#
|
5513
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
5514
|
+
#
|
5515
|
+
# @example Basic example
|
5516
|
+
# require "google/cloud/netapp/v1"
|
5517
|
+
#
|
5518
|
+
# # Create a client object. The client can be reused for multiple calls.
|
5519
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
|
5520
|
+
#
|
5521
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
5522
|
+
# request = Google::Cloud::NetApp::V1::CreateQuotaRuleRequest.new
|
5523
|
+
#
|
5524
|
+
# # Call the create_quota_rule method.
|
5525
|
+
# result = client.create_quota_rule request
|
5526
|
+
#
|
5527
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
5528
|
+
# # check the status of an operation, cancel it, or wait for results.
|
5529
|
+
# # Here is how to wait for a response.
|
5530
|
+
# result.wait_until_done! timeout: 60
|
5531
|
+
# if result.response?
|
5532
|
+
# p result.response
|
5533
|
+
# else
|
5534
|
+
# puts "No response received."
|
5535
|
+
# end
|
5536
|
+
#
|
5537
|
+
def create_quota_rule request, options = nil
|
5538
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
5539
|
+
|
5540
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::CreateQuotaRuleRequest
|
5541
|
+
|
5542
|
+
# Converts hash and nil to an options object
|
5543
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
5544
|
+
|
5545
|
+
# Customize the options with defaults
|
5546
|
+
call_metadata = @config.rpcs.create_quota_rule.metadata.to_h
|
5547
|
+
|
5548
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
5549
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
5550
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
5551
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
|
5552
|
+
transports_version_send: [:rest]
|
5553
|
+
|
5554
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
5555
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
5556
|
+
|
5557
|
+
options.apply_defaults timeout: @config.rpcs.create_quota_rule.timeout,
|
5558
|
+
metadata: call_metadata,
|
5559
|
+
retry_policy: @config.rpcs.create_quota_rule.retry_policy
|
5560
|
+
|
5561
|
+
options.apply_defaults timeout: @config.timeout,
|
5562
|
+
metadata: @config.metadata,
|
5563
|
+
retry_policy: @config.retry_policy
|
5564
|
+
|
5565
|
+
@net_app_stub.create_quota_rule request, options do |result, operation|
|
5566
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
5567
|
+
yield result, operation if block_given?
|
5568
|
+
throw :response, result
|
5569
|
+
end
|
5570
|
+
rescue ::Gapic::Rest::Error => e
|
5571
|
+
raise ::Google::Cloud::Error.from_error(e)
|
5572
|
+
end
|
5573
|
+
|
5574
|
+
##
|
5575
|
+
# Updates a quota rule.
|
5576
|
+
#
|
5577
|
+
# @overload update_quota_rule(request, options = nil)
|
5578
|
+
# Pass arguments to `update_quota_rule` via a request object, either of type
|
5579
|
+
# {::Google::Cloud::NetApp::V1::UpdateQuotaRuleRequest} or an equivalent Hash.
|
5580
|
+
#
|
5581
|
+
# @param request [::Google::Cloud::NetApp::V1::UpdateQuotaRuleRequest, ::Hash]
|
5582
|
+
# A request object representing the call parameters. Required. To specify no
|
5583
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
5584
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
5585
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
5586
|
+
#
|
5587
|
+
# @overload update_quota_rule(update_mask: nil, quota_rule: nil)
|
5588
|
+
# Pass arguments to `update_quota_rule` via keyword arguments. Note that at
|
5589
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
5590
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
5591
|
+
#
|
5592
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
5593
|
+
# Optional. Field mask is used to specify the fields to be overwritten in the
|
5594
|
+
# Quota Rule resource by the update.
|
5595
|
+
# The fields specified in the update_mask are relative to the resource, not
|
5596
|
+
# the full request. A field will be overwritten if it is in the mask. If the
|
5597
|
+
# user does not provide a mask then all fields will be overwritten.
|
5598
|
+
# @param quota_rule [::Google::Cloud::NetApp::V1::QuotaRule, ::Hash]
|
5599
|
+
# Required. The quota rule being updated
|
5600
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
5601
|
+
# @yieldparam result [::Gapic::Operation]
|
5602
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
5603
|
+
#
|
5604
|
+
# @return [::Gapic::Operation]
|
5605
|
+
#
|
5606
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
5607
|
+
#
|
5608
|
+
# @example Basic example
|
5609
|
+
# require "google/cloud/netapp/v1"
|
5610
|
+
#
|
5611
|
+
# # Create a client object. The client can be reused for multiple calls.
|
5612
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
|
5613
|
+
#
|
5614
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
5615
|
+
# request = Google::Cloud::NetApp::V1::UpdateQuotaRuleRequest.new
|
5616
|
+
#
|
5617
|
+
# # Call the update_quota_rule method.
|
5618
|
+
# result = client.update_quota_rule request
|
5619
|
+
#
|
5620
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
5621
|
+
# # check the status of an operation, cancel it, or wait for results.
|
5622
|
+
# # Here is how to wait for a response.
|
5623
|
+
# result.wait_until_done! timeout: 60
|
5624
|
+
# if result.response?
|
5625
|
+
# p result.response
|
5626
|
+
# else
|
5627
|
+
# puts "No response received."
|
5628
|
+
# end
|
5629
|
+
#
|
5630
|
+
def update_quota_rule request, options = nil
|
5631
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
5632
|
+
|
5633
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::UpdateQuotaRuleRequest
|
5634
|
+
|
5635
|
+
# Converts hash and nil to an options object
|
5636
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
5637
|
+
|
5638
|
+
# Customize the options with defaults
|
5639
|
+
call_metadata = @config.rpcs.update_quota_rule.metadata.to_h
|
5640
|
+
|
5641
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
5642
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
5643
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
5644
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
|
5645
|
+
transports_version_send: [:rest]
|
5646
|
+
|
5647
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
5648
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
5649
|
+
|
5650
|
+
options.apply_defaults timeout: @config.rpcs.update_quota_rule.timeout,
|
5651
|
+
metadata: call_metadata,
|
5652
|
+
retry_policy: @config.rpcs.update_quota_rule.retry_policy
|
5653
|
+
|
5654
|
+
options.apply_defaults timeout: @config.timeout,
|
5655
|
+
metadata: @config.metadata,
|
5656
|
+
retry_policy: @config.retry_policy
|
5657
|
+
|
5658
|
+
@net_app_stub.update_quota_rule request, options do |result, operation|
|
5659
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
5660
|
+
yield result, operation if block_given?
|
5661
|
+
throw :response, result
|
5662
|
+
end
|
5663
|
+
rescue ::Gapic::Rest::Error => e
|
5664
|
+
raise ::Google::Cloud::Error.from_error(e)
|
5665
|
+
end
|
5666
|
+
|
5667
|
+
##
|
5668
|
+
# Deletes a quota rule.
|
5669
|
+
#
|
5670
|
+
# @overload delete_quota_rule(request, options = nil)
|
5671
|
+
# Pass arguments to `delete_quota_rule` via a request object, either of type
|
5672
|
+
# {::Google::Cloud::NetApp::V1::DeleteQuotaRuleRequest} or an equivalent Hash.
|
5673
|
+
#
|
5674
|
+
# @param request [::Google::Cloud::NetApp::V1::DeleteQuotaRuleRequest, ::Hash]
|
5675
|
+
# A request object representing the call parameters. Required. To specify no
|
5676
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
5677
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
5678
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
5679
|
+
#
|
5680
|
+
# @overload delete_quota_rule(name: nil)
|
5681
|
+
# Pass arguments to `delete_quota_rule` via keyword arguments. Note that at
|
5682
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
5683
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
5684
|
+
#
|
5685
|
+
# @param name [::String]
|
5686
|
+
# Required. Name of the quota rule.
|
5687
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
5688
|
+
# @yieldparam result [::Gapic::Operation]
|
5689
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
5690
|
+
#
|
5691
|
+
# @return [::Gapic::Operation]
|
5692
|
+
#
|
5693
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
5694
|
+
#
|
5695
|
+
# @example Basic example
|
5696
|
+
# require "google/cloud/netapp/v1"
|
5697
|
+
#
|
5698
|
+
# # Create a client object. The client can be reused for multiple calls.
|
5699
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
|
5700
|
+
#
|
5701
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
5702
|
+
# request = Google::Cloud::NetApp::V1::DeleteQuotaRuleRequest.new
|
5703
|
+
#
|
5704
|
+
# # Call the delete_quota_rule method.
|
5705
|
+
# result = client.delete_quota_rule request
|
5706
|
+
#
|
5707
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
5708
|
+
# # check the status of an operation, cancel it, or wait for results.
|
5709
|
+
# # Here is how to wait for a response.
|
5710
|
+
# result.wait_until_done! timeout: 60
|
5711
|
+
# if result.response?
|
5712
|
+
# p result.response
|
5713
|
+
# else
|
5714
|
+
# puts "No response received."
|
5715
|
+
# end
|
5716
|
+
#
|
5717
|
+
def delete_quota_rule request, options = nil
|
5718
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
5719
|
+
|
5720
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::DeleteQuotaRuleRequest
|
5721
|
+
|
5722
|
+
# Converts hash and nil to an options object
|
5723
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
5724
|
+
|
5725
|
+
# Customize the options with defaults
|
5726
|
+
call_metadata = @config.rpcs.delete_quota_rule.metadata.to_h
|
5727
|
+
|
5728
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
5729
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
5730
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
5731
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
|
5732
|
+
transports_version_send: [:rest]
|
5733
|
+
|
5734
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
5735
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
5736
|
+
|
5737
|
+
options.apply_defaults timeout: @config.rpcs.delete_quota_rule.timeout,
|
5738
|
+
metadata: call_metadata,
|
5739
|
+
retry_policy: @config.rpcs.delete_quota_rule.retry_policy
|
5740
|
+
|
5741
|
+
options.apply_defaults timeout: @config.timeout,
|
5742
|
+
metadata: @config.metadata,
|
5743
|
+
retry_policy: @config.retry_policy
|
5744
|
+
|
5745
|
+
@net_app_stub.delete_quota_rule request, options do |result, operation|
|
5746
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
5747
|
+
yield result, operation if block_given?
|
5748
|
+
throw :response, result
|
5749
|
+
end
|
5750
|
+
rescue ::Gapic::Rest::Error => e
|
5751
|
+
raise ::Google::Cloud::Error.from_error(e)
|
5752
|
+
end
|
5753
|
+
|
5291
5754
|
##
|
5292
5755
|
# Configuration class for the NetApp REST API.
|
5293
5756
|
#
|
@@ -5330,6 +5793,13 @@ module Google
|
|
5330
5793
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
5331
5794
|
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
5332
5795
|
# * (`nil`) indicating no credentials
|
5796
|
+
#
|
5797
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
5798
|
+
# external source for authentication to Google Cloud, you must validate it before
|
5799
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
5800
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
5801
|
+
# For more information, refer to [Validate credential configurations from external
|
5802
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
5333
5803
|
# @return [::Object]
|
5334
5804
|
# @!attribute [rw] scope
|
5335
5805
|
# The OAuth scopes
|
@@ -5709,6 +6179,31 @@ module Google
|
|
5709
6179
|
# @return [::Gapic::Config::Method]
|
5710
6180
|
#
|
5711
6181
|
attr_reader :delete_backup_policy
|
6182
|
+
##
|
6183
|
+
# RPC-specific configuration for `list_quota_rules`
|
6184
|
+
# @return [::Gapic::Config::Method]
|
6185
|
+
#
|
6186
|
+
attr_reader :list_quota_rules
|
6187
|
+
##
|
6188
|
+
# RPC-specific configuration for `get_quota_rule`
|
6189
|
+
# @return [::Gapic::Config::Method]
|
6190
|
+
#
|
6191
|
+
attr_reader :get_quota_rule
|
6192
|
+
##
|
6193
|
+
# RPC-specific configuration for `create_quota_rule`
|
6194
|
+
# @return [::Gapic::Config::Method]
|
6195
|
+
#
|
6196
|
+
attr_reader :create_quota_rule
|
6197
|
+
##
|
6198
|
+
# RPC-specific configuration for `update_quota_rule`
|
6199
|
+
# @return [::Gapic::Config::Method]
|
6200
|
+
#
|
6201
|
+
attr_reader :update_quota_rule
|
6202
|
+
##
|
6203
|
+
# RPC-specific configuration for `delete_quota_rule`
|
6204
|
+
# @return [::Gapic::Config::Method]
|
6205
|
+
#
|
6206
|
+
attr_reader :delete_quota_rule
|
5712
6207
|
|
5713
6208
|
# @private
|
5714
6209
|
def initialize parent_rpcs = nil
|
@@ -5822,6 +6317,16 @@ module Google
|
|
5822
6317
|
@update_backup_policy = ::Gapic::Config::Method.new update_backup_policy_config
|
5823
6318
|
delete_backup_policy_config = parent_rpcs.delete_backup_policy if parent_rpcs.respond_to? :delete_backup_policy
|
5824
6319
|
@delete_backup_policy = ::Gapic::Config::Method.new delete_backup_policy_config
|
6320
|
+
list_quota_rules_config = parent_rpcs.list_quota_rules if parent_rpcs.respond_to? :list_quota_rules
|
6321
|
+
@list_quota_rules = ::Gapic::Config::Method.new list_quota_rules_config
|
6322
|
+
get_quota_rule_config = parent_rpcs.get_quota_rule if parent_rpcs.respond_to? :get_quota_rule
|
6323
|
+
@get_quota_rule = ::Gapic::Config::Method.new get_quota_rule_config
|
6324
|
+
create_quota_rule_config = parent_rpcs.create_quota_rule if parent_rpcs.respond_to? :create_quota_rule
|
6325
|
+
@create_quota_rule = ::Gapic::Config::Method.new create_quota_rule_config
|
6326
|
+
update_quota_rule_config = parent_rpcs.update_quota_rule if parent_rpcs.respond_to? :update_quota_rule
|
6327
|
+
@update_quota_rule = ::Gapic::Config::Method.new update_quota_rule_config
|
6328
|
+
delete_quota_rule_config = parent_rpcs.delete_quota_rule if parent_rpcs.respond_to? :delete_quota_rule
|
6329
|
+
@delete_quota_rule = ::Gapic::Config::Method.new delete_quota_rule_config
|
5825
6330
|
|
5826
6331
|
yield self if block_given?
|
5827
6332
|
end
|