azure_mgmt_recovery_services 0.15.2 → 0.16.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2016-06-01/generated/azure_mgmt_recovery_services.rb +11 -9
  3. data/lib/2016-06-01/generated/azure_mgmt_recovery_services/models/client_discovery_display.rb +9 -7
  4. data/lib/2016-06-01/generated/azure_mgmt_recovery_services/models/client_discovery_response.rb +3 -3
  5. data/lib/2016-06-01/generated/azure_mgmt_recovery_services/models/client_discovery_value_for_single_api.rb +7 -6
  6. data/lib/{2016-12-01/generated/azure_mgmt_recovery_services/models/tracked_resource.rb → 2016-06-01/generated/azure_mgmt_recovery_services/models/patch_tracked_resource.rb} +6 -6
  7. data/lib/{2016-12-01/generated/azure_mgmt_recovery_services/models/vault.rb → 2016-06-01/generated/azure_mgmt_recovery_services/models/patch_vault.rb} +7 -7
  8. data/lib/2016-06-01/generated/azure_mgmt_recovery_services/models/vault_certificate_response.rb +8 -3
  9. data/lib/2016-06-01/generated/azure_mgmt_recovery_services/models/vault_extended_info_resource.rb +1 -1
  10. data/lib/2016-06-01/generated/azure_mgmt_recovery_services/models/vault_list.rb +32 -0
  11. data/lib/2016-06-01/generated/azure_mgmt_recovery_services/operations.rb +15 -13
  12. data/lib/2016-06-01/generated/azure_mgmt_recovery_services/recovery_services_client.rb +4 -1
  13. data/lib/2016-06-01/generated/azure_mgmt_recovery_services/registered_identities.rb +6 -5
  14. data/lib/2016-06-01/generated/azure_mgmt_recovery_services/replication_usages.rb +6 -5
  15. data/lib/2016-06-01/generated/azure_mgmt_recovery_services/usages.rb +6 -5
  16. data/lib/2016-06-01/generated/azure_mgmt_recovery_services/vault_certificates.rb +9 -10
  17. data/lib/2016-06-01/generated/azure_mgmt_recovery_services/vault_extended_info_operations.rb +24 -25
  18. data/lib/2016-06-01/generated/azure_mgmt_recovery_services/vaults.rb +260 -42
  19. data/lib/azure_mgmt_recovery_services.rb +0 -1
  20. data/lib/profiles/latest/modules/recoveryservices_profile_module.rb +155 -161
  21. data/lib/profiles/latest/recoveryservices_latest_profile_client.rb +28 -9
  22. data/lib/profiles/latest/recoveryservices_module_definition.rb +0 -1
  23. data/lib/version.rb +1 -1
  24. metadata +5 -24
  25. data/lib/2016-12-01/generated/azure_mgmt_recovery_services.rb +0 -45
  26. data/lib/2016-12-01/generated/azure_mgmt_recovery_services/backup_storage_configs.rb +0 -215
  27. data/lib/2016-12-01/generated/azure_mgmt_recovery_services/backup_vault_configs.rb +0 -226
  28. data/lib/2016-12-01/generated/azure_mgmt_recovery_services/models/backup_storage_config.rb +0 -107
  29. data/lib/2016-12-01/generated/azure_mgmt_recovery_services/models/backup_vault_config.rb +0 -107
  30. data/lib/2016-12-01/generated/azure_mgmt_recovery_services/models/enhanced_security_state.rb +0 -17
  31. data/lib/2016-12-01/generated/azure_mgmt_recovery_services/models/resource.rb +0 -84
  32. data/lib/2016-12-01/generated/azure_mgmt_recovery_services/models/sku.rb +0 -47
  33. data/lib/2016-12-01/generated/azure_mgmt_recovery_services/models/sku_name.rb +0 -16
  34. data/lib/2016-12-01/generated/azure_mgmt_recovery_services/models/storage_model_type.rb +0 -17
  35. data/lib/2016-12-01/generated/azure_mgmt_recovery_services/models/storage_type.rb +0 -17
  36. data/lib/2016-12-01/generated/azure_mgmt_recovery_services/models/storage_type_state.rb +0 -17
  37. data/lib/2016-12-01/generated/azure_mgmt_recovery_services/models/trigger_type.rb +0 -16
  38. data/lib/2016-12-01/generated/azure_mgmt_recovery_services/models/upgrade_details.rb +0 -147
  39. data/lib/2016-12-01/generated/azure_mgmt_recovery_services/models/vault_extended_info_resource.rb +0 -114
  40. data/lib/2016-12-01/generated/azure_mgmt_recovery_services/models/vault_properties.rb +0 -59
  41. data/lib/2016-12-01/generated/azure_mgmt_recovery_services/models/vault_upgrade_state.rb +0 -18
  42. data/lib/2016-12-01/generated/azure_mgmt_recovery_services/module_definition.rb +0 -9
  43. data/lib/2016-12-01/generated/azure_mgmt_recovery_services/recovery_services_backup_client.rb +0 -131
@@ -128,6 +128,9 @@ module Azure::RecoveryServices::Mgmt::V2016_06_01
128
128
  fail ArgumentError, 'path is nil' if path.nil?
129
129
 
130
130
  request_url = options[:base_url] || @base_url
131
+ if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
132
+ @request_headers['Content-Type'] = options[:headers]['Content-Type']
133
+ end
131
134
 
132
135
  request_headers = @request_headers
133
136
  request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
@@ -144,7 +147,7 @@ module Azure::RecoveryServices::Mgmt::V2016_06_01
144
147
  #
145
148
  def add_telemetry
146
149
  sdk_information = 'azure_mgmt_recovery_services'
147
- sdk_information = "#{sdk_information}/0.15.2"
150
+ sdk_information = "#{sdk_information}/0.16.0"
148
151
  add_user_agent_information(sdk_information)
149
152
  end
150
153
  end
@@ -32,8 +32,8 @@ module Azure::RecoveryServices::Mgmt::V2016_06_01
32
32
  # will be added to the HTTP request.
33
33
  #
34
34
  #
35
- def delete(resource_group_name, vault_name, identity_name, custom_headers = nil)
36
- response = delete_async(resource_group_name, vault_name, identity_name, custom_headers).value!
35
+ def delete(resource_group_name, vault_name, identity_name, custom_headers:nil)
36
+ response = delete_async(resource_group_name, vault_name, identity_name, custom_headers:custom_headers).value!
37
37
  nil
38
38
  end
39
39
 
@@ -49,8 +49,8 @@ module Azure::RecoveryServices::Mgmt::V2016_06_01
49
49
  #
50
50
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
51
51
  #
52
- def delete_with_http_info(resource_group_name, vault_name, identity_name, custom_headers = nil)
53
- delete_async(resource_group_name, vault_name, identity_name, custom_headers).value!
52
+ def delete_with_http_info(resource_group_name, vault_name, identity_name, custom_headers:nil)
53
+ delete_async(resource_group_name, vault_name, identity_name, custom_headers:custom_headers).value!
54
54
  end
55
55
 
56
56
  #
@@ -65,7 +65,7 @@ module Azure::RecoveryServices::Mgmt::V2016_06_01
65
65
  #
66
66
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
67
67
  #
68
- def delete_async(resource_group_name, vault_name, identity_name, custom_headers = nil)
68
+ def delete_async(resource_group_name, vault_name, identity_name, custom_headers:nil)
69
69
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
70
70
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
71
71
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
@@ -74,6 +74,7 @@ module Azure::RecoveryServices::Mgmt::V2016_06_01
74
74
 
75
75
 
76
76
  request_headers = {}
77
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
77
78
 
78
79
  # Set Headers
79
80
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -32,8 +32,8 @@ module Azure::RecoveryServices::Mgmt::V2016_06_01
32
32
  #
33
33
  # @return [ReplicationUsageList] operation results.
34
34
  #
35
- def list(resource_group_name, vault_name, custom_headers = nil)
36
- response = list_async(resource_group_name, vault_name, custom_headers).value!
35
+ def list(resource_group_name, vault_name, custom_headers:nil)
36
+ response = list_async(resource_group_name, vault_name, custom_headers:custom_headers).value!
37
37
  response.body unless response.nil?
38
38
  end
39
39
 
@@ -48,8 +48,8 @@ module Azure::RecoveryServices::Mgmt::V2016_06_01
48
48
  #
49
49
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
50
50
  #
51
- def list_with_http_info(resource_group_name, vault_name, custom_headers = nil)
52
- list_async(resource_group_name, vault_name, custom_headers).value!
51
+ def list_with_http_info(resource_group_name, vault_name, custom_headers:nil)
52
+ list_async(resource_group_name, vault_name, custom_headers:custom_headers).value!
53
53
  end
54
54
 
55
55
  #
@@ -63,7 +63,7 @@ module Azure::RecoveryServices::Mgmt::V2016_06_01
63
63
  #
64
64
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
65
65
  #
66
- def list_async(resource_group_name, vault_name, custom_headers = nil)
66
+ def list_async(resource_group_name, vault_name, custom_headers:nil)
67
67
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
68
68
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
69
69
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
@@ -71,6 +71,7 @@ module Azure::RecoveryServices::Mgmt::V2016_06_01
71
71
 
72
72
 
73
73
  request_headers = {}
74
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
74
75
 
75
76
  # Set Headers
76
77
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -32,8 +32,8 @@ module Azure::RecoveryServices::Mgmt::V2016_06_01
32
32
  #
33
33
  # @return [VaultUsageList] operation results.
34
34
  #
35
- def list_by_vaults(resource_group_name, vault_name, custom_headers = nil)
36
- response = list_by_vaults_async(resource_group_name, vault_name, custom_headers).value!
35
+ def list_by_vaults(resource_group_name, vault_name, custom_headers:nil)
36
+ response = list_by_vaults_async(resource_group_name, vault_name, custom_headers:custom_headers).value!
37
37
  response.body unless response.nil?
38
38
  end
39
39
 
@@ -48,8 +48,8 @@ module Azure::RecoveryServices::Mgmt::V2016_06_01
48
48
  #
49
49
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
50
50
  #
51
- def list_by_vaults_with_http_info(resource_group_name, vault_name, custom_headers = nil)
52
- list_by_vaults_async(resource_group_name, vault_name, custom_headers).value!
51
+ def list_by_vaults_with_http_info(resource_group_name, vault_name, custom_headers:nil)
52
+ list_by_vaults_async(resource_group_name, vault_name, custom_headers:custom_headers).value!
53
53
  end
54
54
 
55
55
  #
@@ -63,7 +63,7 @@ module Azure::RecoveryServices::Mgmt::V2016_06_01
63
63
  #
64
64
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
65
65
  #
66
- def list_by_vaults_async(resource_group_name, vault_name, custom_headers = nil)
66
+ def list_by_vaults_async(resource_group_name, vault_name, custom_headers:nil)
67
67
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
68
68
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
69
69
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
@@ -71,6 +71,7 @@ module Azure::RecoveryServices::Mgmt::V2016_06_01
71
71
 
72
72
 
73
73
  request_headers = {}
74
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
74
75
 
75
76
  # Set Headers
76
77
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -22,7 +22,7 @@ module Azure::RecoveryServices::Mgmt::V2016_06_01
22
22
  attr_reader :client
23
23
 
24
24
  #
25
- # Upload a certificate for a resource.
25
+ # Uploads a certificate for a resource.
26
26
  #
27
27
  # @param resource_group_name [String] The name of the resource group where the
28
28
  # recovery services vault is present.
@@ -35,13 +35,13 @@ module Azure::RecoveryServices::Mgmt::V2016_06_01
35
35
  #
36
36
  # @return [VaultCertificateResponse] operation results.
37
37
  #
38
- def create(resource_group_name, vault_name, certificate_name, certificate_request, custom_headers = nil)
39
- response = create_async(resource_group_name, vault_name, certificate_name, certificate_request, custom_headers).value!
38
+ def create(resource_group_name, vault_name, certificate_name, certificate_request, custom_headers:nil)
39
+ response = create_async(resource_group_name, vault_name, certificate_name, certificate_request, custom_headers:custom_headers).value!
40
40
  response.body unless response.nil?
41
41
  end
42
42
 
43
43
  #
44
- # Upload a certificate for a resource.
44
+ # Uploads a certificate for a resource.
45
45
  #
46
46
  # @param resource_group_name [String] The name of the resource group where the
47
47
  # recovery services vault is present.
@@ -54,12 +54,12 @@ module Azure::RecoveryServices::Mgmt::V2016_06_01
54
54
  #
55
55
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
56
56
  #
57
- def create_with_http_info(resource_group_name, vault_name, certificate_name, certificate_request, custom_headers = nil)
58
- create_async(resource_group_name, vault_name, certificate_name, certificate_request, custom_headers).value!
57
+ def create_with_http_info(resource_group_name, vault_name, certificate_name, certificate_request, custom_headers:nil)
58
+ create_async(resource_group_name, vault_name, certificate_name, certificate_request, custom_headers:custom_headers).value!
59
59
  end
60
60
 
61
61
  #
62
- # Upload a certificate for a resource.
62
+ # Uploads a certificate for a resource.
63
63
  #
64
64
  # @param resource_group_name [String] The name of the resource group where the
65
65
  # recovery services vault is present.
@@ -72,7 +72,7 @@ module Azure::RecoveryServices::Mgmt::V2016_06_01
72
72
  #
73
73
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
74
74
  #
75
- def create_async(resource_group_name, vault_name, certificate_name, certificate_request, custom_headers = nil)
75
+ def create_async(resource_group_name, vault_name, certificate_name, certificate_request, custom_headers:nil)
76
76
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
77
77
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
78
78
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
@@ -82,13 +82,12 @@ module Azure::RecoveryServices::Mgmt::V2016_06_01
82
82
 
83
83
 
84
84
  request_headers = {}
85
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
85
86
 
86
87
  # Set Headers
87
88
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
88
89
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
89
90
 
90
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
91
-
92
91
  # Serialize Request
93
92
  request_mapper = Azure::RecoveryServices::Mgmt::V2016_06_01::Models::CertificateRequest.mapper()
94
93
  request_content = @client.serialize(request_mapper, certificate_request)
@@ -32,8 +32,8 @@ module Azure::RecoveryServices::Mgmt::V2016_06_01
32
32
  #
33
33
  # @return [VaultExtendedInfoResource] operation results.
34
34
  #
35
- def get(resource_group_name, vault_name, custom_headers = nil)
36
- response = get_async(resource_group_name, vault_name, custom_headers).value!
35
+ def get(resource_group_name, vault_name, custom_headers:nil)
36
+ response = get_async(resource_group_name, vault_name, custom_headers:custom_headers).value!
37
37
  response.body unless response.nil?
38
38
  end
39
39
 
@@ -48,8 +48,8 @@ module Azure::RecoveryServices::Mgmt::V2016_06_01
48
48
  #
49
49
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
50
50
  #
51
- def get_with_http_info(resource_group_name, vault_name, custom_headers = nil)
52
- get_async(resource_group_name, vault_name, custom_headers).value!
51
+ def get_with_http_info(resource_group_name, vault_name, custom_headers:nil)
52
+ get_async(resource_group_name, vault_name, custom_headers:custom_headers).value!
53
53
  end
54
54
 
55
55
  #
@@ -63,7 +63,7 @@ module Azure::RecoveryServices::Mgmt::V2016_06_01
63
63
  #
64
64
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
65
65
  #
66
- def get_async(resource_group_name, vault_name, custom_headers = nil)
66
+ def get_async(resource_group_name, vault_name, custom_headers:nil)
67
67
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
68
68
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
69
69
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
@@ -71,6 +71,7 @@ module Azure::RecoveryServices::Mgmt::V2016_06_01
71
71
 
72
72
 
73
73
  request_headers = {}
74
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
74
75
 
75
76
  # Set Headers
76
77
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -122,14 +123,14 @@ module Azure::RecoveryServices::Mgmt::V2016_06_01
122
123
  # recovery services vault is present.
123
124
  # @param vault_name [String] The name of the recovery services vault.
124
125
  # @param resource_resource_extended_info_details [VaultExtendedInfoResource]
125
- # resourceResourceExtendedInfoDetails
126
+ # Details of ResourceExtendedInfo
126
127
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
127
128
  # will be added to the HTTP request.
128
129
  #
129
130
  # @return [VaultExtendedInfoResource] operation results.
130
131
  #
131
- def create_or_update(resource_group_name, vault_name, resource_resource_extended_info_details, custom_headers = nil)
132
- response = create_or_update_async(resource_group_name, vault_name, resource_resource_extended_info_details, custom_headers).value!
132
+ def create_or_update(resource_group_name, vault_name, resource_resource_extended_info_details, custom_headers:nil)
133
+ response = create_or_update_async(resource_group_name, vault_name, resource_resource_extended_info_details, custom_headers:custom_headers).value!
133
134
  response.body unless response.nil?
134
135
  end
135
136
 
@@ -140,14 +141,14 @@ module Azure::RecoveryServices::Mgmt::V2016_06_01
140
141
  # recovery services vault is present.
141
142
  # @param vault_name [String] The name of the recovery services vault.
142
143
  # @param resource_resource_extended_info_details [VaultExtendedInfoResource]
143
- # resourceResourceExtendedInfoDetails
144
+ # Details of ResourceExtendedInfo
144
145
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
145
146
  # will be added to the HTTP request.
146
147
  #
147
148
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
148
149
  #
149
- def create_or_update_with_http_info(resource_group_name, vault_name, resource_resource_extended_info_details, custom_headers = nil)
150
- create_or_update_async(resource_group_name, vault_name, resource_resource_extended_info_details, custom_headers).value!
150
+ def create_or_update_with_http_info(resource_group_name, vault_name, resource_resource_extended_info_details, custom_headers:nil)
151
+ create_or_update_async(resource_group_name, vault_name, resource_resource_extended_info_details, custom_headers:custom_headers).value!
151
152
  end
152
153
 
153
154
  #
@@ -157,13 +158,13 @@ module Azure::RecoveryServices::Mgmt::V2016_06_01
157
158
  # recovery services vault is present.
158
159
  # @param vault_name [String] The name of the recovery services vault.
159
160
  # @param resource_resource_extended_info_details [VaultExtendedInfoResource]
160
- # resourceResourceExtendedInfoDetails
161
+ # Details of ResourceExtendedInfo
161
162
  # @param [Hash{String => String}] A hash of custom headers that will be added
162
163
  # to the HTTP request.
163
164
  #
164
165
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
165
166
  #
166
- def create_or_update_async(resource_group_name, vault_name, resource_resource_extended_info_details, custom_headers = nil)
167
+ def create_or_update_async(resource_group_name, vault_name, resource_resource_extended_info_details, custom_headers:nil)
167
168
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
168
169
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
169
170
  fail ArgumentError, 'vault_name is nil' if vault_name.nil?
@@ -172,13 +173,12 @@ module Azure::RecoveryServices::Mgmt::V2016_06_01
172
173
 
173
174
 
174
175
  request_headers = {}
176
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
175
177
 
176
178
  # Set Headers
177
179
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
178
180
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
179
181
 
180
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
181
-
182
182
  # Serialize Request
183
183
  request_mapper = Azure::RecoveryServices::Mgmt::V2016_06_01::Models::VaultExtendedInfoResource.mapper()
184
184
  request_content = @client.serialize(request_mapper, resource_resource_extended_info_details)
@@ -232,14 +232,14 @@ module Azure::RecoveryServices::Mgmt::V2016_06_01
232
232
  # recovery services vault is present.
233
233
  # @param vault_name [String] The name of the recovery services vault.
234
234
  # @param resource_resource_extended_info_details [VaultExtendedInfoResource]
235
- # resourceResourceExtendedInfoDetails
235
+ # Details of ResourceExtendedInfo
236
236
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
237
237
  # will be added to the HTTP request.
238
238
  #
239
239
  # @return [VaultExtendedInfoResource] operation results.
240
240
  #
241
- def update(resource_group_name, vault_name, resource_resource_extended_info_details, custom_headers = nil)
242
- response = update_async(resource_group_name, vault_name, resource_resource_extended_info_details, custom_headers).value!
241
+ def update(resource_group_name, vault_name, resource_resource_extended_info_details, custom_headers:nil)
242
+ response = update_async(resource_group_name, vault_name, resource_resource_extended_info_details, custom_headers:custom_headers).value!
243
243
  response.body unless response.nil?
244
244
  end
245
245
 
@@ -250,14 +250,14 @@ module Azure::RecoveryServices::Mgmt::V2016_06_01
250
250
  # recovery services vault is present.
251
251
  # @param vault_name [String] The name of the recovery services vault.
252
252
  # @param resource_resource_extended_info_details [VaultExtendedInfoResource]
253
- # resourceResourceExtendedInfoDetails
253
+ # Details of ResourceExtendedInfo
254
254
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
255
255
  # will be added to the HTTP request.
256
256
  #
257
257
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
258
258
  #
259
- def update_with_http_info(resource_group_name, vault_name, resource_resource_extended_info_details, custom_headers = nil)
260
- update_async(resource_group_name, vault_name, resource_resource_extended_info_details, custom_headers).value!
259
+ def update_with_http_info(resource_group_name, vault_name, resource_resource_extended_info_details, custom_headers:nil)
260
+ update_async(resource_group_name, vault_name, resource_resource_extended_info_details, custom_headers:custom_headers).value!
261
261
  end
262
262
 
263
263
  #
@@ -267,13 +267,13 @@ module Azure::RecoveryServices::Mgmt::V2016_06_01
267
267
  # recovery services vault is present.
268
268
  # @param vault_name [String] The name of the recovery services vault.
269
269
  # @param resource_resource_extended_info_details [VaultExtendedInfoResource]
270
- # resourceResourceExtendedInfoDetails
270
+ # Details of ResourceExtendedInfo
271
271
  # @param [Hash{String => String}] A hash of custom headers that will be added
272
272
  # to the HTTP request.
273
273
  #
274
274
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
275
275
  #
276
- def update_async(resource_group_name, vault_name, resource_resource_extended_info_details, custom_headers = nil)
276
+ def update_async(resource_group_name, vault_name, resource_resource_extended_info_details, custom_headers:nil)
277
277
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
278
278
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
279
279
  fail ArgumentError, 'vault_name is nil' if vault_name.nil?
@@ -282,13 +282,12 @@ module Azure::RecoveryServices::Mgmt::V2016_06_01
282
282
 
283
283
 
284
284
  request_headers = {}
285
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
285
286
 
286
287
  # Set Headers
287
288
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
288
289
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
289
290
 
290
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
291
-
292
291
  # Serialize Request
293
292
  request_mapper = Azure::RecoveryServices::Mgmt::V2016_06_01::Models::VaultExtendedInfoResource.mapper()
294
293
  request_content = @client.serialize(request_mapper, resource_resource_extended_info_details)
@@ -27,11 +27,11 @@ module Azure::RecoveryServices::Mgmt::V2016_06_01
27
27
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
28
28
  # will be added to the HTTP request.
29
29
  #
30
- # @return [VaultList] operation results.
30
+ # @return [Array<Vault>] operation results.
31
31
  #
32
- def list_by_subscription_id(custom_headers = nil)
33
- response = list_by_subscription_id_async(custom_headers).value!
34
- response.body unless response.nil?
32
+ def list_by_subscription_id(custom_headers:nil)
33
+ first_page = list_by_subscription_id_as_lazy(custom_headers:custom_headers)
34
+ first_page.get_all_items
35
35
  end
36
36
 
37
37
  #
@@ -42,8 +42,8 @@ module Azure::RecoveryServices::Mgmt::V2016_06_01
42
42
  #
43
43
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
44
44
  #
45
- def list_by_subscription_id_with_http_info(custom_headers = nil)
46
- list_by_subscription_id_async(custom_headers).value!
45
+ def list_by_subscription_id_with_http_info(custom_headers:nil)
46
+ list_by_subscription_id_async(custom_headers:custom_headers).value!
47
47
  end
48
48
 
49
49
  #
@@ -54,12 +54,13 @@ module Azure::RecoveryServices::Mgmt::V2016_06_01
54
54
  #
55
55
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
56
56
  #
57
- def list_by_subscription_id_async(custom_headers = nil)
57
+ def list_by_subscription_id_async(custom_headers:nil)
58
58
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
59
59
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
60
60
 
61
61
 
62
62
  request_headers = {}
63
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
63
64
 
64
65
  # Set Headers
65
66
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -112,11 +113,11 @@ module Azure::RecoveryServices::Mgmt::V2016_06_01
112
113
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
113
114
  # will be added to the HTTP request.
114
115
  #
115
- # @return [VaultList] operation results.
116
+ # @return [Array<Vault>] operation results.
116
117
  #
117
- def list_by_resource_group(resource_group_name, custom_headers = nil)
118
- response = list_by_resource_group_async(resource_group_name, custom_headers).value!
119
- response.body unless response.nil?
118
+ def list_by_resource_group(resource_group_name, custom_headers:nil)
119
+ first_page = list_by_resource_group_as_lazy(resource_group_name, custom_headers:custom_headers)
120
+ first_page.get_all_items
120
121
  end
121
122
 
122
123
  #
@@ -129,8 +130,8 @@ module Azure::RecoveryServices::Mgmt::V2016_06_01
129
130
  #
130
131
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
131
132
  #
132
- def list_by_resource_group_with_http_info(resource_group_name, custom_headers = nil)
133
- list_by_resource_group_async(resource_group_name, custom_headers).value!
133
+ def list_by_resource_group_with_http_info(resource_group_name, custom_headers:nil)
134
+ list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
134
135
  end
135
136
 
136
137
  #
@@ -143,13 +144,14 @@ module Azure::RecoveryServices::Mgmt::V2016_06_01
143
144
  #
144
145
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
145
146
  #
146
- def list_by_resource_group_async(resource_group_name, custom_headers = nil)
147
+ def list_by_resource_group_async(resource_group_name, custom_headers:nil)
147
148
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
148
149
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
149
150
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
150
151
 
151
152
 
152
153
  request_headers = {}
154
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
153
155
 
154
156
  # Set Headers
155
157
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -205,8 +207,8 @@ module Azure::RecoveryServices::Mgmt::V2016_06_01
205
207
  #
206
208
  # @return [Vault] operation results.
207
209
  #
208
- def get(resource_group_name, vault_name, custom_headers = nil)
209
- response = get_async(resource_group_name, vault_name, custom_headers).value!
210
+ def get(resource_group_name, vault_name, custom_headers:nil)
211
+ response = get_async(resource_group_name, vault_name, custom_headers:custom_headers).value!
210
212
  response.body unless response.nil?
211
213
  end
212
214
 
@@ -221,8 +223,8 @@ module Azure::RecoveryServices::Mgmt::V2016_06_01
221
223
  #
222
224
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
223
225
  #
224
- def get_with_http_info(resource_group_name, vault_name, custom_headers = nil)
225
- get_async(resource_group_name, vault_name, custom_headers).value!
226
+ def get_with_http_info(resource_group_name, vault_name, custom_headers:nil)
227
+ get_async(resource_group_name, vault_name, custom_headers:custom_headers).value!
226
228
  end
227
229
 
228
230
  #
@@ -236,7 +238,7 @@ module Azure::RecoveryServices::Mgmt::V2016_06_01
236
238
  #
237
239
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
238
240
  #
239
- def get_async(resource_group_name, vault_name, custom_headers = nil)
241
+ def get_async(resource_group_name, vault_name, custom_headers:nil)
240
242
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
241
243
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
242
244
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
@@ -244,6 +246,7 @@ module Azure::RecoveryServices::Mgmt::V2016_06_01
244
246
 
245
247
 
246
248
  request_headers = {}
249
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
247
250
 
248
251
  # Set Headers
249
252
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -300,8 +303,8 @@ module Azure::RecoveryServices::Mgmt::V2016_06_01
300
303
  #
301
304
  # @return [Vault] operation results.
302
305
  #
303
- def create_or_update(resource_group_name, vault_name, vault, custom_headers = nil)
304
- response = create_or_update_async(resource_group_name, vault_name, vault, custom_headers).value!
306
+ def create_or_update(resource_group_name, vault_name, vault, custom_headers:nil)
307
+ response = create_or_update_async(resource_group_name, vault_name, vault, custom_headers:custom_headers).value!
305
308
  response.body unless response.nil?
306
309
  end
307
310
 
@@ -317,8 +320,8 @@ module Azure::RecoveryServices::Mgmt::V2016_06_01
317
320
  #
318
321
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
319
322
  #
320
- def create_or_update_with_http_info(resource_group_name, vault_name, vault, custom_headers = nil)
321
- create_or_update_async(resource_group_name, vault_name, vault, custom_headers).value!
323
+ def create_or_update_with_http_info(resource_group_name, vault_name, vault, custom_headers:nil)
324
+ create_or_update_async(resource_group_name, vault_name, vault, custom_headers:custom_headers).value!
322
325
  end
323
326
 
324
327
  #
@@ -333,7 +336,7 @@ module Azure::RecoveryServices::Mgmt::V2016_06_01
333
336
  #
334
337
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
335
338
  #
336
- def create_or_update_async(resource_group_name, vault_name, vault, custom_headers = nil)
339
+ def create_or_update_async(resource_group_name, vault_name, vault, custom_headers:nil)
337
340
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
338
341
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
339
342
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
@@ -342,13 +345,12 @@ module Azure::RecoveryServices::Mgmt::V2016_06_01
342
345
 
343
346
 
344
347
  request_headers = {}
348
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
345
349
 
346
350
  # Set Headers
347
351
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
348
352
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
349
353
 
350
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
351
-
352
354
  # Serialize Request
353
355
  request_mapper = Azure::RecoveryServices::Mgmt::V2016_06_01::Models::Vault.mapper()
354
356
  request_content = @client.serialize(request_mapper, vault)
@@ -415,8 +417,8 @@ module Azure::RecoveryServices::Mgmt::V2016_06_01
415
417
  # will be added to the HTTP request.
416
418
  #
417
419
  #
418
- def delete(resource_group_name, vault_name, custom_headers = nil)
419
- response = delete_async(resource_group_name, vault_name, custom_headers).value!
420
+ def delete(resource_group_name, vault_name, custom_headers:nil)
421
+ response = delete_async(resource_group_name, vault_name, custom_headers:custom_headers).value!
420
422
  nil
421
423
  end
422
424
 
@@ -431,8 +433,8 @@ module Azure::RecoveryServices::Mgmt::V2016_06_01
431
433
  #
432
434
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
433
435
  #
434
- def delete_with_http_info(resource_group_name, vault_name, custom_headers = nil)
435
- delete_async(resource_group_name, vault_name, custom_headers).value!
436
+ def delete_with_http_info(resource_group_name, vault_name, custom_headers:nil)
437
+ delete_async(resource_group_name, vault_name, custom_headers:custom_headers).value!
436
438
  end
437
439
 
438
440
  #
@@ -446,7 +448,7 @@ module Azure::RecoveryServices::Mgmt::V2016_06_01
446
448
  #
447
449
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
448
450
  #
449
- def delete_async(resource_group_name, vault_name, custom_headers = nil)
451
+ def delete_async(resource_group_name, vault_name, custom_headers:nil)
450
452
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
451
453
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
452
454
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
@@ -454,6 +456,7 @@ module Azure::RecoveryServices::Mgmt::V2016_06_01
454
456
 
455
457
 
456
458
  request_headers = {}
459
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
457
460
 
458
461
  # Set Headers
459
462
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -494,14 +497,14 @@ module Azure::RecoveryServices::Mgmt::V2016_06_01
494
497
  # @param resource_group_name [String] The name of the resource group where the
495
498
  # recovery services vault is present.
496
499
  # @param vault_name [String] The name of the recovery services vault.
497
- # @param vault [Vault] Recovery Services Vault to be created.
500
+ # @param vault [PatchVault] Recovery Services Vault to be created.
498
501
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
499
502
  # will be added to the HTTP request.
500
503
  #
501
504
  # @return [Vault] operation results.
502
505
  #
503
- def update(resource_group_name, vault_name, vault, custom_headers = nil)
504
- response = update_async(resource_group_name, vault_name, vault, custom_headers).value!
506
+ def update(resource_group_name, vault_name, vault, custom_headers:nil)
507
+ response = update_async(resource_group_name, vault_name, vault, custom_headers:custom_headers).value!
505
508
  response.body unless response.nil?
506
509
  end
507
510
 
@@ -511,14 +514,14 @@ module Azure::RecoveryServices::Mgmt::V2016_06_01
511
514
  # @param resource_group_name [String] The name of the resource group where the
512
515
  # recovery services vault is present.
513
516
  # @param vault_name [String] The name of the recovery services vault.
514
- # @param vault [Vault] Recovery Services Vault to be created.
517
+ # @param vault [PatchVault] Recovery Services Vault to be created.
515
518
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
516
519
  # will be added to the HTTP request.
517
520
  #
518
521
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
519
522
  #
520
- def update_with_http_info(resource_group_name, vault_name, vault, custom_headers = nil)
521
- update_async(resource_group_name, vault_name, vault, custom_headers).value!
523
+ def update_with_http_info(resource_group_name, vault_name, vault, custom_headers:nil)
524
+ update_async(resource_group_name, vault_name, vault, custom_headers:custom_headers).value!
522
525
  end
523
526
 
524
527
  #
@@ -527,13 +530,13 @@ module Azure::RecoveryServices::Mgmt::V2016_06_01
527
530
  # @param resource_group_name [String] The name of the resource group where the
528
531
  # recovery services vault is present.
529
532
  # @param vault_name [String] The name of the recovery services vault.
530
- # @param vault [Vault] Recovery Services Vault to be created.
533
+ # @param vault [PatchVault] Recovery Services Vault to be created.
531
534
  # @param [Hash{String => String}] A hash of custom headers that will be added
532
535
  # to the HTTP request.
533
536
  #
534
537
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
535
538
  #
536
- def update_async(resource_group_name, vault_name, vault, custom_headers = nil)
539
+ def update_async(resource_group_name, vault_name, vault, custom_headers:nil)
537
540
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
538
541
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
539
542
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
@@ -542,15 +545,14 @@ module Azure::RecoveryServices::Mgmt::V2016_06_01
542
545
 
543
546
 
544
547
  request_headers = {}
548
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
545
549
 
546
550
  # Set Headers
547
551
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
548
552
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
549
553
 
550
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
551
-
552
554
  # Serialize Request
553
- request_mapper = Azure::RecoveryServices::Mgmt::V2016_06_01::Models::Vault.mapper()
555
+ request_mapper = Azure::RecoveryServices::Mgmt::V2016_06_01::Models::PatchVault.mapper()
554
556
  request_content = @client.serialize(request_mapper, vault)
555
557
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
556
558
 
@@ -605,5 +607,221 @@ module Azure::RecoveryServices::Mgmt::V2016_06_01
605
607
  promise.execute
606
608
  end
607
609
 
610
+ #
611
+ # Fetches all the resources of the specified type in the subscription.
612
+ #
613
+ # @param next_page_link [String] The NextLink from the previous successful call
614
+ # to List operation.
615
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
616
+ # will be added to the HTTP request.
617
+ #
618
+ # @return [VaultList] operation results.
619
+ #
620
+ def list_by_subscription_id_next(next_page_link, custom_headers:nil)
621
+ response = list_by_subscription_id_next_async(next_page_link, custom_headers:custom_headers).value!
622
+ response.body unless response.nil?
623
+ end
624
+
625
+ #
626
+ # Fetches all the resources of the specified type in the subscription.
627
+ #
628
+ # @param next_page_link [String] The NextLink from the previous successful call
629
+ # to List operation.
630
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
631
+ # will be added to the HTTP request.
632
+ #
633
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
634
+ #
635
+ def list_by_subscription_id_next_with_http_info(next_page_link, custom_headers:nil)
636
+ list_by_subscription_id_next_async(next_page_link, custom_headers:custom_headers).value!
637
+ end
638
+
639
+ #
640
+ # Fetches all the resources of the specified type in the subscription.
641
+ #
642
+ # @param next_page_link [String] The NextLink from the previous successful call
643
+ # to List operation.
644
+ # @param [Hash{String => String}] A hash of custom headers that will be added
645
+ # to the HTTP request.
646
+ #
647
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
648
+ #
649
+ def list_by_subscription_id_next_async(next_page_link, custom_headers:nil)
650
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
651
+
652
+
653
+ request_headers = {}
654
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
655
+
656
+ # Set Headers
657
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
658
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
659
+ path_template = '{nextLink}'
660
+
661
+ request_url = @base_url || @client.base_url
662
+
663
+ options = {
664
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
665
+ skip_encoding_path_params: {'nextLink' => next_page_link},
666
+ headers: request_headers.merge(custom_headers || {}),
667
+ base_url: request_url
668
+ }
669
+ promise = @client.make_request_async(:get, path_template, options)
670
+
671
+ promise = promise.then do |result|
672
+ http_response = result.response
673
+ status_code = http_response.status
674
+ response_content = http_response.body
675
+ unless status_code == 200
676
+ error_model = JSON.load(response_content)
677
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
678
+ end
679
+
680
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
681
+ # Deserialize Response
682
+ if status_code == 200
683
+ begin
684
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
685
+ result_mapper = Azure::RecoveryServices::Mgmt::V2016_06_01::Models::VaultList.mapper()
686
+ result.body = @client.deserialize(result_mapper, parsed_response)
687
+ rescue Exception => e
688
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
689
+ end
690
+ end
691
+
692
+ result
693
+ end
694
+
695
+ promise.execute
696
+ end
697
+
698
+ #
699
+ # Retrieve a list of Vaults.
700
+ #
701
+ # @param next_page_link [String] The NextLink from the previous successful call
702
+ # to List operation.
703
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
704
+ # will be added to the HTTP request.
705
+ #
706
+ # @return [VaultList] operation results.
707
+ #
708
+ def list_by_resource_group_next(next_page_link, custom_headers:nil)
709
+ response = list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
710
+ response.body unless response.nil?
711
+ end
712
+
713
+ #
714
+ # Retrieve a list of Vaults.
715
+ #
716
+ # @param next_page_link [String] The NextLink from the previous successful call
717
+ # to List operation.
718
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
719
+ # will be added to the HTTP request.
720
+ #
721
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
722
+ #
723
+ def list_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil)
724
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
725
+ end
726
+
727
+ #
728
+ # Retrieve a list of Vaults.
729
+ #
730
+ # @param next_page_link [String] The NextLink from the previous successful call
731
+ # to List operation.
732
+ # @param [Hash{String => String}] A hash of custom headers that will be added
733
+ # to the HTTP request.
734
+ #
735
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
736
+ #
737
+ def list_by_resource_group_next_async(next_page_link, custom_headers:nil)
738
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
739
+
740
+
741
+ request_headers = {}
742
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
743
+
744
+ # Set Headers
745
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
746
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
747
+ path_template = '{nextLink}'
748
+
749
+ request_url = @base_url || @client.base_url
750
+
751
+ options = {
752
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
753
+ skip_encoding_path_params: {'nextLink' => next_page_link},
754
+ headers: request_headers.merge(custom_headers || {}),
755
+ base_url: request_url
756
+ }
757
+ promise = @client.make_request_async(:get, path_template, options)
758
+
759
+ promise = promise.then do |result|
760
+ http_response = result.response
761
+ status_code = http_response.status
762
+ response_content = http_response.body
763
+ unless status_code == 200
764
+ error_model = JSON.load(response_content)
765
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
766
+ end
767
+
768
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
769
+ # Deserialize Response
770
+ if status_code == 200
771
+ begin
772
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
773
+ result_mapper = Azure::RecoveryServices::Mgmt::V2016_06_01::Models::VaultList.mapper()
774
+ result.body = @client.deserialize(result_mapper, parsed_response)
775
+ rescue Exception => e
776
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
777
+ end
778
+ end
779
+
780
+ result
781
+ end
782
+
783
+ promise.execute
784
+ end
785
+
786
+ #
787
+ # Fetches all the resources of the specified type in the subscription.
788
+ #
789
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
790
+ # will be added to the HTTP request.
791
+ #
792
+ # @return [VaultList] which provide lazy access to pages of the response.
793
+ #
794
+ def list_by_subscription_id_as_lazy(custom_headers:nil)
795
+ response = list_by_subscription_id_async(custom_headers:custom_headers).value!
796
+ unless response.nil?
797
+ page = response.body
798
+ page.next_method = Proc.new do |next_page_link|
799
+ list_by_subscription_id_next_async(next_page_link, custom_headers:custom_headers)
800
+ end
801
+ page
802
+ end
803
+ end
804
+
805
+ #
806
+ # Retrieve a list of Vaults.
807
+ #
808
+ # @param resource_group_name [String] The name of the resource group where the
809
+ # recovery services vault is present.
810
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
811
+ # will be added to the HTTP request.
812
+ #
813
+ # @return [VaultList] which provide lazy access to pages of the response.
814
+ #
815
+ def list_by_resource_group_as_lazy(resource_group_name, custom_headers:nil)
816
+ response = list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
817
+ unless response.nil?
818
+ page = response.body
819
+ page.next_method = Proc.new do |next_page_link|
820
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers)
821
+ end
822
+ page
823
+ end
824
+ end
825
+
608
826
  end
609
827
  end