azure_mgmt_recovery_services_site_recovery 0.16.0 → 0.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (374) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2016-08-10/generated/azure_mgmt_recovery_services_site_recovery/site_recovery_management_client.rb +7 -6
  3. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery.rb +392 -0
  4. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/a2aapply_recovery_point_input.rb +50 -0
  5. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/a2acontainer_creation_input.rb +50 -0
  6. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/a2acontainer_mapping_input.rb +73 -0
  7. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/a2aenable_protection_input.rb +169 -0
  8. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/a2aevent_details.rb +116 -0
  9. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/a2afailover_provider_input.rb +75 -0
  10. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/a2apolicy_creation_input.rb +97 -0
  11. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/a2apolicy_details.rb +107 -0
  12. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/a2aprotected_disk_details.rb +182 -0
  13. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/a2aprotected_managed_disk_details.rb +206 -0
  14. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/a2aprotection_container_mapping_details.rb +95 -0
  15. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/a2arecovery_point_details.rb +63 -0
  16. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/a2areplication_details.rb +431 -0
  17. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/a2areprotect_input.rb +126 -0
  18. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/a2arp_recovery_point_type.rb +18 -0
  19. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/a2aswitch_protection_input.rb +158 -0
  20. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/a2aupdate_container_mapping_input.rb +73 -0
  21. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/a2aupdate_replication_protected_item_input.rb +104 -0
  22. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/a2avm_disk_input_details.rb +68 -0
  23. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/a2avm_managed_disk_input_details.rb +92 -0
  24. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/a2avm_managed_disk_update_details.rb +68 -0
  25. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/add_vcenter_request.rb +48 -0
  26. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/add_vcenter_request_properties.rb +92 -0
  27. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/agent_auto_update_status.rb +16 -0
  28. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/agent_version_status.rb +19 -0
  29. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/alert.rb +82 -0
  30. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/alert_collection.rb +98 -0
  31. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/alert_properties.rb +77 -0
  32. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/alternate_location_recovery_option.rb +16 -0
  33. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/apply_recovery_point_input.rb +48 -0
  34. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/apply_recovery_point_input_properties.rb +61 -0
  35. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/apply_recovery_point_provider_specific_input.rb +48 -0
  36. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/asr_job_details.rb +66 -0
  37. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/asrtask.rb +197 -0
  38. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/automation_runbook_task_details.rb +150 -0
  39. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/azure_fabric_creation_input.rb +61 -0
  40. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/azure_fabric_specific_details.rb +80 -0
  41. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/azure_to_azure_create_network_mapping_input.rb +62 -0
  42. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/azure_to_azure_network_mapping_settings.rb +72 -0
  43. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/azure_to_azure_update_network_mapping_input.rb +61 -0
  44. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/azure_to_azure_vm_synced_config_details.rb +94 -0
  45. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/azure_vm_disk_details.rb +112 -0
  46. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/compute_size_error_details.rb +58 -0
  47. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/configuration_settings.rb +49 -0
  48. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/configure_alert_request.rb +48 -0
  49. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/configure_alert_request_properties.rb +77 -0
  50. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/consistency_check_task_details.rb +72 -0
  51. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/create_network_mapping_input.rb +48 -0
  52. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/create_network_mapping_input_properties.rb +72 -0
  53. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/create_policy_input.rb +47 -0
  54. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/create_policy_input_properties.rb +49 -0
  55. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/create_protection_container_input.rb +48 -0
  56. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/create_protection_container_input_properties.rb +58 -0
  57. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/create_protection_container_mapping_input.rb +48 -0
  58. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/create_protection_container_mapping_input_properties.rb +73 -0
  59. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/create_recovery_plan_input.rb +48 -0
  60. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/create_recovery_plan_input_properties.rb +89 -0
  61. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/current_scenario_details.rb +68 -0
  62. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/data_store.rb +90 -0
  63. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/data_sync_status.rb +16 -0
  64. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/disable_protection_input.rb +48 -0
  65. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/disable_protection_input_properties.rb +63 -0
  66. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/disable_protection_provider_specific_input.rb +46 -0
  67. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/disable_protection_reason.rb +16 -0
  68. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/discover_protectable_item_request.rb +48 -0
  69. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/discover_protectable_item_request_properties.rb +69 -0
  70. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/disk_details.rb +79 -0
  71. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/disk_volume_details.rb +57 -0
  72. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/display.rb +105 -0
  73. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/enable_protection_input.rb +48 -0
  74. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/enable_protection_input_properties.rb +75 -0
  75. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/enable_protection_provider_specific_input.rb +50 -0
  76. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/encryption_details.rb +68 -0
  77. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/event.rb +82 -0
  78. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/event_collection.rb +98 -0
  79. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/event_properties.rb +163 -0
  80. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/event_provider_specific_details.rb +51 -0
  81. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/event_query_parameter.rb +115 -0
  82. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/event_specific_details.rb +46 -0
  83. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/export_job_details.rb +88 -0
  84. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/fabric.rb +82 -0
  85. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/fabric_collection.rb +98 -0
  86. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/fabric_creation_input.rb +47 -0
  87. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/fabric_creation_input_properties.rb +50 -0
  88. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/fabric_properties.rb +137 -0
  89. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/fabric_replication_group_task_details.rb +84 -0
  90. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/fabric_specific_create_network_mapping_input.rb +48 -0
  91. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/fabric_specific_creation_input.rb +47 -0
  92. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/fabric_specific_details.rb +50 -0
  93. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/fabric_specific_update_network_mapping_input.rb +48 -0
  94. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/failover_deployment_model.rb +17 -0
  95. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/failover_job_details.rb +87 -0
  96. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/failover_process_server_request.rb +48 -0
  97. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/failover_process_server_request_properties.rb +99 -0
  98. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/failover_replication_protected_item_details.rb +134 -0
  99. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/group_task_details.rb +69 -0
  100. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/health_error.rb +193 -0
  101. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/health_error_category.rb +21 -0
  102. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/health_error_summary.rb +129 -0
  103. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica2012event_details.rb +94 -0
  104. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica2012r2event_details.rb +94 -0
  105. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_apply_recovery_point_input.rb +84 -0
  106. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_enable_protection_input.rb +218 -0
  107. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_event_details.rb +83 -0
  108. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_failback_provider_input.rb +83 -0
  109. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_failover_provider_input.rb +96 -0
  110. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_policy_details.rb +120 -0
  111. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_policy_input.rb +117 -0
  112. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_replication_details.rb +340 -0
  113. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_reprotect_input.rb +117 -0
  114. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_rp_recovery_point_type.rb +17 -0
  115. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_update_replication_protected_item_input.rb +87 -0
  116. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_base_event_details.rb +94 -0
  117. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_base_policy_details.rb +163 -0
  118. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_base_replication_details.rb +146 -0
  119. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_blue_policy_details.rb +174 -0
  120. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_blue_policy_input.rb +174 -0
  121. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_blue_replication_details.rb +146 -0
  122. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_policy_details.rb +163 -0
  123. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_policy_input.rb +163 -0
  124. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_replication_details.rb +146 -0
  125. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vsite_details.rb +50 -0
  126. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vvirtual_machine_details.rb +145 -0
  127. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/identity_information.rb +124 -0
  128. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/identity_provider_type.rb +15 -0
  129. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_agent_details.rb +81 -0
  130. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_agent_version_details.rb +82 -0
  131. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2apply_recovery_point_input.rb +61 -0
  132. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2enable_protection_input.rb +229 -0
  133. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2event_details.rb +128 -0
  134. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2failover_provider_input.rb +74 -0
  135. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2policy_details.rb +107 -0
  136. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2policy_input.rb +108 -0
  137. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2protected_disk_details.rb +201 -0
  138. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2recovery_point_details.rb +62 -0
  139. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2replication_details.rb +650 -0
  140. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2reprotect_input.rb +136 -0
  141. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2update_replication_protected_item_input.rb +87 -0
  142. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_base_policy_details.rb +96 -0
  143. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_disable_protection_provider_specific_input.rb +63 -0
  144. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_disk_details.rb +110 -0
  145. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_disk_exclusion_input.rb +78 -0
  146. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_disk_signature_exclusion_options.rb +48 -0
  147. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_enable_protection_input.rb +169 -0
  148. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_failover_provider_input.rb +78 -0
  149. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_policy_details.rb +96 -0
  150. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_policy_input.rb +97 -0
  151. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_protected_disk_details.rb +201 -0
  152. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_replication_details.rb +516 -0
  153. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_reprotect_input.rb +147 -0
  154. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_v2rp_recovery_point_type.rb +18 -0
  155. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_volume_exclusion_options.rb +62 -0
  156. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/inconsistent_vm_details.rb +97 -0
  157. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/initial_replication_details.rb +57 -0
  158. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/inline_workflow_task_details.rb +86 -0
  159. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/inner_health_error.rb +172 -0
  160. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/input_endpoint.rb +79 -0
  161. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/job.rb +82 -0
  162. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/job_collection.rb +98 -0
  163. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/job_details.rb +71 -0
  164. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/job_entity.rb +102 -0
  165. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/job_error_details.rb +92 -0
  166. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/job_properties.rb +224 -0
  167. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/job_query_parameter.rb +90 -0
  168. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/job_status_event_details.rb +94 -0
  169. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/job_task_details.rb +63 -0
  170. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/license_type.rb +17 -0
  171. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/logical_network.rb +82 -0
  172. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/logical_network_collection.rb +98 -0
  173. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/logical_network_properties.rb +82 -0
  174. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/manual_action_task_details.rb +83 -0
  175. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/master_target_server.rb +272 -0
  176. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/mobility_service_update.rb +69 -0
  177. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/multi_vm_group_create_option.rb +16 -0
  178. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/multi_vm_sync_point_option.rb +16 -0
  179. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/multi_vm_sync_status.rb +16 -0
  180. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/network.rb +82 -0
  181. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/network_collection.rb +98 -0
  182. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/network_mapping.rb +88 -0
  183. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/network_mapping_collection.rb +102 -0
  184. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/network_mapping_fabric_specific_settings.rb +48 -0
  185. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/network_mapping_properties.rb +138 -0
  186. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/network_properties.rb +88 -0
  187. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/operations_discovery.rb +100 -0
  188. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/operations_discovery_collection.rb +98 -0
  189. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/osdetails.rb +101 -0
  190. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/osdisk_details.rb +68 -0
  191. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/planned_failover_input.rb +48 -0
  192. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/planned_failover_input_properties.rb +60 -0
  193. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/policy.rb +82 -0
  194. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/policy_collection.rb +98 -0
  195. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/policy_properties.rb +60 -0
  196. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/policy_provider_specific_details.rb +55 -0
  197. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/policy_provider_specific_input.rb +52 -0
  198. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/possible_operations_directions.rb +16 -0
  199. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/presence_status.rb +17 -0
  200. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/process_server.rb +364 -0
  201. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/protectable_item.rb +82 -0
  202. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/protectable_item_collection.rb +98 -0
  203. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/protectable_item_properties.rb +133 -0
  204. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/protectable_item_query_parameter.rb +46 -0
  205. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/protected_items_query_parameter.rb +92 -0
  206. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/protection_container.rb +82 -0
  207. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/protection_container_collection.rb +98 -0
  208. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/protection_container_fabric_specific_details.rb +47 -0
  209. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/protection_container_mapping.rb +82 -0
  210. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/protection_container_mapping_collection.rb +98 -0
  211. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/protection_container_mapping_properties.rb +169 -0
  212. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/protection_container_mapping_provider_specific_details.rb +47 -0
  213. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/protection_container_properties.rb +114 -0
  214. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/provider_error.rb +90 -0
  215. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/provider_specific_failover_input.rb +50 -0
  216. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/provider_specific_recovery_point_details.rb +47 -0
  217. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/rcm_azure_migration_policy_details.rb +107 -0
  218. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan.rb +82 -0
  219. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_a2afailover_input.rb +88 -0
  220. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_action.rb +100 -0
  221. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_action_details.rb +48 -0
  222. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_action_location.rb +16 -0
  223. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_automation_runbook_action_details.rb +85 -0
  224. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_collection.rb +98 -0
  225. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_group.rb +107 -0
  226. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_group_task_details.rb +100 -0
  227. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_group_type.rb +17 -0
  228. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_hyper_vreplica_azure_failback_input.rb +75 -0
  229. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_hyper_vreplica_azure_failover_input.rb +97 -0
  230. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_in_mage_azure_v2failover_input.rb +86 -0
  231. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_in_mage_failover_input.rb +62 -0
  232. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_manual_action_details.rb +61 -0
  233. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_planned_failover_input.rb +48 -0
  234. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_planned_failover_input_properties.rb +71 -0
  235. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_properties.rb +226 -0
  236. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_protected_item.rb +57 -0
  237. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_provider_specific_failover_input.rb +51 -0
  238. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_script_action_details.rb +84 -0
  239. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_shutdown_group_task_details.rb +100 -0
  240. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_test_failover_cleanup_input.rb +48 -0
  241. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_test_failover_cleanup_input_properties.rb +47 -0
  242. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_test_failover_input.rb +48 -0
  243. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_test_failover_input_properties.rb +104 -0
  244. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_unplanned_failover_input.rb +48 -0
  245. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_unplanned_failover_input_properties.rb +84 -0
  246. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_point.rb +82 -0
  247. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_point_collection.rb +98 -0
  248. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_point_properties.rb +73 -0
  249. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_point_sync_type.rb +16 -0
  250. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_point_type.rb +17 -0
  251. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_services_provider.rb +82 -0
  252. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_services_provider_collection.rb +98 -0
  253. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_services_provider_properties.rb +220 -0
  254. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/remove_protection_container_mapping_input.rb +48 -0
  255. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/remove_protection_container_mapping_input_properties.rb +49 -0
  256. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/renew_certificate_input.rb +48 -0
  257. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/renew_certificate_input_properties.rb +46 -0
  258. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/replication_group_details.rb +50 -0
  259. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/replication_protected_item.rb +82 -0
  260. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/replication_protected_item_collection.rb +99 -0
  261. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/replication_protected_item_operation.rb +27 -0
  262. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/replication_protected_item_properties.rb +360 -0
  263. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/replication_provider_container_unmapping_input.rb +47 -0
  264. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/replication_provider_specific_container_creation_input.rb +47 -0
  265. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/replication_provider_specific_container_mapping_input.rb +47 -0
  266. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/replication_provider_specific_settings.rb +52 -0
  267. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/replication_provider_specific_update_container_mapping_input.rb +47 -0
  268. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/resource.rb +82 -0
  269. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/resource_health_summary.rb +68 -0
  270. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/resume_job_params.rb +47 -0
  271. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/resume_job_params_properties.rb +46 -0
  272. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/retention_volume.rb +79 -0
  273. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/reverse_replication_input.rb +48 -0
  274. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/reverse_replication_input_properties.rb +61 -0
  275. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/reverse_replication_provider_specific_input.rb +49 -0
  276. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/role_assignment.rb +90 -0
  277. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/rp_in_mage_recovery_point_type.rb +17 -0
  278. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/run_as_account.rb +57 -0
  279. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/san_enable_protection_input.rb +50 -0
  280. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/script_action_task_details.rb +95 -0
  281. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/service_error.rb +90 -0
  282. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/set_multi_vm_sync_status.rb +16 -0
  283. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/severity.rb +18 -0
  284. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/source_site_operations.rb +16 -0
  285. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/storage_classification.rb +83 -0
  286. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/storage_classification_collection.rb +98 -0
  287. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/storage_classification_mapping.rb +83 -0
  288. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/storage_classification_mapping_collection.rb +99 -0
  289. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/storage_classification_mapping_input.rb +48 -0
  290. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/storage_classification_mapping_properties.rb +46 -0
  291. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/storage_classification_properties.rb +46 -0
  292. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/storage_mapping_input_properties.rb +46 -0
  293. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/subnet.rb +76 -0
  294. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/switch_protection_input.rb +47 -0
  295. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/switch_protection_input_properties.rb +61 -0
  296. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/switch_protection_job_details.rb +77 -0
  297. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/switch_protection_provider_specific_input.rb +46 -0
  298. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/target_compute_size.rb +80 -0
  299. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/target_compute_size_collection.rb +98 -0
  300. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/target_compute_size_properties.rb +138 -0
  301. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/task_type_details.rb +53 -0
  302. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/test_failover_cleanup_input.rb +48 -0
  303. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/test_failover_cleanup_input_properties.rb +46 -0
  304. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/test_failover_input.rb +47 -0
  305. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/test_failover_input_properties.rb +94 -0
  306. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/test_failover_job_details.rb +143 -0
  307. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/unplanned_failover_input.rb +48 -0
  308. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/unplanned_failover_input_properties.rb +71 -0
  309. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/update_mobility_service_request.rb +48 -0
  310. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/update_mobility_service_request_properties.rb +46 -0
  311. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/update_network_mapping_input.rb +48 -0
  312. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/update_network_mapping_input_properties.rb +72 -0
  313. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/update_policy_input.rb +47 -0
  314. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/update_policy_input_properties.rb +49 -0
  315. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/update_protection_container_mapping_input.rb +48 -0
  316. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/update_protection_container_mapping_input_properties.rb +51 -0
  317. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/update_recovery_plan_input.rb +48 -0
  318. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/update_recovery_plan_input_properties.rb +55 -0
  319. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/update_replication_protected_item_input.rb +48 -0
  320. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/update_replication_protected_item_input_properties.rb +152 -0
  321. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/update_replication_protected_item_provider_input.rb +49 -0
  322. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/update_vcenter_request.rb +48 -0
  323. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/update_vcenter_request_properties.rb +92 -0
  324. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/vault_health_details.rb +82 -0
  325. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/vault_health_properties.rb +94 -0
  326. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/vcenter.rb +82 -0
  327. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/vcenter_collection.rb +98 -0
  328. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/vcenter_properties.rb +168 -0
  329. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/version_details.rb +70 -0
  330. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/virtual_machine_task_details.rb +84 -0
  331. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/vm_nic_updates_task_details.rb +83 -0
  332. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/vmm_details.rb +50 -0
  333. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/vmm_to_azure_create_network_mapping_input.rb +51 -0
  334. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/vmm_to_azure_network_mapping_settings.rb +50 -0
  335. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/vmm_to_azure_update_network_mapping_input.rb +51 -0
  336. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/vmm_to_vmm_create_network_mapping_input.rb +51 -0
  337. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/vmm_to_vmm_network_mapping_settings.rb +50 -0
  338. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/vmm_to_vmm_update_network_mapping_input.rb +51 -0
  339. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/vmm_virtual_machine_details.rb +145 -0
  340. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/vmnic_details.rb +167 -0
  341. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/vmnic_input_details.rb +79 -0
  342. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/vmware_cbt_policy_creation_input.rb +84 -0
  343. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/vmware_cbt_policy_details.rb +95 -0
  344. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/vmware_details.rb +434 -0
  345. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/vmware_v2fabric_creation_input.rb +72 -0
  346. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/vmware_v2fabric_specific_details.rb +94 -0
  347. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/models/vmware_virtual_machine_details.rb +182 -0
  348. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/module_definition.rb +9 -0
  349. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/operations.rb +232 -0
  350. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/recovery_points.rb +363 -0
  351. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/replication_alert_settings.rb +444 -0
  352. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/replication_events.rb +332 -0
  353. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/replication_fabrics.rb +1303 -0
  354. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/replication_jobs.rb +908 -0
  355. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/replication_logical_networks.rb +338 -0
  356. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/replication_network_mappings.rb +1016 -0
  357. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/replication_networks.rb +546 -0
  358. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/replication_policies.rb +754 -0
  359. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/replication_protectable_items.rb +351 -0
  360. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/replication_protected_items.rb +2755 -0
  361. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/replication_protection_container_mappings.rb +1174 -0
  362. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/replication_protection_containers.rb +1178 -0
  363. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/replication_recovery_plans.rb +1639 -0
  364. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/replication_recovery_services_providers.rb +975 -0
  365. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/replication_storage_classification_mappings.rb +866 -0
  366. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/replication_storage_classifications.rb +546 -0
  367. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/replication_vault_health.rb +241 -0
  368. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/replicationv_centers.rb +1003 -0
  369. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/site_recovery_management_client.rb +223 -0
  370. data/lib/2018-01-10/generated/azure_mgmt_recovery_services_site_recovery/target_compute_sizes.rb +252 -0
  371. data/lib/azure_mgmt_recovery_services_site_recovery.rb +1 -0
  372. data/lib/profiles/latest/modules/recoveryservicessiterecovery_profile_module.rb +1071 -993
  373. data/lib/version.rb +1 -1
  374. metadata +373 -5
@@ -0,0 +1,351 @@
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::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10
7
+ #
8
+ # ReplicationProtectableItems
9
+ #
10
+ class ReplicationProtectableItems
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the ReplicationProtectableItems 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
+ # Gets the list of protectable items.
26
+ #
27
+ # Lists the protectable items in a protection container.
28
+ #
29
+ # @param fabric_name [String] Fabric name.
30
+ # @param protection_container_name [String] Protection container name.
31
+ # @param filter [String] OData filter options.
32
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
33
+ # will be added to the HTTP request.
34
+ #
35
+ # @return [Array<ProtectableItem>] operation results.
36
+ #
37
+ def list_by_replication_protection_containers(fabric_name, protection_container_name, filter:nil, custom_headers:nil)
38
+ first_page = list_by_replication_protection_containers_as_lazy(fabric_name, protection_container_name, filter:filter, custom_headers:custom_headers)
39
+ first_page.get_all_items
40
+ end
41
+
42
+ #
43
+ # Gets the list of protectable items.
44
+ #
45
+ # Lists the protectable items in a protection container.
46
+ #
47
+ # @param fabric_name [String] Fabric name.
48
+ # @param protection_container_name [String] Protection container name.
49
+ # @param filter [String] OData filter options.
50
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
51
+ # will be added to the HTTP request.
52
+ #
53
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
54
+ #
55
+ def list_by_replication_protection_containers_with_http_info(fabric_name, protection_container_name, filter:nil, custom_headers:nil)
56
+ list_by_replication_protection_containers_async(fabric_name, protection_container_name, filter:filter, custom_headers:custom_headers).value!
57
+ end
58
+
59
+ #
60
+ # Gets the list of protectable items.
61
+ #
62
+ # Lists the protectable items in a protection container.
63
+ #
64
+ # @param fabric_name [String] Fabric name.
65
+ # @param protection_container_name [String] Protection container name.
66
+ # @param filter [String] OData filter options.
67
+ # @param [Hash{String => String}] A hash of custom headers that will be added
68
+ # to the HTTP request.
69
+ #
70
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
71
+ #
72
+ def list_by_replication_protection_containers_async(fabric_name, protection_container_name, filter:nil, custom_headers:nil)
73
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
74
+ fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil?
75
+ fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
76
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
77
+ fail ArgumentError, 'fabric_name is nil' if fabric_name.nil?
78
+ fail ArgumentError, 'protection_container_name is nil' if protection_container_name.nil?
79
+
80
+
81
+ request_headers = {}
82
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
83
+
84
+ # Set Headers
85
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
86
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
87
+ path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectableItems'
88
+
89
+ request_url = @base_url || @client.base_url
90
+
91
+ options = {
92
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
93
+ path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'protectionContainerName' => protection_container_name},
94
+ query_params: {'api-version' => @client.api_version,'$filter' => filter},
95
+ headers: request_headers.merge(custom_headers || {}),
96
+ base_url: request_url
97
+ }
98
+ promise = @client.make_request_async(:get, path_template, options)
99
+
100
+ promise = promise.then do |result|
101
+ http_response = result.response
102
+ status_code = http_response.status
103
+ response_content = http_response.body
104
+ unless status_code == 200
105
+ error_model = JSON.load(response_content)
106
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
107
+ end
108
+
109
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
110
+ # Deserialize Response
111
+ if status_code == 200
112
+ begin
113
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
114
+ result_mapper = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::ProtectableItemCollection.mapper()
115
+ result.body = @client.deserialize(result_mapper, parsed_response)
116
+ rescue Exception => e
117
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
118
+ end
119
+ end
120
+
121
+ result
122
+ end
123
+
124
+ promise.execute
125
+ end
126
+
127
+ #
128
+ # Gets the details of a protectable item.
129
+ #
130
+ # The operation to get the details of a protectable item.
131
+ #
132
+ # @param fabric_name [String] Fabric name.
133
+ # @param protection_container_name [String] Protection container name.
134
+ # @param protectable_item_name [String] Protectable item name.
135
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
136
+ # will be added to the HTTP request.
137
+ #
138
+ # @return [ProtectableItem] operation results.
139
+ #
140
+ def get(fabric_name, protection_container_name, protectable_item_name, custom_headers:nil)
141
+ response = get_async(fabric_name, protection_container_name, protectable_item_name, custom_headers:custom_headers).value!
142
+ response.body unless response.nil?
143
+ end
144
+
145
+ #
146
+ # Gets the details of a protectable item.
147
+ #
148
+ # The operation to get the details of a protectable item.
149
+ #
150
+ # @param fabric_name [String] Fabric name.
151
+ # @param protection_container_name [String] Protection container name.
152
+ # @param protectable_item_name [String] Protectable item name.
153
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
154
+ # will be added to the HTTP request.
155
+ #
156
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
157
+ #
158
+ def get_with_http_info(fabric_name, protection_container_name, protectable_item_name, custom_headers:nil)
159
+ get_async(fabric_name, protection_container_name, protectable_item_name, custom_headers:custom_headers).value!
160
+ end
161
+
162
+ #
163
+ # Gets the details of a protectable item.
164
+ #
165
+ # The operation to get the details of a protectable item.
166
+ #
167
+ # @param fabric_name [String] Fabric name.
168
+ # @param protection_container_name [String] Protection container name.
169
+ # @param protectable_item_name [String] Protectable item name.
170
+ # @param [Hash{String => String}] A hash of custom headers that will be added
171
+ # to the HTTP request.
172
+ #
173
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
174
+ #
175
+ def get_async(fabric_name, protection_container_name, protectable_item_name, custom_headers:nil)
176
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
177
+ fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil?
178
+ fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
179
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
180
+ fail ArgumentError, 'fabric_name is nil' if fabric_name.nil?
181
+ fail ArgumentError, 'protection_container_name is nil' if protection_container_name.nil?
182
+ fail ArgumentError, 'protectable_item_name is nil' if protectable_item_name.nil?
183
+
184
+
185
+ request_headers = {}
186
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
187
+
188
+ # Set Headers
189
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
190
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
191
+ path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectableItems/{protectableItemName}'
192
+
193
+ request_url = @base_url || @client.base_url
194
+
195
+ options = {
196
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
197
+ path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'protectionContainerName' => protection_container_name,'protectableItemName' => protectable_item_name},
198
+ query_params: {'api-version' => @client.api_version},
199
+ headers: request_headers.merge(custom_headers || {}),
200
+ base_url: request_url
201
+ }
202
+ promise = @client.make_request_async(:get, path_template, options)
203
+
204
+ promise = promise.then do |result|
205
+ http_response = result.response
206
+ status_code = http_response.status
207
+ response_content = http_response.body
208
+ unless status_code == 200
209
+ error_model = JSON.load(response_content)
210
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
211
+ end
212
+
213
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
214
+ # Deserialize Response
215
+ if status_code == 200
216
+ begin
217
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
218
+ result_mapper = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::ProtectableItem.mapper()
219
+ result.body = @client.deserialize(result_mapper, parsed_response)
220
+ rescue Exception => e
221
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
222
+ end
223
+ end
224
+
225
+ result
226
+ end
227
+
228
+ promise.execute
229
+ end
230
+
231
+ #
232
+ # Gets the list of protectable items.
233
+ #
234
+ # Lists the protectable items in a protection container.
235
+ #
236
+ # @param next_page_link [String] The NextLink from the previous successful call
237
+ # to List operation.
238
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
239
+ # will be added to the HTTP request.
240
+ #
241
+ # @return [ProtectableItemCollection] operation results.
242
+ #
243
+ def list_by_replication_protection_containers_next(next_page_link, custom_headers:nil)
244
+ response = list_by_replication_protection_containers_next_async(next_page_link, custom_headers:custom_headers).value!
245
+ response.body unless response.nil?
246
+ end
247
+
248
+ #
249
+ # Gets the list of protectable items.
250
+ #
251
+ # Lists the protectable items in a protection container.
252
+ #
253
+ # @param next_page_link [String] The NextLink from the previous successful call
254
+ # to List operation.
255
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
256
+ # will be added to the HTTP request.
257
+ #
258
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
259
+ #
260
+ def list_by_replication_protection_containers_next_with_http_info(next_page_link, custom_headers:nil)
261
+ list_by_replication_protection_containers_next_async(next_page_link, custom_headers:custom_headers).value!
262
+ end
263
+
264
+ #
265
+ # Gets the list of protectable items.
266
+ #
267
+ # Lists the protectable items in a protection container.
268
+ #
269
+ # @param next_page_link [String] The NextLink from the previous successful call
270
+ # to List operation.
271
+ # @param [Hash{String => String}] A hash of custom headers that will be added
272
+ # to the HTTP request.
273
+ #
274
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
275
+ #
276
+ def list_by_replication_protection_containers_next_async(next_page_link, custom_headers:nil)
277
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
278
+
279
+
280
+ request_headers = {}
281
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
282
+
283
+ # Set Headers
284
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
285
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
286
+ path_template = '{nextLink}'
287
+
288
+ request_url = @base_url || @client.base_url
289
+
290
+ options = {
291
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
292
+ skip_encoding_path_params: {'nextLink' => next_page_link},
293
+ headers: request_headers.merge(custom_headers || {}),
294
+ base_url: request_url
295
+ }
296
+ promise = @client.make_request_async(:get, path_template, options)
297
+
298
+ promise = promise.then do |result|
299
+ http_response = result.response
300
+ status_code = http_response.status
301
+ response_content = http_response.body
302
+ unless status_code == 200
303
+ error_model = JSON.load(response_content)
304
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
305
+ end
306
+
307
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
308
+ # Deserialize Response
309
+ if status_code == 200
310
+ begin
311
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
312
+ result_mapper = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::ProtectableItemCollection.mapper()
313
+ result.body = @client.deserialize(result_mapper, parsed_response)
314
+ rescue Exception => e
315
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
316
+ end
317
+ end
318
+
319
+ result
320
+ end
321
+
322
+ promise.execute
323
+ end
324
+
325
+ #
326
+ # Gets the list of protectable items.
327
+ #
328
+ # Lists the protectable items in a protection container.
329
+ #
330
+ # @param fabric_name [String] Fabric name.
331
+ # @param protection_container_name [String] Protection container name.
332
+ # @param filter [String] OData filter options.
333
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
334
+ # will be added to the HTTP request.
335
+ #
336
+ # @return [ProtectableItemCollection] which provide lazy access to pages of the
337
+ # response.
338
+ #
339
+ def list_by_replication_protection_containers_as_lazy(fabric_name, protection_container_name, filter:nil, custom_headers:nil)
340
+ response = list_by_replication_protection_containers_async(fabric_name, protection_container_name, filter:filter, custom_headers:custom_headers).value!
341
+ unless response.nil?
342
+ page = response.body
343
+ page.next_method = Proc.new do |next_page_link|
344
+ list_by_replication_protection_containers_next_async(next_page_link, custom_headers:custom_headers)
345
+ end
346
+ page
347
+ end
348
+ end
349
+
350
+ end
351
+ end
@@ -0,0 +1,2755 @@
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::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10
7
+ #
8
+ # ReplicationProtectedItems
9
+ #
10
+ class ReplicationProtectedItems
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the ReplicationProtectedItems 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
+ # Gets the list of Replication protected items.
26
+ #
27
+ # Gets the list of ASR replication protected items in the protection container.
28
+ #
29
+ # @param fabric_name [String] Fabric name.
30
+ # @param protection_container_name [String] Protection container name.
31
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
32
+ # will be added to the HTTP request.
33
+ #
34
+ # @return [Array<ReplicationProtectedItem>] operation results.
35
+ #
36
+ def list_by_replication_protection_containers(fabric_name, protection_container_name, custom_headers:nil)
37
+ first_page = list_by_replication_protection_containers_as_lazy(fabric_name, protection_container_name, custom_headers:custom_headers)
38
+ first_page.get_all_items
39
+ end
40
+
41
+ #
42
+ # Gets the list of Replication protected items.
43
+ #
44
+ # Gets the list of ASR replication protected items in the protection container.
45
+ #
46
+ # @param fabric_name [String] Fabric name.
47
+ # @param protection_container_name [String] Protection container name.
48
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
49
+ # will be added to the HTTP request.
50
+ #
51
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
52
+ #
53
+ def list_by_replication_protection_containers_with_http_info(fabric_name, protection_container_name, custom_headers:nil)
54
+ list_by_replication_protection_containers_async(fabric_name, protection_container_name, custom_headers:custom_headers).value!
55
+ end
56
+
57
+ #
58
+ # Gets the list of Replication protected items.
59
+ #
60
+ # Gets the list of ASR replication protected items in the protection container.
61
+ #
62
+ # @param fabric_name [String] Fabric name.
63
+ # @param protection_container_name [String] Protection container name.
64
+ # @param [Hash{String => String}] A hash of custom headers that will be added
65
+ # to the HTTP request.
66
+ #
67
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
68
+ #
69
+ def list_by_replication_protection_containers_async(fabric_name, protection_container_name, custom_headers:nil)
70
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
71
+ fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil?
72
+ fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
73
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
74
+ fail ArgumentError, 'fabric_name is nil' if fabric_name.nil?
75
+ fail ArgumentError, 'protection_container_name is nil' if protection_container_name.nil?
76
+
77
+
78
+ request_headers = {}
79
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
80
+
81
+ # Set Headers
82
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
83
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
84
+ path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems'
85
+
86
+ request_url = @base_url || @client.base_url
87
+
88
+ options = {
89
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
90
+ path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'protectionContainerName' => protection_container_name},
91
+ query_params: {'api-version' => @client.api_version},
92
+ headers: request_headers.merge(custom_headers || {}),
93
+ base_url: request_url
94
+ }
95
+ promise = @client.make_request_async(:get, path_template, options)
96
+
97
+ promise = promise.then do |result|
98
+ http_response = result.response
99
+ status_code = http_response.status
100
+ response_content = http_response.body
101
+ unless status_code == 200
102
+ error_model = JSON.load(response_content)
103
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
104
+ end
105
+
106
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
107
+ # Deserialize Response
108
+ if status_code == 200
109
+ begin
110
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
111
+ result_mapper = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::ReplicationProtectedItemCollection.mapper()
112
+ result.body = @client.deserialize(result_mapper, parsed_response)
113
+ rescue Exception => e
114
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
115
+ end
116
+ end
117
+
118
+ result
119
+ end
120
+
121
+ promise.execute
122
+ end
123
+
124
+ #
125
+ # Gets the details of a Replication protected item.
126
+ #
127
+ # Gets the details of an ASR replication protected item.
128
+ #
129
+ # @param fabric_name [String] Fabric unique name.
130
+ # @param protection_container_name [String] Protection container name.
131
+ # @param replicated_protected_item_name [String] Replication protected item
132
+ # name.
133
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
134
+ # will be added to the HTTP request.
135
+ #
136
+ # @return [ReplicationProtectedItem] operation results.
137
+ #
138
+ def get(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers:nil)
139
+ response = get_async(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers:custom_headers).value!
140
+ response.body unless response.nil?
141
+ end
142
+
143
+ #
144
+ # Gets the details of a Replication protected item.
145
+ #
146
+ # Gets the details of an ASR replication protected item.
147
+ #
148
+ # @param fabric_name [String] Fabric unique name.
149
+ # @param protection_container_name [String] Protection container name.
150
+ # @param replicated_protected_item_name [String] Replication protected item
151
+ # name.
152
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
153
+ # will be added to the HTTP request.
154
+ #
155
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
156
+ #
157
+ def get_with_http_info(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers:nil)
158
+ get_async(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers:custom_headers).value!
159
+ end
160
+
161
+ #
162
+ # Gets the details of a Replication protected item.
163
+ #
164
+ # Gets the details of an ASR replication protected item.
165
+ #
166
+ # @param fabric_name [String] Fabric unique name.
167
+ # @param protection_container_name [String] Protection container name.
168
+ # @param replicated_protected_item_name [String] Replication protected item
169
+ # name.
170
+ # @param [Hash{String => String}] A hash of custom headers that will be added
171
+ # to the HTTP request.
172
+ #
173
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
174
+ #
175
+ def get_async(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers:nil)
176
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
177
+ fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil?
178
+ fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
179
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
180
+ fail ArgumentError, 'fabric_name is nil' if fabric_name.nil?
181
+ fail ArgumentError, 'protection_container_name is nil' if protection_container_name.nil?
182
+ fail ArgumentError, 'replicated_protected_item_name is nil' if replicated_protected_item_name.nil?
183
+
184
+
185
+ request_headers = {}
186
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
187
+
188
+ # Set Headers
189
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
190
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
191
+ path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}'
192
+
193
+ request_url = @base_url || @client.base_url
194
+
195
+ options = {
196
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
197
+ path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'protectionContainerName' => protection_container_name,'replicatedProtectedItemName' => replicated_protected_item_name},
198
+ query_params: {'api-version' => @client.api_version},
199
+ headers: request_headers.merge(custom_headers || {}),
200
+ base_url: request_url
201
+ }
202
+ promise = @client.make_request_async(:get, path_template, options)
203
+
204
+ promise = promise.then do |result|
205
+ http_response = result.response
206
+ status_code = http_response.status
207
+ response_content = http_response.body
208
+ unless status_code == 200
209
+ error_model = JSON.load(response_content)
210
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
211
+ end
212
+
213
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
214
+ # Deserialize Response
215
+ if status_code == 200
216
+ begin
217
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
218
+ result_mapper = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::ReplicationProtectedItem.mapper()
219
+ result.body = @client.deserialize(result_mapper, parsed_response)
220
+ rescue Exception => e
221
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
222
+ end
223
+ end
224
+
225
+ result
226
+ end
227
+
228
+ promise.execute
229
+ end
230
+
231
+ #
232
+ # Enables protection.
233
+ #
234
+ # The operation to create an ASR replication protected item (Enable
235
+ # replication).
236
+ #
237
+ # @param fabric_name [String] Name of the fabric.
238
+ # @param protection_container_name [String] Protection container name.
239
+ # @param replicated_protected_item_name [String] A name for the replication
240
+ # protected item.
241
+ # @param input [EnableProtectionInput] Enable Protection Input.
242
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
243
+ # will be added to the HTTP request.
244
+ #
245
+ # @return [ReplicationProtectedItem] operation results.
246
+ #
247
+ def create(fabric_name, protection_container_name, replicated_protected_item_name, input, custom_headers:nil)
248
+ response = create_async(fabric_name, protection_container_name, replicated_protected_item_name, input, custom_headers:custom_headers).value!
249
+ response.body unless response.nil?
250
+ end
251
+
252
+ #
253
+ # @param fabric_name [String] Name of the fabric.
254
+ # @param protection_container_name [String] Protection container name.
255
+ # @param replicated_protected_item_name [String] A name for the replication
256
+ # protected item.
257
+ # @param input [EnableProtectionInput] Enable Protection Input.
258
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
259
+ # will be added to the HTTP request.
260
+ #
261
+ # @return [Concurrent::Promise] promise which provides async access to http
262
+ # response.
263
+ #
264
+ def create_async(fabric_name, protection_container_name, replicated_protected_item_name, input, custom_headers:nil)
265
+ # Send request
266
+ promise = begin_create_async(fabric_name, protection_container_name, replicated_protected_item_name, input, custom_headers:custom_headers)
267
+
268
+ promise = promise.then do |response|
269
+ # Defining deserialization method.
270
+ deserialize_method = lambda do |parsed_response|
271
+ result_mapper = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::ReplicationProtectedItem.mapper()
272
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
273
+ end
274
+
275
+ # Waiting for response.
276
+ @client.get_long_running_operation_result(response, deserialize_method)
277
+ end
278
+
279
+ promise
280
+ end
281
+
282
+ #
283
+ # Purges protection.
284
+ #
285
+ # The operation to delete or purge a replication protected item. This operation
286
+ # will force delete the replication protected item. Use the remove operation on
287
+ # replication protected item to perform a clean disable replication for the
288
+ # item.
289
+ #
290
+ # @param fabric_name [String] Fabric name.
291
+ # @param protection_container_name [String] Protection container name.
292
+ # @param replicated_protected_item_name [String] Replication protected item
293
+ # name.
294
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
295
+ # will be added to the HTTP request.
296
+ #
297
+ def purge(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers:nil)
298
+ response = purge_async(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers:custom_headers).value!
299
+ nil
300
+ end
301
+
302
+ #
303
+ # @param fabric_name [String] Fabric name.
304
+ # @param protection_container_name [String] Protection container name.
305
+ # @param replicated_protected_item_name [String] Replication protected item
306
+ # name.
307
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
308
+ # will be added to the HTTP request.
309
+ #
310
+ # @return [Concurrent::Promise] promise which provides async access to http
311
+ # response.
312
+ #
313
+ def purge_async(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers:nil)
314
+ # Send request
315
+ promise = begin_purge_async(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers:custom_headers)
316
+
317
+ promise = promise.then do |response|
318
+ # Defining deserialization method.
319
+ deserialize_method = lambda do |parsed_response|
320
+ end
321
+
322
+ # Waiting for response.
323
+ @client.get_long_running_operation_result(response, deserialize_method)
324
+ end
325
+
326
+ promise
327
+ end
328
+
329
+ #
330
+ # Updates protection.
331
+ #
332
+ # The operation to update the recovery settings of an ASR replication protected
333
+ # item.
334
+ #
335
+ # @param fabric_name [String] Fabric name.
336
+ # @param protection_container_name [String] Protection container name.
337
+ # @param replicated_protected_item_name [String] Replication protected item
338
+ # name.
339
+ # @param update_protection_input [UpdateReplicationProtectedItemInput] Update
340
+ # protection input.
341
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
342
+ # will be added to the HTTP request.
343
+ #
344
+ # @return [ReplicationProtectedItem] operation results.
345
+ #
346
+ def update(fabric_name, protection_container_name, replicated_protected_item_name, update_protection_input, custom_headers:nil)
347
+ response = update_async(fabric_name, protection_container_name, replicated_protected_item_name, update_protection_input, custom_headers:custom_headers).value!
348
+ response.body unless response.nil?
349
+ end
350
+
351
+ #
352
+ # @param fabric_name [String] Fabric name.
353
+ # @param protection_container_name [String] Protection container name.
354
+ # @param replicated_protected_item_name [String] Replication protected item
355
+ # name.
356
+ # @param update_protection_input [UpdateReplicationProtectedItemInput] Update
357
+ # protection input.
358
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
359
+ # will be added to the HTTP request.
360
+ #
361
+ # @return [Concurrent::Promise] promise which provides async access to http
362
+ # response.
363
+ #
364
+ def update_async(fabric_name, protection_container_name, replicated_protected_item_name, update_protection_input, custom_headers:nil)
365
+ # Send request
366
+ promise = begin_update_async(fabric_name, protection_container_name, replicated_protected_item_name, update_protection_input, custom_headers:custom_headers)
367
+
368
+ promise = promise.then do |response|
369
+ # Defining deserialization method.
370
+ deserialize_method = lambda do |parsed_response|
371
+ result_mapper = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::ReplicationProtectedItem.mapper()
372
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
373
+ end
374
+
375
+ # Waiting for response.
376
+ @client.get_long_running_operation_result(response, deserialize_method)
377
+ end
378
+
379
+ promise
380
+ end
381
+
382
+ #
383
+ # Change or apply recovery point.
384
+ #
385
+ # The operation to change the recovery point of a failed over replication
386
+ # protected item.
387
+ #
388
+ # @param fabric_name [String] The ARM fabric name.
389
+ # @param protection_container_name [String] The protection container name.
390
+ # @param replicated_protected_item_name [String] The replicated protected
391
+ # item's name.
392
+ # @param apply_recovery_point_input [ApplyRecoveryPointInput] The
393
+ # ApplyRecoveryPointInput.
394
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
395
+ # will be added to the HTTP request.
396
+ #
397
+ # @return [ReplicationProtectedItem] operation results.
398
+ #
399
+ def apply_recovery_point(fabric_name, protection_container_name, replicated_protected_item_name, apply_recovery_point_input, custom_headers:nil)
400
+ response = apply_recovery_point_async(fabric_name, protection_container_name, replicated_protected_item_name, apply_recovery_point_input, custom_headers:custom_headers).value!
401
+ response.body unless response.nil?
402
+ end
403
+
404
+ #
405
+ # @param fabric_name [String] The ARM fabric name.
406
+ # @param protection_container_name [String] The protection container name.
407
+ # @param replicated_protected_item_name [String] The replicated protected
408
+ # item's name.
409
+ # @param apply_recovery_point_input [ApplyRecoveryPointInput] The
410
+ # ApplyRecoveryPointInput.
411
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
412
+ # will be added to the HTTP request.
413
+ #
414
+ # @return [Concurrent::Promise] promise which provides async access to http
415
+ # response.
416
+ #
417
+ def apply_recovery_point_async(fabric_name, protection_container_name, replicated_protected_item_name, apply_recovery_point_input, custom_headers:nil)
418
+ # Send request
419
+ promise = begin_apply_recovery_point_async(fabric_name, protection_container_name, replicated_protected_item_name, apply_recovery_point_input, custom_headers:custom_headers)
420
+
421
+ promise = promise.then do |response|
422
+ # Defining deserialization method.
423
+ deserialize_method = lambda do |parsed_response|
424
+ result_mapper = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::ReplicationProtectedItem.mapper()
425
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
426
+ end
427
+
428
+ # Waiting for response.
429
+ @client.get_long_running_operation_result(response, deserialize_method)
430
+ end
431
+
432
+ promise
433
+ end
434
+
435
+ #
436
+ # Execute commit failover
437
+ #
438
+ # Operation to commit the failover of the replication protected item.
439
+ #
440
+ # @param fabric_name [String] Unique fabric name.
441
+ # @param protection_container_name [String] Protection container name.
442
+ # @param replicated_protected_item_name [String] Replication protected item
443
+ # name.
444
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
445
+ # will be added to the HTTP request.
446
+ #
447
+ # @return [ReplicationProtectedItem] operation results.
448
+ #
449
+ def failover_commit(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers:nil)
450
+ response = failover_commit_async(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers:custom_headers).value!
451
+ response.body unless response.nil?
452
+ end
453
+
454
+ #
455
+ # @param fabric_name [String] Unique fabric name.
456
+ # @param protection_container_name [String] Protection container name.
457
+ # @param replicated_protected_item_name [String] Replication protected item
458
+ # name.
459
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
460
+ # will be added to the HTTP request.
461
+ #
462
+ # @return [Concurrent::Promise] promise which provides async access to http
463
+ # response.
464
+ #
465
+ def failover_commit_async(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers:nil)
466
+ # Send request
467
+ promise = begin_failover_commit_async(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers:custom_headers)
468
+
469
+ promise = promise.then do |response|
470
+ # Defining deserialization method.
471
+ deserialize_method = lambda do |parsed_response|
472
+ result_mapper = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::ReplicationProtectedItem.mapper()
473
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
474
+ end
475
+
476
+ # Waiting for response.
477
+ @client.get_long_running_operation_result(response, deserialize_method)
478
+ end
479
+
480
+ promise
481
+ end
482
+
483
+ #
484
+ # Execute planned failover
485
+ #
486
+ # Operation to initiate a planned failover of the replication protected item.
487
+ #
488
+ # @param fabric_name [String] Unique fabric name.
489
+ # @param protection_container_name [String] Protection container name.
490
+ # @param replicated_protected_item_name [String] Replication protected item
491
+ # name.
492
+ # @param failover_input [PlannedFailoverInput] Disable protection input.
493
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
494
+ # will be added to the HTTP request.
495
+ #
496
+ # @return [ReplicationProtectedItem] operation results.
497
+ #
498
+ def planned_failover(fabric_name, protection_container_name, replicated_protected_item_name, failover_input, custom_headers:nil)
499
+ response = planned_failover_async(fabric_name, protection_container_name, replicated_protected_item_name, failover_input, custom_headers:custom_headers).value!
500
+ response.body unless response.nil?
501
+ end
502
+
503
+ #
504
+ # @param fabric_name [String] Unique fabric name.
505
+ # @param protection_container_name [String] Protection container name.
506
+ # @param replicated_protected_item_name [String] Replication protected item
507
+ # name.
508
+ # @param failover_input [PlannedFailoverInput] Disable protection input.
509
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
510
+ # will be added to the HTTP request.
511
+ #
512
+ # @return [Concurrent::Promise] promise which provides async access to http
513
+ # response.
514
+ #
515
+ def planned_failover_async(fabric_name, protection_container_name, replicated_protected_item_name, failover_input, custom_headers:nil)
516
+ # Send request
517
+ promise = begin_planned_failover_async(fabric_name, protection_container_name, replicated_protected_item_name, failover_input, custom_headers:custom_headers)
518
+
519
+ promise = promise.then do |response|
520
+ # Defining deserialization method.
521
+ deserialize_method = lambda do |parsed_response|
522
+ result_mapper = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::ReplicationProtectedItem.mapper()
523
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
524
+ end
525
+
526
+ # Waiting for response.
527
+ @client.get_long_running_operation_result(response, deserialize_method)
528
+ end
529
+
530
+ promise
531
+ end
532
+
533
+ #
534
+ # Disables protection.
535
+ #
536
+ # The operation to disable replication on a replication protected item. This
537
+ # will also remove the item.
538
+ #
539
+ # @param fabric_name [String] Fabric name.
540
+ # @param protection_container_name [String] Protection container name.
541
+ # @param replicated_protected_item_name [String] Replication protected item
542
+ # name.
543
+ # @param disable_protection_input [DisableProtectionInput] Disable protection
544
+ # input.
545
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
546
+ # will be added to the HTTP request.
547
+ #
548
+ def delete(fabric_name, protection_container_name, replicated_protected_item_name, disable_protection_input, custom_headers:nil)
549
+ response = delete_async(fabric_name, protection_container_name, replicated_protected_item_name, disable_protection_input, custom_headers:custom_headers).value!
550
+ nil
551
+ end
552
+
553
+ #
554
+ # @param fabric_name [String] Fabric name.
555
+ # @param protection_container_name [String] Protection container name.
556
+ # @param replicated_protected_item_name [String] Replication protected item
557
+ # name.
558
+ # @param disable_protection_input [DisableProtectionInput] Disable protection
559
+ # input.
560
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
561
+ # will be added to the HTTP request.
562
+ #
563
+ # @return [Concurrent::Promise] promise which provides async access to http
564
+ # response.
565
+ #
566
+ def delete_async(fabric_name, protection_container_name, replicated_protected_item_name, disable_protection_input, custom_headers:nil)
567
+ # Send request
568
+ promise = begin_delete_async(fabric_name, protection_container_name, replicated_protected_item_name, disable_protection_input, custom_headers:custom_headers)
569
+
570
+ promise = promise.then do |response|
571
+ # Defining deserialization method.
572
+ deserialize_method = lambda do |parsed_response|
573
+ end
574
+
575
+ # Waiting for response.
576
+ @client.get_long_running_operation_result(response, deserialize_method)
577
+ end
578
+
579
+ promise
580
+ end
581
+
582
+ #
583
+ # Resynchronize or repair replication.
584
+ #
585
+ # The operation to start resynchronize/repair replication for a replication
586
+ # protected item requiring resynchronization.
587
+ #
588
+ # @param fabric_name [String] The name of the fabric.
589
+ # @param protection_container_name [String] The name of the container.
590
+ # @param replicated_protected_item_name [String] The name of the replication
591
+ # protected item.
592
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
593
+ # will be added to the HTTP request.
594
+ #
595
+ # @return [ReplicationProtectedItem] operation results.
596
+ #
597
+ def repair_replication(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers:nil)
598
+ response = repair_replication_async(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers:custom_headers).value!
599
+ response.body unless response.nil?
600
+ end
601
+
602
+ #
603
+ # @param fabric_name [String] The name of the fabric.
604
+ # @param protection_container_name [String] The name of the container.
605
+ # @param replicated_protected_item_name [String] The name of the replication
606
+ # protected item.
607
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
608
+ # will be added to the HTTP request.
609
+ #
610
+ # @return [Concurrent::Promise] promise which provides async access to http
611
+ # response.
612
+ #
613
+ def repair_replication_async(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers:nil)
614
+ # Send request
615
+ promise = begin_repair_replication_async(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers:custom_headers)
616
+
617
+ promise = promise.then do |response|
618
+ # Defining deserialization method.
619
+ deserialize_method = lambda do |parsed_response|
620
+ result_mapper = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::ReplicationProtectedItem.mapper()
621
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
622
+ end
623
+
624
+ # Waiting for response.
625
+ @client.get_long_running_operation_result(response, deserialize_method)
626
+ end
627
+
628
+ promise
629
+ end
630
+
631
+ #
632
+ # Execute Reverse Replication\Reprotect
633
+ #
634
+ # Operation to reprotect or reverse replicate a failed over replication
635
+ # protected item.
636
+ #
637
+ # @param fabric_name [String] Unique fabric name.
638
+ # @param protection_container_name [String] Protection container name.
639
+ # @param replicated_protected_item_name [String] Replication protected item
640
+ # name.
641
+ # @param rr_input [ReverseReplicationInput] Disable protection input.
642
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
643
+ # will be added to the HTTP request.
644
+ #
645
+ # @return [ReplicationProtectedItem] operation results.
646
+ #
647
+ def reprotect(fabric_name, protection_container_name, replicated_protected_item_name, rr_input, custom_headers:nil)
648
+ response = reprotect_async(fabric_name, protection_container_name, replicated_protected_item_name, rr_input, custom_headers:custom_headers).value!
649
+ response.body unless response.nil?
650
+ end
651
+
652
+ #
653
+ # @param fabric_name [String] Unique fabric name.
654
+ # @param protection_container_name [String] Protection container name.
655
+ # @param replicated_protected_item_name [String] Replication protected item
656
+ # name.
657
+ # @param rr_input [ReverseReplicationInput] Disable protection input.
658
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
659
+ # will be added to the HTTP request.
660
+ #
661
+ # @return [Concurrent::Promise] promise which provides async access to http
662
+ # response.
663
+ #
664
+ def reprotect_async(fabric_name, protection_container_name, replicated_protected_item_name, rr_input, custom_headers:nil)
665
+ # Send request
666
+ promise = begin_reprotect_async(fabric_name, protection_container_name, replicated_protected_item_name, rr_input, custom_headers:custom_headers)
667
+
668
+ promise = promise.then do |response|
669
+ # Defining deserialization method.
670
+ deserialize_method = lambda do |parsed_response|
671
+ result_mapper = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::ReplicationProtectedItem.mapper()
672
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
673
+ end
674
+
675
+ # Waiting for response.
676
+ @client.get_long_running_operation_result(response, deserialize_method)
677
+ end
678
+
679
+ promise
680
+ end
681
+
682
+ #
683
+ # Execute test failover
684
+ #
685
+ # Operation to perform a test failover of the replication protected item.
686
+ #
687
+ # @param fabric_name [String] Unique fabric name.
688
+ # @param protection_container_name [String] Protection container name.
689
+ # @param replicated_protected_item_name [String] Replication protected item
690
+ # name.
691
+ # @param failover_input [TestFailoverInput] Test failover input.
692
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
693
+ # will be added to the HTTP request.
694
+ #
695
+ # @return [ReplicationProtectedItem] operation results.
696
+ #
697
+ def test_failover(fabric_name, protection_container_name, replicated_protected_item_name, failover_input, custom_headers:nil)
698
+ response = test_failover_async(fabric_name, protection_container_name, replicated_protected_item_name, failover_input, custom_headers:custom_headers).value!
699
+ response.body unless response.nil?
700
+ end
701
+
702
+ #
703
+ # @param fabric_name [String] Unique fabric name.
704
+ # @param protection_container_name [String] Protection container name.
705
+ # @param replicated_protected_item_name [String] Replication protected item
706
+ # name.
707
+ # @param failover_input [TestFailoverInput] Test failover input.
708
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
709
+ # will be added to the HTTP request.
710
+ #
711
+ # @return [Concurrent::Promise] promise which provides async access to http
712
+ # response.
713
+ #
714
+ def test_failover_async(fabric_name, protection_container_name, replicated_protected_item_name, failover_input, custom_headers:nil)
715
+ # Send request
716
+ promise = begin_test_failover_async(fabric_name, protection_container_name, replicated_protected_item_name, failover_input, custom_headers:custom_headers)
717
+
718
+ promise = promise.then do |response|
719
+ # Defining deserialization method.
720
+ deserialize_method = lambda do |parsed_response|
721
+ result_mapper = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::ReplicationProtectedItem.mapper()
722
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
723
+ end
724
+
725
+ # Waiting for response.
726
+ @client.get_long_running_operation_result(response, deserialize_method)
727
+ end
728
+
729
+ promise
730
+ end
731
+
732
+ #
733
+ # Execute test failover cleanup.
734
+ #
735
+ # Operation to clean up the test failover of a replication protected item.
736
+ #
737
+ # @param fabric_name [String] Unique fabric name.
738
+ # @param protection_container_name [String] Protection container name.
739
+ # @param replicated_protected_item_name [String] Replication protected item
740
+ # name.
741
+ # @param cleanup_input [TestFailoverCleanupInput] Test failover cleanup input.
742
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
743
+ # will be added to the HTTP request.
744
+ #
745
+ # @return [ReplicationProtectedItem] operation results.
746
+ #
747
+ def test_failover_cleanup(fabric_name, protection_container_name, replicated_protected_item_name, cleanup_input, custom_headers:nil)
748
+ response = test_failover_cleanup_async(fabric_name, protection_container_name, replicated_protected_item_name, cleanup_input, custom_headers:custom_headers).value!
749
+ response.body unless response.nil?
750
+ end
751
+
752
+ #
753
+ # @param fabric_name [String] Unique fabric name.
754
+ # @param protection_container_name [String] Protection container name.
755
+ # @param replicated_protected_item_name [String] Replication protected item
756
+ # name.
757
+ # @param cleanup_input [TestFailoverCleanupInput] Test failover cleanup input.
758
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
759
+ # will be added to the HTTP request.
760
+ #
761
+ # @return [Concurrent::Promise] promise which provides async access to http
762
+ # response.
763
+ #
764
+ def test_failover_cleanup_async(fabric_name, protection_container_name, replicated_protected_item_name, cleanup_input, custom_headers:nil)
765
+ # Send request
766
+ promise = begin_test_failover_cleanup_async(fabric_name, protection_container_name, replicated_protected_item_name, cleanup_input, custom_headers:custom_headers)
767
+
768
+ promise = promise.then do |response|
769
+ # Defining deserialization method.
770
+ deserialize_method = lambda do |parsed_response|
771
+ result_mapper = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::ReplicationProtectedItem.mapper()
772
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
773
+ end
774
+
775
+ # Waiting for response.
776
+ @client.get_long_running_operation_result(response, deserialize_method)
777
+ end
778
+
779
+ promise
780
+ end
781
+
782
+ #
783
+ # Execute unplanned failover
784
+ #
785
+ # Operation to initiate a failover of the replication protected item.
786
+ #
787
+ # @param fabric_name [String] Unique fabric name.
788
+ # @param protection_container_name [String] Protection container name.
789
+ # @param replicated_protected_item_name [String] Replication protected item
790
+ # name.
791
+ # @param failover_input [UnplannedFailoverInput] Disable protection input.
792
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
793
+ # will be added to the HTTP request.
794
+ #
795
+ # @return [ReplicationProtectedItem] operation results.
796
+ #
797
+ def unplanned_failover(fabric_name, protection_container_name, replicated_protected_item_name, failover_input, custom_headers:nil)
798
+ response = unplanned_failover_async(fabric_name, protection_container_name, replicated_protected_item_name, failover_input, custom_headers:custom_headers).value!
799
+ response.body unless response.nil?
800
+ end
801
+
802
+ #
803
+ # @param fabric_name [String] Unique fabric name.
804
+ # @param protection_container_name [String] Protection container name.
805
+ # @param replicated_protected_item_name [String] Replication protected item
806
+ # name.
807
+ # @param failover_input [UnplannedFailoverInput] Disable protection input.
808
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
809
+ # will be added to the HTTP request.
810
+ #
811
+ # @return [Concurrent::Promise] promise which provides async access to http
812
+ # response.
813
+ #
814
+ def unplanned_failover_async(fabric_name, protection_container_name, replicated_protected_item_name, failover_input, custom_headers:nil)
815
+ # Send request
816
+ promise = begin_unplanned_failover_async(fabric_name, protection_container_name, replicated_protected_item_name, failover_input, custom_headers:custom_headers)
817
+
818
+ promise = promise.then do |response|
819
+ # Defining deserialization method.
820
+ deserialize_method = lambda do |parsed_response|
821
+ result_mapper = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::ReplicationProtectedItem.mapper()
822
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
823
+ end
824
+
825
+ # Waiting for response.
826
+ @client.get_long_running_operation_result(response, deserialize_method)
827
+ end
828
+
829
+ promise
830
+ end
831
+
832
+ #
833
+ # Update the mobility service on a protected item.
834
+ #
835
+ # The operation to update(push update) the installed mobility service software
836
+ # on a replication protected item to the latest available version.
837
+ #
838
+ # @param fabric_name [String] The name of the fabric containing the protected
839
+ # item.
840
+ # @param protection_container_name [String] The name of the container
841
+ # containing the protected item.
842
+ # @param replication_protected_item_name [String] The name of the protected
843
+ # item on which the agent is to be updated.
844
+ # @param update_mobility_service_request [UpdateMobilityServiceRequest] Request
845
+ # to update the mobility service on the protected item.
846
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
847
+ # will be added to the HTTP request.
848
+ #
849
+ # @return [ReplicationProtectedItem] operation results.
850
+ #
851
+ def update_mobility_service(fabric_name, protection_container_name, replication_protected_item_name, update_mobility_service_request, custom_headers:nil)
852
+ response = update_mobility_service_async(fabric_name, protection_container_name, replication_protected_item_name, update_mobility_service_request, custom_headers:custom_headers).value!
853
+ response.body unless response.nil?
854
+ end
855
+
856
+ #
857
+ # @param fabric_name [String] The name of the fabric containing the protected
858
+ # item.
859
+ # @param protection_container_name [String] The name of the container
860
+ # containing the protected item.
861
+ # @param replication_protected_item_name [String] The name of the protected
862
+ # item on which the agent is to be updated.
863
+ # @param update_mobility_service_request [UpdateMobilityServiceRequest] Request
864
+ # to update the mobility service on the protected item.
865
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
866
+ # will be added to the HTTP request.
867
+ #
868
+ # @return [Concurrent::Promise] promise which provides async access to http
869
+ # response.
870
+ #
871
+ def update_mobility_service_async(fabric_name, protection_container_name, replication_protected_item_name, update_mobility_service_request, custom_headers:nil)
872
+ # Send request
873
+ promise = begin_update_mobility_service_async(fabric_name, protection_container_name, replication_protected_item_name, update_mobility_service_request, custom_headers:custom_headers)
874
+
875
+ promise = promise.then do |response|
876
+ # Defining deserialization method.
877
+ deserialize_method = lambda do |parsed_response|
878
+ result_mapper = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::ReplicationProtectedItem.mapper()
879
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
880
+ end
881
+
882
+ # Waiting for response.
883
+ @client.get_long_running_operation_result(response, deserialize_method)
884
+ end
885
+
886
+ promise
887
+ end
888
+
889
+ #
890
+ # Gets the list of replication protected items.
891
+ #
892
+ # Gets the list of ASR replication protected items in the vault.
893
+ #
894
+ # @param skip_token [String] The pagination token. Possible values: "FabricId"
895
+ # or "FabricId_CloudId" or null
896
+ # @param filter [String] OData filter options.
897
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
898
+ # will be added to the HTTP request.
899
+ #
900
+ # @return [Array<ReplicationProtectedItem>] operation results.
901
+ #
902
+ def list(skip_token:nil, filter:nil, custom_headers:nil)
903
+ first_page = list_as_lazy(skip_token:skip_token, filter:filter, custom_headers:custom_headers)
904
+ first_page.get_all_items
905
+ end
906
+
907
+ #
908
+ # Gets the list of replication protected items.
909
+ #
910
+ # Gets the list of ASR replication protected items in the vault.
911
+ #
912
+ # @param skip_token [String] The pagination token. Possible values: "FabricId"
913
+ # or "FabricId_CloudId" or null
914
+ # @param filter [String] OData filter options.
915
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
916
+ # will be added to the HTTP request.
917
+ #
918
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
919
+ #
920
+ def list_with_http_info(skip_token:nil, filter:nil, custom_headers:nil)
921
+ list_async(skip_token:skip_token, filter:filter, custom_headers:custom_headers).value!
922
+ end
923
+
924
+ #
925
+ # Gets the list of replication protected items.
926
+ #
927
+ # Gets the list of ASR replication protected items in the vault.
928
+ #
929
+ # @param skip_token [String] The pagination token. Possible values: "FabricId"
930
+ # or "FabricId_CloudId" or null
931
+ # @param filter [String] OData filter options.
932
+ # @param [Hash{String => String}] A hash of custom headers that will be added
933
+ # to the HTTP request.
934
+ #
935
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
936
+ #
937
+ def list_async(skip_token:nil, filter:nil, custom_headers:nil)
938
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
939
+ fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil?
940
+ fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
941
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
942
+
943
+
944
+ request_headers = {}
945
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
946
+
947
+ # Set Headers
948
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
949
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
950
+ path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationProtectedItems'
951
+
952
+ request_url = @base_url || @client.base_url
953
+
954
+ options = {
955
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
956
+ path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id},
957
+ query_params: {'api-version' => @client.api_version,'skipToken' => skip_token,'$filter' => filter},
958
+ headers: request_headers.merge(custom_headers || {}),
959
+ base_url: request_url
960
+ }
961
+ promise = @client.make_request_async(:get, path_template, options)
962
+
963
+ promise = promise.then do |result|
964
+ http_response = result.response
965
+ status_code = http_response.status
966
+ response_content = http_response.body
967
+ unless status_code == 200
968
+ error_model = JSON.load(response_content)
969
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
970
+ end
971
+
972
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
973
+ # Deserialize Response
974
+ if status_code == 200
975
+ begin
976
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
977
+ result_mapper = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::ReplicationProtectedItemCollection.mapper()
978
+ result.body = @client.deserialize(result_mapper, parsed_response)
979
+ rescue Exception => e
980
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
981
+ end
982
+ end
983
+
984
+ result
985
+ end
986
+
987
+ promise.execute
988
+ end
989
+
990
+ #
991
+ # Enables protection.
992
+ #
993
+ # The operation to create an ASR replication protected item (Enable
994
+ # replication).
995
+ #
996
+ # @param fabric_name [String] Name of the fabric.
997
+ # @param protection_container_name [String] Protection container name.
998
+ # @param replicated_protected_item_name [String] A name for the replication
999
+ # protected item.
1000
+ # @param input [EnableProtectionInput] Enable Protection Input.
1001
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1002
+ # will be added to the HTTP request.
1003
+ #
1004
+ # @return [ReplicationProtectedItem] operation results.
1005
+ #
1006
+ def begin_create(fabric_name, protection_container_name, replicated_protected_item_name, input, custom_headers:nil)
1007
+ response = begin_create_async(fabric_name, protection_container_name, replicated_protected_item_name, input, custom_headers:custom_headers).value!
1008
+ response.body unless response.nil?
1009
+ end
1010
+
1011
+ #
1012
+ # Enables protection.
1013
+ #
1014
+ # The operation to create an ASR replication protected item (Enable
1015
+ # replication).
1016
+ #
1017
+ # @param fabric_name [String] Name of the fabric.
1018
+ # @param protection_container_name [String] Protection container name.
1019
+ # @param replicated_protected_item_name [String] A name for the replication
1020
+ # protected item.
1021
+ # @param input [EnableProtectionInput] Enable Protection Input.
1022
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1023
+ # will be added to the HTTP request.
1024
+ #
1025
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1026
+ #
1027
+ def begin_create_with_http_info(fabric_name, protection_container_name, replicated_protected_item_name, input, custom_headers:nil)
1028
+ begin_create_async(fabric_name, protection_container_name, replicated_protected_item_name, input, custom_headers:custom_headers).value!
1029
+ end
1030
+
1031
+ #
1032
+ # Enables protection.
1033
+ #
1034
+ # The operation to create an ASR replication protected item (Enable
1035
+ # replication).
1036
+ #
1037
+ # @param fabric_name [String] Name of the fabric.
1038
+ # @param protection_container_name [String] Protection container name.
1039
+ # @param replicated_protected_item_name [String] A name for the replication
1040
+ # protected item.
1041
+ # @param input [EnableProtectionInput] Enable Protection Input.
1042
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1043
+ # to the HTTP request.
1044
+ #
1045
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1046
+ #
1047
+ def begin_create_async(fabric_name, protection_container_name, replicated_protected_item_name, input, custom_headers:nil)
1048
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1049
+ fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil?
1050
+ fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
1051
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1052
+ fail ArgumentError, 'fabric_name is nil' if fabric_name.nil?
1053
+ fail ArgumentError, 'protection_container_name is nil' if protection_container_name.nil?
1054
+ fail ArgumentError, 'replicated_protected_item_name is nil' if replicated_protected_item_name.nil?
1055
+ fail ArgumentError, 'input is nil' if input.nil?
1056
+
1057
+
1058
+ request_headers = {}
1059
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1060
+
1061
+ # Set Headers
1062
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1063
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1064
+
1065
+ # Serialize Request
1066
+ request_mapper = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::EnableProtectionInput.mapper()
1067
+ request_content = @client.serialize(request_mapper, input)
1068
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1069
+
1070
+ path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}'
1071
+
1072
+ request_url = @base_url || @client.base_url
1073
+
1074
+ options = {
1075
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1076
+ path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'protectionContainerName' => protection_container_name,'replicatedProtectedItemName' => replicated_protected_item_name},
1077
+ query_params: {'api-version' => @client.api_version},
1078
+ body: request_content,
1079
+ headers: request_headers.merge(custom_headers || {}),
1080
+ base_url: request_url
1081
+ }
1082
+ promise = @client.make_request_async(:put, path_template, options)
1083
+
1084
+ promise = promise.then do |result|
1085
+ http_response = result.response
1086
+ status_code = http_response.status
1087
+ response_content = http_response.body
1088
+ unless status_code == 200 || status_code == 202
1089
+ error_model = JSON.load(response_content)
1090
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1091
+ end
1092
+
1093
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1094
+ # Deserialize Response
1095
+ if status_code == 200
1096
+ begin
1097
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1098
+ result_mapper = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::ReplicationProtectedItem.mapper()
1099
+ result.body = @client.deserialize(result_mapper, parsed_response)
1100
+ rescue Exception => e
1101
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1102
+ end
1103
+ end
1104
+
1105
+ result
1106
+ end
1107
+
1108
+ promise.execute
1109
+ end
1110
+
1111
+ #
1112
+ # Purges protection.
1113
+ #
1114
+ # The operation to delete or purge a replication protected item. This operation
1115
+ # will force delete the replication protected item. Use the remove operation on
1116
+ # replication protected item to perform a clean disable replication for the
1117
+ # item.
1118
+ #
1119
+ # @param fabric_name [String] Fabric name.
1120
+ # @param protection_container_name [String] Protection container name.
1121
+ # @param replicated_protected_item_name [String] Replication protected item
1122
+ # name.
1123
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1124
+ # will be added to the HTTP request.
1125
+ #
1126
+ #
1127
+ def begin_purge(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers:nil)
1128
+ response = begin_purge_async(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers:custom_headers).value!
1129
+ nil
1130
+ end
1131
+
1132
+ #
1133
+ # Purges protection.
1134
+ #
1135
+ # The operation to delete or purge a replication protected item. This operation
1136
+ # will force delete the replication protected item. Use the remove operation on
1137
+ # replication protected item to perform a clean disable replication for the
1138
+ # item.
1139
+ #
1140
+ # @param fabric_name [String] Fabric name.
1141
+ # @param protection_container_name [String] Protection container name.
1142
+ # @param replicated_protected_item_name [String] Replication protected item
1143
+ # name.
1144
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1145
+ # will be added to the HTTP request.
1146
+ #
1147
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1148
+ #
1149
+ def begin_purge_with_http_info(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers:nil)
1150
+ begin_purge_async(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers:custom_headers).value!
1151
+ end
1152
+
1153
+ #
1154
+ # Purges protection.
1155
+ #
1156
+ # The operation to delete or purge a replication protected item. This operation
1157
+ # will force delete the replication protected item. Use the remove operation on
1158
+ # replication protected item to perform a clean disable replication for the
1159
+ # item.
1160
+ #
1161
+ # @param fabric_name [String] Fabric name.
1162
+ # @param protection_container_name [String] Protection container name.
1163
+ # @param replicated_protected_item_name [String] Replication protected item
1164
+ # name.
1165
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1166
+ # to the HTTP request.
1167
+ #
1168
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1169
+ #
1170
+ def begin_purge_async(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers:nil)
1171
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1172
+ fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil?
1173
+ fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
1174
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1175
+ fail ArgumentError, 'fabric_name is nil' if fabric_name.nil?
1176
+ fail ArgumentError, 'protection_container_name is nil' if protection_container_name.nil?
1177
+ fail ArgumentError, 'replicated_protected_item_name is nil' if replicated_protected_item_name.nil?
1178
+
1179
+
1180
+ request_headers = {}
1181
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1182
+
1183
+ # Set Headers
1184
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1185
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1186
+ path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}'
1187
+
1188
+ request_url = @base_url || @client.base_url
1189
+
1190
+ options = {
1191
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1192
+ path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'protectionContainerName' => protection_container_name,'replicatedProtectedItemName' => replicated_protected_item_name},
1193
+ query_params: {'api-version' => @client.api_version},
1194
+ headers: request_headers.merge(custom_headers || {}),
1195
+ base_url: request_url
1196
+ }
1197
+ promise = @client.make_request_async(:delete, path_template, options)
1198
+
1199
+ promise = promise.then do |result|
1200
+ http_response = result.response
1201
+ status_code = http_response.status
1202
+ response_content = http_response.body
1203
+ unless status_code == 202 || status_code == 204
1204
+ error_model = JSON.load(response_content)
1205
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1206
+ end
1207
+
1208
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1209
+
1210
+ result
1211
+ end
1212
+
1213
+ promise.execute
1214
+ end
1215
+
1216
+ #
1217
+ # Updates protection.
1218
+ #
1219
+ # The operation to update the recovery settings of an ASR replication protected
1220
+ # item.
1221
+ #
1222
+ # @param fabric_name [String] Fabric name.
1223
+ # @param protection_container_name [String] Protection container name.
1224
+ # @param replicated_protected_item_name [String] Replication protected item
1225
+ # name.
1226
+ # @param update_protection_input [UpdateReplicationProtectedItemInput] Update
1227
+ # protection input.
1228
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1229
+ # will be added to the HTTP request.
1230
+ #
1231
+ # @return [ReplicationProtectedItem] operation results.
1232
+ #
1233
+ def begin_update(fabric_name, protection_container_name, replicated_protected_item_name, update_protection_input, custom_headers:nil)
1234
+ response = begin_update_async(fabric_name, protection_container_name, replicated_protected_item_name, update_protection_input, custom_headers:custom_headers).value!
1235
+ response.body unless response.nil?
1236
+ end
1237
+
1238
+ #
1239
+ # Updates protection.
1240
+ #
1241
+ # The operation to update the recovery settings of an ASR replication protected
1242
+ # item.
1243
+ #
1244
+ # @param fabric_name [String] Fabric name.
1245
+ # @param protection_container_name [String] Protection container name.
1246
+ # @param replicated_protected_item_name [String] Replication protected item
1247
+ # name.
1248
+ # @param update_protection_input [UpdateReplicationProtectedItemInput] Update
1249
+ # protection input.
1250
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1251
+ # will be added to the HTTP request.
1252
+ #
1253
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1254
+ #
1255
+ def begin_update_with_http_info(fabric_name, protection_container_name, replicated_protected_item_name, update_protection_input, custom_headers:nil)
1256
+ begin_update_async(fabric_name, protection_container_name, replicated_protected_item_name, update_protection_input, custom_headers:custom_headers).value!
1257
+ end
1258
+
1259
+ #
1260
+ # Updates protection.
1261
+ #
1262
+ # The operation to update the recovery settings of an ASR replication protected
1263
+ # item.
1264
+ #
1265
+ # @param fabric_name [String] Fabric name.
1266
+ # @param protection_container_name [String] Protection container name.
1267
+ # @param replicated_protected_item_name [String] Replication protected item
1268
+ # name.
1269
+ # @param update_protection_input [UpdateReplicationProtectedItemInput] Update
1270
+ # protection input.
1271
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1272
+ # to the HTTP request.
1273
+ #
1274
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1275
+ #
1276
+ def begin_update_async(fabric_name, protection_container_name, replicated_protected_item_name, update_protection_input, custom_headers:nil)
1277
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1278
+ fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil?
1279
+ fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
1280
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1281
+ fail ArgumentError, 'fabric_name is nil' if fabric_name.nil?
1282
+ fail ArgumentError, 'protection_container_name is nil' if protection_container_name.nil?
1283
+ fail ArgumentError, 'replicated_protected_item_name is nil' if replicated_protected_item_name.nil?
1284
+ fail ArgumentError, 'update_protection_input is nil' if update_protection_input.nil?
1285
+
1286
+
1287
+ request_headers = {}
1288
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1289
+
1290
+ # Set Headers
1291
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1292
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1293
+
1294
+ # Serialize Request
1295
+ request_mapper = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::UpdateReplicationProtectedItemInput.mapper()
1296
+ request_content = @client.serialize(request_mapper, update_protection_input)
1297
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1298
+
1299
+ path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}'
1300
+
1301
+ request_url = @base_url || @client.base_url
1302
+
1303
+ options = {
1304
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1305
+ path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'protectionContainerName' => protection_container_name,'replicatedProtectedItemName' => replicated_protected_item_name},
1306
+ query_params: {'api-version' => @client.api_version},
1307
+ body: request_content,
1308
+ headers: request_headers.merge(custom_headers || {}),
1309
+ base_url: request_url
1310
+ }
1311
+ promise = @client.make_request_async(:patch, path_template, options)
1312
+
1313
+ promise = promise.then do |result|
1314
+ http_response = result.response
1315
+ status_code = http_response.status
1316
+ response_content = http_response.body
1317
+ unless status_code == 200 || status_code == 202
1318
+ error_model = JSON.load(response_content)
1319
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1320
+ end
1321
+
1322
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1323
+ # Deserialize Response
1324
+ if status_code == 200
1325
+ begin
1326
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1327
+ result_mapper = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::ReplicationProtectedItem.mapper()
1328
+ result.body = @client.deserialize(result_mapper, parsed_response)
1329
+ rescue Exception => e
1330
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1331
+ end
1332
+ end
1333
+
1334
+ result
1335
+ end
1336
+
1337
+ promise.execute
1338
+ end
1339
+
1340
+ #
1341
+ # Change or apply recovery point.
1342
+ #
1343
+ # The operation to change the recovery point of a failed over replication
1344
+ # protected item.
1345
+ #
1346
+ # @param fabric_name [String] The ARM fabric name.
1347
+ # @param protection_container_name [String] The protection container name.
1348
+ # @param replicated_protected_item_name [String] The replicated protected
1349
+ # item's name.
1350
+ # @param apply_recovery_point_input [ApplyRecoveryPointInput] The
1351
+ # ApplyRecoveryPointInput.
1352
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1353
+ # will be added to the HTTP request.
1354
+ #
1355
+ # @return [ReplicationProtectedItem] operation results.
1356
+ #
1357
+ def begin_apply_recovery_point(fabric_name, protection_container_name, replicated_protected_item_name, apply_recovery_point_input, custom_headers:nil)
1358
+ response = begin_apply_recovery_point_async(fabric_name, protection_container_name, replicated_protected_item_name, apply_recovery_point_input, custom_headers:custom_headers).value!
1359
+ response.body unless response.nil?
1360
+ end
1361
+
1362
+ #
1363
+ # Change or apply recovery point.
1364
+ #
1365
+ # The operation to change the recovery point of a failed over replication
1366
+ # protected item.
1367
+ #
1368
+ # @param fabric_name [String] The ARM fabric name.
1369
+ # @param protection_container_name [String] The protection container name.
1370
+ # @param replicated_protected_item_name [String] The replicated protected
1371
+ # item's name.
1372
+ # @param apply_recovery_point_input [ApplyRecoveryPointInput] The
1373
+ # ApplyRecoveryPointInput.
1374
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1375
+ # will be added to the HTTP request.
1376
+ #
1377
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1378
+ #
1379
+ def begin_apply_recovery_point_with_http_info(fabric_name, protection_container_name, replicated_protected_item_name, apply_recovery_point_input, custom_headers:nil)
1380
+ begin_apply_recovery_point_async(fabric_name, protection_container_name, replicated_protected_item_name, apply_recovery_point_input, custom_headers:custom_headers).value!
1381
+ end
1382
+
1383
+ #
1384
+ # Change or apply recovery point.
1385
+ #
1386
+ # The operation to change the recovery point of a failed over replication
1387
+ # protected item.
1388
+ #
1389
+ # @param fabric_name [String] The ARM fabric name.
1390
+ # @param protection_container_name [String] The protection container name.
1391
+ # @param replicated_protected_item_name [String] The replicated protected
1392
+ # item's name.
1393
+ # @param apply_recovery_point_input [ApplyRecoveryPointInput] The
1394
+ # ApplyRecoveryPointInput.
1395
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1396
+ # to the HTTP request.
1397
+ #
1398
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1399
+ #
1400
+ def begin_apply_recovery_point_async(fabric_name, protection_container_name, replicated_protected_item_name, apply_recovery_point_input, custom_headers:nil)
1401
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1402
+ fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil?
1403
+ fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
1404
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1405
+ fail ArgumentError, 'fabric_name is nil' if fabric_name.nil?
1406
+ fail ArgumentError, 'protection_container_name is nil' if protection_container_name.nil?
1407
+ fail ArgumentError, 'replicated_protected_item_name is nil' if replicated_protected_item_name.nil?
1408
+ fail ArgumentError, 'apply_recovery_point_input is nil' if apply_recovery_point_input.nil?
1409
+
1410
+
1411
+ request_headers = {}
1412
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1413
+
1414
+ # Set Headers
1415
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1416
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1417
+
1418
+ # Serialize Request
1419
+ request_mapper = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::ApplyRecoveryPointInput.mapper()
1420
+ request_content = @client.serialize(request_mapper, apply_recovery_point_input)
1421
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1422
+
1423
+ path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/applyRecoveryPoint'
1424
+
1425
+ request_url = @base_url || @client.base_url
1426
+
1427
+ options = {
1428
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1429
+ path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'protectionContainerName' => protection_container_name,'replicatedProtectedItemName' => replicated_protected_item_name},
1430
+ query_params: {'api-version' => @client.api_version},
1431
+ body: request_content,
1432
+ headers: request_headers.merge(custom_headers || {}),
1433
+ base_url: request_url
1434
+ }
1435
+ promise = @client.make_request_async(:post, path_template, options)
1436
+
1437
+ promise = promise.then do |result|
1438
+ http_response = result.response
1439
+ status_code = http_response.status
1440
+ response_content = http_response.body
1441
+ unless status_code == 200 || status_code == 202
1442
+ error_model = JSON.load(response_content)
1443
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1444
+ end
1445
+
1446
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1447
+ # Deserialize Response
1448
+ if status_code == 200
1449
+ begin
1450
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1451
+ result_mapper = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::ReplicationProtectedItem.mapper()
1452
+ result.body = @client.deserialize(result_mapper, parsed_response)
1453
+ rescue Exception => e
1454
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1455
+ end
1456
+ end
1457
+
1458
+ result
1459
+ end
1460
+
1461
+ promise.execute
1462
+ end
1463
+
1464
+ #
1465
+ # Execute commit failover
1466
+ #
1467
+ # Operation to commit the failover of the replication protected item.
1468
+ #
1469
+ # @param fabric_name [String] Unique fabric name.
1470
+ # @param protection_container_name [String] Protection container name.
1471
+ # @param replicated_protected_item_name [String] Replication protected item
1472
+ # name.
1473
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1474
+ # will be added to the HTTP request.
1475
+ #
1476
+ # @return [ReplicationProtectedItem] operation results.
1477
+ #
1478
+ def begin_failover_commit(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers:nil)
1479
+ response = begin_failover_commit_async(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers:custom_headers).value!
1480
+ response.body unless response.nil?
1481
+ end
1482
+
1483
+ #
1484
+ # Execute commit failover
1485
+ #
1486
+ # Operation to commit the failover of the replication protected item.
1487
+ #
1488
+ # @param fabric_name [String] Unique fabric name.
1489
+ # @param protection_container_name [String] Protection container name.
1490
+ # @param replicated_protected_item_name [String] Replication protected item
1491
+ # name.
1492
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1493
+ # will be added to the HTTP request.
1494
+ #
1495
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1496
+ #
1497
+ def begin_failover_commit_with_http_info(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers:nil)
1498
+ begin_failover_commit_async(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers:custom_headers).value!
1499
+ end
1500
+
1501
+ #
1502
+ # Execute commit failover
1503
+ #
1504
+ # Operation to commit the failover of the replication protected item.
1505
+ #
1506
+ # @param fabric_name [String] Unique fabric name.
1507
+ # @param protection_container_name [String] Protection container name.
1508
+ # @param replicated_protected_item_name [String] Replication protected item
1509
+ # name.
1510
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1511
+ # to the HTTP request.
1512
+ #
1513
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1514
+ #
1515
+ def begin_failover_commit_async(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers:nil)
1516
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1517
+ fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil?
1518
+ fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
1519
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1520
+ fail ArgumentError, 'fabric_name is nil' if fabric_name.nil?
1521
+ fail ArgumentError, 'protection_container_name is nil' if protection_container_name.nil?
1522
+ fail ArgumentError, 'replicated_protected_item_name is nil' if replicated_protected_item_name.nil?
1523
+
1524
+
1525
+ request_headers = {}
1526
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1527
+
1528
+ # Set Headers
1529
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1530
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1531
+ path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/failoverCommit'
1532
+
1533
+ request_url = @base_url || @client.base_url
1534
+
1535
+ options = {
1536
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1537
+ path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'protectionContainerName' => protection_container_name,'replicatedProtectedItemName' => replicated_protected_item_name},
1538
+ query_params: {'api-version' => @client.api_version},
1539
+ headers: request_headers.merge(custom_headers || {}),
1540
+ base_url: request_url
1541
+ }
1542
+ promise = @client.make_request_async(:post, path_template, options)
1543
+
1544
+ promise = promise.then do |result|
1545
+ http_response = result.response
1546
+ status_code = http_response.status
1547
+ response_content = http_response.body
1548
+ unless status_code == 200 || status_code == 202
1549
+ error_model = JSON.load(response_content)
1550
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1551
+ end
1552
+
1553
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1554
+ # Deserialize Response
1555
+ if status_code == 200
1556
+ begin
1557
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1558
+ result_mapper = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::ReplicationProtectedItem.mapper()
1559
+ result.body = @client.deserialize(result_mapper, parsed_response)
1560
+ rescue Exception => e
1561
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1562
+ end
1563
+ end
1564
+
1565
+ result
1566
+ end
1567
+
1568
+ promise.execute
1569
+ end
1570
+
1571
+ #
1572
+ # Execute planned failover
1573
+ #
1574
+ # Operation to initiate a planned failover of the replication protected item.
1575
+ #
1576
+ # @param fabric_name [String] Unique fabric name.
1577
+ # @param protection_container_name [String] Protection container name.
1578
+ # @param replicated_protected_item_name [String] Replication protected item
1579
+ # name.
1580
+ # @param failover_input [PlannedFailoverInput] Disable protection input.
1581
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1582
+ # will be added to the HTTP request.
1583
+ #
1584
+ # @return [ReplicationProtectedItem] operation results.
1585
+ #
1586
+ def begin_planned_failover(fabric_name, protection_container_name, replicated_protected_item_name, failover_input, custom_headers:nil)
1587
+ response = begin_planned_failover_async(fabric_name, protection_container_name, replicated_protected_item_name, failover_input, custom_headers:custom_headers).value!
1588
+ response.body unless response.nil?
1589
+ end
1590
+
1591
+ #
1592
+ # Execute planned failover
1593
+ #
1594
+ # Operation to initiate a planned failover of the replication protected item.
1595
+ #
1596
+ # @param fabric_name [String] Unique fabric name.
1597
+ # @param protection_container_name [String] Protection container name.
1598
+ # @param replicated_protected_item_name [String] Replication protected item
1599
+ # name.
1600
+ # @param failover_input [PlannedFailoverInput] Disable protection input.
1601
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1602
+ # will be added to the HTTP request.
1603
+ #
1604
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1605
+ #
1606
+ def begin_planned_failover_with_http_info(fabric_name, protection_container_name, replicated_protected_item_name, failover_input, custom_headers:nil)
1607
+ begin_planned_failover_async(fabric_name, protection_container_name, replicated_protected_item_name, failover_input, custom_headers:custom_headers).value!
1608
+ end
1609
+
1610
+ #
1611
+ # Execute planned failover
1612
+ #
1613
+ # Operation to initiate a planned failover of the replication protected item.
1614
+ #
1615
+ # @param fabric_name [String] Unique fabric name.
1616
+ # @param protection_container_name [String] Protection container name.
1617
+ # @param replicated_protected_item_name [String] Replication protected item
1618
+ # name.
1619
+ # @param failover_input [PlannedFailoverInput] Disable protection input.
1620
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1621
+ # to the HTTP request.
1622
+ #
1623
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1624
+ #
1625
+ def begin_planned_failover_async(fabric_name, protection_container_name, replicated_protected_item_name, failover_input, custom_headers:nil)
1626
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1627
+ fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil?
1628
+ fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
1629
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1630
+ fail ArgumentError, 'fabric_name is nil' if fabric_name.nil?
1631
+ fail ArgumentError, 'protection_container_name is nil' if protection_container_name.nil?
1632
+ fail ArgumentError, 'replicated_protected_item_name is nil' if replicated_protected_item_name.nil?
1633
+ fail ArgumentError, 'failover_input is nil' if failover_input.nil?
1634
+
1635
+
1636
+ request_headers = {}
1637
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1638
+
1639
+ # Set Headers
1640
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1641
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1642
+
1643
+ # Serialize Request
1644
+ request_mapper = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::PlannedFailoverInput.mapper()
1645
+ request_content = @client.serialize(request_mapper, failover_input)
1646
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1647
+
1648
+ path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/plannedFailover'
1649
+
1650
+ request_url = @base_url || @client.base_url
1651
+
1652
+ options = {
1653
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1654
+ path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'protectionContainerName' => protection_container_name,'replicatedProtectedItemName' => replicated_protected_item_name},
1655
+ query_params: {'api-version' => @client.api_version},
1656
+ body: request_content,
1657
+ headers: request_headers.merge(custom_headers || {}),
1658
+ base_url: request_url
1659
+ }
1660
+ promise = @client.make_request_async(:post, path_template, options)
1661
+
1662
+ promise = promise.then do |result|
1663
+ http_response = result.response
1664
+ status_code = http_response.status
1665
+ response_content = http_response.body
1666
+ unless status_code == 200 || status_code == 202
1667
+ error_model = JSON.load(response_content)
1668
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1669
+ end
1670
+
1671
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1672
+ # Deserialize Response
1673
+ if status_code == 200
1674
+ begin
1675
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1676
+ result_mapper = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::ReplicationProtectedItem.mapper()
1677
+ result.body = @client.deserialize(result_mapper, parsed_response)
1678
+ rescue Exception => e
1679
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1680
+ end
1681
+ end
1682
+
1683
+ result
1684
+ end
1685
+
1686
+ promise.execute
1687
+ end
1688
+
1689
+ #
1690
+ # Disables protection.
1691
+ #
1692
+ # The operation to disable replication on a replication protected item. This
1693
+ # will also remove the item.
1694
+ #
1695
+ # @param fabric_name [String] Fabric name.
1696
+ # @param protection_container_name [String] Protection container name.
1697
+ # @param replicated_protected_item_name [String] Replication protected item
1698
+ # name.
1699
+ # @param disable_protection_input [DisableProtectionInput] Disable protection
1700
+ # input.
1701
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1702
+ # will be added to the HTTP request.
1703
+ #
1704
+ #
1705
+ def begin_delete(fabric_name, protection_container_name, replicated_protected_item_name, disable_protection_input, custom_headers:nil)
1706
+ response = begin_delete_async(fabric_name, protection_container_name, replicated_protected_item_name, disable_protection_input, custom_headers:custom_headers).value!
1707
+ nil
1708
+ end
1709
+
1710
+ #
1711
+ # Disables protection.
1712
+ #
1713
+ # The operation to disable replication on a replication protected item. This
1714
+ # will also remove the item.
1715
+ #
1716
+ # @param fabric_name [String] Fabric name.
1717
+ # @param protection_container_name [String] Protection container name.
1718
+ # @param replicated_protected_item_name [String] Replication protected item
1719
+ # name.
1720
+ # @param disable_protection_input [DisableProtectionInput] Disable protection
1721
+ # input.
1722
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1723
+ # will be added to the HTTP request.
1724
+ #
1725
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1726
+ #
1727
+ def begin_delete_with_http_info(fabric_name, protection_container_name, replicated_protected_item_name, disable_protection_input, custom_headers:nil)
1728
+ begin_delete_async(fabric_name, protection_container_name, replicated_protected_item_name, disable_protection_input, custom_headers:custom_headers).value!
1729
+ end
1730
+
1731
+ #
1732
+ # Disables protection.
1733
+ #
1734
+ # The operation to disable replication on a replication protected item. This
1735
+ # will also remove the item.
1736
+ #
1737
+ # @param fabric_name [String] Fabric name.
1738
+ # @param protection_container_name [String] Protection container name.
1739
+ # @param replicated_protected_item_name [String] Replication protected item
1740
+ # name.
1741
+ # @param disable_protection_input [DisableProtectionInput] Disable protection
1742
+ # input.
1743
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1744
+ # to the HTTP request.
1745
+ #
1746
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1747
+ #
1748
+ def begin_delete_async(fabric_name, protection_container_name, replicated_protected_item_name, disable_protection_input, custom_headers:nil)
1749
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1750
+ fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil?
1751
+ fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
1752
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1753
+ fail ArgumentError, 'fabric_name is nil' if fabric_name.nil?
1754
+ fail ArgumentError, 'protection_container_name is nil' if protection_container_name.nil?
1755
+ fail ArgumentError, 'replicated_protected_item_name is nil' if replicated_protected_item_name.nil?
1756
+ fail ArgumentError, 'disable_protection_input is nil' if disable_protection_input.nil?
1757
+
1758
+
1759
+ request_headers = {}
1760
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1761
+
1762
+ # Set Headers
1763
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1764
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1765
+
1766
+ # Serialize Request
1767
+ request_mapper = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::DisableProtectionInput.mapper()
1768
+ request_content = @client.serialize(request_mapper, disable_protection_input)
1769
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1770
+
1771
+ path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/remove'
1772
+
1773
+ request_url = @base_url || @client.base_url
1774
+
1775
+ options = {
1776
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1777
+ path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'protectionContainerName' => protection_container_name,'replicatedProtectedItemName' => replicated_protected_item_name},
1778
+ query_params: {'api-version' => @client.api_version},
1779
+ body: request_content,
1780
+ headers: request_headers.merge(custom_headers || {}),
1781
+ base_url: request_url
1782
+ }
1783
+ promise = @client.make_request_async(:post, path_template, options)
1784
+
1785
+ promise = promise.then do |result|
1786
+ http_response = result.response
1787
+ status_code = http_response.status
1788
+ response_content = http_response.body
1789
+ unless status_code == 202 || status_code == 204
1790
+ error_model = JSON.load(response_content)
1791
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1792
+ end
1793
+
1794
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1795
+
1796
+ result
1797
+ end
1798
+
1799
+ promise.execute
1800
+ end
1801
+
1802
+ #
1803
+ # Resynchronize or repair replication.
1804
+ #
1805
+ # The operation to start resynchronize/repair replication for a replication
1806
+ # protected item requiring resynchronization.
1807
+ #
1808
+ # @param fabric_name [String] The name of the fabric.
1809
+ # @param protection_container_name [String] The name of the container.
1810
+ # @param replicated_protected_item_name [String] The name of the replication
1811
+ # protected item.
1812
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1813
+ # will be added to the HTTP request.
1814
+ #
1815
+ # @return [ReplicationProtectedItem] operation results.
1816
+ #
1817
+ def begin_repair_replication(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers:nil)
1818
+ response = begin_repair_replication_async(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers:custom_headers).value!
1819
+ response.body unless response.nil?
1820
+ end
1821
+
1822
+ #
1823
+ # Resynchronize or repair replication.
1824
+ #
1825
+ # The operation to start resynchronize/repair replication for a replication
1826
+ # protected item requiring resynchronization.
1827
+ #
1828
+ # @param fabric_name [String] The name of the fabric.
1829
+ # @param protection_container_name [String] The name of the container.
1830
+ # @param replicated_protected_item_name [String] The name of the replication
1831
+ # protected item.
1832
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1833
+ # will be added to the HTTP request.
1834
+ #
1835
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1836
+ #
1837
+ def begin_repair_replication_with_http_info(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers:nil)
1838
+ begin_repair_replication_async(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers:custom_headers).value!
1839
+ end
1840
+
1841
+ #
1842
+ # Resynchronize or repair replication.
1843
+ #
1844
+ # The operation to start resynchronize/repair replication for a replication
1845
+ # protected item requiring resynchronization.
1846
+ #
1847
+ # @param fabric_name [String] The name of the fabric.
1848
+ # @param protection_container_name [String] The name of the container.
1849
+ # @param replicated_protected_item_name [String] The name of the replication
1850
+ # protected item.
1851
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1852
+ # to the HTTP request.
1853
+ #
1854
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1855
+ #
1856
+ def begin_repair_replication_async(fabric_name, protection_container_name, replicated_protected_item_name, custom_headers:nil)
1857
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1858
+ fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil?
1859
+ fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
1860
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1861
+ fail ArgumentError, 'fabric_name is nil' if fabric_name.nil?
1862
+ fail ArgumentError, 'protection_container_name is nil' if protection_container_name.nil?
1863
+ fail ArgumentError, 'replicated_protected_item_name is nil' if replicated_protected_item_name.nil?
1864
+
1865
+
1866
+ request_headers = {}
1867
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1868
+
1869
+ # Set Headers
1870
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1871
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1872
+ path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/repairReplication'
1873
+
1874
+ request_url = @base_url || @client.base_url
1875
+
1876
+ options = {
1877
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1878
+ path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'protectionContainerName' => protection_container_name,'replicatedProtectedItemName' => replicated_protected_item_name},
1879
+ query_params: {'api-version' => @client.api_version},
1880
+ headers: request_headers.merge(custom_headers || {}),
1881
+ base_url: request_url
1882
+ }
1883
+ promise = @client.make_request_async(:post, path_template, options)
1884
+
1885
+ promise = promise.then do |result|
1886
+ http_response = result.response
1887
+ status_code = http_response.status
1888
+ response_content = http_response.body
1889
+ unless status_code == 200 || status_code == 202
1890
+ error_model = JSON.load(response_content)
1891
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1892
+ end
1893
+
1894
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1895
+ # Deserialize Response
1896
+ if status_code == 200
1897
+ begin
1898
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1899
+ result_mapper = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::ReplicationProtectedItem.mapper()
1900
+ result.body = @client.deserialize(result_mapper, parsed_response)
1901
+ rescue Exception => e
1902
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1903
+ end
1904
+ end
1905
+
1906
+ result
1907
+ end
1908
+
1909
+ promise.execute
1910
+ end
1911
+
1912
+ #
1913
+ # Execute Reverse Replication\Reprotect
1914
+ #
1915
+ # Operation to reprotect or reverse replicate a failed over replication
1916
+ # protected item.
1917
+ #
1918
+ # @param fabric_name [String] Unique fabric name.
1919
+ # @param protection_container_name [String] Protection container name.
1920
+ # @param replicated_protected_item_name [String] Replication protected item
1921
+ # name.
1922
+ # @param rr_input [ReverseReplicationInput] Disable protection input.
1923
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1924
+ # will be added to the HTTP request.
1925
+ #
1926
+ # @return [ReplicationProtectedItem] operation results.
1927
+ #
1928
+ def begin_reprotect(fabric_name, protection_container_name, replicated_protected_item_name, rr_input, custom_headers:nil)
1929
+ response = begin_reprotect_async(fabric_name, protection_container_name, replicated_protected_item_name, rr_input, custom_headers:custom_headers).value!
1930
+ response.body unless response.nil?
1931
+ end
1932
+
1933
+ #
1934
+ # Execute Reverse Replication\Reprotect
1935
+ #
1936
+ # Operation to reprotect or reverse replicate a failed over replication
1937
+ # protected item.
1938
+ #
1939
+ # @param fabric_name [String] Unique fabric name.
1940
+ # @param protection_container_name [String] Protection container name.
1941
+ # @param replicated_protected_item_name [String] Replication protected item
1942
+ # name.
1943
+ # @param rr_input [ReverseReplicationInput] Disable protection input.
1944
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1945
+ # will be added to the HTTP request.
1946
+ #
1947
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1948
+ #
1949
+ def begin_reprotect_with_http_info(fabric_name, protection_container_name, replicated_protected_item_name, rr_input, custom_headers:nil)
1950
+ begin_reprotect_async(fabric_name, protection_container_name, replicated_protected_item_name, rr_input, custom_headers:custom_headers).value!
1951
+ end
1952
+
1953
+ #
1954
+ # Execute Reverse Replication\Reprotect
1955
+ #
1956
+ # Operation to reprotect or reverse replicate a failed over replication
1957
+ # protected item.
1958
+ #
1959
+ # @param fabric_name [String] Unique fabric name.
1960
+ # @param protection_container_name [String] Protection container name.
1961
+ # @param replicated_protected_item_name [String] Replication protected item
1962
+ # name.
1963
+ # @param rr_input [ReverseReplicationInput] Disable protection input.
1964
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1965
+ # to the HTTP request.
1966
+ #
1967
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1968
+ #
1969
+ def begin_reprotect_async(fabric_name, protection_container_name, replicated_protected_item_name, rr_input, custom_headers:nil)
1970
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1971
+ fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil?
1972
+ fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
1973
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1974
+ fail ArgumentError, 'fabric_name is nil' if fabric_name.nil?
1975
+ fail ArgumentError, 'protection_container_name is nil' if protection_container_name.nil?
1976
+ fail ArgumentError, 'replicated_protected_item_name is nil' if replicated_protected_item_name.nil?
1977
+ fail ArgumentError, 'rr_input is nil' if rr_input.nil?
1978
+
1979
+
1980
+ request_headers = {}
1981
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1982
+
1983
+ # Set Headers
1984
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1985
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1986
+
1987
+ # Serialize Request
1988
+ request_mapper = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::ReverseReplicationInput.mapper()
1989
+ request_content = @client.serialize(request_mapper, rr_input)
1990
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1991
+
1992
+ path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/reProtect'
1993
+
1994
+ request_url = @base_url || @client.base_url
1995
+
1996
+ options = {
1997
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1998
+ path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'protectionContainerName' => protection_container_name,'replicatedProtectedItemName' => replicated_protected_item_name},
1999
+ query_params: {'api-version' => @client.api_version},
2000
+ body: request_content,
2001
+ headers: request_headers.merge(custom_headers || {}),
2002
+ base_url: request_url
2003
+ }
2004
+ promise = @client.make_request_async(:post, path_template, options)
2005
+
2006
+ promise = promise.then do |result|
2007
+ http_response = result.response
2008
+ status_code = http_response.status
2009
+ response_content = http_response.body
2010
+ unless status_code == 200 || status_code == 202
2011
+ error_model = JSON.load(response_content)
2012
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2013
+ end
2014
+
2015
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2016
+ # Deserialize Response
2017
+ if status_code == 200
2018
+ begin
2019
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2020
+ result_mapper = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::ReplicationProtectedItem.mapper()
2021
+ result.body = @client.deserialize(result_mapper, parsed_response)
2022
+ rescue Exception => e
2023
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2024
+ end
2025
+ end
2026
+
2027
+ result
2028
+ end
2029
+
2030
+ promise.execute
2031
+ end
2032
+
2033
+ #
2034
+ # Execute test failover
2035
+ #
2036
+ # Operation to perform a test failover of the replication protected item.
2037
+ #
2038
+ # @param fabric_name [String] Unique fabric name.
2039
+ # @param protection_container_name [String] Protection container name.
2040
+ # @param replicated_protected_item_name [String] Replication protected item
2041
+ # name.
2042
+ # @param failover_input [TestFailoverInput] Test failover input.
2043
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2044
+ # will be added to the HTTP request.
2045
+ #
2046
+ # @return [ReplicationProtectedItem] operation results.
2047
+ #
2048
+ def begin_test_failover(fabric_name, protection_container_name, replicated_protected_item_name, failover_input, custom_headers:nil)
2049
+ response = begin_test_failover_async(fabric_name, protection_container_name, replicated_protected_item_name, failover_input, custom_headers:custom_headers).value!
2050
+ response.body unless response.nil?
2051
+ end
2052
+
2053
+ #
2054
+ # Execute test failover
2055
+ #
2056
+ # Operation to perform a test failover of the replication protected item.
2057
+ #
2058
+ # @param fabric_name [String] Unique fabric name.
2059
+ # @param protection_container_name [String] Protection container name.
2060
+ # @param replicated_protected_item_name [String] Replication protected item
2061
+ # name.
2062
+ # @param failover_input [TestFailoverInput] Test failover input.
2063
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2064
+ # will be added to the HTTP request.
2065
+ #
2066
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2067
+ #
2068
+ def begin_test_failover_with_http_info(fabric_name, protection_container_name, replicated_protected_item_name, failover_input, custom_headers:nil)
2069
+ begin_test_failover_async(fabric_name, protection_container_name, replicated_protected_item_name, failover_input, custom_headers:custom_headers).value!
2070
+ end
2071
+
2072
+ #
2073
+ # Execute test failover
2074
+ #
2075
+ # Operation to perform a test failover of the replication protected item.
2076
+ #
2077
+ # @param fabric_name [String] Unique fabric name.
2078
+ # @param protection_container_name [String] Protection container name.
2079
+ # @param replicated_protected_item_name [String] Replication protected item
2080
+ # name.
2081
+ # @param failover_input [TestFailoverInput] Test failover input.
2082
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2083
+ # to the HTTP request.
2084
+ #
2085
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2086
+ #
2087
+ def begin_test_failover_async(fabric_name, protection_container_name, replicated_protected_item_name, failover_input, custom_headers:nil)
2088
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2089
+ fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil?
2090
+ fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
2091
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2092
+ fail ArgumentError, 'fabric_name is nil' if fabric_name.nil?
2093
+ fail ArgumentError, 'protection_container_name is nil' if protection_container_name.nil?
2094
+ fail ArgumentError, 'replicated_protected_item_name is nil' if replicated_protected_item_name.nil?
2095
+ fail ArgumentError, 'failover_input is nil' if failover_input.nil?
2096
+
2097
+
2098
+ request_headers = {}
2099
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2100
+
2101
+ # Set Headers
2102
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2103
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2104
+
2105
+ # Serialize Request
2106
+ request_mapper = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::TestFailoverInput.mapper()
2107
+ request_content = @client.serialize(request_mapper, failover_input)
2108
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
2109
+
2110
+ path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/testFailover'
2111
+
2112
+ request_url = @base_url || @client.base_url
2113
+
2114
+ options = {
2115
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2116
+ path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'protectionContainerName' => protection_container_name,'replicatedProtectedItemName' => replicated_protected_item_name},
2117
+ query_params: {'api-version' => @client.api_version},
2118
+ body: request_content,
2119
+ headers: request_headers.merge(custom_headers || {}),
2120
+ base_url: request_url
2121
+ }
2122
+ promise = @client.make_request_async(:post, path_template, options)
2123
+
2124
+ promise = promise.then do |result|
2125
+ http_response = result.response
2126
+ status_code = http_response.status
2127
+ response_content = http_response.body
2128
+ unless status_code == 200 || status_code == 202
2129
+ error_model = JSON.load(response_content)
2130
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2131
+ end
2132
+
2133
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2134
+ # Deserialize Response
2135
+ if status_code == 200
2136
+ begin
2137
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2138
+ result_mapper = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::ReplicationProtectedItem.mapper()
2139
+ result.body = @client.deserialize(result_mapper, parsed_response)
2140
+ rescue Exception => e
2141
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2142
+ end
2143
+ end
2144
+
2145
+ result
2146
+ end
2147
+
2148
+ promise.execute
2149
+ end
2150
+
2151
+ #
2152
+ # Execute test failover cleanup.
2153
+ #
2154
+ # Operation to clean up the test failover of a replication protected item.
2155
+ #
2156
+ # @param fabric_name [String] Unique fabric name.
2157
+ # @param protection_container_name [String] Protection container name.
2158
+ # @param replicated_protected_item_name [String] Replication protected item
2159
+ # name.
2160
+ # @param cleanup_input [TestFailoverCleanupInput] Test failover cleanup input.
2161
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2162
+ # will be added to the HTTP request.
2163
+ #
2164
+ # @return [ReplicationProtectedItem] operation results.
2165
+ #
2166
+ def begin_test_failover_cleanup(fabric_name, protection_container_name, replicated_protected_item_name, cleanup_input, custom_headers:nil)
2167
+ response = begin_test_failover_cleanup_async(fabric_name, protection_container_name, replicated_protected_item_name, cleanup_input, custom_headers:custom_headers).value!
2168
+ response.body unless response.nil?
2169
+ end
2170
+
2171
+ #
2172
+ # Execute test failover cleanup.
2173
+ #
2174
+ # Operation to clean up the test failover of a replication protected item.
2175
+ #
2176
+ # @param fabric_name [String] Unique fabric name.
2177
+ # @param protection_container_name [String] Protection container name.
2178
+ # @param replicated_protected_item_name [String] Replication protected item
2179
+ # name.
2180
+ # @param cleanup_input [TestFailoverCleanupInput] Test failover cleanup input.
2181
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2182
+ # will be added to the HTTP request.
2183
+ #
2184
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2185
+ #
2186
+ def begin_test_failover_cleanup_with_http_info(fabric_name, protection_container_name, replicated_protected_item_name, cleanup_input, custom_headers:nil)
2187
+ begin_test_failover_cleanup_async(fabric_name, protection_container_name, replicated_protected_item_name, cleanup_input, custom_headers:custom_headers).value!
2188
+ end
2189
+
2190
+ #
2191
+ # Execute test failover cleanup.
2192
+ #
2193
+ # Operation to clean up the test failover of a replication protected item.
2194
+ #
2195
+ # @param fabric_name [String] Unique fabric name.
2196
+ # @param protection_container_name [String] Protection container name.
2197
+ # @param replicated_protected_item_name [String] Replication protected item
2198
+ # name.
2199
+ # @param cleanup_input [TestFailoverCleanupInput] Test failover cleanup input.
2200
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2201
+ # to the HTTP request.
2202
+ #
2203
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2204
+ #
2205
+ def begin_test_failover_cleanup_async(fabric_name, protection_container_name, replicated_protected_item_name, cleanup_input, custom_headers:nil)
2206
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2207
+ fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil?
2208
+ fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
2209
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2210
+ fail ArgumentError, 'fabric_name is nil' if fabric_name.nil?
2211
+ fail ArgumentError, 'protection_container_name is nil' if protection_container_name.nil?
2212
+ fail ArgumentError, 'replicated_protected_item_name is nil' if replicated_protected_item_name.nil?
2213
+ fail ArgumentError, 'cleanup_input is nil' if cleanup_input.nil?
2214
+
2215
+
2216
+ request_headers = {}
2217
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2218
+
2219
+ # Set Headers
2220
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2221
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2222
+
2223
+ # Serialize Request
2224
+ request_mapper = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::TestFailoverCleanupInput.mapper()
2225
+ request_content = @client.serialize(request_mapper, cleanup_input)
2226
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
2227
+
2228
+ path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/testFailoverCleanup'
2229
+
2230
+ request_url = @base_url || @client.base_url
2231
+
2232
+ options = {
2233
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2234
+ path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'protectionContainerName' => protection_container_name,'replicatedProtectedItemName' => replicated_protected_item_name},
2235
+ query_params: {'api-version' => @client.api_version},
2236
+ body: request_content,
2237
+ headers: request_headers.merge(custom_headers || {}),
2238
+ base_url: request_url
2239
+ }
2240
+ promise = @client.make_request_async(:post, path_template, options)
2241
+
2242
+ promise = promise.then do |result|
2243
+ http_response = result.response
2244
+ status_code = http_response.status
2245
+ response_content = http_response.body
2246
+ unless status_code == 200 || status_code == 202
2247
+ error_model = JSON.load(response_content)
2248
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2249
+ end
2250
+
2251
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2252
+ # Deserialize Response
2253
+ if status_code == 200
2254
+ begin
2255
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2256
+ result_mapper = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::ReplicationProtectedItem.mapper()
2257
+ result.body = @client.deserialize(result_mapper, parsed_response)
2258
+ rescue Exception => e
2259
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2260
+ end
2261
+ end
2262
+
2263
+ result
2264
+ end
2265
+
2266
+ promise.execute
2267
+ end
2268
+
2269
+ #
2270
+ # Execute unplanned failover
2271
+ #
2272
+ # Operation to initiate a failover of the replication protected item.
2273
+ #
2274
+ # @param fabric_name [String] Unique fabric name.
2275
+ # @param protection_container_name [String] Protection container name.
2276
+ # @param replicated_protected_item_name [String] Replication protected item
2277
+ # name.
2278
+ # @param failover_input [UnplannedFailoverInput] Disable protection input.
2279
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2280
+ # will be added to the HTTP request.
2281
+ #
2282
+ # @return [ReplicationProtectedItem] operation results.
2283
+ #
2284
+ def begin_unplanned_failover(fabric_name, protection_container_name, replicated_protected_item_name, failover_input, custom_headers:nil)
2285
+ response = begin_unplanned_failover_async(fabric_name, protection_container_name, replicated_protected_item_name, failover_input, custom_headers:custom_headers).value!
2286
+ response.body unless response.nil?
2287
+ end
2288
+
2289
+ #
2290
+ # Execute unplanned failover
2291
+ #
2292
+ # Operation to initiate a failover of the replication protected item.
2293
+ #
2294
+ # @param fabric_name [String] Unique fabric name.
2295
+ # @param protection_container_name [String] Protection container name.
2296
+ # @param replicated_protected_item_name [String] Replication protected item
2297
+ # name.
2298
+ # @param failover_input [UnplannedFailoverInput] Disable protection input.
2299
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2300
+ # will be added to the HTTP request.
2301
+ #
2302
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2303
+ #
2304
+ def begin_unplanned_failover_with_http_info(fabric_name, protection_container_name, replicated_protected_item_name, failover_input, custom_headers:nil)
2305
+ begin_unplanned_failover_async(fabric_name, protection_container_name, replicated_protected_item_name, failover_input, custom_headers:custom_headers).value!
2306
+ end
2307
+
2308
+ #
2309
+ # Execute unplanned failover
2310
+ #
2311
+ # Operation to initiate a failover of the replication protected item.
2312
+ #
2313
+ # @param fabric_name [String] Unique fabric name.
2314
+ # @param protection_container_name [String] Protection container name.
2315
+ # @param replicated_protected_item_name [String] Replication protected item
2316
+ # name.
2317
+ # @param failover_input [UnplannedFailoverInput] Disable protection input.
2318
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2319
+ # to the HTTP request.
2320
+ #
2321
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2322
+ #
2323
+ def begin_unplanned_failover_async(fabric_name, protection_container_name, replicated_protected_item_name, failover_input, custom_headers:nil)
2324
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2325
+ fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil?
2326
+ fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
2327
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2328
+ fail ArgumentError, 'fabric_name is nil' if fabric_name.nil?
2329
+ fail ArgumentError, 'protection_container_name is nil' if protection_container_name.nil?
2330
+ fail ArgumentError, 'replicated_protected_item_name is nil' if replicated_protected_item_name.nil?
2331
+ fail ArgumentError, 'failover_input is nil' if failover_input.nil?
2332
+
2333
+
2334
+ request_headers = {}
2335
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2336
+
2337
+ # Set Headers
2338
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2339
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2340
+
2341
+ # Serialize Request
2342
+ request_mapper = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::UnplannedFailoverInput.mapper()
2343
+ request_content = @client.serialize(request_mapper, failover_input)
2344
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
2345
+
2346
+ path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/unplannedFailover'
2347
+
2348
+ request_url = @base_url || @client.base_url
2349
+
2350
+ options = {
2351
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2352
+ path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'protectionContainerName' => protection_container_name,'replicatedProtectedItemName' => replicated_protected_item_name},
2353
+ query_params: {'api-version' => @client.api_version},
2354
+ body: request_content,
2355
+ headers: request_headers.merge(custom_headers || {}),
2356
+ base_url: request_url
2357
+ }
2358
+ promise = @client.make_request_async(:post, path_template, options)
2359
+
2360
+ promise = promise.then do |result|
2361
+ http_response = result.response
2362
+ status_code = http_response.status
2363
+ response_content = http_response.body
2364
+ unless status_code == 200 || status_code == 202
2365
+ error_model = JSON.load(response_content)
2366
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2367
+ end
2368
+
2369
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2370
+ # Deserialize Response
2371
+ if status_code == 200
2372
+ begin
2373
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2374
+ result_mapper = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::ReplicationProtectedItem.mapper()
2375
+ result.body = @client.deserialize(result_mapper, parsed_response)
2376
+ rescue Exception => e
2377
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2378
+ end
2379
+ end
2380
+
2381
+ result
2382
+ end
2383
+
2384
+ promise.execute
2385
+ end
2386
+
2387
+ #
2388
+ # Update the mobility service on a protected item.
2389
+ #
2390
+ # The operation to update(push update) the installed mobility service software
2391
+ # on a replication protected item to the latest available version.
2392
+ #
2393
+ # @param fabric_name [String] The name of the fabric containing the protected
2394
+ # item.
2395
+ # @param protection_container_name [String] The name of the container
2396
+ # containing the protected item.
2397
+ # @param replication_protected_item_name [String] The name of the protected
2398
+ # item on which the agent is to be updated.
2399
+ # @param update_mobility_service_request [UpdateMobilityServiceRequest] Request
2400
+ # to update the mobility service on the protected item.
2401
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2402
+ # will be added to the HTTP request.
2403
+ #
2404
+ # @return [ReplicationProtectedItem] operation results.
2405
+ #
2406
+ def begin_update_mobility_service(fabric_name, protection_container_name, replication_protected_item_name, update_mobility_service_request, custom_headers:nil)
2407
+ response = begin_update_mobility_service_async(fabric_name, protection_container_name, replication_protected_item_name, update_mobility_service_request, custom_headers:custom_headers).value!
2408
+ response.body unless response.nil?
2409
+ end
2410
+
2411
+ #
2412
+ # Update the mobility service on a protected item.
2413
+ #
2414
+ # The operation to update(push update) the installed mobility service software
2415
+ # on a replication protected item to the latest available version.
2416
+ #
2417
+ # @param fabric_name [String] The name of the fabric containing the protected
2418
+ # item.
2419
+ # @param protection_container_name [String] The name of the container
2420
+ # containing the protected item.
2421
+ # @param replication_protected_item_name [String] The name of the protected
2422
+ # item on which the agent is to be updated.
2423
+ # @param update_mobility_service_request [UpdateMobilityServiceRequest] Request
2424
+ # to update the mobility service on the protected item.
2425
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2426
+ # will be added to the HTTP request.
2427
+ #
2428
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2429
+ #
2430
+ def begin_update_mobility_service_with_http_info(fabric_name, protection_container_name, replication_protected_item_name, update_mobility_service_request, custom_headers:nil)
2431
+ begin_update_mobility_service_async(fabric_name, protection_container_name, replication_protected_item_name, update_mobility_service_request, custom_headers:custom_headers).value!
2432
+ end
2433
+
2434
+ #
2435
+ # Update the mobility service on a protected item.
2436
+ #
2437
+ # The operation to update(push update) the installed mobility service software
2438
+ # on a replication protected item to the latest available version.
2439
+ #
2440
+ # @param fabric_name [String] The name of the fabric containing the protected
2441
+ # item.
2442
+ # @param protection_container_name [String] The name of the container
2443
+ # containing the protected item.
2444
+ # @param replication_protected_item_name [String] The name of the protected
2445
+ # item on which the agent is to be updated.
2446
+ # @param update_mobility_service_request [UpdateMobilityServiceRequest] Request
2447
+ # to update the mobility service on the protected item.
2448
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2449
+ # to the HTTP request.
2450
+ #
2451
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2452
+ #
2453
+ def begin_update_mobility_service_async(fabric_name, protection_container_name, replication_protected_item_name, update_mobility_service_request, custom_headers:nil)
2454
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2455
+ fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil?
2456
+ fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
2457
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2458
+ fail ArgumentError, 'fabric_name is nil' if fabric_name.nil?
2459
+ fail ArgumentError, 'protection_container_name is nil' if protection_container_name.nil?
2460
+ fail ArgumentError, 'replication_protected_item_name is nil' if replication_protected_item_name.nil?
2461
+ fail ArgumentError, 'update_mobility_service_request is nil' if update_mobility_service_request.nil?
2462
+
2463
+
2464
+ request_headers = {}
2465
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2466
+
2467
+ # Set Headers
2468
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2469
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2470
+
2471
+ # Serialize Request
2472
+ request_mapper = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::UpdateMobilityServiceRequest.mapper()
2473
+ request_content = @client.serialize(request_mapper, update_mobility_service_request)
2474
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
2475
+
2476
+ path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicationProtectedItemName}/updateMobilityService'
2477
+
2478
+ request_url = @base_url || @client.base_url
2479
+
2480
+ options = {
2481
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2482
+ path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'protectionContainerName' => protection_container_name,'replicationProtectedItemName' => replication_protected_item_name},
2483
+ query_params: {'api-version' => @client.api_version},
2484
+ body: request_content,
2485
+ headers: request_headers.merge(custom_headers || {}),
2486
+ base_url: request_url
2487
+ }
2488
+ promise = @client.make_request_async(:post, path_template, options)
2489
+
2490
+ promise = promise.then do |result|
2491
+ http_response = result.response
2492
+ status_code = http_response.status
2493
+ response_content = http_response.body
2494
+ unless status_code == 200 || status_code == 202
2495
+ error_model = JSON.load(response_content)
2496
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2497
+ end
2498
+
2499
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2500
+ # Deserialize Response
2501
+ if status_code == 200
2502
+ begin
2503
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2504
+ result_mapper = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::ReplicationProtectedItem.mapper()
2505
+ result.body = @client.deserialize(result_mapper, parsed_response)
2506
+ rescue Exception => e
2507
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2508
+ end
2509
+ end
2510
+
2511
+ result
2512
+ end
2513
+
2514
+ promise.execute
2515
+ end
2516
+
2517
+ #
2518
+ # Gets the list of Replication protected items.
2519
+ #
2520
+ # Gets the list of ASR replication protected items in the protection container.
2521
+ #
2522
+ # @param next_page_link [String] The NextLink from the previous successful call
2523
+ # to List operation.
2524
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2525
+ # will be added to the HTTP request.
2526
+ #
2527
+ # @return [ReplicationProtectedItemCollection] operation results.
2528
+ #
2529
+ def list_by_replication_protection_containers_next(next_page_link, custom_headers:nil)
2530
+ response = list_by_replication_protection_containers_next_async(next_page_link, custom_headers:custom_headers).value!
2531
+ response.body unless response.nil?
2532
+ end
2533
+
2534
+ #
2535
+ # Gets the list of Replication protected items.
2536
+ #
2537
+ # Gets the list of ASR replication protected items in the protection container.
2538
+ #
2539
+ # @param next_page_link [String] The NextLink from the previous successful call
2540
+ # to List operation.
2541
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2542
+ # will be added to the HTTP request.
2543
+ #
2544
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2545
+ #
2546
+ def list_by_replication_protection_containers_next_with_http_info(next_page_link, custom_headers:nil)
2547
+ list_by_replication_protection_containers_next_async(next_page_link, custom_headers:custom_headers).value!
2548
+ end
2549
+
2550
+ #
2551
+ # Gets the list of Replication protected items.
2552
+ #
2553
+ # Gets the list of ASR replication protected items in the protection container.
2554
+ #
2555
+ # @param next_page_link [String] The NextLink from the previous successful call
2556
+ # to List operation.
2557
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2558
+ # to the HTTP request.
2559
+ #
2560
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2561
+ #
2562
+ def list_by_replication_protection_containers_next_async(next_page_link, custom_headers:nil)
2563
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2564
+
2565
+
2566
+ request_headers = {}
2567
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2568
+
2569
+ # Set Headers
2570
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2571
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2572
+ path_template = '{nextLink}'
2573
+
2574
+ request_url = @base_url || @client.base_url
2575
+
2576
+ options = {
2577
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2578
+ skip_encoding_path_params: {'nextLink' => next_page_link},
2579
+ headers: request_headers.merge(custom_headers || {}),
2580
+ base_url: request_url
2581
+ }
2582
+ promise = @client.make_request_async(:get, path_template, options)
2583
+
2584
+ promise = promise.then do |result|
2585
+ http_response = result.response
2586
+ status_code = http_response.status
2587
+ response_content = http_response.body
2588
+ unless status_code == 200
2589
+ error_model = JSON.load(response_content)
2590
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2591
+ end
2592
+
2593
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2594
+ # Deserialize Response
2595
+ if status_code == 200
2596
+ begin
2597
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2598
+ result_mapper = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::ReplicationProtectedItemCollection.mapper()
2599
+ result.body = @client.deserialize(result_mapper, parsed_response)
2600
+ rescue Exception => e
2601
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2602
+ end
2603
+ end
2604
+
2605
+ result
2606
+ end
2607
+
2608
+ promise.execute
2609
+ end
2610
+
2611
+ #
2612
+ # Gets the list of replication protected items.
2613
+ #
2614
+ # Gets the list of ASR replication protected items in the vault.
2615
+ #
2616
+ # @param next_page_link [String] The NextLink from the previous successful call
2617
+ # to List operation.
2618
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2619
+ # will be added to the HTTP request.
2620
+ #
2621
+ # @return [ReplicationProtectedItemCollection] operation results.
2622
+ #
2623
+ def list_next(next_page_link, custom_headers:nil)
2624
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
2625
+ response.body unless response.nil?
2626
+ end
2627
+
2628
+ #
2629
+ # Gets the list of replication protected items.
2630
+ #
2631
+ # Gets the list of ASR replication protected items in the vault.
2632
+ #
2633
+ # @param next_page_link [String] The NextLink from the previous successful call
2634
+ # to List operation.
2635
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2636
+ # will be added to the HTTP request.
2637
+ #
2638
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2639
+ #
2640
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
2641
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
2642
+ end
2643
+
2644
+ #
2645
+ # Gets the list of replication protected items.
2646
+ #
2647
+ # Gets the list of ASR replication protected items in the vault.
2648
+ #
2649
+ # @param next_page_link [String] The NextLink from the previous successful call
2650
+ # to List operation.
2651
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2652
+ # to the HTTP request.
2653
+ #
2654
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2655
+ #
2656
+ def list_next_async(next_page_link, custom_headers:nil)
2657
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2658
+
2659
+
2660
+ request_headers = {}
2661
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2662
+
2663
+ # Set Headers
2664
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2665
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2666
+ path_template = '{nextLink}'
2667
+
2668
+ request_url = @base_url || @client.base_url
2669
+
2670
+ options = {
2671
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2672
+ skip_encoding_path_params: {'nextLink' => next_page_link},
2673
+ headers: request_headers.merge(custom_headers || {}),
2674
+ base_url: request_url
2675
+ }
2676
+ promise = @client.make_request_async(:get, path_template, options)
2677
+
2678
+ promise = promise.then do |result|
2679
+ http_response = result.response
2680
+ status_code = http_response.status
2681
+ response_content = http_response.body
2682
+ unless status_code == 200
2683
+ error_model = JSON.load(response_content)
2684
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2685
+ end
2686
+
2687
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2688
+ # Deserialize Response
2689
+ if status_code == 200
2690
+ begin
2691
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2692
+ result_mapper = Azure::RecoveryServicesSiteRecovery::Mgmt::V2018_01_10::Models::ReplicationProtectedItemCollection.mapper()
2693
+ result.body = @client.deserialize(result_mapper, parsed_response)
2694
+ rescue Exception => e
2695
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2696
+ end
2697
+ end
2698
+
2699
+ result
2700
+ end
2701
+
2702
+ promise.execute
2703
+ end
2704
+
2705
+ #
2706
+ # Gets the list of Replication protected items.
2707
+ #
2708
+ # Gets the list of ASR replication protected items in the protection container.
2709
+ #
2710
+ # @param fabric_name [String] Fabric name.
2711
+ # @param protection_container_name [String] Protection container name.
2712
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2713
+ # will be added to the HTTP request.
2714
+ #
2715
+ # @return [ReplicationProtectedItemCollection] which provide lazy access to
2716
+ # pages of the response.
2717
+ #
2718
+ def list_by_replication_protection_containers_as_lazy(fabric_name, protection_container_name, custom_headers:nil)
2719
+ response = list_by_replication_protection_containers_async(fabric_name, protection_container_name, custom_headers:custom_headers).value!
2720
+ unless response.nil?
2721
+ page = response.body
2722
+ page.next_method = Proc.new do |next_page_link|
2723
+ list_by_replication_protection_containers_next_async(next_page_link, custom_headers:custom_headers)
2724
+ end
2725
+ page
2726
+ end
2727
+ end
2728
+
2729
+ #
2730
+ # Gets the list of replication protected items.
2731
+ #
2732
+ # Gets the list of ASR replication protected items in the vault.
2733
+ #
2734
+ # @param skip_token [String] The pagination token. Possible values: "FabricId"
2735
+ # or "FabricId_CloudId" or null
2736
+ # @param filter [String] OData filter options.
2737
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2738
+ # will be added to the HTTP request.
2739
+ #
2740
+ # @return [ReplicationProtectedItemCollection] which provide lazy access to
2741
+ # pages of the response.
2742
+ #
2743
+ def list_as_lazy(skip_token:nil, filter:nil, custom_headers:nil)
2744
+ response = list_async(skip_token:skip_token, filter:filter, custom_headers:custom_headers).value!
2745
+ unless response.nil?
2746
+ page = response.body
2747
+ page.next_method = Proc.new do |next_page_link|
2748
+ list_next_async(next_page_link, custom_headers:custom_headers)
2749
+ end
2750
+ page
2751
+ end
2752
+ end
2753
+
2754
+ end
2755
+ end