@azure/arm-recoveryservices-siterecovery 5.3.0-alpha.20250619.1 → 5.3.0-alpha.20250718.2

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 (283) hide show
  1. package/dist/browser/lroImpl.js +7 -3
  2. package/dist/browser/lroImpl.js.map +1 -1
  3. package/dist/browser/models/mappers.js +2903 -1357
  4. package/dist/browser/models/mappers.js.map +1 -1
  5. package/dist/browser/operations/clusterRecoveryPointOperations.js +1 -0
  6. package/dist/browser/operations/clusterRecoveryPointOperations.js.map +1 -1
  7. package/dist/browser/operations/clusterRecoveryPoints.js +23 -40
  8. package/dist/browser/operations/clusterRecoveryPoints.js.map +1 -1
  9. package/dist/browser/operations/migrationRecoveryPoints.js +23 -40
  10. package/dist/browser/operations/migrationRecoveryPoints.js.map +1 -1
  11. package/dist/browser/operations/operations.js +23 -40
  12. package/dist/browser/operations/operations.js.map +1 -1
  13. package/dist/browser/operations/recoveryPoints.js +23 -40
  14. package/dist/browser/operations/recoveryPoints.js.map +1 -1
  15. package/dist/browser/operations/replicationAlertSettings.js +23 -40
  16. package/dist/browser/operations/replicationAlertSettings.js.map +1 -1
  17. package/dist/browser/operations/replicationAppliances.js +23 -40
  18. package/dist/browser/operations/replicationAppliances.js.map +1 -1
  19. package/dist/browser/operations/replicationEligibilityResultsOperations.js +1 -0
  20. package/dist/browser/operations/replicationEligibilityResultsOperations.js.map +1 -1
  21. package/dist/browser/operations/replicationEvents.js +23 -40
  22. package/dist/browser/operations/replicationEvents.js.map +1 -1
  23. package/dist/browser/operations/replicationFabrics.js +111 -88
  24. package/dist/browser/operations/replicationFabrics.js.map +1 -1
  25. package/dist/browser/operations/replicationJobs.js +67 -64
  26. package/dist/browser/operations/replicationJobs.js.map +1 -1
  27. package/dist/browser/operations/replicationLogicalNetworks.js +23 -40
  28. package/dist/browser/operations/replicationLogicalNetworks.js.map +1 -1
  29. package/dist/browser/operations/replicationMigrationItems.js +144 -133
  30. package/dist/browser/operations/replicationMigrationItems.js.map +1 -1
  31. package/dist/browser/operations/replicationNetworkMappings.js +78 -97
  32. package/dist/browser/operations/replicationNetworkMappings.js.map +1 -1
  33. package/dist/browser/operations/replicationNetworks.js +45 -79
  34. package/dist/browser/operations/replicationNetworks.js.map +1 -1
  35. package/dist/browser/operations/replicationPolicies.js +56 -58
  36. package/dist/browser/operations/replicationPolicies.js.map +1 -1
  37. package/dist/browser/operations/replicationProtectableItems.js +23 -40
  38. package/dist/browser/operations/replicationProtectableItems.js.map +1 -1
  39. package/dist/browser/operations/replicationProtectedItems.js +254 -193
  40. package/dist/browser/operations/replicationProtectedItems.js.map +1 -1
  41. package/dist/browser/operations/replicationProtectionClusters.js +133 -127
  42. package/dist/browser/operations/replicationProtectionClusters.js.map +1 -1
  43. package/dist/browser/operations/replicationProtectionContainerMappings.js +89 -103
  44. package/dist/browser/operations/replicationProtectionContainerMappings.js.map +1 -1
  45. package/dist/browser/operations/replicationProtectionContainers.js +100 -109
  46. package/dist/browser/operations/replicationProtectionContainers.js.map +1 -1
  47. package/dist/browser/operations/replicationProtectionIntents.js +23 -40
  48. package/dist/browser/operations/replicationProtectionIntents.js.map +1 -1
  49. package/dist/browser/operations/replicationRecoveryPlans.js +133 -100
  50. package/dist/browser/operations/replicationRecoveryPlans.js.map +1 -1
  51. package/dist/browser/operations/replicationRecoveryServicesProviders.js +89 -103
  52. package/dist/browser/operations/replicationRecoveryServicesProviders.js.map +1 -1
  53. package/dist/browser/operations/replicationStorageClassificationMappings.js +67 -91
  54. package/dist/browser/operations/replicationStorageClassificationMappings.js.map +1 -1
  55. package/dist/browser/operations/replicationStorageClassifications.js +45 -79
  56. package/dist/browser/operations/replicationStorageClassifications.js.map +1 -1
  57. package/dist/browser/operations/replicationVaultHealth.js +12 -6
  58. package/dist/browser/operations/replicationVaultHealth.js.map +1 -1
  59. package/dist/browser/operations/replicationVaultSetting.js +34 -46
  60. package/dist/browser/operations/replicationVaultSetting.js.map +1 -1
  61. package/dist/browser/operations/replicationvCenters.js +78 -97
  62. package/dist/browser/operations/replicationvCenters.js.map +1 -1
  63. package/dist/browser/operations/supportedOperatingSystemsOperations.js +1 -0
  64. package/dist/browser/operations/supportedOperatingSystemsOperations.js.map +1 -1
  65. package/dist/browser/operations/targetComputeSizes.js +23 -40
  66. package/dist/browser/operations/targetComputeSizes.js.map +1 -1
  67. package/dist/browser/pagingHelper.js +2 -4
  68. package/dist/browser/pagingHelper.js.map +1 -1
  69. package/dist/browser/siteRecoveryManagementClient.js +44 -5
  70. package/dist/browser/siteRecoveryManagementClient.js.map +1 -1
  71. package/dist/commonjs/lroImpl.js +7 -3
  72. package/dist/commonjs/lroImpl.js.map +1 -1
  73. package/dist/commonjs/models/mappers.js +2903 -1357
  74. package/dist/commonjs/models/mappers.js.map +1 -1
  75. package/dist/commonjs/operations/clusterRecoveryPointOperations.js +1 -0
  76. package/dist/commonjs/operations/clusterRecoveryPointOperations.js.map +1 -1
  77. package/dist/commonjs/operations/clusterRecoveryPoints.js +23 -39
  78. package/dist/commonjs/operations/clusterRecoveryPoints.js.map +1 -1
  79. package/dist/commonjs/operations/migrationRecoveryPoints.js +23 -39
  80. package/dist/commonjs/operations/migrationRecoveryPoints.js.map +1 -1
  81. package/dist/commonjs/operations/operations.js +23 -39
  82. package/dist/commonjs/operations/operations.js.map +1 -1
  83. package/dist/commonjs/operations/recoveryPoints.js +23 -39
  84. package/dist/commonjs/operations/recoveryPoints.js.map +1 -1
  85. package/dist/commonjs/operations/replicationAlertSettings.js +23 -39
  86. package/dist/commonjs/operations/replicationAlertSettings.js.map +1 -1
  87. package/dist/commonjs/operations/replicationAppliances.js +23 -39
  88. package/dist/commonjs/operations/replicationAppliances.js.map +1 -1
  89. package/dist/commonjs/operations/replicationEligibilityResultsOperations.js +1 -0
  90. package/dist/commonjs/operations/replicationEligibilityResultsOperations.js.map +1 -1
  91. package/dist/commonjs/operations/replicationEvents.js +23 -39
  92. package/dist/commonjs/operations/replicationEvents.js.map +1 -1
  93. package/dist/commonjs/operations/replicationFabrics.js +111 -87
  94. package/dist/commonjs/operations/replicationFabrics.js.map +1 -1
  95. package/dist/commonjs/operations/replicationJobs.js +67 -63
  96. package/dist/commonjs/operations/replicationJobs.js.map +1 -1
  97. package/dist/commonjs/operations/replicationLogicalNetworks.js +23 -39
  98. package/dist/commonjs/operations/replicationLogicalNetworks.js.map +1 -1
  99. package/dist/commonjs/operations/replicationMigrationItems.js +144 -132
  100. package/dist/commonjs/operations/replicationMigrationItems.js.map +1 -1
  101. package/dist/commonjs/operations/replicationNetworkMappings.js +78 -96
  102. package/dist/commonjs/operations/replicationNetworkMappings.js.map +1 -1
  103. package/dist/commonjs/operations/replicationNetworks.js +45 -78
  104. package/dist/commonjs/operations/replicationNetworks.js.map +1 -1
  105. package/dist/commonjs/operations/replicationPolicies.js +56 -57
  106. package/dist/commonjs/operations/replicationPolicies.js.map +1 -1
  107. package/dist/commonjs/operations/replicationProtectableItems.js +23 -39
  108. package/dist/commonjs/operations/replicationProtectableItems.js.map +1 -1
  109. package/dist/commonjs/operations/replicationProtectedItems.js +254 -192
  110. package/dist/commonjs/operations/replicationProtectedItems.js.map +1 -1
  111. package/dist/commonjs/operations/replicationProtectionClusters.js +133 -126
  112. package/dist/commonjs/operations/replicationProtectionClusters.js.map +1 -1
  113. package/dist/commonjs/operations/replicationProtectionContainerMappings.js +89 -102
  114. package/dist/commonjs/operations/replicationProtectionContainerMappings.js.map +1 -1
  115. package/dist/commonjs/operations/replicationProtectionContainers.js +100 -108
  116. package/dist/commonjs/operations/replicationProtectionContainers.js.map +1 -1
  117. package/dist/commonjs/operations/replicationProtectionIntents.js +23 -39
  118. package/dist/commonjs/operations/replicationProtectionIntents.js.map +1 -1
  119. package/dist/commonjs/operations/replicationRecoveryPlans.js +133 -99
  120. package/dist/commonjs/operations/replicationRecoveryPlans.js.map +1 -1
  121. package/dist/commonjs/operations/replicationRecoveryServicesProviders.js +89 -102
  122. package/dist/commonjs/operations/replicationRecoveryServicesProviders.js.map +1 -1
  123. package/dist/commonjs/operations/replicationStorageClassificationMappings.js +67 -90
  124. package/dist/commonjs/operations/replicationStorageClassificationMappings.js.map +1 -1
  125. package/dist/commonjs/operations/replicationStorageClassifications.js +45 -78
  126. package/dist/commonjs/operations/replicationStorageClassifications.js.map +1 -1
  127. package/dist/commonjs/operations/replicationVaultHealth.js +12 -6
  128. package/dist/commonjs/operations/replicationVaultHealth.js.map +1 -1
  129. package/dist/commonjs/operations/replicationVaultSetting.js +34 -45
  130. package/dist/commonjs/operations/replicationVaultSetting.js.map +1 -1
  131. package/dist/commonjs/operations/replicationvCenters.js +78 -96
  132. package/dist/commonjs/operations/replicationvCenters.js.map +1 -1
  133. package/dist/commonjs/operations/supportedOperatingSystemsOperations.js +1 -0
  134. package/dist/commonjs/operations/supportedOperatingSystemsOperations.js.map +1 -1
  135. package/dist/commonjs/operations/targetComputeSizes.js +23 -39
  136. package/dist/commonjs/operations/targetComputeSizes.js.map +1 -1
  137. package/dist/commonjs/pagingHelper.js +2 -4
  138. package/dist/commonjs/pagingHelper.js.map +1 -1
  139. package/dist/commonjs/siteRecoveryManagementClient.js +44 -5
  140. package/dist/commonjs/siteRecoveryManagementClient.js.map +1 -1
  141. package/dist/commonjs/tsdoc-metadata.json +11 -11
  142. package/dist/esm/lroImpl.js +7 -3
  143. package/dist/esm/lroImpl.js.map +1 -1
  144. package/dist/esm/models/mappers.js +2903 -1357
  145. package/dist/esm/models/mappers.js.map +1 -1
  146. package/dist/esm/operations/clusterRecoveryPointOperations.js +1 -0
  147. package/dist/esm/operations/clusterRecoveryPointOperations.js.map +1 -1
  148. package/dist/esm/operations/clusterRecoveryPoints.js +23 -40
  149. package/dist/esm/operations/clusterRecoveryPoints.js.map +1 -1
  150. package/dist/esm/operations/migrationRecoveryPoints.js +23 -40
  151. package/dist/esm/operations/migrationRecoveryPoints.js.map +1 -1
  152. package/dist/esm/operations/operations.js +23 -40
  153. package/dist/esm/operations/operations.js.map +1 -1
  154. package/dist/esm/operations/recoveryPoints.js +23 -40
  155. package/dist/esm/operations/recoveryPoints.js.map +1 -1
  156. package/dist/esm/operations/replicationAlertSettings.js +23 -40
  157. package/dist/esm/operations/replicationAlertSettings.js.map +1 -1
  158. package/dist/esm/operations/replicationAppliances.js +23 -40
  159. package/dist/esm/operations/replicationAppliances.js.map +1 -1
  160. package/dist/esm/operations/replicationEligibilityResultsOperations.js +1 -0
  161. package/dist/esm/operations/replicationEligibilityResultsOperations.js.map +1 -1
  162. package/dist/esm/operations/replicationEvents.js +23 -40
  163. package/dist/esm/operations/replicationEvents.js.map +1 -1
  164. package/dist/esm/operations/replicationFabrics.js +111 -88
  165. package/dist/esm/operations/replicationFabrics.js.map +1 -1
  166. package/dist/esm/operations/replicationJobs.js +67 -64
  167. package/dist/esm/operations/replicationJobs.js.map +1 -1
  168. package/dist/esm/operations/replicationLogicalNetworks.js +23 -40
  169. package/dist/esm/operations/replicationLogicalNetworks.js.map +1 -1
  170. package/dist/esm/operations/replicationMigrationItems.js +144 -133
  171. package/dist/esm/operations/replicationMigrationItems.js.map +1 -1
  172. package/dist/esm/operations/replicationNetworkMappings.js +78 -97
  173. package/dist/esm/operations/replicationNetworkMappings.js.map +1 -1
  174. package/dist/esm/operations/replicationNetworks.js +45 -79
  175. package/dist/esm/operations/replicationNetworks.js.map +1 -1
  176. package/dist/esm/operations/replicationPolicies.js +56 -58
  177. package/dist/esm/operations/replicationPolicies.js.map +1 -1
  178. package/dist/esm/operations/replicationProtectableItems.js +23 -40
  179. package/dist/esm/operations/replicationProtectableItems.js.map +1 -1
  180. package/dist/esm/operations/replicationProtectedItems.js +254 -193
  181. package/dist/esm/operations/replicationProtectedItems.js.map +1 -1
  182. package/dist/esm/operations/replicationProtectionClusters.js +133 -127
  183. package/dist/esm/operations/replicationProtectionClusters.js.map +1 -1
  184. package/dist/esm/operations/replicationProtectionContainerMappings.js +89 -103
  185. package/dist/esm/operations/replicationProtectionContainerMappings.js.map +1 -1
  186. package/dist/esm/operations/replicationProtectionContainers.js +100 -109
  187. package/dist/esm/operations/replicationProtectionContainers.js.map +1 -1
  188. package/dist/esm/operations/replicationProtectionIntents.js +23 -40
  189. package/dist/esm/operations/replicationProtectionIntents.js.map +1 -1
  190. package/dist/esm/operations/replicationRecoveryPlans.js +133 -100
  191. package/dist/esm/operations/replicationRecoveryPlans.js.map +1 -1
  192. package/dist/esm/operations/replicationRecoveryServicesProviders.js +89 -103
  193. package/dist/esm/operations/replicationRecoveryServicesProviders.js.map +1 -1
  194. package/dist/esm/operations/replicationStorageClassificationMappings.js +67 -91
  195. package/dist/esm/operations/replicationStorageClassificationMappings.js.map +1 -1
  196. package/dist/esm/operations/replicationStorageClassifications.js +45 -79
  197. package/dist/esm/operations/replicationStorageClassifications.js.map +1 -1
  198. package/dist/esm/operations/replicationVaultHealth.js +12 -6
  199. package/dist/esm/operations/replicationVaultHealth.js.map +1 -1
  200. package/dist/esm/operations/replicationVaultSetting.js +34 -46
  201. package/dist/esm/operations/replicationVaultSetting.js.map +1 -1
  202. package/dist/esm/operations/replicationvCenters.js +78 -97
  203. package/dist/esm/operations/replicationvCenters.js.map +1 -1
  204. package/dist/esm/operations/supportedOperatingSystemsOperations.js +1 -0
  205. package/dist/esm/operations/supportedOperatingSystemsOperations.js.map +1 -1
  206. package/dist/esm/operations/targetComputeSizes.js +23 -40
  207. package/dist/esm/operations/targetComputeSizes.js.map +1 -1
  208. package/dist/esm/pagingHelper.js +2 -4
  209. package/dist/esm/pagingHelper.js.map +1 -1
  210. package/dist/esm/siteRecoveryManagementClient.js +44 -5
  211. package/dist/esm/siteRecoveryManagementClient.js.map +1 -1
  212. package/dist/react-native/lroImpl.js +7 -3
  213. package/dist/react-native/lroImpl.js.map +1 -1
  214. package/dist/react-native/models/mappers.js +2903 -1357
  215. package/dist/react-native/models/mappers.js.map +1 -1
  216. package/dist/react-native/operations/clusterRecoveryPointOperations.js +1 -0
  217. package/dist/react-native/operations/clusterRecoveryPointOperations.js.map +1 -1
  218. package/dist/react-native/operations/clusterRecoveryPoints.js +23 -40
  219. package/dist/react-native/operations/clusterRecoveryPoints.js.map +1 -1
  220. package/dist/react-native/operations/migrationRecoveryPoints.js +23 -40
  221. package/dist/react-native/operations/migrationRecoveryPoints.js.map +1 -1
  222. package/dist/react-native/operations/operations.js +23 -40
  223. package/dist/react-native/operations/operations.js.map +1 -1
  224. package/dist/react-native/operations/recoveryPoints.js +23 -40
  225. package/dist/react-native/operations/recoveryPoints.js.map +1 -1
  226. package/dist/react-native/operations/replicationAlertSettings.js +23 -40
  227. package/dist/react-native/operations/replicationAlertSettings.js.map +1 -1
  228. package/dist/react-native/operations/replicationAppliances.js +23 -40
  229. package/dist/react-native/operations/replicationAppliances.js.map +1 -1
  230. package/dist/react-native/operations/replicationEligibilityResultsOperations.js +1 -0
  231. package/dist/react-native/operations/replicationEligibilityResultsOperations.js.map +1 -1
  232. package/dist/react-native/operations/replicationEvents.js +23 -40
  233. package/dist/react-native/operations/replicationEvents.js.map +1 -1
  234. package/dist/react-native/operations/replicationFabrics.js +111 -88
  235. package/dist/react-native/operations/replicationFabrics.js.map +1 -1
  236. package/dist/react-native/operations/replicationJobs.js +67 -64
  237. package/dist/react-native/operations/replicationJobs.js.map +1 -1
  238. package/dist/react-native/operations/replicationLogicalNetworks.js +23 -40
  239. package/dist/react-native/operations/replicationLogicalNetworks.js.map +1 -1
  240. package/dist/react-native/operations/replicationMigrationItems.js +144 -133
  241. package/dist/react-native/operations/replicationMigrationItems.js.map +1 -1
  242. package/dist/react-native/operations/replicationNetworkMappings.js +78 -97
  243. package/dist/react-native/operations/replicationNetworkMappings.js.map +1 -1
  244. package/dist/react-native/operations/replicationNetworks.js +45 -79
  245. package/dist/react-native/operations/replicationNetworks.js.map +1 -1
  246. package/dist/react-native/operations/replicationPolicies.js +56 -58
  247. package/dist/react-native/operations/replicationPolicies.js.map +1 -1
  248. package/dist/react-native/operations/replicationProtectableItems.js +23 -40
  249. package/dist/react-native/operations/replicationProtectableItems.js.map +1 -1
  250. package/dist/react-native/operations/replicationProtectedItems.js +254 -193
  251. package/dist/react-native/operations/replicationProtectedItems.js.map +1 -1
  252. package/dist/react-native/operations/replicationProtectionClusters.js +133 -127
  253. package/dist/react-native/operations/replicationProtectionClusters.js.map +1 -1
  254. package/dist/react-native/operations/replicationProtectionContainerMappings.js +89 -103
  255. package/dist/react-native/operations/replicationProtectionContainerMappings.js.map +1 -1
  256. package/dist/react-native/operations/replicationProtectionContainers.js +100 -109
  257. package/dist/react-native/operations/replicationProtectionContainers.js.map +1 -1
  258. package/dist/react-native/operations/replicationProtectionIntents.js +23 -40
  259. package/dist/react-native/operations/replicationProtectionIntents.js.map +1 -1
  260. package/dist/react-native/operations/replicationRecoveryPlans.js +133 -100
  261. package/dist/react-native/operations/replicationRecoveryPlans.js.map +1 -1
  262. package/dist/react-native/operations/replicationRecoveryServicesProviders.js +89 -103
  263. package/dist/react-native/operations/replicationRecoveryServicesProviders.js.map +1 -1
  264. package/dist/react-native/operations/replicationStorageClassificationMappings.js +67 -91
  265. package/dist/react-native/operations/replicationStorageClassificationMappings.js.map +1 -1
  266. package/dist/react-native/operations/replicationStorageClassifications.js +45 -79
  267. package/dist/react-native/operations/replicationStorageClassifications.js.map +1 -1
  268. package/dist/react-native/operations/replicationVaultHealth.js +12 -6
  269. package/dist/react-native/operations/replicationVaultHealth.js.map +1 -1
  270. package/dist/react-native/operations/replicationVaultSetting.js +34 -46
  271. package/dist/react-native/operations/replicationVaultSetting.js.map +1 -1
  272. package/dist/react-native/operations/replicationvCenters.js +78 -97
  273. package/dist/react-native/operations/replicationvCenters.js.map +1 -1
  274. package/dist/react-native/operations/supportedOperatingSystemsOperations.js +1 -0
  275. package/dist/react-native/operations/supportedOperatingSystemsOperations.js.map +1 -1
  276. package/dist/react-native/operations/targetComputeSizes.js +23 -40
  277. package/dist/react-native/operations/targetComputeSizes.js.map +1 -1
  278. package/dist/react-native/pagingHelper.js +2 -4
  279. package/dist/react-native/pagingHelper.js.map +1 -1
  280. package/dist/react-native/siteRecoveryManagementClient.js +44 -5
  281. package/dist/react-native/siteRecoveryManagementClient.js.map +1 -1
  282. package/package.json +2 -2
  283. /package/review/{arm-recoveryservices-siterecovery.api.md → arm-recoveryservices-siterecovery-node.api.md} +0 -0
@@ -18,6 +18,7 @@ const lroImpl_js_1 = require("../lroImpl.js");
18
18
  /// <reference lib="esnext.asynciterable" />
19
19
  /** Class containing ReplicationProtectedItems operations. */
20
20
  class ReplicationProtectedItemsImpl {
21
+ client;
21
22
  /**
22
23
  * Initialize a new instance of the class ReplicationProtectedItems class.
23
24
  * @param client Reference to the service client
@@ -44,52 +45,35 @@ class ReplicationProtectedItemsImpl {
44
45
  return this;
45
46
  },
46
47
  byPage: (settings) => {
47
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
48
+ if (settings?.maxPageSize) {
48
49
  throw new Error("maxPageSize is not supported by this operation.");
49
50
  }
50
51
  return this.listByReplicationProtectionContainersPagingPage(resourceGroupName, resourceName, fabricName, protectionContainerName, options, settings);
51
52
  },
52
53
  };
53
54
  }
54
- listByReplicationProtectionContainersPagingPage(resourceGroupName, resourceName, fabricName, protectionContainerName, options, settings) {
55
- return tslib_1.__asyncGenerator(this, arguments, function* listByReplicationProtectionContainersPagingPage_1() {
56
- let result;
57
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
58
- if (!continuationToken) {
59
- result = yield tslib_1.__await(this._listByReplicationProtectionContainers(resourceGroupName, resourceName, fabricName, protectionContainerName, options));
60
- let page = result.value || [];
61
- continuationToken = result.nextLink;
62
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
63
- yield yield tslib_1.__await(page);
64
- }
65
- while (continuationToken) {
66
- result = yield tslib_1.__await(this._listByReplicationProtectionContainersNext(resourceGroupName, resourceName, fabricName, protectionContainerName, continuationToken, options));
67
- continuationToken = result.nextLink;
68
- let page = result.value || [];
69
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
70
- yield yield tslib_1.__await(page);
71
- }
72
- });
55
+ async *listByReplicationProtectionContainersPagingPage(resourceGroupName, resourceName, fabricName, protectionContainerName, options, settings) {
56
+ let result;
57
+ let continuationToken = settings?.continuationToken;
58
+ if (!continuationToken) {
59
+ result = await this._listByReplicationProtectionContainers(resourceGroupName, resourceName, fabricName, protectionContainerName, options);
60
+ let page = result.value || [];
61
+ continuationToken = result.nextLink;
62
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
63
+ yield page;
64
+ }
65
+ while (continuationToken) {
66
+ result = await this._listByReplicationProtectionContainersNext(resourceGroupName, resourceName, fabricName, protectionContainerName, continuationToken, options);
67
+ continuationToken = result.nextLink;
68
+ let page = result.value || [];
69
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
70
+ yield page;
71
+ }
73
72
  }
74
- listByReplicationProtectionContainersPagingAll(resourceGroupName, resourceName, fabricName, protectionContainerName, options) {
75
- return tslib_1.__asyncGenerator(this, arguments, function* listByReplicationProtectionContainersPagingAll_1() {
76
- var _a, e_1, _b, _c;
77
- try {
78
- for (var _d = true, _e = tslib_1.__asyncValues(this.listByReplicationProtectionContainersPagingPage(resourceGroupName, resourceName, fabricName, protectionContainerName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
79
- _c = _f.value;
80
- _d = false;
81
- const page = _c;
82
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
83
- }
84
- }
85
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
86
- finally {
87
- try {
88
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
89
- }
90
- finally { if (e_1) throw e_1.error; }
91
- }
92
- });
73
+ async *listByReplicationProtectionContainersPagingAll(resourceGroupName, resourceName, fabricName, protectionContainerName, options) {
74
+ for await (const page of this.listByReplicationProtectionContainersPagingPage(resourceGroupName, resourceName, fabricName, protectionContainerName, options)) {
75
+ yield* page;
76
+ }
93
77
  }
94
78
  /**
95
79
  * Gets the list of ASR replication protected items in the vault.
@@ -108,52 +92,35 @@ class ReplicationProtectedItemsImpl {
108
92
  return this;
109
93
  },
110
94
  byPage: (settings) => {
111
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
95
+ if (settings?.maxPageSize) {
112
96
  throw new Error("maxPageSize is not supported by this operation.");
113
97
  }
114
98
  return this.listPagingPage(resourceGroupName, resourceName, options, settings);
115
99
  },
116
100
  };
117
101
  }
118
- listPagingPage(resourceGroupName, resourceName, options, settings) {
119
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingPage_1() {
120
- let result;
121
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
122
- if (!continuationToken) {
123
- result = yield tslib_1.__await(this._list(resourceGroupName, resourceName, options));
124
- let page = result.value || [];
125
- continuationToken = result.nextLink;
126
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
127
- yield yield tslib_1.__await(page);
128
- }
129
- while (continuationToken) {
130
- result = yield tslib_1.__await(this._listNext(resourceGroupName, resourceName, continuationToken, options));
131
- continuationToken = result.nextLink;
132
- let page = result.value || [];
133
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
134
- yield yield tslib_1.__await(page);
135
- }
136
- });
102
+ async *listPagingPage(resourceGroupName, resourceName, options, settings) {
103
+ let result;
104
+ let continuationToken = settings?.continuationToken;
105
+ if (!continuationToken) {
106
+ result = await this._list(resourceGroupName, resourceName, options);
107
+ let page = result.value || [];
108
+ continuationToken = result.nextLink;
109
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
110
+ yield page;
111
+ }
112
+ while (continuationToken) {
113
+ result = await this._listNext(resourceGroupName, resourceName, continuationToken, options);
114
+ continuationToken = result.nextLink;
115
+ let page = result.value || [];
116
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
117
+ yield page;
118
+ }
137
119
  }
138
- listPagingAll(resourceGroupName, resourceName, options) {
139
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingAll_1() {
140
- var _a, e_2, _b, _c;
141
- try {
142
- for (var _d = true, _e = tslib_1.__asyncValues(this.listPagingPage(resourceGroupName, resourceName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
143
- _c = _f.value;
144
- _d = false;
145
- const page = _c;
146
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
147
- }
148
- }
149
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
150
- finally {
151
- try {
152
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
153
- }
154
- finally { if (e_2) throw e_2.error; }
155
- }
156
- });
120
+ async *listPagingAll(resourceGroupName, resourceName, options) {
121
+ for await (const page of this.listPagingPage(resourceGroupName, resourceName, options)) {
122
+ yield* page;
123
+ }
157
124
  }
158
125
  /**
159
126
  * Gets the list of ASR replication protected items in the protection container.
@@ -209,14 +176,19 @@ class ReplicationProtectedItemsImpl {
209
176
  return this.client.sendOperationRequest(args, spec);
210
177
  };
211
178
  const sendOperationFn = async (args, spec) => {
212
- var _a;
213
179
  let currentRawResponse = undefined;
214
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
180
+ const providedCallback = args.options?.onResponse;
215
181
  const callback = (rawResponse, flatResponse) => {
216
182
  currentRawResponse = rawResponse;
217
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
183
+ providedCallback?.(rawResponse, flatResponse);
184
+ };
185
+ const updatedArgs = {
186
+ ...args,
187
+ options: {
188
+ ...args.options,
189
+ onResponse: callback,
190
+ },
218
191
  };
219
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
220
192
  const flatResponse = await directSendOperation(updatedArgs, spec);
221
193
  return {
222
194
  flatResponse,
@@ -241,8 +213,8 @@ class ReplicationProtectedItemsImpl {
241
213
  spec: createOperationSpec,
242
214
  });
243
215
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
244
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
245
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
216
+ restoreFrom: options?.resumeFrom,
217
+ intervalInMs: options?.updateIntervalInMs,
246
218
  });
247
219
  await poller.poll();
248
220
  return poller;
@@ -279,14 +251,19 @@ class ReplicationProtectedItemsImpl {
279
251
  return this.client.sendOperationRequest(args, spec);
280
252
  };
281
253
  const sendOperationFn = async (args, spec) => {
282
- var _a;
283
254
  let currentRawResponse = undefined;
284
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
255
+ const providedCallback = args.options?.onResponse;
285
256
  const callback = (rawResponse, flatResponse) => {
286
257
  currentRawResponse = rawResponse;
287
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
258
+ providedCallback?.(rawResponse, flatResponse);
259
+ };
260
+ const updatedArgs = {
261
+ ...args,
262
+ options: {
263
+ ...args.options,
264
+ onResponse: callback,
265
+ },
288
266
  };
289
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
290
267
  const flatResponse = await directSendOperation(updatedArgs, spec);
291
268
  return {
292
269
  flatResponse,
@@ -310,8 +287,8 @@ class ReplicationProtectedItemsImpl {
310
287
  spec: purgeOperationSpec,
311
288
  });
312
289
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
313
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
314
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
290
+ restoreFrom: options?.resumeFrom,
291
+ intervalInMs: options?.updateIntervalInMs,
315
292
  });
316
293
  await poller.poll();
317
294
  return poller;
@@ -348,14 +325,19 @@ class ReplicationProtectedItemsImpl {
348
325
  return this.client.sendOperationRequest(args, spec);
349
326
  };
350
327
  const sendOperationFn = async (args, spec) => {
351
- var _a;
352
328
  let currentRawResponse = undefined;
353
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
329
+ const providedCallback = args.options?.onResponse;
354
330
  const callback = (rawResponse, flatResponse) => {
355
331
  currentRawResponse = rawResponse;
356
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
332
+ providedCallback?.(rawResponse, flatResponse);
333
+ };
334
+ const updatedArgs = {
335
+ ...args,
336
+ options: {
337
+ ...args.options,
338
+ onResponse: callback,
339
+ },
357
340
  };
358
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
359
341
  const flatResponse = await directSendOperation(updatedArgs, spec);
360
342
  return {
361
343
  flatResponse,
@@ -380,8 +362,8 @@ class ReplicationProtectedItemsImpl {
380
362
  spec: updateOperationSpec,
381
363
  });
382
364
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
383
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
384
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
365
+ restoreFrom: options?.resumeFrom,
366
+ intervalInMs: options?.updateIntervalInMs,
385
367
  });
386
368
  await poller.poll();
387
369
  return poller;
@@ -417,14 +399,19 @@ class ReplicationProtectedItemsImpl {
417
399
  return this.client.sendOperationRequest(args, spec);
418
400
  };
419
401
  const sendOperationFn = async (args, spec) => {
420
- var _a;
421
402
  let currentRawResponse = undefined;
422
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
403
+ const providedCallback = args.options?.onResponse;
423
404
  const callback = (rawResponse, flatResponse) => {
424
405
  currentRawResponse = rawResponse;
425
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
406
+ providedCallback?.(rawResponse, flatResponse);
407
+ };
408
+ const updatedArgs = {
409
+ ...args,
410
+ options: {
411
+ ...args.options,
412
+ onResponse: callback,
413
+ },
426
414
  };
427
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
428
415
  const flatResponse = await directSendOperation(updatedArgs, spec);
429
416
  return {
430
417
  flatResponse,
@@ -449,8 +436,8 @@ class ReplicationProtectedItemsImpl {
449
436
  spec: addDisksOperationSpec,
450
437
  });
451
438
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
452
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
453
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
439
+ restoreFrom: options?.resumeFrom,
440
+ intervalInMs: options?.updateIntervalInMs,
454
441
  });
455
442
  await poller.poll();
456
443
  return poller;
@@ -486,14 +473,19 @@ class ReplicationProtectedItemsImpl {
486
473
  return this.client.sendOperationRequest(args, spec);
487
474
  };
488
475
  const sendOperationFn = async (args, spec) => {
489
- var _a;
490
476
  let currentRawResponse = undefined;
491
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
477
+ const providedCallback = args.options?.onResponse;
492
478
  const callback = (rawResponse, flatResponse) => {
493
479
  currentRawResponse = rawResponse;
494
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
480
+ providedCallback?.(rawResponse, flatResponse);
481
+ };
482
+ const updatedArgs = {
483
+ ...args,
484
+ options: {
485
+ ...args.options,
486
+ onResponse: callback,
487
+ },
495
488
  };
496
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
497
489
  const flatResponse = await directSendOperation(updatedArgs, spec);
498
490
  return {
499
491
  flatResponse,
@@ -518,8 +510,8 @@ class ReplicationProtectedItemsImpl {
518
510
  spec: applyRecoveryPointOperationSpec,
519
511
  });
520
512
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
521
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
522
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
513
+ restoreFrom: options?.resumeFrom,
514
+ intervalInMs: options?.updateIntervalInMs,
523
515
  });
524
516
  await poller.poll();
525
517
  return poller;
@@ -554,14 +546,19 @@ class ReplicationProtectedItemsImpl {
554
546
  return this.client.sendOperationRequest(args, spec);
555
547
  };
556
548
  const sendOperationFn = async (args, spec) => {
557
- var _a;
558
549
  let currentRawResponse = undefined;
559
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
550
+ const providedCallback = args.options?.onResponse;
560
551
  const callback = (rawResponse, flatResponse) => {
561
552
  currentRawResponse = rawResponse;
562
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
553
+ providedCallback?.(rawResponse, flatResponse);
554
+ };
555
+ const updatedArgs = {
556
+ ...args,
557
+ options: {
558
+ ...args.options,
559
+ onResponse: callback,
560
+ },
563
561
  };
564
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
565
562
  const flatResponse = await directSendOperation(updatedArgs, spec);
566
563
  return {
567
564
  flatResponse,
@@ -585,8 +582,8 @@ class ReplicationProtectedItemsImpl {
585
582
  spec: failoverCancelOperationSpec,
586
583
  });
587
584
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
588
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
589
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
585
+ restoreFrom: options?.resumeFrom,
586
+ intervalInMs: options?.updateIntervalInMs,
590
587
  });
591
588
  await poller.poll();
592
589
  return poller;
@@ -620,14 +617,19 @@ class ReplicationProtectedItemsImpl {
620
617
  return this.client.sendOperationRequest(args, spec);
621
618
  };
622
619
  const sendOperationFn = async (args, spec) => {
623
- var _a;
624
620
  let currentRawResponse = undefined;
625
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
621
+ const providedCallback = args.options?.onResponse;
626
622
  const callback = (rawResponse, flatResponse) => {
627
623
  currentRawResponse = rawResponse;
628
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
624
+ providedCallback?.(rawResponse, flatResponse);
625
+ };
626
+ const updatedArgs = {
627
+ ...args,
628
+ options: {
629
+ ...args.options,
630
+ onResponse: callback,
631
+ },
629
632
  };
630
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
631
633
  const flatResponse = await directSendOperation(updatedArgs, spec);
632
634
  return {
633
635
  flatResponse,
@@ -651,8 +653,8 @@ class ReplicationProtectedItemsImpl {
651
653
  spec: failoverCommitOperationSpec,
652
654
  });
653
655
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
654
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
655
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
656
+ restoreFrom: options?.resumeFrom,
657
+ intervalInMs: options?.updateIntervalInMs,
656
658
  });
657
659
  await poller.poll();
658
660
  return poller;
@@ -687,14 +689,19 @@ class ReplicationProtectedItemsImpl {
687
689
  return this.client.sendOperationRequest(args, spec);
688
690
  };
689
691
  const sendOperationFn = async (args, spec) => {
690
- var _a;
691
692
  let currentRawResponse = undefined;
692
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
693
+ const providedCallback = args.options?.onResponse;
693
694
  const callback = (rawResponse, flatResponse) => {
694
695
  currentRawResponse = rawResponse;
695
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
696
+ providedCallback?.(rawResponse, flatResponse);
697
+ };
698
+ const updatedArgs = {
699
+ ...args,
700
+ options: {
701
+ ...args.options,
702
+ onResponse: callback,
703
+ },
696
704
  };
697
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
698
705
  const flatResponse = await directSendOperation(updatedArgs, spec);
699
706
  return {
700
707
  flatResponse,
@@ -719,8 +726,8 @@ class ReplicationProtectedItemsImpl {
719
726
  spec: plannedFailoverOperationSpec,
720
727
  });
721
728
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
722
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
723
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
729
+ restoreFrom: options?.resumeFrom,
730
+ intervalInMs: options?.updateIntervalInMs,
724
731
  });
725
732
  await poller.poll();
726
733
  return poller;
@@ -757,14 +764,19 @@ class ReplicationProtectedItemsImpl {
757
764
  return this.client.sendOperationRequest(args, spec);
758
765
  };
759
766
  const sendOperationFn = async (args, spec) => {
760
- var _a;
761
767
  let currentRawResponse = undefined;
762
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
768
+ const providedCallback = args.options?.onResponse;
763
769
  const callback = (rawResponse, flatResponse) => {
764
770
  currentRawResponse = rawResponse;
765
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
771
+ providedCallback?.(rawResponse, flatResponse);
772
+ };
773
+ const updatedArgs = {
774
+ ...args,
775
+ options: {
776
+ ...args.options,
777
+ onResponse: callback,
778
+ },
766
779
  };
767
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
768
780
  const flatResponse = await directSendOperation(updatedArgs, spec);
769
781
  return {
770
782
  flatResponse,
@@ -789,8 +801,8 @@ class ReplicationProtectedItemsImpl {
789
801
  spec: deleteOperationSpec,
790
802
  });
791
803
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
792
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
793
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
804
+ restoreFrom: options?.resumeFrom,
805
+ intervalInMs: options?.updateIntervalInMs,
794
806
  });
795
807
  await poller.poll();
796
808
  return poller;
@@ -827,14 +839,19 @@ class ReplicationProtectedItemsImpl {
827
839
  return this.client.sendOperationRequest(args, spec);
828
840
  };
829
841
  const sendOperationFn = async (args, spec) => {
830
- var _a;
831
842
  let currentRawResponse = undefined;
832
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
843
+ const providedCallback = args.options?.onResponse;
833
844
  const callback = (rawResponse, flatResponse) => {
834
845
  currentRawResponse = rawResponse;
835
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
846
+ providedCallback?.(rawResponse, flatResponse);
847
+ };
848
+ const updatedArgs = {
849
+ ...args,
850
+ options: {
851
+ ...args.options,
852
+ onResponse: callback,
853
+ },
836
854
  };
837
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
838
855
  const flatResponse = await directSendOperation(updatedArgs, spec);
839
856
  return {
840
857
  flatResponse,
@@ -859,8 +876,8 @@ class ReplicationProtectedItemsImpl {
859
876
  spec: removeDisksOperationSpec,
860
877
  });
861
878
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
862
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
863
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
879
+ restoreFrom: options?.resumeFrom,
880
+ intervalInMs: options?.updateIntervalInMs,
864
881
  });
865
882
  await poller.poll();
866
883
  return poller;
@@ -896,14 +913,19 @@ class ReplicationProtectedItemsImpl {
896
913
  return this.client.sendOperationRequest(args, spec);
897
914
  };
898
915
  const sendOperationFn = async (args, spec) => {
899
- var _a;
900
916
  let currentRawResponse = undefined;
901
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
917
+ const providedCallback = args.options?.onResponse;
902
918
  const callback = (rawResponse, flatResponse) => {
903
919
  currentRawResponse = rawResponse;
904
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
920
+ providedCallback?.(rawResponse, flatResponse);
921
+ };
922
+ const updatedArgs = {
923
+ ...args,
924
+ options: {
925
+ ...args.options,
926
+ onResponse: callback,
927
+ },
905
928
  };
906
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
907
929
  const flatResponse = await directSendOperation(updatedArgs, spec);
908
930
  return {
909
931
  flatResponse,
@@ -927,8 +949,8 @@ class ReplicationProtectedItemsImpl {
927
949
  spec: repairReplicationOperationSpec,
928
950
  });
929
951
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
930
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
931
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
952
+ restoreFrom: options?.resumeFrom,
953
+ intervalInMs: options?.updateIntervalInMs,
932
954
  });
933
955
  await poller.poll();
934
956
  return poller;
@@ -964,14 +986,19 @@ class ReplicationProtectedItemsImpl {
964
986
  return this.client.sendOperationRequest(args, spec);
965
987
  };
966
988
  const sendOperationFn = async (args, spec) => {
967
- var _a;
968
989
  let currentRawResponse = undefined;
969
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
990
+ const providedCallback = args.options?.onResponse;
970
991
  const callback = (rawResponse, flatResponse) => {
971
992
  currentRawResponse = rawResponse;
972
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
993
+ providedCallback?.(rawResponse, flatResponse);
994
+ };
995
+ const updatedArgs = {
996
+ ...args,
997
+ options: {
998
+ ...args.options,
999
+ onResponse: callback,
1000
+ },
973
1001
  };
974
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
975
1002
  const flatResponse = await directSendOperation(updatedArgs, spec);
976
1003
  return {
977
1004
  flatResponse,
@@ -996,8 +1023,8 @@ class ReplicationProtectedItemsImpl {
996
1023
  spec: reprotectOperationSpec,
997
1024
  });
998
1025
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
999
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1000
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
1026
+ restoreFrom: options?.resumeFrom,
1027
+ intervalInMs: options?.updateIntervalInMs,
1001
1028
  });
1002
1029
  await poller.poll();
1003
1030
  return poller;
@@ -1033,14 +1060,19 @@ class ReplicationProtectedItemsImpl {
1033
1060
  return this.client.sendOperationRequest(args, spec);
1034
1061
  };
1035
1062
  const sendOperationFn = async (args, spec) => {
1036
- var _a;
1037
1063
  let currentRawResponse = undefined;
1038
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
1064
+ const providedCallback = args.options?.onResponse;
1039
1065
  const callback = (rawResponse, flatResponse) => {
1040
1066
  currentRawResponse = rawResponse;
1041
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
1067
+ providedCallback?.(rawResponse, flatResponse);
1068
+ };
1069
+ const updatedArgs = {
1070
+ ...args,
1071
+ options: {
1072
+ ...args.options,
1073
+ onResponse: callback,
1074
+ },
1042
1075
  };
1043
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
1044
1076
  const flatResponse = await directSendOperation(updatedArgs, spec);
1045
1077
  return {
1046
1078
  flatResponse,
@@ -1065,8 +1097,8 @@ class ReplicationProtectedItemsImpl {
1065
1097
  spec: resolveHealthErrorsOperationSpec,
1066
1098
  });
1067
1099
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
1068
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1069
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
1100
+ restoreFrom: options?.resumeFrom,
1101
+ intervalInMs: options?.updateIntervalInMs,
1070
1102
  });
1071
1103
  await poller.poll();
1072
1104
  return poller;
@@ -1102,14 +1134,19 @@ class ReplicationProtectedItemsImpl {
1102
1134
  return this.client.sendOperationRequest(args, spec);
1103
1135
  };
1104
1136
  const sendOperationFn = async (args, spec) => {
1105
- var _a;
1106
1137
  let currentRawResponse = undefined;
1107
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
1138
+ const providedCallback = args.options?.onResponse;
1108
1139
  const callback = (rawResponse, flatResponse) => {
1109
1140
  currentRawResponse = rawResponse;
1110
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
1141
+ providedCallback?.(rawResponse, flatResponse);
1142
+ };
1143
+ const updatedArgs = {
1144
+ ...args,
1145
+ options: {
1146
+ ...args.options,
1147
+ onResponse: callback,
1148
+ },
1111
1149
  };
1112
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
1113
1150
  const flatResponse = await directSendOperation(updatedArgs, spec);
1114
1151
  return {
1115
1152
  flatResponse,
@@ -1134,8 +1171,8 @@ class ReplicationProtectedItemsImpl {
1134
1171
  spec: switchProviderOperationSpec,
1135
1172
  });
1136
1173
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
1137
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1138
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
1174
+ restoreFrom: options?.resumeFrom,
1175
+ intervalInMs: options?.updateIntervalInMs,
1139
1176
  resourceLocationConfig: "azure-async-operation",
1140
1177
  });
1141
1178
  await poller.poll();
@@ -1172,14 +1209,19 @@ class ReplicationProtectedItemsImpl {
1172
1209
  return this.client.sendOperationRequest(args, spec);
1173
1210
  };
1174
1211
  const sendOperationFn = async (args, spec) => {
1175
- var _a;
1176
1212
  let currentRawResponse = undefined;
1177
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
1213
+ const providedCallback = args.options?.onResponse;
1178
1214
  const callback = (rawResponse, flatResponse) => {
1179
1215
  currentRawResponse = rawResponse;
1180
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
1216
+ providedCallback?.(rawResponse, flatResponse);
1217
+ };
1218
+ const updatedArgs = {
1219
+ ...args,
1220
+ options: {
1221
+ ...args.options,
1222
+ onResponse: callback,
1223
+ },
1181
1224
  };
1182
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
1183
1225
  const flatResponse = await directSendOperation(updatedArgs, spec);
1184
1226
  return {
1185
1227
  flatResponse,
@@ -1204,8 +1246,8 @@ class ReplicationProtectedItemsImpl {
1204
1246
  spec: testFailoverOperationSpec,
1205
1247
  });
1206
1248
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
1207
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1208
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
1249
+ restoreFrom: options?.resumeFrom,
1250
+ intervalInMs: options?.updateIntervalInMs,
1209
1251
  });
1210
1252
  await poller.poll();
1211
1253
  return poller;
@@ -1241,14 +1283,19 @@ class ReplicationProtectedItemsImpl {
1241
1283
  return this.client.sendOperationRequest(args, spec);
1242
1284
  };
1243
1285
  const sendOperationFn = async (args, spec) => {
1244
- var _a;
1245
1286
  let currentRawResponse = undefined;
1246
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
1287
+ const providedCallback = args.options?.onResponse;
1247
1288
  const callback = (rawResponse, flatResponse) => {
1248
1289
  currentRawResponse = rawResponse;
1249
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
1290
+ providedCallback?.(rawResponse, flatResponse);
1291
+ };
1292
+ const updatedArgs = {
1293
+ ...args,
1294
+ options: {
1295
+ ...args.options,
1296
+ onResponse: callback,
1297
+ },
1250
1298
  };
1251
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
1252
1299
  const flatResponse = await directSendOperation(updatedArgs, spec);
1253
1300
  return {
1254
1301
  flatResponse,
@@ -1273,8 +1320,8 @@ class ReplicationProtectedItemsImpl {
1273
1320
  spec: testFailoverCleanupOperationSpec,
1274
1321
  });
1275
1322
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
1276
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1277
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
1323
+ restoreFrom: options?.resumeFrom,
1324
+ intervalInMs: options?.updateIntervalInMs,
1278
1325
  });
1279
1326
  await poller.poll();
1280
1327
  return poller;
@@ -1310,14 +1357,19 @@ class ReplicationProtectedItemsImpl {
1310
1357
  return this.client.sendOperationRequest(args, spec);
1311
1358
  };
1312
1359
  const sendOperationFn = async (args, spec) => {
1313
- var _a;
1314
1360
  let currentRawResponse = undefined;
1315
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
1361
+ const providedCallback = args.options?.onResponse;
1316
1362
  const callback = (rawResponse, flatResponse) => {
1317
1363
  currentRawResponse = rawResponse;
1318
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
1364
+ providedCallback?.(rawResponse, flatResponse);
1365
+ };
1366
+ const updatedArgs = {
1367
+ ...args,
1368
+ options: {
1369
+ ...args.options,
1370
+ onResponse: callback,
1371
+ },
1319
1372
  };
1320
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
1321
1373
  const flatResponse = await directSendOperation(updatedArgs, spec);
1322
1374
  return {
1323
1375
  flatResponse,
@@ -1342,8 +1394,8 @@ class ReplicationProtectedItemsImpl {
1342
1394
  spec: unplannedFailoverOperationSpec,
1343
1395
  });
1344
1396
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
1345
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1346
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
1397
+ restoreFrom: options?.resumeFrom,
1398
+ intervalInMs: options?.updateIntervalInMs,
1347
1399
  });
1348
1400
  await poller.poll();
1349
1401
  return poller;
@@ -1379,14 +1431,19 @@ class ReplicationProtectedItemsImpl {
1379
1431
  return this.client.sendOperationRequest(args, spec);
1380
1432
  };
1381
1433
  const sendOperationFn = async (args, spec) => {
1382
- var _a;
1383
1434
  let currentRawResponse = undefined;
1384
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
1435
+ const providedCallback = args.options?.onResponse;
1385
1436
  const callback = (rawResponse, flatResponse) => {
1386
1437
  currentRawResponse = rawResponse;
1387
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
1438
+ providedCallback?.(rawResponse, flatResponse);
1439
+ };
1440
+ const updatedArgs = {
1441
+ ...args,
1442
+ options: {
1443
+ ...args.options,
1444
+ onResponse: callback,
1445
+ },
1388
1446
  };
1389
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
1390
1447
  const flatResponse = await directSendOperation(updatedArgs, spec);
1391
1448
  return {
1392
1449
  flatResponse,
@@ -1411,8 +1468,8 @@ class ReplicationProtectedItemsImpl {
1411
1468
  spec: updateApplianceOperationSpec,
1412
1469
  });
1413
1470
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
1414
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1415
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
1471
+ restoreFrom: options?.resumeFrom,
1472
+ intervalInMs: options?.updateIntervalInMs,
1416
1473
  });
1417
1474
  await poller.poll();
1418
1475
  return poller;
@@ -1450,14 +1507,19 @@ class ReplicationProtectedItemsImpl {
1450
1507
  return this.client.sendOperationRequest(args, spec);
1451
1508
  };
1452
1509
  const sendOperationFn = async (args, spec) => {
1453
- var _a;
1454
1510
  let currentRawResponse = undefined;
1455
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
1511
+ const providedCallback = args.options?.onResponse;
1456
1512
  const callback = (rawResponse, flatResponse) => {
1457
1513
  currentRawResponse = rawResponse;
1458
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
1514
+ providedCallback?.(rawResponse, flatResponse);
1515
+ };
1516
+ const updatedArgs = {
1517
+ ...args,
1518
+ options: {
1519
+ ...args.options,
1520
+ onResponse: callback,
1521
+ },
1459
1522
  };
1460
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
1461
1523
  const flatResponse = await directSendOperation(updatedArgs, spec);
1462
1524
  return {
1463
1525
  flatResponse,
@@ -1482,8 +1544,8 @@ class ReplicationProtectedItemsImpl {
1482
1544
  spec: updateMobilityServiceOperationSpec,
1483
1545
  });
1484
1546
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
1485
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1486
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
1547
+ restoreFrom: options?.resumeFrom,
1548
+ intervalInMs: options?.updateIntervalInMs,
1487
1549
  resourceLocationConfig: "location",
1488
1550
  });
1489
1551
  await poller.poll();