@azure/arm-resourcemover 2.1.1-alpha.20231023.1 → 2.2.0

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 (168) hide show
  1. package/CHANGELOG.md +14 -11
  2. package/LICENSE +1 -1
  3. package/dist/index.js +144 -79
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.min.js +1 -1
  6. package/dist/index.min.js.map +1 -1
  7. package/dist-esm/samples-dev/moveCollectionsBulkRemoveSample.js +11 -4
  8. package/dist-esm/samples-dev/moveCollectionsBulkRemoveSample.js.map +1 -1
  9. package/dist-esm/samples-dev/moveCollectionsCommitSample.js +11 -4
  10. package/dist-esm/samples-dev/moveCollectionsCommitSample.js.map +1 -1
  11. package/dist-esm/samples-dev/moveCollectionsCreateSample.js +16 -5
  12. package/dist-esm/samples-dev/moveCollectionsCreateSample.js.map +1 -1
  13. package/dist-esm/samples-dev/moveCollectionsDeleteSample.js +11 -4
  14. package/dist-esm/samples-dev/moveCollectionsDeleteSample.js.map +1 -1
  15. package/dist-esm/samples-dev/moveCollectionsDiscardSample.js +11 -4
  16. package/dist-esm/samples-dev/moveCollectionsDiscardSample.js.map +1 -1
  17. package/dist-esm/samples-dev/moveCollectionsGetSample.js +11 -4
  18. package/dist-esm/samples-dev/moveCollectionsGetSample.js.map +1 -1
  19. package/dist-esm/samples-dev/moveCollectionsInitiateMoveSample.js +11 -4
  20. package/dist-esm/samples-dev/moveCollectionsInitiateMoveSample.js.map +1 -1
  21. package/dist-esm/samples-dev/moveCollectionsListMoveCollectionsByResourceGroupSample.js +11 -4
  22. package/dist-esm/samples-dev/moveCollectionsListMoveCollectionsByResourceGroupSample.js.map +1 -1
  23. package/dist-esm/samples-dev/moveCollectionsListMoveCollectionsBySubscriptionSample.js +10 -3
  24. package/dist-esm/samples-dev/moveCollectionsListMoveCollectionsBySubscriptionSample.js.map +1 -1
  25. package/dist-esm/samples-dev/moveCollectionsListRequiredForSample.js +11 -4
  26. package/dist-esm/samples-dev/moveCollectionsListRequiredForSample.js.map +1 -1
  27. package/dist-esm/samples-dev/moveCollectionsPrepareSample.js +11 -4
  28. package/dist-esm/samples-dev/moveCollectionsPrepareSample.js.map +1 -1
  29. package/dist-esm/samples-dev/moveCollectionsResolveDependenciesSample.js +11 -4
  30. package/dist-esm/samples-dev/moveCollectionsResolveDependenciesSample.js.map +1 -1
  31. package/dist-esm/samples-dev/moveCollectionsUpdateSample.js +11 -4
  32. package/dist-esm/samples-dev/moveCollectionsUpdateSample.js.map +1 -1
  33. package/dist-esm/samples-dev/moveResourcesCreateSample.js +11 -4
  34. package/dist-esm/samples-dev/moveResourcesCreateSample.js.map +1 -1
  35. package/dist-esm/samples-dev/moveResourcesDeleteSample.js +11 -4
  36. package/dist-esm/samples-dev/moveResourcesDeleteSample.js.map +1 -1
  37. package/dist-esm/samples-dev/moveResourcesGetSample.js +11 -4
  38. package/dist-esm/samples-dev/moveResourcesGetSample.js.map +1 -1
  39. package/dist-esm/samples-dev/moveResourcesListSample.js +11 -4
  40. package/dist-esm/samples-dev/moveResourcesListSample.js.map +1 -1
  41. package/dist-esm/samples-dev/operationsDiscoveryGetSample.js +10 -4
  42. package/dist-esm/samples-dev/operationsDiscoveryGetSample.js.map +1 -1
  43. package/dist-esm/samples-dev/unresolvedDependenciesGetSample.js +11 -4
  44. package/dist-esm/samples-dev/unresolvedDependenciesGetSample.js.map +1 -1
  45. package/dist-esm/src/lroImpl.d.ts +6 -11
  46. package/dist-esm/src/lroImpl.d.ts.map +1 -1
  47. package/dist-esm/src/lroImpl.js +12 -20
  48. package/dist-esm/src/lroImpl.js.map +1 -1
  49. package/dist-esm/src/models/index.d.ts +27 -3
  50. package/dist-esm/src/models/index.d.ts.map +1 -1
  51. package/dist-esm/src/models/index.js +8 -0
  52. package/dist-esm/src/models/index.js.map +1 -1
  53. package/dist-esm/src/models/mappers.d.ts.map +1 -1
  54. package/dist-esm/src/models/mappers.js +24 -3
  55. package/dist-esm/src/models/mappers.js.map +1 -1
  56. package/dist-esm/src/models/parameters.js +1 -1
  57. package/dist-esm/src/operations/moveCollections.d.ts +8 -8
  58. package/dist-esm/src/operations/moveCollections.d.ts.map +1 -1
  59. package/dist-esm/src/operations/moveCollections.js +65 -37
  60. package/dist-esm/src/operations/moveCollections.js.map +1 -1
  61. package/dist-esm/src/operations/moveResources.d.ts +3 -3
  62. package/dist-esm/src/operations/moveResources.d.ts.map +1 -1
  63. package/dist-esm/src/operations/moveResources.js +30 -12
  64. package/dist-esm/src/operations/moveResources.js.map +1 -1
  65. package/dist-esm/src/operationsInterfaces/moveCollections.d.ts +8 -8
  66. package/dist-esm/src/operationsInterfaces/moveCollections.d.ts.map +1 -1
  67. package/dist-esm/src/operationsInterfaces/moveResources.d.ts +3 -3
  68. package/dist-esm/src/operationsInterfaces/moveResources.d.ts.map +1 -1
  69. package/dist-esm/src/resourceMoverServiceAPI.d.ts +2 -1
  70. package/dist-esm/src/resourceMoverServiceAPI.d.ts.map +1 -1
  71. package/dist-esm/src/resourceMoverServiceAPI.js +9 -11
  72. package/dist-esm/src/resourceMoverServiceAPI.js.map +1 -1
  73. package/dist-esm/test/resourcemover_operations_test.spec.d.ts +4 -0
  74. package/dist-esm/test/resourcemover_operations_test.spec.d.ts.map +1 -0
  75. package/dist-esm/test/resourcemover_operations_test.spec.js +118 -0
  76. package/dist-esm/test/resourcemover_operations_test.spec.js.map +1 -0
  77. package/package.json +10 -9
  78. package/review/arm-resourcemover.api.md +29 -15
  79. package/src/lroImpl.ts +31 -23
  80. package/src/models/index.ts +29 -3
  81. package/src/models/mappers.ts +24 -3
  82. package/src/models/parameters.ts +1 -1
  83. package/src/operations/moveCollections.ts +104 -79
  84. package/src/operations/moveResources.ts +44 -24
  85. package/src/operationsInterfaces/moveCollections.ts +15 -15
  86. package/src/operationsInterfaces/moveResources.ts +5 -5
  87. package/src/resourceMoverServiceAPI.ts +19 -5
  88. package/types/arm-resourcemover.d.ts +42 -15
  89. package/dist-esm/samples-dev/moveCollectionsBulkRemove.d.ts +0 -2
  90. package/dist-esm/samples-dev/moveCollectionsBulkRemove.d.ts.map +0 -1
  91. package/dist-esm/samples-dev/moveCollectionsBulkRemove.js +0 -38
  92. package/dist-esm/samples-dev/moveCollectionsBulkRemove.js.map +0 -1
  93. package/dist-esm/samples-dev/moveCollectionsCommit.d.ts +0 -2
  94. package/dist-esm/samples-dev/moveCollectionsCommit.d.ts.map +0 -1
  95. package/dist-esm/samples-dev/moveCollectionsCommit.js +0 -38
  96. package/dist-esm/samples-dev/moveCollectionsCommit.js.map +0 -1
  97. package/dist-esm/samples-dev/moveCollectionsCreate.d.ts +0 -2
  98. package/dist-esm/samples-dev/moveCollectionsCreate.d.ts.map +0 -1
  99. package/dist-esm/samples-dev/moveCollectionsCreate.js +0 -37
  100. package/dist-esm/samples-dev/moveCollectionsCreate.js.map +0 -1
  101. package/dist-esm/samples-dev/moveCollectionsDelete.d.ts +0 -2
  102. package/dist-esm/samples-dev/moveCollectionsDelete.d.ts.map +0 -1
  103. package/dist-esm/samples-dev/moveCollectionsDelete.js +0 -31
  104. package/dist-esm/samples-dev/moveCollectionsDelete.js.map +0 -1
  105. package/dist-esm/samples-dev/moveCollectionsDiscard.d.ts +0 -2
  106. package/dist-esm/samples-dev/moveCollectionsDiscard.d.ts.map +0 -1
  107. package/dist-esm/samples-dev/moveCollectionsDiscard.js +0 -38
  108. package/dist-esm/samples-dev/moveCollectionsDiscard.js.map +0 -1
  109. package/dist-esm/samples-dev/moveCollectionsGet.d.ts +0 -2
  110. package/dist-esm/samples-dev/moveCollectionsGet.d.ts.map +0 -1
  111. package/dist-esm/samples-dev/moveCollectionsGet.js +0 -31
  112. package/dist-esm/samples-dev/moveCollectionsGet.js.map +0 -1
  113. package/dist-esm/samples-dev/moveCollectionsInitiateMove.d.ts +0 -2
  114. package/dist-esm/samples-dev/moveCollectionsInitiateMove.d.ts.map +0 -1
  115. package/dist-esm/samples-dev/moveCollectionsInitiateMove.js +0 -38
  116. package/dist-esm/samples-dev/moveCollectionsInitiateMove.js.map +0 -1
  117. package/dist-esm/samples-dev/moveCollectionsListMoveCollectionsByResourceGroup.d.ts +0 -2
  118. package/dist-esm/samples-dev/moveCollectionsListMoveCollectionsByResourceGroup.d.ts.map +0 -1
  119. package/dist-esm/samples-dev/moveCollectionsListMoveCollectionsByResourceGroup.js +0 -46
  120. package/dist-esm/samples-dev/moveCollectionsListMoveCollectionsByResourceGroup.js.map +0 -1
  121. package/dist-esm/samples-dev/moveCollectionsListMoveCollectionsBySubscription.d.ts +0 -2
  122. package/dist-esm/samples-dev/moveCollectionsListMoveCollectionsBySubscription.d.ts.map +0 -1
  123. package/dist-esm/samples-dev/moveCollectionsListMoveCollectionsBySubscription.js +0 -45
  124. package/dist-esm/samples-dev/moveCollectionsListMoveCollectionsBySubscription.js.map +0 -1
  125. package/dist-esm/samples-dev/moveCollectionsPrepare.d.ts +0 -2
  126. package/dist-esm/samples-dev/moveCollectionsPrepare.d.ts.map +0 -1
  127. package/dist-esm/samples-dev/moveCollectionsPrepare.js +0 -38
  128. package/dist-esm/samples-dev/moveCollectionsPrepare.js.map +0 -1
  129. package/dist-esm/samples-dev/moveCollectionsResolveDependencies.d.ts +0 -2
  130. package/dist-esm/samples-dev/moveCollectionsResolveDependencies.d.ts.map +0 -1
  131. package/dist-esm/samples-dev/moveCollectionsResolveDependencies.js +0 -31
  132. package/dist-esm/samples-dev/moveCollectionsResolveDependencies.js.map +0 -1
  133. package/dist-esm/samples-dev/moveCollectionsUpdate.d.ts +0 -2
  134. package/dist-esm/samples-dev/moveCollectionsUpdate.d.ts.map +0 -1
  135. package/dist-esm/samples-dev/moveCollectionsUpdate.js +0 -36
  136. package/dist-esm/samples-dev/moveCollectionsUpdate.js.map +0 -1
  137. package/dist-esm/samples-dev/moveResourcesCreate.d.ts +0 -2
  138. package/dist-esm/samples-dev/moveResourcesCreate.d.ts.map +0 -1
  139. package/dist-esm/samples-dev/moveResourcesCreate.js +0 -54
  140. package/dist-esm/samples-dev/moveResourcesCreate.js.map +0 -1
  141. package/dist-esm/samples-dev/moveResourcesDelete.d.ts +0 -2
  142. package/dist-esm/samples-dev/moveResourcesDelete.d.ts.map +0 -1
  143. package/dist-esm/samples-dev/moveResourcesDelete.js +0 -32
  144. package/dist-esm/samples-dev/moveResourcesDelete.js.map +0 -1
  145. package/dist-esm/samples-dev/moveResourcesGet.d.ts +0 -2
  146. package/dist-esm/samples-dev/moveResourcesGet.d.ts.map +0 -1
  147. package/dist-esm/samples-dev/moveResourcesGet.js +0 -32
  148. package/dist-esm/samples-dev/moveResourcesGet.js.map +0 -1
  149. package/dist-esm/samples-dev/moveResourcesList.d.ts +0 -2
  150. package/dist-esm/samples-dev/moveResourcesList.d.ts.map +0 -1
  151. package/dist-esm/samples-dev/moveResourcesList.js +0 -47
  152. package/dist-esm/samples-dev/moveResourcesList.js.map +0 -1
  153. package/dist-esm/samples-dev/operationsDiscoveryGet.d.ts +0 -2
  154. package/dist-esm/samples-dev/operationsDiscoveryGet.d.ts.map +0 -1
  155. package/dist-esm/samples-dev/operationsDiscoveryGet.js +0 -29
  156. package/dist-esm/samples-dev/operationsDiscoveryGet.js.map +0 -1
  157. package/dist-esm/samples-dev/requiredForGet.d.ts +0 -2
  158. package/dist-esm/samples-dev/requiredForGet.d.ts.map +0 -1
  159. package/dist-esm/samples-dev/requiredForGet.js +0 -32
  160. package/dist-esm/samples-dev/requiredForGet.js.map +0 -1
  161. package/dist-esm/samples-dev/unresolvedDependenciesGet.d.ts +0 -2
  162. package/dist-esm/samples-dev/unresolvedDependenciesGet.d.ts.map +0 -1
  163. package/dist-esm/samples-dev/unresolvedDependenciesGet.js +0 -47
  164. package/dist-esm/samples-dev/unresolvedDependenciesGet.js.map +0 -1
  165. package/dist-esm/test/sampleTest.d.ts +0 -2
  166. package/dist-esm/test/sampleTest.d.ts.map +0 -1
  167. package/dist-esm/test/sampleTest.js +0 -38
  168. package/dist-esm/test/sampleTest.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,15 +1,18 @@
1
1
  # Release History
2
+
3
+ ## 2.2.0 (2023-10-24)
4
+
5
+ **Features**
2
6
 
3
- ## 2.1.1 (Unreleased)
4
-
5
- ### Features Added
6
-
7
- ### Breaking Changes
8
-
9
- ### Bugs Fixed
10
-
11
- ### Other Changes
12
-
7
+ - Added Type Alias MoveType
8
+ - Interface MoveCollectionProperties has a new optional parameter moveRegion
9
+ - Interface MoveCollectionProperties has a new optional parameter moveType
10
+ - Interface MoveCollectionProperties has a new optional parameter version
11
+ - Interface ResourceSettings has a new optional parameter targetResourceGroupName
12
+ - Added Enum KnownMoveType
13
+ - Class ResourceMoverServiceAPI has a new signature
14
+
15
+
13
16
  ## 2.1.0 (2022-12-12)
14
17
 
15
18
  **Features**
@@ -55,4 +58,4 @@ To understand the detail of the change, please refer to [Changelog](https://aka.
55
58
 
56
59
  To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/js-track2-migration-guide).
57
60
 
58
- To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart ).
61
+ To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart).
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2022 Microsoft
3
+ Copyright (c) 2023 Microsoft
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/dist/index.js CHANGED
@@ -86,6 +86,14 @@ exports.KnownProvisioningState = void 0;
86
86
  /** Failed */
87
87
  KnownProvisioningState["Failed"] = "Failed";
88
88
  })(exports.KnownProvisioningState || (exports.KnownProvisioningState = {}));
89
+ /** Known values of {@link MoveType} that the service accepts. */
90
+ exports.KnownMoveType = void 0;
91
+ (function (KnownMoveType) {
92
+ /** RegionToRegion */
93
+ KnownMoveType["RegionToRegion"] = "RegionToRegion";
94
+ /** RegionToZone */
95
+ KnownMoveType["RegionToZone"] = "RegionToZone";
96
+ })(exports.KnownMoveType || (exports.KnownMoveType = {}));
89
97
  /** Known values of {@link CreatedByType} that the service accepts. */
90
98
  exports.KnownCreatedByType = void 0;
91
99
  (function (KnownCreatedByType) {
@@ -301,14 +309,18 @@ const MoveCollectionProperties = {
301
309
  modelProperties: {
302
310
  sourceRegion: {
303
311
  serializedName: "sourceRegion",
304
- required: true,
305
312
  type: {
306
313
  name: "String"
307
314
  }
308
315
  },
309
316
  targetRegion: {
310
317
  serializedName: "targetRegion",
311
- required: true,
318
+ type: {
319
+ name: "String"
320
+ }
321
+ },
322
+ moveRegion: {
323
+ serializedName: "moveRegion",
312
324
  type: {
313
325
  name: "String"
314
326
  }
@@ -320,6 +332,18 @@ const MoveCollectionProperties = {
320
332
  name: "String"
321
333
  }
322
334
  },
335
+ version: {
336
+ serializedName: "version",
337
+ type: {
338
+ name: "String"
339
+ }
340
+ },
341
+ moveType: {
342
+ serializedName: "moveType",
343
+ type: {
344
+ name: "String"
345
+ }
346
+ },
323
347
  errors: {
324
348
  serializedName: "errors",
325
349
  type: {
@@ -1015,7 +1039,12 @@ const ResourceSettings = {
1015
1039
  },
1016
1040
  targetResourceName: {
1017
1041
  serializedName: "targetResourceName",
1018
- required: true,
1042
+ type: {
1043
+ name: "String"
1044
+ }
1045
+ },
1046
+ targetResourceGroupName: {
1047
+ serializedName: "targetResourceGroupName",
1019
1048
  type: {
1020
1049
  name: "String"
1021
1050
  }
@@ -2342,7 +2371,7 @@ const moveCollectionName = {
2342
2371
  const apiVersion = {
2343
2372
  parameterPath: "apiVersion",
2344
2373
  mapper: {
2345
- defaultValue: "2021-08-01",
2374
+ defaultValue: "2023-08-01",
2346
2375
  isConstant: true,
2347
2376
  serializedName: "api-version",
2348
2377
  type: {
@@ -2444,25 +2473,17 @@ const orderby = {
2444
2473
  * Code generated by Microsoft (R) AutoRest Code Generator.
2445
2474
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
2446
2475
  */
2447
- class LroImpl {
2448
- constructor(sendOperationFn, args, spec, requestPath = spec.path, requestMethod = spec.httpMethod) {
2449
- this.sendOperationFn = sendOperationFn;
2450
- this.args = args;
2451
- this.spec = spec;
2452
- this.requestPath = requestPath;
2453
- this.requestMethod = requestMethod;
2454
- }
2455
- sendInitialRequest() {
2456
- return tslib.__awaiter(this, void 0, void 0, function* () {
2457
- return this.sendOperationFn(this.args, this.spec);
2458
- });
2459
- }
2460
- sendPollRequest(path) {
2461
- return tslib.__awaiter(this, void 0, void 0, function* () {
2462
- const _a = this.spec, restSpec = tslib.__rest(_a, ["requestBody"]);
2463
- return this.sendOperationFn(this.args, Object.assign(Object.assign({}, restSpec), { path, httpMethod: "GET" }));
2464
- });
2465
- }
2476
+ function createLroSpec(inputs) {
2477
+ const { args, spec, sendOperationFn } = inputs;
2478
+ return {
2479
+ requestMethod: spec.httpMethod,
2480
+ requestPath: spec.path,
2481
+ sendInitialRequest: () => sendOperationFn(args, spec),
2482
+ sendPollRequest: (path, options) => {
2483
+ const restSpec = tslib.__rest(spec, ["requestBody"]);
2484
+ return sendOperationFn(args, Object.assign(Object.assign({}, restSpec), { httpMethod: "GET", path, abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal }));
2485
+ }
2486
+ };
2466
2487
  }
2467
2488
 
2468
2489
  /*
@@ -2634,7 +2655,7 @@ class MoveCollectionsImpl {
2634
2655
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2635
2656
  return this.client.sendOperationRequest(args, spec);
2636
2657
  });
2637
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2658
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2638
2659
  var _a;
2639
2660
  let currentRawResponse = undefined;
2640
2661
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -2653,11 +2674,15 @@ class MoveCollectionsImpl {
2653
2674
  }
2654
2675
  };
2655
2676
  });
2656
- const lro = new LroImpl(sendOperation, { resourceGroupName, moveCollectionName, options }, deleteOperationSpec$1);
2657
- const poller = new coreLro.LroEngine(lro, {
2658
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2677
+ const lro = createLroSpec({
2678
+ sendOperationFn,
2679
+ args: { resourceGroupName, moveCollectionName, options },
2680
+ spec: deleteOperationSpec$1
2681
+ });
2682
+ const poller = yield coreLro.createHttpPoller(lro, {
2683
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2659
2684
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
2660
- lroResourceLocationConfig: "azure-async-operation"
2685
+ resourceLocationConfig: "azure-async-operation"
2661
2686
  });
2662
2687
  yield poller.poll();
2663
2688
  return poller;
@@ -2698,7 +2723,7 @@ class MoveCollectionsImpl {
2698
2723
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2699
2724
  return this.client.sendOperationRequest(args, spec);
2700
2725
  });
2701
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2726
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2702
2727
  var _a;
2703
2728
  let currentRawResponse = undefined;
2704
2729
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -2717,11 +2742,15 @@ class MoveCollectionsImpl {
2717
2742
  }
2718
2743
  };
2719
2744
  });
2720
- const lro = new LroImpl(sendOperation, { resourceGroupName, moveCollectionName, options }, prepareOperationSpec);
2721
- const poller = new coreLro.LroEngine(lro, {
2722
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2745
+ const lro = createLroSpec({
2746
+ sendOperationFn,
2747
+ args: { resourceGroupName, moveCollectionName, options },
2748
+ spec: prepareOperationSpec
2749
+ });
2750
+ const poller = yield coreLro.createHttpPoller(lro, {
2751
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2723
2752
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
2724
- lroResourceLocationConfig: "azure-async-operation"
2753
+ resourceLocationConfig: "azure-async-operation"
2725
2754
  });
2726
2755
  yield poller.poll();
2727
2756
  return poller;
@@ -2756,7 +2785,7 @@ class MoveCollectionsImpl {
2756
2785
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2757
2786
  return this.client.sendOperationRequest(args, spec);
2758
2787
  });
2759
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2788
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2760
2789
  var _a;
2761
2790
  let currentRawResponse = undefined;
2762
2791
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -2775,11 +2804,15 @@ class MoveCollectionsImpl {
2775
2804
  }
2776
2805
  };
2777
2806
  });
2778
- const lro = new LroImpl(sendOperation, { resourceGroupName, moveCollectionName, options }, initiateMoveOperationSpec);
2779
- const poller = new coreLro.LroEngine(lro, {
2780
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2807
+ const lro = createLroSpec({
2808
+ sendOperationFn,
2809
+ args: { resourceGroupName, moveCollectionName, options },
2810
+ spec: initiateMoveOperationSpec
2811
+ });
2812
+ const poller = yield coreLro.createHttpPoller(lro, {
2813
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2781
2814
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
2782
- lroResourceLocationConfig: "azure-async-operation"
2815
+ resourceLocationConfig: "azure-async-operation"
2783
2816
  });
2784
2817
  yield poller.poll();
2785
2818
  return poller;
@@ -2814,7 +2847,7 @@ class MoveCollectionsImpl {
2814
2847
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2815
2848
  return this.client.sendOperationRequest(args, spec);
2816
2849
  });
2817
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2850
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2818
2851
  var _a;
2819
2852
  let currentRawResponse = undefined;
2820
2853
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -2833,11 +2866,15 @@ class MoveCollectionsImpl {
2833
2866
  }
2834
2867
  };
2835
2868
  });
2836
- const lro = new LroImpl(sendOperation, { resourceGroupName, moveCollectionName, options }, commitOperationSpec);
2837
- const poller = new coreLro.LroEngine(lro, {
2838
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2869
+ const lro = createLroSpec({
2870
+ sendOperationFn,
2871
+ args: { resourceGroupName, moveCollectionName, options },
2872
+ spec: commitOperationSpec
2873
+ });
2874
+ const poller = yield coreLro.createHttpPoller(lro, {
2875
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2839
2876
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
2840
- lroResourceLocationConfig: "azure-async-operation"
2877
+ resourceLocationConfig: "azure-async-operation"
2841
2878
  });
2842
2879
  yield poller.poll();
2843
2880
  return poller;
@@ -2872,7 +2909,7 @@ class MoveCollectionsImpl {
2872
2909
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2873
2910
  return this.client.sendOperationRequest(args, spec);
2874
2911
  });
2875
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2912
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2876
2913
  var _a;
2877
2914
  let currentRawResponse = undefined;
2878
2915
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -2891,11 +2928,15 @@ class MoveCollectionsImpl {
2891
2928
  }
2892
2929
  };
2893
2930
  });
2894
- const lro = new LroImpl(sendOperation, { resourceGroupName, moveCollectionName, options }, discardOperationSpec);
2895
- const poller = new coreLro.LroEngine(lro, {
2896
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2931
+ const lro = createLroSpec({
2932
+ sendOperationFn,
2933
+ args: { resourceGroupName, moveCollectionName, options },
2934
+ spec: discardOperationSpec
2935
+ });
2936
+ const poller = yield coreLro.createHttpPoller(lro, {
2937
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2897
2938
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
2898
- lroResourceLocationConfig: "azure-async-operation"
2939
+ resourceLocationConfig: "azure-async-operation"
2899
2940
  });
2900
2941
  yield poller.poll();
2901
2942
  return poller;
@@ -2927,7 +2968,7 @@ class MoveCollectionsImpl {
2927
2968
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2928
2969
  return this.client.sendOperationRequest(args, spec);
2929
2970
  });
2930
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2971
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2931
2972
  var _a;
2932
2973
  let currentRawResponse = undefined;
2933
2974
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -2946,11 +2987,15 @@ class MoveCollectionsImpl {
2946
2987
  }
2947
2988
  };
2948
2989
  });
2949
- const lro = new LroImpl(sendOperation, { resourceGroupName, moveCollectionName, options }, resolveDependenciesOperationSpec);
2950
- const poller = new coreLro.LroEngine(lro, {
2951
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2990
+ const lro = createLroSpec({
2991
+ sendOperationFn,
2992
+ args: { resourceGroupName, moveCollectionName, options },
2993
+ spec: resolveDependenciesOperationSpec
2994
+ });
2995
+ const poller = yield coreLro.createHttpPoller(lro, {
2996
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2952
2997
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
2953
- lroResourceLocationConfig: "azure-async-operation"
2998
+ resourceLocationConfig: "azure-async-operation"
2954
2999
  });
2955
3000
  yield poller.poll();
2956
3001
  return poller;
@@ -2981,7 +3026,7 @@ class MoveCollectionsImpl {
2981
3026
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2982
3027
  return this.client.sendOperationRequest(args, spec);
2983
3028
  });
2984
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
3029
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2985
3030
  var _a;
2986
3031
  let currentRawResponse = undefined;
2987
3032
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -3000,11 +3045,15 @@ class MoveCollectionsImpl {
3000
3045
  }
3001
3046
  };
3002
3047
  });
3003
- const lro = new LroImpl(sendOperation, { resourceGroupName, moveCollectionName, options }, bulkRemoveOperationSpec);
3004
- const poller = new coreLro.LroEngine(lro, {
3005
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
3048
+ const lro = createLroSpec({
3049
+ sendOperationFn,
3050
+ args: { resourceGroupName, moveCollectionName, options },
3051
+ spec: bulkRemoveOperationSpec
3052
+ });
3053
+ const poller = yield coreLro.createHttpPoller(lro, {
3054
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
3006
3055
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
3007
- lroResourceLocationConfig: "azure-async-operation"
3056
+ resourceLocationConfig: "azure-async-operation"
3008
3057
  });
3009
3058
  yield poller.poll();
3010
3059
  return poller;
@@ -3559,7 +3608,7 @@ class MoveResourcesImpl {
3559
3608
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
3560
3609
  return this.client.sendOperationRequest(args, spec);
3561
3610
  });
3562
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
3611
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
3563
3612
  var _a;
3564
3613
  let currentRawResponse = undefined;
3565
3614
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -3578,11 +3627,20 @@ class MoveResourcesImpl {
3578
3627
  }
3579
3628
  };
3580
3629
  });
3581
- const lro = new LroImpl(sendOperation, { resourceGroupName, moveCollectionName, moveResourceName, options }, createOperationSpec);
3582
- const poller = new coreLro.LroEngine(lro, {
3583
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
3630
+ const lro = createLroSpec({
3631
+ sendOperationFn,
3632
+ args: {
3633
+ resourceGroupName,
3634
+ moveCollectionName,
3635
+ moveResourceName,
3636
+ options
3637
+ },
3638
+ spec: createOperationSpec
3639
+ });
3640
+ const poller = yield coreLro.createHttpPoller(lro, {
3641
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
3584
3642
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
3585
- lroResourceLocationConfig: "azure-async-operation"
3643
+ resourceLocationConfig: "azure-async-operation"
3586
3644
  });
3587
3645
  yield poller.poll();
3588
3646
  return poller;
@@ -3613,7 +3671,7 @@ class MoveResourcesImpl {
3613
3671
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
3614
3672
  return this.client.sendOperationRequest(args, spec);
3615
3673
  });
3616
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
3674
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
3617
3675
  var _a;
3618
3676
  let currentRawResponse = undefined;
3619
3677
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -3632,11 +3690,20 @@ class MoveResourcesImpl {
3632
3690
  }
3633
3691
  };
3634
3692
  });
3635
- const lro = new LroImpl(sendOperation, { resourceGroupName, moveCollectionName, moveResourceName, options }, deleteOperationSpec);
3636
- const poller = new coreLro.LroEngine(lro, {
3637
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
3693
+ const lro = createLroSpec({
3694
+ sendOperationFn,
3695
+ args: {
3696
+ resourceGroupName,
3697
+ moveCollectionName,
3698
+ moveResourceName,
3699
+ options
3700
+ },
3701
+ spec: deleteOperationSpec
3702
+ });
3703
+ const poller = yield coreLro.createHttpPoller(lro, {
3704
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
3638
3705
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
3639
- lroResourceLocationConfig: "azure-async-operation"
3706
+ resourceLocationConfig: "azure-async-operation"
3640
3707
  });
3641
3708
  yield poller.poll();
3642
3709
  return poller;
@@ -4005,19 +4072,17 @@ const getOperationSpec = {
4005
4072
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
4006
4073
  */
4007
4074
  class ResourceMoverServiceAPI extends coreClient__namespace.ServiceClient {
4008
- /**
4009
- * Initializes a new instance of the ResourceMoverServiceAPI class.
4010
- * @param credentials Subscription credentials which uniquely identify client subscription.
4011
- * @param subscriptionId The Subscription ID.
4012
- * @param options The parameter options
4013
- */
4014
- constructor(credentials, subscriptionId, options) {
4075
+ constructor(credentials, subscriptionIdOrOptions, options) {
4015
4076
  var _a, _b, _c;
4016
4077
  if (credentials === undefined) {
4017
4078
  throw new Error("'credentials' cannot be null");
4018
4079
  }
4019
- if (subscriptionId === undefined) {
4020
- throw new Error("'subscriptionId' cannot be null");
4080
+ let subscriptionId;
4081
+ if (typeof subscriptionIdOrOptions === "string") {
4082
+ subscriptionId = subscriptionIdOrOptions;
4083
+ }
4084
+ else if (typeof subscriptionIdOrOptions === "object") {
4085
+ options = subscriptionIdOrOptions;
4021
4086
  }
4022
4087
  // Initializing default values for options
4023
4088
  if (!options) {
@@ -4027,7 +4092,7 @@ class ResourceMoverServiceAPI extends coreClient__namespace.ServiceClient {
4027
4092
  requestContentType: "application/json; charset=utf-8",
4028
4093
  credential: credentials
4029
4094
  };
4030
- const packageDetails = `azsdk-js-arm-resourcemover/2.1.1`;
4095
+ const packageDetails = `azsdk-js-arm-resourcemover/2.2.0`;
4031
4096
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
4032
4097
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
4033
4098
  : `${packageDetails}`;
@@ -4060,7 +4125,7 @@ class ResourceMoverServiceAPI extends coreClient__namespace.ServiceClient {
4060
4125
  this.subscriptionId = subscriptionId;
4061
4126
  // Assigning values to Constant parameters
4062
4127
  this.$host = options.$host || "https://management.azure.com";
4063
- this.apiVersion = options.apiVersion || "2021-08-01";
4128
+ this.apiVersion = options.apiVersion || "2023-08-01";
4064
4129
  this.moveCollections = new MoveCollectionsImpl(this);
4065
4130
  this.moveResources = new MoveResourcesImpl(this);
4066
4131
  this.unresolvedDependencies = new UnresolvedDependenciesImpl(this);