@azure/arm-storagemover 1.0.0-alpha.20230210.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 (256) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/LICENSE +21 -0
  3. package/README.md +109 -0
  4. package/dist/index.js +3875 -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/agentsCreateOrUpdateSample.d.ts +2 -0
  9. package/dist-esm/samples-dev/agentsCreateOrUpdateSample.d.ts.map +1 -0
  10. package/dist-esm/samples-dev/agentsCreateOrUpdateSample.js +45 -0
  11. package/dist-esm/samples-dev/agentsCreateOrUpdateSample.js.map +1 -0
  12. package/dist-esm/samples-dev/agentsDeleteSample.d.ts +2 -0
  13. package/dist-esm/samples-dev/agentsDeleteSample.d.ts.map +1 -0
  14. package/dist-esm/samples-dev/agentsDeleteSample.js +40 -0
  15. package/dist-esm/samples-dev/agentsDeleteSample.js.map +1 -0
  16. package/dist-esm/samples-dev/agentsGetSample.d.ts +2 -0
  17. package/dist-esm/samples-dev/agentsGetSample.d.ts.map +1 -0
  18. package/dist-esm/samples-dev/agentsGetSample.js +40 -0
  19. package/dist-esm/samples-dev/agentsGetSample.js.map +1 -0
  20. package/dist-esm/samples-dev/agentsListSample.d.ts +2 -0
  21. package/dist-esm/samples-dev/agentsListSample.d.ts.map +1 -0
  22. package/dist-esm/samples-dev/agentsListSample.js +53 -0
  23. package/dist-esm/samples-dev/agentsListSample.js.map +1 -0
  24. package/dist-esm/samples-dev/agentsUpdateSample.d.ts +2 -0
  25. package/dist-esm/samples-dev/agentsUpdateSample.d.ts.map +1 -0
  26. package/dist-esm/samples-dev/agentsUpdateSample.js +43 -0
  27. package/dist-esm/samples-dev/agentsUpdateSample.js.map +1 -0
  28. package/dist-esm/samples-dev/endpointsCreateOrUpdateSample.d.ts +2 -0
  29. package/dist-esm/samples-dev/endpointsCreateOrUpdateSample.d.ts.map +1 -0
  30. package/dist-esm/samples-dev/endpointsCreateOrUpdateSample.js +48 -0
  31. package/dist-esm/samples-dev/endpointsCreateOrUpdateSample.js.map +1 -0
  32. package/dist-esm/samples-dev/endpointsDeleteSample.d.ts +2 -0
  33. package/dist-esm/samples-dev/endpointsDeleteSample.d.ts.map +1 -0
  34. package/dist-esm/samples-dev/endpointsDeleteSample.js +40 -0
  35. package/dist-esm/samples-dev/endpointsDeleteSample.js.map +1 -0
  36. package/dist-esm/samples-dev/endpointsGetSample.d.ts +2 -0
  37. package/dist-esm/samples-dev/endpointsGetSample.d.ts.map +1 -0
  38. package/dist-esm/samples-dev/endpointsGetSample.js +40 -0
  39. package/dist-esm/samples-dev/endpointsGetSample.js.map +1 -0
  40. package/dist-esm/samples-dev/endpointsListSample.d.ts +2 -0
  41. package/dist-esm/samples-dev/endpointsListSample.d.ts.map +1 -0
  42. package/dist-esm/samples-dev/endpointsListSample.js +53 -0
  43. package/dist-esm/samples-dev/endpointsListSample.js.map +1 -0
  44. package/dist-esm/samples-dev/endpointsUpdateSample.d.ts +2 -0
  45. package/dist-esm/samples-dev/endpointsUpdateSample.d.ts.map +1 -0
  46. package/dist-esm/samples-dev/endpointsUpdateSample.js +43 -0
  47. package/dist-esm/samples-dev/endpointsUpdateSample.js.map +1 -0
  48. package/dist-esm/samples-dev/jobDefinitionsCreateOrUpdateSample.d.ts +2 -0
  49. package/dist-esm/samples-dev/jobDefinitionsCreateOrUpdateSample.d.ts.map +1 -0
  50. package/dist-esm/samples-dev/jobDefinitionsCreateOrUpdateSample.js +50 -0
  51. package/dist-esm/samples-dev/jobDefinitionsCreateOrUpdateSample.js.map +1 -0
  52. package/dist-esm/samples-dev/jobDefinitionsDeleteSample.d.ts +2 -0
  53. package/dist-esm/samples-dev/jobDefinitionsDeleteSample.d.ts.map +1 -0
  54. package/dist-esm/samples-dev/jobDefinitionsDeleteSample.js +41 -0
  55. package/dist-esm/samples-dev/jobDefinitionsDeleteSample.js.map +1 -0
  56. package/dist-esm/samples-dev/jobDefinitionsGetSample.d.ts +2 -0
  57. package/dist-esm/samples-dev/jobDefinitionsGetSample.d.ts.map +1 -0
  58. package/dist-esm/samples-dev/jobDefinitionsGetSample.js +41 -0
  59. package/dist-esm/samples-dev/jobDefinitionsGetSample.js.map +1 -0
  60. package/dist-esm/samples-dev/jobDefinitionsListSample.d.ts +2 -0
  61. package/dist-esm/samples-dev/jobDefinitionsListSample.d.ts.map +1 -0
  62. package/dist-esm/samples-dev/jobDefinitionsListSample.js +54 -0
  63. package/dist-esm/samples-dev/jobDefinitionsListSample.js.map +1 -0
  64. package/dist-esm/samples-dev/jobDefinitionsStartJobSample.d.ts +2 -0
  65. package/dist-esm/samples-dev/jobDefinitionsStartJobSample.d.ts.map +1 -0
  66. package/dist-esm/samples-dev/jobDefinitionsStartJobSample.js +41 -0
  67. package/dist-esm/samples-dev/jobDefinitionsStartJobSample.js.map +1 -0
  68. package/dist-esm/samples-dev/jobDefinitionsStopJobSample.d.ts +2 -0
  69. package/dist-esm/samples-dev/jobDefinitionsStopJobSample.d.ts.map +1 -0
  70. package/dist-esm/samples-dev/jobDefinitionsStopJobSample.js +41 -0
  71. package/dist-esm/samples-dev/jobDefinitionsStopJobSample.js.map +1 -0
  72. package/dist-esm/samples-dev/jobDefinitionsUpdateSample.d.ts +2 -0
  73. package/dist-esm/samples-dev/jobDefinitionsUpdateSample.d.ts.map +1 -0
  74. package/dist-esm/samples-dev/jobDefinitionsUpdateSample.js +45 -0
  75. package/dist-esm/samples-dev/jobDefinitionsUpdateSample.js.map +1 -0
  76. package/dist-esm/samples-dev/jobRunsGetSample.d.ts +2 -0
  77. package/dist-esm/samples-dev/jobRunsGetSample.d.ts.map +1 -0
  78. package/dist-esm/samples-dev/jobRunsGetSample.js +42 -0
  79. package/dist-esm/samples-dev/jobRunsGetSample.js.map +1 -0
  80. package/dist-esm/samples-dev/jobRunsListSample.d.ts +2 -0
  81. package/dist-esm/samples-dev/jobRunsListSample.d.ts.map +1 -0
  82. package/dist-esm/samples-dev/jobRunsListSample.js +55 -0
  83. package/dist-esm/samples-dev/jobRunsListSample.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 +51 -0
  87. package/dist-esm/samples-dev/operationsListSample.js.map +1 -0
  88. package/dist-esm/samples-dev/projectsCreateOrUpdateSample.d.ts +2 -0
  89. package/dist-esm/samples-dev/projectsCreateOrUpdateSample.d.ts.map +1 -0
  90. package/dist-esm/samples-dev/projectsCreateOrUpdateSample.js +41 -0
  91. package/dist-esm/samples-dev/projectsCreateOrUpdateSample.js.map +1 -0
  92. package/dist-esm/samples-dev/projectsDeleteSample.d.ts +2 -0
  93. package/dist-esm/samples-dev/projectsDeleteSample.d.ts.map +1 -0
  94. package/dist-esm/samples-dev/projectsDeleteSample.js +40 -0
  95. package/dist-esm/samples-dev/projectsDeleteSample.js.map +1 -0
  96. package/dist-esm/samples-dev/projectsGetSample.d.ts +2 -0
  97. package/dist-esm/samples-dev/projectsGetSample.d.ts.map +1 -0
  98. package/dist-esm/samples-dev/projectsGetSample.js +40 -0
  99. package/dist-esm/samples-dev/projectsGetSample.js.map +1 -0
  100. package/dist-esm/samples-dev/projectsListSample.d.ts +2 -0
  101. package/dist-esm/samples-dev/projectsListSample.d.ts.map +1 -0
  102. package/dist-esm/samples-dev/projectsListSample.js +53 -0
  103. package/dist-esm/samples-dev/projectsListSample.js.map +1 -0
  104. package/dist-esm/samples-dev/projectsUpdateSample.d.ts +2 -0
  105. package/dist-esm/samples-dev/projectsUpdateSample.d.ts.map +1 -0
  106. package/dist-esm/samples-dev/projectsUpdateSample.js +43 -0
  107. package/dist-esm/samples-dev/projectsUpdateSample.js.map +1 -0
  108. package/dist-esm/samples-dev/storageMoversCreateOrUpdateSample.d.ts +2 -0
  109. package/dist-esm/samples-dev/storageMoversCreateOrUpdateSample.d.ts.map +1 -0
  110. package/dist-esm/samples-dev/storageMoversCreateOrUpdateSample.js +44 -0
  111. package/dist-esm/samples-dev/storageMoversCreateOrUpdateSample.js.map +1 -0
  112. package/dist-esm/samples-dev/storageMoversDeleteSample.d.ts +2 -0
  113. package/dist-esm/samples-dev/storageMoversDeleteSample.d.ts.map +1 -0
  114. package/dist-esm/samples-dev/storageMoversDeleteSample.js +39 -0
  115. package/dist-esm/samples-dev/storageMoversDeleteSample.js.map +1 -0
  116. package/dist-esm/samples-dev/storageMoversGetSample.d.ts +2 -0
  117. package/dist-esm/samples-dev/storageMoversGetSample.d.ts.map +1 -0
  118. package/dist-esm/samples-dev/storageMoversGetSample.js +39 -0
  119. package/dist-esm/samples-dev/storageMoversGetSample.js.map +1 -0
  120. package/dist-esm/samples-dev/storageMoversListBySubscriptionSample.d.ts +2 -0
  121. package/dist-esm/samples-dev/storageMoversListBySubscriptionSample.d.ts.map +1 -0
  122. package/dist-esm/samples-dev/storageMoversListBySubscriptionSample.js +51 -0
  123. package/dist-esm/samples-dev/storageMoversListBySubscriptionSample.js.map +1 -0
  124. package/dist-esm/samples-dev/storageMoversListSample.d.ts +2 -0
  125. package/dist-esm/samples-dev/storageMoversListSample.d.ts.map +1 -0
  126. package/dist-esm/samples-dev/storageMoversListSample.js +52 -0
  127. package/dist-esm/samples-dev/storageMoversListSample.js.map +1 -0
  128. package/dist-esm/samples-dev/storageMoversUpdateSample.d.ts +2 -0
  129. package/dist-esm/samples-dev/storageMoversUpdateSample.d.ts.map +1 -0
  130. package/dist-esm/samples-dev/storageMoversUpdateSample.js +42 -0
  131. package/dist-esm/samples-dev/storageMoversUpdateSample.js.map +1 -0
  132. package/dist-esm/src/index.d.ts +6 -0
  133. package/dist-esm/src/index.d.ts.map +1 -0
  134. package/dist-esm/src/index.js +13 -0
  135. package/dist-esm/src/index.js.map +1 -0
  136. package/dist-esm/src/lroImpl.d.ts +16 -0
  137. package/dist-esm/src/lroImpl.d.ts.map +1 -0
  138. package/dist-esm/src/lroImpl.js +29 -0
  139. package/dist-esm/src/lroImpl.js.map +1 -0
  140. package/dist-esm/src/models/index.d.ts +1024 -0
  141. package/dist-esm/src/models/index.d.ts.map +1 -0
  142. package/dist-esm/src/models/index.js +114 -0
  143. package/dist-esm/src/models/index.js.map +1 -0
  144. package/dist-esm/src/models/mappers.d.ts +43 -0
  145. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  146. package/dist-esm/src/models/mappers.js +1169 -0
  147. package/dist-esm/src/models/mappers.js.map +1 -0
  148. package/dist-esm/src/models/parameters.d.ts +25 -0
  149. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  150. package/dist-esm/src/models/parameters.js +191 -0
  151. package/dist-esm/src/models/parameters.js.map +1 -0
  152. package/dist-esm/src/operations/agents.d.ts +81 -0
  153. package/dist-esm/src/operations/agents.d.ts.map +1 -0
  154. package/dist-esm/src/operations/agents.js +329 -0
  155. package/dist-esm/src/operations/agents.js.map +1 -0
  156. package/dist-esm/src/operations/endpoints.d.ts +82 -0
  157. package/dist-esm/src/operations/endpoints.d.ts.map +1 -0
  158. package/dist-esm/src/operations/endpoints.js +330 -0
  159. package/dist-esm/src/operations/endpoints.js.map +1 -0
  160. package/dist-esm/src/operations/index.d.ts +8 -0
  161. package/dist-esm/src/operations/index.d.ts.map +1 -0
  162. package/dist-esm/src/operations/index.js +15 -0
  163. package/dist-esm/src/operations/index.js.map +1 -0
  164. package/dist-esm/src/operations/jobDefinitions.d.ts +109 -0
  165. package/dist-esm/src/operations/jobDefinitions.d.ts.map +1 -0
  166. package/dist-esm/src/operations/jobDefinitions.js +451 -0
  167. package/dist-esm/src/operations/jobDefinitions.js.map +1 -0
  168. package/dist-esm/src/operations/jobRuns.d.ts +54 -0
  169. package/dist-esm/src/operations/jobRuns.d.ts.map +1 -0
  170. package/dist-esm/src/operations/jobRuns.js +214 -0
  171. package/dist-esm/src/operations/jobRuns.js.map +1 -0
  172. package/dist-esm/src/operations/operations.d.ts +32 -0
  173. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  174. package/dist-esm/src/operations/operations.js +131 -0
  175. package/dist-esm/src/operations/operations.js.map +1 -0
  176. package/dist-esm/src/operations/projects.d.ts +82 -0
  177. package/dist-esm/src/operations/projects.d.ts.map +1 -0
  178. package/dist-esm/src/operations/projects.js +330 -0
  179. package/dist-esm/src/operations/projects.js.map +1 -0
  180. package/dist-esm/src/operations/storageMovers.d.ts +93 -0
  181. package/dist-esm/src/operations/storageMovers.d.ts.map +1 -0
  182. package/dist-esm/src/operations/storageMovers.js +426 -0
  183. package/dist-esm/src/operations/storageMovers.js.map +1 -0
  184. package/dist-esm/src/operationsInterfaces/agents.d.ts +56 -0
  185. package/dist-esm/src/operationsInterfaces/agents.d.ts.map +1 -0
  186. package/dist-esm/src/operationsInterfaces/agents.js +9 -0
  187. package/dist-esm/src/operationsInterfaces/agents.js.map +1 -0
  188. package/dist-esm/src/operationsInterfaces/endpoints.d.ts +57 -0
  189. package/dist-esm/src/operationsInterfaces/endpoints.d.ts.map +1 -0
  190. package/dist-esm/src/operationsInterfaces/endpoints.js +9 -0
  191. package/dist-esm/src/operationsInterfaces/endpoints.js.map +1 -0
  192. package/dist-esm/src/operationsInterfaces/index.d.ts +8 -0
  193. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  194. package/dist-esm/src/operationsInterfaces/index.js +15 -0
  195. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  196. package/dist-esm/src/operationsInterfaces/jobDefinitions.d.ts +82 -0
  197. package/dist-esm/src/operationsInterfaces/jobDefinitions.d.ts.map +1 -0
  198. package/dist-esm/src/operationsInterfaces/jobDefinitions.js +9 -0
  199. package/dist-esm/src/operationsInterfaces/jobDefinitions.js.map +1 -0
  200. package/dist-esm/src/operationsInterfaces/jobRuns.d.ts +25 -0
  201. package/dist-esm/src/operationsInterfaces/jobRuns.d.ts.map +1 -0
  202. package/dist-esm/src/operationsInterfaces/jobRuns.js +9 -0
  203. package/dist-esm/src/operationsInterfaces/jobRuns.js.map +1 -0
  204. package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
  205. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  206. package/dist-esm/src/operationsInterfaces/operations.js +9 -0
  207. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  208. package/dist-esm/src/operationsInterfaces/projects.d.ts +57 -0
  209. package/dist-esm/src/operationsInterfaces/projects.d.ts.map +1 -0
  210. package/dist-esm/src/operationsInterfaces/projects.js +9 -0
  211. package/dist-esm/src/operationsInterfaces/projects.js.map +1 -0
  212. package/dist-esm/src/operationsInterfaces/storageMovers.d.ts +57 -0
  213. package/dist-esm/src/operationsInterfaces/storageMovers.d.ts.map +1 -0
  214. package/dist-esm/src/operationsInterfaces/storageMovers.js +9 -0
  215. package/dist-esm/src/operationsInterfaces/storageMovers.js.map +1 -0
  216. package/dist-esm/src/pagingHelper.d.ts +13 -0
  217. package/dist-esm/src/pagingHelper.d.ts.map +1 -0
  218. package/dist-esm/src/pagingHelper.js +32 -0
  219. package/dist-esm/src/pagingHelper.js.map +1 -0
  220. package/dist-esm/src/storageMoverClient.d.ts +26 -0
  221. package/dist-esm/src/storageMoverClient.d.ts.map +1 -0
  222. package/dist-esm/src/storageMoverClient.js +106 -0
  223. package/dist-esm/src/storageMoverClient.js.map +1 -0
  224. package/dist-esm/test/storagemover_operations_test.spec.d.ts +4 -0
  225. package/dist-esm/test/storagemover_operations_test.spec.d.ts.map +1 -0
  226. package/dist-esm/test/storagemover_operations_test.spec.js +108 -0
  227. package/dist-esm/test/storagemover_operations_test.spec.js.map +1 -0
  228. package/package.json +123 -0
  229. package/review/arm-storagemover.api.md +768 -0
  230. package/rollup.config.js +122 -0
  231. package/src/index.ts +13 -0
  232. package/src/lroImpl.ts +34 -0
  233. package/src/models/index.ts +1164 -0
  234. package/src/models/mappers.ts +1305 -0
  235. package/src/models/parameters.ts +230 -0
  236. package/src/operations/agents.ts +454 -0
  237. package/src/operations/endpoints.ts +455 -0
  238. package/src/operations/index.ts +15 -0
  239. package/src/operations/jobDefinitions.ts +622 -0
  240. package/src/operations/jobRuns.ts +302 -0
  241. package/src/operations/operations.ts +149 -0
  242. package/src/operations/projects.ts +455 -0
  243. package/src/operations/storageMovers.ts +539 -0
  244. package/src/operationsInterfaces/agents.ts +107 -0
  245. package/src/operationsInterfaces/endpoints.ts +108 -0
  246. package/src/operationsInterfaces/index.ts +15 -0
  247. package/src/operationsInterfaces/jobDefinitions.ts +155 -0
  248. package/src/operationsInterfaces/jobRuns.ts +52 -0
  249. package/src/operationsInterfaces/operations.ts +22 -0
  250. package/src/operationsInterfaces/projects.ts +108 -0
  251. package/src/operationsInterfaces/storageMovers.ts +105 -0
  252. package/src/pagingHelper.ts +39 -0
  253. package/src/storageMoverClient.ts +168 -0
  254. package/tsconfig.json +33 -0
  255. package/types/arm-storagemover.d.ts +1517 -0
  256. package/types/tsdoc-metadata.json +11 -0
package/dist/index.js ADDED
@@ -0,0 +1,3875 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var tslib = require('tslib');
6
+ var coreClient = require('@azure/core-client');
7
+ var coreRestPipeline = require('@azure/core-rest-pipeline');
8
+ var coreLro = require('@azure/core-lro');
9
+
10
+ function _interopNamespace(e) {
11
+ if (e && e.__esModule) return e;
12
+ var n = Object.create(null);
13
+ if (e) {
14
+ Object.keys(e).forEach(function (k) {
15
+ if (k !== 'default') {
16
+ var d = Object.getOwnPropertyDescriptor(e, k);
17
+ Object.defineProperty(n, k, d.get ? d : {
18
+ enumerable: true,
19
+ get: function () { return e[k]; }
20
+ });
21
+ }
22
+ });
23
+ }
24
+ n["default"] = e;
25
+ return Object.freeze(n);
26
+ }
27
+
28
+ var coreClient__namespace = /*#__PURE__*/_interopNamespace(coreClient);
29
+ var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipeline);
30
+
31
+ /*
32
+ * Copyright (c) Microsoft Corporation.
33
+ * Licensed under the MIT License.
34
+ *
35
+ * Code generated by Microsoft (R) AutoRest Code Generator.
36
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
37
+ */
38
+ const pageMap = new WeakMap();
39
+ /**
40
+ * Given the last `.value` produced by the `byPage` iterator,
41
+ * returns a continuation token that can be used to begin paging from
42
+ * that point later.
43
+ * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator.
44
+ * @returns The continuation token that can be passed into byPage() during future calls.
45
+ */
46
+ function getContinuationToken(page) {
47
+ var _a;
48
+ if (typeof page !== "object" || page === null) {
49
+ return undefined;
50
+ }
51
+ return (_a = pageMap.get(page)) === null || _a === void 0 ? void 0 : _a.continuationToken;
52
+ }
53
+ function setContinuationToken(page, continuationToken) {
54
+ var _a;
55
+ if (typeof page !== "object" || page === null || !continuationToken) {
56
+ return;
57
+ }
58
+ const pageInfo = (_a = pageMap.get(page)) !== null && _a !== void 0 ? _a : {};
59
+ pageInfo.continuationToken = continuationToken;
60
+ pageMap.set(page, pageInfo);
61
+ }
62
+
63
+ /*
64
+ * Copyright (c) Microsoft Corporation.
65
+ * Licensed under the MIT License.
66
+ *
67
+ * Code generated by Microsoft (R) AutoRest Code Generator.
68
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
69
+ */
70
+ /** Known values of {@link Origin} that the service accepts. */
71
+ exports.KnownOrigin = void 0;
72
+ (function (KnownOrigin) {
73
+ /** User */
74
+ KnownOrigin["User"] = "user";
75
+ /** System */
76
+ KnownOrigin["System"] = "system";
77
+ /** UserSystem */
78
+ KnownOrigin["UserSystem"] = "user,system";
79
+ })(exports.KnownOrigin || (exports.KnownOrigin = {}));
80
+ /** Known values of {@link ActionType} that the service accepts. */
81
+ exports.KnownActionType = void 0;
82
+ (function (KnownActionType) {
83
+ /** Internal */
84
+ KnownActionType["Internal"] = "Internal";
85
+ })(exports.KnownActionType || (exports.KnownActionType = {}));
86
+ /** Known values of {@link ProvisioningState} that the service accepts. */
87
+ exports.KnownProvisioningState = void 0;
88
+ (function (KnownProvisioningState) {
89
+ /** Succeeded */
90
+ KnownProvisioningState["Succeeded"] = "Succeeded";
91
+ })(exports.KnownProvisioningState || (exports.KnownProvisioningState = {}));
92
+ /** Known values of {@link CreatedByType} that the service accepts. */
93
+ exports.KnownCreatedByType = void 0;
94
+ (function (KnownCreatedByType) {
95
+ /** User */
96
+ KnownCreatedByType["User"] = "User";
97
+ /** Application */
98
+ KnownCreatedByType["Application"] = "Application";
99
+ /** ManagedIdentity */
100
+ KnownCreatedByType["ManagedIdentity"] = "ManagedIdentity";
101
+ /** Key */
102
+ KnownCreatedByType["Key"] = "Key";
103
+ })(exports.KnownCreatedByType || (exports.KnownCreatedByType = {}));
104
+ /** Known values of {@link AgentStatus} that the service accepts. */
105
+ exports.KnownAgentStatus = void 0;
106
+ (function (KnownAgentStatus) {
107
+ /** Registering */
108
+ KnownAgentStatus["Registering"] = "Registering";
109
+ /** Offline */
110
+ KnownAgentStatus["Offline"] = "Offline";
111
+ /** Online */
112
+ KnownAgentStatus["Online"] = "Online";
113
+ /** Executing */
114
+ KnownAgentStatus["Executing"] = "Executing";
115
+ /** RequiresAttention */
116
+ KnownAgentStatus["RequiresAttention"] = "RequiresAttention";
117
+ /** Unregistering */
118
+ KnownAgentStatus["Unregistering"] = "Unregistering";
119
+ })(exports.KnownAgentStatus || (exports.KnownAgentStatus = {}));
120
+ /** Known values of {@link EndpointType} that the service accepts. */
121
+ exports.KnownEndpointType = void 0;
122
+ (function (KnownEndpointType) {
123
+ /** AzureStorageBlobContainer */
124
+ KnownEndpointType["AzureStorageBlobContainer"] = "AzureStorageBlobContainer";
125
+ /** NfsMount */
126
+ KnownEndpointType["NfsMount"] = "NfsMount";
127
+ })(exports.KnownEndpointType || (exports.KnownEndpointType = {}));
128
+ /** Known values of {@link CopyMode} that the service accepts. */
129
+ exports.KnownCopyMode = void 0;
130
+ (function (KnownCopyMode) {
131
+ /** Additive */
132
+ KnownCopyMode["Additive"] = "Additive";
133
+ /** Mirror */
134
+ KnownCopyMode["Mirror"] = "Mirror";
135
+ })(exports.KnownCopyMode || (exports.KnownCopyMode = {}));
136
+ /** Known values of {@link JobRunStatus} that the service accepts. */
137
+ exports.KnownJobRunStatus = void 0;
138
+ (function (KnownJobRunStatus) {
139
+ /** Queued */
140
+ KnownJobRunStatus["Queued"] = "Queued";
141
+ /** Started */
142
+ KnownJobRunStatus["Started"] = "Started";
143
+ /** Running */
144
+ KnownJobRunStatus["Running"] = "Running";
145
+ /** CancelRequested */
146
+ KnownJobRunStatus["CancelRequested"] = "CancelRequested";
147
+ /** Canceling */
148
+ KnownJobRunStatus["Canceling"] = "Canceling";
149
+ /** Canceled */
150
+ KnownJobRunStatus["Canceled"] = "Canceled";
151
+ /** Failed */
152
+ KnownJobRunStatus["Failed"] = "Failed";
153
+ /** Succeeded */
154
+ KnownJobRunStatus["Succeeded"] = "Succeeded";
155
+ })(exports.KnownJobRunStatus || (exports.KnownJobRunStatus = {}));
156
+ /** Known values of {@link JobRunScanStatus} that the service accepts. */
157
+ exports.KnownJobRunScanStatus = void 0;
158
+ (function (KnownJobRunScanStatus) {
159
+ /** NotStarted */
160
+ KnownJobRunScanStatus["NotStarted"] = "NotStarted";
161
+ /** Scanning */
162
+ KnownJobRunScanStatus["Scanning"] = "Scanning";
163
+ /** Completed */
164
+ KnownJobRunScanStatus["Completed"] = "Completed";
165
+ })(exports.KnownJobRunScanStatus || (exports.KnownJobRunScanStatus = {}));
166
+ /** Known values of {@link NfsVersion} that the service accepts. */
167
+ exports.KnownNfsVersion = void 0;
168
+ (function (KnownNfsVersion) {
169
+ /** NFSauto */
170
+ KnownNfsVersion["NFSauto"] = "NFSauto";
171
+ /** NFSv3 */
172
+ KnownNfsVersion["NFSv3"] = "NFSv3";
173
+ /** NFSv4 */
174
+ KnownNfsVersion["NFSv4"] = "NFSv4";
175
+ })(exports.KnownNfsVersion || (exports.KnownNfsVersion = {}));
176
+
177
+ /*
178
+ * Copyright (c) Microsoft Corporation.
179
+ * Licensed under the MIT License.
180
+ *
181
+ * Code generated by Microsoft (R) AutoRest Code Generator.
182
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
183
+ */
184
+ const OperationListResult = {
185
+ type: {
186
+ name: "Composite",
187
+ className: "OperationListResult",
188
+ modelProperties: {
189
+ value: {
190
+ serializedName: "value",
191
+ readOnly: true,
192
+ type: {
193
+ name: "Sequence",
194
+ element: {
195
+ type: {
196
+ name: "Composite",
197
+ className: "Operation"
198
+ }
199
+ }
200
+ }
201
+ },
202
+ nextLink: {
203
+ serializedName: "nextLink",
204
+ readOnly: true,
205
+ type: {
206
+ name: "String"
207
+ }
208
+ }
209
+ }
210
+ }
211
+ };
212
+ const Operation = {
213
+ type: {
214
+ name: "Composite",
215
+ className: "Operation",
216
+ modelProperties: {
217
+ name: {
218
+ serializedName: "name",
219
+ readOnly: true,
220
+ type: {
221
+ name: "String"
222
+ }
223
+ },
224
+ isDataAction: {
225
+ serializedName: "isDataAction",
226
+ readOnly: true,
227
+ type: {
228
+ name: "Boolean"
229
+ }
230
+ },
231
+ display: {
232
+ serializedName: "display",
233
+ type: {
234
+ name: "Composite",
235
+ className: "OperationDisplay"
236
+ }
237
+ },
238
+ origin: {
239
+ serializedName: "origin",
240
+ readOnly: true,
241
+ type: {
242
+ name: "String"
243
+ }
244
+ },
245
+ actionType: {
246
+ serializedName: "actionType",
247
+ readOnly: true,
248
+ type: {
249
+ name: "String"
250
+ }
251
+ }
252
+ }
253
+ }
254
+ };
255
+ const OperationDisplay = {
256
+ type: {
257
+ name: "Composite",
258
+ className: "OperationDisplay",
259
+ modelProperties: {
260
+ provider: {
261
+ serializedName: "provider",
262
+ readOnly: true,
263
+ type: {
264
+ name: "String"
265
+ }
266
+ },
267
+ resource: {
268
+ serializedName: "resource",
269
+ readOnly: true,
270
+ type: {
271
+ name: "String"
272
+ }
273
+ },
274
+ operation: {
275
+ serializedName: "operation",
276
+ readOnly: true,
277
+ type: {
278
+ name: "String"
279
+ }
280
+ },
281
+ description: {
282
+ serializedName: "description",
283
+ readOnly: true,
284
+ type: {
285
+ name: "String"
286
+ }
287
+ }
288
+ }
289
+ }
290
+ };
291
+ const ErrorResponse = {
292
+ type: {
293
+ name: "Composite",
294
+ className: "ErrorResponse",
295
+ modelProperties: {
296
+ error: {
297
+ serializedName: "error",
298
+ type: {
299
+ name: "Composite",
300
+ className: "ErrorDetail"
301
+ }
302
+ }
303
+ }
304
+ }
305
+ };
306
+ const ErrorDetail = {
307
+ type: {
308
+ name: "Composite",
309
+ className: "ErrorDetail",
310
+ modelProperties: {
311
+ code: {
312
+ serializedName: "code",
313
+ readOnly: true,
314
+ type: {
315
+ name: "String"
316
+ }
317
+ },
318
+ message: {
319
+ serializedName: "message",
320
+ readOnly: true,
321
+ type: {
322
+ name: "String"
323
+ }
324
+ },
325
+ target: {
326
+ serializedName: "target",
327
+ readOnly: true,
328
+ type: {
329
+ name: "String"
330
+ }
331
+ },
332
+ details: {
333
+ serializedName: "details",
334
+ readOnly: true,
335
+ type: {
336
+ name: "Sequence",
337
+ element: {
338
+ type: {
339
+ name: "Composite",
340
+ className: "ErrorDetail"
341
+ }
342
+ }
343
+ }
344
+ },
345
+ additionalInfo: {
346
+ serializedName: "additionalInfo",
347
+ readOnly: true,
348
+ type: {
349
+ name: "Sequence",
350
+ element: {
351
+ type: {
352
+ name: "Composite",
353
+ className: "ErrorAdditionalInfo"
354
+ }
355
+ }
356
+ }
357
+ }
358
+ }
359
+ }
360
+ };
361
+ const ErrorAdditionalInfo = {
362
+ type: {
363
+ name: "Composite",
364
+ className: "ErrorAdditionalInfo",
365
+ modelProperties: {
366
+ type: {
367
+ serializedName: "type",
368
+ readOnly: true,
369
+ type: {
370
+ name: "String"
371
+ }
372
+ },
373
+ info: {
374
+ serializedName: "info",
375
+ readOnly: true,
376
+ type: {
377
+ name: "Dictionary",
378
+ value: { type: { name: "any" } }
379
+ }
380
+ }
381
+ }
382
+ }
383
+ };
384
+ const StorageMoverList = {
385
+ type: {
386
+ name: "Composite",
387
+ className: "StorageMoverList",
388
+ modelProperties: {
389
+ value: {
390
+ serializedName: "value",
391
+ readOnly: true,
392
+ type: {
393
+ name: "Sequence",
394
+ element: {
395
+ type: {
396
+ name: "Composite",
397
+ className: "StorageMover"
398
+ }
399
+ }
400
+ }
401
+ },
402
+ nextLink: {
403
+ serializedName: "nextLink",
404
+ readOnly: true,
405
+ type: {
406
+ name: "String"
407
+ }
408
+ }
409
+ }
410
+ }
411
+ };
412
+ const SystemData = {
413
+ type: {
414
+ name: "Composite",
415
+ className: "SystemData",
416
+ modelProperties: {
417
+ createdBy: {
418
+ serializedName: "createdBy",
419
+ type: {
420
+ name: "String"
421
+ }
422
+ },
423
+ createdByType: {
424
+ serializedName: "createdByType",
425
+ type: {
426
+ name: "String"
427
+ }
428
+ },
429
+ createdAt: {
430
+ serializedName: "createdAt",
431
+ type: {
432
+ name: "DateTime"
433
+ }
434
+ },
435
+ lastModifiedBy: {
436
+ serializedName: "lastModifiedBy",
437
+ type: {
438
+ name: "String"
439
+ }
440
+ },
441
+ lastModifiedByType: {
442
+ serializedName: "lastModifiedByType",
443
+ type: {
444
+ name: "String"
445
+ }
446
+ },
447
+ lastModifiedAt: {
448
+ serializedName: "lastModifiedAt",
449
+ type: {
450
+ name: "DateTime"
451
+ }
452
+ }
453
+ }
454
+ }
455
+ };
456
+ const Resource = {
457
+ type: {
458
+ name: "Composite",
459
+ className: "Resource",
460
+ modelProperties: {
461
+ id: {
462
+ serializedName: "id",
463
+ readOnly: true,
464
+ type: {
465
+ name: "String"
466
+ }
467
+ },
468
+ name: {
469
+ serializedName: "name",
470
+ readOnly: true,
471
+ type: {
472
+ name: "String"
473
+ }
474
+ },
475
+ type: {
476
+ serializedName: "type",
477
+ readOnly: true,
478
+ type: {
479
+ name: "String"
480
+ }
481
+ }
482
+ }
483
+ }
484
+ };
485
+ const StorageMoverUpdateParameters = {
486
+ type: {
487
+ name: "Composite",
488
+ className: "StorageMoverUpdateParameters",
489
+ modelProperties: {
490
+ tags: {
491
+ serializedName: "tags",
492
+ type: {
493
+ name: "Dictionary",
494
+ value: { type: { name: "String" } }
495
+ }
496
+ },
497
+ description: {
498
+ serializedName: "properties.description",
499
+ type: {
500
+ name: "String"
501
+ }
502
+ }
503
+ }
504
+ }
505
+ };
506
+ const AgentList = {
507
+ type: {
508
+ name: "Composite",
509
+ className: "AgentList",
510
+ modelProperties: {
511
+ value: {
512
+ serializedName: "value",
513
+ readOnly: true,
514
+ type: {
515
+ name: "Sequence",
516
+ element: {
517
+ type: {
518
+ name: "Composite",
519
+ className: "Agent"
520
+ }
521
+ }
522
+ }
523
+ },
524
+ nextLink: {
525
+ serializedName: "nextLink",
526
+ readOnly: true,
527
+ type: {
528
+ name: "String"
529
+ }
530
+ }
531
+ }
532
+ }
533
+ };
534
+ const AgentPropertiesErrorDetails = {
535
+ type: {
536
+ name: "Composite",
537
+ className: "AgentPropertiesErrorDetails",
538
+ modelProperties: {
539
+ code: {
540
+ serializedName: "code",
541
+ type: {
542
+ name: "String"
543
+ }
544
+ },
545
+ message: {
546
+ serializedName: "message",
547
+ type: {
548
+ name: "String"
549
+ }
550
+ }
551
+ }
552
+ }
553
+ };
554
+ const AgentUpdateParameters = {
555
+ type: {
556
+ name: "Composite",
557
+ className: "AgentUpdateParameters",
558
+ modelProperties: {
559
+ description: {
560
+ serializedName: "properties.description",
561
+ type: {
562
+ name: "String"
563
+ }
564
+ }
565
+ }
566
+ }
567
+ };
568
+ const EndpointList = {
569
+ type: {
570
+ name: "Composite",
571
+ className: "EndpointList",
572
+ modelProperties: {
573
+ value: {
574
+ serializedName: "value",
575
+ readOnly: true,
576
+ type: {
577
+ name: "Sequence",
578
+ element: {
579
+ type: {
580
+ name: "Composite",
581
+ className: "Endpoint"
582
+ }
583
+ }
584
+ }
585
+ },
586
+ nextLink: {
587
+ serializedName: "nextLink",
588
+ readOnly: true,
589
+ type: {
590
+ name: "String"
591
+ }
592
+ }
593
+ }
594
+ }
595
+ };
596
+ const EndpointBaseProperties = {
597
+ type: {
598
+ name: "Composite",
599
+ className: "EndpointBaseProperties",
600
+ uberParent: "EndpointBaseProperties",
601
+ polymorphicDiscriminator: {
602
+ serializedName: "endpointType",
603
+ clientName: "endpointType"
604
+ },
605
+ modelProperties: {
606
+ endpointType: {
607
+ serializedName: "endpointType",
608
+ required: true,
609
+ type: {
610
+ name: "String"
611
+ }
612
+ },
613
+ description: {
614
+ serializedName: "description",
615
+ type: {
616
+ name: "String"
617
+ }
618
+ },
619
+ provisioningState: {
620
+ serializedName: "provisioningState",
621
+ readOnly: true,
622
+ type: {
623
+ name: "String"
624
+ }
625
+ }
626
+ }
627
+ }
628
+ };
629
+ const EndpointBaseUpdateParameters = {
630
+ type: {
631
+ name: "Composite",
632
+ className: "EndpointBaseUpdateParameters",
633
+ modelProperties: {
634
+ properties: {
635
+ serializedName: "properties",
636
+ type: {
637
+ name: "Composite",
638
+ className: "EndpointBaseUpdateProperties"
639
+ }
640
+ }
641
+ }
642
+ }
643
+ };
644
+ const EndpointBaseUpdateProperties = {
645
+ type: {
646
+ name: "Composite",
647
+ className: "EndpointBaseUpdateProperties",
648
+ modelProperties: {
649
+ description: {
650
+ serializedName: "description",
651
+ type: {
652
+ name: "String"
653
+ }
654
+ }
655
+ }
656
+ }
657
+ };
658
+ const ProjectList = {
659
+ type: {
660
+ name: "Composite",
661
+ className: "ProjectList",
662
+ modelProperties: {
663
+ value: {
664
+ serializedName: "value",
665
+ readOnly: true,
666
+ type: {
667
+ name: "Sequence",
668
+ element: {
669
+ type: {
670
+ name: "Composite",
671
+ className: "Project"
672
+ }
673
+ }
674
+ }
675
+ },
676
+ nextLink: {
677
+ serializedName: "nextLink",
678
+ readOnly: true,
679
+ type: {
680
+ name: "String"
681
+ }
682
+ }
683
+ }
684
+ }
685
+ };
686
+ const ProjectUpdateParameters = {
687
+ type: {
688
+ name: "Composite",
689
+ className: "ProjectUpdateParameters",
690
+ modelProperties: {
691
+ description: {
692
+ serializedName: "properties.description",
693
+ type: {
694
+ name: "String"
695
+ }
696
+ }
697
+ }
698
+ }
699
+ };
700
+ const JobDefinitionList = {
701
+ type: {
702
+ name: "Composite",
703
+ className: "JobDefinitionList",
704
+ modelProperties: {
705
+ value: {
706
+ serializedName: "value",
707
+ readOnly: true,
708
+ type: {
709
+ name: "Sequence",
710
+ element: {
711
+ type: {
712
+ name: "Composite",
713
+ className: "JobDefinition"
714
+ }
715
+ }
716
+ }
717
+ },
718
+ nextLink: {
719
+ serializedName: "nextLink",
720
+ readOnly: true,
721
+ type: {
722
+ name: "String"
723
+ }
724
+ }
725
+ }
726
+ }
727
+ };
728
+ const JobDefinitionUpdateParameters = {
729
+ type: {
730
+ name: "Composite",
731
+ className: "JobDefinitionUpdateParameters",
732
+ modelProperties: {
733
+ description: {
734
+ serializedName: "properties.description",
735
+ type: {
736
+ name: "String"
737
+ }
738
+ },
739
+ copyMode: {
740
+ serializedName: "properties.copyMode",
741
+ type: {
742
+ name: "String"
743
+ }
744
+ },
745
+ agentName: {
746
+ serializedName: "properties.agentName",
747
+ type: {
748
+ name: "String"
749
+ }
750
+ }
751
+ }
752
+ }
753
+ };
754
+ const JobRunResourceId = {
755
+ type: {
756
+ name: "Composite",
757
+ className: "JobRunResourceId",
758
+ modelProperties: {
759
+ jobRunResourceId: {
760
+ serializedName: "jobRunResourceId",
761
+ readOnly: true,
762
+ type: {
763
+ name: "String"
764
+ }
765
+ }
766
+ }
767
+ }
768
+ };
769
+ const JobRunList = {
770
+ type: {
771
+ name: "Composite",
772
+ className: "JobRunList",
773
+ modelProperties: {
774
+ value: {
775
+ serializedName: "value",
776
+ readOnly: true,
777
+ type: {
778
+ name: "Sequence",
779
+ element: {
780
+ type: {
781
+ name: "Composite",
782
+ className: "JobRun"
783
+ }
784
+ }
785
+ }
786
+ },
787
+ nextLink: {
788
+ serializedName: "nextLink",
789
+ readOnly: true,
790
+ type: {
791
+ name: "String"
792
+ }
793
+ }
794
+ }
795
+ }
796
+ };
797
+ const JobRunError = {
798
+ type: {
799
+ name: "Composite",
800
+ className: "JobRunError",
801
+ modelProperties: {
802
+ code: {
803
+ serializedName: "code",
804
+ type: {
805
+ name: "String"
806
+ }
807
+ },
808
+ message: {
809
+ serializedName: "message",
810
+ type: {
811
+ name: "String"
812
+ }
813
+ },
814
+ target: {
815
+ serializedName: "target",
816
+ type: {
817
+ name: "String"
818
+ }
819
+ }
820
+ }
821
+ }
822
+ };
823
+ const TrackedResource = {
824
+ type: {
825
+ name: "Composite",
826
+ className: "TrackedResource",
827
+ modelProperties: Object.assign(Object.assign({}, Resource.type.modelProperties), { tags: {
828
+ serializedName: "tags",
829
+ type: {
830
+ name: "Dictionary",
831
+ value: { type: { name: "String" } }
832
+ }
833
+ }, location: {
834
+ serializedName: "location",
835
+ required: true,
836
+ type: {
837
+ name: "String"
838
+ }
839
+ } })
840
+ }
841
+ };
842
+ const ProxyResource = {
843
+ type: {
844
+ name: "Composite",
845
+ className: "ProxyResource",
846
+ modelProperties: Object.assign({}, Resource.type.modelProperties)
847
+ }
848
+ };
849
+ const AzureStorageBlobContainerEndpointProperties = {
850
+ serializedName: "AzureStorageBlobContainer",
851
+ type: {
852
+ name: "Composite",
853
+ className: "AzureStorageBlobContainerEndpointProperties",
854
+ uberParent: "EndpointBaseProperties",
855
+ polymorphicDiscriminator: EndpointBaseProperties.type.polymorphicDiscriminator,
856
+ modelProperties: Object.assign(Object.assign({}, EndpointBaseProperties.type.modelProperties), { storageAccountResourceId: {
857
+ serializedName: "storageAccountResourceId",
858
+ required: true,
859
+ type: {
860
+ name: "String"
861
+ }
862
+ }, blobContainerName: {
863
+ serializedName: "blobContainerName",
864
+ required: true,
865
+ type: {
866
+ name: "String"
867
+ }
868
+ } })
869
+ }
870
+ };
871
+ const NfsMountEndpointProperties = {
872
+ serializedName: "NfsMount",
873
+ type: {
874
+ name: "Composite",
875
+ className: "NfsMountEndpointProperties",
876
+ uberParent: "EndpointBaseProperties",
877
+ polymorphicDiscriminator: EndpointBaseProperties.type.polymorphicDiscriminator,
878
+ modelProperties: Object.assign(Object.assign({}, EndpointBaseProperties.type.modelProperties), { host: {
879
+ serializedName: "host",
880
+ required: true,
881
+ type: {
882
+ name: "String"
883
+ }
884
+ }, nfsVersion: {
885
+ serializedName: "nfsVersion",
886
+ type: {
887
+ name: "String"
888
+ }
889
+ }, export: {
890
+ serializedName: "export",
891
+ required: true,
892
+ type: {
893
+ name: "String"
894
+ }
895
+ } })
896
+ }
897
+ };
898
+ const AzureStorageBlobContainerEndpointUpdateProperties = {
899
+ type: {
900
+ name: "Composite",
901
+ className: "AzureStorageBlobContainerEndpointUpdateProperties",
902
+ modelProperties: Object.assign({}, EndpointBaseUpdateProperties.type.modelProperties)
903
+ }
904
+ };
905
+ const NfsMountEndpointUpdateProperties = {
906
+ type: {
907
+ name: "Composite",
908
+ className: "NfsMountEndpointUpdateProperties",
909
+ modelProperties: Object.assign({}, EndpointBaseUpdateProperties.type.modelProperties)
910
+ }
911
+ };
912
+ const StorageMover = {
913
+ type: {
914
+ name: "Composite",
915
+ className: "StorageMover",
916
+ modelProperties: Object.assign(Object.assign({}, TrackedResource.type.modelProperties), { systemData: {
917
+ serializedName: "systemData",
918
+ type: {
919
+ name: "Composite",
920
+ className: "SystemData"
921
+ }
922
+ }, description: {
923
+ serializedName: "properties.description",
924
+ type: {
925
+ name: "String"
926
+ }
927
+ }, provisioningState: {
928
+ serializedName: "properties.provisioningState",
929
+ readOnly: true,
930
+ type: {
931
+ name: "String"
932
+ }
933
+ } })
934
+ }
935
+ };
936
+ const Agent = {
937
+ type: {
938
+ name: "Composite",
939
+ className: "Agent",
940
+ modelProperties: Object.assign(Object.assign({}, ProxyResource.type.modelProperties), { systemData: {
941
+ serializedName: "systemData",
942
+ type: {
943
+ name: "Composite",
944
+ className: "SystemData"
945
+ }
946
+ }, description: {
947
+ serializedName: "properties.description",
948
+ type: {
949
+ name: "String"
950
+ }
951
+ }, agentVersion: {
952
+ serializedName: "properties.agentVersion",
953
+ readOnly: true,
954
+ type: {
955
+ name: "String"
956
+ }
957
+ }, arcResourceId: {
958
+ serializedName: "properties.arcResourceId",
959
+ required: true,
960
+ type: {
961
+ name: "String"
962
+ }
963
+ }, arcVmUuid: {
964
+ serializedName: "properties.arcVmUuid",
965
+ required: true,
966
+ type: {
967
+ name: "String"
968
+ }
969
+ }, agentStatus: {
970
+ serializedName: "properties.agentStatus",
971
+ readOnly: true,
972
+ type: {
973
+ name: "String"
974
+ }
975
+ }, lastStatusUpdate: {
976
+ serializedName: "properties.lastStatusUpdate",
977
+ readOnly: true,
978
+ type: {
979
+ name: "DateTime"
980
+ }
981
+ }, localIPAddress: {
982
+ serializedName: "properties.localIPAddress",
983
+ readOnly: true,
984
+ type: {
985
+ name: "String"
986
+ }
987
+ }, memoryInMB: {
988
+ serializedName: "properties.memoryInMB",
989
+ readOnly: true,
990
+ type: {
991
+ name: "Number"
992
+ }
993
+ }, numberOfCores: {
994
+ serializedName: "properties.numberOfCores",
995
+ readOnly: true,
996
+ type: {
997
+ name: "Number"
998
+ }
999
+ }, uptimeInSeconds: {
1000
+ serializedName: "properties.uptimeInSeconds",
1001
+ readOnly: true,
1002
+ type: {
1003
+ name: "Number"
1004
+ }
1005
+ }, errorDetails: {
1006
+ serializedName: "properties.errorDetails",
1007
+ type: {
1008
+ name: "Composite",
1009
+ className: "AgentPropertiesErrorDetails"
1010
+ }
1011
+ }, provisioningState: {
1012
+ serializedName: "properties.provisioningState",
1013
+ readOnly: true,
1014
+ type: {
1015
+ name: "String"
1016
+ }
1017
+ } })
1018
+ }
1019
+ };
1020
+ const Endpoint = {
1021
+ type: {
1022
+ name: "Composite",
1023
+ className: "Endpoint",
1024
+ modelProperties: Object.assign(Object.assign({}, ProxyResource.type.modelProperties), { properties: {
1025
+ serializedName: "properties",
1026
+ type: {
1027
+ name: "Composite",
1028
+ className: "EndpointBaseProperties"
1029
+ }
1030
+ }, systemData: {
1031
+ serializedName: "systemData",
1032
+ type: {
1033
+ name: "Composite",
1034
+ className: "SystemData"
1035
+ }
1036
+ } })
1037
+ }
1038
+ };
1039
+ const Project = {
1040
+ type: {
1041
+ name: "Composite",
1042
+ className: "Project",
1043
+ modelProperties: Object.assign(Object.assign({}, ProxyResource.type.modelProperties), { systemData: {
1044
+ serializedName: "systemData",
1045
+ type: {
1046
+ name: "Composite",
1047
+ className: "SystemData"
1048
+ }
1049
+ }, description: {
1050
+ serializedName: "properties.description",
1051
+ type: {
1052
+ name: "String"
1053
+ }
1054
+ }, provisioningState: {
1055
+ serializedName: "properties.provisioningState",
1056
+ readOnly: true,
1057
+ type: {
1058
+ name: "String"
1059
+ }
1060
+ } })
1061
+ }
1062
+ };
1063
+ const JobDefinition = {
1064
+ type: {
1065
+ name: "Composite",
1066
+ className: "JobDefinition",
1067
+ modelProperties: Object.assign(Object.assign({}, ProxyResource.type.modelProperties), { systemData: {
1068
+ serializedName: "systemData",
1069
+ type: {
1070
+ name: "Composite",
1071
+ className: "SystemData"
1072
+ }
1073
+ }, description: {
1074
+ serializedName: "properties.description",
1075
+ type: {
1076
+ name: "String"
1077
+ }
1078
+ }, copyMode: {
1079
+ serializedName: "properties.copyMode",
1080
+ required: true,
1081
+ type: {
1082
+ name: "String"
1083
+ }
1084
+ }, sourceName: {
1085
+ serializedName: "properties.sourceName",
1086
+ required: true,
1087
+ type: {
1088
+ name: "String"
1089
+ }
1090
+ }, sourceResourceId: {
1091
+ serializedName: "properties.sourceResourceId",
1092
+ readOnly: true,
1093
+ type: {
1094
+ name: "String"
1095
+ }
1096
+ }, sourceSubpath: {
1097
+ serializedName: "properties.sourceSubpath",
1098
+ type: {
1099
+ name: "String"
1100
+ }
1101
+ }, targetName: {
1102
+ serializedName: "properties.targetName",
1103
+ required: true,
1104
+ type: {
1105
+ name: "String"
1106
+ }
1107
+ }, targetResourceId: {
1108
+ serializedName: "properties.targetResourceId",
1109
+ readOnly: true,
1110
+ type: {
1111
+ name: "String"
1112
+ }
1113
+ }, targetSubpath: {
1114
+ serializedName: "properties.targetSubpath",
1115
+ type: {
1116
+ name: "String"
1117
+ }
1118
+ }, latestJobRunName: {
1119
+ serializedName: "properties.latestJobRunName",
1120
+ readOnly: true,
1121
+ type: {
1122
+ name: "String"
1123
+ }
1124
+ }, latestJobRunResourceId: {
1125
+ serializedName: "properties.latestJobRunResourceId",
1126
+ readOnly: true,
1127
+ type: {
1128
+ name: "String"
1129
+ }
1130
+ }, latestJobRunStatus: {
1131
+ serializedName: "properties.latestJobRunStatus",
1132
+ readOnly: true,
1133
+ type: {
1134
+ name: "String"
1135
+ }
1136
+ }, agentName: {
1137
+ serializedName: "properties.agentName",
1138
+ type: {
1139
+ name: "String"
1140
+ }
1141
+ }, agentResourceId: {
1142
+ serializedName: "properties.agentResourceId",
1143
+ readOnly: true,
1144
+ type: {
1145
+ name: "String"
1146
+ }
1147
+ }, provisioningState: {
1148
+ serializedName: "properties.provisioningState",
1149
+ readOnly: true,
1150
+ type: {
1151
+ name: "String"
1152
+ }
1153
+ } })
1154
+ }
1155
+ };
1156
+ const JobRun = {
1157
+ type: {
1158
+ name: "Composite",
1159
+ className: "JobRun",
1160
+ modelProperties: Object.assign(Object.assign({}, ProxyResource.type.modelProperties), { systemData: {
1161
+ serializedName: "systemData",
1162
+ type: {
1163
+ name: "Composite",
1164
+ className: "SystemData"
1165
+ }
1166
+ }, status: {
1167
+ serializedName: "properties.status",
1168
+ readOnly: true,
1169
+ type: {
1170
+ name: "String"
1171
+ }
1172
+ }, scanStatus: {
1173
+ serializedName: "properties.scanStatus",
1174
+ readOnly: true,
1175
+ type: {
1176
+ name: "String"
1177
+ }
1178
+ }, agentName: {
1179
+ serializedName: "properties.agentName",
1180
+ readOnly: true,
1181
+ type: {
1182
+ name: "String"
1183
+ }
1184
+ }, agentResourceId: {
1185
+ serializedName: "properties.agentResourceId",
1186
+ readOnly: true,
1187
+ type: {
1188
+ name: "String"
1189
+ }
1190
+ }, executionStartTime: {
1191
+ serializedName: "properties.executionStartTime",
1192
+ readOnly: true,
1193
+ type: {
1194
+ name: "DateTime"
1195
+ }
1196
+ }, executionEndTime: {
1197
+ serializedName: "properties.executionEndTime",
1198
+ readOnly: true,
1199
+ type: {
1200
+ name: "DateTime"
1201
+ }
1202
+ }, lastStatusUpdate: {
1203
+ serializedName: "properties.lastStatusUpdate",
1204
+ readOnly: true,
1205
+ type: {
1206
+ name: "DateTime"
1207
+ }
1208
+ }, itemsScanned: {
1209
+ serializedName: "properties.itemsScanned",
1210
+ readOnly: true,
1211
+ type: {
1212
+ name: "Number"
1213
+ }
1214
+ }, itemsExcluded: {
1215
+ serializedName: "properties.itemsExcluded",
1216
+ readOnly: true,
1217
+ type: {
1218
+ name: "Number"
1219
+ }
1220
+ }, itemsUnsupported: {
1221
+ serializedName: "properties.itemsUnsupported",
1222
+ readOnly: true,
1223
+ type: {
1224
+ name: "Number"
1225
+ }
1226
+ }, itemsNoTransferNeeded: {
1227
+ serializedName: "properties.itemsNoTransferNeeded",
1228
+ readOnly: true,
1229
+ type: {
1230
+ name: "Number"
1231
+ }
1232
+ }, itemsFailed: {
1233
+ serializedName: "properties.itemsFailed",
1234
+ readOnly: true,
1235
+ type: {
1236
+ name: "Number"
1237
+ }
1238
+ }, itemsTransferred: {
1239
+ serializedName: "properties.itemsTransferred",
1240
+ readOnly: true,
1241
+ type: {
1242
+ name: "Number"
1243
+ }
1244
+ }, bytesScanned: {
1245
+ serializedName: "properties.bytesScanned",
1246
+ readOnly: true,
1247
+ type: {
1248
+ name: "Number"
1249
+ }
1250
+ }, bytesExcluded: {
1251
+ serializedName: "properties.bytesExcluded",
1252
+ readOnly: true,
1253
+ type: {
1254
+ name: "Number"
1255
+ }
1256
+ }, bytesUnsupported: {
1257
+ serializedName: "properties.bytesUnsupported",
1258
+ readOnly: true,
1259
+ type: {
1260
+ name: "Number"
1261
+ }
1262
+ }, bytesNoTransferNeeded: {
1263
+ serializedName: "properties.bytesNoTransferNeeded",
1264
+ readOnly: true,
1265
+ type: {
1266
+ name: "Number"
1267
+ }
1268
+ }, bytesFailed: {
1269
+ serializedName: "properties.bytesFailed",
1270
+ readOnly: true,
1271
+ type: {
1272
+ name: "Number"
1273
+ }
1274
+ }, bytesTransferred: {
1275
+ serializedName: "properties.bytesTransferred",
1276
+ readOnly: true,
1277
+ type: {
1278
+ name: "Number"
1279
+ }
1280
+ }, sourceName: {
1281
+ serializedName: "properties.sourceName",
1282
+ readOnly: true,
1283
+ type: {
1284
+ name: "String"
1285
+ }
1286
+ }, sourceResourceId: {
1287
+ serializedName: "properties.sourceResourceId",
1288
+ readOnly: true,
1289
+ type: {
1290
+ name: "String"
1291
+ }
1292
+ }, sourceProperties: {
1293
+ serializedName: "properties.sourceProperties",
1294
+ readOnly: true,
1295
+ type: {
1296
+ name: "Dictionary",
1297
+ value: { type: { name: "any" } }
1298
+ }
1299
+ }, targetName: {
1300
+ serializedName: "properties.targetName",
1301
+ readOnly: true,
1302
+ type: {
1303
+ name: "String"
1304
+ }
1305
+ }, targetResourceId: {
1306
+ serializedName: "properties.targetResourceId",
1307
+ readOnly: true,
1308
+ type: {
1309
+ name: "String"
1310
+ }
1311
+ }, targetProperties: {
1312
+ serializedName: "properties.targetProperties",
1313
+ readOnly: true,
1314
+ type: {
1315
+ name: "Dictionary",
1316
+ value: { type: { name: "any" } }
1317
+ }
1318
+ }, jobDefinitionProperties: {
1319
+ serializedName: "properties.jobDefinitionProperties",
1320
+ readOnly: true,
1321
+ type: {
1322
+ name: "Dictionary",
1323
+ value: { type: { name: "any" } }
1324
+ }
1325
+ }, error: {
1326
+ serializedName: "properties.error",
1327
+ type: {
1328
+ name: "Composite",
1329
+ className: "JobRunError"
1330
+ }
1331
+ }, provisioningState: {
1332
+ serializedName: "properties.provisioningState",
1333
+ readOnly: true,
1334
+ type: {
1335
+ name: "String"
1336
+ }
1337
+ } })
1338
+ }
1339
+ };
1340
+ let discriminators = {
1341
+ EndpointBaseProperties: EndpointBaseProperties,
1342
+ "EndpointBaseProperties.AzureStorageBlobContainer": AzureStorageBlobContainerEndpointProperties,
1343
+ "EndpointBaseProperties.NfsMount": NfsMountEndpointProperties
1344
+ };
1345
+
1346
+ var Mappers = /*#__PURE__*/Object.freeze({
1347
+ __proto__: null,
1348
+ OperationListResult: OperationListResult,
1349
+ Operation: Operation,
1350
+ OperationDisplay: OperationDisplay,
1351
+ ErrorResponse: ErrorResponse,
1352
+ ErrorDetail: ErrorDetail,
1353
+ ErrorAdditionalInfo: ErrorAdditionalInfo,
1354
+ StorageMoverList: StorageMoverList,
1355
+ SystemData: SystemData,
1356
+ Resource: Resource,
1357
+ StorageMoverUpdateParameters: StorageMoverUpdateParameters,
1358
+ AgentList: AgentList,
1359
+ AgentPropertiesErrorDetails: AgentPropertiesErrorDetails,
1360
+ AgentUpdateParameters: AgentUpdateParameters,
1361
+ EndpointList: EndpointList,
1362
+ EndpointBaseProperties: EndpointBaseProperties,
1363
+ EndpointBaseUpdateParameters: EndpointBaseUpdateParameters,
1364
+ EndpointBaseUpdateProperties: EndpointBaseUpdateProperties,
1365
+ ProjectList: ProjectList,
1366
+ ProjectUpdateParameters: ProjectUpdateParameters,
1367
+ JobDefinitionList: JobDefinitionList,
1368
+ JobDefinitionUpdateParameters: JobDefinitionUpdateParameters,
1369
+ JobRunResourceId: JobRunResourceId,
1370
+ JobRunList: JobRunList,
1371
+ JobRunError: JobRunError,
1372
+ TrackedResource: TrackedResource,
1373
+ ProxyResource: ProxyResource,
1374
+ AzureStorageBlobContainerEndpointProperties: AzureStorageBlobContainerEndpointProperties,
1375
+ NfsMountEndpointProperties: NfsMountEndpointProperties,
1376
+ AzureStorageBlobContainerEndpointUpdateProperties: AzureStorageBlobContainerEndpointUpdateProperties,
1377
+ NfsMountEndpointUpdateProperties: NfsMountEndpointUpdateProperties,
1378
+ StorageMover: StorageMover,
1379
+ Agent: Agent,
1380
+ Endpoint: Endpoint,
1381
+ Project: Project,
1382
+ JobDefinition: JobDefinition,
1383
+ JobRun: JobRun,
1384
+ discriminators: discriminators
1385
+ });
1386
+
1387
+ /*
1388
+ * Copyright (c) Microsoft Corporation.
1389
+ * Licensed under the MIT License.
1390
+ *
1391
+ * Code generated by Microsoft (R) AutoRest Code Generator.
1392
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
1393
+ */
1394
+ const accept = {
1395
+ parameterPath: "accept",
1396
+ mapper: {
1397
+ defaultValue: "application/json",
1398
+ isConstant: true,
1399
+ serializedName: "Accept",
1400
+ type: {
1401
+ name: "String"
1402
+ }
1403
+ }
1404
+ };
1405
+ const $host = {
1406
+ parameterPath: "$host",
1407
+ mapper: {
1408
+ serializedName: "$host",
1409
+ required: true,
1410
+ type: {
1411
+ name: "String"
1412
+ }
1413
+ },
1414
+ skipEncoding: true
1415
+ };
1416
+ const apiVersion = {
1417
+ parameterPath: "apiVersion",
1418
+ mapper: {
1419
+ defaultValue: "2022-07-01-preview",
1420
+ isConstant: true,
1421
+ serializedName: "api-version",
1422
+ type: {
1423
+ name: "String"
1424
+ }
1425
+ }
1426
+ };
1427
+ const nextLink = {
1428
+ parameterPath: "nextLink",
1429
+ mapper: {
1430
+ serializedName: "nextLink",
1431
+ required: true,
1432
+ type: {
1433
+ name: "String"
1434
+ }
1435
+ },
1436
+ skipEncoding: true
1437
+ };
1438
+ const subscriptionId = {
1439
+ parameterPath: "subscriptionId",
1440
+ mapper: {
1441
+ constraints: {
1442
+ MinLength: 1
1443
+ },
1444
+ serializedName: "subscriptionId",
1445
+ required: true,
1446
+ type: {
1447
+ name: "String"
1448
+ }
1449
+ }
1450
+ };
1451
+ const resourceGroupName = {
1452
+ parameterPath: "resourceGroupName",
1453
+ mapper: {
1454
+ constraints: {
1455
+ MaxLength: 90,
1456
+ MinLength: 1
1457
+ },
1458
+ serializedName: "resourceGroupName",
1459
+ required: true,
1460
+ type: {
1461
+ name: "String"
1462
+ }
1463
+ }
1464
+ };
1465
+ const storageMoverName = {
1466
+ parameterPath: "storageMoverName",
1467
+ mapper: {
1468
+ serializedName: "storageMoverName",
1469
+ required: true,
1470
+ type: {
1471
+ name: "String"
1472
+ }
1473
+ }
1474
+ };
1475
+ const contentType = {
1476
+ parameterPath: ["options", "contentType"],
1477
+ mapper: {
1478
+ defaultValue: "application/json",
1479
+ isConstant: true,
1480
+ serializedName: "Content-Type",
1481
+ type: {
1482
+ name: "String"
1483
+ }
1484
+ }
1485
+ };
1486
+ const storageMover = {
1487
+ parameterPath: "storageMover",
1488
+ mapper: StorageMover
1489
+ };
1490
+ const storageMover1 = {
1491
+ parameterPath: "storageMover",
1492
+ mapper: StorageMoverUpdateParameters
1493
+ };
1494
+ const agentName = {
1495
+ parameterPath: "agentName",
1496
+ mapper: {
1497
+ serializedName: "agentName",
1498
+ required: true,
1499
+ type: {
1500
+ name: "String"
1501
+ }
1502
+ }
1503
+ };
1504
+ const agent = {
1505
+ parameterPath: "agent",
1506
+ mapper: Agent
1507
+ };
1508
+ const agent1 = {
1509
+ parameterPath: "agent",
1510
+ mapper: AgentUpdateParameters
1511
+ };
1512
+ const endpointName = {
1513
+ parameterPath: "endpointName",
1514
+ mapper: {
1515
+ serializedName: "endpointName",
1516
+ required: true,
1517
+ type: {
1518
+ name: "String"
1519
+ }
1520
+ }
1521
+ };
1522
+ const endpoint = {
1523
+ parameterPath: "endpoint",
1524
+ mapper: Endpoint
1525
+ };
1526
+ const endpoint1 = {
1527
+ parameterPath: "endpoint",
1528
+ mapper: EndpointBaseUpdateParameters
1529
+ };
1530
+ const projectName = {
1531
+ parameterPath: "projectName",
1532
+ mapper: {
1533
+ serializedName: "projectName",
1534
+ required: true,
1535
+ type: {
1536
+ name: "String"
1537
+ }
1538
+ }
1539
+ };
1540
+ const project = {
1541
+ parameterPath: "project",
1542
+ mapper: Project
1543
+ };
1544
+ const project1 = {
1545
+ parameterPath: "project",
1546
+ mapper: ProjectUpdateParameters
1547
+ };
1548
+ const jobDefinitionName = {
1549
+ parameterPath: "jobDefinitionName",
1550
+ mapper: {
1551
+ serializedName: "jobDefinitionName",
1552
+ required: true,
1553
+ type: {
1554
+ name: "String"
1555
+ }
1556
+ }
1557
+ };
1558
+ const jobDefinition = {
1559
+ parameterPath: "jobDefinition",
1560
+ mapper: JobDefinition
1561
+ };
1562
+ const jobDefinition1 = {
1563
+ parameterPath: "jobDefinition",
1564
+ mapper: JobDefinitionUpdateParameters
1565
+ };
1566
+ const jobRunName = {
1567
+ parameterPath: "jobRunName",
1568
+ mapper: {
1569
+ serializedName: "jobRunName",
1570
+ required: true,
1571
+ type: {
1572
+ name: "String"
1573
+ }
1574
+ }
1575
+ };
1576
+
1577
+ /*
1578
+ * Copyright (c) Microsoft Corporation.
1579
+ * Licensed under the MIT License.
1580
+ *
1581
+ * Code generated by Microsoft (R) AutoRest Code Generator.
1582
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
1583
+ */
1584
+ /// <reference lib="esnext.asynciterable" />
1585
+ /** Class containing Operations operations. */
1586
+ class OperationsImpl {
1587
+ /**
1588
+ * Initialize a new instance of the class Operations class.
1589
+ * @param client Reference to the service client
1590
+ */
1591
+ constructor(client) {
1592
+ this.client = client;
1593
+ }
1594
+ /**
1595
+ * Lists all the supported operations for the Azure Storage Mover REST API.
1596
+ * @param options The options parameters.
1597
+ */
1598
+ list(options) {
1599
+ const iter = this.listPagingAll(options);
1600
+ return {
1601
+ next() {
1602
+ return iter.next();
1603
+ },
1604
+ [Symbol.asyncIterator]() {
1605
+ return this;
1606
+ },
1607
+ byPage: (settings) => {
1608
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
1609
+ throw new Error("maxPageSize is not supported by this operation.");
1610
+ }
1611
+ return this.listPagingPage(options, settings);
1612
+ }
1613
+ };
1614
+ }
1615
+ listPagingPage(options, settings) {
1616
+ return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
1617
+ let result;
1618
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
1619
+ if (!continuationToken) {
1620
+ result = yield tslib.__await(this._list(options));
1621
+ let page = result.value || [];
1622
+ continuationToken = result.nextLink;
1623
+ setContinuationToken(page, continuationToken);
1624
+ yield yield tslib.__await(page);
1625
+ }
1626
+ while (continuationToken) {
1627
+ result = yield tslib.__await(this._listNext(continuationToken, options));
1628
+ continuationToken = result.nextLink;
1629
+ let page = result.value || [];
1630
+ setContinuationToken(page, continuationToken);
1631
+ yield yield tslib.__await(page);
1632
+ }
1633
+ });
1634
+ }
1635
+ listPagingAll(options) {
1636
+ return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
1637
+ var e_1, _a;
1638
+ try {
1639
+ for (var _b = tslib.__asyncValues(this.listPagingPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
1640
+ const page = _c.value;
1641
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
1642
+ }
1643
+ }
1644
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
1645
+ finally {
1646
+ try {
1647
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
1648
+ }
1649
+ finally { if (e_1) throw e_1.error; }
1650
+ }
1651
+ });
1652
+ }
1653
+ /**
1654
+ * Lists all the supported operations for the Azure Storage Mover REST API.
1655
+ * @param options The options parameters.
1656
+ */
1657
+ _list(options) {
1658
+ return this.client.sendOperationRequest({ options }, listOperationSpec$6);
1659
+ }
1660
+ /**
1661
+ * ListNext
1662
+ * @param nextLink The nextLink from the previous successful call to the List method.
1663
+ * @param options The options parameters.
1664
+ */
1665
+ _listNext(nextLink, options) {
1666
+ return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec$6);
1667
+ }
1668
+ }
1669
+ // Operation Specifications
1670
+ const serializer$6 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
1671
+ const listOperationSpec$6 = {
1672
+ path: "/providers/Microsoft.StorageMover/operations",
1673
+ httpMethod: "GET",
1674
+ responses: {
1675
+ 200: {
1676
+ bodyMapper: OperationListResult
1677
+ },
1678
+ default: {
1679
+ bodyMapper: ErrorResponse
1680
+ }
1681
+ },
1682
+ queryParameters: [apiVersion],
1683
+ urlParameters: [$host],
1684
+ headerParameters: [accept],
1685
+ serializer: serializer$6
1686
+ };
1687
+ const listNextOperationSpec$6 = {
1688
+ path: "{nextLink}",
1689
+ httpMethod: "GET",
1690
+ responses: {
1691
+ 200: {
1692
+ bodyMapper: OperationListResult
1693
+ },
1694
+ default: {
1695
+ bodyMapper: ErrorResponse
1696
+ }
1697
+ },
1698
+ urlParameters: [$host, nextLink],
1699
+ headerParameters: [accept],
1700
+ serializer: serializer$6
1701
+ };
1702
+
1703
+ /*
1704
+ * Copyright (c) Microsoft Corporation.
1705
+ * Licensed under the MIT License.
1706
+ *
1707
+ * Code generated by Microsoft (R) AutoRest Code Generator.
1708
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
1709
+ */
1710
+ class LroImpl {
1711
+ constructor(sendOperationFn, args, spec, requestPath = spec.path, requestMethod = spec.httpMethod) {
1712
+ this.sendOperationFn = sendOperationFn;
1713
+ this.args = args;
1714
+ this.spec = spec;
1715
+ this.requestPath = requestPath;
1716
+ this.requestMethod = requestMethod;
1717
+ }
1718
+ sendInitialRequest() {
1719
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1720
+ return this.sendOperationFn(this.args, this.spec);
1721
+ });
1722
+ }
1723
+ sendPollRequest(path) {
1724
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1725
+ const _a = this.spec, restSpec = tslib.__rest(_a, ["requestBody"]);
1726
+ return this.sendOperationFn(this.args, Object.assign(Object.assign({}, restSpec), { path, httpMethod: "GET" }));
1727
+ });
1728
+ }
1729
+ }
1730
+
1731
+ /*
1732
+ * Copyright (c) Microsoft Corporation.
1733
+ * Licensed under the MIT License.
1734
+ *
1735
+ * Code generated by Microsoft (R) AutoRest Code Generator.
1736
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
1737
+ */
1738
+ /// <reference lib="esnext.asynciterable" />
1739
+ /** Class containing StorageMovers operations. */
1740
+ class StorageMoversImpl {
1741
+ /**
1742
+ * Initialize a new instance of the class StorageMovers class.
1743
+ * @param client Reference to the service client
1744
+ */
1745
+ constructor(client) {
1746
+ this.client = client;
1747
+ }
1748
+ /**
1749
+ * Lists all Storage Movers in a subscription.
1750
+ * @param options The options parameters.
1751
+ */
1752
+ listBySubscription(options) {
1753
+ const iter = this.listBySubscriptionPagingAll(options);
1754
+ return {
1755
+ next() {
1756
+ return iter.next();
1757
+ },
1758
+ [Symbol.asyncIterator]() {
1759
+ return this;
1760
+ },
1761
+ byPage: (settings) => {
1762
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
1763
+ throw new Error("maxPageSize is not supported by this operation.");
1764
+ }
1765
+ return this.listBySubscriptionPagingPage(options, settings);
1766
+ }
1767
+ };
1768
+ }
1769
+ listBySubscriptionPagingPage(options, settings) {
1770
+ return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionPagingPage_1() {
1771
+ let result;
1772
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
1773
+ if (!continuationToken) {
1774
+ result = yield tslib.__await(this._listBySubscription(options));
1775
+ let page = result.value || [];
1776
+ continuationToken = result.nextLink;
1777
+ setContinuationToken(page, continuationToken);
1778
+ yield yield tslib.__await(page);
1779
+ }
1780
+ while (continuationToken) {
1781
+ result = yield tslib.__await(this._listBySubscriptionNext(continuationToken, options));
1782
+ continuationToken = result.nextLink;
1783
+ let page = result.value || [];
1784
+ setContinuationToken(page, continuationToken);
1785
+ yield yield tslib.__await(page);
1786
+ }
1787
+ });
1788
+ }
1789
+ listBySubscriptionPagingAll(options) {
1790
+ return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionPagingAll_1() {
1791
+ var e_1, _a;
1792
+ try {
1793
+ for (var _b = tslib.__asyncValues(this.listBySubscriptionPagingPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
1794
+ const page = _c.value;
1795
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
1796
+ }
1797
+ }
1798
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
1799
+ finally {
1800
+ try {
1801
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
1802
+ }
1803
+ finally { if (e_1) throw e_1.error; }
1804
+ }
1805
+ });
1806
+ }
1807
+ /**
1808
+ * Lists all Storage Movers in a resource group.
1809
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
1810
+ * @param options The options parameters.
1811
+ */
1812
+ list(resourceGroupName, options) {
1813
+ const iter = this.listPagingAll(resourceGroupName, options);
1814
+ return {
1815
+ next() {
1816
+ return iter.next();
1817
+ },
1818
+ [Symbol.asyncIterator]() {
1819
+ return this;
1820
+ },
1821
+ byPage: (settings) => {
1822
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
1823
+ throw new Error("maxPageSize is not supported by this operation.");
1824
+ }
1825
+ return this.listPagingPage(resourceGroupName, options, settings);
1826
+ }
1827
+ };
1828
+ }
1829
+ listPagingPage(resourceGroupName, options, settings) {
1830
+ return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
1831
+ let result;
1832
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
1833
+ if (!continuationToken) {
1834
+ result = yield tslib.__await(this._list(resourceGroupName, options));
1835
+ let page = result.value || [];
1836
+ continuationToken = result.nextLink;
1837
+ setContinuationToken(page, continuationToken);
1838
+ yield yield tslib.__await(page);
1839
+ }
1840
+ while (continuationToken) {
1841
+ result = yield tslib.__await(this._listNext(resourceGroupName, continuationToken, options));
1842
+ continuationToken = result.nextLink;
1843
+ let page = result.value || [];
1844
+ setContinuationToken(page, continuationToken);
1845
+ yield yield tslib.__await(page);
1846
+ }
1847
+ });
1848
+ }
1849
+ listPagingAll(resourceGroupName, options) {
1850
+ return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
1851
+ var e_2, _a;
1852
+ try {
1853
+ for (var _b = tslib.__asyncValues(this.listPagingPage(resourceGroupName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
1854
+ const page = _c.value;
1855
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
1856
+ }
1857
+ }
1858
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
1859
+ finally {
1860
+ try {
1861
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
1862
+ }
1863
+ finally { if (e_2) throw e_2.error; }
1864
+ }
1865
+ });
1866
+ }
1867
+ /**
1868
+ * Lists all Storage Movers in a subscription.
1869
+ * @param options The options parameters.
1870
+ */
1871
+ _listBySubscription(options) {
1872
+ return this.client.sendOperationRequest({ options }, listBySubscriptionOperationSpec);
1873
+ }
1874
+ /**
1875
+ * Lists all Storage Movers in a resource group.
1876
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
1877
+ * @param options The options parameters.
1878
+ */
1879
+ _list(resourceGroupName, options) {
1880
+ return this.client.sendOperationRequest({ resourceGroupName, options }, listOperationSpec$5);
1881
+ }
1882
+ /**
1883
+ * Gets a Storage Mover resource.
1884
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
1885
+ * @param storageMoverName The name of the Storage Mover resource.
1886
+ * @param options The options parameters.
1887
+ */
1888
+ get(resourceGroupName, storageMoverName, options) {
1889
+ return this.client.sendOperationRequest({ resourceGroupName, storageMoverName, options }, getOperationSpec$5);
1890
+ }
1891
+ /**
1892
+ * Creates or updates a top-level Storage Mover resource.
1893
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
1894
+ * @param storageMoverName The name of the Storage Mover resource.
1895
+ * @param storageMover The Storage Mover resource, which is a container for a group of Agents,
1896
+ * Projects, and Endpoints.
1897
+ * @param options The options parameters.
1898
+ */
1899
+ createOrUpdate(resourceGroupName, storageMoverName, storageMover, options) {
1900
+ return this.client.sendOperationRequest({ resourceGroupName, storageMoverName, storageMover, options }, createOrUpdateOperationSpec$4);
1901
+ }
1902
+ /**
1903
+ * Updates properties for a Storage Mover resource. Properties not specified in the request body will
1904
+ * be unchanged.
1905
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
1906
+ * @param storageMoverName The name of the Storage Mover resource.
1907
+ * @param storageMover The Storage Mover resource.
1908
+ * @param options The options parameters.
1909
+ */
1910
+ update(resourceGroupName, storageMoverName, storageMover, options) {
1911
+ return this.client.sendOperationRequest({ resourceGroupName, storageMoverName, storageMover, options }, updateOperationSpec$4);
1912
+ }
1913
+ /**
1914
+ * Deletes a Storage Mover resource.
1915
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
1916
+ * @param storageMoverName The name of the Storage Mover resource.
1917
+ * @param options The options parameters.
1918
+ */
1919
+ beginDelete(resourceGroupName, storageMoverName, options) {
1920
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1921
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1922
+ return this.client.sendOperationRequest(args, spec);
1923
+ });
1924
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1925
+ var _a;
1926
+ let currentRawResponse = undefined;
1927
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
1928
+ const callback = (rawResponse, flatResponse) => {
1929
+ currentRawResponse = rawResponse;
1930
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
1931
+ };
1932
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
1933
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
1934
+ return {
1935
+ flatResponse,
1936
+ rawResponse: {
1937
+ statusCode: currentRawResponse.status,
1938
+ body: currentRawResponse.parsedBody,
1939
+ headers: currentRawResponse.headers.toJSON()
1940
+ }
1941
+ };
1942
+ });
1943
+ const lro = new LroImpl(sendOperation, { resourceGroupName, storageMoverName, options }, deleteOperationSpec$4);
1944
+ const poller = new coreLro.LroEngine(lro, {
1945
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1946
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
1947
+ lroResourceLocationConfig: "location"
1948
+ });
1949
+ yield poller.poll();
1950
+ return poller;
1951
+ });
1952
+ }
1953
+ /**
1954
+ * Deletes a Storage Mover resource.
1955
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
1956
+ * @param storageMoverName The name of the Storage Mover resource.
1957
+ * @param options The options parameters.
1958
+ */
1959
+ beginDeleteAndWait(resourceGroupName, storageMoverName, options) {
1960
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1961
+ const poller = yield this.beginDelete(resourceGroupName, storageMoverName, options);
1962
+ return poller.pollUntilDone();
1963
+ });
1964
+ }
1965
+ /**
1966
+ * ListBySubscriptionNext
1967
+ * @param nextLink The nextLink from the previous successful call to the ListBySubscription method.
1968
+ * @param options The options parameters.
1969
+ */
1970
+ _listBySubscriptionNext(nextLink, options) {
1971
+ return this.client.sendOperationRequest({ nextLink, options }, listBySubscriptionNextOperationSpec);
1972
+ }
1973
+ /**
1974
+ * ListNext
1975
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
1976
+ * @param nextLink The nextLink from the previous successful call to the List method.
1977
+ * @param options The options parameters.
1978
+ */
1979
+ _listNext(resourceGroupName, nextLink, options) {
1980
+ return this.client.sendOperationRequest({ resourceGroupName, nextLink, options }, listNextOperationSpec$5);
1981
+ }
1982
+ }
1983
+ // Operation Specifications
1984
+ const serializer$5 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
1985
+ const listBySubscriptionOperationSpec = {
1986
+ path: "/subscriptions/{subscriptionId}/providers/Microsoft.StorageMover/storageMovers",
1987
+ httpMethod: "GET",
1988
+ responses: {
1989
+ 200: {
1990
+ bodyMapper: StorageMoverList
1991
+ },
1992
+ default: {
1993
+ bodyMapper: ErrorResponse
1994
+ }
1995
+ },
1996
+ queryParameters: [apiVersion],
1997
+ urlParameters: [$host, subscriptionId],
1998
+ headerParameters: [accept],
1999
+ serializer: serializer$5
2000
+ };
2001
+ const listOperationSpec$5 = {
2002
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers",
2003
+ httpMethod: "GET",
2004
+ responses: {
2005
+ 200: {
2006
+ bodyMapper: StorageMoverList
2007
+ },
2008
+ default: {
2009
+ bodyMapper: ErrorResponse
2010
+ }
2011
+ },
2012
+ queryParameters: [apiVersion],
2013
+ urlParameters: [
2014
+ $host,
2015
+ subscriptionId,
2016
+ resourceGroupName
2017
+ ],
2018
+ headerParameters: [accept],
2019
+ serializer: serializer$5
2020
+ };
2021
+ const getOperationSpec$5 = {
2022
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}",
2023
+ httpMethod: "GET",
2024
+ responses: {
2025
+ 200: {
2026
+ bodyMapper: StorageMover
2027
+ },
2028
+ default: {
2029
+ bodyMapper: ErrorResponse
2030
+ }
2031
+ },
2032
+ queryParameters: [apiVersion],
2033
+ urlParameters: [
2034
+ $host,
2035
+ subscriptionId,
2036
+ resourceGroupName,
2037
+ storageMoverName
2038
+ ],
2039
+ headerParameters: [accept],
2040
+ serializer: serializer$5
2041
+ };
2042
+ const createOrUpdateOperationSpec$4 = {
2043
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}",
2044
+ httpMethod: "PUT",
2045
+ responses: {
2046
+ 200: {
2047
+ bodyMapper: StorageMover
2048
+ },
2049
+ default: {
2050
+ bodyMapper: ErrorResponse
2051
+ }
2052
+ },
2053
+ requestBody: storageMover,
2054
+ queryParameters: [apiVersion],
2055
+ urlParameters: [
2056
+ $host,
2057
+ subscriptionId,
2058
+ resourceGroupName,
2059
+ storageMoverName
2060
+ ],
2061
+ headerParameters: [accept, contentType],
2062
+ mediaType: "json",
2063
+ serializer: serializer$5
2064
+ };
2065
+ const updateOperationSpec$4 = {
2066
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}",
2067
+ httpMethod: "PATCH",
2068
+ responses: {
2069
+ 200: {
2070
+ bodyMapper: StorageMover
2071
+ },
2072
+ default: {
2073
+ bodyMapper: ErrorResponse
2074
+ }
2075
+ },
2076
+ requestBody: storageMover1,
2077
+ queryParameters: [apiVersion],
2078
+ urlParameters: [
2079
+ $host,
2080
+ subscriptionId,
2081
+ resourceGroupName,
2082
+ storageMoverName
2083
+ ],
2084
+ headerParameters: [accept, contentType],
2085
+ mediaType: "json",
2086
+ serializer: serializer$5
2087
+ };
2088
+ const deleteOperationSpec$4 = {
2089
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}",
2090
+ httpMethod: "DELETE",
2091
+ responses: {
2092
+ 200: {},
2093
+ 201: {},
2094
+ 202: {},
2095
+ 204: {},
2096
+ default: {
2097
+ bodyMapper: ErrorResponse
2098
+ }
2099
+ },
2100
+ queryParameters: [apiVersion],
2101
+ urlParameters: [
2102
+ $host,
2103
+ subscriptionId,
2104
+ resourceGroupName,
2105
+ storageMoverName
2106
+ ],
2107
+ headerParameters: [accept],
2108
+ serializer: serializer$5
2109
+ };
2110
+ const listBySubscriptionNextOperationSpec = {
2111
+ path: "{nextLink}",
2112
+ httpMethod: "GET",
2113
+ responses: {
2114
+ 200: {
2115
+ bodyMapper: StorageMoverList
2116
+ },
2117
+ default: {
2118
+ bodyMapper: ErrorResponse
2119
+ }
2120
+ },
2121
+ urlParameters: [
2122
+ $host,
2123
+ nextLink,
2124
+ subscriptionId
2125
+ ],
2126
+ headerParameters: [accept],
2127
+ serializer: serializer$5
2128
+ };
2129
+ const listNextOperationSpec$5 = {
2130
+ path: "{nextLink}",
2131
+ httpMethod: "GET",
2132
+ responses: {
2133
+ 200: {
2134
+ bodyMapper: StorageMoverList
2135
+ },
2136
+ default: {
2137
+ bodyMapper: ErrorResponse
2138
+ }
2139
+ },
2140
+ urlParameters: [
2141
+ $host,
2142
+ nextLink,
2143
+ subscriptionId,
2144
+ resourceGroupName
2145
+ ],
2146
+ headerParameters: [accept],
2147
+ serializer: serializer$5
2148
+ };
2149
+
2150
+ /*
2151
+ * Copyright (c) Microsoft Corporation.
2152
+ * Licensed under the MIT License.
2153
+ *
2154
+ * Code generated by Microsoft (R) AutoRest Code Generator.
2155
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
2156
+ */
2157
+ /// <reference lib="esnext.asynciterable" />
2158
+ /** Class containing Agents operations. */
2159
+ class AgentsImpl {
2160
+ /**
2161
+ * Initialize a new instance of the class Agents class.
2162
+ * @param client Reference to the service client
2163
+ */
2164
+ constructor(client) {
2165
+ this.client = client;
2166
+ }
2167
+ /**
2168
+ * Lists all Agents in a Storage Mover.
2169
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2170
+ * @param storageMoverName The name of the Storage Mover resource.
2171
+ * @param options The options parameters.
2172
+ */
2173
+ list(resourceGroupName, storageMoverName, options) {
2174
+ const iter = this.listPagingAll(resourceGroupName, storageMoverName, options);
2175
+ return {
2176
+ next() {
2177
+ return iter.next();
2178
+ },
2179
+ [Symbol.asyncIterator]() {
2180
+ return this;
2181
+ },
2182
+ byPage: (settings) => {
2183
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
2184
+ throw new Error("maxPageSize is not supported by this operation.");
2185
+ }
2186
+ return this.listPagingPage(resourceGroupName, storageMoverName, options, settings);
2187
+ }
2188
+ };
2189
+ }
2190
+ listPagingPage(resourceGroupName, storageMoverName, options, settings) {
2191
+ return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
2192
+ let result;
2193
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
2194
+ if (!continuationToken) {
2195
+ result = yield tslib.__await(this._list(resourceGroupName, storageMoverName, options));
2196
+ let page = result.value || [];
2197
+ continuationToken = result.nextLink;
2198
+ setContinuationToken(page, continuationToken);
2199
+ yield yield tslib.__await(page);
2200
+ }
2201
+ while (continuationToken) {
2202
+ result = yield tslib.__await(this._listNext(resourceGroupName, storageMoverName, continuationToken, options));
2203
+ continuationToken = result.nextLink;
2204
+ let page = result.value || [];
2205
+ setContinuationToken(page, continuationToken);
2206
+ yield yield tslib.__await(page);
2207
+ }
2208
+ });
2209
+ }
2210
+ listPagingAll(resourceGroupName, storageMoverName, options) {
2211
+ return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
2212
+ var e_1, _a;
2213
+ try {
2214
+ for (var _b = tslib.__asyncValues(this.listPagingPage(resourceGroupName, storageMoverName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
2215
+ const page = _c.value;
2216
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
2217
+ }
2218
+ }
2219
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
2220
+ finally {
2221
+ try {
2222
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
2223
+ }
2224
+ finally { if (e_1) throw e_1.error; }
2225
+ }
2226
+ });
2227
+ }
2228
+ /**
2229
+ * Lists all Agents in a Storage Mover.
2230
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2231
+ * @param storageMoverName The name of the Storage Mover resource.
2232
+ * @param options The options parameters.
2233
+ */
2234
+ _list(resourceGroupName, storageMoverName, options) {
2235
+ return this.client.sendOperationRequest({ resourceGroupName, storageMoverName, options }, listOperationSpec$4);
2236
+ }
2237
+ /**
2238
+ * Gets an Agent resource.
2239
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2240
+ * @param storageMoverName The name of the Storage Mover resource.
2241
+ * @param agentName The name of the Agent resource.
2242
+ * @param options The options parameters.
2243
+ */
2244
+ get(resourceGroupName, storageMoverName, agentName, options) {
2245
+ return this.client.sendOperationRequest({ resourceGroupName, storageMoverName, agentName, options }, getOperationSpec$4);
2246
+ }
2247
+ /**
2248
+ * Creates or updates an Agent resource, which references a hybrid compute machine that can run jobs.
2249
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2250
+ * @param storageMoverName The name of the Storage Mover resource.
2251
+ * @param agentName The name of the Agent resource.
2252
+ * @param agent The Agent resource.
2253
+ * @param options The options parameters.
2254
+ */
2255
+ createOrUpdate(resourceGroupName, storageMoverName, agentName, agent, options) {
2256
+ return this.client.sendOperationRequest({ resourceGroupName, storageMoverName, agentName, agent, options }, createOrUpdateOperationSpec$3);
2257
+ }
2258
+ /**
2259
+ * Creates or updates an Agent resource.
2260
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2261
+ * @param storageMoverName The name of the Storage Mover resource.
2262
+ * @param agentName The name of the Agent resource.
2263
+ * @param agent The Agent resource.
2264
+ * @param options The options parameters.
2265
+ */
2266
+ update(resourceGroupName, storageMoverName, agentName, agent, options) {
2267
+ return this.client.sendOperationRequest({ resourceGroupName, storageMoverName, agentName, agent, options }, updateOperationSpec$3);
2268
+ }
2269
+ /**
2270
+ * Deletes an Agent resource.
2271
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2272
+ * @param storageMoverName The name of the Storage Mover resource.
2273
+ * @param agentName The name of the Agent resource.
2274
+ * @param options The options parameters.
2275
+ */
2276
+ beginDelete(resourceGroupName, storageMoverName, agentName, options) {
2277
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2278
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2279
+ return this.client.sendOperationRequest(args, spec);
2280
+ });
2281
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2282
+ var _a;
2283
+ let currentRawResponse = undefined;
2284
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
2285
+ const callback = (rawResponse, flatResponse) => {
2286
+ currentRawResponse = rawResponse;
2287
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
2288
+ };
2289
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
2290
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
2291
+ return {
2292
+ flatResponse,
2293
+ rawResponse: {
2294
+ statusCode: currentRawResponse.status,
2295
+ body: currentRawResponse.parsedBody,
2296
+ headers: currentRawResponse.headers.toJSON()
2297
+ }
2298
+ };
2299
+ });
2300
+ const lro = new LroImpl(sendOperation, { resourceGroupName, storageMoverName, agentName, options }, deleteOperationSpec$3);
2301
+ const poller = new coreLro.LroEngine(lro, {
2302
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2303
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
2304
+ lroResourceLocationConfig: "location"
2305
+ });
2306
+ yield poller.poll();
2307
+ return poller;
2308
+ });
2309
+ }
2310
+ /**
2311
+ * Deletes an Agent resource.
2312
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2313
+ * @param storageMoverName The name of the Storage Mover resource.
2314
+ * @param agentName The name of the Agent resource.
2315
+ * @param options The options parameters.
2316
+ */
2317
+ beginDeleteAndWait(resourceGroupName, storageMoverName, agentName, options) {
2318
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2319
+ const poller = yield this.beginDelete(resourceGroupName, storageMoverName, agentName, options);
2320
+ return poller.pollUntilDone();
2321
+ });
2322
+ }
2323
+ /**
2324
+ * ListNext
2325
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2326
+ * @param storageMoverName The name of the Storage Mover resource.
2327
+ * @param nextLink The nextLink from the previous successful call to the List method.
2328
+ * @param options The options parameters.
2329
+ */
2330
+ _listNext(resourceGroupName, storageMoverName, nextLink, options) {
2331
+ return this.client.sendOperationRequest({ resourceGroupName, storageMoverName, nextLink, options }, listNextOperationSpec$4);
2332
+ }
2333
+ }
2334
+ // Operation Specifications
2335
+ const serializer$4 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
2336
+ const listOperationSpec$4 = {
2337
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/agents",
2338
+ httpMethod: "GET",
2339
+ responses: {
2340
+ 200: {
2341
+ bodyMapper: AgentList
2342
+ },
2343
+ default: {
2344
+ bodyMapper: ErrorResponse
2345
+ }
2346
+ },
2347
+ queryParameters: [apiVersion],
2348
+ urlParameters: [
2349
+ $host,
2350
+ subscriptionId,
2351
+ resourceGroupName,
2352
+ storageMoverName
2353
+ ],
2354
+ headerParameters: [accept],
2355
+ serializer: serializer$4
2356
+ };
2357
+ const getOperationSpec$4 = {
2358
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/agents/{agentName}",
2359
+ httpMethod: "GET",
2360
+ responses: {
2361
+ 200: {
2362
+ bodyMapper: Agent
2363
+ },
2364
+ default: {
2365
+ bodyMapper: ErrorResponse
2366
+ }
2367
+ },
2368
+ queryParameters: [apiVersion],
2369
+ urlParameters: [
2370
+ $host,
2371
+ subscriptionId,
2372
+ resourceGroupName,
2373
+ storageMoverName,
2374
+ agentName
2375
+ ],
2376
+ headerParameters: [accept],
2377
+ serializer: serializer$4
2378
+ };
2379
+ const createOrUpdateOperationSpec$3 = {
2380
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/agents/{agentName}",
2381
+ httpMethod: "PUT",
2382
+ responses: {
2383
+ 200: {
2384
+ bodyMapper: Agent
2385
+ },
2386
+ default: {
2387
+ bodyMapper: ErrorResponse
2388
+ }
2389
+ },
2390
+ requestBody: agent,
2391
+ queryParameters: [apiVersion],
2392
+ urlParameters: [
2393
+ $host,
2394
+ subscriptionId,
2395
+ resourceGroupName,
2396
+ storageMoverName,
2397
+ agentName
2398
+ ],
2399
+ headerParameters: [accept, contentType],
2400
+ mediaType: "json",
2401
+ serializer: serializer$4
2402
+ };
2403
+ const updateOperationSpec$3 = {
2404
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/agents/{agentName}",
2405
+ httpMethod: "PATCH",
2406
+ responses: {
2407
+ 200: {
2408
+ bodyMapper: Agent
2409
+ },
2410
+ default: {
2411
+ bodyMapper: ErrorResponse
2412
+ }
2413
+ },
2414
+ requestBody: agent1,
2415
+ queryParameters: [apiVersion],
2416
+ urlParameters: [
2417
+ $host,
2418
+ subscriptionId,
2419
+ resourceGroupName,
2420
+ storageMoverName,
2421
+ agentName
2422
+ ],
2423
+ headerParameters: [accept, contentType],
2424
+ mediaType: "json",
2425
+ serializer: serializer$4
2426
+ };
2427
+ const deleteOperationSpec$3 = {
2428
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/agents/{agentName}",
2429
+ httpMethod: "DELETE",
2430
+ responses: {
2431
+ 200: {},
2432
+ 201: {},
2433
+ 202: {},
2434
+ 204: {},
2435
+ default: {
2436
+ bodyMapper: ErrorResponse
2437
+ }
2438
+ },
2439
+ queryParameters: [apiVersion],
2440
+ urlParameters: [
2441
+ $host,
2442
+ subscriptionId,
2443
+ resourceGroupName,
2444
+ storageMoverName,
2445
+ agentName
2446
+ ],
2447
+ headerParameters: [accept],
2448
+ serializer: serializer$4
2449
+ };
2450
+ const listNextOperationSpec$4 = {
2451
+ path: "{nextLink}",
2452
+ httpMethod: "GET",
2453
+ responses: {
2454
+ 200: {
2455
+ bodyMapper: AgentList
2456
+ },
2457
+ default: {
2458
+ bodyMapper: ErrorResponse
2459
+ }
2460
+ },
2461
+ urlParameters: [
2462
+ $host,
2463
+ nextLink,
2464
+ subscriptionId,
2465
+ resourceGroupName,
2466
+ storageMoverName
2467
+ ],
2468
+ headerParameters: [accept],
2469
+ serializer: serializer$4
2470
+ };
2471
+
2472
+ /*
2473
+ * Copyright (c) Microsoft Corporation.
2474
+ * Licensed under the MIT License.
2475
+ *
2476
+ * Code generated by Microsoft (R) AutoRest Code Generator.
2477
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
2478
+ */
2479
+ /// <reference lib="esnext.asynciterable" />
2480
+ /** Class containing Endpoints operations. */
2481
+ class EndpointsImpl {
2482
+ /**
2483
+ * Initialize a new instance of the class Endpoints class.
2484
+ * @param client Reference to the service client
2485
+ */
2486
+ constructor(client) {
2487
+ this.client = client;
2488
+ }
2489
+ /**
2490
+ * Lists all Endpoints in a Storage Mover.
2491
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2492
+ * @param storageMoverName The name of the Storage Mover resource.
2493
+ * @param options The options parameters.
2494
+ */
2495
+ list(resourceGroupName, storageMoverName, options) {
2496
+ const iter = this.listPagingAll(resourceGroupName, storageMoverName, options);
2497
+ return {
2498
+ next() {
2499
+ return iter.next();
2500
+ },
2501
+ [Symbol.asyncIterator]() {
2502
+ return this;
2503
+ },
2504
+ byPage: (settings) => {
2505
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
2506
+ throw new Error("maxPageSize is not supported by this operation.");
2507
+ }
2508
+ return this.listPagingPage(resourceGroupName, storageMoverName, options, settings);
2509
+ }
2510
+ };
2511
+ }
2512
+ listPagingPage(resourceGroupName, storageMoverName, options, settings) {
2513
+ return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
2514
+ let result;
2515
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
2516
+ if (!continuationToken) {
2517
+ result = yield tslib.__await(this._list(resourceGroupName, storageMoverName, options));
2518
+ let page = result.value || [];
2519
+ continuationToken = result.nextLink;
2520
+ setContinuationToken(page, continuationToken);
2521
+ yield yield tslib.__await(page);
2522
+ }
2523
+ while (continuationToken) {
2524
+ result = yield tslib.__await(this._listNext(resourceGroupName, storageMoverName, continuationToken, options));
2525
+ continuationToken = result.nextLink;
2526
+ let page = result.value || [];
2527
+ setContinuationToken(page, continuationToken);
2528
+ yield yield tslib.__await(page);
2529
+ }
2530
+ });
2531
+ }
2532
+ listPagingAll(resourceGroupName, storageMoverName, options) {
2533
+ return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
2534
+ var e_1, _a;
2535
+ try {
2536
+ for (var _b = tslib.__asyncValues(this.listPagingPage(resourceGroupName, storageMoverName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
2537
+ const page = _c.value;
2538
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
2539
+ }
2540
+ }
2541
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
2542
+ finally {
2543
+ try {
2544
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
2545
+ }
2546
+ finally { if (e_1) throw e_1.error; }
2547
+ }
2548
+ });
2549
+ }
2550
+ /**
2551
+ * Lists all Endpoints in a Storage Mover.
2552
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2553
+ * @param storageMoverName The name of the Storage Mover resource.
2554
+ * @param options The options parameters.
2555
+ */
2556
+ _list(resourceGroupName, storageMoverName, options) {
2557
+ return this.client.sendOperationRequest({ resourceGroupName, storageMoverName, options }, listOperationSpec$3);
2558
+ }
2559
+ /**
2560
+ * Gets an Endpoint resource.
2561
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2562
+ * @param storageMoverName The name of the Storage Mover resource.
2563
+ * @param endpointName The name of the Endpoint resource.
2564
+ * @param options The options parameters.
2565
+ */
2566
+ get(resourceGroupName, storageMoverName, endpointName, options) {
2567
+ return this.client.sendOperationRequest({ resourceGroupName, storageMoverName, endpointName, options }, getOperationSpec$3);
2568
+ }
2569
+ /**
2570
+ * Creates or updates an Endpoint resource, which represents a data transfer source or destination.
2571
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2572
+ * @param storageMoverName The name of the Storage Mover resource.
2573
+ * @param endpointName The name of the Endpoint resource.
2574
+ * @param endpoint The Endpoint resource, which contains information about file sources and targets.
2575
+ * @param options The options parameters.
2576
+ */
2577
+ createOrUpdate(resourceGroupName, storageMoverName, endpointName, endpoint, options) {
2578
+ return this.client.sendOperationRequest({ resourceGroupName, storageMoverName, endpointName, endpoint, options }, createOrUpdateOperationSpec$2);
2579
+ }
2580
+ /**
2581
+ * Updates properties for an Endpoint resource. Properties not specified in the request body will be
2582
+ * unchanged.
2583
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2584
+ * @param storageMoverName The name of the Storage Mover resource.
2585
+ * @param endpointName The name of the Endpoint resource.
2586
+ * @param endpoint The Endpoint resource.
2587
+ * @param options The options parameters.
2588
+ */
2589
+ update(resourceGroupName, storageMoverName, endpointName, endpoint, options) {
2590
+ return this.client.sendOperationRequest({ resourceGroupName, storageMoverName, endpointName, endpoint, options }, updateOperationSpec$2);
2591
+ }
2592
+ /**
2593
+ * Deletes an Endpoint resource.
2594
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2595
+ * @param storageMoverName The name of the Storage Mover resource.
2596
+ * @param endpointName The name of the Endpoint resource.
2597
+ * @param options The options parameters.
2598
+ */
2599
+ beginDelete(resourceGroupName, storageMoverName, endpointName, options) {
2600
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2601
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2602
+ return this.client.sendOperationRequest(args, spec);
2603
+ });
2604
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2605
+ var _a;
2606
+ let currentRawResponse = undefined;
2607
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
2608
+ const callback = (rawResponse, flatResponse) => {
2609
+ currentRawResponse = rawResponse;
2610
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
2611
+ };
2612
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
2613
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
2614
+ return {
2615
+ flatResponse,
2616
+ rawResponse: {
2617
+ statusCode: currentRawResponse.status,
2618
+ body: currentRawResponse.parsedBody,
2619
+ headers: currentRawResponse.headers.toJSON()
2620
+ }
2621
+ };
2622
+ });
2623
+ const lro = new LroImpl(sendOperation, { resourceGroupName, storageMoverName, endpointName, options }, deleteOperationSpec$2);
2624
+ const poller = new coreLro.LroEngine(lro, {
2625
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2626
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
2627
+ lroResourceLocationConfig: "location"
2628
+ });
2629
+ yield poller.poll();
2630
+ return poller;
2631
+ });
2632
+ }
2633
+ /**
2634
+ * Deletes an Endpoint resource.
2635
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2636
+ * @param storageMoverName The name of the Storage Mover resource.
2637
+ * @param endpointName The name of the Endpoint resource.
2638
+ * @param options The options parameters.
2639
+ */
2640
+ beginDeleteAndWait(resourceGroupName, storageMoverName, endpointName, options) {
2641
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2642
+ const poller = yield this.beginDelete(resourceGroupName, storageMoverName, endpointName, options);
2643
+ return poller.pollUntilDone();
2644
+ });
2645
+ }
2646
+ /**
2647
+ * ListNext
2648
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2649
+ * @param storageMoverName The name of the Storage Mover resource.
2650
+ * @param nextLink The nextLink from the previous successful call to the List method.
2651
+ * @param options The options parameters.
2652
+ */
2653
+ _listNext(resourceGroupName, storageMoverName, nextLink, options) {
2654
+ return this.client.sendOperationRequest({ resourceGroupName, storageMoverName, nextLink, options }, listNextOperationSpec$3);
2655
+ }
2656
+ }
2657
+ // Operation Specifications
2658
+ const serializer$3 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
2659
+ const listOperationSpec$3 = {
2660
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/endpoints",
2661
+ httpMethod: "GET",
2662
+ responses: {
2663
+ 200: {
2664
+ bodyMapper: EndpointList
2665
+ },
2666
+ default: {
2667
+ bodyMapper: ErrorResponse
2668
+ }
2669
+ },
2670
+ queryParameters: [apiVersion],
2671
+ urlParameters: [
2672
+ $host,
2673
+ subscriptionId,
2674
+ resourceGroupName,
2675
+ storageMoverName
2676
+ ],
2677
+ headerParameters: [accept],
2678
+ serializer: serializer$3
2679
+ };
2680
+ const getOperationSpec$3 = {
2681
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/endpoints/{endpointName}",
2682
+ httpMethod: "GET",
2683
+ responses: {
2684
+ 200: {
2685
+ bodyMapper: Endpoint
2686
+ },
2687
+ default: {
2688
+ bodyMapper: ErrorResponse
2689
+ }
2690
+ },
2691
+ queryParameters: [apiVersion],
2692
+ urlParameters: [
2693
+ $host,
2694
+ subscriptionId,
2695
+ resourceGroupName,
2696
+ storageMoverName,
2697
+ endpointName
2698
+ ],
2699
+ headerParameters: [accept],
2700
+ serializer: serializer$3
2701
+ };
2702
+ const createOrUpdateOperationSpec$2 = {
2703
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/endpoints/{endpointName}",
2704
+ httpMethod: "PUT",
2705
+ responses: {
2706
+ 200: {
2707
+ bodyMapper: Endpoint
2708
+ },
2709
+ default: {
2710
+ bodyMapper: ErrorResponse
2711
+ }
2712
+ },
2713
+ requestBody: endpoint,
2714
+ queryParameters: [apiVersion],
2715
+ urlParameters: [
2716
+ $host,
2717
+ subscriptionId,
2718
+ resourceGroupName,
2719
+ storageMoverName,
2720
+ endpointName
2721
+ ],
2722
+ headerParameters: [accept, contentType],
2723
+ mediaType: "json",
2724
+ serializer: serializer$3
2725
+ };
2726
+ const updateOperationSpec$2 = {
2727
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/endpoints/{endpointName}",
2728
+ httpMethod: "PATCH",
2729
+ responses: {
2730
+ 200: {
2731
+ bodyMapper: Endpoint
2732
+ },
2733
+ default: {
2734
+ bodyMapper: ErrorResponse
2735
+ }
2736
+ },
2737
+ requestBody: endpoint1,
2738
+ queryParameters: [apiVersion],
2739
+ urlParameters: [
2740
+ $host,
2741
+ subscriptionId,
2742
+ resourceGroupName,
2743
+ storageMoverName,
2744
+ endpointName
2745
+ ],
2746
+ headerParameters: [accept, contentType],
2747
+ mediaType: "json",
2748
+ serializer: serializer$3
2749
+ };
2750
+ const deleteOperationSpec$2 = {
2751
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/endpoints/{endpointName}",
2752
+ httpMethod: "DELETE",
2753
+ responses: {
2754
+ 200: {},
2755
+ 201: {},
2756
+ 202: {},
2757
+ 204: {},
2758
+ default: {
2759
+ bodyMapper: ErrorResponse
2760
+ }
2761
+ },
2762
+ queryParameters: [apiVersion],
2763
+ urlParameters: [
2764
+ $host,
2765
+ subscriptionId,
2766
+ resourceGroupName,
2767
+ storageMoverName,
2768
+ endpointName
2769
+ ],
2770
+ headerParameters: [accept],
2771
+ serializer: serializer$3
2772
+ };
2773
+ const listNextOperationSpec$3 = {
2774
+ path: "{nextLink}",
2775
+ httpMethod: "GET",
2776
+ responses: {
2777
+ 200: {
2778
+ bodyMapper: EndpointList
2779
+ },
2780
+ default: {
2781
+ bodyMapper: ErrorResponse
2782
+ }
2783
+ },
2784
+ urlParameters: [
2785
+ $host,
2786
+ nextLink,
2787
+ subscriptionId,
2788
+ resourceGroupName,
2789
+ storageMoverName
2790
+ ],
2791
+ headerParameters: [accept],
2792
+ serializer: serializer$3
2793
+ };
2794
+
2795
+ /*
2796
+ * Copyright (c) Microsoft Corporation.
2797
+ * Licensed under the MIT License.
2798
+ *
2799
+ * Code generated by Microsoft (R) AutoRest Code Generator.
2800
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
2801
+ */
2802
+ /// <reference lib="esnext.asynciterable" />
2803
+ /** Class containing Projects operations. */
2804
+ class ProjectsImpl {
2805
+ /**
2806
+ * Initialize a new instance of the class Projects class.
2807
+ * @param client Reference to the service client
2808
+ */
2809
+ constructor(client) {
2810
+ this.client = client;
2811
+ }
2812
+ /**
2813
+ * Lists all Projects in a Storage Mover.
2814
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2815
+ * @param storageMoverName The name of the Storage Mover resource.
2816
+ * @param options The options parameters.
2817
+ */
2818
+ list(resourceGroupName, storageMoverName, options) {
2819
+ const iter = this.listPagingAll(resourceGroupName, storageMoverName, options);
2820
+ return {
2821
+ next() {
2822
+ return iter.next();
2823
+ },
2824
+ [Symbol.asyncIterator]() {
2825
+ return this;
2826
+ },
2827
+ byPage: (settings) => {
2828
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
2829
+ throw new Error("maxPageSize is not supported by this operation.");
2830
+ }
2831
+ return this.listPagingPage(resourceGroupName, storageMoverName, options, settings);
2832
+ }
2833
+ };
2834
+ }
2835
+ listPagingPage(resourceGroupName, storageMoverName, options, settings) {
2836
+ return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
2837
+ let result;
2838
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
2839
+ if (!continuationToken) {
2840
+ result = yield tslib.__await(this._list(resourceGroupName, storageMoverName, options));
2841
+ let page = result.value || [];
2842
+ continuationToken = result.nextLink;
2843
+ setContinuationToken(page, continuationToken);
2844
+ yield yield tslib.__await(page);
2845
+ }
2846
+ while (continuationToken) {
2847
+ result = yield tslib.__await(this._listNext(resourceGroupName, storageMoverName, continuationToken, options));
2848
+ continuationToken = result.nextLink;
2849
+ let page = result.value || [];
2850
+ setContinuationToken(page, continuationToken);
2851
+ yield yield tslib.__await(page);
2852
+ }
2853
+ });
2854
+ }
2855
+ listPagingAll(resourceGroupName, storageMoverName, options) {
2856
+ return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
2857
+ var e_1, _a;
2858
+ try {
2859
+ for (var _b = tslib.__asyncValues(this.listPagingPage(resourceGroupName, storageMoverName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
2860
+ const page = _c.value;
2861
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
2862
+ }
2863
+ }
2864
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
2865
+ finally {
2866
+ try {
2867
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
2868
+ }
2869
+ finally { if (e_1) throw e_1.error; }
2870
+ }
2871
+ });
2872
+ }
2873
+ /**
2874
+ * Lists all Projects in a Storage Mover.
2875
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2876
+ * @param storageMoverName The name of the Storage Mover resource.
2877
+ * @param options The options parameters.
2878
+ */
2879
+ _list(resourceGroupName, storageMoverName, options) {
2880
+ return this.client.sendOperationRequest({ resourceGroupName, storageMoverName, options }, listOperationSpec$2);
2881
+ }
2882
+ /**
2883
+ * Gets a Project resource.
2884
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2885
+ * @param storageMoverName The name of the Storage Mover resource.
2886
+ * @param projectName The name of the Project resource.
2887
+ * @param options The options parameters.
2888
+ */
2889
+ get(resourceGroupName, storageMoverName, projectName, options) {
2890
+ return this.client.sendOperationRequest({ resourceGroupName, storageMoverName, projectName, options }, getOperationSpec$2);
2891
+ }
2892
+ /**
2893
+ * Creates or updates a Project resource, which is a logical grouping of related jobs.
2894
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2895
+ * @param storageMoverName The name of the Storage Mover resource.
2896
+ * @param projectName The name of the Project resource.
2897
+ * @param project The Project resource.
2898
+ * @param options The options parameters.
2899
+ */
2900
+ createOrUpdate(resourceGroupName, storageMoverName, projectName, project, options) {
2901
+ return this.client.sendOperationRequest({ resourceGroupName, storageMoverName, projectName, project, options }, createOrUpdateOperationSpec$1);
2902
+ }
2903
+ /**
2904
+ * Updates properties for a Project resource. Properties not specified in the request body will be
2905
+ * unchanged.
2906
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2907
+ * @param storageMoverName The name of the Storage Mover resource.
2908
+ * @param projectName The name of the Project resource.
2909
+ * @param project The Project resource.
2910
+ * @param options The options parameters.
2911
+ */
2912
+ update(resourceGroupName, storageMoverName, projectName, project, options) {
2913
+ return this.client.sendOperationRequest({ resourceGroupName, storageMoverName, projectName, project, options }, updateOperationSpec$1);
2914
+ }
2915
+ /**
2916
+ * Deletes a Project resource.
2917
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2918
+ * @param storageMoverName The name of the Storage Mover resource.
2919
+ * @param projectName The name of the Project resource.
2920
+ * @param options The options parameters.
2921
+ */
2922
+ beginDelete(resourceGroupName, storageMoverName, projectName, options) {
2923
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2924
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2925
+ return this.client.sendOperationRequest(args, spec);
2926
+ });
2927
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2928
+ var _a;
2929
+ let currentRawResponse = undefined;
2930
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
2931
+ const callback = (rawResponse, flatResponse) => {
2932
+ currentRawResponse = rawResponse;
2933
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
2934
+ };
2935
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
2936
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
2937
+ return {
2938
+ flatResponse,
2939
+ rawResponse: {
2940
+ statusCode: currentRawResponse.status,
2941
+ body: currentRawResponse.parsedBody,
2942
+ headers: currentRawResponse.headers.toJSON()
2943
+ }
2944
+ };
2945
+ });
2946
+ const lro = new LroImpl(sendOperation, { resourceGroupName, storageMoverName, projectName, options }, deleteOperationSpec$1);
2947
+ const poller = new coreLro.LroEngine(lro, {
2948
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2949
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
2950
+ lroResourceLocationConfig: "location"
2951
+ });
2952
+ yield poller.poll();
2953
+ return poller;
2954
+ });
2955
+ }
2956
+ /**
2957
+ * Deletes a Project resource.
2958
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2959
+ * @param storageMoverName The name of the Storage Mover resource.
2960
+ * @param projectName The name of the Project resource.
2961
+ * @param options The options parameters.
2962
+ */
2963
+ beginDeleteAndWait(resourceGroupName, storageMoverName, projectName, options) {
2964
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2965
+ const poller = yield this.beginDelete(resourceGroupName, storageMoverName, projectName, options);
2966
+ return poller.pollUntilDone();
2967
+ });
2968
+ }
2969
+ /**
2970
+ * ListNext
2971
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2972
+ * @param storageMoverName The name of the Storage Mover resource.
2973
+ * @param nextLink The nextLink from the previous successful call to the List method.
2974
+ * @param options The options parameters.
2975
+ */
2976
+ _listNext(resourceGroupName, storageMoverName, nextLink, options) {
2977
+ return this.client.sendOperationRequest({ resourceGroupName, storageMoverName, nextLink, options }, listNextOperationSpec$2);
2978
+ }
2979
+ }
2980
+ // Operation Specifications
2981
+ const serializer$2 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
2982
+ const listOperationSpec$2 = {
2983
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects",
2984
+ httpMethod: "GET",
2985
+ responses: {
2986
+ 200: {
2987
+ bodyMapper: ProjectList
2988
+ },
2989
+ default: {
2990
+ bodyMapper: ErrorResponse
2991
+ }
2992
+ },
2993
+ queryParameters: [apiVersion],
2994
+ urlParameters: [
2995
+ $host,
2996
+ subscriptionId,
2997
+ resourceGroupName,
2998
+ storageMoverName
2999
+ ],
3000
+ headerParameters: [accept],
3001
+ serializer: serializer$2
3002
+ };
3003
+ const getOperationSpec$2 = {
3004
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}",
3005
+ httpMethod: "GET",
3006
+ responses: {
3007
+ 200: {
3008
+ bodyMapper: Project
3009
+ },
3010
+ default: {
3011
+ bodyMapper: ErrorResponse
3012
+ }
3013
+ },
3014
+ queryParameters: [apiVersion],
3015
+ urlParameters: [
3016
+ $host,
3017
+ subscriptionId,
3018
+ resourceGroupName,
3019
+ storageMoverName,
3020
+ projectName
3021
+ ],
3022
+ headerParameters: [accept],
3023
+ serializer: serializer$2
3024
+ };
3025
+ const createOrUpdateOperationSpec$1 = {
3026
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}",
3027
+ httpMethod: "PUT",
3028
+ responses: {
3029
+ 200: {
3030
+ bodyMapper: Project
3031
+ },
3032
+ default: {
3033
+ bodyMapper: ErrorResponse
3034
+ }
3035
+ },
3036
+ requestBody: project,
3037
+ queryParameters: [apiVersion],
3038
+ urlParameters: [
3039
+ $host,
3040
+ subscriptionId,
3041
+ resourceGroupName,
3042
+ storageMoverName,
3043
+ projectName
3044
+ ],
3045
+ headerParameters: [accept, contentType],
3046
+ mediaType: "json",
3047
+ serializer: serializer$2
3048
+ };
3049
+ const updateOperationSpec$1 = {
3050
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}",
3051
+ httpMethod: "PATCH",
3052
+ responses: {
3053
+ 200: {
3054
+ bodyMapper: Project
3055
+ },
3056
+ default: {
3057
+ bodyMapper: ErrorResponse
3058
+ }
3059
+ },
3060
+ requestBody: project1,
3061
+ queryParameters: [apiVersion],
3062
+ urlParameters: [
3063
+ $host,
3064
+ subscriptionId,
3065
+ resourceGroupName,
3066
+ storageMoverName,
3067
+ projectName
3068
+ ],
3069
+ headerParameters: [accept, contentType],
3070
+ mediaType: "json",
3071
+ serializer: serializer$2
3072
+ };
3073
+ const deleteOperationSpec$1 = {
3074
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}",
3075
+ httpMethod: "DELETE",
3076
+ responses: {
3077
+ 200: {},
3078
+ 201: {},
3079
+ 202: {},
3080
+ 204: {},
3081
+ default: {
3082
+ bodyMapper: ErrorResponse
3083
+ }
3084
+ },
3085
+ queryParameters: [apiVersion],
3086
+ urlParameters: [
3087
+ $host,
3088
+ subscriptionId,
3089
+ resourceGroupName,
3090
+ storageMoverName,
3091
+ projectName
3092
+ ],
3093
+ headerParameters: [accept],
3094
+ serializer: serializer$2
3095
+ };
3096
+ const listNextOperationSpec$2 = {
3097
+ path: "{nextLink}",
3098
+ httpMethod: "GET",
3099
+ responses: {
3100
+ 200: {
3101
+ bodyMapper: ProjectList
3102
+ },
3103
+ default: {
3104
+ bodyMapper: ErrorResponse
3105
+ }
3106
+ },
3107
+ urlParameters: [
3108
+ $host,
3109
+ nextLink,
3110
+ subscriptionId,
3111
+ resourceGroupName,
3112
+ storageMoverName
3113
+ ],
3114
+ headerParameters: [accept],
3115
+ serializer: serializer$2
3116
+ };
3117
+
3118
+ /*
3119
+ * Copyright (c) Microsoft Corporation.
3120
+ * Licensed under the MIT License.
3121
+ *
3122
+ * Code generated by Microsoft (R) AutoRest Code Generator.
3123
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
3124
+ */
3125
+ /// <reference lib="esnext.asynciterable" />
3126
+ /** Class containing JobDefinitions operations. */
3127
+ class JobDefinitionsImpl {
3128
+ /**
3129
+ * Initialize a new instance of the class JobDefinitions class.
3130
+ * @param client Reference to the service client
3131
+ */
3132
+ constructor(client) {
3133
+ this.client = client;
3134
+ }
3135
+ /**
3136
+ * Lists all Job Definitions in a Project.
3137
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3138
+ * @param storageMoverName The name of the Storage Mover resource.
3139
+ * @param projectName The name of the Project resource.
3140
+ * @param options The options parameters.
3141
+ */
3142
+ list(resourceGroupName, storageMoverName, projectName, options) {
3143
+ const iter = this.listPagingAll(resourceGroupName, storageMoverName, projectName, options);
3144
+ return {
3145
+ next() {
3146
+ return iter.next();
3147
+ },
3148
+ [Symbol.asyncIterator]() {
3149
+ return this;
3150
+ },
3151
+ byPage: (settings) => {
3152
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
3153
+ throw new Error("maxPageSize is not supported by this operation.");
3154
+ }
3155
+ return this.listPagingPage(resourceGroupName, storageMoverName, projectName, options, settings);
3156
+ }
3157
+ };
3158
+ }
3159
+ listPagingPage(resourceGroupName, storageMoverName, projectName, options, settings) {
3160
+ return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
3161
+ let result;
3162
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
3163
+ if (!continuationToken) {
3164
+ result = yield tslib.__await(this._list(resourceGroupName, storageMoverName, projectName, options));
3165
+ let page = result.value || [];
3166
+ continuationToken = result.nextLink;
3167
+ setContinuationToken(page, continuationToken);
3168
+ yield yield tslib.__await(page);
3169
+ }
3170
+ while (continuationToken) {
3171
+ result = yield tslib.__await(this._listNext(resourceGroupName, storageMoverName, projectName, continuationToken, options));
3172
+ continuationToken = result.nextLink;
3173
+ let page = result.value || [];
3174
+ setContinuationToken(page, continuationToken);
3175
+ yield yield tslib.__await(page);
3176
+ }
3177
+ });
3178
+ }
3179
+ listPagingAll(resourceGroupName, storageMoverName, projectName, options) {
3180
+ return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
3181
+ var e_1, _a;
3182
+ try {
3183
+ for (var _b = tslib.__asyncValues(this.listPagingPage(resourceGroupName, storageMoverName, projectName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
3184
+ const page = _c.value;
3185
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
3186
+ }
3187
+ }
3188
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
3189
+ finally {
3190
+ try {
3191
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
3192
+ }
3193
+ finally { if (e_1) throw e_1.error; }
3194
+ }
3195
+ });
3196
+ }
3197
+ /**
3198
+ * Lists all Job Definitions in a Project.
3199
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3200
+ * @param storageMoverName The name of the Storage Mover resource.
3201
+ * @param projectName The name of the Project resource.
3202
+ * @param options The options parameters.
3203
+ */
3204
+ _list(resourceGroupName, storageMoverName, projectName, options) {
3205
+ return this.client.sendOperationRequest({ resourceGroupName, storageMoverName, projectName, options }, listOperationSpec$1);
3206
+ }
3207
+ /**
3208
+ * Gets a Job Definition resource.
3209
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3210
+ * @param storageMoverName The name of the Storage Mover resource.
3211
+ * @param projectName The name of the Project resource.
3212
+ * @param jobDefinitionName The name of the Job Definition resource.
3213
+ * @param options The options parameters.
3214
+ */
3215
+ get(resourceGroupName, storageMoverName, projectName, jobDefinitionName, options) {
3216
+ return this.client.sendOperationRequest({
3217
+ resourceGroupName,
3218
+ storageMoverName,
3219
+ projectName,
3220
+ jobDefinitionName,
3221
+ options
3222
+ }, getOperationSpec$1);
3223
+ }
3224
+ /**
3225
+ * Creates or updates a Job Definition resource, which contains configuration for a single unit of
3226
+ * managed data transfer.
3227
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3228
+ * @param storageMoverName The name of the Storage Mover resource.
3229
+ * @param projectName The name of the Project resource.
3230
+ * @param jobDefinitionName The name of the Job Definition resource.
3231
+ * @param jobDefinition The Job Definition resource.
3232
+ * @param options The options parameters.
3233
+ */
3234
+ createOrUpdate(resourceGroupName, storageMoverName, projectName, jobDefinitionName, jobDefinition, options) {
3235
+ return this.client.sendOperationRequest({
3236
+ resourceGroupName,
3237
+ storageMoverName,
3238
+ projectName,
3239
+ jobDefinitionName,
3240
+ jobDefinition,
3241
+ options
3242
+ }, createOrUpdateOperationSpec);
3243
+ }
3244
+ /**
3245
+ * Updates properties for a Job Definition resource. Properties not specified in the request body will
3246
+ * be unchanged.
3247
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3248
+ * @param storageMoverName The name of the Storage Mover resource.
3249
+ * @param projectName The name of the Project resource.
3250
+ * @param jobDefinitionName The name of the Job Definition resource.
3251
+ * @param jobDefinition The Job Definition resource.
3252
+ * @param options The options parameters.
3253
+ */
3254
+ update(resourceGroupName, storageMoverName, projectName, jobDefinitionName, jobDefinition, options) {
3255
+ return this.client.sendOperationRequest({
3256
+ resourceGroupName,
3257
+ storageMoverName,
3258
+ projectName,
3259
+ jobDefinitionName,
3260
+ jobDefinition,
3261
+ options
3262
+ }, updateOperationSpec);
3263
+ }
3264
+ /**
3265
+ * Deletes a Job Definition resource.
3266
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3267
+ * @param storageMoverName The name of the Storage Mover resource.
3268
+ * @param projectName The name of the Project resource.
3269
+ * @param jobDefinitionName The name of the Job Definition resource.
3270
+ * @param options The options parameters.
3271
+ */
3272
+ beginDelete(resourceGroupName, storageMoverName, projectName, jobDefinitionName, options) {
3273
+ return tslib.__awaiter(this, void 0, void 0, function* () {
3274
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
3275
+ return this.client.sendOperationRequest(args, spec);
3276
+ });
3277
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
3278
+ var _a;
3279
+ let currentRawResponse = undefined;
3280
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
3281
+ const callback = (rawResponse, flatResponse) => {
3282
+ currentRawResponse = rawResponse;
3283
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
3284
+ };
3285
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
3286
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
3287
+ return {
3288
+ flatResponse,
3289
+ rawResponse: {
3290
+ statusCode: currentRawResponse.status,
3291
+ body: currentRawResponse.parsedBody,
3292
+ headers: currentRawResponse.headers.toJSON()
3293
+ }
3294
+ };
3295
+ });
3296
+ const lro = new LroImpl(sendOperation, {
3297
+ resourceGroupName,
3298
+ storageMoverName,
3299
+ projectName,
3300
+ jobDefinitionName,
3301
+ options
3302
+ }, deleteOperationSpec);
3303
+ const poller = new coreLro.LroEngine(lro, {
3304
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
3305
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
3306
+ lroResourceLocationConfig: "location"
3307
+ });
3308
+ yield poller.poll();
3309
+ return poller;
3310
+ });
3311
+ }
3312
+ /**
3313
+ * Deletes a Job Definition resource.
3314
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3315
+ * @param storageMoverName The name of the Storage Mover resource.
3316
+ * @param projectName The name of the Project resource.
3317
+ * @param jobDefinitionName The name of the Job Definition resource.
3318
+ * @param options The options parameters.
3319
+ */
3320
+ beginDeleteAndWait(resourceGroupName, storageMoverName, projectName, jobDefinitionName, options) {
3321
+ return tslib.__awaiter(this, void 0, void 0, function* () {
3322
+ const poller = yield this.beginDelete(resourceGroupName, storageMoverName, projectName, jobDefinitionName, options);
3323
+ return poller.pollUntilDone();
3324
+ });
3325
+ }
3326
+ /**
3327
+ * Requests an Agent to start a new instance of this Job Definition, generating a new Job Run resource.
3328
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3329
+ * @param storageMoverName The name of the Storage Mover resource.
3330
+ * @param projectName The name of the Project resource.
3331
+ * @param jobDefinitionName The name of the Job Definition resource.
3332
+ * @param options The options parameters.
3333
+ */
3334
+ startJob(resourceGroupName, storageMoverName, projectName, jobDefinitionName, options) {
3335
+ return this.client.sendOperationRequest({
3336
+ resourceGroupName,
3337
+ storageMoverName,
3338
+ projectName,
3339
+ jobDefinitionName,
3340
+ options
3341
+ }, startJobOperationSpec);
3342
+ }
3343
+ /**
3344
+ * Requests the Agent of any active instance of this Job Definition to stop.
3345
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3346
+ * @param storageMoverName The name of the Storage Mover resource.
3347
+ * @param projectName The name of the Project resource.
3348
+ * @param jobDefinitionName The name of the Job Definition resource.
3349
+ * @param options The options parameters.
3350
+ */
3351
+ stopJob(resourceGroupName, storageMoverName, projectName, jobDefinitionName, options) {
3352
+ return this.client.sendOperationRequest({
3353
+ resourceGroupName,
3354
+ storageMoverName,
3355
+ projectName,
3356
+ jobDefinitionName,
3357
+ options
3358
+ }, stopJobOperationSpec);
3359
+ }
3360
+ /**
3361
+ * ListNext
3362
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3363
+ * @param storageMoverName The name of the Storage Mover resource.
3364
+ * @param projectName The name of the Project resource.
3365
+ * @param nextLink The nextLink from the previous successful call to the List method.
3366
+ * @param options The options parameters.
3367
+ */
3368
+ _listNext(resourceGroupName, storageMoverName, projectName, nextLink, options) {
3369
+ return this.client.sendOperationRequest({ resourceGroupName, storageMoverName, projectName, nextLink, options }, listNextOperationSpec$1);
3370
+ }
3371
+ }
3372
+ // Operation Specifications
3373
+ const serializer$1 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
3374
+ const listOperationSpec$1 = {
3375
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions",
3376
+ httpMethod: "GET",
3377
+ responses: {
3378
+ 200: {
3379
+ bodyMapper: JobDefinitionList
3380
+ },
3381
+ default: {
3382
+ bodyMapper: ErrorResponse
3383
+ }
3384
+ },
3385
+ queryParameters: [apiVersion],
3386
+ urlParameters: [
3387
+ $host,
3388
+ subscriptionId,
3389
+ resourceGroupName,
3390
+ storageMoverName,
3391
+ projectName
3392
+ ],
3393
+ headerParameters: [accept],
3394
+ serializer: serializer$1
3395
+ };
3396
+ const getOperationSpec$1 = {
3397
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}",
3398
+ httpMethod: "GET",
3399
+ responses: {
3400
+ 200: {
3401
+ bodyMapper: JobDefinition
3402
+ },
3403
+ default: {
3404
+ bodyMapper: ErrorResponse
3405
+ }
3406
+ },
3407
+ queryParameters: [apiVersion],
3408
+ urlParameters: [
3409
+ $host,
3410
+ subscriptionId,
3411
+ resourceGroupName,
3412
+ storageMoverName,
3413
+ projectName,
3414
+ jobDefinitionName
3415
+ ],
3416
+ headerParameters: [accept],
3417
+ serializer: serializer$1
3418
+ };
3419
+ const createOrUpdateOperationSpec = {
3420
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}",
3421
+ httpMethod: "PUT",
3422
+ responses: {
3423
+ 200: {
3424
+ bodyMapper: JobDefinition
3425
+ },
3426
+ default: {
3427
+ bodyMapper: ErrorResponse
3428
+ }
3429
+ },
3430
+ requestBody: jobDefinition,
3431
+ queryParameters: [apiVersion],
3432
+ urlParameters: [
3433
+ $host,
3434
+ subscriptionId,
3435
+ resourceGroupName,
3436
+ storageMoverName,
3437
+ projectName,
3438
+ jobDefinitionName
3439
+ ],
3440
+ headerParameters: [accept, contentType],
3441
+ mediaType: "json",
3442
+ serializer: serializer$1
3443
+ };
3444
+ const updateOperationSpec = {
3445
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}",
3446
+ httpMethod: "PATCH",
3447
+ responses: {
3448
+ 200: {
3449
+ bodyMapper: JobDefinition
3450
+ },
3451
+ default: {
3452
+ bodyMapper: ErrorResponse
3453
+ }
3454
+ },
3455
+ requestBody: jobDefinition1,
3456
+ queryParameters: [apiVersion],
3457
+ urlParameters: [
3458
+ $host,
3459
+ subscriptionId,
3460
+ resourceGroupName,
3461
+ storageMoverName,
3462
+ projectName,
3463
+ jobDefinitionName
3464
+ ],
3465
+ headerParameters: [accept, contentType],
3466
+ mediaType: "json",
3467
+ serializer: serializer$1
3468
+ };
3469
+ const deleteOperationSpec = {
3470
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}",
3471
+ httpMethod: "DELETE",
3472
+ responses: {
3473
+ 200: {},
3474
+ 201: {},
3475
+ 202: {},
3476
+ 204: {},
3477
+ default: {
3478
+ bodyMapper: ErrorResponse
3479
+ }
3480
+ },
3481
+ queryParameters: [apiVersion],
3482
+ urlParameters: [
3483
+ $host,
3484
+ subscriptionId,
3485
+ resourceGroupName,
3486
+ storageMoverName,
3487
+ projectName,
3488
+ jobDefinitionName
3489
+ ],
3490
+ headerParameters: [accept],
3491
+ serializer: serializer$1
3492
+ };
3493
+ const startJobOperationSpec = {
3494
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}/startJob",
3495
+ httpMethod: "POST",
3496
+ responses: {
3497
+ 200: {
3498
+ bodyMapper: JobRunResourceId
3499
+ },
3500
+ default: {
3501
+ bodyMapper: ErrorResponse
3502
+ }
3503
+ },
3504
+ queryParameters: [apiVersion],
3505
+ urlParameters: [
3506
+ $host,
3507
+ subscriptionId,
3508
+ resourceGroupName,
3509
+ storageMoverName,
3510
+ projectName,
3511
+ jobDefinitionName
3512
+ ],
3513
+ headerParameters: [accept],
3514
+ serializer: serializer$1
3515
+ };
3516
+ const stopJobOperationSpec = {
3517
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}/stopJob",
3518
+ httpMethod: "POST",
3519
+ responses: {
3520
+ 200: {
3521
+ bodyMapper: JobRunResourceId
3522
+ },
3523
+ default: {
3524
+ bodyMapper: ErrorResponse
3525
+ }
3526
+ },
3527
+ queryParameters: [apiVersion],
3528
+ urlParameters: [
3529
+ $host,
3530
+ subscriptionId,
3531
+ resourceGroupName,
3532
+ storageMoverName,
3533
+ projectName,
3534
+ jobDefinitionName
3535
+ ],
3536
+ headerParameters: [accept],
3537
+ serializer: serializer$1
3538
+ };
3539
+ const listNextOperationSpec$1 = {
3540
+ path: "{nextLink}",
3541
+ httpMethod: "GET",
3542
+ responses: {
3543
+ 200: {
3544
+ bodyMapper: JobDefinitionList
3545
+ },
3546
+ default: {
3547
+ bodyMapper: ErrorResponse
3548
+ }
3549
+ },
3550
+ urlParameters: [
3551
+ $host,
3552
+ nextLink,
3553
+ subscriptionId,
3554
+ resourceGroupName,
3555
+ storageMoverName,
3556
+ projectName
3557
+ ],
3558
+ headerParameters: [accept],
3559
+ serializer: serializer$1
3560
+ };
3561
+
3562
+ /*
3563
+ * Copyright (c) Microsoft Corporation.
3564
+ * Licensed under the MIT License.
3565
+ *
3566
+ * Code generated by Microsoft (R) AutoRest Code Generator.
3567
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
3568
+ */
3569
+ /// <reference lib="esnext.asynciterable" />
3570
+ /** Class containing JobRuns operations. */
3571
+ class JobRunsImpl {
3572
+ /**
3573
+ * Initialize a new instance of the class JobRuns class.
3574
+ * @param client Reference to the service client
3575
+ */
3576
+ constructor(client) {
3577
+ this.client = client;
3578
+ }
3579
+ /**
3580
+ * Lists all Job Runs in a Job Definition.
3581
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3582
+ * @param storageMoverName The name of the Storage Mover resource.
3583
+ * @param projectName The name of the Project resource.
3584
+ * @param jobDefinitionName The name of the Job Definition resource.
3585
+ * @param options The options parameters.
3586
+ */
3587
+ list(resourceGroupName, storageMoverName, projectName, jobDefinitionName, options) {
3588
+ const iter = this.listPagingAll(resourceGroupName, storageMoverName, projectName, jobDefinitionName, options);
3589
+ return {
3590
+ next() {
3591
+ return iter.next();
3592
+ },
3593
+ [Symbol.asyncIterator]() {
3594
+ return this;
3595
+ },
3596
+ byPage: (settings) => {
3597
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
3598
+ throw new Error("maxPageSize is not supported by this operation.");
3599
+ }
3600
+ return this.listPagingPage(resourceGroupName, storageMoverName, projectName, jobDefinitionName, options, settings);
3601
+ }
3602
+ };
3603
+ }
3604
+ listPagingPage(resourceGroupName, storageMoverName, projectName, jobDefinitionName, options, settings) {
3605
+ return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
3606
+ let result;
3607
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
3608
+ if (!continuationToken) {
3609
+ result = yield tslib.__await(this._list(resourceGroupName, storageMoverName, projectName, jobDefinitionName, options));
3610
+ let page = result.value || [];
3611
+ continuationToken = result.nextLink;
3612
+ setContinuationToken(page, continuationToken);
3613
+ yield yield tslib.__await(page);
3614
+ }
3615
+ while (continuationToken) {
3616
+ result = yield tslib.__await(this._listNext(resourceGroupName, storageMoverName, projectName, jobDefinitionName, continuationToken, options));
3617
+ continuationToken = result.nextLink;
3618
+ let page = result.value || [];
3619
+ setContinuationToken(page, continuationToken);
3620
+ yield yield tslib.__await(page);
3621
+ }
3622
+ });
3623
+ }
3624
+ listPagingAll(resourceGroupName, storageMoverName, projectName, jobDefinitionName, options) {
3625
+ return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
3626
+ var e_1, _a;
3627
+ try {
3628
+ for (var _b = tslib.__asyncValues(this.listPagingPage(resourceGroupName, storageMoverName, projectName, jobDefinitionName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
3629
+ const page = _c.value;
3630
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
3631
+ }
3632
+ }
3633
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
3634
+ finally {
3635
+ try {
3636
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
3637
+ }
3638
+ finally { if (e_1) throw e_1.error; }
3639
+ }
3640
+ });
3641
+ }
3642
+ /**
3643
+ * Lists all Job Runs in a Job Definition.
3644
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3645
+ * @param storageMoverName The name of the Storage Mover resource.
3646
+ * @param projectName The name of the Project resource.
3647
+ * @param jobDefinitionName The name of the Job Definition resource.
3648
+ * @param options The options parameters.
3649
+ */
3650
+ _list(resourceGroupName, storageMoverName, projectName, jobDefinitionName, options) {
3651
+ return this.client.sendOperationRequest({
3652
+ resourceGroupName,
3653
+ storageMoverName,
3654
+ projectName,
3655
+ jobDefinitionName,
3656
+ options
3657
+ }, listOperationSpec);
3658
+ }
3659
+ /**
3660
+ * Gets a Job Run resource.
3661
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3662
+ * @param storageMoverName The name of the Storage Mover resource.
3663
+ * @param projectName The name of the Project resource.
3664
+ * @param jobDefinitionName The name of the Job Definition resource.
3665
+ * @param jobRunName The name of the Job Run resource.
3666
+ * @param options The options parameters.
3667
+ */
3668
+ get(resourceGroupName, storageMoverName, projectName, jobDefinitionName, jobRunName, options) {
3669
+ return this.client.sendOperationRequest({
3670
+ resourceGroupName,
3671
+ storageMoverName,
3672
+ projectName,
3673
+ jobDefinitionName,
3674
+ jobRunName,
3675
+ options
3676
+ }, getOperationSpec);
3677
+ }
3678
+ /**
3679
+ * ListNext
3680
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3681
+ * @param storageMoverName The name of the Storage Mover resource.
3682
+ * @param projectName The name of the Project resource.
3683
+ * @param jobDefinitionName The name of the Job Definition resource.
3684
+ * @param nextLink The nextLink from the previous successful call to the List method.
3685
+ * @param options The options parameters.
3686
+ */
3687
+ _listNext(resourceGroupName, storageMoverName, projectName, jobDefinitionName, nextLink, options) {
3688
+ return this.client.sendOperationRequest({
3689
+ resourceGroupName,
3690
+ storageMoverName,
3691
+ projectName,
3692
+ jobDefinitionName,
3693
+ nextLink,
3694
+ options
3695
+ }, listNextOperationSpec);
3696
+ }
3697
+ }
3698
+ // Operation Specifications
3699
+ const serializer = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
3700
+ const listOperationSpec = {
3701
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}/jobRuns",
3702
+ httpMethod: "GET",
3703
+ responses: {
3704
+ 200: {
3705
+ bodyMapper: JobRunList
3706
+ },
3707
+ default: {
3708
+ bodyMapper: ErrorResponse
3709
+ }
3710
+ },
3711
+ queryParameters: [apiVersion],
3712
+ urlParameters: [
3713
+ $host,
3714
+ subscriptionId,
3715
+ resourceGroupName,
3716
+ storageMoverName,
3717
+ projectName,
3718
+ jobDefinitionName
3719
+ ],
3720
+ headerParameters: [accept],
3721
+ serializer
3722
+ };
3723
+ const getOperationSpec = {
3724
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}/jobRuns/{jobRunName}",
3725
+ httpMethod: "GET",
3726
+ responses: {
3727
+ 200: {
3728
+ bodyMapper: JobRun
3729
+ },
3730
+ default: {
3731
+ bodyMapper: ErrorResponse
3732
+ }
3733
+ },
3734
+ queryParameters: [apiVersion],
3735
+ urlParameters: [
3736
+ $host,
3737
+ subscriptionId,
3738
+ resourceGroupName,
3739
+ storageMoverName,
3740
+ projectName,
3741
+ jobDefinitionName,
3742
+ jobRunName
3743
+ ],
3744
+ headerParameters: [accept],
3745
+ serializer
3746
+ };
3747
+ const listNextOperationSpec = {
3748
+ path: "{nextLink}",
3749
+ httpMethod: "GET",
3750
+ responses: {
3751
+ 200: {
3752
+ bodyMapper: JobRunList
3753
+ },
3754
+ default: {
3755
+ bodyMapper: ErrorResponse
3756
+ }
3757
+ },
3758
+ urlParameters: [
3759
+ $host,
3760
+ nextLink,
3761
+ subscriptionId,
3762
+ resourceGroupName,
3763
+ storageMoverName,
3764
+ projectName,
3765
+ jobDefinitionName
3766
+ ],
3767
+ headerParameters: [accept],
3768
+ serializer
3769
+ };
3770
+
3771
+ /*
3772
+ * Copyright (c) Microsoft Corporation.
3773
+ * Licensed under the MIT License.
3774
+ *
3775
+ * Code generated by Microsoft (R) AutoRest Code Generator.
3776
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
3777
+ */
3778
+ class StorageMoverClient extends coreClient__namespace.ServiceClient {
3779
+ /**
3780
+ * Initializes a new instance of the StorageMoverClient class.
3781
+ * @param credentials Subscription credentials which uniquely identify client subscription.
3782
+ * @param subscriptionId The ID of the target subscription.
3783
+ * @param options The parameter options
3784
+ */
3785
+ constructor(credentials, subscriptionId, options) {
3786
+ var _a, _b, _c;
3787
+ if (credentials === undefined) {
3788
+ throw new Error("'credentials' cannot be null");
3789
+ }
3790
+ if (subscriptionId === undefined) {
3791
+ throw new Error("'subscriptionId' cannot be null");
3792
+ }
3793
+ // Initializing default values for options
3794
+ if (!options) {
3795
+ options = {};
3796
+ }
3797
+ const defaults = {
3798
+ requestContentType: "application/json; charset=utf-8",
3799
+ credential: credentials
3800
+ };
3801
+ const packageDetails = `azsdk-js-arm-storagemover/1.0.0-beta.1`;
3802
+ const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
3803
+ ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
3804
+ : `${packageDetails}`;
3805
+ const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
3806
+ userAgentPrefix
3807
+ }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
3808
+ super(optionsWithDefaults);
3809
+ let bearerTokenAuthenticationPolicyFound = false;
3810
+ if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
3811
+ const pipelinePolicies = options.pipeline.getOrderedPolicies();
3812
+ bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
3813
+ coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName);
3814
+ }
3815
+ if (!options ||
3816
+ !options.pipeline ||
3817
+ options.pipeline.getOrderedPolicies().length == 0 ||
3818
+ !bearerTokenAuthenticationPolicyFound) {
3819
+ this.pipeline.removePolicy({
3820
+ name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName
3821
+ });
3822
+ this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
3823
+ credential: credentials,
3824
+ scopes: (_c = optionsWithDefaults.credentialScopes) !== null && _c !== void 0 ? _c : `${optionsWithDefaults.endpoint}/.default`,
3825
+ challengeCallbacks: {
3826
+ authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
3827
+ }
3828
+ }));
3829
+ }
3830
+ // Parameter assignments
3831
+ this.subscriptionId = subscriptionId;
3832
+ // Assigning values to Constant parameters
3833
+ this.$host = options.$host || "https://management.azure.com";
3834
+ this.apiVersion = options.apiVersion || "2022-07-01-preview";
3835
+ this.operations = new OperationsImpl(this);
3836
+ this.storageMovers = new StorageMoversImpl(this);
3837
+ this.agents = new AgentsImpl(this);
3838
+ this.endpoints = new EndpointsImpl(this);
3839
+ this.projects = new ProjectsImpl(this);
3840
+ this.jobDefinitions = new JobDefinitionsImpl(this);
3841
+ this.jobRuns = new JobRunsImpl(this);
3842
+ this.addCustomApiVersionPolicy(options.apiVersion);
3843
+ }
3844
+ /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
3845
+ addCustomApiVersionPolicy(apiVersion) {
3846
+ if (!apiVersion) {
3847
+ return;
3848
+ }
3849
+ const apiVersionPolicy = {
3850
+ name: "CustomApiVersionPolicy",
3851
+ sendRequest(request, next) {
3852
+ return tslib.__awaiter(this, void 0, void 0, function* () {
3853
+ const param = request.url.split("?");
3854
+ if (param.length > 1) {
3855
+ const newParams = param[1].split("&").map((item) => {
3856
+ if (item.indexOf("api-version") > -1) {
3857
+ return "api-version=" + apiVersion;
3858
+ }
3859
+ else {
3860
+ return item;
3861
+ }
3862
+ });
3863
+ request.url = param[0] + "?" + newParams.join("&");
3864
+ }
3865
+ return next(request);
3866
+ });
3867
+ }
3868
+ };
3869
+ this.pipeline.addPolicy(apiVersionPolicy);
3870
+ }
3871
+ }
3872
+
3873
+ exports.StorageMoverClient = StorageMoverClient;
3874
+ exports.getContinuationToken = getContinuationToken;
3875
+ //# sourceMappingURL=index.js.map