azure_mgmt_storagesync 0.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (227) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +21 -0
  3. data/lib/2018-04-02/generated/azure_mgmt_storagesync.rb +76 -0
  4. data/lib/2018-04-02/generated/azure_mgmt_storagesync/cloud_endpoints.rb +1319 -0
  5. data/lib/2018-04-02/generated/azure_mgmt_storagesync/models/azure_entity_resource.rb +75 -0
  6. data/lib/2018-04-02/generated/azure_mgmt_storagesync/models/backup_request.rb +46 -0
  7. data/lib/2018-04-02/generated/azure_mgmt_storagesync/models/check_name_availability_parameters.rb +61 -0
  8. data/lib/2018-04-02/generated/azure_mgmt_storagesync/models/check_name_availability_result.rb +78 -0
  9. data/lib/2018-04-02/generated/azure_mgmt_storagesync/models/cloud_endpoint.rb +162 -0
  10. data/lib/2018-04-02/generated/azure_mgmt_storagesync/models/cloud_endpoint_array.rb +55 -0
  11. data/lib/2018-04-02/generated/azure_mgmt_storagesync/models/cloud_endpoint_create_parameters.rb +107 -0
  12. data/lib/2018-04-02/generated/azure_mgmt_storagesync/models/name_availability_reason.rb +16 -0
  13. data/lib/2018-04-02/generated/azure_mgmt_storagesync/models/operation_display_info.rb +80 -0
  14. data/lib/2018-04-02/generated/azure_mgmt_storagesync/models/operation_display_resource.rb +79 -0
  15. data/lib/2018-04-02/generated/azure_mgmt_storagesync/models/operation_entity.rb +69 -0
  16. data/lib/2018-04-02/generated/azure_mgmt_storagesync/models/operation_entity_list_result.rb +98 -0
  17. data/lib/2018-04-02/generated/azure_mgmt_storagesync/models/post_backup_response.rb +47 -0
  18. data/lib/2018-04-02/generated/azure_mgmt_storagesync/models/post_restore_request.rb +132 -0
  19. data/lib/2018-04-02/generated/azure_mgmt_storagesync/models/pre_restore_request.rb +144 -0
  20. data/lib/2018-04-02/generated/azure_mgmt_storagesync/models/proxy_resource.rb +63 -0
  21. data/lib/2018-04-02/generated/azure_mgmt_storagesync/models/reason.rb +19 -0
  22. data/lib/2018-04-02/generated/azure_mgmt_storagesync/models/recall_action_parameters.rb +57 -0
  23. data/lib/2018-04-02/generated/azure_mgmt_storagesync/models/registered_server.rb +260 -0
  24. data/lib/2018-04-02/generated/azure_mgmt_storagesync/models/registered_server_array.rb +55 -0
  25. data/lib/2018-04-02/generated/azure_mgmt_storagesync/models/registered_server_create_parameters.rb +173 -0
  26. data/lib/2018-04-02/generated/azure_mgmt_storagesync/models/resource.rb +83 -0
  27. data/lib/2018-04-02/generated/azure_mgmt_storagesync/models/resources_move_info.rb +65 -0
  28. data/lib/2018-04-02/generated/azure_mgmt_storagesync/models/restore_file_spec.rb +58 -0
  29. data/lib/2018-04-02/generated/azure_mgmt_storagesync/models/server_endpoint.rb +166 -0
  30. data/lib/2018-04-02/generated/azure_mgmt_storagesync/models/server_endpoint_array.rb +55 -0
  31. data/lib/2018-04-02/generated/azure_mgmt_storagesync/models/server_endpoint_create_parameters.rb +134 -0
  32. data/lib/2018-04-02/generated/azure_mgmt_storagesync/models/server_endpoint_update_parameters.rb +82 -0
  33. data/lib/2018-04-02/generated/azure_mgmt_storagesync/models/storage_sync_api_error.rb +80 -0
  34. data/lib/2018-04-02/generated/azure_mgmt_storagesync/models/storage_sync_error.rb +59 -0
  35. data/lib/2018-04-02/generated/azure_mgmt_storagesync/models/storage_sync_error_details.rb +68 -0
  36. data/lib/2018-04-02/generated/azure_mgmt_storagesync/models/storage_sync_service.rb +110 -0
  37. data/lib/2018-04-02/generated/azure_mgmt_storagesync/models/storage_sync_service_array.rb +55 -0
  38. data/lib/2018-04-02/generated/azure_mgmt_storagesync/models/storage_sync_service_create_parameters.rb +74 -0
  39. data/lib/2018-04-02/generated/azure_mgmt_storagesync/models/storage_sync_service_update_parameters.rb +66 -0
  40. data/lib/2018-04-02/generated/azure_mgmt_storagesync/models/subscription_state.rb +70 -0
  41. data/lib/2018-04-02/generated/azure_mgmt_storagesync/models/sync_group.rb +85 -0
  42. data/lib/2018-04-02/generated/azure_mgmt_storagesync/models/sync_group_array.rb +55 -0
  43. data/lib/2018-04-02/generated/azure_mgmt_storagesync/models/sync_group_create_parameters.rb +85 -0
  44. data/lib/2018-04-02/generated/azure_mgmt_storagesync/models/tracked_resource.rb +92 -0
  45. data/lib/2018-04-02/generated/azure_mgmt_storagesync/models/workflow.rb +119 -0
  46. data/lib/2018-04-02/generated/azure_mgmt_storagesync/models/workflow_array.rb +55 -0
  47. data/lib/2018-04-02/generated/azure_mgmt_storagesync/module_definition.rb +9 -0
  48. data/lib/2018-04-02/generated/azure_mgmt_storagesync/operations.rb +216 -0
  49. data/lib/2018-04-02/generated/azure_mgmt_storagesync/registered_servers.rb +548 -0
  50. data/lib/2018-04-02/generated/azure_mgmt_storagesync/server_endpoints.rb +905 -0
  51. data/lib/2018-04-02/generated/azure_mgmt_storagesync/storage_sync_management_client.rb +155 -0
  52. data/lib/2018-04-02/generated/azure_mgmt_storagesync/storage_sync_services.rb +739 -0
  53. data/lib/2018-04-02/generated/azure_mgmt_storagesync/sync_groups.rb +449 -0
  54. data/lib/2018-04-02/generated/azure_mgmt_storagesync/workflows.rb +228 -0
  55. data/lib/2018-07-01/generated/azure_mgmt_storagesync.rb +77 -0
  56. data/lib/2018-07-01/generated/azure_mgmt_storagesync/cloud_endpoints.rb +1319 -0
  57. data/lib/2018-07-01/generated/azure_mgmt_storagesync/models/azure_entity_resource.rb +75 -0
  58. data/lib/2018-07-01/generated/azure_mgmt_storagesync/models/backup_request.rb +46 -0
  59. data/lib/2018-07-01/generated/azure_mgmt_storagesync/models/check_name_availability_parameters.rb +61 -0
  60. data/lib/2018-07-01/generated/azure_mgmt_storagesync/models/check_name_availability_result.rb +78 -0
  61. data/lib/2018-07-01/generated/azure_mgmt_storagesync/models/cloud_endpoint.rb +162 -0
  62. data/lib/2018-07-01/generated/azure_mgmt_storagesync/models/cloud_endpoint_array.rb +55 -0
  63. data/lib/2018-07-01/generated/azure_mgmt_storagesync/models/cloud_endpoint_create_parameters.rb +95 -0
  64. data/lib/2018-07-01/generated/azure_mgmt_storagesync/models/name_availability_reason.rb +16 -0
  65. data/lib/2018-07-01/generated/azure_mgmt_storagesync/models/operation_display_info.rb +80 -0
  66. data/lib/2018-07-01/generated/azure_mgmt_storagesync/models/operation_display_resource.rb +79 -0
  67. data/lib/2018-07-01/generated/azure_mgmt_storagesync/models/operation_entity.rb +69 -0
  68. data/lib/2018-07-01/generated/azure_mgmt_storagesync/models/operation_entity_list_result.rb +98 -0
  69. data/lib/2018-07-01/generated/azure_mgmt_storagesync/models/post_backup_response.rb +47 -0
  70. data/lib/2018-07-01/generated/azure_mgmt_storagesync/models/post_restore_request.rb +132 -0
  71. data/lib/2018-07-01/generated/azure_mgmt_storagesync/models/pre_restore_request.rb +144 -0
  72. data/lib/2018-07-01/generated/azure_mgmt_storagesync/models/proxy_resource.rb +63 -0
  73. data/lib/2018-07-01/generated/azure_mgmt_storagesync/models/reason.rb +19 -0
  74. data/lib/2018-07-01/generated/azure_mgmt_storagesync/models/recall_action_parameters.rb +57 -0
  75. data/lib/2018-07-01/generated/azure_mgmt_storagesync/models/registered_server.rb +271 -0
  76. data/lib/2018-07-01/generated/azure_mgmt_storagesync/models/registered_server_array.rb +55 -0
  77. data/lib/2018-07-01/generated/azure_mgmt_storagesync/models/registered_server_create_parameters.rb +161 -0
  78. data/lib/2018-07-01/generated/azure_mgmt_storagesync/models/resource.rb +83 -0
  79. data/lib/2018-07-01/generated/azure_mgmt_storagesync/models/resources_move_info.rb +65 -0
  80. data/lib/2018-07-01/generated/azure_mgmt_storagesync/models/restore_file_spec.rb +58 -0
  81. data/lib/2018-07-01/generated/azure_mgmt_storagesync/models/server_endpoint.rb +181 -0
  82. data/lib/2018-07-01/generated/azure_mgmt_storagesync/models/server_endpoint_array.rb +55 -0
  83. data/lib/2018-07-01/generated/azure_mgmt_storagesync/models/server_endpoint_create_parameters.rb +137 -0
  84. data/lib/2018-07-01/generated/azure_mgmt_storagesync/models/server_endpoint_update_parameters.rb +77 -0
  85. data/lib/2018-07-01/generated/azure_mgmt_storagesync/models/storage_sync_api_error.rb +80 -0
  86. data/lib/2018-07-01/generated/azure_mgmt_storagesync/models/storage_sync_error.rb +59 -0
  87. data/lib/2018-07-01/generated/azure_mgmt_storagesync/models/storage_sync_error_details.rb +68 -0
  88. data/lib/2018-07-01/generated/azure_mgmt_storagesync/models/storage_sync_service.rb +110 -0
  89. data/lib/2018-07-01/generated/azure_mgmt_storagesync/models/storage_sync_service_array.rb +55 -0
  90. data/lib/2018-07-01/generated/azure_mgmt_storagesync/models/storage_sync_service_create_parameters.rb +85 -0
  91. data/lib/2018-07-01/generated/azure_mgmt_storagesync/models/storage_sync_service_update_parameters.rb +66 -0
  92. data/lib/2018-07-01/generated/azure_mgmt_storagesync/models/subscription_state.rb +70 -0
  93. data/lib/2018-07-01/generated/azure_mgmt_storagesync/models/sync_group.rb +85 -0
  94. data/lib/2018-07-01/generated/azure_mgmt_storagesync/models/sync_group_array.rb +55 -0
  95. data/lib/2018-07-01/generated/azure_mgmt_storagesync/models/sync_group_create_parameters.rb +73 -0
  96. data/lib/2018-07-01/generated/azure_mgmt_storagesync/models/tracked_resource.rb +92 -0
  97. data/lib/2018-07-01/generated/azure_mgmt_storagesync/models/trigger_rollover_request.rb +46 -0
  98. data/lib/2018-07-01/generated/azure_mgmt_storagesync/models/workflow.rb +119 -0
  99. data/lib/2018-07-01/generated/azure_mgmt_storagesync/models/workflow_array.rb +55 -0
  100. data/lib/2018-07-01/generated/azure_mgmt_storagesync/module_definition.rb +9 -0
  101. data/lib/2018-07-01/generated/azure_mgmt_storagesync/operations.rb +216 -0
  102. data/lib/2018-07-01/generated/azure_mgmt_storagesync/registered_servers.rb +701 -0
  103. data/lib/2018-07-01/generated/azure_mgmt_storagesync/server_endpoints.rb +905 -0
  104. data/lib/2018-07-01/generated/azure_mgmt_storagesync/storage_sync_management_client.rb +155 -0
  105. data/lib/2018-07-01/generated/azure_mgmt_storagesync/storage_sync_services.rb +739 -0
  106. data/lib/2018-07-01/generated/azure_mgmt_storagesync/sync_groups.rb +449 -0
  107. data/lib/2018-07-01/generated/azure_mgmt_storagesync/workflows.rb +331 -0
  108. data/lib/2018-10-01/generated/azure_mgmt_storagesync.rb +80 -0
  109. data/lib/2018-10-01/generated/azure_mgmt_storagesync/cloud_endpoints.rb +1319 -0
  110. data/lib/2018-10-01/generated/azure_mgmt_storagesync/models/azure_entity_resource.rb +75 -0
  111. data/lib/2018-10-01/generated/azure_mgmt_storagesync/models/backup_request.rb +46 -0
  112. data/lib/2018-10-01/generated/azure_mgmt_storagesync/models/check_name_availability_parameters.rb +61 -0
  113. data/lib/2018-10-01/generated/azure_mgmt_storagesync/models/check_name_availability_result.rb +78 -0
  114. data/lib/2018-10-01/generated/azure_mgmt_storagesync/models/cloud_endpoint.rb +162 -0
  115. data/lib/2018-10-01/generated/azure_mgmt_storagesync/models/cloud_endpoint_array.rb +55 -0
  116. data/lib/2018-10-01/generated/azure_mgmt_storagesync/models/cloud_endpoint_create_parameters.rb +95 -0
  117. data/lib/2018-10-01/generated/azure_mgmt_storagesync/models/name_availability_reason.rb +16 -0
  118. data/lib/2018-10-01/generated/azure_mgmt_storagesync/models/operation_display_info.rb +80 -0
  119. data/lib/2018-10-01/generated/azure_mgmt_storagesync/models/operation_display_resource.rb +79 -0
  120. data/lib/2018-10-01/generated/azure_mgmt_storagesync/models/operation_entity.rb +69 -0
  121. data/lib/2018-10-01/generated/azure_mgmt_storagesync/models/operation_entity_list_result.rb +98 -0
  122. data/lib/2018-10-01/generated/azure_mgmt_storagesync/models/post_backup_response.rb +47 -0
  123. data/lib/2018-10-01/generated/azure_mgmt_storagesync/models/post_restore_request.rb +132 -0
  124. data/lib/2018-10-01/generated/azure_mgmt_storagesync/models/pre_restore_request.rb +144 -0
  125. data/lib/2018-10-01/generated/azure_mgmt_storagesync/models/proxy_resource.rb +63 -0
  126. data/lib/2018-10-01/generated/azure_mgmt_storagesync/models/reason.rb +19 -0
  127. data/lib/2018-10-01/generated/azure_mgmt_storagesync/models/recall_action_parameters.rb +57 -0
  128. data/lib/2018-10-01/generated/azure_mgmt_storagesync/models/registered_server.rb +271 -0
  129. data/lib/2018-10-01/generated/azure_mgmt_storagesync/models/registered_server_array.rb +55 -0
  130. data/lib/2018-10-01/generated/azure_mgmt_storagesync/models/registered_server_create_parameters.rb +161 -0
  131. data/lib/2018-10-01/generated/azure_mgmt_storagesync/models/resource.rb +83 -0
  132. data/lib/2018-10-01/generated/azure_mgmt_storagesync/models/resources_move_info.rb +65 -0
  133. data/lib/2018-10-01/generated/azure_mgmt_storagesync/models/restore_file_spec.rb +58 -0
  134. data/lib/2018-10-01/generated/azure_mgmt_storagesync/models/server_endpoint.rb +229 -0
  135. data/lib/2018-10-01/generated/azure_mgmt_storagesync/models/server_endpoint_array.rb +55 -0
  136. data/lib/2018-10-01/generated/azure_mgmt_storagesync/models/server_endpoint_create_parameters.rb +160 -0
  137. data/lib/2018-10-01/generated/azure_mgmt_storagesync/models/server_endpoint_health.rb +133 -0
  138. data/lib/2018-10-01/generated/azure_mgmt_storagesync/models/server_endpoint_update_parameters.rb +100 -0
  139. data/lib/2018-10-01/generated/azure_mgmt_storagesync/models/storage_sync_api_error.rb +80 -0
  140. data/lib/2018-10-01/generated/azure_mgmt_storagesync/models/storage_sync_error.rb +59 -0
  141. data/lib/2018-10-01/generated/azure_mgmt_storagesync/models/storage_sync_error_details.rb +68 -0
  142. data/lib/2018-10-01/generated/azure_mgmt_storagesync/models/storage_sync_service.rb +110 -0
  143. data/lib/2018-10-01/generated/azure_mgmt_storagesync/models/storage_sync_service_array.rb +55 -0
  144. data/lib/2018-10-01/generated/azure_mgmt_storagesync/models/storage_sync_service_create_parameters.rb +85 -0
  145. data/lib/2018-10-01/generated/azure_mgmt_storagesync/models/storage_sync_service_update_parameters.rb +66 -0
  146. data/lib/2018-10-01/generated/azure_mgmt_storagesync/models/subscription_state.rb +70 -0
  147. data/lib/2018-10-01/generated/azure_mgmt_storagesync/models/sync_group.rb +85 -0
  148. data/lib/2018-10-01/generated/azure_mgmt_storagesync/models/sync_group_array.rb +55 -0
  149. data/lib/2018-10-01/generated/azure_mgmt_storagesync/models/sync_group_create_parameters.rb +73 -0
  150. data/lib/2018-10-01/generated/azure_mgmt_storagesync/models/sync_progress_status.rb +133 -0
  151. data/lib/2018-10-01/generated/azure_mgmt_storagesync/models/sync_session_status.rb +83 -0
  152. data/lib/2018-10-01/generated/azure_mgmt_storagesync/models/tracked_resource.rb +92 -0
  153. data/lib/2018-10-01/generated/azure_mgmt_storagesync/models/trigger_rollover_request.rb +46 -0
  154. data/lib/2018-10-01/generated/azure_mgmt_storagesync/models/workflow.rb +119 -0
  155. data/lib/2018-10-01/generated/azure_mgmt_storagesync/models/workflow_array.rb +55 -0
  156. data/lib/2018-10-01/generated/azure_mgmt_storagesync/module_definition.rb +9 -0
  157. data/lib/2018-10-01/generated/azure_mgmt_storagesync/operations.rb +216 -0
  158. data/lib/2018-10-01/generated/azure_mgmt_storagesync/registered_servers.rb +701 -0
  159. data/lib/2018-10-01/generated/azure_mgmt_storagesync/server_endpoints.rb +905 -0
  160. data/lib/2018-10-01/generated/azure_mgmt_storagesync/storage_sync_management_client.rb +155 -0
  161. data/lib/2018-10-01/generated/azure_mgmt_storagesync/storage_sync_services.rb +739 -0
  162. data/lib/2018-10-01/generated/azure_mgmt_storagesync/sync_groups.rb +449 -0
  163. data/lib/2018-10-01/generated/azure_mgmt_storagesync/workflows.rb +331 -0
  164. data/lib/2019-02-01/generated/azure_mgmt_storagesync.rb +81 -0
  165. data/lib/2019-02-01/generated/azure_mgmt_storagesync/cloud_endpoints.rb +1319 -0
  166. data/lib/2019-02-01/generated/azure_mgmt_storagesync/models/azure_entity_resource.rb +75 -0
  167. data/lib/2019-02-01/generated/azure_mgmt_storagesync/models/backup_request.rb +46 -0
  168. data/lib/2019-02-01/generated/azure_mgmt_storagesync/models/check_name_availability_parameters.rb +61 -0
  169. data/lib/2019-02-01/generated/azure_mgmt_storagesync/models/check_name_availability_result.rb +78 -0
  170. data/lib/2019-02-01/generated/azure_mgmt_storagesync/models/cloud_endpoint.rb +162 -0
  171. data/lib/2019-02-01/generated/azure_mgmt_storagesync/models/cloud_endpoint_array.rb +55 -0
  172. data/lib/2019-02-01/generated/azure_mgmt_storagesync/models/cloud_endpoint_create_parameters.rb +95 -0
  173. data/lib/2019-02-01/generated/azure_mgmt_storagesync/models/files_not_syncing_error.rb +73 -0
  174. data/lib/2019-02-01/generated/azure_mgmt_storagesync/models/name_availability_reason.rb +16 -0
  175. data/lib/2019-02-01/generated/azure_mgmt_storagesync/models/operation_display_info.rb +80 -0
  176. data/lib/2019-02-01/generated/azure_mgmt_storagesync/models/operation_display_resource.rb +79 -0
  177. data/lib/2019-02-01/generated/azure_mgmt_storagesync/models/operation_entity.rb +69 -0
  178. data/lib/2019-02-01/generated/azure_mgmt_storagesync/models/operation_entity_list_result.rb +98 -0
  179. data/lib/2019-02-01/generated/azure_mgmt_storagesync/models/post_backup_response.rb +47 -0
  180. data/lib/2019-02-01/generated/azure_mgmt_storagesync/models/post_restore_request.rb +132 -0
  181. data/lib/2019-02-01/generated/azure_mgmt_storagesync/models/pre_restore_request.rb +144 -0
  182. data/lib/2019-02-01/generated/azure_mgmt_storagesync/models/proxy_resource.rb +63 -0
  183. data/lib/2019-02-01/generated/azure_mgmt_storagesync/models/reason.rb +19 -0
  184. data/lib/2019-02-01/generated/azure_mgmt_storagesync/models/recall_action_parameters.rb +57 -0
  185. data/lib/2019-02-01/generated/azure_mgmt_storagesync/models/registered_server.rb +271 -0
  186. data/lib/2019-02-01/generated/azure_mgmt_storagesync/models/registered_server_array.rb +55 -0
  187. data/lib/2019-02-01/generated/azure_mgmt_storagesync/models/registered_server_create_parameters.rb +161 -0
  188. data/lib/2019-02-01/generated/azure_mgmt_storagesync/models/resource.rb +83 -0
  189. data/lib/2019-02-01/generated/azure_mgmt_storagesync/models/resources_move_info.rb +65 -0
  190. data/lib/2019-02-01/generated/azure_mgmt_storagesync/models/restore_file_spec.rb +58 -0
  191. data/lib/2019-02-01/generated/azure_mgmt_storagesync/models/server_endpoint.rb +233 -0
  192. data/lib/2019-02-01/generated/azure_mgmt_storagesync/models/server_endpoint_array.rb +55 -0
  193. data/lib/2019-02-01/generated/azure_mgmt_storagesync/models/server_endpoint_create_parameters.rb +160 -0
  194. data/lib/2019-02-01/generated/azure_mgmt_storagesync/models/server_endpoint_sync_status.rb +180 -0
  195. data/lib/2019-02-01/generated/azure_mgmt_storagesync/models/server_endpoint_update_parameters.rb +100 -0
  196. data/lib/2019-02-01/generated/azure_mgmt_storagesync/models/storage_sync_api_error.rb +80 -0
  197. data/lib/2019-02-01/generated/azure_mgmt_storagesync/models/storage_sync_error.rb +59 -0
  198. data/lib/2019-02-01/generated/azure_mgmt_storagesync/models/storage_sync_error_details.rb +68 -0
  199. data/lib/2019-02-01/generated/azure_mgmt_storagesync/models/storage_sync_service.rb +110 -0
  200. data/lib/2019-02-01/generated/azure_mgmt_storagesync/models/storage_sync_service_array.rb +55 -0
  201. data/lib/2019-02-01/generated/azure_mgmt_storagesync/models/storage_sync_service_create_parameters.rb +85 -0
  202. data/lib/2019-02-01/generated/azure_mgmt_storagesync/models/storage_sync_service_update_parameters.rb +66 -0
  203. data/lib/2019-02-01/generated/azure_mgmt_storagesync/models/subscription_state.rb +70 -0
  204. data/lib/2019-02-01/generated/azure_mgmt_storagesync/models/sync_activity_status.rb +107 -0
  205. data/lib/2019-02-01/generated/azure_mgmt_storagesync/models/sync_group.rb +85 -0
  206. data/lib/2019-02-01/generated/azure_mgmt_storagesync/models/sync_group_array.rb +55 -0
  207. data/lib/2019-02-01/generated/azure_mgmt_storagesync/models/sync_group_create_parameters.rb +73 -0
  208. data/lib/2019-02-01/generated/azure_mgmt_storagesync/models/sync_session_status.rb +131 -0
  209. data/lib/2019-02-01/generated/azure_mgmt_storagesync/models/tracked_resource.rb +92 -0
  210. data/lib/2019-02-01/generated/azure_mgmt_storagesync/models/trigger_rollover_request.rb +46 -0
  211. data/lib/2019-02-01/generated/azure_mgmt_storagesync/models/workflow.rb +119 -0
  212. data/lib/2019-02-01/generated/azure_mgmt_storagesync/models/workflow_array.rb +55 -0
  213. data/lib/2019-02-01/generated/azure_mgmt_storagesync/module_definition.rb +9 -0
  214. data/lib/2019-02-01/generated/azure_mgmt_storagesync/operations.rb +216 -0
  215. data/lib/2019-02-01/generated/azure_mgmt_storagesync/registered_servers.rb +701 -0
  216. data/lib/2019-02-01/generated/azure_mgmt_storagesync/server_endpoints.rb +905 -0
  217. data/lib/2019-02-01/generated/azure_mgmt_storagesync/storage_sync_management_client.rb +155 -0
  218. data/lib/2019-02-01/generated/azure_mgmt_storagesync/storage_sync_services.rb +739 -0
  219. data/lib/2019-02-01/generated/azure_mgmt_storagesync/sync_groups.rb +449 -0
  220. data/lib/2019-02-01/generated/azure_mgmt_storagesync/workflows.rb +331 -0
  221. data/lib/azure_mgmt_storagesync.rb +9 -0
  222. data/lib/module_definition.rb +7 -0
  223. data/lib/profiles/latest/modules/storagesync_profile_module.rb +261 -0
  224. data/lib/profiles/latest/storagesync_latest_profile_client.rb +40 -0
  225. data/lib/profiles/latest/storagesync_module_definition.rb +8 -0
  226. data/lib/version.rb +7 -0
  227. metadata +343 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 7c1a77a3457b922e0d483c4aa3810b0768ae842eede2a84c8c327c6c4f165ca6
4
+ data.tar.gz: 11f8bdf38401da8f8138b2ee80f1bfc331108478358ffe26f6437d5271e39060
5
+ SHA512:
6
+ metadata.gz: 28fdd1fd04da3e69efac399cc9420ab14331f434cdf71d3ce420fc36527d99c43efdf6aafd85865e55c687b7d0c8aaddd3ea1357f21b24cc875db639d46b330d
7
+ data.tar.gz: a1a33d1dc09d0b6840caaecb8c57448e9d542e348d1ad81e4b7b6c0663f0d0efd750125ba2d3e34d65ae03d2809bbe7686a311dad155c45f457c5c32d3c5295a
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Microsoft Corporation
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,76 @@
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
+ require 'uri'
7
+ require 'cgi'
8
+ require 'date'
9
+ require 'json'
10
+ require 'base64'
11
+ require 'erb'
12
+ require 'securerandom'
13
+ require 'time'
14
+ require 'timeliness'
15
+ require 'faraday'
16
+ require 'faraday-cookie_jar'
17
+ require 'concurrent'
18
+ require 'ms_rest'
19
+ require '2018-04-02/generated/azure_mgmt_storagesync/module_definition'
20
+ require 'ms_rest_azure'
21
+
22
+ module Azure::StorageSync::Mgmt::V2018_04_02
23
+ autoload :Operations, '2018-04-02/generated/azure_mgmt_storagesync/operations.rb'
24
+ autoload :StorageSyncServices, '2018-04-02/generated/azure_mgmt_storagesync/storage_sync_services.rb'
25
+ autoload :SyncGroups, '2018-04-02/generated/azure_mgmt_storagesync/sync_groups.rb'
26
+ autoload :CloudEndpoints, '2018-04-02/generated/azure_mgmt_storagesync/cloud_endpoints.rb'
27
+ autoload :ServerEndpoints, '2018-04-02/generated/azure_mgmt_storagesync/server_endpoints.rb'
28
+ autoload :RegisteredServers, '2018-04-02/generated/azure_mgmt_storagesync/registered_servers.rb'
29
+ autoload :Workflows, '2018-04-02/generated/azure_mgmt_storagesync/workflows.rb'
30
+ autoload :StorageSyncManagementClient, '2018-04-02/generated/azure_mgmt_storagesync/storage_sync_management_client.rb'
31
+
32
+ module Models
33
+ autoload :OperationEntityListResult, '2018-04-02/generated/azure_mgmt_storagesync/models/operation_entity_list_result.rb'
34
+ autoload :StorageSyncErrorDetails, '2018-04-02/generated/azure_mgmt_storagesync/models/storage_sync_error_details.rb'
35
+ autoload :OperationDisplayResource, '2018-04-02/generated/azure_mgmt_storagesync/models/operation_display_resource.rb'
36
+ autoload :StorageSyncError, '2018-04-02/generated/azure_mgmt_storagesync/models/storage_sync_error.rb'
37
+ autoload :CheckNameAvailabilityParameters, '2018-04-02/generated/azure_mgmt_storagesync/models/check_name_availability_parameters.rb'
38
+ autoload :OperationDisplayInfo, '2018-04-02/generated/azure_mgmt_storagesync/models/operation_display_info.rb'
39
+ autoload :OperationEntity, '2018-04-02/generated/azure_mgmt_storagesync/models/operation_entity.rb'
40
+ autoload :Resource, '2018-04-02/generated/azure_mgmt_storagesync/models/resource.rb'
41
+ autoload :StorageSyncApiError, '2018-04-02/generated/azure_mgmt_storagesync/models/storage_sync_api_error.rb'
42
+ autoload :StorageSyncServiceCreateParameters, '2018-04-02/generated/azure_mgmt_storagesync/models/storage_sync_service_create_parameters.rb'
43
+ autoload :SubscriptionState, '2018-04-02/generated/azure_mgmt_storagesync/models/subscription_state.rb'
44
+ autoload :CloudEndpointCreateParameters, '2018-04-02/generated/azure_mgmt_storagesync/models/cloud_endpoint_create_parameters.rb'
45
+ autoload :RegisteredServerArray, '2018-04-02/generated/azure_mgmt_storagesync/models/registered_server_array.rb'
46
+ autoload :RegisteredServerCreateParameters, '2018-04-02/generated/azure_mgmt_storagesync/models/registered_server_create_parameters.rb'
47
+ autoload :CheckNameAvailabilityResult, '2018-04-02/generated/azure_mgmt_storagesync/models/check_name_availability_result.rb'
48
+ autoload :ServerEndpointArray, '2018-04-02/generated/azure_mgmt_storagesync/models/server_endpoint_array.rb'
49
+ autoload :StorageSyncServiceUpdateParameters, '2018-04-02/generated/azure_mgmt_storagesync/models/storage_sync_service_update_parameters.rb'
50
+ autoload :RestoreFileSpec, '2018-04-02/generated/azure_mgmt_storagesync/models/restore_file_spec.rb'
51
+ autoload :WorkflowArray, '2018-04-02/generated/azure_mgmt_storagesync/models/workflow_array.rb'
52
+ autoload :PostRestoreRequest, '2018-04-02/generated/azure_mgmt_storagesync/models/post_restore_request.rb'
53
+ autoload :RecallActionParameters, '2018-04-02/generated/azure_mgmt_storagesync/models/recall_action_parameters.rb'
54
+ autoload :PreRestoreRequest, '2018-04-02/generated/azure_mgmt_storagesync/models/pre_restore_request.rb'
55
+ autoload :ServerEndpointCreateParameters, '2018-04-02/generated/azure_mgmt_storagesync/models/server_endpoint_create_parameters.rb'
56
+ autoload :BackupRequest, '2018-04-02/generated/azure_mgmt_storagesync/models/backup_request.rb'
57
+ autoload :ResourcesMoveInfo, '2018-04-02/generated/azure_mgmt_storagesync/models/resources_move_info.rb'
58
+ autoload :PostBackupResponse, '2018-04-02/generated/azure_mgmt_storagesync/models/post_backup_response.rb'
59
+ autoload :SyncGroupCreateParameters, '2018-04-02/generated/azure_mgmt_storagesync/models/sync_group_create_parameters.rb'
60
+ autoload :StorageSyncServiceArray, '2018-04-02/generated/azure_mgmt_storagesync/models/storage_sync_service_array.rb'
61
+ autoload :SyncGroupArray, '2018-04-02/generated/azure_mgmt_storagesync/models/sync_group_array.rb'
62
+ autoload :ServerEndpointUpdateParameters, '2018-04-02/generated/azure_mgmt_storagesync/models/server_endpoint_update_parameters.rb'
63
+ autoload :CloudEndpointArray, '2018-04-02/generated/azure_mgmt_storagesync/models/cloud_endpoint_array.rb'
64
+ autoload :TrackedResource, '2018-04-02/generated/azure_mgmt_storagesync/models/tracked_resource.rb'
65
+ autoload :StorageSyncService, '2018-04-02/generated/azure_mgmt_storagesync/models/storage_sync_service.rb'
66
+ autoload :SyncGroup, '2018-04-02/generated/azure_mgmt_storagesync/models/sync_group.rb'
67
+ autoload :CloudEndpoint, '2018-04-02/generated/azure_mgmt_storagesync/models/cloud_endpoint.rb'
68
+ autoload :ServerEndpoint, '2018-04-02/generated/azure_mgmt_storagesync/models/server_endpoint.rb'
69
+ autoload :RegisteredServer, '2018-04-02/generated/azure_mgmt_storagesync/models/registered_server.rb'
70
+ autoload :Workflow, '2018-04-02/generated/azure_mgmt_storagesync/models/workflow.rb'
71
+ autoload :ProxyResource, '2018-04-02/generated/azure_mgmt_storagesync/models/proxy_resource.rb'
72
+ autoload :AzureEntityResource, '2018-04-02/generated/azure_mgmt_storagesync/models/azure_entity_resource.rb'
73
+ autoload :Reason, '2018-04-02/generated/azure_mgmt_storagesync/models/reason.rb'
74
+ autoload :NameAvailabilityReason, '2018-04-02/generated/azure_mgmt_storagesync/models/name_availability_reason.rb'
75
+ end
76
+ end
@@ -0,0 +1,1319 @@
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::StorageSync::Mgmt::V2018_04_02
7
+ #
8
+ # Microsoft Storage Sync Service API
9
+ #
10
+ class CloudEndpoints
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the CloudEndpoints class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [StorageSyncManagementClient] reference to the StorageSyncManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Create a new CloudEndpoint.
26
+ #
27
+ # @param resource_group_name [String] The name of the resource group. The name
28
+ # is case insensitive.
29
+ # @param storage_sync_service_name [String] Name of Storage Sync Service
30
+ # resource.
31
+ # @param sync_group_name [String] Name of Sync Group resource.
32
+ # @param cloud_endpoint_name [String] Name of Cloud Endpoint object.
33
+ # @param parameters [CloudEndpointCreateParameters] Body of Cloud Endpoint
34
+ # resource.
35
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
36
+ # will be added to the HTTP request.
37
+ #
38
+ # @return [CloudEndpoint] operation results.
39
+ #
40
+ def create(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, parameters, custom_headers:nil)
41
+ response = create_async(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, parameters, custom_headers:custom_headers).value!
42
+ response.body unless response.nil?
43
+ end
44
+
45
+ #
46
+ # @param resource_group_name [String] The name of the resource group. The name
47
+ # is case insensitive.
48
+ # @param storage_sync_service_name [String] Name of Storage Sync Service
49
+ # resource.
50
+ # @param sync_group_name [String] Name of Sync Group resource.
51
+ # @param cloud_endpoint_name [String] Name of Cloud Endpoint object.
52
+ # @param parameters [CloudEndpointCreateParameters] Body of Cloud Endpoint
53
+ # resource.
54
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
55
+ # will be added to the HTTP request.
56
+ #
57
+ # @return [Concurrent::Promise] promise which provides async access to http
58
+ # response.
59
+ #
60
+ def create_async(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, parameters, custom_headers:nil)
61
+ # Send request
62
+ promise = begin_create_async(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, parameters, custom_headers:custom_headers)
63
+
64
+ promise = promise.then do |response|
65
+ # Defining deserialization method.
66
+ deserialize_method = lambda do |parsed_response|
67
+ result_mapper = Azure::StorageSync::Mgmt::V2018_04_02::Models::CloudEndpoint.mapper()
68
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
69
+ end
70
+
71
+ # Waiting for response.
72
+ @client.get_long_running_operation_result(response, deserialize_method)
73
+ end
74
+
75
+ promise
76
+ end
77
+
78
+ #
79
+ # Get a given CloudEndpoint.
80
+ #
81
+ # @param resource_group_name [String] The name of the resource group. The name
82
+ # is case insensitive.
83
+ # @param storage_sync_service_name [String] Name of Storage Sync Service
84
+ # resource.
85
+ # @param sync_group_name [String] Name of Sync Group resource.
86
+ # @param cloud_endpoint_name [String] Name of Cloud Endpoint object.
87
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
88
+ # will be added to the HTTP request.
89
+ #
90
+ # @return [CloudEndpoint] operation results.
91
+ #
92
+ def get(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, custom_headers:nil)
93
+ response = get_async(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, custom_headers:custom_headers).value!
94
+ response.body unless response.nil?
95
+ end
96
+
97
+ #
98
+ # Get a given CloudEndpoint.
99
+ #
100
+ # @param resource_group_name [String] The name of the resource group. The name
101
+ # is case insensitive.
102
+ # @param storage_sync_service_name [String] Name of Storage Sync Service
103
+ # resource.
104
+ # @param sync_group_name [String] Name of Sync Group resource.
105
+ # @param cloud_endpoint_name [String] Name of Cloud Endpoint object.
106
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
107
+ # will be added to the HTTP request.
108
+ #
109
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
110
+ #
111
+ def get_with_http_info(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, custom_headers:nil)
112
+ get_async(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, custom_headers:custom_headers).value!
113
+ end
114
+
115
+ #
116
+ # Get a given CloudEndpoint.
117
+ #
118
+ # @param resource_group_name [String] The name of the resource group. The name
119
+ # is case insensitive.
120
+ # @param storage_sync_service_name [String] Name of Storage Sync Service
121
+ # resource.
122
+ # @param sync_group_name [String] Name of Sync Group resource.
123
+ # @param cloud_endpoint_name [String] Name of Cloud Endpoint object.
124
+ # @param [Hash{String => String}] A hash of custom headers that will be added
125
+ # to the HTTP request.
126
+ #
127
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
128
+ #
129
+ def get_async(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, custom_headers:nil)
130
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
131
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
132
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
133
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
134
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
135
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
136
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
137
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
138
+ fail ArgumentError, 'storage_sync_service_name is nil' if storage_sync_service_name.nil?
139
+ fail ArgumentError, 'sync_group_name is nil' if sync_group_name.nil?
140
+ fail ArgumentError, 'cloud_endpoint_name is nil' if cloud_endpoint_name.nil?
141
+
142
+
143
+ request_headers = {}
144
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
145
+
146
+ # Set Headers
147
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
148
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
149
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}'
150
+
151
+ request_url = @base_url || @client.base_url
152
+
153
+ options = {
154
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
155
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'storageSyncServiceName' => storage_sync_service_name,'syncGroupName' => sync_group_name,'cloudEndpointName' => cloud_endpoint_name},
156
+ query_params: {'api-version' => @client.api_version},
157
+ headers: request_headers.merge(custom_headers || {}),
158
+ base_url: request_url
159
+ }
160
+ promise = @client.make_request_async(:get, path_template, options)
161
+
162
+ promise = promise.then do |result|
163
+ http_response = result.response
164
+ status_code = http_response.status
165
+ response_content = http_response.body
166
+ unless status_code == 200
167
+ error_model = JSON.load(response_content)
168
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
169
+ end
170
+
171
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
172
+ # Deserialize Response
173
+ if status_code == 200
174
+ begin
175
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
176
+ result_mapper = Azure::StorageSync::Mgmt::V2018_04_02::Models::CloudEndpoint.mapper()
177
+ result.body = @client.deserialize(result_mapper, parsed_response)
178
+ rescue Exception => e
179
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
180
+ end
181
+ end
182
+
183
+ result
184
+ end
185
+
186
+ promise.execute
187
+ end
188
+
189
+ #
190
+ # Delete a given CloudEndpoint.
191
+ #
192
+ # @param resource_group_name [String] The name of the resource group. The name
193
+ # is case insensitive.
194
+ # @param storage_sync_service_name [String] Name of Storage Sync Service
195
+ # resource.
196
+ # @param sync_group_name [String] Name of Sync Group resource.
197
+ # @param cloud_endpoint_name [String] Name of Cloud Endpoint object.
198
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
199
+ # will be added to the HTTP request.
200
+ #
201
+ def delete(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, custom_headers:nil)
202
+ response = delete_async(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, custom_headers:custom_headers).value!
203
+ nil
204
+ end
205
+
206
+ #
207
+ # @param resource_group_name [String] The name of the resource group. The name
208
+ # is case insensitive.
209
+ # @param storage_sync_service_name [String] Name of Storage Sync Service
210
+ # resource.
211
+ # @param sync_group_name [String] Name of Sync Group resource.
212
+ # @param cloud_endpoint_name [String] Name of Cloud Endpoint object.
213
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
214
+ # will be added to the HTTP request.
215
+ #
216
+ # @return [Concurrent::Promise] promise which provides async access to http
217
+ # response.
218
+ #
219
+ def delete_async(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, custom_headers:nil)
220
+ # Send request
221
+ promise = begin_delete_async(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, custom_headers:custom_headers)
222
+
223
+ promise = promise.then do |response|
224
+ # Defining deserialization method.
225
+ deserialize_method = lambda do |parsed_response|
226
+ end
227
+
228
+ # Waiting for response.
229
+ @client.get_long_running_operation_result(response, deserialize_method)
230
+ end
231
+
232
+ promise
233
+ end
234
+
235
+ #
236
+ # Get a CloudEndpoint List.
237
+ #
238
+ # @param resource_group_name [String] The name of the resource group. The name
239
+ # is case insensitive.
240
+ # @param storage_sync_service_name [String] Name of Storage Sync Service
241
+ # resource.
242
+ # @param sync_group_name [String] Name of Sync Group resource.
243
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
244
+ # will be added to the HTTP request.
245
+ #
246
+ # @return [CloudEndpointArray] operation results.
247
+ #
248
+ def list_by_sync_group(resource_group_name, storage_sync_service_name, sync_group_name, custom_headers:nil)
249
+ response = list_by_sync_group_async(resource_group_name, storage_sync_service_name, sync_group_name, custom_headers:custom_headers).value!
250
+ response.body unless response.nil?
251
+ end
252
+
253
+ #
254
+ # Get a CloudEndpoint List.
255
+ #
256
+ # @param resource_group_name [String] The name of the resource group. The name
257
+ # is case insensitive.
258
+ # @param storage_sync_service_name [String] Name of Storage Sync Service
259
+ # resource.
260
+ # @param sync_group_name [String] Name of Sync Group resource.
261
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
262
+ # will be added to the HTTP request.
263
+ #
264
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
265
+ #
266
+ def list_by_sync_group_with_http_info(resource_group_name, storage_sync_service_name, sync_group_name, custom_headers:nil)
267
+ list_by_sync_group_async(resource_group_name, storage_sync_service_name, sync_group_name, custom_headers:custom_headers).value!
268
+ end
269
+
270
+ #
271
+ # Get a CloudEndpoint List.
272
+ #
273
+ # @param resource_group_name [String] The name of the resource group. The name
274
+ # is case insensitive.
275
+ # @param storage_sync_service_name [String] Name of Storage Sync Service
276
+ # resource.
277
+ # @param sync_group_name [String] Name of Sync Group resource.
278
+ # @param [Hash{String => String}] A hash of custom headers that will be added
279
+ # to the HTTP request.
280
+ #
281
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
282
+ #
283
+ def list_by_sync_group_async(resource_group_name, storage_sync_service_name, sync_group_name, custom_headers:nil)
284
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
285
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
286
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
287
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
288
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
289
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
290
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
291
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
292
+ fail ArgumentError, 'storage_sync_service_name is nil' if storage_sync_service_name.nil?
293
+ fail ArgumentError, 'sync_group_name is nil' if sync_group_name.nil?
294
+
295
+
296
+ request_headers = {}
297
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
298
+
299
+ # Set Headers
300
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
301
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
302
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints'
303
+
304
+ request_url = @base_url || @client.base_url
305
+
306
+ options = {
307
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
308
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'storageSyncServiceName' => storage_sync_service_name,'syncGroupName' => sync_group_name},
309
+ query_params: {'api-version' => @client.api_version},
310
+ headers: request_headers.merge(custom_headers || {}),
311
+ base_url: request_url
312
+ }
313
+ promise = @client.make_request_async(:get, path_template, options)
314
+
315
+ promise = promise.then do |result|
316
+ http_response = result.response
317
+ status_code = http_response.status
318
+ response_content = http_response.body
319
+ unless status_code == 200
320
+ error_model = JSON.load(response_content)
321
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
322
+ end
323
+
324
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
325
+ # Deserialize Response
326
+ if status_code == 200
327
+ begin
328
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
329
+ result_mapper = Azure::StorageSync::Mgmt::V2018_04_02::Models::CloudEndpointArray.mapper()
330
+ result.body = @client.deserialize(result_mapper, parsed_response)
331
+ rescue Exception => e
332
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
333
+ end
334
+ end
335
+
336
+ result
337
+ end
338
+
339
+ promise.execute
340
+ end
341
+
342
+ #
343
+ # Pre Backup a given CloudEndpoint.
344
+ #
345
+ # @param resource_group_name [String] The name of the resource group. The name
346
+ # is case insensitive.
347
+ # @param storage_sync_service_name [String] Name of Storage Sync Service
348
+ # resource.
349
+ # @param sync_group_name [String] Name of Sync Group resource.
350
+ # @param cloud_endpoint_name [String] Name of Cloud Endpoint object.
351
+ # @param parameters [BackupRequest] Body of Backup request.
352
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
353
+ # will be added to the HTTP request.
354
+ #
355
+ def pre_backup(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, parameters, custom_headers:nil)
356
+ response = pre_backup_async(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, parameters, custom_headers:custom_headers).value!
357
+ nil
358
+ end
359
+
360
+ #
361
+ # @param resource_group_name [String] The name of the resource group. The name
362
+ # is case insensitive.
363
+ # @param storage_sync_service_name [String] Name of Storage Sync Service
364
+ # resource.
365
+ # @param sync_group_name [String] Name of Sync Group resource.
366
+ # @param cloud_endpoint_name [String] Name of Cloud Endpoint object.
367
+ # @param parameters [BackupRequest] Body of Backup request.
368
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
369
+ # will be added to the HTTP request.
370
+ #
371
+ # @return [Concurrent::Promise] promise which provides async access to http
372
+ # response.
373
+ #
374
+ def pre_backup_async(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, parameters, custom_headers:nil)
375
+ # Send request
376
+ promise = begin_pre_backup_async(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, parameters, custom_headers:custom_headers)
377
+
378
+ promise = promise.then do |response|
379
+ # Defining deserialization method.
380
+ deserialize_method = lambda do |parsed_response|
381
+ end
382
+
383
+ # Waiting for response.
384
+ @client.get_long_running_operation_result(response, deserialize_method)
385
+ end
386
+
387
+ promise
388
+ end
389
+
390
+ #
391
+ # Post Backup a given CloudEndpoint.
392
+ #
393
+ # @param resource_group_name [String] The name of the resource group. The name
394
+ # is case insensitive.
395
+ # @param storage_sync_service_name [String] Name of Storage Sync Service
396
+ # resource.
397
+ # @param sync_group_name [String] Name of Sync Group resource.
398
+ # @param cloud_endpoint_name [String] Name of Cloud Endpoint object.
399
+ # @param parameters [BackupRequest] Body of Backup request.
400
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
401
+ # will be added to the HTTP request.
402
+ #
403
+ # @return [PostBackupResponse] operation results.
404
+ #
405
+ def post_backup(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, parameters, custom_headers:nil)
406
+ response = post_backup_async(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, parameters, custom_headers:custom_headers).value!
407
+ response.body unless response.nil?
408
+ end
409
+
410
+ #
411
+ # @param resource_group_name [String] The name of the resource group. The name
412
+ # is case insensitive.
413
+ # @param storage_sync_service_name [String] Name of Storage Sync Service
414
+ # resource.
415
+ # @param sync_group_name [String] Name of Sync Group resource.
416
+ # @param cloud_endpoint_name [String] Name of Cloud Endpoint object.
417
+ # @param parameters [BackupRequest] Body of Backup request.
418
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
419
+ # will be added to the HTTP request.
420
+ #
421
+ # @return [Concurrent::Promise] promise which provides async access to http
422
+ # response.
423
+ #
424
+ def post_backup_async(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, parameters, custom_headers:nil)
425
+ # Send request
426
+ promise = begin_post_backup_async(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, parameters, custom_headers:custom_headers)
427
+
428
+ promise = promise.then do |response|
429
+ # Defining deserialization method.
430
+ deserialize_method = lambda do |parsed_response|
431
+ result_mapper = Azure::StorageSync::Mgmt::V2018_04_02::Models::PostBackupResponse.mapper()
432
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
433
+ end
434
+
435
+ # Waiting for response.
436
+ @client.get_long_running_operation_result(response, deserialize_method)
437
+ end
438
+
439
+ promise
440
+ end
441
+
442
+ #
443
+ # Pre Restore a given CloudEndpoint.
444
+ #
445
+ # @param resource_group_name [String] The name of the resource group. The name
446
+ # is case insensitive.
447
+ # @param storage_sync_service_name [String] Name of Storage Sync Service
448
+ # resource.
449
+ # @param sync_group_name [String] Name of Sync Group resource.
450
+ # @param cloud_endpoint_name [String] Name of Cloud Endpoint object.
451
+ # @param parameters [PreRestoreRequest] Body of Cloud Endpoint object.
452
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
453
+ # will be added to the HTTP request.
454
+ #
455
+ def pre_restore(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, parameters, custom_headers:nil)
456
+ response = pre_restore_async(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, parameters, custom_headers:custom_headers).value!
457
+ nil
458
+ end
459
+
460
+ #
461
+ # @param resource_group_name [String] The name of the resource group. The name
462
+ # is case insensitive.
463
+ # @param storage_sync_service_name [String] Name of Storage Sync Service
464
+ # resource.
465
+ # @param sync_group_name [String] Name of Sync Group resource.
466
+ # @param cloud_endpoint_name [String] Name of Cloud Endpoint object.
467
+ # @param parameters [PreRestoreRequest] Body of Cloud Endpoint object.
468
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
469
+ # will be added to the HTTP request.
470
+ #
471
+ # @return [Concurrent::Promise] promise which provides async access to http
472
+ # response.
473
+ #
474
+ def pre_restore_async(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, parameters, custom_headers:nil)
475
+ # Send request
476
+ promise = begin_pre_restore_async(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, parameters, custom_headers:custom_headers)
477
+
478
+ promise = promise.then do |response|
479
+ # Defining deserialization method.
480
+ deserialize_method = lambda do |parsed_response|
481
+ end
482
+
483
+ # Waiting for response.
484
+ @client.get_long_running_operation_result(response, deserialize_method)
485
+ end
486
+
487
+ promise
488
+ end
489
+
490
+ #
491
+ # Restore Heartbeat a given CloudEndpoint.
492
+ #
493
+ # @param resource_group_name [String] The name of the resource group. The name
494
+ # is case insensitive.
495
+ # @param storage_sync_service_name [String] Name of Storage Sync Service
496
+ # resource.
497
+ # @param sync_group_name [String] Name of Sync Group resource.
498
+ # @param cloud_endpoint_name [String] Name of Cloud Endpoint object.
499
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
500
+ # will be added to the HTTP request.
501
+ #
502
+ #
503
+ def restoreheartbeat(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, custom_headers:nil)
504
+ response = restoreheartbeat_async(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, custom_headers:custom_headers).value!
505
+ nil
506
+ end
507
+
508
+ #
509
+ # Restore Heartbeat a given CloudEndpoint.
510
+ #
511
+ # @param resource_group_name [String] The name of the resource group. The name
512
+ # is case insensitive.
513
+ # @param storage_sync_service_name [String] Name of Storage Sync Service
514
+ # resource.
515
+ # @param sync_group_name [String] Name of Sync Group resource.
516
+ # @param cloud_endpoint_name [String] Name of Cloud Endpoint object.
517
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
518
+ # will be added to the HTTP request.
519
+ #
520
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
521
+ #
522
+ def restoreheartbeat_with_http_info(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, custom_headers:nil)
523
+ restoreheartbeat_async(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, custom_headers:custom_headers).value!
524
+ end
525
+
526
+ #
527
+ # Restore Heartbeat a given CloudEndpoint.
528
+ #
529
+ # @param resource_group_name [String] The name of the resource group. The name
530
+ # is case insensitive.
531
+ # @param storage_sync_service_name [String] Name of Storage Sync Service
532
+ # resource.
533
+ # @param sync_group_name [String] Name of Sync Group resource.
534
+ # @param cloud_endpoint_name [String] Name of Cloud Endpoint object.
535
+ # @param [Hash{String => String}] A hash of custom headers that will be added
536
+ # to the HTTP request.
537
+ #
538
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
539
+ #
540
+ def restoreheartbeat_async(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, custom_headers:nil)
541
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
542
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
543
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
544
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
545
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
546
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
547
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
548
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
549
+ fail ArgumentError, 'storage_sync_service_name is nil' if storage_sync_service_name.nil?
550
+ fail ArgumentError, 'sync_group_name is nil' if sync_group_name.nil?
551
+ fail ArgumentError, 'cloud_endpoint_name is nil' if cloud_endpoint_name.nil?
552
+
553
+
554
+ request_headers = {}
555
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
556
+
557
+ # Set Headers
558
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
559
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
560
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}/restoreheartbeat'
561
+
562
+ request_url = @base_url || @client.base_url
563
+
564
+ options = {
565
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
566
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'storageSyncServiceName' => storage_sync_service_name,'syncGroupName' => sync_group_name,'cloudEndpointName' => cloud_endpoint_name},
567
+ query_params: {'api-version' => @client.api_version},
568
+ headers: request_headers.merge(custom_headers || {}),
569
+ base_url: request_url
570
+ }
571
+ promise = @client.make_request_async(:post, path_template, options)
572
+
573
+ promise = promise.then do |result|
574
+ http_response = result.response
575
+ status_code = http_response.status
576
+ response_content = http_response.body
577
+ unless status_code == 200
578
+ error_model = JSON.load(response_content)
579
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
580
+ end
581
+
582
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
583
+
584
+ result
585
+ end
586
+
587
+ promise.execute
588
+ end
589
+
590
+ #
591
+ # Post Restore a given CloudEndpoint.
592
+ #
593
+ # @param resource_group_name [String] The name of the resource group. The name
594
+ # is case insensitive.
595
+ # @param storage_sync_service_name [String] Name of Storage Sync Service
596
+ # resource.
597
+ # @param sync_group_name [String] Name of Sync Group resource.
598
+ # @param cloud_endpoint_name [String] Name of Cloud Endpoint object.
599
+ # @param parameters [PostRestoreRequest] Body of Cloud Endpoint object.
600
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
601
+ # will be added to the HTTP request.
602
+ #
603
+ def post_restore(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, parameters, custom_headers:nil)
604
+ response = post_restore_async(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, parameters, custom_headers:custom_headers).value!
605
+ nil
606
+ end
607
+
608
+ #
609
+ # @param resource_group_name [String] The name of the resource group. The name
610
+ # is case insensitive.
611
+ # @param storage_sync_service_name [String] Name of Storage Sync Service
612
+ # resource.
613
+ # @param sync_group_name [String] Name of Sync Group resource.
614
+ # @param cloud_endpoint_name [String] Name of Cloud Endpoint object.
615
+ # @param parameters [PostRestoreRequest] Body of Cloud Endpoint object.
616
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
617
+ # will be added to the HTTP request.
618
+ #
619
+ # @return [Concurrent::Promise] promise which provides async access to http
620
+ # response.
621
+ #
622
+ def post_restore_async(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, parameters, custom_headers:nil)
623
+ # Send request
624
+ promise = begin_post_restore_async(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, parameters, custom_headers:custom_headers)
625
+
626
+ promise = promise.then do |response|
627
+ # Defining deserialization method.
628
+ deserialize_method = lambda do |parsed_response|
629
+ end
630
+
631
+ # Waiting for response.
632
+ @client.get_long_running_operation_result(response, deserialize_method)
633
+ end
634
+
635
+ promise
636
+ end
637
+
638
+ #
639
+ # Create a new CloudEndpoint.
640
+ #
641
+ # @param resource_group_name [String] The name of the resource group. The name
642
+ # is case insensitive.
643
+ # @param storage_sync_service_name [String] Name of Storage Sync Service
644
+ # resource.
645
+ # @param sync_group_name [String] Name of Sync Group resource.
646
+ # @param cloud_endpoint_name [String] Name of Cloud Endpoint object.
647
+ # @param parameters [CloudEndpointCreateParameters] Body of Cloud Endpoint
648
+ # resource.
649
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
650
+ # will be added to the HTTP request.
651
+ #
652
+ # @return [CloudEndpoint] operation results.
653
+ #
654
+ def begin_create(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, parameters, custom_headers:nil)
655
+ response = begin_create_async(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, parameters, custom_headers:custom_headers).value!
656
+ response.body unless response.nil?
657
+ end
658
+
659
+ #
660
+ # Create a new CloudEndpoint.
661
+ #
662
+ # @param resource_group_name [String] The name of the resource group. The name
663
+ # is case insensitive.
664
+ # @param storage_sync_service_name [String] Name of Storage Sync Service
665
+ # resource.
666
+ # @param sync_group_name [String] Name of Sync Group resource.
667
+ # @param cloud_endpoint_name [String] Name of Cloud Endpoint object.
668
+ # @param parameters [CloudEndpointCreateParameters] Body of Cloud Endpoint
669
+ # resource.
670
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
671
+ # will be added to the HTTP request.
672
+ #
673
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
674
+ #
675
+ def begin_create_with_http_info(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, parameters, custom_headers:nil)
676
+ begin_create_async(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, parameters, custom_headers:custom_headers).value!
677
+ end
678
+
679
+ #
680
+ # Create a new CloudEndpoint.
681
+ #
682
+ # @param resource_group_name [String] The name of the resource group. The name
683
+ # is case insensitive.
684
+ # @param storage_sync_service_name [String] Name of Storage Sync Service
685
+ # resource.
686
+ # @param sync_group_name [String] Name of Sync Group resource.
687
+ # @param cloud_endpoint_name [String] Name of Cloud Endpoint object.
688
+ # @param parameters [CloudEndpointCreateParameters] Body of Cloud Endpoint
689
+ # resource.
690
+ # @param [Hash{String => String}] A hash of custom headers that will be added
691
+ # to the HTTP request.
692
+ #
693
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
694
+ #
695
+ def begin_create_async(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, parameters, custom_headers:nil)
696
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
697
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
698
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
699
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
700
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
701
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
702
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
703
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
704
+ fail ArgumentError, 'storage_sync_service_name is nil' if storage_sync_service_name.nil?
705
+ fail ArgumentError, 'sync_group_name is nil' if sync_group_name.nil?
706
+ fail ArgumentError, 'cloud_endpoint_name is nil' if cloud_endpoint_name.nil?
707
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
708
+
709
+
710
+ request_headers = {}
711
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
712
+
713
+ # Set Headers
714
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
715
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
716
+
717
+ # Serialize Request
718
+ request_mapper = Azure::StorageSync::Mgmt::V2018_04_02::Models::CloudEndpointCreateParameters.mapper()
719
+ request_content = @client.serialize(request_mapper, parameters)
720
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
721
+
722
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}'
723
+
724
+ request_url = @base_url || @client.base_url
725
+
726
+ options = {
727
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
728
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'storageSyncServiceName' => storage_sync_service_name,'syncGroupName' => sync_group_name,'cloudEndpointName' => cloud_endpoint_name},
729
+ query_params: {'api-version' => @client.api_version},
730
+ body: request_content,
731
+ headers: request_headers.merge(custom_headers || {}),
732
+ base_url: request_url
733
+ }
734
+ promise = @client.make_request_async(:put, path_template, options)
735
+
736
+ promise = promise.then do |result|
737
+ http_response = result.response
738
+ status_code = http_response.status
739
+ response_content = http_response.body
740
+ unless status_code == 200 || status_code == 202
741
+ error_model = JSON.load(response_content)
742
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
743
+ end
744
+
745
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
746
+ # Deserialize Response
747
+ if status_code == 200
748
+ begin
749
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
750
+ result_mapper = Azure::StorageSync::Mgmt::V2018_04_02::Models::CloudEndpoint.mapper()
751
+ result.body = @client.deserialize(result_mapper, parsed_response)
752
+ rescue Exception => e
753
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
754
+ end
755
+ end
756
+
757
+ result
758
+ end
759
+
760
+ promise.execute
761
+ end
762
+
763
+ #
764
+ # Delete a given CloudEndpoint.
765
+ #
766
+ # @param resource_group_name [String] The name of the resource group. The name
767
+ # is case insensitive.
768
+ # @param storage_sync_service_name [String] Name of Storage Sync Service
769
+ # resource.
770
+ # @param sync_group_name [String] Name of Sync Group resource.
771
+ # @param cloud_endpoint_name [String] Name of Cloud Endpoint object.
772
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
773
+ # will be added to the HTTP request.
774
+ #
775
+ #
776
+ def begin_delete(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, custom_headers:nil)
777
+ response = begin_delete_async(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, custom_headers:custom_headers).value!
778
+ nil
779
+ end
780
+
781
+ #
782
+ # Delete a given CloudEndpoint.
783
+ #
784
+ # @param resource_group_name [String] The name of the resource group. The name
785
+ # is case insensitive.
786
+ # @param storage_sync_service_name [String] Name of Storage Sync Service
787
+ # resource.
788
+ # @param sync_group_name [String] Name of Sync Group resource.
789
+ # @param cloud_endpoint_name [String] Name of Cloud Endpoint object.
790
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
791
+ # will be added to the HTTP request.
792
+ #
793
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
794
+ #
795
+ def begin_delete_with_http_info(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, custom_headers:nil)
796
+ begin_delete_async(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, custom_headers:custom_headers).value!
797
+ end
798
+
799
+ #
800
+ # Delete a given CloudEndpoint.
801
+ #
802
+ # @param resource_group_name [String] The name of the resource group. The name
803
+ # is case insensitive.
804
+ # @param storage_sync_service_name [String] Name of Storage Sync Service
805
+ # resource.
806
+ # @param sync_group_name [String] Name of Sync Group resource.
807
+ # @param cloud_endpoint_name [String] Name of Cloud Endpoint object.
808
+ # @param [Hash{String => String}] A hash of custom headers that will be added
809
+ # to the HTTP request.
810
+ #
811
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
812
+ #
813
+ def begin_delete_async(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, custom_headers:nil)
814
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
815
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
816
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
817
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
818
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
819
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
820
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
821
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
822
+ fail ArgumentError, 'storage_sync_service_name is nil' if storage_sync_service_name.nil?
823
+ fail ArgumentError, 'sync_group_name is nil' if sync_group_name.nil?
824
+ fail ArgumentError, 'cloud_endpoint_name is nil' if cloud_endpoint_name.nil?
825
+
826
+
827
+ request_headers = {}
828
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
829
+
830
+ # Set Headers
831
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
832
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
833
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}'
834
+
835
+ request_url = @base_url || @client.base_url
836
+
837
+ options = {
838
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
839
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'storageSyncServiceName' => storage_sync_service_name,'syncGroupName' => sync_group_name,'cloudEndpointName' => cloud_endpoint_name},
840
+ query_params: {'api-version' => @client.api_version},
841
+ headers: request_headers.merge(custom_headers || {}),
842
+ base_url: request_url
843
+ }
844
+ promise = @client.make_request_async(:delete, path_template, options)
845
+
846
+ promise = promise.then do |result|
847
+ http_response = result.response
848
+ status_code = http_response.status
849
+ response_content = http_response.body
850
+ unless status_code == 200 || status_code == 202 || status_code == 204
851
+ error_model = JSON.load(response_content)
852
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
853
+ end
854
+
855
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
856
+
857
+ result
858
+ end
859
+
860
+ promise.execute
861
+ end
862
+
863
+ #
864
+ # Pre Backup a given CloudEndpoint.
865
+ #
866
+ # @param resource_group_name [String] The name of the resource group. The name
867
+ # is case insensitive.
868
+ # @param storage_sync_service_name [String] Name of Storage Sync Service
869
+ # resource.
870
+ # @param sync_group_name [String] Name of Sync Group resource.
871
+ # @param cloud_endpoint_name [String] Name of Cloud Endpoint object.
872
+ # @param parameters [BackupRequest] Body of Backup request.
873
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
874
+ # will be added to the HTTP request.
875
+ #
876
+ #
877
+ def begin_pre_backup(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, parameters, custom_headers:nil)
878
+ response = begin_pre_backup_async(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, parameters, custom_headers:custom_headers).value!
879
+ nil
880
+ end
881
+
882
+ #
883
+ # Pre Backup a given CloudEndpoint.
884
+ #
885
+ # @param resource_group_name [String] The name of the resource group. The name
886
+ # is case insensitive.
887
+ # @param storage_sync_service_name [String] Name of Storage Sync Service
888
+ # resource.
889
+ # @param sync_group_name [String] Name of Sync Group resource.
890
+ # @param cloud_endpoint_name [String] Name of Cloud Endpoint object.
891
+ # @param parameters [BackupRequest] Body of Backup request.
892
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
893
+ # will be added to the HTTP request.
894
+ #
895
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
896
+ #
897
+ def begin_pre_backup_with_http_info(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, parameters, custom_headers:nil)
898
+ begin_pre_backup_async(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, parameters, custom_headers:custom_headers).value!
899
+ end
900
+
901
+ #
902
+ # Pre Backup a given CloudEndpoint.
903
+ #
904
+ # @param resource_group_name [String] The name of the resource group. The name
905
+ # is case insensitive.
906
+ # @param storage_sync_service_name [String] Name of Storage Sync Service
907
+ # resource.
908
+ # @param sync_group_name [String] Name of Sync Group resource.
909
+ # @param cloud_endpoint_name [String] Name of Cloud Endpoint object.
910
+ # @param parameters [BackupRequest] Body of Backup request.
911
+ # @param [Hash{String => String}] A hash of custom headers that will be added
912
+ # to the HTTP request.
913
+ #
914
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
915
+ #
916
+ def begin_pre_backup_async(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, parameters, custom_headers:nil)
917
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
918
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
919
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
920
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
921
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
922
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
923
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
924
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
925
+ fail ArgumentError, 'storage_sync_service_name is nil' if storage_sync_service_name.nil?
926
+ fail ArgumentError, 'sync_group_name is nil' if sync_group_name.nil?
927
+ fail ArgumentError, 'cloud_endpoint_name is nil' if cloud_endpoint_name.nil?
928
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
929
+
930
+
931
+ request_headers = {}
932
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
933
+
934
+ # Set Headers
935
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
936
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
937
+
938
+ # Serialize Request
939
+ request_mapper = Azure::StorageSync::Mgmt::V2018_04_02::Models::BackupRequest.mapper()
940
+ request_content = @client.serialize(request_mapper, parameters)
941
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
942
+
943
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}/prebackup'
944
+
945
+ request_url = @base_url || @client.base_url
946
+
947
+ options = {
948
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
949
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'storageSyncServiceName' => storage_sync_service_name,'syncGroupName' => sync_group_name,'cloudEndpointName' => cloud_endpoint_name},
950
+ query_params: {'api-version' => @client.api_version},
951
+ body: request_content,
952
+ headers: request_headers.merge(custom_headers || {}),
953
+ base_url: request_url
954
+ }
955
+ promise = @client.make_request_async(:post, path_template, options)
956
+
957
+ promise = promise.then do |result|
958
+ http_response = result.response
959
+ status_code = http_response.status
960
+ response_content = http_response.body
961
+ unless status_code == 200 || status_code == 202
962
+ error_model = JSON.load(response_content)
963
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
964
+ end
965
+
966
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
967
+
968
+ result
969
+ end
970
+
971
+ promise.execute
972
+ end
973
+
974
+ #
975
+ # Post Backup a given CloudEndpoint.
976
+ #
977
+ # @param resource_group_name [String] The name of the resource group. The name
978
+ # is case insensitive.
979
+ # @param storage_sync_service_name [String] Name of Storage Sync Service
980
+ # resource.
981
+ # @param sync_group_name [String] Name of Sync Group resource.
982
+ # @param cloud_endpoint_name [String] Name of Cloud Endpoint object.
983
+ # @param parameters [BackupRequest] Body of Backup request.
984
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
985
+ # will be added to the HTTP request.
986
+ #
987
+ # @return [PostBackupResponse] operation results.
988
+ #
989
+ def begin_post_backup(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, parameters, custom_headers:nil)
990
+ response = begin_post_backup_async(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, parameters, custom_headers:custom_headers).value!
991
+ response.body unless response.nil?
992
+ end
993
+
994
+ #
995
+ # Post Backup a given CloudEndpoint.
996
+ #
997
+ # @param resource_group_name [String] The name of the resource group. The name
998
+ # is case insensitive.
999
+ # @param storage_sync_service_name [String] Name of Storage Sync Service
1000
+ # resource.
1001
+ # @param sync_group_name [String] Name of Sync Group resource.
1002
+ # @param cloud_endpoint_name [String] Name of Cloud Endpoint object.
1003
+ # @param parameters [BackupRequest] Body of Backup request.
1004
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1005
+ # will be added to the HTTP request.
1006
+ #
1007
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1008
+ #
1009
+ def begin_post_backup_with_http_info(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, parameters, custom_headers:nil)
1010
+ begin_post_backup_async(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, parameters, custom_headers:custom_headers).value!
1011
+ end
1012
+
1013
+ #
1014
+ # Post Backup a given CloudEndpoint.
1015
+ #
1016
+ # @param resource_group_name [String] The name of the resource group. The name
1017
+ # is case insensitive.
1018
+ # @param storage_sync_service_name [String] Name of Storage Sync Service
1019
+ # resource.
1020
+ # @param sync_group_name [String] Name of Sync Group resource.
1021
+ # @param cloud_endpoint_name [String] Name of Cloud Endpoint object.
1022
+ # @param parameters [BackupRequest] Body of Backup request.
1023
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1024
+ # to the HTTP request.
1025
+ #
1026
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1027
+ #
1028
+ def begin_post_backup_async(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, parameters, custom_headers:nil)
1029
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1030
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
1031
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1032
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1033
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1034
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
1035
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1036
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
1037
+ fail ArgumentError, 'storage_sync_service_name is nil' if storage_sync_service_name.nil?
1038
+ fail ArgumentError, 'sync_group_name is nil' if sync_group_name.nil?
1039
+ fail ArgumentError, 'cloud_endpoint_name is nil' if cloud_endpoint_name.nil?
1040
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
1041
+
1042
+
1043
+ request_headers = {}
1044
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1045
+
1046
+ # Set Headers
1047
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1048
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1049
+
1050
+ # Serialize Request
1051
+ request_mapper = Azure::StorageSync::Mgmt::V2018_04_02::Models::BackupRequest.mapper()
1052
+ request_content = @client.serialize(request_mapper, parameters)
1053
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1054
+
1055
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}/postbackup'
1056
+
1057
+ request_url = @base_url || @client.base_url
1058
+
1059
+ options = {
1060
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1061
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'storageSyncServiceName' => storage_sync_service_name,'syncGroupName' => sync_group_name,'cloudEndpointName' => cloud_endpoint_name},
1062
+ query_params: {'api-version' => @client.api_version},
1063
+ body: request_content,
1064
+ headers: request_headers.merge(custom_headers || {}),
1065
+ base_url: request_url
1066
+ }
1067
+ promise = @client.make_request_async(:post, path_template, options)
1068
+
1069
+ promise = promise.then do |result|
1070
+ http_response = result.response
1071
+ status_code = http_response.status
1072
+ response_content = http_response.body
1073
+ unless status_code == 200 || status_code == 202
1074
+ error_model = JSON.load(response_content)
1075
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1076
+ end
1077
+
1078
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1079
+ # Deserialize Response
1080
+ if status_code == 200
1081
+ begin
1082
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1083
+ result_mapper = Azure::StorageSync::Mgmt::V2018_04_02::Models::PostBackupResponse.mapper()
1084
+ result.body = @client.deserialize(result_mapper, parsed_response)
1085
+ rescue Exception => e
1086
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1087
+ end
1088
+ end
1089
+
1090
+ result
1091
+ end
1092
+
1093
+ promise.execute
1094
+ end
1095
+
1096
+ #
1097
+ # Pre Restore a given CloudEndpoint.
1098
+ #
1099
+ # @param resource_group_name [String] The name of the resource group. The name
1100
+ # is case insensitive.
1101
+ # @param storage_sync_service_name [String] Name of Storage Sync Service
1102
+ # resource.
1103
+ # @param sync_group_name [String] Name of Sync Group resource.
1104
+ # @param cloud_endpoint_name [String] Name of Cloud Endpoint object.
1105
+ # @param parameters [PreRestoreRequest] Body of Cloud Endpoint object.
1106
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1107
+ # will be added to the HTTP request.
1108
+ #
1109
+ #
1110
+ def begin_pre_restore(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, parameters, custom_headers:nil)
1111
+ response = begin_pre_restore_async(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, parameters, custom_headers:custom_headers).value!
1112
+ nil
1113
+ end
1114
+
1115
+ #
1116
+ # Pre Restore a given CloudEndpoint.
1117
+ #
1118
+ # @param resource_group_name [String] The name of the resource group. The name
1119
+ # is case insensitive.
1120
+ # @param storage_sync_service_name [String] Name of Storage Sync Service
1121
+ # resource.
1122
+ # @param sync_group_name [String] Name of Sync Group resource.
1123
+ # @param cloud_endpoint_name [String] Name of Cloud Endpoint object.
1124
+ # @param parameters [PreRestoreRequest] Body of Cloud Endpoint object.
1125
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1126
+ # will be added to the HTTP request.
1127
+ #
1128
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1129
+ #
1130
+ def begin_pre_restore_with_http_info(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, parameters, custom_headers:nil)
1131
+ begin_pre_restore_async(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, parameters, custom_headers:custom_headers).value!
1132
+ end
1133
+
1134
+ #
1135
+ # Pre Restore a given CloudEndpoint.
1136
+ #
1137
+ # @param resource_group_name [String] The name of the resource group. The name
1138
+ # is case insensitive.
1139
+ # @param storage_sync_service_name [String] Name of Storage Sync Service
1140
+ # resource.
1141
+ # @param sync_group_name [String] Name of Sync Group resource.
1142
+ # @param cloud_endpoint_name [String] Name of Cloud Endpoint object.
1143
+ # @param parameters [PreRestoreRequest] Body of Cloud Endpoint object.
1144
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1145
+ # to the HTTP request.
1146
+ #
1147
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1148
+ #
1149
+ def begin_pre_restore_async(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, parameters, custom_headers:nil)
1150
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1151
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
1152
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1153
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1154
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1155
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
1156
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1157
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
1158
+ fail ArgumentError, 'storage_sync_service_name is nil' if storage_sync_service_name.nil?
1159
+ fail ArgumentError, 'sync_group_name is nil' if sync_group_name.nil?
1160
+ fail ArgumentError, 'cloud_endpoint_name is nil' if cloud_endpoint_name.nil?
1161
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
1162
+
1163
+
1164
+ request_headers = {}
1165
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1166
+
1167
+ # Set Headers
1168
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1169
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1170
+
1171
+ # Serialize Request
1172
+ request_mapper = Azure::StorageSync::Mgmt::V2018_04_02::Models::PreRestoreRequest.mapper()
1173
+ request_content = @client.serialize(request_mapper, parameters)
1174
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1175
+
1176
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}/prerestore'
1177
+
1178
+ request_url = @base_url || @client.base_url
1179
+
1180
+ options = {
1181
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1182
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'storageSyncServiceName' => storage_sync_service_name,'syncGroupName' => sync_group_name,'cloudEndpointName' => cloud_endpoint_name},
1183
+ query_params: {'api-version' => @client.api_version},
1184
+ body: request_content,
1185
+ headers: request_headers.merge(custom_headers || {}),
1186
+ base_url: request_url
1187
+ }
1188
+ promise = @client.make_request_async(:post, path_template, options)
1189
+
1190
+ promise = promise.then do |result|
1191
+ http_response = result.response
1192
+ status_code = http_response.status
1193
+ response_content = http_response.body
1194
+ unless status_code == 200 || status_code == 202
1195
+ error_model = JSON.load(response_content)
1196
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1197
+ end
1198
+
1199
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1200
+
1201
+ result
1202
+ end
1203
+
1204
+ promise.execute
1205
+ end
1206
+
1207
+ #
1208
+ # Post Restore a given CloudEndpoint.
1209
+ #
1210
+ # @param resource_group_name [String] The name of the resource group. The name
1211
+ # is case insensitive.
1212
+ # @param storage_sync_service_name [String] Name of Storage Sync Service
1213
+ # resource.
1214
+ # @param sync_group_name [String] Name of Sync Group resource.
1215
+ # @param cloud_endpoint_name [String] Name of Cloud Endpoint object.
1216
+ # @param parameters [PostRestoreRequest] Body of Cloud Endpoint object.
1217
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1218
+ # will be added to the HTTP request.
1219
+ #
1220
+ #
1221
+ def begin_post_restore(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, parameters, custom_headers:nil)
1222
+ response = begin_post_restore_async(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, parameters, custom_headers:custom_headers).value!
1223
+ nil
1224
+ end
1225
+
1226
+ #
1227
+ # Post Restore a given CloudEndpoint.
1228
+ #
1229
+ # @param resource_group_name [String] The name of the resource group. The name
1230
+ # is case insensitive.
1231
+ # @param storage_sync_service_name [String] Name of Storage Sync Service
1232
+ # resource.
1233
+ # @param sync_group_name [String] Name of Sync Group resource.
1234
+ # @param cloud_endpoint_name [String] Name of Cloud Endpoint object.
1235
+ # @param parameters [PostRestoreRequest] Body of Cloud Endpoint object.
1236
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1237
+ # will be added to the HTTP request.
1238
+ #
1239
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1240
+ #
1241
+ def begin_post_restore_with_http_info(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, parameters, custom_headers:nil)
1242
+ begin_post_restore_async(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, parameters, custom_headers:custom_headers).value!
1243
+ end
1244
+
1245
+ #
1246
+ # Post Restore a given CloudEndpoint.
1247
+ #
1248
+ # @param resource_group_name [String] The name of the resource group. The name
1249
+ # is case insensitive.
1250
+ # @param storage_sync_service_name [String] Name of Storage Sync Service
1251
+ # resource.
1252
+ # @param sync_group_name [String] Name of Sync Group resource.
1253
+ # @param cloud_endpoint_name [String] Name of Cloud Endpoint object.
1254
+ # @param parameters [PostRestoreRequest] Body of Cloud Endpoint object.
1255
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1256
+ # to the HTTP request.
1257
+ #
1258
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1259
+ #
1260
+ def begin_post_restore_async(resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, parameters, custom_headers:nil)
1261
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1262
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
1263
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1264
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1265
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1266
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
1267
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1268
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
1269
+ fail ArgumentError, 'storage_sync_service_name is nil' if storage_sync_service_name.nil?
1270
+ fail ArgumentError, 'sync_group_name is nil' if sync_group_name.nil?
1271
+ fail ArgumentError, 'cloud_endpoint_name is nil' if cloud_endpoint_name.nil?
1272
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
1273
+
1274
+
1275
+ request_headers = {}
1276
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1277
+
1278
+ # Set Headers
1279
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1280
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1281
+
1282
+ # Serialize Request
1283
+ request_mapper = Azure::StorageSync::Mgmt::V2018_04_02::Models::PostRestoreRequest.mapper()
1284
+ request_content = @client.serialize(request_mapper, parameters)
1285
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1286
+
1287
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}/postrestore'
1288
+
1289
+ request_url = @base_url || @client.base_url
1290
+
1291
+ options = {
1292
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1293
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'storageSyncServiceName' => storage_sync_service_name,'syncGroupName' => sync_group_name,'cloudEndpointName' => cloud_endpoint_name},
1294
+ query_params: {'api-version' => @client.api_version},
1295
+ body: request_content,
1296
+ headers: request_headers.merge(custom_headers || {}),
1297
+ base_url: request_url
1298
+ }
1299
+ promise = @client.make_request_async(:post, path_template, options)
1300
+
1301
+ promise = promise.then do |result|
1302
+ http_response = result.response
1303
+ status_code = http_response.status
1304
+ response_content = http_response.body
1305
+ unless status_code == 200 || status_code == 202
1306
+ error_model = JSON.load(response_content)
1307
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1308
+ end
1309
+
1310
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1311
+
1312
+ result
1313
+ end
1314
+
1315
+ promise.execute
1316
+ end
1317
+
1318
+ end
1319
+ end