azure_mgmt_recovery_services_site_recovery 0.14.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (353) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +21 -0
  3. data/lib/azure_mgmt_recovery_services_site_recovery.rb +7 -0
  4. data/lib/generated/azure_mgmt_recovery_services_site_recovery.rb +372 -0
  5. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2aapply_recovery_point_input.rb +48 -0
  6. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2acontainer_creation_input.rb +48 -0
  7. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2aenable_protection_input.rb +136 -0
  8. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2aevent_details.rb +108 -0
  9. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2afailover_provider_input.rb +71 -0
  10. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2apolicy_creation_input.rb +92 -0
  11. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2apolicy_details.rb +100 -0
  12. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2aprotected_disk_details.rb +168 -0
  13. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2aprotected_managed_disk_details.rb +158 -0
  14. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2areplication_details.rb +373 -0
  15. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2areprotect_input.rb +117 -0
  16. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2arp_recovery_point_type.rb +18 -0
  17. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2aswitch_protection_input.rb +136 -0
  18. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2aupdate_replication_protected_item_input.rb +68 -0
  19. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2avm_disk_input_details.rb +64 -0
  20. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2avm_managed_disk_input_details.rb +64 -0
  21. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/add_vcenter_request.rb +46 -0
  22. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/add_vcenter_request_properties.rb +86 -0
  23. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/alert.rb +76 -0
  24. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/alert_collection.rb +94 -0
  25. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/alert_properties.rb +72 -0
  26. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/alternate_location_recovery_option.rb +16 -0
  27. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/apply_recovery_point_input.rb +46 -0
  28. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/apply_recovery_point_input_properties.rb +58 -0
  29. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/apply_recovery_point_provider_specific_input.rb +47 -0
  30. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/armexception.rb +93 -0
  31. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/armexception_details.rb +104 -0
  32. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/arminner_error.rb +186 -0
  33. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/asr_job_details.rb +62 -0
  34. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/asrtask.rb +182 -0
  35. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/automation_runbook_task_details.rb +139 -0
  36. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/azure_fabric_creation_input.rb +58 -0
  37. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/azure_fabric_specific_details.rb +75 -0
  38. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/azure_to_azure_create_network_mapping_input.rb +59 -0
  39. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/azure_to_azure_network_mapping_settings.rb +68 -0
  40. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/azure_to_azure_update_network_mapping_input.rb +58 -0
  41. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/azure_to_azure_vm_synced_config_details.rb +87 -0
  42. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/azure_vm_disk_details.rb +104 -0
  43. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/configuration_settings.rb +47 -0
  44. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/configure_alert_request.rb +46 -0
  45. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/configure_alert_request_properties.rb +72 -0
  46. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/consistency_check_task_details.rb +68 -0
  47. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/create_network_mapping_input.rb +46 -0
  48. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/create_network_mapping_input_properties.rb +68 -0
  49. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/create_policy_input.rb +45 -0
  50. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/create_policy_input_properties.rb +47 -0
  51. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/create_protection_container_input.rb +46 -0
  52. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/create_protection_container_input_properties.rb +55 -0
  53. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/create_protection_container_mapping_input.rb +46 -0
  54. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/create_protection_container_mapping_input_properties.rb +67 -0
  55. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/create_recovery_plan_input.rb +46 -0
  56. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/create_recovery_plan_input_properties.rb +84 -0
  57. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/current_scenario_details.rb +64 -0
  58. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/data_store.rb +84 -0
  59. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/data_sync_status.rb +16 -0
  60. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/disable_protection_input.rb +46 -0
  61. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/disable_protection_input_properties.rb +61 -0
  62. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/disable_protection_provider_specific_input.rb +45 -0
  63. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/disable_protection_reason.rb +16 -0
  64. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/discover_protectable_item_request.rb +46 -0
  65. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/discover_protectable_item_request_properties.rb +65 -0
  66. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/disk_details.rb +74 -0
  67. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/disk_volume_details.rb +54 -0
  68. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/display.rb +100 -0
  69. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/enable_protection_input.rb +46 -0
  70. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/enable_protection_input_properties.rb +71 -0
  71. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/enable_protection_provider_specific_input.rb +49 -0
  72. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/encryption_details.rb +64 -0
  73. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/event.rb +76 -0
  74. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/event_collection.rb +94 -0
  75. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/event_properties.rb +151 -0
  76. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/event_provider_specific_details.rb +50 -0
  77. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/event_query_parameter.rb +107 -0
  78. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/event_specific_details.rb +45 -0
  79. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/export_job_details.rb +82 -0
  80. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/fabric.rb +76 -0
  81. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/fabric_collection.rb +94 -0
  82. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/fabric_creation_input.rb +45 -0
  83. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/fabric_creation_input_properties.rb +48 -0
  84. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/fabric_properties.rb +127 -0
  85. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/fabric_replication_group_task_details.rb +79 -0
  86. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/fabric_specific_create_network_mapping_input.rb +47 -0
  87. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/fabric_specific_creation_input.rb +46 -0
  88. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/fabric_specific_details.rb +49 -0
  89. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/fabric_specific_update_network_mapping_input.rb +47 -0
  90. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/failover_deployment_model.rb +17 -0
  91. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/failover_job_details.rb +81 -0
  92. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/failover_process_server_request.rb +46 -0
  93. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/failover_process_server_request_properties.rb +92 -0
  94. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/failover_replication_protected_item_details.rb +124 -0
  95. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/group_task_details.rb +66 -0
  96. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/health_error.rb +152 -0
  97. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/health_error_category.rb +17 -0
  98. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/health_error_summary.rb +120 -0
  99. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica2012event_details.rb +88 -0
  100. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica2012r2event_details.rb +88 -0
  101. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_apply_recovery_point_input.rb +79 -0
  102. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_enable_protection_input.rb +201 -0
  103. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_event_details.rb +78 -0
  104. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_failback_provider_input.rb +78 -0
  105. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_failover_provider_input.rb +90 -0
  106. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_policy_details.rb +112 -0
  107. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_policy_input.rb +120 -0
  108. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_replication_details.rb +281 -0
  109. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_reprotect_input.rb +109 -0
  110. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_rp_recovery_point_type.rb +17 -0
  111. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_update_replication_protected_item_input.rb +82 -0
  112. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_base_event_details.rb +88 -0
  113. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_base_policy_details.rb +151 -0
  114. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_base_replication_details.rb +135 -0
  115. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_blue_policy_details.rb +161 -0
  116. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_blue_policy_input.rb +161 -0
  117. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_blue_replication_details.rb +135 -0
  118. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_policy_details.rb +151 -0
  119. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_policy_input.rb +151 -0
  120. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_replication_details.rb +135 -0
  121. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vsite_details.rb +48 -0
  122. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vvirtual_machine_details.rb +97 -0
  123. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/identity_information.rb +117 -0
  124. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/identity_provider_type.rb +16 -0
  125. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_agent_details.rb +66 -0
  126. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2apply_recovery_point_input.rb +58 -0
  127. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2enable_protection_input.rb +211 -0
  128. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2event_details.rb +119 -0
  129. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2failover_provider_input.rb +70 -0
  130. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2policy_details.rb +100 -0
  131. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2policy_input.rb +102 -0
  132. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2protected_disk_details.rb +185 -0
  133. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2recovery_point_details.rb +64 -0
  134. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2replication_details.rb +573 -0
  135. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2reprotect_input.rb +126 -0
  136. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2update_replication_protected_item_input.rb +82 -0
  137. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_base_policy_details.rb +90 -0
  138. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_disable_protection_provider_specific_input.rb +60 -0
  139. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_disk_details.rb +102 -0
  140. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_disk_exclusion_input.rb +73 -0
  141. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_disk_signature_exclusion_options.rb +46 -0
  142. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_enable_protection_input.rb +156 -0
  143. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_failover_provider_input.rb +75 -0
  144. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_policy_details.rb +90 -0
  145. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_policy_input.rb +92 -0
  146. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_protected_disk_details.rb +185 -0
  147. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_replication_details.rb +472 -0
  148. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_reprotect_input.rb +136 -0
  149. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_v2rp_recovery_point_type.rb +18 -0
  150. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_volume_exclusion_options.rb +59 -0
  151. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/inconsistent_vm_details.rb +90 -0
  152. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/initial_replication_details.rb +54 -0
  153. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/inline_workflow_task_details.rb +80 -0
  154. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/input_endpoint.rb +74 -0
  155. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/job.rb +119 -0
  156. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/job_collection.rb +94 -0
  157. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/job_details.rb +68 -0
  158. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/job_entity.rb +95 -0
  159. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/job_error_details.rb +86 -0
  160. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/job_properties.rb +206 -0
  161. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/job_query_parameter.rb +98 -0
  162. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/job_status_event_details.rb +88 -0
  163. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/job_task_details.rb +60 -0
  164. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/license_type.rb +17 -0
  165. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/logical_network.rb +76 -0
  166. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/logical_network_collection.rb +94 -0
  167. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/logical_network_properties.rb +77 -0
  168. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/manual_action_task_details.rb +78 -0
  169. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/master_target_server.rb +179 -0
  170. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/method_call_status.rb +73 -0
  171. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/mobility_service_update.rb +65 -0
  172. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/multi_vm_sync_status.rb +16 -0
  173. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/network.rb +76 -0
  174. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/network_collection.rb +94 -0
  175. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/network_mapping.rb +82 -0
  176. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/network_mapping_collection.rb +98 -0
  177. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/network_mapping_fabric_specific_settings.rb +47 -0
  178. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/network_mapping_properties.rb +128 -0
  179. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/network_properties.rb +82 -0
  180. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/operations_discovery.rb +95 -0
  181. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/operations_discovery_collection.rb +94 -0
  182. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/osdetails.rb +94 -0
  183. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/osdisk_details.rb +64 -0
  184. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/planned_failover_input.rb +46 -0
  185. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/planned_failover_input_properties.rb +57 -0
  186. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/policy.rb +76 -0
  187. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/policy_collection.rb +94 -0
  188. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/policy_properties.rb +57 -0
  189. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/policy_provider_specific_details.rb +54 -0
  190. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/policy_provider_specific_input.rb +51 -0
  191. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/possible_operations_directions.rb +16 -0
  192. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/process_server.rb +294 -0
  193. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protectable_item.rb +76 -0
  194. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protectable_item_collection.rb +94 -0
  195. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protectable_item_properties.rb +123 -0
  196. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protected_items_query_parameter.rb +64 -0
  197. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protection_container.rb +76 -0
  198. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protection_container_collection.rb +94 -0
  199. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protection_container_fabric_specific_details.rb +45 -0
  200. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protection_container_mapping.rb +76 -0
  201. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protection_container_mapping_collection.rb +94 -0
  202. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protection_container_mapping_properties.rb +154 -0
  203. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protection_container_mapping_provider_specific_details.rb +46 -0
  204. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protection_container_properties.rb +106 -0
  205. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/provider_error.rb +84 -0
  206. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/provider_specific_failover_input.rb +49 -0
  207. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/provider_specific_recovery_point_details.rb +45 -0
  208. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/rcm_azure_migration_policy_details.rb +101 -0
  209. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan.rb +76 -0
  210. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_a2afailover_input.rb +72 -0
  211. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_action.rb +95 -0
  212. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_action_details.rb +47 -0
  213. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_action_location.rb +16 -0
  214. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_automation_runbook_action_details.rb +81 -0
  215. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_collection.rb +94 -0
  216. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_group.rb +100 -0
  217. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_group_task_details.rb +93 -0
  218. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_group_type.rb +17 -0
  219. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_hyper_vreplica_azure_failback_input.rb +73 -0
  220. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_hyper_vreplica_azure_failover_input.rb +92 -0
  221. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_in_mage_azure_v2failover_input.rb +82 -0
  222. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_in_mage_failover_input.rb +60 -0
  223. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_manual_action_details.rb +58 -0
  224. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_planned_failover_input.rb +46 -0
  225. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_planned_failover_input_properties.rb +68 -0
  226. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_properties.rb +207 -0
  227. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_protected_item.rb +54 -0
  228. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_provider_specific_failover_input.rb +50 -0
  229. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_script_action_details.rb +80 -0
  230. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_shutdown_group_task_details.rb +93 -0
  231. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_test_failover_cleanup_input.rb +46 -0
  232. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_test_failover_cleanup_input_properties.rb +45 -0
  233. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_test_failover_input.rb +46 -0
  234. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_test_failover_input_properties.rb +98 -0
  235. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_unplanned_failover_input.rb +46 -0
  236. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_unplanned_failover_input_properties.rb +81 -0
  237. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_point.rb +76 -0
  238. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_point_collection.rb +94 -0
  239. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_point_properties.rb +67 -0
  240. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_point_type.rb +17 -0
  241. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_services_provider.rb +76 -0
  242. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_services_provider_collection.rb +94 -0
  243. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_services_provider_properties.rb +191 -0
  244. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/remove_protection_container_mapping_input.rb +46 -0
  245. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/remove_protection_container_mapping_input_properties.rb +47 -0
  246. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/renew_certificate_input.rb +46 -0
  247. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/renew_certificate_input_properties.rb +44 -0
  248. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/replication_group_details.rb +48 -0
  249. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/replication_protected_item.rb +76 -0
  250. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/replication_protected_item_collection.rb +95 -0
  251. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/replication_protected_item_operation.rb +27 -0
  252. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/replication_protected_item_properties.rb +338 -0
  253. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/replication_provider_container_unmapping_input.rb +45 -0
  254. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/replication_provider_specific_container_creation_input.rb +46 -0
  255. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/replication_provider_specific_container_mapping_input.rb +45 -0
  256. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/replication_provider_specific_settings.rb +51 -0
  257. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/resource.rb +77 -0
  258. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/resource_health_summary.rb +64 -0
  259. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/resume_job_params.rb +45 -0
  260. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/resume_job_params_properties.rb +44 -0
  261. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/retention_volume.rb +74 -0
  262. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/reverse_replication_input.rb +46 -0
  263. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/reverse_replication_input_properties.rb +58 -0
  264. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/reverse_replication_provider_specific_input.rb +48 -0
  265. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/role_assignment.rb +84 -0
  266. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/rp_in_mage_recovery_point_type.rb +17 -0
  267. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/run_as_account.rb +54 -0
  268. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/san_enable_protection_input.rb +48 -0
  269. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/script_action_task_details.rb +89 -0
  270. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/service_error.rb +84 -0
  271. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/set_multi_vm_sync_status.rb +16 -0
  272. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/severity.rb +18 -0
  273. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/source_site_operations.rb +16 -0
  274. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/storage_classification.rb +77 -0
  275. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/storage_classification_collection.rb +94 -0
  276. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/storage_classification_mapping.rb +77 -0
  277. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/storage_classification_mapping_collection.rb +95 -0
  278. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/storage_classification_mapping_input.rb +46 -0
  279. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/storage_classification_mapping_properties.rb +44 -0
  280. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/storage_classification_properties.rb +44 -0
  281. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/storage_mapping_input_properties.rb +44 -0
  282. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/subnet.rb +71 -0
  283. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/switch_protection_input.rb +45 -0
  284. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/switch_protection_input_properties.rb +58 -0
  285. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/switch_protection_job_details.rb +72 -0
  286. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/switch_protection_provider_specific_input.rb +45 -0
  287. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/task_type_details.rb +52 -0
  288. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/test_failover_cleanup_input.rb +46 -0
  289. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/test_failover_cleanup_input_properties.rb +44 -0
  290. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/test_failover_input.rb +45 -0
  291. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/test_failover_input_properties.rb +88 -0
  292. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/test_failover_job_details.rb +132 -0
  293. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/unplanned_failover_input.rb +46 -0
  294. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/unplanned_failover_input_properties.rb +67 -0
  295. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_mobility_service_request.rb +46 -0
  296. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_mobility_service_request_properties.rb +44 -0
  297. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_network_mapping_input.rb +46 -0
  298. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_network_mapping_input_properties.rb +68 -0
  299. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_policy_input.rb +45 -0
  300. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_policy_input_properties.rb +47 -0
  301. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_recovery_plan_input.rb +46 -0
  302. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_recovery_plan_input_properties.rb +52 -0
  303. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_replication_protected_item_input.rb +46 -0
  304. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_replication_protected_item_input_properties.rb +131 -0
  305. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_replication_protected_item_provider_input.rb +48 -0
  306. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_vcenter_request.rb +46 -0
  307. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_vcenter_request_properties.rb +86 -0
  308. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vault_health_details.rb +76 -0
  309. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vault_health_properties.rb +76 -0
  310. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vcenter.rb +76 -0
  311. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vcenter_collection.rb +94 -0
  312. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vcenter_properties.rb +137 -0
  313. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/virtual_machine_task_details.rb +79 -0
  314. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vm_nic_updates_task_details.rb +78 -0
  315. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmm_details.rb +48 -0
  316. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmm_to_azure_create_network_mapping_input.rb +49 -0
  317. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmm_to_azure_network_mapping_settings.rb +48 -0
  318. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmm_to_azure_update_network_mapping_input.rb +49 -0
  319. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmm_to_vmm_create_network_mapping_input.rb +49 -0
  320. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmm_to_vmm_network_mapping_settings.rb +48 -0
  321. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmm_to_vmm_update_network_mapping_input.rb +49 -0
  322. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmnic_details.rb +154 -0
  323. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmnic_input_details.rb +74 -0
  324. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmware_cbt_policy_creation_input.rb +79 -0
  325. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmware_cbt_policy_details.rb +89 -0
  326. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmware_details.rb +376 -0
  327. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmware_v2fabric_creation_input.rb +48 -0
  328. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmware_v2fabric_specific_details.rb +68 -0
  329. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmware_virtual_machine_details.rb +168 -0
  330. data/lib/generated/azure_mgmt_recovery_services_site_recovery/module_definition.rb +8 -0
  331. data/lib/generated/azure_mgmt_recovery_services_site_recovery/operations.rb +230 -0
  332. data/lib/generated/azure_mgmt_recovery_services_site_recovery/recovery_points.rb +360 -0
  333. data/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_alert_settings.rb +442 -0
  334. data/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_events.rb +329 -0
  335. data/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_fabrics.rb +1299 -0
  336. data/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_jobs.rb +905 -0
  337. data/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_logical_networks.rb +335 -0
  338. data/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_network_mappings.rb +1012 -0
  339. data/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_networks.rb +541 -0
  340. data/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_policies.rb +752 -0
  341. data/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_protectable_items.rb +344 -0
  342. data/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_protected_items.rb +2757 -0
  343. data/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_protection_container_mappings.rb +1002 -0
  344. data/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_protection_containers.rb +1175 -0
  345. data/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_recovery_plans.rb +1639 -0
  346. data/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_recovery_services_providers.rb +967 -0
  347. data/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_storage_classification_mappings.rb +861 -0
  348. data/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_storage_classifications.rb +541 -0
  349. data/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_vault_health.rb +116 -0
  350. data/lib/generated/azure_mgmt_recovery_services_site_recovery/replicationv_centers.rb +999 -0
  351. data/lib/generated/azure_mgmt_recovery_services_site_recovery/site_recovery_management_client.rb +217 -0
  352. data/lib/generated/azure_mgmt_recovery_services_site_recovery/version.rb +8 -0
  353. metadata +466 -0
@@ -0,0 +1,1639 @@
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::RecoveryServicesSiteRecovery
7
+ #
8
+ # ReplicationRecoveryPlans
9
+ #
10
+ class ReplicationRecoveryPlans
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the ReplicationRecoveryPlans class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [SiteRecoveryManagementClient] reference to the SiteRecoveryManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Execute reprotect of the recovery plan.
26
+ #
27
+ # The operation to reprotect(reverse replicate) a recovery plan.
28
+ #
29
+ # @param recovery_plan_name [String] Recovery plan 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 [RecoveryPlan] operation results.
34
+ #
35
+ def reprotect(recovery_plan_name, custom_headers = nil)
36
+ response = reprotect_async(recovery_plan_name, custom_headers).value!
37
+ response.body unless response.nil?
38
+ end
39
+
40
+ #
41
+ # @param recovery_plan_name [String] Recovery plan name.
42
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
43
+ # will be added to the HTTP request.
44
+ #
45
+ # @return [Concurrent::Promise] promise which provides async access to http
46
+ # response.
47
+ #
48
+ def reprotect_async(recovery_plan_name, custom_headers = nil)
49
+ # Send request
50
+ promise = begin_reprotect_async(recovery_plan_name, custom_headers)
51
+
52
+ promise = promise.then do |response|
53
+ # Defining deserialization method.
54
+ deserialize_method = lambda do |parsed_response|
55
+ result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::RecoveryPlan.mapper()
56
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
57
+ end
58
+
59
+ # Waiting for response.
60
+ @client.get_long_running_operation_result(response, deserialize_method)
61
+ end
62
+
63
+ promise
64
+ end
65
+
66
+ #
67
+ # Execute commit failover of the recovery plan.
68
+ #
69
+ # The operation to commit the fail over of a recovery plan.
70
+ #
71
+ # @param recovery_plan_name [String] Recovery plan name.
72
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
73
+ # will be added to the HTTP request.
74
+ #
75
+ # @return [RecoveryPlan] operation results.
76
+ #
77
+ def failover_commit(recovery_plan_name, custom_headers = nil)
78
+ response = failover_commit_async(recovery_plan_name, custom_headers).value!
79
+ response.body unless response.nil?
80
+ end
81
+
82
+ #
83
+ # @param recovery_plan_name [String] Recovery plan name.
84
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
85
+ # will be added to the HTTP request.
86
+ #
87
+ # @return [Concurrent::Promise] promise which provides async access to http
88
+ # response.
89
+ #
90
+ def failover_commit_async(recovery_plan_name, custom_headers = nil)
91
+ # Send request
92
+ promise = begin_failover_commit_async(recovery_plan_name, custom_headers)
93
+
94
+ promise = promise.then do |response|
95
+ # Defining deserialization method.
96
+ deserialize_method = lambda do |parsed_response|
97
+ result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::RecoveryPlan.mapper()
98
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
99
+ end
100
+
101
+ # Waiting for response.
102
+ @client.get_long_running_operation_result(response, deserialize_method)
103
+ end
104
+
105
+ promise
106
+ end
107
+
108
+ #
109
+ # Execute test failover cleanup of the recovery plan.
110
+ #
111
+ # The operation to cleanup test failover of a recovery plan.
112
+ #
113
+ # @param recovery_plan_name [String] Recovery plan name.
114
+ # @param input [RecoveryPlanTestFailoverCleanupInput] Test failover cleanup
115
+ # input.
116
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
117
+ # will be added to the HTTP request.
118
+ #
119
+ # @return [RecoveryPlan] operation results.
120
+ #
121
+ def test_failover_cleanup(recovery_plan_name, input, custom_headers = nil)
122
+ response = test_failover_cleanup_async(recovery_plan_name, input, custom_headers).value!
123
+ response.body unless response.nil?
124
+ end
125
+
126
+ #
127
+ # @param recovery_plan_name [String] Recovery plan name.
128
+ # @param input [RecoveryPlanTestFailoverCleanupInput] Test failover cleanup
129
+ # input.
130
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
131
+ # will be added to the HTTP request.
132
+ #
133
+ # @return [Concurrent::Promise] promise which provides async access to http
134
+ # response.
135
+ #
136
+ def test_failover_cleanup_async(recovery_plan_name, input, custom_headers = nil)
137
+ # Send request
138
+ promise = begin_test_failover_cleanup_async(recovery_plan_name, input, custom_headers)
139
+
140
+ promise = promise.then do |response|
141
+ # Defining deserialization method.
142
+ deserialize_method = lambda do |parsed_response|
143
+ result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::RecoveryPlan.mapper()
144
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
145
+ end
146
+
147
+ # Waiting for response.
148
+ @client.get_long_running_operation_result(response, deserialize_method)
149
+ end
150
+
151
+ promise
152
+ end
153
+
154
+ #
155
+ # Execute test failover of the recovery plan.
156
+ #
157
+ # The operation to start the test failover of a recovery plan.
158
+ #
159
+ # @param recovery_plan_name [String] Recovery plan name.
160
+ # @param input [RecoveryPlanTestFailoverInput] Failover input.
161
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
162
+ # will be added to the HTTP request.
163
+ #
164
+ # @return [RecoveryPlan] operation results.
165
+ #
166
+ def test_failover(recovery_plan_name, input, custom_headers = nil)
167
+ response = test_failover_async(recovery_plan_name, input, custom_headers).value!
168
+ response.body unless response.nil?
169
+ end
170
+
171
+ #
172
+ # @param recovery_plan_name [String] Recovery plan name.
173
+ # @param input [RecoveryPlanTestFailoverInput] Failover input.
174
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
175
+ # will be added to the HTTP request.
176
+ #
177
+ # @return [Concurrent::Promise] promise which provides async access to http
178
+ # response.
179
+ #
180
+ def test_failover_async(recovery_plan_name, input, custom_headers = nil)
181
+ # Send request
182
+ promise = begin_test_failover_async(recovery_plan_name, input, custom_headers)
183
+
184
+ promise = promise.then do |response|
185
+ # Defining deserialization method.
186
+ deserialize_method = lambda do |parsed_response|
187
+ result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::RecoveryPlan.mapper()
188
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
189
+ end
190
+
191
+ # Waiting for response.
192
+ @client.get_long_running_operation_result(response, deserialize_method)
193
+ end
194
+
195
+ promise
196
+ end
197
+
198
+ #
199
+ # Execute unplanned failover of the recovery plan.
200
+ #
201
+ # The operation to start the failover of a recovery plan.
202
+ #
203
+ # @param recovery_plan_name [String] Recovery plan name.
204
+ # @param input [RecoveryPlanUnplannedFailoverInput] Failover input.
205
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
206
+ # will be added to the HTTP request.
207
+ #
208
+ # @return [RecoveryPlan] operation results.
209
+ #
210
+ def unplanned_failover(recovery_plan_name, input, custom_headers = nil)
211
+ response = unplanned_failover_async(recovery_plan_name, input, custom_headers).value!
212
+ response.body unless response.nil?
213
+ end
214
+
215
+ #
216
+ # @param recovery_plan_name [String] Recovery plan name.
217
+ # @param input [RecoveryPlanUnplannedFailoverInput] Failover input.
218
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
219
+ # will be added to the HTTP request.
220
+ #
221
+ # @return [Concurrent::Promise] promise which provides async access to http
222
+ # response.
223
+ #
224
+ def unplanned_failover_async(recovery_plan_name, input, custom_headers = nil)
225
+ # Send request
226
+ promise = begin_unplanned_failover_async(recovery_plan_name, input, custom_headers)
227
+
228
+ promise = promise.then do |response|
229
+ # Defining deserialization method.
230
+ deserialize_method = lambda do |parsed_response|
231
+ result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::RecoveryPlan.mapper()
232
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
233
+ end
234
+
235
+ # Waiting for response.
236
+ @client.get_long_running_operation_result(response, deserialize_method)
237
+ end
238
+
239
+ promise
240
+ end
241
+
242
+ #
243
+ # Execute planned failover of the recovery plan.
244
+ #
245
+ # The operation to start the planned failover of a recovery plan.
246
+ #
247
+ # @param recovery_plan_name [String] Recovery plan name.
248
+ # @param input [RecoveryPlanPlannedFailoverInput] Failover input.
249
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
250
+ # will be added to the HTTP request.
251
+ #
252
+ # @return [RecoveryPlan] operation results.
253
+ #
254
+ def planned_failover(recovery_plan_name, input, custom_headers = nil)
255
+ response = planned_failover_async(recovery_plan_name, input, custom_headers).value!
256
+ response.body unless response.nil?
257
+ end
258
+
259
+ #
260
+ # @param recovery_plan_name [String] Recovery plan name.
261
+ # @param input [RecoveryPlanPlannedFailoverInput] Failover input.
262
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
263
+ # will be added to the HTTP request.
264
+ #
265
+ # @return [Concurrent::Promise] promise which provides async access to http
266
+ # response.
267
+ #
268
+ def planned_failover_async(recovery_plan_name, input, custom_headers = nil)
269
+ # Send request
270
+ promise = begin_planned_failover_async(recovery_plan_name, input, custom_headers)
271
+
272
+ promise = promise.then do |response|
273
+ # Defining deserialization method.
274
+ deserialize_method = lambda do |parsed_response|
275
+ result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::RecoveryPlan.mapper()
276
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
277
+ end
278
+
279
+ # Waiting for response.
280
+ @client.get_long_running_operation_result(response, deserialize_method)
281
+ end
282
+
283
+ promise
284
+ end
285
+
286
+ #
287
+ # Gets the requested recovery plan.
288
+ #
289
+ # Gets the details of the recovery plan.
290
+ #
291
+ # @param recovery_plan_name [String] Name of the recovery plan.
292
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
293
+ # will be added to the HTTP request.
294
+ #
295
+ # @return [RecoveryPlan] operation results.
296
+ #
297
+ def get(recovery_plan_name, custom_headers = nil)
298
+ response = get_async(recovery_plan_name, custom_headers).value!
299
+ response.body unless response.nil?
300
+ end
301
+
302
+ #
303
+ # Gets the requested recovery plan.
304
+ #
305
+ # Gets the details of the recovery plan.
306
+ #
307
+ # @param recovery_plan_name [String] Name of the recovery plan.
308
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
309
+ # will be added to the HTTP request.
310
+ #
311
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
312
+ #
313
+ def get_with_http_info(recovery_plan_name, custom_headers = nil)
314
+ get_async(recovery_plan_name, custom_headers).value!
315
+ end
316
+
317
+ #
318
+ # Gets the requested recovery plan.
319
+ #
320
+ # Gets the details of the recovery plan.
321
+ #
322
+ # @param recovery_plan_name [String] Name of the recovery plan.
323
+ # @param [Hash{String => String}] A hash of custom headers that will be added
324
+ # to the HTTP request.
325
+ #
326
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
327
+ #
328
+ def get_async(recovery_plan_name, custom_headers = nil)
329
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
330
+ fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil?
331
+ fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
332
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
333
+ fail ArgumentError, 'recovery_plan_name is nil' if recovery_plan_name.nil?
334
+
335
+
336
+ request_headers = {}
337
+
338
+ # Set Headers
339
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
340
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
341
+ path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}'
342
+
343
+ request_url = @base_url || @client.base_url
344
+
345
+ options = {
346
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
347
+ path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'recoveryPlanName' => recovery_plan_name},
348
+ query_params: {'api-version' => @client.api_version},
349
+ headers: request_headers.merge(custom_headers || {}),
350
+ base_url: request_url
351
+ }
352
+ promise = @client.make_request_async(:get, path_template, options)
353
+
354
+ promise = promise.then do |result|
355
+ http_response = result.response
356
+ status_code = http_response.status
357
+ response_content = http_response.body
358
+ unless status_code == 200
359
+ error_model = JSON.load(response_content)
360
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
361
+ end
362
+
363
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
364
+ # Deserialize Response
365
+ if status_code == 200
366
+ begin
367
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
368
+ result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::RecoveryPlan.mapper()
369
+ result.body = @client.deserialize(result_mapper, parsed_response)
370
+ rescue Exception => e
371
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
372
+ end
373
+ end
374
+
375
+ result
376
+ end
377
+
378
+ promise.execute
379
+ end
380
+
381
+ #
382
+ # Creates a recovery plan with the given details.
383
+ #
384
+ # The operation to create a recovery plan.
385
+ #
386
+ # @param recovery_plan_name [String] Recovery plan name.
387
+ # @param input [CreateRecoveryPlanInput] Recovery Plan creation input.
388
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
389
+ # will be added to the HTTP request.
390
+ #
391
+ # @return [RecoveryPlan] operation results.
392
+ #
393
+ def create(recovery_plan_name, input, custom_headers = nil)
394
+ response = create_async(recovery_plan_name, input, custom_headers).value!
395
+ response.body unless response.nil?
396
+ end
397
+
398
+ #
399
+ # @param recovery_plan_name [String] Recovery plan name.
400
+ # @param input [CreateRecoveryPlanInput] Recovery Plan creation input.
401
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
402
+ # will be added to the HTTP request.
403
+ #
404
+ # @return [Concurrent::Promise] promise which provides async access to http
405
+ # response.
406
+ #
407
+ def create_async(recovery_plan_name, input, custom_headers = nil)
408
+ # Send request
409
+ promise = begin_create_async(recovery_plan_name, input, custom_headers)
410
+
411
+ promise = promise.then do |response|
412
+ # Defining deserialization method.
413
+ deserialize_method = lambda do |parsed_response|
414
+ result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::RecoveryPlan.mapper()
415
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
416
+ end
417
+
418
+ # Waiting for response.
419
+ @client.get_long_running_operation_result(response, deserialize_method)
420
+ end
421
+
422
+ promise
423
+ end
424
+
425
+ #
426
+ # Deletes the specified recovery plan.
427
+ #
428
+ # Delete a recovery plan.
429
+ #
430
+ # @param recovery_plan_name [String] Recovery plan name.
431
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
432
+ # will be added to the HTTP request.
433
+ #
434
+ def delete(recovery_plan_name, custom_headers = nil)
435
+ response = delete_async(recovery_plan_name, custom_headers).value!
436
+ nil
437
+ end
438
+
439
+ #
440
+ # @param recovery_plan_name [String] Recovery plan name.
441
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
442
+ # will be added to the HTTP request.
443
+ #
444
+ # @return [Concurrent::Promise] promise which provides async access to http
445
+ # response.
446
+ #
447
+ def delete_async(recovery_plan_name, custom_headers = nil)
448
+ # Send request
449
+ promise = begin_delete_async(recovery_plan_name, custom_headers)
450
+
451
+ promise = promise.then do |response|
452
+ # Defining deserialization method.
453
+ deserialize_method = lambda do |parsed_response|
454
+ end
455
+
456
+ # Waiting for response.
457
+ @client.get_long_running_operation_result(response, deserialize_method)
458
+ end
459
+
460
+ promise
461
+ end
462
+
463
+ #
464
+ # Updates the given recovery plan.
465
+ #
466
+ # The operation to update a recovery plan.
467
+ #
468
+ # @param recovery_plan_name [String] Recovery plan name.
469
+ # @param input [UpdateRecoveryPlanInput] Update recovery plan input
470
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
471
+ # will be added to the HTTP request.
472
+ #
473
+ # @return [RecoveryPlan] operation results.
474
+ #
475
+ def update(recovery_plan_name, input, custom_headers = nil)
476
+ response = update_async(recovery_plan_name, input, custom_headers).value!
477
+ response.body unless response.nil?
478
+ end
479
+
480
+ #
481
+ # @param recovery_plan_name [String] Recovery plan name.
482
+ # @param input [UpdateRecoveryPlanInput] Update recovery plan input
483
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
484
+ # will be added to the HTTP request.
485
+ #
486
+ # @return [Concurrent::Promise] promise which provides async access to http
487
+ # response.
488
+ #
489
+ def update_async(recovery_plan_name, input, custom_headers = nil)
490
+ # Send request
491
+ promise = begin_update_async(recovery_plan_name, input, custom_headers)
492
+
493
+ promise = promise.then do |response|
494
+ # Defining deserialization method.
495
+ deserialize_method = lambda do |parsed_response|
496
+ result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::RecoveryPlan.mapper()
497
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
498
+ end
499
+
500
+ # Waiting for response.
501
+ @client.get_long_running_operation_result(response, deserialize_method)
502
+ end
503
+
504
+ promise
505
+ end
506
+
507
+ #
508
+ # Gets the list of recovery plans.
509
+ #
510
+ # Lists the recovery plans in the vault.
511
+ #
512
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
513
+ # will be added to the HTTP request.
514
+ #
515
+ # @return [Array<RecoveryPlan>] operation results.
516
+ #
517
+ def list(custom_headers = nil)
518
+ first_page = list_as_lazy(custom_headers)
519
+ first_page.get_all_items
520
+ end
521
+
522
+ #
523
+ # Gets the list of recovery plans.
524
+ #
525
+ # Lists the recovery plans in the vault.
526
+ #
527
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
528
+ # will be added to the HTTP request.
529
+ #
530
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
531
+ #
532
+ def list_with_http_info(custom_headers = nil)
533
+ list_async(custom_headers).value!
534
+ end
535
+
536
+ #
537
+ # Gets the list of recovery plans.
538
+ #
539
+ # Lists the recovery plans in the vault.
540
+ #
541
+ # @param [Hash{String => String}] A hash of custom headers that will be added
542
+ # to the HTTP request.
543
+ #
544
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
545
+ #
546
+ def list_async(custom_headers = nil)
547
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
548
+ fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil?
549
+ fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
550
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
551
+
552
+
553
+ request_headers = {}
554
+
555
+ # Set Headers
556
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
557
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
558
+ path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans'
559
+
560
+ request_url = @base_url || @client.base_url
561
+
562
+ options = {
563
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
564
+ path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id},
565
+ query_params: {'api-version' => @client.api_version},
566
+ headers: request_headers.merge(custom_headers || {}),
567
+ base_url: request_url
568
+ }
569
+ promise = @client.make_request_async(:get, path_template, options)
570
+
571
+ promise = promise.then do |result|
572
+ http_response = result.response
573
+ status_code = http_response.status
574
+ response_content = http_response.body
575
+ unless status_code == 200
576
+ error_model = JSON.load(response_content)
577
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
578
+ end
579
+
580
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
581
+ # Deserialize Response
582
+ if status_code == 200
583
+ begin
584
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
585
+ result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::RecoveryPlanCollection.mapper()
586
+ result.body = @client.deserialize(result_mapper, parsed_response)
587
+ rescue Exception => e
588
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
589
+ end
590
+ end
591
+
592
+ result
593
+ end
594
+
595
+ promise.execute
596
+ end
597
+
598
+ #
599
+ # Execute reprotect of the recovery plan.
600
+ #
601
+ # The operation to reprotect(reverse replicate) a recovery plan.
602
+ #
603
+ # @param recovery_plan_name [String] Recovery plan name.
604
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
605
+ # will be added to the HTTP request.
606
+ #
607
+ # @return [RecoveryPlan] operation results.
608
+ #
609
+ def begin_reprotect(recovery_plan_name, custom_headers = nil)
610
+ response = begin_reprotect_async(recovery_plan_name, custom_headers).value!
611
+ response.body unless response.nil?
612
+ end
613
+
614
+ #
615
+ # Execute reprotect of the recovery plan.
616
+ #
617
+ # The operation to reprotect(reverse replicate) a recovery plan.
618
+ #
619
+ # @param recovery_plan_name [String] Recovery plan name.
620
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
621
+ # will be added to the HTTP request.
622
+ #
623
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
624
+ #
625
+ def begin_reprotect_with_http_info(recovery_plan_name, custom_headers = nil)
626
+ begin_reprotect_async(recovery_plan_name, custom_headers).value!
627
+ end
628
+
629
+ #
630
+ # Execute reprotect of the recovery plan.
631
+ #
632
+ # The operation to reprotect(reverse replicate) a recovery plan.
633
+ #
634
+ # @param recovery_plan_name [String] Recovery plan name.
635
+ # @param [Hash{String => String}] A hash of custom headers that will be added
636
+ # to the HTTP request.
637
+ #
638
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
639
+ #
640
+ def begin_reprotect_async(recovery_plan_name, custom_headers = nil)
641
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
642
+ fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil?
643
+ fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
644
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
645
+ fail ArgumentError, 'recovery_plan_name is nil' if recovery_plan_name.nil?
646
+
647
+
648
+ request_headers = {}
649
+
650
+ # Set Headers
651
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
652
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
653
+ path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/reProtect'
654
+
655
+ request_url = @base_url || @client.base_url
656
+
657
+ options = {
658
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
659
+ path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'recoveryPlanName' => recovery_plan_name},
660
+ query_params: {'api-version' => @client.api_version},
661
+ headers: request_headers.merge(custom_headers || {}),
662
+ base_url: request_url
663
+ }
664
+ promise = @client.make_request_async(:post, path_template, options)
665
+
666
+ promise = promise.then do |result|
667
+ http_response = result.response
668
+ status_code = http_response.status
669
+ response_content = http_response.body
670
+ unless status_code == 200 || status_code == 202
671
+ error_model = JSON.load(response_content)
672
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
673
+ end
674
+
675
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
676
+ # Deserialize Response
677
+ if status_code == 200
678
+ begin
679
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
680
+ result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::RecoveryPlan.mapper()
681
+ result.body = @client.deserialize(result_mapper, parsed_response)
682
+ rescue Exception => e
683
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
684
+ end
685
+ end
686
+
687
+ result
688
+ end
689
+
690
+ promise.execute
691
+ end
692
+
693
+ #
694
+ # Execute commit failover of the recovery plan.
695
+ #
696
+ # The operation to commit the fail over of a recovery plan.
697
+ #
698
+ # @param recovery_plan_name [String] Recovery plan name.
699
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
700
+ # will be added to the HTTP request.
701
+ #
702
+ # @return [RecoveryPlan] operation results.
703
+ #
704
+ def begin_failover_commit(recovery_plan_name, custom_headers = nil)
705
+ response = begin_failover_commit_async(recovery_plan_name, custom_headers).value!
706
+ response.body unless response.nil?
707
+ end
708
+
709
+ #
710
+ # Execute commit failover of the recovery plan.
711
+ #
712
+ # The operation to commit the fail over of a recovery plan.
713
+ #
714
+ # @param recovery_plan_name [String] Recovery plan name.
715
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
716
+ # will be added to the HTTP request.
717
+ #
718
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
719
+ #
720
+ def begin_failover_commit_with_http_info(recovery_plan_name, custom_headers = nil)
721
+ begin_failover_commit_async(recovery_plan_name, custom_headers).value!
722
+ end
723
+
724
+ #
725
+ # Execute commit failover of the recovery plan.
726
+ #
727
+ # The operation to commit the fail over of a recovery plan.
728
+ #
729
+ # @param recovery_plan_name [String] Recovery plan name.
730
+ # @param [Hash{String => String}] A hash of custom headers that will be added
731
+ # to the HTTP request.
732
+ #
733
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
734
+ #
735
+ def begin_failover_commit_async(recovery_plan_name, custom_headers = nil)
736
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
737
+ fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil?
738
+ fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
739
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
740
+ fail ArgumentError, 'recovery_plan_name is nil' if recovery_plan_name.nil?
741
+
742
+
743
+ request_headers = {}
744
+
745
+ # Set Headers
746
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
747
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
748
+ path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/failoverCommit'
749
+
750
+ request_url = @base_url || @client.base_url
751
+
752
+ options = {
753
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
754
+ path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'recoveryPlanName' => recovery_plan_name},
755
+ query_params: {'api-version' => @client.api_version},
756
+ headers: request_headers.merge(custom_headers || {}),
757
+ base_url: request_url
758
+ }
759
+ promise = @client.make_request_async(:post, path_template, options)
760
+
761
+ promise = promise.then do |result|
762
+ http_response = result.response
763
+ status_code = http_response.status
764
+ response_content = http_response.body
765
+ unless status_code == 200 || status_code == 202
766
+ error_model = JSON.load(response_content)
767
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
768
+ end
769
+
770
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
771
+ # Deserialize Response
772
+ if status_code == 200
773
+ begin
774
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
775
+ result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::RecoveryPlan.mapper()
776
+ result.body = @client.deserialize(result_mapper, parsed_response)
777
+ rescue Exception => e
778
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
779
+ end
780
+ end
781
+
782
+ result
783
+ end
784
+
785
+ promise.execute
786
+ end
787
+
788
+ #
789
+ # Execute test failover cleanup of the recovery plan.
790
+ #
791
+ # The operation to cleanup test failover of a recovery plan.
792
+ #
793
+ # @param recovery_plan_name [String] Recovery plan name.
794
+ # @param input [RecoveryPlanTestFailoverCleanupInput] Test failover cleanup
795
+ # input.
796
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
797
+ # will be added to the HTTP request.
798
+ #
799
+ # @return [RecoveryPlan] operation results.
800
+ #
801
+ def begin_test_failover_cleanup(recovery_plan_name, input, custom_headers = nil)
802
+ response = begin_test_failover_cleanup_async(recovery_plan_name, input, custom_headers).value!
803
+ response.body unless response.nil?
804
+ end
805
+
806
+ #
807
+ # Execute test failover cleanup of the recovery plan.
808
+ #
809
+ # The operation to cleanup test failover of a recovery plan.
810
+ #
811
+ # @param recovery_plan_name [String] Recovery plan name.
812
+ # @param input [RecoveryPlanTestFailoverCleanupInput] Test failover cleanup
813
+ # input.
814
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
815
+ # will be added to the HTTP request.
816
+ #
817
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
818
+ #
819
+ def begin_test_failover_cleanup_with_http_info(recovery_plan_name, input, custom_headers = nil)
820
+ begin_test_failover_cleanup_async(recovery_plan_name, input, custom_headers).value!
821
+ end
822
+
823
+ #
824
+ # Execute test failover cleanup of the recovery plan.
825
+ #
826
+ # The operation to cleanup test failover of a recovery plan.
827
+ #
828
+ # @param recovery_plan_name [String] Recovery plan name.
829
+ # @param input [RecoveryPlanTestFailoverCleanupInput] Test failover cleanup
830
+ # input.
831
+ # @param [Hash{String => String}] A hash of custom headers that will be added
832
+ # to the HTTP request.
833
+ #
834
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
835
+ #
836
+ def begin_test_failover_cleanup_async(recovery_plan_name, input, custom_headers = nil)
837
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
838
+ fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil?
839
+ fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
840
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
841
+ fail ArgumentError, 'recovery_plan_name is nil' if recovery_plan_name.nil?
842
+ fail ArgumentError, 'input is nil' if input.nil?
843
+
844
+
845
+ request_headers = {}
846
+
847
+ # Set Headers
848
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
849
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
850
+
851
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
852
+
853
+ # Serialize Request
854
+ request_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::RecoveryPlanTestFailoverCleanupInput.mapper()
855
+ request_content = @client.serialize(request_mapper, input)
856
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
857
+
858
+ path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/testFailoverCleanup'
859
+
860
+ request_url = @base_url || @client.base_url
861
+
862
+ options = {
863
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
864
+ path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'recoveryPlanName' => recovery_plan_name},
865
+ query_params: {'api-version' => @client.api_version},
866
+ body: request_content,
867
+ headers: request_headers.merge(custom_headers || {}),
868
+ base_url: request_url
869
+ }
870
+ promise = @client.make_request_async(:post, path_template, options)
871
+
872
+ promise = promise.then do |result|
873
+ http_response = result.response
874
+ status_code = http_response.status
875
+ response_content = http_response.body
876
+ unless status_code == 200 || status_code == 202
877
+ error_model = JSON.load(response_content)
878
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
879
+ end
880
+
881
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
882
+ # Deserialize Response
883
+ if status_code == 200
884
+ begin
885
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
886
+ result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::RecoveryPlan.mapper()
887
+ result.body = @client.deserialize(result_mapper, parsed_response)
888
+ rescue Exception => e
889
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
890
+ end
891
+ end
892
+
893
+ result
894
+ end
895
+
896
+ promise.execute
897
+ end
898
+
899
+ #
900
+ # Execute test failover of the recovery plan.
901
+ #
902
+ # The operation to start the test failover of a recovery plan.
903
+ #
904
+ # @param recovery_plan_name [String] Recovery plan name.
905
+ # @param input [RecoveryPlanTestFailoverInput] Failover input.
906
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
907
+ # will be added to the HTTP request.
908
+ #
909
+ # @return [RecoveryPlan] operation results.
910
+ #
911
+ def begin_test_failover(recovery_plan_name, input, custom_headers = nil)
912
+ response = begin_test_failover_async(recovery_plan_name, input, custom_headers).value!
913
+ response.body unless response.nil?
914
+ end
915
+
916
+ #
917
+ # Execute test failover of the recovery plan.
918
+ #
919
+ # The operation to start the test failover of a recovery plan.
920
+ #
921
+ # @param recovery_plan_name [String] Recovery plan name.
922
+ # @param input [RecoveryPlanTestFailoverInput] Failover input.
923
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
924
+ # will be added to the HTTP request.
925
+ #
926
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
927
+ #
928
+ def begin_test_failover_with_http_info(recovery_plan_name, input, custom_headers = nil)
929
+ begin_test_failover_async(recovery_plan_name, input, custom_headers).value!
930
+ end
931
+
932
+ #
933
+ # Execute test failover of the recovery plan.
934
+ #
935
+ # The operation to start the test failover of a recovery plan.
936
+ #
937
+ # @param recovery_plan_name [String] Recovery plan name.
938
+ # @param input [RecoveryPlanTestFailoverInput] Failover input.
939
+ # @param [Hash{String => String}] A hash of custom headers that will be added
940
+ # to the HTTP request.
941
+ #
942
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
943
+ #
944
+ def begin_test_failover_async(recovery_plan_name, input, custom_headers = nil)
945
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
946
+ fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil?
947
+ fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
948
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
949
+ fail ArgumentError, 'recovery_plan_name is nil' if recovery_plan_name.nil?
950
+ fail ArgumentError, 'input is nil' if input.nil?
951
+
952
+
953
+ request_headers = {}
954
+
955
+ # Set Headers
956
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
957
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
958
+
959
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
960
+
961
+ # Serialize Request
962
+ request_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::RecoveryPlanTestFailoverInput.mapper()
963
+ request_content = @client.serialize(request_mapper, input)
964
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
965
+
966
+ path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/testFailover'
967
+
968
+ request_url = @base_url || @client.base_url
969
+
970
+ options = {
971
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
972
+ path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'recoveryPlanName' => recovery_plan_name},
973
+ query_params: {'api-version' => @client.api_version},
974
+ body: request_content,
975
+ headers: request_headers.merge(custom_headers || {}),
976
+ base_url: request_url
977
+ }
978
+ promise = @client.make_request_async(:post, path_template, options)
979
+
980
+ promise = promise.then do |result|
981
+ http_response = result.response
982
+ status_code = http_response.status
983
+ response_content = http_response.body
984
+ unless status_code == 200 || status_code == 202
985
+ error_model = JSON.load(response_content)
986
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
987
+ end
988
+
989
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
990
+ # Deserialize Response
991
+ if status_code == 200
992
+ begin
993
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
994
+ result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::RecoveryPlan.mapper()
995
+ result.body = @client.deserialize(result_mapper, parsed_response)
996
+ rescue Exception => e
997
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
998
+ end
999
+ end
1000
+
1001
+ result
1002
+ end
1003
+
1004
+ promise.execute
1005
+ end
1006
+
1007
+ #
1008
+ # Execute unplanned failover of the recovery plan.
1009
+ #
1010
+ # The operation to start the failover of a recovery plan.
1011
+ #
1012
+ # @param recovery_plan_name [String] Recovery plan name.
1013
+ # @param input [RecoveryPlanUnplannedFailoverInput] Failover input.
1014
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1015
+ # will be added to the HTTP request.
1016
+ #
1017
+ # @return [RecoveryPlan] operation results.
1018
+ #
1019
+ def begin_unplanned_failover(recovery_plan_name, input, custom_headers = nil)
1020
+ response = begin_unplanned_failover_async(recovery_plan_name, input, custom_headers).value!
1021
+ response.body unless response.nil?
1022
+ end
1023
+
1024
+ #
1025
+ # Execute unplanned failover of the recovery plan.
1026
+ #
1027
+ # The operation to start the failover of a recovery plan.
1028
+ #
1029
+ # @param recovery_plan_name [String] Recovery plan name.
1030
+ # @param input [RecoveryPlanUnplannedFailoverInput] Failover input.
1031
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1032
+ # will be added to the HTTP request.
1033
+ #
1034
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1035
+ #
1036
+ def begin_unplanned_failover_with_http_info(recovery_plan_name, input, custom_headers = nil)
1037
+ begin_unplanned_failover_async(recovery_plan_name, input, custom_headers).value!
1038
+ end
1039
+
1040
+ #
1041
+ # Execute unplanned failover of the recovery plan.
1042
+ #
1043
+ # The operation to start the failover of a recovery plan.
1044
+ #
1045
+ # @param recovery_plan_name [String] Recovery plan name.
1046
+ # @param input [RecoveryPlanUnplannedFailoverInput] Failover input.
1047
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1048
+ # to the HTTP request.
1049
+ #
1050
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1051
+ #
1052
+ def begin_unplanned_failover_async(recovery_plan_name, input, custom_headers = nil)
1053
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1054
+ fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil?
1055
+ fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
1056
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1057
+ fail ArgumentError, 'recovery_plan_name is nil' if recovery_plan_name.nil?
1058
+ fail ArgumentError, 'input is nil' if input.nil?
1059
+
1060
+
1061
+ request_headers = {}
1062
+
1063
+ # Set Headers
1064
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1065
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1066
+
1067
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1068
+
1069
+ # Serialize Request
1070
+ request_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::RecoveryPlanUnplannedFailoverInput.mapper()
1071
+ request_content = @client.serialize(request_mapper, input)
1072
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1073
+
1074
+ path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/unplannedFailover'
1075
+
1076
+ request_url = @base_url || @client.base_url
1077
+
1078
+ options = {
1079
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1080
+ path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'recoveryPlanName' => recovery_plan_name},
1081
+ query_params: {'api-version' => @client.api_version},
1082
+ body: request_content,
1083
+ headers: request_headers.merge(custom_headers || {}),
1084
+ base_url: request_url
1085
+ }
1086
+ promise = @client.make_request_async(:post, path_template, options)
1087
+
1088
+ promise = promise.then do |result|
1089
+ http_response = result.response
1090
+ status_code = http_response.status
1091
+ response_content = http_response.body
1092
+ unless status_code == 200 || status_code == 202
1093
+ error_model = JSON.load(response_content)
1094
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1095
+ end
1096
+
1097
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1098
+ # Deserialize Response
1099
+ if status_code == 200
1100
+ begin
1101
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1102
+ result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::RecoveryPlan.mapper()
1103
+ result.body = @client.deserialize(result_mapper, parsed_response)
1104
+ rescue Exception => e
1105
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1106
+ end
1107
+ end
1108
+
1109
+ result
1110
+ end
1111
+
1112
+ promise.execute
1113
+ end
1114
+
1115
+ #
1116
+ # Execute planned failover of the recovery plan.
1117
+ #
1118
+ # The operation to start the planned failover of a recovery plan.
1119
+ #
1120
+ # @param recovery_plan_name [String] Recovery plan name.
1121
+ # @param input [RecoveryPlanPlannedFailoverInput] Failover input.
1122
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1123
+ # will be added to the HTTP request.
1124
+ #
1125
+ # @return [RecoveryPlan] operation results.
1126
+ #
1127
+ def begin_planned_failover(recovery_plan_name, input, custom_headers = nil)
1128
+ response = begin_planned_failover_async(recovery_plan_name, input, custom_headers).value!
1129
+ response.body unless response.nil?
1130
+ end
1131
+
1132
+ #
1133
+ # Execute planned failover of the recovery plan.
1134
+ #
1135
+ # The operation to start the planned failover of a recovery plan.
1136
+ #
1137
+ # @param recovery_plan_name [String] Recovery plan name.
1138
+ # @param input [RecoveryPlanPlannedFailoverInput] Failover input.
1139
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1140
+ # will be added to the HTTP request.
1141
+ #
1142
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1143
+ #
1144
+ def begin_planned_failover_with_http_info(recovery_plan_name, input, custom_headers = nil)
1145
+ begin_planned_failover_async(recovery_plan_name, input, custom_headers).value!
1146
+ end
1147
+
1148
+ #
1149
+ # Execute planned failover of the recovery plan.
1150
+ #
1151
+ # The operation to start the planned failover of a recovery plan.
1152
+ #
1153
+ # @param recovery_plan_name [String] Recovery plan name.
1154
+ # @param input [RecoveryPlanPlannedFailoverInput] Failover input.
1155
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1156
+ # to the HTTP request.
1157
+ #
1158
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1159
+ #
1160
+ def begin_planned_failover_async(recovery_plan_name, input, custom_headers = nil)
1161
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1162
+ fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil?
1163
+ fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
1164
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1165
+ fail ArgumentError, 'recovery_plan_name is nil' if recovery_plan_name.nil?
1166
+ fail ArgumentError, 'input is nil' if input.nil?
1167
+
1168
+
1169
+ request_headers = {}
1170
+
1171
+ # Set Headers
1172
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1173
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1174
+
1175
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1176
+
1177
+ # Serialize Request
1178
+ request_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::RecoveryPlanPlannedFailoverInput.mapper()
1179
+ request_content = @client.serialize(request_mapper, input)
1180
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1181
+
1182
+ path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/plannedFailover'
1183
+
1184
+ request_url = @base_url || @client.base_url
1185
+
1186
+ options = {
1187
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1188
+ path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'recoveryPlanName' => recovery_plan_name},
1189
+ query_params: {'api-version' => @client.api_version},
1190
+ body: request_content,
1191
+ headers: request_headers.merge(custom_headers || {}),
1192
+ base_url: request_url
1193
+ }
1194
+ promise = @client.make_request_async(:post, path_template, options)
1195
+
1196
+ promise = promise.then do |result|
1197
+ http_response = result.response
1198
+ status_code = http_response.status
1199
+ response_content = http_response.body
1200
+ unless status_code == 200 || status_code == 202
1201
+ error_model = JSON.load(response_content)
1202
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1203
+ end
1204
+
1205
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1206
+ # Deserialize Response
1207
+ if status_code == 200
1208
+ begin
1209
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1210
+ result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::RecoveryPlan.mapper()
1211
+ result.body = @client.deserialize(result_mapper, parsed_response)
1212
+ rescue Exception => e
1213
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1214
+ end
1215
+ end
1216
+
1217
+ result
1218
+ end
1219
+
1220
+ promise.execute
1221
+ end
1222
+
1223
+ #
1224
+ # Creates a recovery plan with the given details.
1225
+ #
1226
+ # The operation to create a recovery plan.
1227
+ #
1228
+ # @param recovery_plan_name [String] Recovery plan name.
1229
+ # @param input [CreateRecoveryPlanInput] Recovery Plan creation input.
1230
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1231
+ # will be added to the HTTP request.
1232
+ #
1233
+ # @return [RecoveryPlan] operation results.
1234
+ #
1235
+ def begin_create(recovery_plan_name, input, custom_headers = nil)
1236
+ response = begin_create_async(recovery_plan_name, input, custom_headers).value!
1237
+ response.body unless response.nil?
1238
+ end
1239
+
1240
+ #
1241
+ # Creates a recovery plan with the given details.
1242
+ #
1243
+ # The operation to create a recovery plan.
1244
+ #
1245
+ # @param recovery_plan_name [String] Recovery plan name.
1246
+ # @param input [CreateRecoveryPlanInput] Recovery Plan creation input.
1247
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1248
+ # will be added to the HTTP request.
1249
+ #
1250
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1251
+ #
1252
+ def begin_create_with_http_info(recovery_plan_name, input, custom_headers = nil)
1253
+ begin_create_async(recovery_plan_name, input, custom_headers).value!
1254
+ end
1255
+
1256
+ #
1257
+ # Creates a recovery plan with the given details.
1258
+ #
1259
+ # The operation to create a recovery plan.
1260
+ #
1261
+ # @param recovery_plan_name [String] Recovery plan name.
1262
+ # @param input [CreateRecoveryPlanInput] Recovery Plan creation input.
1263
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1264
+ # to the HTTP request.
1265
+ #
1266
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1267
+ #
1268
+ def begin_create_async(recovery_plan_name, input, custom_headers = nil)
1269
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1270
+ fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil?
1271
+ fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
1272
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1273
+ fail ArgumentError, 'recovery_plan_name is nil' if recovery_plan_name.nil?
1274
+ fail ArgumentError, 'input is nil' if input.nil?
1275
+
1276
+
1277
+ request_headers = {}
1278
+
1279
+ # Set Headers
1280
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1281
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1282
+
1283
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1284
+
1285
+ # Serialize Request
1286
+ request_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::CreateRecoveryPlanInput.mapper()
1287
+ request_content = @client.serialize(request_mapper, input)
1288
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1289
+
1290
+ path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}'
1291
+
1292
+ request_url = @base_url || @client.base_url
1293
+
1294
+ options = {
1295
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1296
+ path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'recoveryPlanName' => recovery_plan_name},
1297
+ query_params: {'api-version' => @client.api_version},
1298
+ body: request_content,
1299
+ headers: request_headers.merge(custom_headers || {}),
1300
+ base_url: request_url
1301
+ }
1302
+ promise = @client.make_request_async(:put, path_template, options)
1303
+
1304
+ promise = promise.then do |result|
1305
+ http_response = result.response
1306
+ status_code = http_response.status
1307
+ response_content = http_response.body
1308
+ unless status_code == 200 || status_code == 202
1309
+ error_model = JSON.load(response_content)
1310
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1311
+ end
1312
+
1313
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1314
+ # Deserialize Response
1315
+ if status_code == 200
1316
+ begin
1317
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1318
+ result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::RecoveryPlan.mapper()
1319
+ result.body = @client.deserialize(result_mapper, parsed_response)
1320
+ rescue Exception => e
1321
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1322
+ end
1323
+ end
1324
+
1325
+ result
1326
+ end
1327
+
1328
+ promise.execute
1329
+ end
1330
+
1331
+ #
1332
+ # Deletes the specified recovery plan.
1333
+ #
1334
+ # Delete a recovery plan.
1335
+ #
1336
+ # @param recovery_plan_name [String] Recovery plan name.
1337
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1338
+ # will be added to the HTTP request.
1339
+ #
1340
+ #
1341
+ def begin_delete(recovery_plan_name, custom_headers = nil)
1342
+ response = begin_delete_async(recovery_plan_name, custom_headers).value!
1343
+ nil
1344
+ end
1345
+
1346
+ #
1347
+ # Deletes the specified recovery plan.
1348
+ #
1349
+ # Delete a recovery plan.
1350
+ #
1351
+ # @param recovery_plan_name [String] Recovery plan name.
1352
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1353
+ # will be added to the HTTP request.
1354
+ #
1355
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1356
+ #
1357
+ def begin_delete_with_http_info(recovery_plan_name, custom_headers = nil)
1358
+ begin_delete_async(recovery_plan_name, custom_headers).value!
1359
+ end
1360
+
1361
+ #
1362
+ # Deletes the specified recovery plan.
1363
+ #
1364
+ # Delete a recovery plan.
1365
+ #
1366
+ # @param recovery_plan_name [String] Recovery plan name.
1367
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1368
+ # to the HTTP request.
1369
+ #
1370
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1371
+ #
1372
+ def begin_delete_async(recovery_plan_name, custom_headers = nil)
1373
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1374
+ fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil?
1375
+ fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
1376
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1377
+ fail ArgumentError, 'recovery_plan_name is nil' if recovery_plan_name.nil?
1378
+
1379
+
1380
+ request_headers = {}
1381
+
1382
+ # Set Headers
1383
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1384
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1385
+ path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}'
1386
+
1387
+ request_url = @base_url || @client.base_url
1388
+
1389
+ options = {
1390
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1391
+ path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'recoveryPlanName' => recovery_plan_name},
1392
+ query_params: {'api-version' => @client.api_version},
1393
+ headers: request_headers.merge(custom_headers || {}),
1394
+ base_url: request_url
1395
+ }
1396
+ promise = @client.make_request_async(:delete, path_template, options)
1397
+
1398
+ promise = promise.then do |result|
1399
+ http_response = result.response
1400
+ status_code = http_response.status
1401
+ response_content = http_response.body
1402
+ unless status_code == 202 || status_code == 204
1403
+ error_model = JSON.load(response_content)
1404
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1405
+ end
1406
+
1407
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1408
+
1409
+ result
1410
+ end
1411
+
1412
+ promise.execute
1413
+ end
1414
+
1415
+ #
1416
+ # Updates the given recovery plan.
1417
+ #
1418
+ # The operation to update a recovery plan.
1419
+ #
1420
+ # @param recovery_plan_name [String] Recovery plan name.
1421
+ # @param input [UpdateRecoveryPlanInput] Update recovery plan input
1422
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1423
+ # will be added to the HTTP request.
1424
+ #
1425
+ # @return [RecoveryPlan] operation results.
1426
+ #
1427
+ def begin_update(recovery_plan_name, input, custom_headers = nil)
1428
+ response = begin_update_async(recovery_plan_name, input, custom_headers).value!
1429
+ response.body unless response.nil?
1430
+ end
1431
+
1432
+ #
1433
+ # Updates the given recovery plan.
1434
+ #
1435
+ # The operation to update a recovery plan.
1436
+ #
1437
+ # @param recovery_plan_name [String] Recovery plan name.
1438
+ # @param input [UpdateRecoveryPlanInput] Update recovery plan input
1439
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1440
+ # will be added to the HTTP request.
1441
+ #
1442
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1443
+ #
1444
+ def begin_update_with_http_info(recovery_plan_name, input, custom_headers = nil)
1445
+ begin_update_async(recovery_plan_name, input, custom_headers).value!
1446
+ end
1447
+
1448
+ #
1449
+ # Updates the given recovery plan.
1450
+ #
1451
+ # The operation to update a recovery plan.
1452
+ #
1453
+ # @param recovery_plan_name [String] Recovery plan name.
1454
+ # @param input [UpdateRecoveryPlanInput] Update recovery plan input
1455
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1456
+ # to the HTTP request.
1457
+ #
1458
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1459
+ #
1460
+ def begin_update_async(recovery_plan_name, input, custom_headers = nil)
1461
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1462
+ fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil?
1463
+ fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
1464
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1465
+ fail ArgumentError, 'recovery_plan_name is nil' if recovery_plan_name.nil?
1466
+ fail ArgumentError, 'input is nil' if input.nil?
1467
+
1468
+
1469
+ request_headers = {}
1470
+
1471
+ # Set Headers
1472
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1473
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1474
+
1475
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1476
+
1477
+ # Serialize Request
1478
+ request_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::UpdateRecoveryPlanInput.mapper()
1479
+ request_content = @client.serialize(request_mapper, input)
1480
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1481
+
1482
+ path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}'
1483
+
1484
+ request_url = @base_url || @client.base_url
1485
+
1486
+ options = {
1487
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1488
+ path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'recoveryPlanName' => recovery_plan_name},
1489
+ query_params: {'api-version' => @client.api_version},
1490
+ body: request_content,
1491
+ headers: request_headers.merge(custom_headers || {}),
1492
+ base_url: request_url
1493
+ }
1494
+ promise = @client.make_request_async(:patch, path_template, options)
1495
+
1496
+ promise = promise.then do |result|
1497
+ http_response = result.response
1498
+ status_code = http_response.status
1499
+ response_content = http_response.body
1500
+ unless status_code == 200 || status_code == 202
1501
+ error_model = JSON.load(response_content)
1502
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1503
+ end
1504
+
1505
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1506
+ # Deserialize Response
1507
+ if status_code == 200
1508
+ begin
1509
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1510
+ result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::RecoveryPlan.mapper()
1511
+ result.body = @client.deserialize(result_mapper, parsed_response)
1512
+ rescue Exception => e
1513
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1514
+ end
1515
+ end
1516
+
1517
+ result
1518
+ end
1519
+
1520
+ promise.execute
1521
+ end
1522
+
1523
+ #
1524
+ # Gets the list of recovery plans.
1525
+ #
1526
+ # Lists the recovery plans in the vault.
1527
+ #
1528
+ # @param next_page_link [String] The NextLink from the previous successful call
1529
+ # to List operation.
1530
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1531
+ # will be added to the HTTP request.
1532
+ #
1533
+ # @return [RecoveryPlanCollection] operation results.
1534
+ #
1535
+ def list_next(next_page_link, custom_headers = nil)
1536
+ response = list_next_async(next_page_link, custom_headers).value!
1537
+ response.body unless response.nil?
1538
+ end
1539
+
1540
+ #
1541
+ # Gets the list of recovery plans.
1542
+ #
1543
+ # Lists the recovery plans in the vault.
1544
+ #
1545
+ # @param next_page_link [String] The NextLink from the previous successful call
1546
+ # to List operation.
1547
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1548
+ # will be added to the HTTP request.
1549
+ #
1550
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1551
+ #
1552
+ def list_next_with_http_info(next_page_link, custom_headers = nil)
1553
+ list_next_async(next_page_link, custom_headers).value!
1554
+ end
1555
+
1556
+ #
1557
+ # Gets the list of recovery plans.
1558
+ #
1559
+ # Lists the recovery plans in the vault.
1560
+ #
1561
+ # @param next_page_link [String] The NextLink from the previous successful call
1562
+ # to List operation.
1563
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1564
+ # to the HTTP request.
1565
+ #
1566
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1567
+ #
1568
+ def list_next_async(next_page_link, custom_headers = nil)
1569
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1570
+
1571
+
1572
+ request_headers = {}
1573
+
1574
+ # Set Headers
1575
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1576
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1577
+ path_template = '{nextLink}'
1578
+
1579
+ request_url = @base_url || @client.base_url
1580
+
1581
+ options = {
1582
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1583
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1584
+ headers: request_headers.merge(custom_headers || {}),
1585
+ base_url: request_url
1586
+ }
1587
+ promise = @client.make_request_async(:get, path_template, options)
1588
+
1589
+ promise = promise.then do |result|
1590
+ http_response = result.response
1591
+ status_code = http_response.status
1592
+ response_content = http_response.body
1593
+ unless status_code == 200
1594
+ error_model = JSON.load(response_content)
1595
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1596
+ end
1597
+
1598
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1599
+ # Deserialize Response
1600
+ if status_code == 200
1601
+ begin
1602
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1603
+ result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::RecoveryPlanCollection.mapper()
1604
+ result.body = @client.deserialize(result_mapper, parsed_response)
1605
+ rescue Exception => e
1606
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1607
+ end
1608
+ end
1609
+
1610
+ result
1611
+ end
1612
+
1613
+ promise.execute
1614
+ end
1615
+
1616
+ #
1617
+ # Gets the list of recovery plans.
1618
+ #
1619
+ # Lists the recovery plans in the vault.
1620
+ #
1621
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1622
+ # will be added to the HTTP request.
1623
+ #
1624
+ # @return [RecoveryPlanCollection] which provide lazy access to pages of the
1625
+ # response.
1626
+ #
1627
+ def list_as_lazy(custom_headers = nil)
1628
+ response = list_async(custom_headers).value!
1629
+ unless response.nil?
1630
+ page = response.body
1631
+ page.next_method = Proc.new do |next_page_link|
1632
+ list_next_async(next_page_link, custom_headers)
1633
+ end
1634
+ page
1635
+ end
1636
+ end
1637
+
1638
+ end
1639
+ end