azure_mgmt_stor_simple8000_series 0.14.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (183) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +21 -0
  3. data/lib/azure_mgmt_stor_simple8000_series.rb +7 -0
  4. data/lib/generated/azure_mgmt_stor_simple8000_series/access_control_records.rb +507 -0
  5. data/lib/generated/azure_mgmt_stor_simple8000_series/alerts.rb +422 -0
  6. data/lib/generated/azure_mgmt_stor_simple8000_series/backup_policies.rb +655 -0
  7. data/lib/generated/azure_mgmt_stor_simple8000_series/backup_schedules.rb +532 -0
  8. data/lib/generated/azure_mgmt_stor_simple8000_series/backups.rb +645 -0
  9. data/lib/generated/azure_mgmt_stor_simple8000_series/bandwidth_settings.rb +497 -0
  10. data/lib/generated/azure_mgmt_stor_simple8000_series/cloud_appliances.rb +249 -0
  11. data/lib/generated/azure_mgmt_stor_simple8000_series/device_settings.rb +1150 -0
  12. data/lib/generated/azure_mgmt_stor_simple8000_series/devices.rb +1724 -0
  13. data/lib/generated/azure_mgmt_stor_simple8000_series/hardware_component_groups.rb +275 -0
  14. data/lib/generated/azure_mgmt_stor_simple8000_series/jobs.rb +681 -0
  15. data/lib/generated/azure_mgmt_stor_simple8000_series/managers.rb +1709 -0
  16. data/lib/generated/azure_mgmt_stor_simple8000_series/models/access_control_record.rb +88 -0
  17. data/lib/generated/azure_mgmt_stor_simple8000_series/models/access_control_record_list.rb +52 -0
  18. data/lib/generated/azure_mgmt_stor_simple8000_series/models/acs_configuration.rb +64 -0
  19. data/lib/generated/azure_mgmt_stor_simple8000_series/models/alert.rb +223 -0
  20. data/lib/generated/azure_mgmt_stor_simple8000_series/models/alert_email_notification_status.rb +16 -0
  21. data/lib/generated/azure_mgmt_stor_simple8000_series/models/alert_error_details.rb +64 -0
  22. data/lib/generated/azure_mgmt_stor_simple8000_series/models/alert_filter.rb +96 -0
  23. data/lib/generated/azure_mgmt_stor_simple8000_series/models/alert_list.rb +94 -0
  24. data/lib/generated/azure_mgmt_stor_simple8000_series/models/alert_scope.rb +16 -0
  25. data/lib/generated/azure_mgmt_stor_simple8000_series/models/alert_settings.rb +119 -0
  26. data/lib/generated/azure_mgmt_stor_simple8000_series/models/alert_severity.rb +17 -0
  27. data/lib/generated/azure_mgmt_stor_simple8000_series/models/alert_source.rb +66 -0
  28. data/lib/generated/azure_mgmt_stor_simple8000_series/models/alert_source_type.rb +16 -0
  29. data/lib/generated/azure_mgmt_stor_simple8000_series/models/alert_status.rb +16 -0
  30. data/lib/generated/azure_mgmt_stor_simple8000_series/models/asymmetric_encrypted_secret.rb +67 -0
  31. data/lib/generated/azure_mgmt_stor_simple8000_series/models/authentication_type.rb +18 -0
  32. data/lib/generated/azure_mgmt_stor_simple8000_series/models/authorization_eligibility.rb +16 -0
  33. data/lib/generated/azure_mgmt_stor_simple8000_series/models/authorization_status.rb +16 -0
  34. data/lib/generated/azure_mgmt_stor_simple8000_series/models/available_provider_operation.rb +82 -0
  35. data/lib/generated/azure_mgmt_stor_simple8000_series/models/available_provider_operation_display.rb +88 -0
  36. data/lib/generated/azure_mgmt_stor_simple8000_series/models/available_provider_operation_list.rb +94 -0
  37. data/lib/generated/azure_mgmt_stor_simple8000_series/models/backup.rb +148 -0
  38. data/lib/generated/azure_mgmt_stor_simple8000_series/models/backup_element.rb +107 -0
  39. data/lib/generated/azure_mgmt_stor_simple8000_series/models/backup_filter.rb +68 -0
  40. data/lib/generated/azure_mgmt_stor_simple8000_series/models/backup_job_creation_type.rb +17 -0
  41. data/lib/generated/azure_mgmt_stor_simple8000_series/models/backup_list.rb +94 -0
  42. data/lib/generated/azure_mgmt_stor_simple8000_series/models/backup_policy.rb +158 -0
  43. data/lib/generated/azure_mgmt_stor_simple8000_series/models/backup_policy_creation_type.rb +16 -0
  44. data/lib/generated/azure_mgmt_stor_simple8000_series/models/backup_policy_list.rb +52 -0
  45. data/lib/generated/azure_mgmt_stor_simple8000_series/models/backup_schedule.rb +133 -0
  46. data/lib/generated/azure_mgmt_stor_simple8000_series/models/backup_schedule_list.rb +52 -0
  47. data/lib/generated/azure_mgmt_stor_simple8000_series/models/backup_status.rb +16 -0
  48. data/lib/generated/azure_mgmt_stor_simple8000_series/models/backup_type.rb +16 -0
  49. data/lib/generated/azure_mgmt_stor_simple8000_series/models/bandwidth_schedule.rb +85 -0
  50. data/lib/generated/azure_mgmt_stor_simple8000_series/models/bandwidth_setting.rb +96 -0
  51. data/lib/generated/azure_mgmt_stor_simple8000_series/models/bandwidth_setting_list.rb +52 -0
  52. data/lib/generated/azure_mgmt_stor_simple8000_series/models/base_model.rb +79 -0
  53. data/lib/generated/azure_mgmt_stor_simple8000_series/models/chap_settings.rb +76 -0
  54. data/lib/generated/azure_mgmt_stor_simple8000_series/models/clear_alert_request.rb +61 -0
  55. data/lib/generated/azure_mgmt_stor_simple8000_series/models/clone_request.rb +85 -0
  56. data/lib/generated/azure_mgmt_stor_simple8000_series/models/cloud_appliance.rb +146 -0
  57. data/lib/generated/azure_mgmt_stor_simple8000_series/models/cloud_appliance_configuration.rb +166 -0
  58. data/lib/generated/azure_mgmt_stor_simple8000_series/models/cloud_appliance_configuration_list.rb +52 -0
  59. data/lib/generated/azure_mgmt_stor_simple8000_series/models/cloud_appliance_settings.rb +58 -0
  60. data/lib/generated/azure_mgmt_stor_simple8000_series/models/configure_device_request.rb +120 -0
  61. data/lib/generated/azure_mgmt_stor_simple8000_series/models/controller_id.rb +18 -0
  62. data/lib/generated/azure_mgmt_stor_simple8000_series/models/controller_power_state_action.rb +17 -0
  63. data/lib/generated/azure_mgmt_stor_simple8000_series/models/controller_power_state_change_request.rb +118 -0
  64. data/lib/generated/azure_mgmt_stor_simple8000_series/models/controller_status.rb +20 -0
  65. data/lib/generated/azure_mgmt_stor_simple8000_series/models/data_statistics.rb +79 -0
  66. data/lib/generated/azure_mgmt_stor_simple8000_series/models/day_of_week.rb +21 -0
  67. data/lib/generated/azure_mgmt_stor_simple8000_series/models/device.rb +364 -0
  68. data/lib/generated/azure_mgmt_stor_simple8000_series/models/device_configuration_status.rb +16 -0
  69. data/lib/generated/azure_mgmt_stor_simple8000_series/models/device_details.rb +56 -0
  70. data/lib/generated/azure_mgmt_stor_simple8000_series/models/device_list.rb +52 -0
  71. data/lib/generated/azure_mgmt_stor_simple8000_series/models/device_patch.rb +44 -0
  72. data/lib/generated/azure_mgmt_stor_simple8000_series/models/device_rollover_details.rb +75 -0
  73. data/lib/generated/azure_mgmt_stor_simple8000_series/models/device_status.rb +25 -0
  74. data/lib/generated/azure_mgmt_stor_simple8000_series/models/device_type.rb +17 -0
  75. data/lib/generated/azure_mgmt_stor_simple8000_series/models/dimension_filter.rb +60 -0
  76. data/lib/generated/azure_mgmt_stor_simple8000_series/models/dnssettings.rb +88 -0
  77. data/lib/generated/azure_mgmt_stor_simple8000_series/models/encryption_algorithm.rb +17 -0
  78. data/lib/generated/azure_mgmt_stor_simple8000_series/models/encryption_settings.rb +93 -0
  79. data/lib/generated/azure_mgmt_stor_simple8000_series/models/encryption_status.rb +16 -0
  80. data/lib/generated/azure_mgmt_stor_simple8000_series/models/failover_request.rb +64 -0
  81. data/lib/generated/azure_mgmt_stor_simple8000_series/models/failover_set.rb +65 -0
  82. data/lib/generated/azure_mgmt_stor_simple8000_series/models/failover_set_eligibility_result.rb +56 -0
  83. data/lib/generated/azure_mgmt_stor_simple8000_series/models/failover_sets_list.rb +52 -0
  84. data/lib/generated/azure_mgmt_stor_simple8000_series/models/failover_target.rb +154 -0
  85. data/lib/generated/azure_mgmt_stor_simple8000_series/models/failover_targets_list.rb +53 -0
  86. data/lib/generated/azure_mgmt_stor_simple8000_series/models/feature.rb +56 -0
  87. data/lib/generated/azure_mgmt_stor_simple8000_series/models/feature_filter.rb +45 -0
  88. data/lib/generated/azure_mgmt_stor_simple8000_series/models/feature_list.rb +52 -0
  89. data/lib/generated/azure_mgmt_stor_simple8000_series/models/feature_support_status.rb +17 -0
  90. data/lib/generated/azure_mgmt_stor_simple8000_series/models/hardware_component.rb +77 -0
  91. data/lib/generated/azure_mgmt_stor_simple8000_series/models/hardware_component_group.rb +104 -0
  92. data/lib/generated/azure_mgmt_stor_simple8000_series/models/hardware_component_group_list.rb +52 -0
  93. data/lib/generated/azure_mgmt_stor_simple8000_series/models/hardware_component_status.rb +21 -0
  94. data/lib/generated/azure_mgmt_stor_simple8000_series/models/in_eligibility_category.rb +17 -0
  95. data/lib/generated/azure_mgmt_stor_simple8000_series/models/iscsiand_cloud_status.rb +18 -0
  96. data/lib/generated/azure_mgmt_stor_simple8000_series/models/job.rb +236 -0
  97. data/lib/generated/azure_mgmt_stor_simple8000_series/models/job_error_details.rb +73 -0
  98. data/lib/generated/azure_mgmt_stor_simple8000_series/models/job_error_item.rb +72 -0
  99. data/lib/generated/azure_mgmt_stor_simple8000_series/models/job_filter.rb +73 -0
  100. data/lib/generated/azure_mgmt_stor_simple8000_series/models/job_list.rb +94 -0
  101. data/lib/generated/azure_mgmt_stor_simple8000_series/models/job_stage.rb +76 -0
  102. data/lib/generated/azure_mgmt_stor_simple8000_series/models/job_status.rb +18 -0
  103. data/lib/generated/azure_mgmt_stor_simple8000_series/models/job_type.rb +24 -0
  104. data/lib/generated/azure_mgmt_stor_simple8000_series/models/key.rb +44 -0
  105. data/lib/generated/azure_mgmt_stor_simple8000_series/models/key_rollover_status.rb +16 -0
  106. data/lib/generated/azure_mgmt_stor_simple8000_series/models/kind.rb +15 -0
  107. data/lib/generated/azure_mgmt_stor_simple8000_series/models/list_failover_targets_request.rb +54 -0
  108. data/lib/generated/azure_mgmt_stor_simple8000_series/models/manager.rb +126 -0
  109. data/lib/generated/azure_mgmt_stor_simple8000_series/models/manager_extended_info.rb +140 -0
  110. data/lib/generated/azure_mgmt_stor_simple8000_series/models/manager_intrinsic_settings.rb +46 -0
  111. data/lib/generated/azure_mgmt_stor_simple8000_series/models/manager_list.rb +52 -0
  112. data/lib/generated/azure_mgmt_stor_simple8000_series/models/manager_patch.rb +51 -0
  113. data/lib/generated/azure_mgmt_stor_simple8000_series/models/manager_sku.rb +47 -0
  114. data/lib/generated/azure_mgmt_stor_simple8000_series/models/manager_type.rb +16 -0
  115. data/lib/generated/azure_mgmt_stor_simple8000_series/models/metric_aggregation_type.rb +20 -0
  116. data/lib/generated/azure_mgmt_stor_simple8000_series/models/metric_availablity.rb +55 -0
  117. data/lib/generated/azure_mgmt_stor_simple8000_series/models/metric_data.rb +94 -0
  118. data/lib/generated/azure_mgmt_stor_simple8000_series/models/metric_definition.rb +136 -0
  119. data/lib/generated/azure_mgmt_stor_simple8000_series/models/metric_definition_list.rb +52 -0
  120. data/lib/generated/azure_mgmt_stor_simple8000_series/models/metric_dimension.rb +54 -0
  121. data/lib/generated/azure_mgmt_stor_simple8000_series/models/metric_filter.rb +110 -0
  122. data/lib/generated/azure_mgmt_stor_simple8000_series/models/metric_list.rb +52 -0
  123. data/lib/generated/azure_mgmt_stor_simple8000_series/models/metric_name.rb +54 -0
  124. data/lib/generated/azure_mgmt_stor_simple8000_series/models/metric_name_filter.rb +48 -0
  125. data/lib/generated/azure_mgmt_stor_simple8000_series/models/metric_unit.rb +20 -0
  126. data/lib/generated/azure_mgmt_stor_simple8000_series/models/metrics.rb +157 -0
  127. data/lib/generated/azure_mgmt_stor_simple8000_series/models/monitoring_status.rb +16 -0
  128. data/lib/generated/azure_mgmt_stor_simple8000_series/models/net_interface_id.rb +21 -0
  129. data/lib/generated/azure_mgmt_stor_simple8000_series/models/net_interface_status.rb +16 -0
  130. data/lib/generated/azure_mgmt_stor_simple8000_series/models/network_adapter_list.rb +52 -0
  131. data/lib/generated/azure_mgmt_stor_simple8000_series/models/network_adapters.rb +126 -0
  132. data/lib/generated/azure_mgmt_stor_simple8000_series/models/network_interface_data0settings.rb +54 -0
  133. data/lib/generated/azure_mgmt_stor_simple8000_series/models/network_mode.rb +18 -0
  134. data/lib/generated/azure_mgmt_stor_simple8000_series/models/network_settings.rb +99 -0
  135. data/lib/generated/azure_mgmt_stor_simple8000_series/models/network_settings_patch.rb +56 -0
  136. data/lib/generated/azure_mgmt_stor_simple8000_series/models/nic_ipv4.rb +84 -0
  137. data/lib/generated/azure_mgmt_stor_simple8000_series/models/nic_ipv6.rb +84 -0
  138. data/lib/generated/azure_mgmt_stor_simple8000_series/models/operation_status.rb +18 -0
  139. data/lib/generated/azure_mgmt_stor_simple8000_series/models/owner_ship_status.rb +16 -0
  140. data/lib/generated/azure_mgmt_stor_simple8000_series/models/public_key.rb +44 -0
  141. data/lib/generated/azure_mgmt_stor_simple8000_series/models/recurrence_type.rb +18 -0
  142. data/lib/generated/azure_mgmt_stor_simple8000_series/models/remote_management_mode_configuration.rb +18 -0
  143. data/lib/generated/azure_mgmt_stor_simple8000_series/models/remote_management_settings.rb +57 -0
  144. data/lib/generated/azure_mgmt_stor_simple8000_series/models/remote_management_settings_patch.rb +47 -0
  145. data/lib/generated/azure_mgmt_stor_simple8000_series/models/resource.rb +94 -0
  146. data/lib/generated/azure_mgmt_stor_simple8000_series/models/schedule_recurrence.rb +75 -0
  147. data/lib/generated/azure_mgmt_stor_simple8000_series/models/schedule_status.rb +16 -0
  148. data/lib/generated/azure_mgmt_stor_simple8000_series/models/scheduled_backup_status.rb +16 -0
  149. data/lib/generated/azure_mgmt_stor_simple8000_series/models/secondary_dnssettings.rb +51 -0
  150. data/lib/generated/azure_mgmt_stor_simple8000_series/models/security_settings.rb +90 -0
  151. data/lib/generated/azure_mgmt_stor_simple8000_series/models/security_settings_patch.rb +89 -0
  152. data/lib/generated/azure_mgmt_stor_simple8000_series/models/send_test_alert_email_request.rb +52 -0
  153. data/lib/generated/azure_mgmt_stor_simple8000_series/models/ssl_status.rb +16 -0
  154. data/lib/generated/azure_mgmt_stor_simple8000_series/models/storage_account_credential.rb +112 -0
  155. data/lib/generated/azure_mgmt_stor_simple8000_series/models/storage_account_credential_list.rb +52 -0
  156. data/lib/generated/azure_mgmt_stor_simple8000_series/models/symmetric_encrypted_secret.rb +68 -0
  157. data/lib/generated/azure_mgmt_stor_simple8000_series/models/target_eligibility_error_message.rb +74 -0
  158. data/lib/generated/azure_mgmt_stor_simple8000_series/models/target_eligibility_result.rb +66 -0
  159. data/lib/generated/azure_mgmt_stor_simple8000_series/models/target_eligibility_result_code.rb +21 -0
  160. data/lib/generated/azure_mgmt_stor_simple8000_series/models/target_eligibility_status.rb +16 -0
  161. data/lib/generated/azure_mgmt_stor_simple8000_series/models/time.rb +76 -0
  162. data/lib/generated/azure_mgmt_stor_simple8000_series/models/time_settings.rb +106 -0
  163. data/lib/generated/azure_mgmt_stor_simple8000_series/models/updates.rb +107 -0
  164. data/lib/generated/azure_mgmt_stor_simple8000_series/models/virtual_machine_api_type.rb +16 -0
  165. data/lib/generated/azure_mgmt_stor_simple8000_series/models/vm_image.rb +84 -0
  166. data/lib/generated/azure_mgmt_stor_simple8000_series/models/volume.rb +187 -0
  167. data/lib/generated/azure_mgmt_stor_simple8000_series/models/volume_container.rb +161 -0
  168. data/lib/generated/azure_mgmt_stor_simple8000_series/models/volume_container_failover_metadata.rb +64 -0
  169. data/lib/generated/azure_mgmt_stor_simple8000_series/models/volume_container_list.rb +52 -0
  170. data/lib/generated/azure_mgmt_stor_simple8000_series/models/volume_failover_metadata.rb +109 -0
  171. data/lib/generated/azure_mgmt_stor_simple8000_series/models/volume_list.rb +52 -0
  172. data/lib/generated/azure_mgmt_stor_simple8000_series/models/volume_status.rb +16 -0
  173. data/lib/generated/azure_mgmt_stor_simple8000_series/models/volume_type.rb +17 -0
  174. data/lib/generated/azure_mgmt_stor_simple8000_series/models/webproxy_settings.rb +66 -0
  175. data/lib/generated/azure_mgmt_stor_simple8000_series/module_definition.rb +8 -0
  176. data/lib/generated/azure_mgmt_stor_simple8000_series/operations.rb +220 -0
  177. data/lib/generated/azure_mgmt_stor_simple8000_series/stor_simple8000series_management_client.rb +189 -0
  178. data/lib/generated/azure_mgmt_stor_simple8000_series/storage_account_credentials.rb +507 -0
  179. data/lib/generated/azure_mgmt_stor_simple8000_series/version.rb +8 -0
  180. data/lib/generated/azure_mgmt_stor_simple8000_series/volume_containers.rb +717 -0
  181. data/lib/generated/azure_mgmt_stor_simple8000_series/volumes.rb +835 -0
  182. data/lib/generated/azure_mgmt_stor_simple8000_series.rb +202 -0
  183. metadata +295 -0
@@ -0,0 +1,8 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::StorSimple8000Series
7
+ VERSION = '0.14.0'
8
+ end
@@ -0,0 +1,717 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::StorSimple8000Series
7
+ #
8
+ # VolumeContainers
9
+ #
10
+ class VolumeContainers
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the VolumeContainers class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [StorSimple8000SeriesManagementClient] reference to the StorSimple8000SeriesManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Gets all the volume containers in a device.
26
+ #
27
+ # @param device_name [String] The device name
28
+ # @param resource_group_name [String] The resource group name
29
+ # @param manager_name [String] The manager name
30
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
31
+ # will be added to the HTTP request.
32
+ #
33
+ # @return [VolumeContainerList] operation results.
34
+ #
35
+ def list_by_device(device_name, resource_group_name, manager_name, custom_headers = nil)
36
+ response = list_by_device_async(device_name, resource_group_name, manager_name, custom_headers).value!
37
+ response.body unless response.nil?
38
+ end
39
+
40
+ #
41
+ # Gets all the volume containers in a device.
42
+ #
43
+ # @param device_name [String] The device name
44
+ # @param resource_group_name [String] The resource group name
45
+ # @param manager_name [String] The manager name
46
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
47
+ # will be added to the HTTP request.
48
+ #
49
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
50
+ #
51
+ def list_by_device_with_http_info(device_name, resource_group_name, manager_name, custom_headers = nil)
52
+ list_by_device_async(device_name, resource_group_name, manager_name, custom_headers).value!
53
+ end
54
+
55
+ #
56
+ # Gets all the volume containers in a device.
57
+ #
58
+ # @param device_name [String] The device name
59
+ # @param resource_group_name [String] The resource group name
60
+ # @param manager_name [String] The manager name
61
+ # @param [Hash{String => String}] A hash of custom headers that will be added
62
+ # to the HTTP request.
63
+ #
64
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
65
+ #
66
+ def list_by_device_async(device_name, resource_group_name, manager_name, custom_headers = nil)
67
+ fail ArgumentError, 'device_name is nil' if device_name.nil?
68
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
69
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
70
+ fail ArgumentError, 'manager_name is nil' if manager_name.nil?
71
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
72
+
73
+
74
+ request_headers = {}
75
+
76
+ # Set Headers
77
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
78
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
79
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorSimple/managers/{managerName}/devices/{deviceName}/volumeContainers'
80
+
81
+ request_url = @base_url || @client.base_url
82
+
83
+ options = {
84
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
85
+ skip_encoding_path_params: {'deviceName' => device_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name},
86
+ skip_encoding_query_params: {'api-version' => @client.api_version},
87
+ headers: request_headers.merge(custom_headers || {}),
88
+ base_url: request_url
89
+ }
90
+ promise = @client.make_request_async(:get, path_template, options)
91
+
92
+ promise = promise.then do |result|
93
+ http_response = result.response
94
+ status_code = http_response.status
95
+ response_content = http_response.body
96
+ unless status_code == 200
97
+ error_model = JSON.load(response_content)
98
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
99
+ end
100
+
101
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
102
+ # Deserialize Response
103
+ if status_code == 200
104
+ begin
105
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
106
+ result_mapper = Azure::ARM::StorSimple8000Series::Models::VolumeContainerList.mapper()
107
+ result.body = @client.deserialize(result_mapper, parsed_response)
108
+ rescue Exception => e
109
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
110
+ end
111
+ end
112
+
113
+ result
114
+ end
115
+
116
+ promise.execute
117
+ end
118
+
119
+ #
120
+ # Gets the properties of the specified volume container name.
121
+ #
122
+ # @param device_name [String] The device name
123
+ # @param volume_container_name [String] The name of the volume container.
124
+ # @param resource_group_name [String] The resource group name
125
+ # @param manager_name [String] The manager name
126
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
127
+ # will be added to the HTTP request.
128
+ #
129
+ # @return [VolumeContainer] operation results.
130
+ #
131
+ def get(device_name, volume_container_name, resource_group_name, manager_name, custom_headers = nil)
132
+ response = get_async(device_name, volume_container_name, resource_group_name, manager_name, custom_headers).value!
133
+ response.body unless response.nil?
134
+ end
135
+
136
+ #
137
+ # Gets the properties of the specified volume container name.
138
+ #
139
+ # @param device_name [String] The device name
140
+ # @param volume_container_name [String] The name of the volume container.
141
+ # @param resource_group_name [String] The resource group name
142
+ # @param manager_name [String] The manager name
143
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
144
+ # will be added to the HTTP request.
145
+ #
146
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
147
+ #
148
+ def get_with_http_info(device_name, volume_container_name, resource_group_name, manager_name, custom_headers = nil)
149
+ get_async(device_name, volume_container_name, resource_group_name, manager_name, custom_headers).value!
150
+ end
151
+
152
+ #
153
+ # Gets the properties of the specified volume container name.
154
+ #
155
+ # @param device_name [String] The device name
156
+ # @param volume_container_name [String] The name of the volume container.
157
+ # @param resource_group_name [String] The resource group name
158
+ # @param manager_name [String] The manager name
159
+ # @param [Hash{String => String}] A hash of custom headers that will be added
160
+ # to the HTTP request.
161
+ #
162
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
163
+ #
164
+ def get_async(device_name, volume_container_name, resource_group_name, manager_name, custom_headers = nil)
165
+ fail ArgumentError, 'device_name is nil' if device_name.nil?
166
+ fail ArgumentError, 'volume_container_name is nil' if volume_container_name.nil?
167
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
168
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
169
+ fail ArgumentError, 'manager_name is nil' if manager_name.nil?
170
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
171
+
172
+
173
+ request_headers = {}
174
+
175
+ # Set Headers
176
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
177
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
178
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorSimple/managers/{managerName}/devices/{deviceName}/volumeContainers/{volumeContainerName}'
179
+
180
+ request_url = @base_url || @client.base_url
181
+
182
+ options = {
183
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
184
+ skip_encoding_path_params: {'deviceName' => device_name,'volumeContainerName' => volume_container_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name},
185
+ skip_encoding_query_params: {'api-version' => @client.api_version},
186
+ headers: request_headers.merge(custom_headers || {}),
187
+ base_url: request_url
188
+ }
189
+ promise = @client.make_request_async(:get, path_template, options)
190
+
191
+ promise = promise.then do |result|
192
+ http_response = result.response
193
+ status_code = http_response.status
194
+ response_content = http_response.body
195
+ unless status_code == 200
196
+ error_model = JSON.load(response_content)
197
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
198
+ end
199
+
200
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
201
+ # Deserialize Response
202
+ if status_code == 200
203
+ begin
204
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
205
+ result_mapper = Azure::ARM::StorSimple8000Series::Models::VolumeContainer.mapper()
206
+ result.body = @client.deserialize(result_mapper, parsed_response)
207
+ rescue Exception => e
208
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
209
+ end
210
+ end
211
+
212
+ result
213
+ end
214
+
215
+ promise.execute
216
+ end
217
+
218
+ #
219
+ # Creates or updates the volume container.
220
+ #
221
+ # @param device_name [String] The device name
222
+ # @param volume_container_name [String] The name of the volume container.
223
+ # @param parameters [VolumeContainer] The volume container to be added or
224
+ # updated.
225
+ # @param resource_group_name [String] The resource group name
226
+ # @param manager_name [String] The manager name
227
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
228
+ # will be added to the HTTP request.
229
+ #
230
+ # @return [VolumeContainer] operation results.
231
+ #
232
+ def create_or_update(device_name, volume_container_name, parameters, resource_group_name, manager_name, custom_headers = nil)
233
+ response = create_or_update_async(device_name, volume_container_name, parameters, resource_group_name, manager_name, custom_headers).value!
234
+ response.body unless response.nil?
235
+ end
236
+
237
+ #
238
+ # @param device_name [String] The device name
239
+ # @param volume_container_name [String] The name of the volume container.
240
+ # @param parameters [VolumeContainer] The volume container to be added or
241
+ # updated.
242
+ # @param resource_group_name [String] The resource group name
243
+ # @param manager_name [String] The manager name
244
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
245
+ # will be added to the HTTP request.
246
+ #
247
+ # @return [Concurrent::Promise] promise which provides async access to http
248
+ # response.
249
+ #
250
+ def create_or_update_async(device_name, volume_container_name, parameters, resource_group_name, manager_name, custom_headers = nil)
251
+ # Send request
252
+ promise = begin_create_or_update_async(device_name, volume_container_name, parameters, resource_group_name, manager_name, custom_headers)
253
+
254
+ promise = promise.then do |response|
255
+ # Defining deserialization method.
256
+ deserialize_method = lambda do |parsed_response|
257
+ result_mapper = Azure::ARM::StorSimple8000Series::Models::VolumeContainer.mapper()
258
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
259
+ end
260
+
261
+ # Waiting for response.
262
+ @client.get_long_running_operation_result(response, deserialize_method)
263
+ end
264
+
265
+ promise
266
+ end
267
+
268
+ #
269
+ # Deletes the volume container.
270
+ #
271
+ # @param device_name [String] The device name
272
+ # @param volume_container_name [String] The name of the volume container.
273
+ # @param resource_group_name [String] The resource group name
274
+ # @param manager_name [String] The manager name
275
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
276
+ # will be added to the HTTP request.
277
+ #
278
+ def delete(device_name, volume_container_name, resource_group_name, manager_name, custom_headers = nil)
279
+ response = delete_async(device_name, volume_container_name, resource_group_name, manager_name, custom_headers).value!
280
+ nil
281
+ end
282
+
283
+ #
284
+ # @param device_name [String] The device name
285
+ # @param volume_container_name [String] The name of the volume container.
286
+ # @param resource_group_name [String] The resource group name
287
+ # @param manager_name [String] The manager name
288
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
289
+ # will be added to the HTTP request.
290
+ #
291
+ # @return [Concurrent::Promise] promise which provides async access to http
292
+ # response.
293
+ #
294
+ def delete_async(device_name, volume_container_name, resource_group_name, manager_name, custom_headers = nil)
295
+ # Send request
296
+ promise = begin_delete_async(device_name, volume_container_name, resource_group_name, manager_name, custom_headers)
297
+
298
+ promise = promise.then do |response|
299
+ # Defining deserialization method.
300
+ deserialize_method = lambda do |parsed_response|
301
+ end
302
+
303
+ # Waiting for response.
304
+ @client.get_long_running_operation_result(response, deserialize_method)
305
+ end
306
+
307
+ promise
308
+ end
309
+
310
+ #
311
+ # Gets the metrics for the specified volume container.
312
+ #
313
+ # @param device_name [String] The device name
314
+ # @param volume_container_name [String] The volume container name.
315
+ # @param resource_group_name [String] The resource group name
316
+ # @param manager_name [String] The manager name
317
+ # @param filter [String] OData Filter options
318
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
319
+ # will be added to the HTTP request.
320
+ #
321
+ # @return [MetricList] operation results.
322
+ #
323
+ def list_metrics(device_name, volume_container_name, resource_group_name, manager_name, filter, custom_headers = nil)
324
+ response = list_metrics_async(device_name, volume_container_name, resource_group_name, manager_name, filter, custom_headers).value!
325
+ response.body unless response.nil?
326
+ end
327
+
328
+ #
329
+ # Gets the metrics for the specified volume container.
330
+ #
331
+ # @param device_name [String] The device name
332
+ # @param volume_container_name [String] The volume container name.
333
+ # @param resource_group_name [String] The resource group name
334
+ # @param manager_name [String] The manager name
335
+ # @param filter [String] OData Filter options
336
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
337
+ # will be added to the HTTP request.
338
+ #
339
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
340
+ #
341
+ def list_metrics_with_http_info(device_name, volume_container_name, resource_group_name, manager_name, filter, custom_headers = nil)
342
+ list_metrics_async(device_name, volume_container_name, resource_group_name, manager_name, filter, custom_headers).value!
343
+ end
344
+
345
+ #
346
+ # Gets the metrics for the specified volume container.
347
+ #
348
+ # @param device_name [String] The device name
349
+ # @param volume_container_name [String] The volume container name.
350
+ # @param resource_group_name [String] The resource group name
351
+ # @param manager_name [String] The manager name
352
+ # @param filter [String] OData Filter options
353
+ # @param [Hash{String => String}] A hash of custom headers that will be added
354
+ # to the HTTP request.
355
+ #
356
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
357
+ #
358
+ def list_metrics_async(device_name, volume_container_name, resource_group_name, manager_name, filter, custom_headers = nil)
359
+ fail ArgumentError, 'device_name is nil' if device_name.nil?
360
+ fail ArgumentError, 'volume_container_name is nil' if volume_container_name.nil?
361
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
362
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
363
+ fail ArgumentError, 'manager_name is nil' if manager_name.nil?
364
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
365
+ fail ArgumentError, 'filter is nil' if filter.nil?
366
+
367
+
368
+ request_headers = {}
369
+
370
+ # Set Headers
371
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
372
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
373
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorSimple/managers/{managerName}/devices/{deviceName}/volumeContainers/{volumeContainerName}/metrics'
374
+
375
+ request_url = @base_url || @client.base_url
376
+
377
+ options = {
378
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
379
+ skip_encoding_path_params: {'deviceName' => device_name,'volumeContainerName' => volume_container_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name},
380
+ query_params: {'$filter' => filter},
381
+ skip_encoding_query_params: {'api-version' => @client.api_version},
382
+ headers: request_headers.merge(custom_headers || {}),
383
+ base_url: request_url
384
+ }
385
+ promise = @client.make_request_async(:get, path_template, options)
386
+
387
+ promise = promise.then do |result|
388
+ http_response = result.response
389
+ status_code = http_response.status
390
+ response_content = http_response.body
391
+ unless status_code == 200
392
+ error_model = JSON.load(response_content)
393
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
394
+ end
395
+
396
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
397
+ # Deserialize Response
398
+ if status_code == 200
399
+ begin
400
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
401
+ result_mapper = Azure::ARM::StorSimple8000Series::Models::MetricList.mapper()
402
+ result.body = @client.deserialize(result_mapper, parsed_response)
403
+ rescue Exception => e
404
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
405
+ end
406
+ end
407
+
408
+ result
409
+ end
410
+
411
+ promise.execute
412
+ end
413
+
414
+ #
415
+ # Gets the metric definitions for the specified volume container.
416
+ #
417
+ # @param device_name [String] The device name
418
+ # @param volume_container_name [String] The volume container name.
419
+ # @param resource_group_name [String] The resource group name
420
+ # @param manager_name [String] The manager name
421
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
422
+ # will be added to the HTTP request.
423
+ #
424
+ # @return [MetricDefinitionList] operation results.
425
+ #
426
+ def list_metric_definition(device_name, volume_container_name, resource_group_name, manager_name, custom_headers = nil)
427
+ response = list_metric_definition_async(device_name, volume_container_name, resource_group_name, manager_name, custom_headers).value!
428
+ response.body unless response.nil?
429
+ end
430
+
431
+ #
432
+ # Gets the metric definitions for the specified volume container.
433
+ #
434
+ # @param device_name [String] The device name
435
+ # @param volume_container_name [String] The volume container name.
436
+ # @param resource_group_name [String] The resource group name
437
+ # @param manager_name [String] The manager name
438
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
439
+ # will be added to the HTTP request.
440
+ #
441
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
442
+ #
443
+ def list_metric_definition_with_http_info(device_name, volume_container_name, resource_group_name, manager_name, custom_headers = nil)
444
+ list_metric_definition_async(device_name, volume_container_name, resource_group_name, manager_name, custom_headers).value!
445
+ end
446
+
447
+ #
448
+ # Gets the metric definitions for the specified volume container.
449
+ #
450
+ # @param device_name [String] The device name
451
+ # @param volume_container_name [String] The volume container name.
452
+ # @param resource_group_name [String] The resource group name
453
+ # @param manager_name [String] The manager name
454
+ # @param [Hash{String => String}] A hash of custom headers that will be added
455
+ # to the HTTP request.
456
+ #
457
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
458
+ #
459
+ def list_metric_definition_async(device_name, volume_container_name, resource_group_name, manager_name, custom_headers = nil)
460
+ fail ArgumentError, 'device_name is nil' if device_name.nil?
461
+ fail ArgumentError, 'volume_container_name is nil' if volume_container_name.nil?
462
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
463
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
464
+ fail ArgumentError, 'manager_name is nil' if manager_name.nil?
465
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
466
+
467
+
468
+ request_headers = {}
469
+
470
+ # Set Headers
471
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
472
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
473
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorSimple/managers/{managerName}/devices/{deviceName}/volumeContainers/{volumeContainerName}/metricsDefinitions'
474
+
475
+ request_url = @base_url || @client.base_url
476
+
477
+ options = {
478
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
479
+ skip_encoding_path_params: {'deviceName' => device_name,'volumeContainerName' => volume_container_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name},
480
+ skip_encoding_query_params: {'api-version' => @client.api_version},
481
+ headers: request_headers.merge(custom_headers || {}),
482
+ base_url: request_url
483
+ }
484
+ promise = @client.make_request_async(:get, path_template, options)
485
+
486
+ promise = promise.then do |result|
487
+ http_response = result.response
488
+ status_code = http_response.status
489
+ response_content = http_response.body
490
+ unless status_code == 200
491
+ error_model = JSON.load(response_content)
492
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
493
+ end
494
+
495
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
496
+ # Deserialize Response
497
+ if status_code == 200
498
+ begin
499
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
500
+ result_mapper = Azure::ARM::StorSimple8000Series::Models::MetricDefinitionList.mapper()
501
+ result.body = @client.deserialize(result_mapper, parsed_response)
502
+ rescue Exception => e
503
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
504
+ end
505
+ end
506
+
507
+ result
508
+ end
509
+
510
+ promise.execute
511
+ end
512
+
513
+ #
514
+ # Creates or updates the volume container.
515
+ #
516
+ # @param device_name [String] The device name
517
+ # @param volume_container_name [String] The name of the volume container.
518
+ # @param parameters [VolumeContainer] The volume container to be added or
519
+ # updated.
520
+ # @param resource_group_name [String] The resource group name
521
+ # @param manager_name [String] The manager name
522
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
523
+ # will be added to the HTTP request.
524
+ #
525
+ # @return [VolumeContainer] operation results.
526
+ #
527
+ def begin_create_or_update(device_name, volume_container_name, parameters, resource_group_name, manager_name, custom_headers = nil)
528
+ response = begin_create_or_update_async(device_name, volume_container_name, parameters, resource_group_name, manager_name, custom_headers).value!
529
+ response.body unless response.nil?
530
+ end
531
+
532
+ #
533
+ # Creates or updates the volume container.
534
+ #
535
+ # @param device_name [String] The device name
536
+ # @param volume_container_name [String] The name of the volume container.
537
+ # @param parameters [VolumeContainer] The volume container to be added or
538
+ # updated.
539
+ # @param resource_group_name [String] The resource group name
540
+ # @param manager_name [String] The manager name
541
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
542
+ # will be added to the HTTP request.
543
+ #
544
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
545
+ #
546
+ def begin_create_or_update_with_http_info(device_name, volume_container_name, parameters, resource_group_name, manager_name, custom_headers = nil)
547
+ begin_create_or_update_async(device_name, volume_container_name, parameters, resource_group_name, manager_name, custom_headers).value!
548
+ end
549
+
550
+ #
551
+ # Creates or updates the volume container.
552
+ #
553
+ # @param device_name [String] The device name
554
+ # @param volume_container_name [String] The name of the volume container.
555
+ # @param parameters [VolumeContainer] The volume container to be added or
556
+ # updated.
557
+ # @param resource_group_name [String] The resource group name
558
+ # @param manager_name [String] The manager name
559
+ # @param [Hash{String => String}] A hash of custom headers that will be added
560
+ # to the HTTP request.
561
+ #
562
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
563
+ #
564
+ def begin_create_or_update_async(device_name, volume_container_name, parameters, resource_group_name, manager_name, custom_headers = nil)
565
+ fail ArgumentError, 'device_name is nil' if device_name.nil?
566
+ fail ArgumentError, 'volume_container_name is nil' if volume_container_name.nil?
567
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
568
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
569
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
570
+ fail ArgumentError, 'manager_name is nil' if manager_name.nil?
571
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
572
+
573
+
574
+ request_headers = {}
575
+
576
+ # Set Headers
577
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
578
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
579
+
580
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
581
+
582
+ # Serialize Request
583
+ request_mapper = Azure::ARM::StorSimple8000Series::Models::VolumeContainer.mapper()
584
+ request_content = @client.serialize(request_mapper, parameters)
585
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
586
+
587
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorSimple/managers/{managerName}/devices/{deviceName}/volumeContainers/{volumeContainerName}'
588
+
589
+ request_url = @base_url || @client.base_url
590
+
591
+ options = {
592
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
593
+ skip_encoding_path_params: {'deviceName' => device_name,'volumeContainerName' => volume_container_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name},
594
+ skip_encoding_query_params: {'api-version' => @client.api_version},
595
+ body: request_content,
596
+ headers: request_headers.merge(custom_headers || {}),
597
+ base_url: request_url
598
+ }
599
+ promise = @client.make_request_async(:put, path_template, options)
600
+
601
+ promise = promise.then do |result|
602
+ http_response = result.response
603
+ status_code = http_response.status
604
+ response_content = http_response.body
605
+ unless status_code == 200 || status_code == 202
606
+ error_model = JSON.load(response_content)
607
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
608
+ end
609
+
610
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
611
+ # Deserialize Response
612
+ if status_code == 200
613
+ begin
614
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
615
+ result_mapper = Azure::ARM::StorSimple8000Series::Models::VolumeContainer.mapper()
616
+ result.body = @client.deserialize(result_mapper, parsed_response)
617
+ rescue Exception => e
618
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
619
+ end
620
+ end
621
+
622
+ result
623
+ end
624
+
625
+ promise.execute
626
+ end
627
+
628
+ #
629
+ # Deletes the volume container.
630
+ #
631
+ # @param device_name [String] The device name
632
+ # @param volume_container_name [String] The name of the volume container.
633
+ # @param resource_group_name [String] The resource group name
634
+ # @param manager_name [String] The manager name
635
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
636
+ # will be added to the HTTP request.
637
+ #
638
+ #
639
+ def begin_delete(device_name, volume_container_name, resource_group_name, manager_name, custom_headers = nil)
640
+ response = begin_delete_async(device_name, volume_container_name, resource_group_name, manager_name, custom_headers).value!
641
+ nil
642
+ end
643
+
644
+ #
645
+ # Deletes the volume container.
646
+ #
647
+ # @param device_name [String] The device name
648
+ # @param volume_container_name [String] The name of the volume container.
649
+ # @param resource_group_name [String] The resource group name
650
+ # @param manager_name [String] The manager name
651
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
652
+ # will be added to the HTTP request.
653
+ #
654
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
655
+ #
656
+ def begin_delete_with_http_info(device_name, volume_container_name, resource_group_name, manager_name, custom_headers = nil)
657
+ begin_delete_async(device_name, volume_container_name, resource_group_name, manager_name, custom_headers).value!
658
+ end
659
+
660
+ #
661
+ # Deletes the volume container.
662
+ #
663
+ # @param device_name [String] The device name
664
+ # @param volume_container_name [String] The name of the volume container.
665
+ # @param resource_group_name [String] The resource group name
666
+ # @param manager_name [String] The manager name
667
+ # @param [Hash{String => String}] A hash of custom headers that will be added
668
+ # to the HTTP request.
669
+ #
670
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
671
+ #
672
+ def begin_delete_async(device_name, volume_container_name, resource_group_name, manager_name, custom_headers = nil)
673
+ fail ArgumentError, 'device_name is nil' if device_name.nil?
674
+ fail ArgumentError, 'volume_container_name is nil' if volume_container_name.nil?
675
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
676
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
677
+ fail ArgumentError, 'manager_name is nil' if manager_name.nil?
678
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
679
+
680
+
681
+ request_headers = {}
682
+
683
+ # Set Headers
684
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
685
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
686
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorSimple/managers/{managerName}/devices/{deviceName}/volumeContainers/{volumeContainerName}'
687
+
688
+ request_url = @base_url || @client.base_url
689
+
690
+ options = {
691
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
692
+ skip_encoding_path_params: {'deviceName' => device_name,'volumeContainerName' => volume_container_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'managerName' => manager_name},
693
+ skip_encoding_query_params: {'api-version' => @client.api_version},
694
+ headers: request_headers.merge(custom_headers || {}),
695
+ base_url: request_url
696
+ }
697
+ promise = @client.make_request_async(:delete, path_template, options)
698
+
699
+ promise = promise.then do |result|
700
+ http_response = result.response
701
+ status_code = http_response.status
702
+ response_content = http_response.body
703
+ unless status_code == 202 || status_code == 204
704
+ error_model = JSON.load(response_content)
705
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
706
+ end
707
+
708
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
709
+
710
+ result
711
+ end
712
+
713
+ promise.execute
714
+ end
715
+
716
+ end
717
+ end