@azure/arm-recoveryservicesdatareplication 1.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (434) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/LICENSE +21 -0
  3. package/README.md +109 -0
  4. package/dist/index.js +9908 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/index.min.js +1 -0
  7. package/dist/index.min.js.map +1 -0
  8. package/dist-esm/samples-dev/checkNameAvailabilitySample.d.ts +2 -0
  9. package/dist-esm/samples-dev/checkNameAvailabilitySample.d.ts.map +1 -0
  10. package/dist-esm/samples-dev/checkNameAvailabilitySample.js +43 -0
  11. package/dist-esm/samples-dev/checkNameAvailabilitySample.js.map +1 -0
  12. package/dist-esm/samples-dev/deploymentPreflightSample.d.ts +2 -0
  13. package/dist-esm/samples-dev/deploymentPreflightSample.d.ts.map +1 -0
  14. package/dist-esm/samples-dev/deploymentPreflightSample.js +51 -0
  15. package/dist-esm/samples-dev/deploymentPreflightSample.js.map +1 -0
  16. package/dist-esm/samples-dev/draCreateSample.d.ts +2 -0
  17. package/dist-esm/samples-dev/draCreateSample.d.ts.map +1 -0
  18. package/dist-esm/samples-dev/draCreateSample.js +63 -0
  19. package/dist-esm/samples-dev/draCreateSample.js.map +1 -0
  20. package/dist-esm/samples-dev/draDeleteSample.d.ts +2 -0
  21. package/dist-esm/samples-dev/draDeleteSample.d.ts.map +1 -0
  22. package/dist-esm/samples-dev/draDeleteSample.js +41 -0
  23. package/dist-esm/samples-dev/draDeleteSample.js.map +1 -0
  24. package/dist-esm/samples-dev/draGetSample.d.ts +2 -0
  25. package/dist-esm/samples-dev/draGetSample.d.ts.map +1 -0
  26. package/dist-esm/samples-dev/draGetSample.js +41 -0
  27. package/dist-esm/samples-dev/draGetSample.js.map +1 -0
  28. package/dist-esm/samples-dev/draListSample.d.ts +2 -0
  29. package/dist-esm/samples-dev/draListSample.d.ts.map +1 -0
  30. package/dist-esm/samples-dev/draListSample.js +61 -0
  31. package/dist-esm/samples-dev/draListSample.js.map +1 -0
  32. package/dist-esm/samples-dev/draOperationStatusGetSample.d.ts +2 -0
  33. package/dist-esm/samples-dev/draOperationStatusGetSample.d.ts.map +1 -0
  34. package/dist-esm/samples-dev/draOperationStatusGetSample.js +42 -0
  35. package/dist-esm/samples-dev/draOperationStatusGetSample.js.map +1 -0
  36. package/dist-esm/samples-dev/emailConfigurationCreateSample.d.ts +2 -0
  37. package/dist-esm/samples-dev/emailConfigurationCreateSample.d.ts.map +1 -0
  38. package/dist-esm/samples-dev/emailConfigurationCreateSample.js +49 -0
  39. package/dist-esm/samples-dev/emailConfigurationCreateSample.js.map +1 -0
  40. package/dist-esm/samples-dev/emailConfigurationGetSample.d.ts +2 -0
  41. package/dist-esm/samples-dev/emailConfigurationGetSample.d.ts.map +1 -0
  42. package/dist-esm/samples-dev/emailConfigurationGetSample.js +41 -0
  43. package/dist-esm/samples-dev/emailConfigurationGetSample.js.map +1 -0
  44. package/dist-esm/samples-dev/emailConfigurationListSample.d.ts +2 -0
  45. package/dist-esm/samples-dev/emailConfigurationListSample.d.ts.map +1 -0
  46. package/dist-esm/samples-dev/emailConfigurationListSample.js +61 -0
  47. package/dist-esm/samples-dev/emailConfigurationListSample.js.map +1 -0
  48. package/dist-esm/samples-dev/eventGetSample.d.ts +2 -0
  49. package/dist-esm/samples-dev/eventGetSample.d.ts.map +1 -0
  50. package/dist-esm/samples-dev/eventGetSample.js +41 -0
  51. package/dist-esm/samples-dev/eventGetSample.js.map +1 -0
  52. package/dist-esm/samples-dev/eventListSample.d.ts +2 -0
  53. package/dist-esm/samples-dev/eventListSample.d.ts.map +1 -0
  54. package/dist-esm/samples-dev/eventListSample.js +64 -0
  55. package/dist-esm/samples-dev/eventListSample.js.map +1 -0
  56. package/dist-esm/samples-dev/fabricCreateSample.d.ts +2 -0
  57. package/dist-esm/samples-dev/fabricCreateSample.d.ts.map +1 -0
  58. package/dist-esm/samples-dev/fabricCreateSample.js +48 -0
  59. package/dist-esm/samples-dev/fabricCreateSample.js.map +1 -0
  60. package/dist-esm/samples-dev/fabricDeleteSample.d.ts +2 -0
  61. package/dist-esm/samples-dev/fabricDeleteSample.d.ts.map +1 -0
  62. package/dist-esm/samples-dev/fabricDeleteSample.js +40 -0
  63. package/dist-esm/samples-dev/fabricDeleteSample.js.map +1 -0
  64. package/dist-esm/samples-dev/fabricGetSample.d.ts +2 -0
  65. package/dist-esm/samples-dev/fabricGetSample.d.ts.map +1 -0
  66. package/dist-esm/samples-dev/fabricGetSample.js +40 -0
  67. package/dist-esm/samples-dev/fabricGetSample.js.map +1 -0
  68. package/dist-esm/samples-dev/fabricListBySubscriptionSample.d.ts +2 -0
  69. package/dist-esm/samples-dev/fabricListBySubscriptionSample.d.ts.map +1 -0
  70. package/dist-esm/samples-dev/fabricListBySubscriptionSample.js +60 -0
  71. package/dist-esm/samples-dev/fabricListBySubscriptionSample.js.map +1 -0
  72. package/dist-esm/samples-dev/fabricListSample.d.ts +2 -0
  73. package/dist-esm/samples-dev/fabricListSample.d.ts.map +1 -0
  74. package/dist-esm/samples-dev/fabricListSample.js +62 -0
  75. package/dist-esm/samples-dev/fabricListSample.js.map +1 -0
  76. package/dist-esm/samples-dev/fabricOperationsStatusGetSample.d.ts +2 -0
  77. package/dist-esm/samples-dev/fabricOperationsStatusGetSample.d.ts.map +1 -0
  78. package/dist-esm/samples-dev/fabricOperationsStatusGetSample.js +41 -0
  79. package/dist-esm/samples-dev/fabricOperationsStatusGetSample.js.map +1 -0
  80. package/dist-esm/samples-dev/fabricUpdateSample.d.ts +2 -0
  81. package/dist-esm/samples-dev/fabricUpdateSample.d.ts.map +1 -0
  82. package/dist-esm/samples-dev/fabricUpdateSample.js +47 -0
  83. package/dist-esm/samples-dev/fabricUpdateSample.js.map +1 -0
  84. package/dist-esm/samples-dev/operationsListSample.d.ts +2 -0
  85. package/dist-esm/samples-dev/operationsListSample.d.ts.map +1 -0
  86. package/dist-esm/samples-dev/operationsListSample.js +58 -0
  87. package/dist-esm/samples-dev/operationsListSample.js.map +1 -0
  88. package/dist-esm/samples-dev/policyCreateSample.d.ts +2 -0
  89. package/dist-esm/samples-dev/policyCreateSample.d.ts.map +1 -0
  90. package/dist-esm/samples-dev/policyCreateSample.js +47 -0
  91. package/dist-esm/samples-dev/policyCreateSample.js.map +1 -0
  92. package/dist-esm/samples-dev/policyDeleteSample.d.ts +2 -0
  93. package/dist-esm/samples-dev/policyDeleteSample.d.ts.map +1 -0
  94. package/dist-esm/samples-dev/policyDeleteSample.js +41 -0
  95. package/dist-esm/samples-dev/policyDeleteSample.js.map +1 -0
  96. package/dist-esm/samples-dev/policyGetSample.d.ts +2 -0
  97. package/dist-esm/samples-dev/policyGetSample.d.ts.map +1 -0
  98. package/dist-esm/samples-dev/policyGetSample.js +41 -0
  99. package/dist-esm/samples-dev/policyGetSample.js.map +1 -0
  100. package/dist-esm/samples-dev/policyListSample.d.ts +2 -0
  101. package/dist-esm/samples-dev/policyListSample.d.ts.map +1 -0
  102. package/dist-esm/samples-dev/policyListSample.js +61 -0
  103. package/dist-esm/samples-dev/policyListSample.js.map +1 -0
  104. package/dist-esm/samples-dev/policyOperationStatusGetSample.d.ts +2 -0
  105. package/dist-esm/samples-dev/policyOperationStatusGetSample.d.ts.map +1 -0
  106. package/dist-esm/samples-dev/policyOperationStatusGetSample.js +42 -0
  107. package/dist-esm/samples-dev/policyOperationStatusGetSample.js.map +1 -0
  108. package/dist-esm/samples-dev/protectedItemCreateSample.d.ts +2 -0
  109. package/dist-esm/samples-dev/protectedItemCreateSample.d.ts.map +1 -0
  110. package/dist-esm/samples-dev/protectedItemCreateSample.js +49 -0
  111. package/dist-esm/samples-dev/protectedItemCreateSample.js.map +1 -0
  112. package/dist-esm/samples-dev/protectedItemDeleteSample.d.ts +2 -0
  113. package/dist-esm/samples-dev/protectedItemDeleteSample.d.ts.map +1 -0
  114. package/dist-esm/samples-dev/protectedItemDeleteSample.js +43 -0
  115. package/dist-esm/samples-dev/protectedItemDeleteSample.js.map +1 -0
  116. package/dist-esm/samples-dev/protectedItemGetSample.d.ts +2 -0
  117. package/dist-esm/samples-dev/protectedItemGetSample.d.ts.map +1 -0
  118. package/dist-esm/samples-dev/protectedItemGetSample.js +41 -0
  119. package/dist-esm/samples-dev/protectedItemGetSample.js.map +1 -0
  120. package/dist-esm/samples-dev/protectedItemListSample.d.ts +2 -0
  121. package/dist-esm/samples-dev/protectedItemListSample.d.ts.map +1 -0
  122. package/dist-esm/samples-dev/protectedItemListSample.js +61 -0
  123. package/dist-esm/samples-dev/protectedItemListSample.js.map +1 -0
  124. package/dist-esm/samples-dev/protectedItemOperationStatusGetSample.d.ts +2 -0
  125. package/dist-esm/samples-dev/protectedItemOperationStatusGetSample.d.ts.map +1 -0
  126. package/dist-esm/samples-dev/protectedItemOperationStatusGetSample.js +42 -0
  127. package/dist-esm/samples-dev/protectedItemOperationStatusGetSample.js.map +1 -0
  128. package/dist-esm/samples-dev/protectedItemPlannedFailoverSample.d.ts +2 -0
  129. package/dist-esm/samples-dev/protectedItemPlannedFailoverSample.d.ts.map +1 -0
  130. package/dist-esm/samples-dev/protectedItemPlannedFailoverSample.js +47 -0
  131. package/dist-esm/samples-dev/protectedItemPlannedFailoverSample.js.map +1 -0
  132. package/dist-esm/samples-dev/recoveryPointsGetSample.d.ts +2 -0
  133. package/dist-esm/samples-dev/recoveryPointsGetSample.d.ts.map +1 -0
  134. package/dist-esm/samples-dev/recoveryPointsGetSample.js +42 -0
  135. package/dist-esm/samples-dev/recoveryPointsGetSample.js.map +1 -0
  136. package/dist-esm/samples-dev/recoveryPointsListSample.d.ts +2 -0
  137. package/dist-esm/samples-dev/recoveryPointsListSample.d.ts.map +1 -0
  138. package/dist-esm/samples-dev/recoveryPointsListSample.js +62 -0
  139. package/dist-esm/samples-dev/recoveryPointsListSample.js.map +1 -0
  140. package/dist-esm/samples-dev/replicationExtensionCreateSample.d.ts +2 -0
  141. package/dist-esm/samples-dev/replicationExtensionCreateSample.d.ts.map +1 -0
  142. package/dist-esm/samples-dev/replicationExtensionCreateSample.js +49 -0
  143. package/dist-esm/samples-dev/replicationExtensionCreateSample.js.map +1 -0
  144. package/dist-esm/samples-dev/replicationExtensionDeleteSample.d.ts +2 -0
  145. package/dist-esm/samples-dev/replicationExtensionDeleteSample.d.ts.map +1 -0
  146. package/dist-esm/samples-dev/replicationExtensionDeleteSample.js +41 -0
  147. package/dist-esm/samples-dev/replicationExtensionDeleteSample.js.map +1 -0
  148. package/dist-esm/samples-dev/replicationExtensionGetSample.d.ts +2 -0
  149. package/dist-esm/samples-dev/replicationExtensionGetSample.d.ts.map +1 -0
  150. package/dist-esm/samples-dev/replicationExtensionGetSample.js +41 -0
  151. package/dist-esm/samples-dev/replicationExtensionGetSample.js.map +1 -0
  152. package/dist-esm/samples-dev/replicationExtensionListSample.d.ts +2 -0
  153. package/dist-esm/samples-dev/replicationExtensionListSample.d.ts.map +1 -0
  154. package/dist-esm/samples-dev/replicationExtensionListSample.js +61 -0
  155. package/dist-esm/samples-dev/replicationExtensionListSample.js.map +1 -0
  156. package/dist-esm/samples-dev/replicationExtensionOperationStatusGetSample.d.ts +2 -0
  157. package/dist-esm/samples-dev/replicationExtensionOperationStatusGetSample.d.ts.map +1 -0
  158. package/dist-esm/samples-dev/replicationExtensionOperationStatusGetSample.js +42 -0
  159. package/dist-esm/samples-dev/replicationExtensionOperationStatusGetSample.js.map +1 -0
  160. package/dist-esm/samples-dev/vaultCreateSample.d.ts +2 -0
  161. package/dist-esm/samples-dev/vaultCreateSample.d.ts.map +1 -0
  162. package/dist-esm/samples-dev/vaultCreateSample.js +46 -0
  163. package/dist-esm/samples-dev/vaultCreateSample.js.map +1 -0
  164. package/dist-esm/samples-dev/vaultDeleteSample.d.ts +2 -0
  165. package/dist-esm/samples-dev/vaultDeleteSample.d.ts.map +1 -0
  166. package/dist-esm/samples-dev/vaultDeleteSample.js +40 -0
  167. package/dist-esm/samples-dev/vaultDeleteSample.js.map +1 -0
  168. package/dist-esm/samples-dev/vaultGetSample.d.ts +2 -0
  169. package/dist-esm/samples-dev/vaultGetSample.d.ts.map +1 -0
  170. package/dist-esm/samples-dev/vaultGetSample.js +40 -0
  171. package/dist-esm/samples-dev/vaultGetSample.js.map +1 -0
  172. package/dist-esm/samples-dev/vaultListBySubscriptionSample.d.ts +2 -0
  173. package/dist-esm/samples-dev/vaultListBySubscriptionSample.d.ts.map +1 -0
  174. package/dist-esm/samples-dev/vaultListBySubscriptionSample.js +60 -0
  175. package/dist-esm/samples-dev/vaultListBySubscriptionSample.js.map +1 -0
  176. package/dist-esm/samples-dev/vaultListSample.d.ts +2 -0
  177. package/dist-esm/samples-dev/vaultListSample.d.ts.map +1 -0
  178. package/dist-esm/samples-dev/vaultListSample.js +62 -0
  179. package/dist-esm/samples-dev/vaultListSample.js.map +1 -0
  180. package/dist-esm/samples-dev/vaultOperationStatusGetSample.d.ts +2 -0
  181. package/dist-esm/samples-dev/vaultOperationStatusGetSample.d.ts.map +1 -0
  182. package/dist-esm/samples-dev/vaultOperationStatusGetSample.js +41 -0
  183. package/dist-esm/samples-dev/vaultOperationStatusGetSample.js.map +1 -0
  184. package/dist-esm/samples-dev/vaultUpdateSample.d.ts +2 -0
  185. package/dist-esm/samples-dev/vaultUpdateSample.d.ts.map +1 -0
  186. package/dist-esm/samples-dev/vaultUpdateSample.js +45 -0
  187. package/dist-esm/samples-dev/vaultUpdateSample.js.map +1 -0
  188. package/dist-esm/samples-dev/workflowGetSample.d.ts +2 -0
  189. package/dist-esm/samples-dev/workflowGetSample.d.ts.map +1 -0
  190. package/dist-esm/samples-dev/workflowGetSample.js +41 -0
  191. package/dist-esm/samples-dev/workflowGetSample.js.map +1 -0
  192. package/dist-esm/samples-dev/workflowListSample.d.ts +2 -0
  193. package/dist-esm/samples-dev/workflowListSample.d.ts.map +1 -0
  194. package/dist-esm/samples-dev/workflowListSample.js +64 -0
  195. package/dist-esm/samples-dev/workflowListSample.js.map +1 -0
  196. package/dist-esm/samples-dev/workflowOperationStatusGetSample.d.ts +2 -0
  197. package/dist-esm/samples-dev/workflowOperationStatusGetSample.d.ts.map +1 -0
  198. package/dist-esm/samples-dev/workflowOperationStatusGetSample.js +42 -0
  199. package/dist-esm/samples-dev/workflowOperationStatusGetSample.js.map +1 -0
  200. package/dist-esm/src/azureSiteRecoveryManagementServiceAPI.d.ts +50 -0
  201. package/dist-esm/src/azureSiteRecoveryManagementServiceAPI.d.ts.map +1 -0
  202. package/dist-esm/src/azureSiteRecoveryManagementServiceAPI.js +183 -0
  203. package/dist-esm/src/azureSiteRecoveryManagementServiceAPI.js.map +1 -0
  204. package/dist-esm/src/index.d.ts +6 -0
  205. package/dist-esm/src/index.d.ts.map +1 -0
  206. package/dist-esm/src/index.js +13 -0
  207. package/dist-esm/src/index.js.map +1 -0
  208. package/dist-esm/src/lroImpl.d.ts +11 -0
  209. package/dist-esm/src/lroImpl.d.ts.map +1 -0
  210. package/dist-esm/src/lroImpl.js +21 -0
  211. package/dist-esm/src/lroImpl.js.map +1 -0
  212. package/dist-esm/src/models/index.d.ts +3253 -0
  213. package/dist-esm/src/models/index.d.ts.map +1 -0
  214. package/dist-esm/src/models/index.js +298 -0
  215. package/dist-esm/src/models/index.js.map +1 -0
  216. package/dist-esm/src/models/mappers.d.ts +149 -0
  217. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  218. package/dist-esm/src/models/mappers.js +4952 -0
  219. package/dist-esm/src/models/mappers.js.map +1 -0
  220. package/dist-esm/src/models/parameters.d.ts +37 -0
  221. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  222. package/dist-esm/src/models/parameters.js +329 -0
  223. package/dist-esm/src/models/parameters.js.map +1 -0
  224. package/dist-esm/src/operations/dra.d.ts +79 -0
  225. package/dist-esm/src/operations/dra.d.ts.map +1 -0
  226. package/dist-esm/src/operations/dra.js +369 -0
  227. package/dist-esm/src/operations/dra.js.map +1 -0
  228. package/dist-esm/src/operations/draOperationStatus.d.ts +22 -0
  229. package/dist-esm/src/operations/draOperationStatus.d.ts.map +1 -0
  230. package/dist-esm/src/operations/draOperationStatus.js +57 -0
  231. package/dist-esm/src/operations/draOperationStatus.js.map +1 -0
  232. package/dist-esm/src/operations/emailConfiguration.d.ts +54 -0
  233. package/dist-esm/src/operations/emailConfiguration.d.ts.map +1 -0
  234. package/dist-esm/src/operations/emailConfiguration.js +224 -0
  235. package/dist-esm/src/operations/emailConfiguration.js.map +1 -0
  236. package/dist-esm/src/operations/event.d.ts +46 -0
  237. package/dist-esm/src/operations/event.d.ts.map +1 -0
  238. package/dist-esm/src/operations/event.js +191 -0
  239. package/dist-esm/src/operations/event.js.map +1 -0
  240. package/dist-esm/src/operations/fabric.d.ts +103 -0
  241. package/dist-esm/src/operations/fabric.d.ts.map +1 -0
  242. package/dist-esm/src/operations/fabric.js +560 -0
  243. package/dist-esm/src/operations/fabric.js.map +1 -0
  244. package/dist-esm/src/operations/fabricOperationsStatus.d.ts +21 -0
  245. package/dist-esm/src/operations/fabricOperationsStatus.d.ts.map +1 -0
  246. package/dist-esm/src/operations/fabricOperationsStatus.js +55 -0
  247. package/dist-esm/src/operations/fabricOperationsStatus.js.map +1 -0
  248. package/dist-esm/src/operations/index.d.ts +19 -0
  249. package/dist-esm/src/operations/index.d.ts.map +1 -0
  250. package/dist-esm/src/operations/index.js +26 -0
  251. package/dist-esm/src/operations/index.js.map +1 -0
  252. package/dist-esm/src/operations/operations.d.ts +32 -0
  253. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  254. package/dist-esm/src/operations/operations.js +138 -0
  255. package/dist-esm/src/operations/operations.js.map +1 -0
  256. package/dist-esm/src/operations/policy.d.ts +79 -0
  257. package/dist-esm/src/operations/policy.d.ts.map +1 -0
  258. package/dist-esm/src/operations/policy.js +369 -0
  259. package/dist-esm/src/operations/policy.js.map +1 -0
  260. package/dist-esm/src/operations/policyOperationStatus.d.ts +22 -0
  261. package/dist-esm/src/operations/policyOperationStatus.d.ts.map +1 -0
  262. package/dist-esm/src/operations/policyOperationStatus.js +57 -0
  263. package/dist-esm/src/operations/policyOperationStatus.js.map +1 -0
  264. package/dist-esm/src/operations/protectedItem.d.ts +95 -0
  265. package/dist-esm/src/operations/protectedItem.d.ts.map +1 -0
  266. package/dist-esm/src/operations/protectedItem.js +460 -0
  267. package/dist-esm/src/operations/protectedItem.js.map +1 -0
  268. package/dist-esm/src/operations/protectedItemOperationStatus.d.ts +22 -0
  269. package/dist-esm/src/operations/protectedItemOperationStatus.d.ts.map +1 -0
  270. package/dist-esm/src/operations/protectedItemOperationStatus.js +57 -0
  271. package/dist-esm/src/operations/protectedItemOperationStatus.js.map +1 -0
  272. package/dist-esm/src/operations/recoveryPoints.d.ts +50 -0
  273. package/dist-esm/src/operations/recoveryPoints.d.ts.map +1 -0
  274. package/dist-esm/src/operations/recoveryPoints.js +200 -0
  275. package/dist-esm/src/operations/recoveryPoints.js.map +1 -0
  276. package/dist-esm/src/operations/replicationExtension.d.ts +79 -0
  277. package/dist-esm/src/operations/replicationExtension.d.ts.map +1 -0
  278. package/dist-esm/src/operations/replicationExtension.js +369 -0
  279. package/dist-esm/src/operations/replicationExtension.js.map +1 -0
  280. package/dist-esm/src/operations/replicationExtensionOperationStatus.d.ts +22 -0
  281. package/dist-esm/src/operations/replicationExtensionOperationStatus.d.ts.map +1 -0
  282. package/dist-esm/src/operations/replicationExtensionOperationStatus.js +63 -0
  283. package/dist-esm/src/operations/replicationExtensionOperationStatus.js.map +1 -0
  284. package/dist-esm/src/operations/vault.d.ts +103 -0
  285. package/dist-esm/src/operations/vault.d.ts.map +1 -0
  286. package/dist-esm/src/operations/vault.js +560 -0
  287. package/dist-esm/src/operations/vault.js.map +1 -0
  288. package/dist-esm/src/operations/vaultOperationStatus.d.ts +21 -0
  289. package/dist-esm/src/operations/vaultOperationStatus.d.ts.map +1 -0
  290. package/dist-esm/src/operations/vaultOperationStatus.js +55 -0
  291. package/dist-esm/src/operations/vaultOperationStatus.js.map +1 -0
  292. package/dist-esm/src/operations/workflow.d.ts +46 -0
  293. package/dist-esm/src/operations/workflow.d.ts.map +1 -0
  294. package/dist-esm/src/operations/workflow.js +191 -0
  295. package/dist-esm/src/operations/workflow.js.map +1 -0
  296. package/dist-esm/src/operations/workflowOperationStatus.d.ts +22 -0
  297. package/dist-esm/src/operations/workflowOperationStatus.d.ts.map +1 -0
  298. package/dist-esm/src/operations/workflowOperationStatus.js +57 -0
  299. package/dist-esm/src/operations/workflowOperationStatus.js.map +1 -0
  300. package/dist-esm/src/operationsInterfaces/dra.d.ts +54 -0
  301. package/dist-esm/src/operationsInterfaces/dra.d.ts.map +1 -0
  302. package/dist-esm/src/operationsInterfaces/dra.js +9 -0
  303. package/dist-esm/src/operationsInterfaces/dra.js.map +1 -0
  304. package/dist-esm/src/operationsInterfaces/draOperationStatus.d.ts +14 -0
  305. package/dist-esm/src/operationsInterfaces/draOperationStatus.d.ts.map +1 -0
  306. package/dist-esm/src/operationsInterfaces/draOperationStatus.js +9 -0
  307. package/dist-esm/src/operationsInterfaces/draOperationStatus.js.map +1 -0
  308. package/dist-esm/src/operationsInterfaces/emailConfiguration.d.ts +29 -0
  309. package/dist-esm/src/operationsInterfaces/emailConfiguration.d.ts.map +1 -0
  310. package/dist-esm/src/operationsInterfaces/emailConfiguration.js +9 -0
  311. package/dist-esm/src/operationsInterfaces/emailConfiguration.js.map +1 -0
  312. package/dist-esm/src/operationsInterfaces/event.d.ts +21 -0
  313. package/dist-esm/src/operationsInterfaces/event.d.ts.map +1 -0
  314. package/dist-esm/src/operationsInterfaces/event.js +9 -0
  315. package/dist-esm/src/operationsInterfaces/event.js.map +1 -0
  316. package/dist-esm/src/operationsInterfaces/fabric.d.ts +67 -0
  317. package/dist-esm/src/operationsInterfaces/fabric.d.ts.map +1 -0
  318. package/dist-esm/src/operationsInterfaces/fabric.js +9 -0
  319. package/dist-esm/src/operationsInterfaces/fabric.js.map +1 -0
  320. package/dist-esm/src/operationsInterfaces/fabricOperationsStatus.d.ts +13 -0
  321. package/dist-esm/src/operationsInterfaces/fabricOperationsStatus.d.ts.map +1 -0
  322. package/dist-esm/src/operationsInterfaces/fabricOperationsStatus.js +9 -0
  323. package/dist-esm/src/operationsInterfaces/fabricOperationsStatus.js.map +1 -0
  324. package/dist-esm/src/operationsInterfaces/index.d.ts +19 -0
  325. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  326. package/dist-esm/src/operationsInterfaces/index.js +26 -0
  327. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  328. package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
  329. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  330. package/dist-esm/src/operationsInterfaces/operations.js +9 -0
  331. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  332. package/dist-esm/src/operationsInterfaces/policy.d.ts +54 -0
  333. package/dist-esm/src/operationsInterfaces/policy.d.ts.map +1 -0
  334. package/dist-esm/src/operationsInterfaces/policy.js +9 -0
  335. package/dist-esm/src/operationsInterfaces/policy.js.map +1 -0
  336. package/dist-esm/src/operationsInterfaces/policyOperationStatus.d.ts +14 -0
  337. package/dist-esm/src/operationsInterfaces/policyOperationStatus.d.ts.map +1 -0
  338. package/dist-esm/src/operationsInterfaces/policyOperationStatus.js +9 -0
  339. package/dist-esm/src/operationsInterfaces/policyOperationStatus.js.map +1 -0
  340. package/dist-esm/src/operationsInterfaces/protectedItem.d.ts +70 -0
  341. package/dist-esm/src/operationsInterfaces/protectedItem.d.ts.map +1 -0
  342. package/dist-esm/src/operationsInterfaces/protectedItem.js +9 -0
  343. package/dist-esm/src/operationsInterfaces/protectedItem.js.map +1 -0
  344. package/dist-esm/src/operationsInterfaces/protectedItemOperationStatus.d.ts +14 -0
  345. package/dist-esm/src/operationsInterfaces/protectedItemOperationStatus.d.ts.map +1 -0
  346. package/dist-esm/src/operationsInterfaces/protectedItemOperationStatus.js +9 -0
  347. package/dist-esm/src/operationsInterfaces/protectedItemOperationStatus.js.map +1 -0
  348. package/dist-esm/src/operationsInterfaces/recoveryPoints.d.ts +23 -0
  349. package/dist-esm/src/operationsInterfaces/recoveryPoints.d.ts.map +1 -0
  350. package/dist-esm/src/operationsInterfaces/recoveryPoints.js +9 -0
  351. package/dist-esm/src/operationsInterfaces/recoveryPoints.js.map +1 -0
  352. package/dist-esm/src/operationsInterfaces/replicationExtension.d.ts +54 -0
  353. package/dist-esm/src/operationsInterfaces/replicationExtension.d.ts.map +1 -0
  354. package/dist-esm/src/operationsInterfaces/replicationExtension.js +9 -0
  355. package/dist-esm/src/operationsInterfaces/replicationExtension.js.map +1 -0
  356. package/dist-esm/src/operationsInterfaces/replicationExtensionOperationStatus.d.ts +14 -0
  357. package/dist-esm/src/operationsInterfaces/replicationExtensionOperationStatus.d.ts.map +1 -0
  358. package/dist-esm/src/operationsInterfaces/replicationExtensionOperationStatus.js +9 -0
  359. package/dist-esm/src/operationsInterfaces/replicationExtensionOperationStatus.js.map +1 -0
  360. package/dist-esm/src/operationsInterfaces/vault.d.ts +67 -0
  361. package/dist-esm/src/operationsInterfaces/vault.d.ts.map +1 -0
  362. package/dist-esm/src/operationsInterfaces/vault.js +9 -0
  363. package/dist-esm/src/operationsInterfaces/vault.js.map +1 -0
  364. package/dist-esm/src/operationsInterfaces/vaultOperationStatus.d.ts +13 -0
  365. package/dist-esm/src/operationsInterfaces/vaultOperationStatus.d.ts.map +1 -0
  366. package/dist-esm/src/operationsInterfaces/vaultOperationStatus.js +9 -0
  367. package/dist-esm/src/operationsInterfaces/vaultOperationStatus.js.map +1 -0
  368. package/dist-esm/src/operationsInterfaces/workflow.d.ts +21 -0
  369. package/dist-esm/src/operationsInterfaces/workflow.d.ts.map +1 -0
  370. package/dist-esm/src/operationsInterfaces/workflow.js +9 -0
  371. package/dist-esm/src/operationsInterfaces/workflow.js.map +1 -0
  372. package/dist-esm/src/operationsInterfaces/workflowOperationStatus.d.ts +14 -0
  373. package/dist-esm/src/operationsInterfaces/workflowOperationStatus.d.ts.map +1 -0
  374. package/dist-esm/src/operationsInterfaces/workflowOperationStatus.js +9 -0
  375. package/dist-esm/src/operationsInterfaces/workflowOperationStatus.js.map +1 -0
  376. package/dist-esm/src/pagingHelper.d.ts +13 -0
  377. package/dist-esm/src/pagingHelper.d.ts.map +1 -0
  378. package/dist-esm/src/pagingHelper.js +32 -0
  379. package/dist-esm/src/pagingHelper.js.map +1 -0
  380. package/dist-esm/test/recoveryservicesdatareplication_operations_test.spec.d.ts +4 -0
  381. package/dist-esm/test/recoveryservicesdatareplication_operations_test.spec.d.ts.map +1 -0
  382. package/dist-esm/test/recoveryservicesdatareplication_operations_test.spec.js +76 -0
  383. package/dist-esm/test/recoveryservicesdatareplication_operations_test.spec.js.map +1 -0
  384. package/package.json +124 -0
  385. package/review/arm-recoveryservicesdatareplication.api.md +1973 -0
  386. package/rollup.config.js +122 -0
  387. package/src/azureSiteRecoveryManagementServiceAPI.ts +306 -0
  388. package/src/index.ts +13 -0
  389. package/src/lroImpl.ts +42 -0
  390. package/src/models/index.ts +3567 -0
  391. package/src/models/mappers.ts +5306 -0
  392. package/src/models/parameters.ts +382 -0
  393. package/src/operations/dra.ts +500 -0
  394. package/src/operations/draOperationStatus.ts +78 -0
  395. package/src/operations/emailConfiguration.ts +287 -0
  396. package/src/operations/event.ts +242 -0
  397. package/src/operations/fabric.ts +710 -0
  398. package/src/operations/fabricOperationsStatus.ts +75 -0
  399. package/src/operations/index.ts +26 -0
  400. package/src/operations/operations.ts +149 -0
  401. package/src/operations/policy.ts +500 -0
  402. package/src/operations/policyOperationStatus.ts +78 -0
  403. package/src/operations/protectedItem.ts +638 -0
  404. package/src/operations/protectedItemOperationStatus.ts +79 -0
  405. package/src/operations/recoveryPoints.ts +270 -0
  406. package/src/operations/replicationExtension.ts +506 -0
  407. package/src/operations/replicationExtensionOperationStatus.ts +85 -0
  408. package/src/operations/vault.ts +710 -0
  409. package/src/operations/vaultOperationStatus.ts +75 -0
  410. package/src/operations/workflow.ts +242 -0
  411. package/src/operations/workflowOperationStatus.ts +78 -0
  412. package/src/operationsInterfaces/dra.ts +105 -0
  413. package/src/operationsInterfaces/draOperationStatus.ts +31 -0
  414. package/src/operationsInterfaces/emailConfiguration.ts +59 -0
  415. package/src/operationsInterfaces/event.ts +44 -0
  416. package/src/operationsInterfaces/fabric.ts +127 -0
  417. package/src/operationsInterfaces/fabricOperationsStatus.ts +29 -0
  418. package/src/operationsInterfaces/index.ts +26 -0
  419. package/src/operationsInterfaces/operations.ts +22 -0
  420. package/src/operationsInterfaces/policy.ts +105 -0
  421. package/src/operationsInterfaces/policyOperationStatus.ts +31 -0
  422. package/src/operationsInterfaces/protectedItem.ts +144 -0
  423. package/src/operationsInterfaces/protectedItemOperationStatus.ts +31 -0
  424. package/src/operationsInterfaces/recoveryPoints.ts +48 -0
  425. package/src/operationsInterfaces/replicationExtension.ts +111 -0
  426. package/src/operationsInterfaces/replicationExtensionOperationStatus.ts +31 -0
  427. package/src/operationsInterfaces/vault.ts +127 -0
  428. package/src/operationsInterfaces/vaultOperationStatus.ts +29 -0
  429. package/src/operationsInterfaces/workflow.ts +44 -0
  430. package/src/operationsInterfaces/workflowOperationStatus.ts +31 -0
  431. package/src/pagingHelper.ts +39 -0
  432. package/tsconfig.json +33 -0
  433. package/types/arm-recoveryservicesdatareplication.d.ts +4127 -0
  434. package/types/tsdoc-metadata.json +11 -0
@@ -0,0 +1,638 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+
9
+ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
10
+ import { setContinuationToken } from "../pagingHelper";
11
+ import { ProtectedItem } from "../operationsInterfaces";
12
+ import * as coreClient from "@azure/core-client";
13
+ import * as Mappers from "../models/mappers";
14
+ import * as Parameters from "../models/parameters";
15
+ import { AzureSiteRecoveryManagementServiceAPI } from "../azureSiteRecoveryManagementServiceAPI";
16
+ import {
17
+ SimplePollerLike,
18
+ OperationState,
19
+ createHttpPoller
20
+ } from "@azure/core-lro";
21
+ import { createLroSpec } from "../lroImpl";
22
+ import {
23
+ ProtectedItemModel,
24
+ ProtectedItemListNextOptionalParams,
25
+ ProtectedItemListOptionalParams,
26
+ ProtectedItemListResponse,
27
+ ProtectedItemGetOptionalParams,
28
+ ProtectedItemGetResponse,
29
+ ProtectedItemCreateOptionalParams,
30
+ ProtectedItemCreateResponse,
31
+ ProtectedItemDeleteOptionalParams,
32
+ ProtectedItemDeleteResponse,
33
+ ProtectedItemPlannedFailoverOptionalParams,
34
+ ProtectedItemPlannedFailoverResponse,
35
+ ProtectedItemListNextResponse
36
+ } from "../models";
37
+
38
+ /// <reference lib="esnext.asynciterable" />
39
+ /** Class containing ProtectedItem operations. */
40
+ export class ProtectedItemImpl implements ProtectedItem {
41
+ private readonly client: AzureSiteRecoveryManagementServiceAPI;
42
+
43
+ /**
44
+ * Initialize a new instance of the class ProtectedItem class.
45
+ * @param client Reference to the service client
46
+ */
47
+ constructor(client: AzureSiteRecoveryManagementServiceAPI) {
48
+ this.client = client;
49
+ }
50
+
51
+ /**
52
+ * Gets the list of protected items in the given vault.
53
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
54
+ * @param vaultName The vault name.
55
+ * @param options The options parameters.
56
+ */
57
+ public list(
58
+ resourceGroupName: string,
59
+ vaultName: string,
60
+ options?: ProtectedItemListOptionalParams
61
+ ): PagedAsyncIterableIterator<ProtectedItemModel> {
62
+ const iter = this.listPagingAll(resourceGroupName, vaultName, options);
63
+ return {
64
+ next() {
65
+ return iter.next();
66
+ },
67
+ [Symbol.asyncIterator]() {
68
+ return this;
69
+ },
70
+ byPage: (settings?: PageSettings) => {
71
+ if (settings?.maxPageSize) {
72
+ throw new Error("maxPageSize is not supported by this operation.");
73
+ }
74
+ return this.listPagingPage(
75
+ resourceGroupName,
76
+ vaultName,
77
+ options,
78
+ settings
79
+ );
80
+ }
81
+ };
82
+ }
83
+
84
+ private async *listPagingPage(
85
+ resourceGroupName: string,
86
+ vaultName: string,
87
+ options?: ProtectedItemListOptionalParams,
88
+ settings?: PageSettings
89
+ ): AsyncIterableIterator<ProtectedItemModel[]> {
90
+ let result: ProtectedItemListResponse;
91
+ let continuationToken = settings?.continuationToken;
92
+ if (!continuationToken) {
93
+ result = await this._list(resourceGroupName, vaultName, options);
94
+ let page = result.value || [];
95
+ continuationToken = result.nextLink;
96
+ setContinuationToken(page, continuationToken);
97
+ yield page;
98
+ }
99
+ while (continuationToken) {
100
+ result = await this._listNext(
101
+ resourceGroupName,
102
+ vaultName,
103
+ continuationToken,
104
+ options
105
+ );
106
+ continuationToken = result.nextLink;
107
+ let page = result.value || [];
108
+ setContinuationToken(page, continuationToken);
109
+ yield page;
110
+ }
111
+ }
112
+
113
+ private async *listPagingAll(
114
+ resourceGroupName: string,
115
+ vaultName: string,
116
+ options?: ProtectedItemListOptionalParams
117
+ ): AsyncIterableIterator<ProtectedItemModel> {
118
+ for await (const page of this.listPagingPage(
119
+ resourceGroupName,
120
+ vaultName,
121
+ options
122
+ )) {
123
+ yield* page;
124
+ }
125
+ }
126
+
127
+ /**
128
+ * Gets the details of the protected item.
129
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
130
+ * @param vaultName The vault name.
131
+ * @param protectedItemName The protected item name.
132
+ * @param options The options parameters.
133
+ */
134
+ get(
135
+ resourceGroupName: string,
136
+ vaultName: string,
137
+ protectedItemName: string,
138
+ options?: ProtectedItemGetOptionalParams
139
+ ): Promise<ProtectedItemGetResponse> {
140
+ return this.client.sendOperationRequest(
141
+ { resourceGroupName, vaultName, protectedItemName, options },
142
+ getOperationSpec
143
+ );
144
+ }
145
+
146
+ /**
147
+ * Creates the protected item.
148
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
149
+ * @param vaultName The vault name.
150
+ * @param protectedItemName The protected item name.
151
+ * @param options The options parameters.
152
+ */
153
+ async beginCreate(
154
+ resourceGroupName: string,
155
+ vaultName: string,
156
+ protectedItemName: string,
157
+ options?: ProtectedItemCreateOptionalParams
158
+ ): Promise<
159
+ SimplePollerLike<
160
+ OperationState<ProtectedItemCreateResponse>,
161
+ ProtectedItemCreateResponse
162
+ >
163
+ > {
164
+ const directSendOperation = async (
165
+ args: coreClient.OperationArguments,
166
+ spec: coreClient.OperationSpec
167
+ ): Promise<ProtectedItemCreateResponse> => {
168
+ return this.client.sendOperationRequest(args, spec);
169
+ };
170
+ const sendOperationFn = async (
171
+ args: coreClient.OperationArguments,
172
+ spec: coreClient.OperationSpec
173
+ ) => {
174
+ let currentRawResponse:
175
+ | coreClient.FullOperationResponse
176
+ | undefined = undefined;
177
+ const providedCallback = args.options?.onResponse;
178
+ const callback: coreClient.RawResponseCallback = (
179
+ rawResponse: coreClient.FullOperationResponse,
180
+ flatResponse: unknown
181
+ ) => {
182
+ currentRawResponse = rawResponse;
183
+ providedCallback?.(rawResponse, flatResponse);
184
+ };
185
+ const updatedArgs = {
186
+ ...args,
187
+ options: {
188
+ ...args.options,
189
+ onResponse: callback
190
+ }
191
+ };
192
+ const flatResponse = await directSendOperation(updatedArgs, spec);
193
+ return {
194
+ flatResponse,
195
+ rawResponse: {
196
+ statusCode: currentRawResponse!.status,
197
+ body: currentRawResponse!.parsedBody,
198
+ headers: currentRawResponse!.headers.toJSON()
199
+ }
200
+ };
201
+ };
202
+
203
+ const lro = createLroSpec({
204
+ sendOperationFn,
205
+ args: { resourceGroupName, vaultName, protectedItemName, options },
206
+ spec: createOperationSpec
207
+ });
208
+ const poller = await createHttpPoller<
209
+ ProtectedItemCreateResponse,
210
+ OperationState<ProtectedItemCreateResponse>
211
+ >(lro, {
212
+ restoreFrom: options?.resumeFrom,
213
+ intervalInMs: options?.updateIntervalInMs,
214
+ resourceLocationConfig: "location"
215
+ });
216
+ await poller.poll();
217
+ return poller;
218
+ }
219
+
220
+ /**
221
+ * Creates the protected item.
222
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
223
+ * @param vaultName The vault name.
224
+ * @param protectedItemName The protected item name.
225
+ * @param options The options parameters.
226
+ */
227
+ async beginCreateAndWait(
228
+ resourceGroupName: string,
229
+ vaultName: string,
230
+ protectedItemName: string,
231
+ options?: ProtectedItemCreateOptionalParams
232
+ ): Promise<ProtectedItemCreateResponse> {
233
+ const poller = await this.beginCreate(
234
+ resourceGroupName,
235
+ vaultName,
236
+ protectedItemName,
237
+ options
238
+ );
239
+ return poller.pollUntilDone();
240
+ }
241
+
242
+ /**
243
+ * Removes the protected item.
244
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
245
+ * @param vaultName The vault name.
246
+ * @param protectedItemName The protected item name.
247
+ * @param options The options parameters.
248
+ */
249
+ async beginDelete(
250
+ resourceGroupName: string,
251
+ vaultName: string,
252
+ protectedItemName: string,
253
+ options?: ProtectedItemDeleteOptionalParams
254
+ ): Promise<
255
+ SimplePollerLike<
256
+ OperationState<ProtectedItemDeleteResponse>,
257
+ ProtectedItemDeleteResponse
258
+ >
259
+ > {
260
+ const directSendOperation = async (
261
+ args: coreClient.OperationArguments,
262
+ spec: coreClient.OperationSpec
263
+ ): Promise<ProtectedItemDeleteResponse> => {
264
+ return this.client.sendOperationRequest(args, spec);
265
+ };
266
+ const sendOperationFn = async (
267
+ args: coreClient.OperationArguments,
268
+ spec: coreClient.OperationSpec
269
+ ) => {
270
+ let currentRawResponse:
271
+ | coreClient.FullOperationResponse
272
+ | undefined = undefined;
273
+ const providedCallback = args.options?.onResponse;
274
+ const callback: coreClient.RawResponseCallback = (
275
+ rawResponse: coreClient.FullOperationResponse,
276
+ flatResponse: unknown
277
+ ) => {
278
+ currentRawResponse = rawResponse;
279
+ providedCallback?.(rawResponse, flatResponse);
280
+ };
281
+ const updatedArgs = {
282
+ ...args,
283
+ options: {
284
+ ...args.options,
285
+ onResponse: callback
286
+ }
287
+ };
288
+ const flatResponse = await directSendOperation(updatedArgs, spec);
289
+ return {
290
+ flatResponse,
291
+ rawResponse: {
292
+ statusCode: currentRawResponse!.status,
293
+ body: currentRawResponse!.parsedBody,
294
+ headers: currentRawResponse!.headers.toJSON()
295
+ }
296
+ };
297
+ };
298
+
299
+ const lro = createLroSpec({
300
+ sendOperationFn,
301
+ args: { resourceGroupName, vaultName, protectedItemName, options },
302
+ spec: deleteOperationSpec
303
+ });
304
+ const poller = await createHttpPoller<
305
+ ProtectedItemDeleteResponse,
306
+ OperationState<ProtectedItemDeleteResponse>
307
+ >(lro, {
308
+ restoreFrom: options?.resumeFrom,
309
+ intervalInMs: options?.updateIntervalInMs,
310
+ resourceLocationConfig: "location"
311
+ });
312
+ await poller.poll();
313
+ return poller;
314
+ }
315
+
316
+ /**
317
+ * Removes the protected item.
318
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
319
+ * @param vaultName The vault name.
320
+ * @param protectedItemName The protected item name.
321
+ * @param options The options parameters.
322
+ */
323
+ async beginDeleteAndWait(
324
+ resourceGroupName: string,
325
+ vaultName: string,
326
+ protectedItemName: string,
327
+ options?: ProtectedItemDeleteOptionalParams
328
+ ): Promise<ProtectedItemDeleteResponse> {
329
+ const poller = await this.beginDelete(
330
+ resourceGroupName,
331
+ vaultName,
332
+ protectedItemName,
333
+ options
334
+ );
335
+ return poller.pollUntilDone();
336
+ }
337
+
338
+ /**
339
+ * Gets the list of protected items in the given vault.
340
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
341
+ * @param vaultName The vault name.
342
+ * @param options The options parameters.
343
+ */
344
+ private _list(
345
+ resourceGroupName: string,
346
+ vaultName: string,
347
+ options?: ProtectedItemListOptionalParams
348
+ ): Promise<ProtectedItemListResponse> {
349
+ return this.client.sendOperationRequest(
350
+ { resourceGroupName, vaultName, options },
351
+ listOperationSpec
352
+ );
353
+ }
354
+
355
+ /**
356
+ * Performs the planned failover on the protected item.
357
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
358
+ * @param vaultName The vault name.
359
+ * @param protectedItemName The protected item name.
360
+ * @param options The options parameters.
361
+ */
362
+ async beginPlannedFailover(
363
+ resourceGroupName: string,
364
+ vaultName: string,
365
+ protectedItemName: string,
366
+ options?: ProtectedItemPlannedFailoverOptionalParams
367
+ ): Promise<
368
+ SimplePollerLike<
369
+ OperationState<ProtectedItemPlannedFailoverResponse>,
370
+ ProtectedItemPlannedFailoverResponse
371
+ >
372
+ > {
373
+ const directSendOperation = async (
374
+ args: coreClient.OperationArguments,
375
+ spec: coreClient.OperationSpec
376
+ ): Promise<ProtectedItemPlannedFailoverResponse> => {
377
+ return this.client.sendOperationRequest(args, spec);
378
+ };
379
+ const sendOperationFn = async (
380
+ args: coreClient.OperationArguments,
381
+ spec: coreClient.OperationSpec
382
+ ) => {
383
+ let currentRawResponse:
384
+ | coreClient.FullOperationResponse
385
+ | undefined = undefined;
386
+ const providedCallback = args.options?.onResponse;
387
+ const callback: coreClient.RawResponseCallback = (
388
+ rawResponse: coreClient.FullOperationResponse,
389
+ flatResponse: unknown
390
+ ) => {
391
+ currentRawResponse = rawResponse;
392
+ providedCallback?.(rawResponse, flatResponse);
393
+ };
394
+ const updatedArgs = {
395
+ ...args,
396
+ options: {
397
+ ...args.options,
398
+ onResponse: callback
399
+ }
400
+ };
401
+ const flatResponse = await directSendOperation(updatedArgs, spec);
402
+ return {
403
+ flatResponse,
404
+ rawResponse: {
405
+ statusCode: currentRawResponse!.status,
406
+ body: currentRawResponse!.parsedBody,
407
+ headers: currentRawResponse!.headers.toJSON()
408
+ }
409
+ };
410
+ };
411
+
412
+ const lro = createLroSpec({
413
+ sendOperationFn,
414
+ args: { resourceGroupName, vaultName, protectedItemName, options },
415
+ spec: plannedFailoverOperationSpec
416
+ });
417
+ const poller = await createHttpPoller<
418
+ ProtectedItemPlannedFailoverResponse,
419
+ OperationState<ProtectedItemPlannedFailoverResponse>
420
+ >(lro, {
421
+ restoreFrom: options?.resumeFrom,
422
+ intervalInMs: options?.updateIntervalInMs,
423
+ resourceLocationConfig: "location"
424
+ });
425
+ await poller.poll();
426
+ return poller;
427
+ }
428
+
429
+ /**
430
+ * Performs the planned failover on the protected item.
431
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
432
+ * @param vaultName The vault name.
433
+ * @param protectedItemName The protected item name.
434
+ * @param options The options parameters.
435
+ */
436
+ async beginPlannedFailoverAndWait(
437
+ resourceGroupName: string,
438
+ vaultName: string,
439
+ protectedItemName: string,
440
+ options?: ProtectedItemPlannedFailoverOptionalParams
441
+ ): Promise<ProtectedItemPlannedFailoverResponse> {
442
+ const poller = await this.beginPlannedFailover(
443
+ resourceGroupName,
444
+ vaultName,
445
+ protectedItemName,
446
+ options
447
+ );
448
+ return poller.pollUntilDone();
449
+ }
450
+
451
+ /**
452
+ * ListNext
453
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
454
+ * @param vaultName The vault name.
455
+ * @param nextLink The nextLink from the previous successful call to the List method.
456
+ * @param options The options parameters.
457
+ */
458
+ private _listNext(
459
+ resourceGroupName: string,
460
+ vaultName: string,
461
+ nextLink: string,
462
+ options?: ProtectedItemListNextOptionalParams
463
+ ): Promise<ProtectedItemListNextResponse> {
464
+ return this.client.sendOperationRequest(
465
+ { resourceGroupName, vaultName, nextLink, options },
466
+ listNextOperationSpec
467
+ );
468
+ }
469
+ }
470
+ // Operation Specifications
471
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
472
+
473
+ const getOperationSpec: coreClient.OperationSpec = {
474
+ path:
475
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName}",
476
+ httpMethod: "GET",
477
+ responses: {
478
+ 200: {
479
+ bodyMapper: Mappers.ProtectedItemModel
480
+ },
481
+ default: {
482
+ bodyMapper: Mappers.ErrorResponse
483
+ }
484
+ },
485
+ queryParameters: [Parameters.apiVersion],
486
+ urlParameters: [
487
+ Parameters.$host,
488
+ Parameters.subscriptionId,
489
+ Parameters.resourceGroupName,
490
+ Parameters.vaultName,
491
+ Parameters.protectedItemName
492
+ ],
493
+ headerParameters: [Parameters.accept],
494
+ serializer
495
+ };
496
+ const createOperationSpec: coreClient.OperationSpec = {
497
+ path:
498
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName}",
499
+ httpMethod: "PUT",
500
+ responses: {
501
+ 200: {
502
+ bodyMapper: Mappers.ProtectedItemModel
503
+ },
504
+ 201: {
505
+ bodyMapper: Mappers.ProtectedItemModel
506
+ },
507
+ 202: {
508
+ bodyMapper: Mappers.ProtectedItemModel
509
+ },
510
+ 204: {
511
+ bodyMapper: Mappers.ProtectedItemModel
512
+ },
513
+ default: {
514
+ bodyMapper: Mappers.ErrorResponse
515
+ }
516
+ },
517
+ requestBody: Parameters.body5,
518
+ queryParameters: [Parameters.apiVersion],
519
+ urlParameters: [
520
+ Parameters.$host,
521
+ Parameters.subscriptionId,
522
+ Parameters.resourceGroupName,
523
+ Parameters.vaultName,
524
+ Parameters.protectedItemName
525
+ ],
526
+ headerParameters: [Parameters.accept, Parameters.contentType],
527
+ mediaType: "json",
528
+ serializer
529
+ };
530
+ const deleteOperationSpec: coreClient.OperationSpec = {
531
+ path:
532
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName}",
533
+ httpMethod: "DELETE",
534
+ responses: {
535
+ 200: {
536
+ headersMapper: Mappers.ProtectedItemDeleteHeaders
537
+ },
538
+ 201: {
539
+ headersMapper: Mappers.ProtectedItemDeleteHeaders
540
+ },
541
+ 202: {
542
+ headersMapper: Mappers.ProtectedItemDeleteHeaders
543
+ },
544
+ 204: {
545
+ headersMapper: Mappers.ProtectedItemDeleteHeaders
546
+ },
547
+ default: {
548
+ bodyMapper: Mappers.ErrorResponse
549
+ }
550
+ },
551
+ queryParameters: [Parameters.apiVersion, Parameters.forceDelete],
552
+ urlParameters: [
553
+ Parameters.$host,
554
+ Parameters.subscriptionId,
555
+ Parameters.resourceGroupName,
556
+ Parameters.vaultName,
557
+ Parameters.protectedItemName
558
+ ],
559
+ headerParameters: [Parameters.accept],
560
+ serializer
561
+ };
562
+ const listOperationSpec: coreClient.OperationSpec = {
563
+ path:
564
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems",
565
+ httpMethod: "GET",
566
+ responses: {
567
+ 200: {
568
+ bodyMapper: Mappers.ProtectedItemModelCollection
569
+ },
570
+ default: {
571
+ bodyMapper: Mappers.ErrorResponse
572
+ }
573
+ },
574
+ queryParameters: [Parameters.apiVersion],
575
+ urlParameters: [
576
+ Parameters.$host,
577
+ Parameters.subscriptionId,
578
+ Parameters.resourceGroupName,
579
+ Parameters.vaultName
580
+ ],
581
+ headerParameters: [Parameters.accept],
582
+ serializer
583
+ };
584
+ const plannedFailoverOperationSpec: coreClient.OperationSpec = {
585
+ path:
586
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName}/plannedFailover",
587
+ httpMethod: "POST",
588
+ responses: {
589
+ 200: {
590
+ bodyMapper: Mappers.PlannedFailoverModel
591
+ },
592
+ 201: {
593
+ bodyMapper: Mappers.PlannedFailoverModel
594
+ },
595
+ 202: {
596
+ bodyMapper: Mappers.PlannedFailoverModel
597
+ },
598
+ 204: {
599
+ bodyMapper: Mappers.PlannedFailoverModel
600
+ },
601
+ default: {
602
+ bodyMapper: Mappers.ErrorResponse
603
+ }
604
+ },
605
+ requestBody: Parameters.body6,
606
+ queryParameters: [Parameters.apiVersion],
607
+ urlParameters: [
608
+ Parameters.$host,
609
+ Parameters.subscriptionId,
610
+ Parameters.resourceGroupName,
611
+ Parameters.vaultName,
612
+ Parameters.protectedItemName
613
+ ],
614
+ headerParameters: [Parameters.accept, Parameters.contentType],
615
+ mediaType: "json",
616
+ serializer
617
+ };
618
+ const listNextOperationSpec: coreClient.OperationSpec = {
619
+ path: "{nextLink}",
620
+ httpMethod: "GET",
621
+ responses: {
622
+ 200: {
623
+ bodyMapper: Mappers.ProtectedItemModelCollection
624
+ },
625
+ default: {
626
+ bodyMapper: Mappers.ErrorResponse
627
+ }
628
+ },
629
+ urlParameters: [
630
+ Parameters.$host,
631
+ Parameters.subscriptionId,
632
+ Parameters.resourceGroupName,
633
+ Parameters.nextLink,
634
+ Parameters.vaultName
635
+ ],
636
+ headerParameters: [Parameters.accept],
637
+ serializer
638
+ };
@@ -0,0 +1,79 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+
9
+ import { ProtectedItemOperationStatus } from "../operationsInterfaces";
10
+ import * as coreClient from "@azure/core-client";
11
+ import * as Mappers from "../models/mappers";
12
+ import * as Parameters from "../models/parameters";
13
+ import { AzureSiteRecoveryManagementServiceAPI } from "../azureSiteRecoveryManagementServiceAPI";
14
+ import {
15
+ ProtectedItemOperationStatusGetOptionalParams,
16
+ ProtectedItemOperationStatusGetResponse
17
+ } from "../models";
18
+
19
+ /** Class containing ProtectedItemOperationStatus operations. */
20
+ export class ProtectedItemOperationStatusImpl
21
+ implements ProtectedItemOperationStatus {
22
+ private readonly client: AzureSiteRecoveryManagementServiceAPI;
23
+
24
+ /**
25
+ * Initialize a new instance of the class ProtectedItemOperationStatus class.
26
+ * @param client Reference to the service client
27
+ */
28
+ constructor(client: AzureSiteRecoveryManagementServiceAPI) {
29
+ this.client = client;
30
+ }
31
+
32
+ /**
33
+ * Tracks the results of an asynchronous operation on the protected item.
34
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
35
+ * @param vaultName The vault name.
36
+ * @param protectedItemName The protected item name.
37
+ * @param operationId The ID of an ongoing async operation.
38
+ * @param options The options parameters.
39
+ */
40
+ get(
41
+ resourceGroupName: string,
42
+ vaultName: string,
43
+ protectedItemName: string,
44
+ operationId: string,
45
+ options?: ProtectedItemOperationStatusGetOptionalParams
46
+ ): Promise<ProtectedItemOperationStatusGetResponse> {
47
+ return this.client.sendOperationRequest(
48
+ { resourceGroupName, vaultName, protectedItemName, operationId, options },
49
+ getOperationSpec
50
+ );
51
+ }
52
+ }
53
+ // Operation Specifications
54
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
55
+
56
+ const getOperationSpec: coreClient.OperationSpec = {
57
+ path:
58
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName}/operations/{operationId}",
59
+ httpMethod: "GET",
60
+ responses: {
61
+ 200: {
62
+ bodyMapper: Mappers.OperationStatus
63
+ },
64
+ default: {
65
+ bodyMapper: Mappers.ErrorResponse
66
+ }
67
+ },
68
+ queryParameters: [Parameters.apiVersion],
69
+ urlParameters: [
70
+ Parameters.$host,
71
+ Parameters.subscriptionId,
72
+ Parameters.resourceGroupName,
73
+ Parameters.operationId,
74
+ Parameters.vaultName,
75
+ Parameters.protectedItemName
76
+ ],
77
+ headerParameters: [Parameters.accept],
78
+ serializer
79
+ };