@azure/arm-reservations 8.0.1-alpha.20230321.1 → 9.0.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 (72) hide show
  1. package/CHANGELOG.md +11 -8
  2. package/dist/index.js +133 -91
  3. package/dist/index.js.map +1 -1
  4. package/dist/index.min.js +1 -1
  5. package/dist/index.min.js.map +1 -1
  6. package/dist-esm/src/azureReservationAPI.js +1 -1
  7. package/dist-esm/src/lroImpl.d.ts +6 -11
  8. package/dist-esm/src/lroImpl.d.ts.map +1 -1
  9. package/dist-esm/src/lroImpl.js +12 -20
  10. package/dist-esm/src/lroImpl.js.map +1 -1
  11. package/dist-esm/src/models/index.d.ts +7 -3
  12. package/dist-esm/src/models/index.d.ts.map +1 -1
  13. package/dist-esm/src/models/index.js.map +1 -1
  14. package/dist-esm/src/models/mappers.d.ts.map +1 -1
  15. package/dist-esm/src/models/mappers.js +14 -0
  16. package/dist-esm/src/models/mappers.js.map +1 -1
  17. package/dist-esm/src/operations/calculateExchange.d.ts +2 -2
  18. package/dist-esm/src/operations/calculateExchange.d.ts.map +1 -1
  19. package/dist-esm/src/operations/calculateExchange.js +11 -7
  20. package/dist-esm/src/operations/calculateExchange.js.map +1 -1
  21. package/dist-esm/src/operations/exchange.d.ts +2 -2
  22. package/dist-esm/src/operations/exchange.d.ts.map +1 -1
  23. package/dist-esm/src/operations/exchange.js +11 -7
  24. package/dist-esm/src/operations/exchange.js.map +1 -1
  25. package/dist-esm/src/operations/quota.d.ts +3 -3
  26. package/dist-esm/src/operations/quota.d.ts.map +1 -1
  27. package/dist-esm/src/operations/quota.js +34 -26
  28. package/dist-esm/src/operations/quota.js.map +1 -1
  29. package/dist-esm/src/operations/reservation.d.ts +5 -5
  30. package/dist-esm/src/operations/reservation.d.ts.map +1 -1
  31. package/dist-esm/src/operations/reservation.js +37 -21
  32. package/dist-esm/src/operations/reservation.js.map +1 -1
  33. package/dist-esm/src/operations/reservationOrder.d.ts +2 -2
  34. package/dist-esm/src/operations/reservationOrder.d.ts.map +1 -1
  35. package/dist-esm/src/operations/reservationOrder.js +11 -7
  36. package/dist-esm/src/operations/reservationOrder.js.map +1 -1
  37. package/dist-esm/src/operations/return.d.ts +2 -2
  38. package/dist-esm/src/operations/return.d.ts.map +1 -1
  39. package/dist-esm/src/operations/return.js +15 -15
  40. package/dist-esm/src/operations/return.js.map +1 -1
  41. package/dist-esm/src/operationsInterfaces/calculateExchange.d.ts +2 -2
  42. package/dist-esm/src/operationsInterfaces/calculateExchange.d.ts.map +1 -1
  43. package/dist-esm/src/operationsInterfaces/exchange.d.ts +2 -2
  44. package/dist-esm/src/operationsInterfaces/exchange.d.ts.map +1 -1
  45. package/dist-esm/src/operationsInterfaces/quota.d.ts +3 -3
  46. package/dist-esm/src/operationsInterfaces/quota.d.ts.map +1 -1
  47. package/dist-esm/src/operationsInterfaces/reservation.d.ts +5 -5
  48. package/dist-esm/src/operationsInterfaces/reservation.d.ts.map +1 -1
  49. package/dist-esm/src/operationsInterfaces/reservationOrder.d.ts +2 -2
  50. package/dist-esm/src/operationsInterfaces/reservationOrder.d.ts.map +1 -1
  51. package/dist-esm/src/operationsInterfaces/return.d.ts +2 -2
  52. package/dist-esm/src/operationsInterfaces/return.d.ts.map +1 -1
  53. package/dist-esm/test/reservations_examples.spec.js +1 -1
  54. package/package.json +6 -6
  55. package/review/arm-reservations.api.md +15 -13
  56. package/src/azureReservationAPI.ts +1 -1
  57. package/src/lroImpl.ts +31 -23
  58. package/src/models/index.ts +7 -3
  59. package/src/models/mappers.ts +14 -0
  60. package/src/operations/calculateExchange.ts +20 -13
  61. package/src/operations/exchange.ts +19 -12
  62. package/src/operations/quota.ts +33 -23
  63. package/src/operations/reservation.ts +61 -45
  64. package/src/operations/reservationOrder.ts +20 -13
  65. package/src/operations/return.ts +23 -20
  66. package/src/operationsInterfaces/calculateExchange.ts +3 -3
  67. package/src/operationsInterfaces/exchange.ts +2 -2
  68. package/src/operationsInterfaces/quota.ts +4 -4
  69. package/src/operationsInterfaces/reservation.ts +9 -9
  70. package/src/operationsInterfaces/reservationOrder.ts +3 -3
  71. package/src/operationsInterfaces/return.ts +2 -2
  72. package/types/arm-reservations.d.ts +19 -15
package/CHANGELOG.md CHANGED
@@ -1,15 +1,18 @@
1
1
  # Release History
2
+
3
+ ## 9.0.0 (2023-03-08)
4
+
5
+ **Features**
2
6
 
3
- ## 8.0.1 (Unreleased)
4
-
5
- ### Features Added
6
-
7
- ### Breaking Changes
8
-
9
- ### Bugs Fixed
7
+ - Interface CatalogMsrp has a new optional parameter p3Y
8
+ - Interface CatalogMsrp has a new optional parameter p5Y
10
9
 
11
- ### Other Changes
10
+ **Breaking Changes**
12
11
 
12
+ - Delete parameters of ReturnPostHeaders in TypeAlias ReturnPostResponse
13
+ - Delete parameters of RefundResponse in TypeAlias ReturnPostResponse
14
+
15
+
13
16
  ## 8.0.0 (2023-02-01)
14
17
 
15
18
  **Features**
package/dist/index.js CHANGED
@@ -857,6 +857,20 @@ const CatalogMsrp = {
857
857
  name: "Composite",
858
858
  className: "Price"
859
859
  }
860
+ },
861
+ p3Y: {
862
+ serializedName: "p3Y",
863
+ type: {
864
+ name: "Composite",
865
+ className: "Price"
866
+ }
867
+ },
868
+ p5Y: {
869
+ serializedName: "p5Y",
870
+ type: {
871
+ name: "Composite",
872
+ className: "Price"
873
+ }
860
874
  }
861
875
  }
862
876
  }
@@ -4890,25 +4904,17 @@ const skiptoken1 = {
4890
4904
  * Code generated by Microsoft (R) AutoRest Code Generator.
4891
4905
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
4892
4906
  */
4893
- class LroImpl {
4894
- constructor(sendOperationFn, args, spec, requestPath = spec.path, requestMethod = spec.httpMethod) {
4895
- this.sendOperationFn = sendOperationFn;
4896
- this.args = args;
4897
- this.spec = spec;
4898
- this.requestPath = requestPath;
4899
- this.requestMethod = requestMethod;
4900
- }
4901
- sendInitialRequest() {
4902
- return tslib.__awaiter(this, void 0, void 0, function* () {
4903
- return this.sendOperationFn(this.args, this.spec);
4904
- });
4905
- }
4906
- sendPollRequest(path) {
4907
- return tslib.__awaiter(this, void 0, void 0, function* () {
4908
- const _a = this.spec, restSpec = tslib.__rest(_a, ["requestBody"]);
4909
- return this.sendOperationFn(this.args, Object.assign(Object.assign({}, restSpec), { path, httpMethod: "GET" }));
4910
- });
4911
- }
4907
+ function createLroSpec(inputs) {
4908
+ const { args, spec, sendOperationFn } = inputs;
4909
+ return {
4910
+ requestMethod: spec.httpMethod,
4911
+ requestPath: spec.path,
4912
+ sendInitialRequest: () => sendOperationFn(args, spec),
4913
+ sendPollRequest: (path, options) => {
4914
+ const restSpec = tslib.__rest(spec, ["requestBody"]);
4915
+ return sendOperationFn(args, Object.assign(Object.assign({}, restSpec), { httpMethod: "GET", path, abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal }));
4916
+ }
4917
+ };
4912
4918
  }
4913
4919
 
4914
4920
  /*
@@ -5122,7 +5128,7 @@ class ReservationImpl {
5122
5128
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
5123
5129
  return this.client.sendOperationRequest(args, spec);
5124
5130
  });
5125
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
5131
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
5126
5132
  var _a;
5127
5133
  let currentRawResponse = undefined;
5128
5134
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -5141,9 +5147,13 @@ class ReservationImpl {
5141
5147
  }
5142
5148
  };
5143
5149
  });
5144
- const lro = new LroImpl(sendOperation, { reservationOrderId, reservationId, body, options }, availableScopesOperationSpec);
5145
- const poller = new coreLro.LroEngine(lro, {
5146
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
5150
+ const lro = createLroSpec({
5151
+ sendOperationFn,
5152
+ args: { reservationOrderId, reservationId, body, options },
5153
+ spec: availableScopesOperationSpec
5154
+ });
5155
+ const poller = yield coreLro.createHttpPoller(lro, {
5156
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
5147
5157
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
5148
5158
  });
5149
5159
  yield poller.poll();
@@ -5175,7 +5185,7 @@ class ReservationImpl {
5175
5185
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
5176
5186
  return this.client.sendOperationRequest(args, spec);
5177
5187
  });
5178
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
5188
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
5179
5189
  var _a;
5180
5190
  let currentRawResponse = undefined;
5181
5191
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -5194,11 +5204,15 @@ class ReservationImpl {
5194
5204
  }
5195
5205
  };
5196
5206
  });
5197
- const lro = new LroImpl(sendOperation, { reservationOrderId, body, options }, splitOperationSpec);
5198
- const poller = new coreLro.LroEngine(lro, {
5199
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
5207
+ const lro = createLroSpec({
5208
+ sendOperationFn,
5209
+ args: { reservationOrderId, body, options },
5210
+ spec: splitOperationSpec
5211
+ });
5212
+ const poller = yield coreLro.createHttpPoller(lro, {
5213
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
5200
5214
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
5201
- lroResourceLocationConfig: "location"
5215
+ resourceLocationConfig: "location"
5202
5216
  });
5203
5217
  yield poller.poll();
5204
5218
  return poller;
@@ -5228,7 +5242,7 @@ class ReservationImpl {
5228
5242
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
5229
5243
  return this.client.sendOperationRequest(args, spec);
5230
5244
  });
5231
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
5245
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
5232
5246
  var _a;
5233
5247
  let currentRawResponse = undefined;
5234
5248
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -5247,11 +5261,15 @@ class ReservationImpl {
5247
5261
  }
5248
5262
  };
5249
5263
  });
5250
- const lro = new LroImpl(sendOperation, { reservationOrderId, body, options }, mergeOperationSpec);
5251
- const poller = new coreLro.LroEngine(lro, {
5252
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
5264
+ const lro = createLroSpec({
5265
+ sendOperationFn,
5266
+ args: { reservationOrderId, body, options },
5267
+ spec: mergeOperationSpec
5268
+ });
5269
+ const poller = yield coreLro.createHttpPoller(lro, {
5270
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
5253
5271
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
5254
- lroResourceLocationConfig: "location"
5272
+ resourceLocationConfig: "location"
5255
5273
  });
5256
5274
  yield poller.poll();
5257
5275
  return poller;
@@ -5299,7 +5317,7 @@ class ReservationImpl {
5299
5317
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
5300
5318
  return this.client.sendOperationRequest(args, spec);
5301
5319
  });
5302
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
5320
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
5303
5321
  var _a;
5304
5322
  let currentRawResponse = undefined;
5305
5323
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -5318,11 +5336,15 @@ class ReservationImpl {
5318
5336
  }
5319
5337
  };
5320
5338
  });
5321
- const lro = new LroImpl(sendOperation, { reservationOrderId, reservationId, parameters, options }, updateOperationSpec$1);
5322
- const poller = new coreLro.LroEngine(lro, {
5323
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
5339
+ const lro = createLroSpec({
5340
+ sendOperationFn,
5341
+ args: { reservationOrderId, reservationId, parameters, options },
5342
+ spec: updateOperationSpec$1
5343
+ });
5344
+ const poller = yield coreLro.createHttpPoller(lro, {
5345
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
5324
5346
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
5325
- lroResourceLocationConfig: "azure-async-operation"
5347
+ resourceLocationConfig: "azure-async-operation"
5326
5348
  });
5327
5349
  yield poller.poll();
5328
5350
  return poller;
@@ -5852,7 +5874,7 @@ class ReservationOrderImpl {
5852
5874
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
5853
5875
  return this.client.sendOperationRequest(args, spec);
5854
5876
  });
5855
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
5877
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
5856
5878
  var _a;
5857
5879
  let currentRawResponse = undefined;
5858
5880
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -5871,11 +5893,15 @@ class ReservationOrderImpl {
5871
5893
  }
5872
5894
  };
5873
5895
  });
5874
- const lro = new LroImpl(sendOperation, { reservationOrderId, body, options }, purchaseOperationSpec);
5875
- const poller = new coreLro.LroEngine(lro, {
5876
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
5896
+ const lro = createLroSpec({
5897
+ sendOperationFn,
5898
+ args: { reservationOrderId, body, options },
5899
+ spec: purchaseOperationSpec
5900
+ });
5901
+ const poller = yield coreLro.createHttpPoller(lro, {
5902
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
5877
5903
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
5878
- lroResourceLocationConfig: "location"
5904
+ resourceLocationConfig: "location"
5879
5905
  });
5880
5906
  yield poller.poll();
5881
5907
  return poller;
@@ -6234,7 +6260,7 @@ class ReturnImpl {
6234
6260
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
6235
6261
  return this.client.sendOperationRequest(args, spec);
6236
6262
  });
6237
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
6263
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
6238
6264
  var _a;
6239
6265
  let currentRawResponse = undefined;
6240
6266
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -6253,11 +6279,15 @@ class ReturnImpl {
6253
6279
  }
6254
6280
  };
6255
6281
  });
6256
- const lro = new LroImpl(sendOperation, { reservationOrderId, body, options }, postOperationSpec$2);
6257
- const poller = new coreLro.LroEngine(lro, {
6258
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
6282
+ const lro = createLroSpec({
6283
+ sendOperationFn,
6284
+ args: { reservationOrderId, body, options },
6285
+ spec: postOperationSpec$2
6286
+ });
6287
+ const poller = yield coreLro.createHttpPoller(lro, {
6288
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
6259
6289
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
6260
- lroResourceLocationConfig: "location"
6290
+ resourceLocationConfig: "location"
6261
6291
  });
6262
6292
  yield poller.poll();
6263
6293
  return poller;
@@ -6283,20 +6313,16 @@ const postOperationSpec$2 = {
6283
6313
  httpMethod: "POST",
6284
6314
  responses: {
6285
6315
  200: {
6286
- bodyMapper: RefundResponse,
6287
- headersMapper: ReturnPostHeaders
6316
+ bodyMapper: ReservationOrderResponse
6288
6317
  },
6289
6318
  201: {
6290
- bodyMapper: RefundResponse,
6291
- headersMapper: ReturnPostHeaders
6319
+ bodyMapper: ReservationOrderResponse
6292
6320
  },
6293
6321
  202: {
6294
- bodyMapper: RefundResponse,
6295
- headersMapper: ReturnPostHeaders
6322
+ bodyMapper: ReservationOrderResponse
6296
6323
  },
6297
6324
  204: {
6298
- bodyMapper: RefundResponse,
6299
- headersMapper: ReturnPostHeaders
6325
+ bodyMapper: ReservationOrderResponse
6300
6326
  },
6301
6327
  default: {
6302
6328
  bodyMapper: ErrorModel
@@ -6337,7 +6363,7 @@ class CalculateExchangeImpl {
6337
6363
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
6338
6364
  return this.client.sendOperationRequest(args, spec);
6339
6365
  });
6340
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
6366
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
6341
6367
  var _a;
6342
6368
  let currentRawResponse = undefined;
6343
6369
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -6356,11 +6382,15 @@ class CalculateExchangeImpl {
6356
6382
  }
6357
6383
  };
6358
6384
  });
6359
- const lro = new LroImpl(sendOperation, { body, options }, postOperationSpec$1);
6360
- const poller = new coreLro.LroEngine(lro, {
6361
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
6385
+ const lro = createLroSpec({
6386
+ sendOperationFn,
6387
+ args: { body, options },
6388
+ spec: postOperationSpec$1
6389
+ });
6390
+ const poller = yield coreLro.createHttpPoller(lro, {
6391
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
6362
6392
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
6363
- lroResourceLocationConfig: "azure-async-operation"
6393
+ resourceLocationConfig: "azure-async-operation"
6364
6394
  });
6365
6395
  yield poller.poll();
6366
6396
  return poller;
@@ -6436,7 +6466,7 @@ class ExchangeImpl {
6436
6466
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
6437
6467
  return this.client.sendOperationRequest(args, spec);
6438
6468
  });
6439
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
6469
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
6440
6470
  var _a;
6441
6471
  let currentRawResponse = undefined;
6442
6472
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -6455,11 +6485,15 @@ class ExchangeImpl {
6455
6485
  }
6456
6486
  };
6457
6487
  });
6458
- const lro = new LroImpl(sendOperation, { body, options }, postOperationSpec);
6459
- const poller = new coreLro.LroEngine(lro, {
6460
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
6488
+ const lro = createLroSpec({
6489
+ sendOperationFn,
6490
+ args: { body, options },
6491
+ spec: postOperationSpec
6492
+ });
6493
+ const poller = yield coreLro.createHttpPoller(lro, {
6494
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
6461
6495
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
6462
- lroResourceLocationConfig: "azure-async-operation"
6496
+ resourceLocationConfig: "azure-async-operation"
6463
6497
  });
6464
6498
  yield poller.poll();
6465
6499
  return poller;
@@ -6622,7 +6656,7 @@ class QuotaImpl {
6622
6656
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
6623
6657
  return this.client.sendOperationRequest(args, spec);
6624
6658
  });
6625
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
6659
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
6626
6660
  var _a;
6627
6661
  let currentRawResponse = undefined;
6628
6662
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -6641,18 +6675,22 @@ class QuotaImpl {
6641
6675
  }
6642
6676
  };
6643
6677
  });
6644
- const lro = new LroImpl(sendOperation, {
6645
- subscriptionId,
6646
- providerId,
6647
- location,
6648
- resourceName,
6649
- createQuotaRequest,
6650
- options
6651
- }, createOrUpdateOperationSpec);
6652
- const poller = new coreLro.LroEngine(lro, {
6653
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
6678
+ const lro = createLroSpec({
6679
+ sendOperationFn,
6680
+ args: {
6681
+ subscriptionId,
6682
+ providerId,
6683
+ location,
6684
+ resourceName,
6685
+ createQuotaRequest,
6686
+ options
6687
+ },
6688
+ spec: createOrUpdateOperationSpec
6689
+ });
6690
+ const poller = yield coreLro.createHttpPoller(lro, {
6691
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
6654
6692
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
6655
- lroResourceLocationConfig: "original-uri"
6693
+ resourceLocationConfig: "original-uri"
6656
6694
  });
6657
6695
  yield poller.poll();
6658
6696
  return poller;
@@ -6700,7 +6738,7 @@ class QuotaImpl {
6700
6738
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
6701
6739
  return this.client.sendOperationRequest(args, spec);
6702
6740
  });
6703
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
6741
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
6704
6742
  var _a;
6705
6743
  let currentRawResponse = undefined;
6706
6744
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -6719,18 +6757,22 @@ class QuotaImpl {
6719
6757
  }
6720
6758
  };
6721
6759
  });
6722
- const lro = new LroImpl(sendOperation, {
6723
- subscriptionId,
6724
- providerId,
6725
- location,
6726
- resourceName,
6727
- createQuotaRequest,
6728
- options
6729
- }, updateOperationSpec);
6730
- const poller = new coreLro.LroEngine(lro, {
6731
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
6760
+ const lro = createLroSpec({
6761
+ sendOperationFn,
6762
+ args: {
6763
+ subscriptionId,
6764
+ providerId,
6765
+ location,
6766
+ resourceName,
6767
+ createQuotaRequest,
6768
+ options
6769
+ },
6770
+ spec: updateOperationSpec
6771
+ });
6772
+ const poller = yield coreLro.createHttpPoller(lro, {
6773
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
6732
6774
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
6733
- lroResourceLocationConfig: "original-uri"
6775
+ resourceLocationConfig: "original-uri"
6734
6776
  });
6735
6777
  yield poller.poll();
6736
6778
  return poller;
@@ -7131,7 +7173,7 @@ class AzureReservationAPI extends coreClient__namespace.ServiceClient {
7131
7173
  requestContentType: "application/json; charset=utf-8",
7132
7174
  credential: credentials
7133
7175
  };
7134
- const packageDetails = `azsdk-js-arm-reservations/8.0.1`;
7176
+ const packageDetails = `azsdk-js-arm-reservations/9.0.0`;
7135
7177
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
7136
7178
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
7137
7179
  : `${packageDetails}`;