azure_mgmt_storage 0.3.1 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +5 -13
  2. data/azure_mgmt_storage.gemspec +4 -5
  3. data/lib/azure_mgmt_storage.rb +3 -57
  4. data/lib/generated/azure_mgmt_storage.rb +56 -0
  5. data/lib/{azure_mgmt_storage → generated/azure_mgmt_storage}/models/access_tier.rb +0 -0
  6. data/lib/{azure_mgmt_storage → generated/azure_mgmt_storage}/models/account_status.rb +0 -0
  7. data/lib/generated/azure_mgmt_storage/models/check_name_availability_result.rb +73 -0
  8. data/lib/generated/azure_mgmt_storage/models/custom_domain.rb +57 -0
  9. data/lib/generated/azure_mgmt_storage/models/encryption.rb +59 -0
  10. data/lib/generated/azure_mgmt_storage/models/encryption_service.rb +60 -0
  11. data/lib/generated/azure_mgmt_storage/models/encryption_services.rb +45 -0
  12. data/lib/generated/azure_mgmt_storage/models/endpoints.rb +79 -0
  13. data/lib/{azure_mgmt_storage → generated/azure_mgmt_storage}/models/key_permission.rb +0 -0
  14. data/lib/{azure_mgmt_storage → generated/azure_mgmt_storage}/models/kind.rb +0 -0
  15. data/lib/{azure_mgmt_storage → generated/azure_mgmt_storage}/models/provisioning_state.rb +0 -0
  16. data/lib/{azure_mgmt_storage → generated/azure_mgmt_storage}/models/reason.rb +0 -0
  17. data/lib/generated/azure_mgmt_storage/models/sku.rb +61 -0
  18. data/lib/{azure_mgmt_storage → generated/azure_mgmt_storage}/models/sku_name.rb +0 -0
  19. data/lib/{azure_mgmt_storage → generated/azure_mgmt_storage}/models/sku_tier.rb +0 -0
  20. data/lib/generated/azure_mgmt_storage/models/storage_account.rb +269 -0
  21. data/lib/generated/azure_mgmt_storage/models/storage_account_check_name_availability_parameters.rb +57 -0
  22. data/lib/generated/azure_mgmt_storage/models/storage_account_create_parameters.rb +134 -0
  23. data/lib/generated/azure_mgmt_storage/models/storage_account_key.rb +69 -0
  24. data/lib/generated/azure_mgmt_storage/models/storage_account_list_keys_result.rb +54 -0
  25. data/lib/generated/azure_mgmt_storage/models/storage_account_list_result.rb +54 -0
  26. data/lib/generated/azure_mgmt_storage/models/storage_account_regenerate_key_parameters.rb +44 -0
  27. data/lib/generated/azure_mgmt_storage/models/storage_account_update_parameters.rb +108 -0
  28. data/lib/generated/azure_mgmt_storage/models/usage.rb +84 -0
  29. data/lib/generated/azure_mgmt_storage/models/usage_list_result.rb +52 -0
  30. data/lib/generated/azure_mgmt_storage/models/usage_name.rb +56 -0
  31. data/lib/{azure_mgmt_storage → generated/azure_mgmt_storage}/models/usage_unit.rb +0 -0
  32. data/lib/{azure_mgmt_storage → generated/azure_mgmt_storage}/module_definition.rb +0 -0
  33. data/lib/{azure_mgmt_storage → generated/azure_mgmt_storage}/storage_accounts.rb +81 -66
  34. data/lib/{azure_mgmt_storage → generated/azure_mgmt_storage}/storage_management_client.rb +4 -4
  35. data/lib/{azure_mgmt_storage → generated/azure_mgmt_storage}/usage_operations.rb +4 -4
  36. data/lib/{azure_mgmt_storage → generated/azure_mgmt_storage}/version.rb +1 -1
  37. metadata +54 -77
  38. data/lib/azure_mgmt_storage/models/check_name_availability_result.rb +0 -82
  39. data/lib/azure_mgmt_storage/models/custom_domain.rb +0 -68
  40. data/lib/azure_mgmt_storage/models/encryption.rb +0 -73
  41. data/lib/azure_mgmt_storage/models/encryption_service.rb +0 -72
  42. data/lib/azure_mgmt_storage/models/encryption_services.rb +0 -62
  43. data/lib/azure_mgmt_storage/models/endpoints.rb +0 -84
  44. data/lib/azure_mgmt_storage/models/sku.rb +0 -77
  45. data/lib/azure_mgmt_storage/models/storage_account.rb +0 -122
  46. data/lib/azure_mgmt_storage/models/storage_account_check_name_availability_parameters.rb +0 -67
  47. data/lib/azure_mgmt_storage/models/storage_account_create_parameters.rb +0 -122
  48. data/lib/azure_mgmt_storage/models/storage_account_key.rb +0 -78
  49. data/lib/azure_mgmt_storage/models/storage_account_list_keys_result.rb +0 -77
  50. data/lib/azure_mgmt_storage/models/storage_account_list_result.rb +0 -77
  51. data/lib/azure_mgmt_storage/models/storage_account_properties.rb +0 -227
  52. data/lib/azure_mgmt_storage/models/storage_account_properties_create_parameters.rb +0 -100
  53. data/lib/azure_mgmt_storage/models/storage_account_properties_update_parameters.rb +0 -98
  54. data/lib/azure_mgmt_storage/models/storage_account_regenerate_key_parameters.rb +0 -56
  55. data/lib/azure_mgmt_storage/models/storage_account_update_parameters.rb +0 -94
  56. data/lib/azure_mgmt_storage/models/usage.rb +0 -99
  57. data/lib/azure_mgmt_storage/models/usage_list_result.rb +0 -76
  58. data/lib/azure_mgmt_storage/models/usage_name.rb +0 -65
@@ -0,0 +1,84 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::Storage
7
+ module Models
8
+ #
9
+ # Describes Storage Resource Usage.
10
+ #
11
+ class Usage
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [UsageUnit] Gets the unit of measurement. Possible values
16
+ # include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountsPerSecond',
17
+ # 'BytesPerSecond'
18
+ attr_accessor :unit
19
+
20
+ # @return [Integer] Gets the current count of the allocated resources in
21
+ # the subscription.
22
+ attr_accessor :current_value
23
+
24
+ # @return [Integer] Gets the maximum count of the resources that can be
25
+ # allocated in the subscription.
26
+ attr_accessor :limit
27
+
28
+ # @return [UsageName] Gets the name of the type of usage.
29
+ attr_accessor :name
30
+
31
+
32
+ #
33
+ # Mapper for Usage class as Ruby Hash.
34
+ # This will be used for serialization/deserialization.
35
+ #
36
+ def self.mapper()
37
+ {
38
+ required: false,
39
+ serialized_name: 'Usage',
40
+ type: {
41
+ name: 'Composite',
42
+ class_name: 'Usage',
43
+ model_properties: {
44
+ unit: {
45
+ required: false,
46
+ read_only: true,
47
+ serialized_name: 'unit',
48
+ type: {
49
+ name: 'Enum',
50
+ module: 'UsageUnit'
51
+ }
52
+ },
53
+ current_value: {
54
+ required: false,
55
+ read_only: true,
56
+ serialized_name: 'currentValue',
57
+ type: {
58
+ name: 'Number'
59
+ }
60
+ },
61
+ limit: {
62
+ required: false,
63
+ read_only: true,
64
+ serialized_name: 'limit',
65
+ type: {
66
+ name: 'Number'
67
+ }
68
+ },
69
+ name: {
70
+ required: false,
71
+ read_only: true,
72
+ serialized_name: 'name',
73
+ type: {
74
+ name: 'Composite',
75
+ class_name: 'UsageName'
76
+ }
77
+ }
78
+ }
79
+ }
80
+ }
81
+ end
82
+ end
83
+ end
84
+ end
@@ -0,0 +1,52 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::Storage
7
+ module Models
8
+ #
9
+ # The List Usages operation response.
10
+ #
11
+ class UsageListResult
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [Array<Usage>] Gets or sets the list Storage Resource Usages.
16
+ attr_accessor :value
17
+
18
+
19
+ #
20
+ # Mapper for UsageListResult class as Ruby Hash.
21
+ # This will be used for serialization/deserialization.
22
+ #
23
+ def self.mapper()
24
+ {
25
+ required: false,
26
+ serialized_name: 'UsageListResult',
27
+ type: {
28
+ name: 'Composite',
29
+ class_name: 'UsageListResult',
30
+ model_properties: {
31
+ value: {
32
+ required: false,
33
+ serialized_name: 'value',
34
+ type: {
35
+ name: 'Sequence',
36
+ element: {
37
+ required: false,
38
+ serialized_name: 'UsageElementType',
39
+ type: {
40
+ name: 'Composite',
41
+ class_name: 'Usage'
42
+ }
43
+ }
44
+ }
45
+ }
46
+ }
47
+ }
48
+ }
49
+ end
50
+ end
51
+ end
52
+ end
@@ -0,0 +1,56 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::Storage
7
+ module Models
8
+ #
9
+ # The Usage Names.
10
+ #
11
+ class UsageName
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Gets a string describing the resource name.
16
+ attr_accessor :value
17
+
18
+ # @return [String] Gets a localized string describing the resource name.
19
+ attr_accessor :localized_value
20
+
21
+
22
+ #
23
+ # Mapper for UsageName class as Ruby Hash.
24
+ # This will be used for serialization/deserialization.
25
+ #
26
+ def self.mapper()
27
+ {
28
+ required: false,
29
+ serialized_name: 'UsageName',
30
+ type: {
31
+ name: 'Composite',
32
+ class_name: 'UsageName',
33
+ model_properties: {
34
+ value: {
35
+ required: false,
36
+ read_only: true,
37
+ serialized_name: 'value',
38
+ type: {
39
+ name: 'String'
40
+ }
41
+ },
42
+ localized_value: {
43
+ required: false,
44
+ read_only: true,
45
+ serialized_name: 'localizedValue',
46
+ type: {
47
+ name: 'String'
48
+ }
49
+ }
50
+ }
51
+ }
52
+ }
53
+ end
54
+ end
55
+ end
56
+ end
@@ -69,21 +69,23 @@ module Azure::ARM::Storage
69
69
  #
70
70
  def check_name_availability_async(account_name, custom_headers = nil)
71
71
  fail ArgumentError, 'account_name is nil' if account_name.nil?
72
- account_name.validate unless account_name.nil?
73
72
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
74
73
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
74
+
75
+
75
76
  request_headers = {}
76
77
 
77
78
  # Set Headers
78
79
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
79
80
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
80
81
 
81
- # Serialize Request
82
82
  request_headers['Content-Type'] = 'application/json; charset=utf-8'
83
- unless account_name.nil?
84
- account_name = StorageAccountCheckNameAvailabilityParameters.serialize_object(account_name)
85
- end
86
- request_content = account_name != nil ? JSON.generate(account_name, quirks_mode: true) : nil
83
+
84
+ # Serialize Request
85
+ request_mapper = StorageAccountCheckNameAvailabilityParameters.mapper()
86
+ request_content = @client.serialize(request_mapper, account_name, 'account_name')
87
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
88
+
87
89
  path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Storage/checkNameAvailability'
88
90
  options = {
89
91
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
@@ -115,10 +117,8 @@ module Azure::ARM::Storage
115
117
  if status_code == 200
116
118
  begin
117
119
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
118
- unless parsed_response.nil?
119
- parsed_response = CheckNameAvailabilityResult.deserialize_object(parsed_response)
120
- end
121
- result.body = parsed_response
120
+ result_mapper = CheckNameAvailabilityResult.mapper()
121
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
122
122
  rescue Exception => e
123
123
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
124
124
  end
@@ -144,26 +144,39 @@ module Azure::ARM::Storage
144
144
  # characters in length and use numbers and lower-case letters only.
145
145
  # @param parameters [StorageAccountCreateParameters] The parameters to provide
146
146
  # for the created account.
147
- # @param @client.api_version [String] Client Api Version.
148
- # @param @client.subscription_id [String] Gets subscription credentials which
149
- # uniquely identify Microsoft Azure subscription. The subscription ID forms
150
- # part of the URI for every service call.
151
- # @param @client.accept_language [String] Gets or sets the preferred language
152
- # for the response.
147
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
148
+ # will be added to the HTTP request.
149
+ #
150
+ # @return [StorageAccount] operation results.
151
+ #
152
+ def create(resource_group_name, account_name, parameters, custom_headers = nil)
153
+ response = create_async(resource_group_name, account_name, parameters, custom_headers).value!
154
+ response.body unless response.nil?
155
+ end
156
+
157
+ #
158
+ # @param resource_group_name [String] The name of the resource group within
159
+ # the user's subscription.
160
+ # @param account_name [String] The name of the storage account within the
161
+ # specified resource group. Storage account names must be between 3 and 24
162
+ # characters in length and use numbers and lower-case letters only.
163
+ # @param parameters [StorageAccountCreateParameters] The parameters to provide
164
+ # for the created account.
165
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
166
+ # will be added to the HTTP request.
153
167
  #
154
168
  # @return [Concurrent::Promise] promise which provides async access to http
155
169
  # response.
156
170
  #
157
- def create(resource_group_name, account_name, parameters, custom_headers = nil)
171
+ def create_async(resource_group_name, account_name, parameters, custom_headers = nil)
158
172
  # Send request
159
173
  promise = begin_create_async(resource_group_name, account_name, parameters, custom_headers)
160
174
 
161
175
  promise = promise.then do |response|
162
176
  # Defining deserialization method.
163
177
  deserialize_method = lambda do |parsed_response|
164
- unless parsed_response.nil?
165
- parsed_response = StorageAccount.deserialize_object(parsed_response)
166
- end
178
+ result_mapper = StorageAccount.mapper()
179
+ parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
167
180
  end
168
181
 
169
182
  # Waiting for response.
@@ -243,21 +256,23 @@ module Azure::ARM::Storage
243
256
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
244
257
  fail ArgumentError, 'account_name is nil' if account_name.nil?
245
258
  fail ArgumentError, 'parameters is nil' if parameters.nil?
246
- parameters.validate unless parameters.nil?
247
259
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
248
260
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
261
+
262
+
249
263
  request_headers = {}
250
264
 
251
265
  # Set Headers
252
266
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
253
267
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
254
268
 
255
- # Serialize Request
256
269
  request_headers['Content-Type'] = 'application/json; charset=utf-8'
257
- unless parameters.nil?
258
- parameters = StorageAccountCreateParameters.serialize_object(parameters)
259
- end
260
- request_content = parameters != nil ? JSON.generate(parameters, quirks_mode: true) : nil
270
+
271
+ # Serialize Request
272
+ request_mapper = StorageAccountCreateParameters.mapper()
273
+ request_content = @client.serialize(request_mapper, parameters, 'parameters')
274
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
275
+
261
276
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}'
262
277
  options = {
263
278
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
@@ -289,10 +304,8 @@ module Azure::ARM::Storage
289
304
  if status_code == 200
290
305
  begin
291
306
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
292
- unless parsed_response.nil?
293
- parsed_response = StorageAccount.deserialize_object(parsed_response)
294
- end
295
- result.body = parsed_response
307
+ result_mapper = StorageAccount.mapper()
308
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
296
309
  rescue Exception => e
297
310
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
298
311
  end
@@ -356,6 +369,8 @@ module Azure::ARM::Storage
356
369
  fail ArgumentError, 'account_name is nil' if account_name.nil?
357
370
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
358
371
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
372
+
373
+
359
374
  request_headers = {}
360
375
 
361
376
  # Set Headers
@@ -453,6 +468,8 @@ module Azure::ARM::Storage
453
468
  fail ArgumentError, 'account_name is nil' if account_name.nil?
454
469
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
455
470
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
471
+
472
+
456
473
  request_headers = {}
457
474
 
458
475
  # Set Headers
@@ -488,10 +505,8 @@ module Azure::ARM::Storage
488
505
  if status_code == 200
489
506
  begin
490
507
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
491
- unless parsed_response.nil?
492
- parsed_response = StorageAccount.deserialize_object(parsed_response)
493
- end
494
- result.body = parsed_response
508
+ result_mapper = StorageAccount.mapper()
509
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
495
510
  rescue Exception => e
496
511
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
497
512
  end
@@ -585,21 +600,23 @@ module Azure::ARM::Storage
585
600
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
586
601
  fail ArgumentError, 'account_name is nil' if account_name.nil?
587
602
  fail ArgumentError, 'parameters is nil' if parameters.nil?
588
- parameters.validate unless parameters.nil?
589
603
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
590
604
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
605
+
606
+
591
607
  request_headers = {}
592
608
 
593
609
  # Set Headers
594
610
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
595
611
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
596
612
 
597
- # Serialize Request
598
613
  request_headers['Content-Type'] = 'application/json; charset=utf-8'
599
- unless parameters.nil?
600
- parameters = StorageAccountUpdateParameters.serialize_object(parameters)
601
- end
602
- request_content = parameters != nil ? JSON.generate(parameters, quirks_mode: true) : nil
614
+
615
+ # Serialize Request
616
+ request_mapper = StorageAccountUpdateParameters.mapper()
617
+ request_content = @client.serialize(request_mapper, parameters, 'parameters')
618
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
619
+
603
620
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}'
604
621
  options = {
605
622
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
@@ -631,10 +648,8 @@ module Azure::ARM::Storage
631
648
  if status_code == 200
632
649
  begin
633
650
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
634
- unless parsed_response.nil?
635
- parsed_response = StorageAccount.deserialize_object(parsed_response)
636
- end
637
- result.body = parsed_response
651
+ result_mapper = StorageAccount.mapper()
652
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
638
653
  rescue Exception => e
639
654
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
640
655
  end
@@ -685,6 +700,8 @@ module Azure::ARM::Storage
685
700
  def list_async(custom_headers = nil)
686
701
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
687
702
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
703
+
704
+
688
705
  request_headers = {}
689
706
 
690
707
  # Set Headers
@@ -720,10 +737,8 @@ module Azure::ARM::Storage
720
737
  if status_code == 200
721
738
  begin
722
739
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
723
- unless parsed_response.nil?
724
- parsed_response = StorageAccountListResult.deserialize_object(parsed_response)
725
- end
726
- result.body = parsed_response
740
+ result_mapper = StorageAccountListResult.mapper()
741
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
727
742
  rescue Exception => e
728
743
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
729
744
  end
@@ -784,6 +799,8 @@ module Azure::ARM::Storage
784
799
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
785
800
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
786
801
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
802
+
803
+
787
804
  request_headers = {}
788
805
 
789
806
  # Set Headers
@@ -819,10 +836,8 @@ module Azure::ARM::Storage
819
836
  if status_code == 200
820
837
  begin
821
838
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
822
- unless parsed_response.nil?
823
- parsed_response = StorageAccountListResult.deserialize_object(parsed_response)
824
- end
825
- result.body = parsed_response
839
+ result_mapper = StorageAccountListResult.mapper()
840
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
826
841
  rescue Exception => e
827
842
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
828
843
  end
@@ -878,6 +893,8 @@ module Azure::ARM::Storage
878
893
  fail ArgumentError, 'account_name is nil' if account_name.nil?
879
894
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
880
895
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
896
+
897
+
881
898
  request_headers = {}
882
899
 
883
900
  # Set Headers
@@ -913,10 +930,8 @@ module Azure::ARM::Storage
913
930
  if status_code == 200
914
931
  begin
915
932
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
916
- unless parsed_response.nil?
917
- parsed_response = StorageAccountListKeysResult.deserialize_object(parsed_response)
918
- end
919
- result.body = parsed_response
933
+ result_mapper = StorageAccountListKeysResult.mapper()
934
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
920
935
  rescue Exception => e
921
936
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
922
937
  end
@@ -986,21 +1001,23 @@ module Azure::ARM::Storage
986
1001
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
987
1002
  fail ArgumentError, 'account_name is nil' if account_name.nil?
988
1003
  fail ArgumentError, 'regenerate_key is nil' if regenerate_key.nil?
989
- regenerate_key.validate unless regenerate_key.nil?
990
1004
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
991
1005
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1006
+
1007
+
992
1008
  request_headers = {}
993
1009
 
994
1010
  # Set Headers
995
1011
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
996
1012
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
997
1013
 
998
- # Serialize Request
999
1014
  request_headers['Content-Type'] = 'application/json; charset=utf-8'
1000
- unless regenerate_key.nil?
1001
- regenerate_key = StorageAccountRegenerateKeyParameters.serialize_object(regenerate_key)
1002
- end
1003
- request_content = regenerate_key != nil ? JSON.generate(regenerate_key, quirks_mode: true) : nil
1015
+
1016
+ # Serialize Request
1017
+ request_mapper = StorageAccountRegenerateKeyParameters.mapper()
1018
+ request_content = @client.serialize(request_mapper, regenerate_key, 'regenerate_key')
1019
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1020
+
1004
1021
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/regenerateKey'
1005
1022
  options = {
1006
1023
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
@@ -1032,10 +1049,8 @@ module Azure::ARM::Storage
1032
1049
  if status_code == 200
1033
1050
  begin
1034
1051
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1035
- unless parsed_response.nil?
1036
- parsed_response = StorageAccountListKeysResult.deserialize_object(parsed_response)
1037
- end
1038
- result.body = parsed_response
1052
+ result_mapper = StorageAccountListKeysResult.mapper()
1053
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
1039
1054
  rescue Exception => e
1040
1055
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1041
1056
  end