@azure/arm-resources 5.1.1-alpha.20230228.1 → 5.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 (102) hide show
  1. package/CHANGELOG.md +31 -10
  2. package/LICENSE +1 -1
  3. package/dist/index.js +280 -199
  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/deploymentsCalculateTemplateHashSample.js +10 -2
  8. package/dist-esm/samples-dev/deploymentsCalculateTemplateHashSample.js.map +1 -1
  9. package/dist-esm/samples-dev/deploymentsCreateOrUpdateAtManagementGroupScopeSample.js +10 -2
  10. package/dist-esm/samples-dev/deploymentsCreateOrUpdateAtManagementGroupScopeSample.js.map +1 -1
  11. package/dist-esm/samples-dev/deploymentsCreateOrUpdateAtScopeSample.js +10 -2
  12. package/dist-esm/samples-dev/deploymentsCreateOrUpdateAtScopeSample.js.map +1 -1
  13. package/dist-esm/samples-dev/deploymentsCreateOrUpdateAtSubscriptionScopeSample.js +10 -2
  14. package/dist-esm/samples-dev/deploymentsCreateOrUpdateAtSubscriptionScopeSample.js.map +1 -1
  15. package/dist-esm/samples-dev/deploymentsCreateOrUpdateAtTenantScopeSample.js +10 -2
  16. package/dist-esm/samples-dev/deploymentsCreateOrUpdateAtTenantScopeSample.js.map +1 -1
  17. package/dist-esm/samples-dev/deploymentsCreateOrUpdateSample.js +23 -12
  18. package/dist-esm/samples-dev/deploymentsCreateOrUpdateSample.js.map +1 -1
  19. package/dist-esm/samples-dev/deploymentsWhatIfAtManagementGroupScopeSample.js +10 -2
  20. package/dist-esm/samples-dev/deploymentsWhatIfAtManagementGroupScopeSample.js.map +1 -1
  21. package/dist-esm/samples-dev/deploymentsWhatIfAtSubscriptionScopeSample.js +10 -2
  22. package/dist-esm/samples-dev/deploymentsWhatIfAtSubscriptionScopeSample.js.map +1 -1
  23. package/dist-esm/samples-dev/deploymentsWhatIfAtTenantScopeSample.js +10 -2
  24. package/dist-esm/samples-dev/deploymentsWhatIfAtTenantScopeSample.js.map +1 -1
  25. package/dist-esm/samples-dev/deploymentsWhatIfSample.js +11 -3
  26. package/dist-esm/samples-dev/deploymentsWhatIfSample.js.map +1 -1
  27. package/dist-esm/samples-dev/providerResourceTypesListSample.js +10 -2
  28. package/dist-esm/samples-dev/providerResourceTypesListSample.js.map +1 -1
  29. package/dist-esm/samples-dev/providersGetAtTenantScopeSample.js +10 -2
  30. package/dist-esm/samples-dev/providersGetAtTenantScopeSample.js.map +1 -1
  31. package/dist-esm/samples-dev/providersGetSample.js +10 -2
  32. package/dist-esm/samples-dev/providersGetSample.js.map +1 -1
  33. package/dist-esm/samples-dev/providersListSample.js +10 -2
  34. package/dist-esm/samples-dev/providersListSample.js.map +1 -1
  35. package/dist-esm/samples-dev/providersProviderPermissionsSample.js +10 -2
  36. package/dist-esm/samples-dev/providersProviderPermissionsSample.js.map +1 -1
  37. package/dist-esm/samples-dev/resourceGroupsCreateOrUpdateSample.js +11 -3
  38. package/dist-esm/samples-dev/resourceGroupsCreateOrUpdateSample.js.map +1 -1
  39. package/dist-esm/samples-dev/resourceGroupsDeleteSample.js +15 -6
  40. package/dist-esm/samples-dev/resourceGroupsDeleteSample.js.map +1 -1
  41. package/dist-esm/samples-dev/resourceGroupsExportTemplateSample.js +15 -6
  42. package/dist-esm/samples-dev/resourceGroupsExportTemplateSample.js.map +1 -1
  43. package/dist-esm/samples-dev/tagsCreateOrUpdateAtScopeSample.js +13 -4
  44. package/dist-esm/samples-dev/tagsCreateOrUpdateAtScopeSample.js.map +1 -1
  45. package/dist-esm/samples-dev/tagsGetAtScopeSample.js +13 -4
  46. package/dist-esm/samples-dev/tagsGetAtScopeSample.js.map +1 -1
  47. package/dist-esm/src/lroImpl.d.ts +6 -11
  48. package/dist-esm/src/lroImpl.d.ts.map +1 -1
  49. package/dist-esm/src/lroImpl.js +12 -20
  50. package/dist-esm/src/lroImpl.js.map +1 -1
  51. package/dist-esm/src/models/index.d.ts +1 -51
  52. package/dist-esm/src/models/index.d.ts.map +1 -1
  53. package/dist-esm/src/models/index.js +1 -1
  54. package/dist-esm/src/models/index.js.map +1 -1
  55. package/dist-esm/src/operations/deploymentOperations.js +0 -5
  56. package/dist-esm/src/operations/deploymentOperations.js.map +1 -1
  57. package/dist-esm/src/operations/deployments.d.ts +20 -20
  58. package/dist-esm/src/operations/deployments.d.ts.map +1 -1
  59. package/dist-esm/src/operations/deployments.js +158 -87
  60. package/dist-esm/src/operations/deployments.js.map +1 -1
  61. package/dist-esm/src/operations/operations.js +0 -1
  62. package/dist-esm/src/operations/operations.js.map +1 -1
  63. package/dist-esm/src/operations/providers.js +0 -2
  64. package/dist-esm/src/operations/providers.js.map +1 -1
  65. package/dist-esm/src/operations/resourceGroups.d.ts +3 -3
  66. package/dist-esm/src/operations/resourceGroups.d.ts.map +1 -1
  67. package/dist-esm/src/operations/resourceGroups.js +19 -12
  68. package/dist-esm/src/operations/resourceGroups.js.map +1 -1
  69. package/dist-esm/src/operations/resources.d.ts +9 -9
  70. package/dist-esm/src/operations/resources.d.ts.map +1 -1
  71. package/dist-esm/src/operations/resources.js +92 -72
  72. package/dist-esm/src/operations/resources.js.map +1 -1
  73. package/dist-esm/src/operations/tagsOperations.js +0 -1
  74. package/dist-esm/src/operations/tagsOperations.js.map +1 -1
  75. package/dist-esm/src/operationsInterfaces/deployments.d.ts +20 -20
  76. package/dist-esm/src/operationsInterfaces/deployments.d.ts.map +1 -1
  77. package/dist-esm/src/operationsInterfaces/resourceGroups.d.ts +3 -3
  78. package/dist-esm/src/operationsInterfaces/resourceGroups.d.ts.map +1 -1
  79. package/dist-esm/src/operationsInterfaces/resources.d.ts +9 -9
  80. package/dist-esm/src/operationsInterfaces/resources.d.ts.map +1 -1
  81. package/dist-esm/src/pagingHelper.d.ts +4 -4
  82. package/dist-esm/src/pagingHelper.js +4 -4
  83. package/dist-esm/src/resourceManagementClient.js +1 -1
  84. package/dist-esm/test/resources_examples.js +25 -1
  85. package/dist-esm/test/resources_examples.js.map +1 -1
  86. package/package.json +8 -7
  87. package/review/arm-resources.api.md +31 -56
  88. package/src/lroImpl.ts +31 -23
  89. package/src/models/index.ts +16 -81
  90. package/src/operations/deploymentOperations.ts +0 -5
  91. package/src/operations/deployments.ts +237 -198
  92. package/src/operations/operations.ts +0 -1
  93. package/src/operations/providers.ts +0 -2
  94. package/src/operations/resourceGroups.ts +29 -23
  95. package/src/operations/resources.ts +94 -90
  96. package/src/operations/tagsOperations.ts +0 -1
  97. package/src/operationsInterfaces/deployments.ts +34 -36
  98. package/src/operationsInterfaces/resourceGroups.ts +4 -4
  99. package/src/operationsInterfaces/resources.ts +13 -13
  100. package/src/pagingHelper.ts +4 -4
  101. package/src/resourceManagementClient.ts +1 -1
  102. package/types/arm-resources.d.ts +36 -86
package/dist/index.js CHANGED
@@ -37,11 +37,11 @@ var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipelin
37
37
  */
38
38
  const pageMap = new WeakMap();
39
39
  /**
40
- * Given a result page from a pageable operation, returns a
41
- * continuation token that can be used to begin paging from
40
+ * Given the last `.value` produced by the `byPage` iterator,
41
+ * returns a continuation token that can be used to begin paging from
42
42
  * that point later.
43
- * @param page A result object from calling .byPage() on a paged operation.
44
- * @returns The continuation token that can be passed into byPage().
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
45
  */
46
46
  function getContinuationToken(page) {
47
47
  var _a;
@@ -158,7 +158,7 @@ exports.KnownTagsPatchOperation = void 0;
158
158
  KnownTagsPatchOperation["Replace"] = "Replace";
159
159
  /** The 'merge' option allows adding tags with new names and updating the values of tags with existing names. */
160
160
  KnownTagsPatchOperation["Merge"] = "Merge";
161
- /** The 'delete' option allows selectively deleting tags based on given names or name/value pairs. */
161
+ /** The 'delete' option allows selectively deleting tags based on given names or name\/value pairs. */
162
162
  KnownTagsPatchOperation["Delete"] = "Delete";
163
163
  })(exports.KnownTagsPatchOperation || (exports.KnownTagsPatchOperation = {}));
164
164
 
@@ -3467,7 +3467,6 @@ const listNextOperationSpec$5 = {
3467
3467
  bodyMapper: CloudError
3468
3468
  }
3469
3469
  },
3470
- queryParameters: [apiVersion],
3471
3470
  urlParameters: [$host, nextLink],
3472
3471
  headerParameters: [accept],
3473
3472
  serializer: serializer$7
@@ -3480,25 +3479,17 @@ const listNextOperationSpec$5 = {
3480
3479
  * Code generated by Microsoft (R) AutoRest Code Generator.
3481
3480
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
3482
3481
  */
3483
- class LroImpl {
3484
- constructor(sendOperationFn, args, spec, requestPath = spec.path, requestMethod = spec.httpMethod) {
3485
- this.sendOperationFn = sendOperationFn;
3486
- this.args = args;
3487
- this.spec = spec;
3488
- this.requestPath = requestPath;
3489
- this.requestMethod = requestMethod;
3490
- }
3491
- sendInitialRequest() {
3492
- return tslib.__awaiter(this, void 0, void 0, function* () {
3493
- return this.sendOperationFn(this.args, this.spec);
3494
- });
3495
- }
3496
- sendPollRequest(path) {
3497
- return tslib.__awaiter(this, void 0, void 0, function* () {
3498
- const _a = this.spec, restSpec = tslib.__rest(_a, ["requestBody"]);
3499
- return this.sendOperationFn(this.args, Object.assign(Object.assign({}, restSpec), { path, httpMethod: "GET" }));
3500
- });
3501
- }
3482
+ function createLroSpec(inputs) {
3483
+ const { args, spec, sendOperationFn } = inputs;
3484
+ return {
3485
+ requestMethod: spec.httpMethod,
3486
+ requestPath: spec.path,
3487
+ sendInitialRequest: () => sendOperationFn(args, spec),
3488
+ sendPollRequest: (path, options) => {
3489
+ const restSpec = tslib.__rest(spec, ["requestBody"]);
3490
+ return sendOperationFn(args, Object.assign(Object.assign({}, restSpec), { httpMethod: "GET", path, abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal }));
3491
+ }
3492
+ };
3502
3493
  }
3503
3494
 
3504
3495
  /*
@@ -3834,7 +3825,7 @@ class DeploymentsImpl {
3834
3825
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
3835
3826
  return this.client.sendOperationRequest(args, spec);
3836
3827
  });
3837
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
3828
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
3838
3829
  var _a;
3839
3830
  let currentRawResponse = undefined;
3840
3831
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -3853,9 +3844,13 @@ class DeploymentsImpl {
3853
3844
  }
3854
3845
  };
3855
3846
  });
3856
- const lro = new LroImpl(sendOperation, { scope, deploymentName, options }, deleteAtScopeOperationSpec$1);
3857
- const poller = new coreLro.LroEngine(lro, {
3858
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
3847
+ const lro = createLroSpec({
3848
+ sendOperationFn,
3849
+ args: { scope, deploymentName, options },
3850
+ spec: deleteAtScopeOperationSpec$1
3851
+ });
3852
+ const poller = yield coreLro.createHttpPoller(lro, {
3853
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
3859
3854
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
3860
3855
  });
3861
3856
  yield poller.poll();
@@ -3901,7 +3896,7 @@ class DeploymentsImpl {
3901
3896
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
3902
3897
  return this.client.sendOperationRequest(args, spec);
3903
3898
  });
3904
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
3899
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
3905
3900
  var _a;
3906
3901
  let currentRawResponse = undefined;
3907
3902
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -3920,9 +3915,13 @@ class DeploymentsImpl {
3920
3915
  }
3921
3916
  };
3922
3917
  });
3923
- const lro = new LroImpl(sendOperation, { scope, deploymentName, parameters, options }, createOrUpdateAtScopeOperationSpec$1);
3924
- const poller = new coreLro.LroEngine(lro, {
3925
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
3918
+ const lro = createLroSpec({
3919
+ sendOperationFn,
3920
+ args: { scope, deploymentName, parameters, options },
3921
+ spec: createOrUpdateAtScopeOperationSpec$1
3922
+ });
3923
+ const poller = yield coreLro.createHttpPoller(lro, {
3924
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
3926
3925
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
3927
3926
  });
3928
3927
  yield poller.poll();
@@ -3975,7 +3974,7 @@ class DeploymentsImpl {
3975
3974
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
3976
3975
  return this.client.sendOperationRequest(args, spec);
3977
3976
  });
3978
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
3977
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
3979
3978
  var _a;
3980
3979
  let currentRawResponse = undefined;
3981
3980
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -3994,9 +3993,13 @@ class DeploymentsImpl {
3994
3993
  }
3995
3994
  };
3996
3995
  });
3997
- const lro = new LroImpl(sendOperation, { scope, deploymentName, parameters, options }, validateAtScopeOperationSpec);
3998
- const poller = new coreLro.LroEngine(lro, {
3999
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
3996
+ const lro = createLroSpec({
3997
+ sendOperationFn,
3998
+ args: { scope, deploymentName, parameters, options },
3999
+ spec: validateAtScopeOperationSpec
4000
+ });
4001
+ const poller = yield coreLro.createHttpPoller(lro, {
4002
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
4000
4003
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
4001
4004
  });
4002
4005
  yield poller.poll();
@@ -4050,7 +4053,7 @@ class DeploymentsImpl {
4050
4053
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4051
4054
  return this.client.sendOperationRequest(args, spec);
4052
4055
  });
4053
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4056
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4054
4057
  var _a;
4055
4058
  let currentRawResponse = undefined;
4056
4059
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -4069,9 +4072,13 @@ class DeploymentsImpl {
4069
4072
  }
4070
4073
  };
4071
4074
  });
4072
- const lro = new LroImpl(sendOperation, { deploymentName, options }, deleteAtTenantScopeOperationSpec);
4073
- const poller = new coreLro.LroEngine(lro, {
4074
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
4075
+ const lro = createLroSpec({
4076
+ sendOperationFn,
4077
+ args: { deploymentName, options },
4078
+ spec: deleteAtTenantScopeOperationSpec
4079
+ });
4080
+ const poller = yield coreLro.createHttpPoller(lro, {
4081
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
4075
4082
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
4076
4083
  });
4077
4084
  yield poller.poll();
@@ -4114,7 +4121,7 @@ class DeploymentsImpl {
4114
4121
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4115
4122
  return this.client.sendOperationRequest(args, spec);
4116
4123
  });
4117
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4124
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4118
4125
  var _a;
4119
4126
  let currentRawResponse = undefined;
4120
4127
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -4133,9 +4140,13 @@ class DeploymentsImpl {
4133
4140
  }
4134
4141
  };
4135
4142
  });
4136
- const lro = new LroImpl(sendOperation, { deploymentName, parameters, options }, createOrUpdateAtTenantScopeOperationSpec);
4137
- const poller = new coreLro.LroEngine(lro, {
4138
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
4143
+ const lro = createLroSpec({
4144
+ sendOperationFn,
4145
+ args: { deploymentName, parameters, options },
4146
+ spec: createOrUpdateAtTenantScopeOperationSpec
4147
+ });
4148
+ const poller = yield coreLro.createHttpPoller(lro, {
4149
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
4139
4150
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
4140
4151
  });
4141
4152
  yield poller.poll();
@@ -4184,7 +4195,7 @@ class DeploymentsImpl {
4184
4195
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4185
4196
  return this.client.sendOperationRequest(args, spec);
4186
4197
  });
4187
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4198
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4188
4199
  var _a;
4189
4200
  let currentRawResponse = undefined;
4190
4201
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -4203,9 +4214,13 @@ class DeploymentsImpl {
4203
4214
  }
4204
4215
  };
4205
4216
  });
4206
- const lro = new LroImpl(sendOperation, { deploymentName, parameters, options }, validateAtTenantScopeOperationSpec);
4207
- const poller = new coreLro.LroEngine(lro, {
4208
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
4217
+ const lro = createLroSpec({
4218
+ sendOperationFn,
4219
+ args: { deploymentName, parameters, options },
4220
+ spec: validateAtTenantScopeOperationSpec
4221
+ });
4222
+ const poller = yield coreLro.createHttpPoller(lro, {
4223
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
4209
4224
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
4210
4225
  });
4211
4226
  yield poller.poll();
@@ -4236,7 +4251,7 @@ class DeploymentsImpl {
4236
4251
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4237
4252
  return this.client.sendOperationRequest(args, spec);
4238
4253
  });
4239
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4254
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4240
4255
  var _a;
4241
4256
  let currentRawResponse = undefined;
4242
4257
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -4255,11 +4270,15 @@ class DeploymentsImpl {
4255
4270
  }
4256
4271
  };
4257
4272
  });
4258
- const lro = new LroImpl(sendOperation, { deploymentName, parameters, options }, whatIfAtTenantScopeOperationSpec);
4259
- const poller = new coreLro.LroEngine(lro, {
4260
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
4273
+ const lro = createLroSpec({
4274
+ sendOperationFn,
4275
+ args: { deploymentName, parameters, options },
4276
+ spec: whatIfAtTenantScopeOperationSpec
4277
+ });
4278
+ const poller = yield coreLro.createHttpPoller(lro, {
4279
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
4261
4280
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
4262
- lroResourceLocationConfig: "location"
4281
+ resourceLocationConfig: "location"
4263
4282
  });
4264
4283
  yield poller.poll();
4265
4284
  return poller;
@@ -4309,7 +4328,7 @@ class DeploymentsImpl {
4309
4328
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4310
4329
  return this.client.sendOperationRequest(args, spec);
4311
4330
  });
4312
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4331
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4313
4332
  var _a;
4314
4333
  let currentRawResponse = undefined;
4315
4334
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -4328,9 +4347,13 @@ class DeploymentsImpl {
4328
4347
  }
4329
4348
  };
4330
4349
  });
4331
- const lro = new LroImpl(sendOperation, { groupId, deploymentName, options }, deleteAtManagementGroupScopeOperationSpec);
4332
- const poller = new coreLro.LroEngine(lro, {
4333
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
4350
+ const lro = createLroSpec({
4351
+ sendOperationFn,
4352
+ args: { groupId, deploymentName, options },
4353
+ spec: deleteAtManagementGroupScopeOperationSpec
4354
+ });
4355
+ const poller = yield coreLro.createHttpPoller(lro, {
4356
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
4334
4357
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
4335
4358
  });
4336
4359
  yield poller.poll();
@@ -4376,7 +4399,7 @@ class DeploymentsImpl {
4376
4399
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4377
4400
  return this.client.sendOperationRequest(args, spec);
4378
4401
  });
4379
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4402
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4380
4403
  var _a;
4381
4404
  let currentRawResponse = undefined;
4382
4405
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -4395,9 +4418,13 @@ class DeploymentsImpl {
4395
4418
  }
4396
4419
  };
4397
4420
  });
4398
- const lro = new LroImpl(sendOperation, { groupId, deploymentName, parameters, options }, createOrUpdateAtManagementGroupScopeOperationSpec);
4399
- const poller = new coreLro.LroEngine(lro, {
4400
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
4421
+ const lro = createLroSpec({
4422
+ sendOperationFn,
4423
+ args: { groupId, deploymentName, parameters, options },
4424
+ spec: createOrUpdateAtManagementGroupScopeOperationSpec
4425
+ });
4426
+ const poller = yield coreLro.createHttpPoller(lro, {
4427
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
4401
4428
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
4402
4429
  });
4403
4430
  yield poller.poll();
@@ -4450,7 +4477,7 @@ class DeploymentsImpl {
4450
4477
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4451
4478
  return this.client.sendOperationRequest(args, spec);
4452
4479
  });
4453
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4480
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4454
4481
  var _a;
4455
4482
  let currentRawResponse = undefined;
4456
4483
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -4469,9 +4496,13 @@ class DeploymentsImpl {
4469
4496
  }
4470
4497
  };
4471
4498
  });
4472
- const lro = new LroImpl(sendOperation, { groupId, deploymentName, parameters, options }, validateAtManagementGroupScopeOperationSpec);
4473
- const poller = new coreLro.LroEngine(lro, {
4474
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
4499
+ const lro = createLroSpec({
4500
+ sendOperationFn,
4501
+ args: { groupId, deploymentName, parameters, options },
4502
+ spec: validateAtManagementGroupScopeOperationSpec
4503
+ });
4504
+ const poller = yield coreLro.createHttpPoller(lro, {
4505
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
4475
4506
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
4476
4507
  });
4477
4508
  yield poller.poll();
@@ -4505,7 +4536,7 @@ class DeploymentsImpl {
4505
4536
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4506
4537
  return this.client.sendOperationRequest(args, spec);
4507
4538
  });
4508
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4539
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4509
4540
  var _a;
4510
4541
  let currentRawResponse = undefined;
4511
4542
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -4524,11 +4555,15 @@ class DeploymentsImpl {
4524
4555
  }
4525
4556
  };
4526
4557
  });
4527
- const lro = new LroImpl(sendOperation, { groupId, deploymentName, parameters, options }, whatIfAtManagementGroupScopeOperationSpec);
4528
- const poller = new coreLro.LroEngine(lro, {
4529
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
4558
+ const lro = createLroSpec({
4559
+ sendOperationFn,
4560
+ args: { groupId, deploymentName, parameters, options },
4561
+ spec: whatIfAtManagementGroupScopeOperationSpec
4562
+ });
4563
+ const poller = yield coreLro.createHttpPoller(lro, {
4564
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
4530
4565
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
4531
- lroResourceLocationConfig: "location"
4566
+ resourceLocationConfig: "location"
4532
4567
  });
4533
4568
  yield poller.poll();
4534
4569
  return poller;
@@ -4581,7 +4616,7 @@ class DeploymentsImpl {
4581
4616
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4582
4617
  return this.client.sendOperationRequest(args, spec);
4583
4618
  });
4584
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4619
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4585
4620
  var _a;
4586
4621
  let currentRawResponse = undefined;
4587
4622
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -4600,9 +4635,13 @@ class DeploymentsImpl {
4600
4635
  }
4601
4636
  };
4602
4637
  });
4603
- const lro = new LroImpl(sendOperation, { deploymentName, options }, deleteAtSubscriptionScopeOperationSpec);
4604
- const poller = new coreLro.LroEngine(lro, {
4605
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
4638
+ const lro = createLroSpec({
4639
+ sendOperationFn,
4640
+ args: { deploymentName, options },
4641
+ spec: deleteAtSubscriptionScopeOperationSpec
4642
+ });
4643
+ const poller = yield coreLro.createHttpPoller(lro, {
4644
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
4606
4645
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
4607
4646
  });
4608
4647
  yield poller.poll();
@@ -4645,7 +4684,7 @@ class DeploymentsImpl {
4645
4684
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4646
4685
  return this.client.sendOperationRequest(args, spec);
4647
4686
  });
4648
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4687
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4649
4688
  var _a;
4650
4689
  let currentRawResponse = undefined;
4651
4690
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -4664,9 +4703,13 @@ class DeploymentsImpl {
4664
4703
  }
4665
4704
  };
4666
4705
  });
4667
- const lro = new LroImpl(sendOperation, { deploymentName, parameters, options }, createOrUpdateAtSubscriptionScopeOperationSpec);
4668
- const poller = new coreLro.LroEngine(lro, {
4669
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
4706
+ const lro = createLroSpec({
4707
+ sendOperationFn,
4708
+ args: { deploymentName, parameters, options },
4709
+ spec: createOrUpdateAtSubscriptionScopeOperationSpec
4710
+ });
4711
+ const poller = yield coreLro.createHttpPoller(lro, {
4712
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
4670
4713
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
4671
4714
  });
4672
4715
  yield poller.poll();
@@ -4715,7 +4758,7 @@ class DeploymentsImpl {
4715
4758
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4716
4759
  return this.client.sendOperationRequest(args, spec);
4717
4760
  });
4718
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4761
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4719
4762
  var _a;
4720
4763
  let currentRawResponse = undefined;
4721
4764
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -4734,9 +4777,13 @@ class DeploymentsImpl {
4734
4777
  }
4735
4778
  };
4736
4779
  });
4737
- const lro = new LroImpl(sendOperation, { deploymentName, parameters, options }, validateAtSubscriptionScopeOperationSpec);
4738
- const poller = new coreLro.LroEngine(lro, {
4739
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
4780
+ const lro = createLroSpec({
4781
+ sendOperationFn,
4782
+ args: { deploymentName, parameters, options },
4783
+ spec: validateAtSubscriptionScopeOperationSpec
4784
+ });
4785
+ const poller = yield coreLro.createHttpPoller(lro, {
4786
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
4740
4787
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
4741
4788
  });
4742
4789
  yield poller.poll();
@@ -4767,7 +4814,7 @@ class DeploymentsImpl {
4767
4814
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4768
4815
  return this.client.sendOperationRequest(args, spec);
4769
4816
  });
4770
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4817
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4771
4818
  var _a;
4772
4819
  let currentRawResponse = undefined;
4773
4820
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -4786,11 +4833,15 @@ class DeploymentsImpl {
4786
4833
  }
4787
4834
  };
4788
4835
  });
4789
- const lro = new LroImpl(sendOperation, { deploymentName, parameters, options }, whatIfAtSubscriptionScopeOperationSpec);
4790
- const poller = new coreLro.LroEngine(lro, {
4791
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
4836
+ const lro = createLroSpec({
4837
+ sendOperationFn,
4838
+ args: { deploymentName, parameters, options },
4839
+ spec: whatIfAtSubscriptionScopeOperationSpec
4840
+ });
4841
+ const poller = yield coreLro.createHttpPoller(lro, {
4842
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
4792
4843
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
4793
- lroResourceLocationConfig: "location"
4844
+ resourceLocationConfig: "location"
4794
4845
  });
4795
4846
  yield poller.poll();
4796
4847
  return poller;
@@ -4842,7 +4893,7 @@ class DeploymentsImpl {
4842
4893
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4843
4894
  return this.client.sendOperationRequest(args, spec);
4844
4895
  });
4845
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4896
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4846
4897
  var _a;
4847
4898
  let currentRawResponse = undefined;
4848
4899
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -4861,9 +4912,13 @@ class DeploymentsImpl {
4861
4912
  }
4862
4913
  };
4863
4914
  });
4864
- const lro = new LroImpl(sendOperation, { resourceGroupName, deploymentName, options }, deleteOperationSpec$3);
4865
- const poller = new coreLro.LroEngine(lro, {
4866
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
4915
+ const lro = createLroSpec({
4916
+ sendOperationFn,
4917
+ args: { resourceGroupName, deploymentName, options },
4918
+ spec: deleteOperationSpec$3
4919
+ });
4920
+ const poller = yield coreLro.createHttpPoller(lro, {
4921
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
4867
4922
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
4868
4923
  });
4869
4924
  yield poller.poll();
@@ -4913,7 +4968,7 @@ class DeploymentsImpl {
4913
4968
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4914
4969
  return this.client.sendOperationRequest(args, spec);
4915
4970
  });
4916
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4971
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4917
4972
  var _a;
4918
4973
  let currentRawResponse = undefined;
4919
4974
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -4932,9 +4987,13 @@ class DeploymentsImpl {
4932
4987
  }
4933
4988
  };
4934
4989
  });
4935
- const lro = new LroImpl(sendOperation, { resourceGroupName, deploymentName, parameters, options }, createOrUpdateOperationSpec$3);
4936
- const poller = new coreLro.LroEngine(lro, {
4937
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
4990
+ const lro = createLroSpec({
4991
+ sendOperationFn,
4992
+ args: { resourceGroupName, deploymentName, parameters, options },
4993
+ spec: createOrUpdateOperationSpec$3
4994
+ });
4995
+ const poller = yield coreLro.createHttpPoller(lro, {
4996
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
4938
4997
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
4939
4998
  });
4940
4999
  yield poller.poll();
@@ -4989,7 +5048,7 @@ class DeploymentsImpl {
4989
5048
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4990
5049
  return this.client.sendOperationRequest(args, spec);
4991
5050
  });
4992
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
5051
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4993
5052
  var _a;
4994
5053
  let currentRawResponse = undefined;
4995
5054
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -5008,9 +5067,13 @@ class DeploymentsImpl {
5008
5067
  }
5009
5068
  };
5010
5069
  });
5011
- const lro = new LroImpl(sendOperation, { resourceGroupName, deploymentName, parameters, options }, validateOperationSpec);
5012
- const poller = new coreLro.LroEngine(lro, {
5013
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
5070
+ const lro = createLroSpec({
5071
+ sendOperationFn,
5072
+ args: { resourceGroupName, deploymentName, parameters, options },
5073
+ spec: validateOperationSpec
5074
+ });
5075
+ const poller = yield coreLro.createHttpPoller(lro, {
5076
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
5014
5077
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
5015
5078
  });
5016
5079
  yield poller.poll();
@@ -5045,7 +5108,7 @@ class DeploymentsImpl {
5045
5108
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
5046
5109
  return this.client.sendOperationRequest(args, spec);
5047
5110
  });
5048
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
5111
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
5049
5112
  var _a;
5050
5113
  let currentRawResponse = undefined;
5051
5114
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -5064,11 +5127,15 @@ class DeploymentsImpl {
5064
5127
  }
5065
5128
  };
5066
5129
  });
5067
- const lro = new LroImpl(sendOperation, { resourceGroupName, deploymentName, parameters, options }, whatIfOperationSpec);
5068
- const poller = new coreLro.LroEngine(lro, {
5069
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
5130
+ const lro = createLroSpec({
5131
+ sendOperationFn,
5132
+ args: { resourceGroupName, deploymentName, parameters, options },
5133
+ spec: whatIfOperationSpec
5134
+ });
5135
+ const poller = yield coreLro.createHttpPoller(lro, {
5136
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
5070
5137
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
5071
- lroResourceLocationConfig: "location"
5138
+ resourceLocationConfig: "location"
5072
5139
  });
5073
5140
  yield poller.poll();
5074
5141
  return poller;
@@ -6176,7 +6243,6 @@ const listAtScopeNextOperationSpec$1 = {
6176
6243
  bodyMapper: CloudError
6177
6244
  }
6178
6245
  },
6179
- queryParameters: [apiVersion, filter, top],
6180
6246
  urlParameters: [$host, nextLink, scope],
6181
6247
  headerParameters: [accept],
6182
6248
  serializer: serializer$6
@@ -6192,7 +6258,6 @@ const listAtTenantScopeNextOperationSpec$2 = {
6192
6258
  bodyMapper: CloudError
6193
6259
  }
6194
6260
  },
6195
- queryParameters: [apiVersion, filter, top],
6196
6261
  urlParameters: [$host, nextLink],
6197
6262
  headerParameters: [accept],
6198
6263
  serializer: serializer$6
@@ -6208,7 +6273,6 @@ const listAtManagementGroupScopeNextOperationSpec$1 = {
6208
6273
  bodyMapper: CloudError
6209
6274
  }
6210
6275
  },
6211
- queryParameters: [apiVersion, filter, top],
6212
6276
  urlParameters: [$host, nextLink, groupId],
6213
6277
  headerParameters: [accept],
6214
6278
  serializer: serializer$6
@@ -6224,7 +6288,6 @@ const listAtSubscriptionScopeNextOperationSpec$1 = {
6224
6288
  bodyMapper: CloudError
6225
6289
  }
6226
6290
  },
6227
- queryParameters: [apiVersion, filter, top],
6228
6291
  urlParameters: [
6229
6292
  $host,
6230
6293
  nextLink,
@@ -6244,7 +6307,6 @@ const listByResourceGroupNextOperationSpec$1 = {
6244
6307
  bodyMapper: CloudError
6245
6308
  }
6246
6309
  },
6247
- queryParameters: [apiVersion, filter, top],
6248
6310
  urlParameters: [
6249
6311
  $host,
6250
6312
  nextLink,
@@ -6631,7 +6693,6 @@ const listNextOperationSpec$4 = {
6631
6693
  bodyMapper: CloudError
6632
6694
  }
6633
6695
  },
6634
- queryParameters: [apiVersion, expand],
6635
6696
  urlParameters: [
6636
6697
  $host,
6637
6698
  nextLink,
@@ -6651,7 +6712,6 @@ const listAtTenantScopeNextOperationSpec$1 = {
6651
6712
  bodyMapper: CloudError
6652
6713
  }
6653
6714
  },
6654
- queryParameters: [apiVersion, expand],
6655
6715
  urlParameters: [$host, nextLink],
6656
6716
  headerParameters: [accept],
6657
6717
  serializer: serializer$5
@@ -6864,7 +6924,7 @@ class ResourcesImpl {
6864
6924
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
6865
6925
  return this.client.sendOperationRequest(args, spec);
6866
6926
  });
6867
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
6927
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
6868
6928
  var _a;
6869
6929
  let currentRawResponse = undefined;
6870
6930
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -6883,9 +6943,13 @@ class ResourcesImpl {
6883
6943
  }
6884
6944
  };
6885
6945
  });
6886
- const lro = new LroImpl(sendOperation, { sourceResourceGroupName, parameters, options }, moveResourcesOperationSpec);
6887
- const poller = new coreLro.LroEngine(lro, {
6888
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
6946
+ const lro = createLroSpec({
6947
+ sendOperationFn,
6948
+ args: { sourceResourceGroupName, parameters, options },
6949
+ spec: moveResourcesOperationSpec
6950
+ });
6951
+ const poller = yield coreLro.createHttpPoller(lro, {
6952
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
6889
6953
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
6890
6954
  });
6891
6955
  yield poller.poll();
@@ -6925,7 +6989,7 @@ class ResourcesImpl {
6925
6989
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
6926
6990
  return this.client.sendOperationRequest(args, spec);
6927
6991
  });
6928
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
6992
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
6929
6993
  var _a;
6930
6994
  let currentRawResponse = undefined;
6931
6995
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -6944,9 +7008,13 @@ class ResourcesImpl {
6944
7008
  }
6945
7009
  };
6946
7010
  });
6947
- const lro = new LroImpl(sendOperation, { sourceResourceGroupName, parameters, options }, validateMoveResourcesOperationSpec);
6948
- const poller = new coreLro.LroEngine(lro, {
6949
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
7011
+ const lro = createLroSpec({
7012
+ sendOperationFn,
7013
+ args: { sourceResourceGroupName, parameters, options },
7014
+ spec: validateMoveResourcesOperationSpec
7015
+ });
7016
+ const poller = yield coreLro.createHttpPoller(lro, {
7017
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
6950
7018
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
6951
7019
  });
6952
7020
  yield poller.poll();
@@ -7016,7 +7084,7 @@ class ResourcesImpl {
7016
7084
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
7017
7085
  return this.client.sendOperationRequest(args, spec);
7018
7086
  });
7019
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
7087
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
7020
7088
  var _a;
7021
7089
  let currentRawResponse = undefined;
7022
7090
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -7035,17 +7103,21 @@ class ResourcesImpl {
7035
7103
  }
7036
7104
  };
7037
7105
  });
7038
- const lro = new LroImpl(sendOperation, {
7039
- resourceGroupName,
7040
- resourceProviderNamespace,
7041
- parentResourcePath,
7042
- resourceType,
7043
- resourceName,
7044
- apiVersion,
7045
- options
7046
- }, deleteOperationSpec$2);
7047
- const poller = new coreLro.LroEngine(lro, {
7048
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
7106
+ const lro = createLroSpec({
7107
+ sendOperationFn,
7108
+ args: {
7109
+ resourceGroupName,
7110
+ resourceProviderNamespace,
7111
+ parentResourcePath,
7112
+ resourceType,
7113
+ resourceName,
7114
+ apiVersion,
7115
+ options
7116
+ },
7117
+ spec: deleteOperationSpec$2
7118
+ });
7119
+ const poller = yield coreLro.createHttpPoller(lro, {
7120
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
7049
7121
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
7050
7122
  });
7051
7123
  yield poller.poll();
@@ -7086,7 +7158,7 @@ class ResourcesImpl {
7086
7158
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
7087
7159
  return this.client.sendOperationRequest(args, spec);
7088
7160
  });
7089
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
7161
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
7090
7162
  var _a;
7091
7163
  let currentRawResponse = undefined;
7092
7164
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -7105,18 +7177,22 @@ class ResourcesImpl {
7105
7177
  }
7106
7178
  };
7107
7179
  });
7108
- const lro = new LroImpl(sendOperation, {
7109
- resourceGroupName,
7110
- resourceProviderNamespace,
7111
- parentResourcePath,
7112
- resourceType,
7113
- resourceName,
7114
- apiVersion,
7115
- parameters,
7116
- options
7117
- }, createOrUpdateOperationSpec$2);
7118
- const poller = new coreLro.LroEngine(lro, {
7119
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
7180
+ const lro = createLroSpec({
7181
+ sendOperationFn,
7182
+ args: {
7183
+ resourceGroupName,
7184
+ resourceProviderNamespace,
7185
+ parentResourcePath,
7186
+ resourceType,
7187
+ resourceName,
7188
+ apiVersion,
7189
+ parameters,
7190
+ options
7191
+ },
7192
+ spec: createOrUpdateOperationSpec$2
7193
+ });
7194
+ const poller = yield coreLro.createHttpPoller(lro, {
7195
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
7120
7196
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
7121
7197
  });
7122
7198
  yield poller.poll();
@@ -7158,7 +7234,7 @@ class ResourcesImpl {
7158
7234
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
7159
7235
  return this.client.sendOperationRequest(args, spec);
7160
7236
  });
7161
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
7237
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
7162
7238
  var _a;
7163
7239
  let currentRawResponse = undefined;
7164
7240
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -7177,18 +7253,22 @@ class ResourcesImpl {
7177
7253
  }
7178
7254
  };
7179
7255
  });
7180
- const lro = new LroImpl(sendOperation, {
7181
- resourceGroupName,
7182
- resourceProviderNamespace,
7183
- parentResourcePath,
7184
- resourceType,
7185
- resourceName,
7186
- apiVersion,
7187
- parameters,
7188
- options
7189
- }, updateOperationSpec$1);
7190
- const poller = new coreLro.LroEngine(lro, {
7191
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
7256
+ const lro = createLroSpec({
7257
+ sendOperationFn,
7258
+ args: {
7259
+ resourceGroupName,
7260
+ resourceProviderNamespace,
7261
+ parentResourcePath,
7262
+ resourceType,
7263
+ resourceName,
7264
+ apiVersion,
7265
+ parameters,
7266
+ options
7267
+ },
7268
+ spec: updateOperationSpec$1
7269
+ });
7270
+ const poller = yield coreLro.createHttpPoller(lro, {
7271
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
7192
7272
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
7193
7273
  });
7194
7274
  yield poller.poll();
@@ -7259,7 +7339,7 @@ class ResourcesImpl {
7259
7339
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
7260
7340
  return this.client.sendOperationRequest(args, spec);
7261
7341
  });
7262
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
7342
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
7263
7343
  var _a;
7264
7344
  let currentRawResponse = undefined;
7265
7345
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -7278,9 +7358,13 @@ class ResourcesImpl {
7278
7358
  }
7279
7359
  };
7280
7360
  });
7281
- const lro = new LroImpl(sendOperation, { resourceId, apiVersion, options }, deleteByIdOperationSpec);
7282
- const poller = new coreLro.LroEngine(lro, {
7283
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
7361
+ const lro = createLroSpec({
7362
+ sendOperationFn,
7363
+ args: { resourceId, apiVersion, options },
7364
+ spec: deleteByIdOperationSpec
7365
+ });
7366
+ const poller = yield coreLro.createHttpPoller(lro, {
7367
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
7284
7368
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
7285
7369
  });
7286
7370
  yield poller.poll();
@@ -7315,7 +7399,7 @@ class ResourcesImpl {
7315
7399
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
7316
7400
  return this.client.sendOperationRequest(args, spec);
7317
7401
  });
7318
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
7402
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
7319
7403
  var _a;
7320
7404
  let currentRawResponse = undefined;
7321
7405
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -7334,9 +7418,13 @@ class ResourcesImpl {
7334
7418
  }
7335
7419
  };
7336
7420
  });
7337
- const lro = new LroImpl(sendOperation, { resourceId, apiVersion, parameters, options }, createOrUpdateByIdOperationSpec);
7338
- const poller = new coreLro.LroEngine(lro, {
7339
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
7421
+ const lro = createLroSpec({
7422
+ sendOperationFn,
7423
+ args: { resourceId, apiVersion, parameters, options },
7424
+ spec: createOrUpdateByIdOperationSpec
7425
+ });
7426
+ const poller = yield coreLro.createHttpPoller(lro, {
7427
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
7340
7428
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
7341
7429
  });
7342
7430
  yield poller.poll();
@@ -7372,7 +7460,7 @@ class ResourcesImpl {
7372
7460
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
7373
7461
  return this.client.sendOperationRequest(args, spec);
7374
7462
  });
7375
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
7463
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
7376
7464
  var _a;
7377
7465
  let currentRawResponse = undefined;
7378
7466
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -7391,9 +7479,13 @@ class ResourcesImpl {
7391
7479
  }
7392
7480
  };
7393
7481
  });
7394
- const lro = new LroImpl(sendOperation, { resourceId, apiVersion, parameters, options }, updateByIdOperationSpec);
7395
- const poller = new coreLro.LroEngine(lro, {
7396
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
7482
+ const lro = createLroSpec({
7483
+ sendOperationFn,
7484
+ args: { resourceId, apiVersion, parameters, options },
7485
+ spec: updateByIdOperationSpec
7486
+ });
7487
+ const poller = yield coreLro.createHttpPoller(lro, {
7488
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
7397
7489
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
7398
7490
  });
7399
7491
  yield poller.poll();
@@ -7793,12 +7885,6 @@ const listByResourceGroupNextOperationSpec = {
7793
7885
  bodyMapper: CloudError
7794
7886
  }
7795
7887
  },
7796
- queryParameters: [
7797
- apiVersion,
7798
- filter,
7799
- top,
7800
- expand
7801
- ],
7802
7888
  urlParameters: [
7803
7889
  $host,
7804
7890
  nextLink,
@@ -7819,12 +7905,6 @@ const listNextOperationSpec$3 = {
7819
7905
  bodyMapper: CloudError
7820
7906
  }
7821
7907
  },
7822
- queryParameters: [
7823
- apiVersion,
7824
- filter,
7825
- top,
7826
- expand
7827
- ],
7828
7908
  urlParameters: [
7829
7909
  $host,
7830
7910
  nextLink,
@@ -7940,7 +8020,7 @@ class ResourceGroupsImpl {
7940
8020
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
7941
8021
  return this.client.sendOperationRequest(args, spec);
7942
8022
  });
7943
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
8023
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
7944
8024
  var _a;
7945
8025
  let currentRawResponse = undefined;
7946
8026
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -7959,9 +8039,13 @@ class ResourceGroupsImpl {
7959
8039
  }
7960
8040
  };
7961
8041
  });
7962
- const lro = new LroImpl(sendOperation, { resourceGroupName, options }, deleteOperationSpec$1);
7963
- const poller = new coreLro.LroEngine(lro, {
7964
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
8042
+ const lro = createLroSpec({
8043
+ sendOperationFn,
8044
+ args: { resourceGroupName, options },
8045
+ spec: deleteOperationSpec$1
8046
+ });
8047
+ const poller = yield coreLro.createHttpPoller(lro, {
8048
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
7965
8049
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
7966
8050
  });
7967
8051
  yield poller.poll();
@@ -8010,7 +8094,7 @@ class ResourceGroupsImpl {
8010
8094
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
8011
8095
  return this.client.sendOperationRequest(args, spec);
8012
8096
  });
8013
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
8097
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
8014
8098
  var _a;
8015
8099
  let currentRawResponse = undefined;
8016
8100
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -8029,11 +8113,15 @@ class ResourceGroupsImpl {
8029
8113
  }
8030
8114
  };
8031
8115
  });
8032
- const lro = new LroImpl(sendOperation, { resourceGroupName, parameters, options }, exportTemplateOperationSpec);
8033
- const poller = new coreLro.LroEngine(lro, {
8034
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
8116
+ const lro = createLroSpec({
8117
+ sendOperationFn,
8118
+ args: { resourceGroupName, parameters, options },
8119
+ spec: exportTemplateOperationSpec
8120
+ });
8121
+ const poller = yield coreLro.createHttpPoller(lro, {
8122
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
8035
8123
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
8036
- lroResourceLocationConfig: "location"
8124
+ resourceLocationConfig: "location"
8037
8125
  });
8038
8126
  yield poller.poll();
8039
8127
  return poller;
@@ -8234,7 +8322,6 @@ const listNextOperationSpec$2 = {
8234
8322
  bodyMapper: CloudError
8235
8323
  }
8236
8324
  },
8237
- queryParameters: [apiVersion, filter, top],
8238
8325
  urlParameters: [
8239
8326
  $host,
8240
8327
  nextLink,
@@ -8603,7 +8690,6 @@ const listNextOperationSpec$1 = {
8603
8690
  bodyMapper: CloudError
8604
8691
  }
8605
8692
  },
8606
- queryParameters: [apiVersion],
8607
8693
  urlParameters: [
8608
8694
  $host,
8609
8695
  nextLink,
@@ -9290,7 +9376,6 @@ const listAtScopeNextOperationSpec = {
9290
9376
  bodyMapper: CloudError
9291
9377
  }
9292
9378
  },
9293
- queryParameters: [apiVersion, top],
9294
9379
  urlParameters: [
9295
9380
  $host,
9296
9381
  nextLink,
@@ -9311,7 +9396,6 @@ const listAtTenantScopeNextOperationSpec = {
9311
9396
  bodyMapper: CloudError
9312
9397
  }
9313
9398
  },
9314
- queryParameters: [apiVersion, top],
9315
9399
  urlParameters: [
9316
9400
  $host,
9317
9401
  nextLink,
@@ -9331,7 +9415,6 @@ const listAtManagementGroupScopeNextOperationSpec = {
9331
9415
  bodyMapper: CloudError
9332
9416
  }
9333
9417
  },
9334
- queryParameters: [apiVersion, top],
9335
9418
  urlParameters: [
9336
9419
  $host,
9337
9420
  nextLink,
@@ -9352,7 +9435,6 @@ const listAtSubscriptionScopeNextOperationSpec = {
9352
9435
  bodyMapper: CloudError
9353
9436
  }
9354
9437
  },
9355
- queryParameters: [apiVersion, top],
9356
9438
  urlParameters: [
9357
9439
  $host,
9358
9440
  nextLink,
@@ -9373,7 +9455,6 @@ const listNextOperationSpec = {
9373
9455
  bodyMapper: CloudError
9374
9456
  }
9375
9457
  },
9376
- queryParameters: [apiVersion, top],
9377
9458
  urlParameters: [
9378
9459
  $host,
9379
9460
  nextLink,
@@ -9415,7 +9496,7 @@ class ResourceManagementClient extends coreClient__namespace.ServiceClient {
9415
9496
  requestContentType: "application/json; charset=utf-8",
9416
9497
  credential: credentials
9417
9498
  };
9418
- const packageDetails = `azsdk-js-arm-resources/5.1.1`;
9499
+ const packageDetails = `azsdk-js-arm-resources/5.2.0`;
9419
9500
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
9420
9501
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
9421
9502
  : `${packageDetails}`;