@azure/arm-dataprotection 1.0.0-beta.2 → 1.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 (49) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/dist/index.js +185 -89
  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/dataProtectionClient.js +1 -1
  7. package/dist-esm/src/dataProtectionClient.js.map +1 -1
  8. package/dist-esm/src/lroImpl.d.ts +6 -11
  9. package/dist-esm/src/lroImpl.d.ts.map +1 -1
  10. package/dist-esm/src/lroImpl.js +12 -20
  11. package/dist-esm/src/lroImpl.js.map +1 -1
  12. package/dist-esm/src/operations/backupInstances.d.ts +13 -13
  13. package/dist-esm/src/operations/backupInstances.d.ts.map +1 -1
  14. package/dist-esm/src/operations/backupInstances.js +134 -50
  15. package/dist-esm/src/operations/backupInstances.js.map +1 -1
  16. package/dist-esm/src/operations/backupVaults.d.ts +4 -4
  17. package/dist-esm/src/operations/backupVaults.d.ts.map +1 -1
  18. package/dist-esm/src/operations/backupVaults.js +26 -14
  19. package/dist-esm/src/operations/backupVaults.js.map +1 -1
  20. package/dist-esm/src/operations/deletedBackupInstances.d.ts +2 -2
  21. package/dist-esm/src/operations/deletedBackupInstances.d.ts.map +1 -1
  22. package/dist-esm/src/operations/deletedBackupInstances.js +10 -6
  23. package/dist-esm/src/operations/deletedBackupInstances.js.map +1 -1
  24. package/dist-esm/src/operations/exportJobs.d.ts +2 -2
  25. package/dist-esm/src/operations/exportJobs.d.ts.map +1 -1
  26. package/dist-esm/src/operations/exportJobs.js +11 -7
  27. package/dist-esm/src/operations/exportJobs.js.map +1 -1
  28. package/dist-esm/src/operationsInterfaces/backupInstances.d.ts +13 -13
  29. package/dist-esm/src/operationsInterfaces/backupInstances.d.ts.map +1 -1
  30. package/dist-esm/src/operationsInterfaces/backupVaults.d.ts +4 -4
  31. package/dist-esm/src/operationsInterfaces/backupVaults.d.ts.map +1 -1
  32. package/dist-esm/src/operationsInterfaces/deletedBackupInstances.d.ts +2 -2
  33. package/dist-esm/src/operationsInterfaces/deletedBackupInstances.d.ts.map +1 -1
  34. package/dist-esm/src/operationsInterfaces/exportJobs.d.ts +2 -2
  35. package/dist-esm/src/operationsInterfaces/exportJobs.d.ts.map +1 -1
  36. package/package.json +6 -6
  37. package/review/arm-dataprotection.api.md +19 -19
  38. package/src/dataProtectionClient.ts +1 -1
  39. package/src/lroImpl.ts +31 -23
  40. package/src/operations/backupInstances.ts +174 -116
  41. package/src/operations/backupVaults.ts +41 -31
  42. package/src/operations/deletedBackupInstances.ts +15 -11
  43. package/src/operations/exportJobs.ts +20 -13
  44. package/src/operationsInterfaces/backupInstances.ts +19 -19
  45. package/src/operationsInterfaces/backupVaults.ts +6 -6
  46. package/src/operationsInterfaces/deletedBackupInstances.ts +2 -2
  47. package/src/operationsInterfaces/exportJobs.ts +3 -3
  48. package/types/arm-dataprotection.d.ts +19 -19
  49. package/types/tsdoc-metadata.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # Release History
2
2
 
3
- ## 1.0.0-beta.2 (2023-02-09)
3
+ ## 1.0.0 (2023-03-08)
4
4
 
5
5
  The package of @azure/arm-dataprotection is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart).
package/dist/index.js CHANGED
@@ -5279,25 +5279,17 @@ const requestName = {
5279
5279
  * Code generated by Microsoft (R) AutoRest Code Generator.
5280
5280
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
5281
5281
  */
5282
- class LroImpl {
5283
- constructor(sendOperationFn, args, spec, requestPath = spec.path, requestMethod = spec.httpMethod) {
5284
- this.sendOperationFn = sendOperationFn;
5285
- this.args = args;
5286
- this.spec = spec;
5287
- this.requestPath = requestPath;
5288
- this.requestMethod = requestMethod;
5289
- }
5290
- sendInitialRequest() {
5291
- return tslib.__awaiter(this, void 0, void 0, function* () {
5292
- return this.sendOperationFn(this.args, this.spec);
5293
- });
5294
- }
5295
- sendPollRequest(path) {
5296
- return tslib.__awaiter(this, void 0, void 0, function* () {
5297
- const _a = this.spec, restSpec = tslib.__rest(_a, ["requestBody"]);
5298
- return this.sendOperationFn(this.args, Object.assign(Object.assign({}, restSpec), { path, httpMethod: "GET" }));
5299
- });
5300
- }
5282
+ function createLroSpec(inputs) {
5283
+ const { args, spec, sendOperationFn } = inputs;
5284
+ return {
5285
+ requestMethod: spec.httpMethod,
5286
+ requestPath: spec.path,
5287
+ sendInitialRequest: () => sendOperationFn(args, spec),
5288
+ sendPollRequest: (path, options) => {
5289
+ const restSpec = tslib.__rest(spec, ["requestBody"]);
5290
+ return sendOperationFn(args, Object.assign(Object.assign({}, restSpec), { httpMethod: "GET", path, abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal }));
5291
+ }
5292
+ };
5301
5293
  }
5302
5294
 
5303
5295
  /*
@@ -5472,7 +5464,7 @@ class BackupVaultsImpl {
5472
5464
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
5473
5465
  return this.client.sendOperationRequest(args, spec);
5474
5466
  });
5475
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
5467
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
5476
5468
  var _a;
5477
5469
  let currentRawResponse = undefined;
5478
5470
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -5491,9 +5483,13 @@ class BackupVaultsImpl {
5491
5483
  }
5492
5484
  };
5493
5485
  });
5494
- const lro = new LroImpl(sendOperation, { resourceGroupName, vaultName, parameters, options }, createOrUpdateOperationSpec$2);
5495
- const poller = new coreLro.LroEngine(lro, {
5496
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
5486
+ const lro = createLroSpec({
5487
+ sendOperationFn,
5488
+ args: { resourceGroupName, vaultName, parameters, options },
5489
+ spec: createOrUpdateOperationSpec$2
5490
+ });
5491
+ const poller = yield coreLro.createHttpPoller(lro, {
5492
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
5497
5493
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
5498
5494
  });
5499
5495
  yield poller.poll();
@@ -5524,7 +5520,7 @@ class BackupVaultsImpl {
5524
5520
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
5525
5521
  return this.client.sendOperationRequest(args, spec);
5526
5522
  });
5527
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
5523
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
5528
5524
  var _a;
5529
5525
  let currentRawResponse = undefined;
5530
5526
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -5543,9 +5539,13 @@ class BackupVaultsImpl {
5543
5539
  }
5544
5540
  };
5545
5541
  });
5546
- const lro = new LroImpl(sendOperation, { resourceGroupName, vaultName, options }, deleteOperationSpec$3);
5547
- const poller = new coreLro.LroEngine(lro, {
5548
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
5542
+ const lro = createLroSpec({
5543
+ sendOperationFn,
5544
+ args: { resourceGroupName, vaultName, options },
5545
+ spec: deleteOperationSpec$3
5546
+ });
5547
+ const poller = yield coreLro.createHttpPoller(lro, {
5548
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
5549
5549
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
5550
5550
  });
5551
5551
  yield poller.poll();
@@ -5577,7 +5577,7 @@ class BackupVaultsImpl {
5577
5577
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
5578
5578
  return this.client.sendOperationRequest(args, spec);
5579
5579
  });
5580
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
5580
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
5581
5581
  var _a;
5582
5582
  let currentRawResponse = undefined;
5583
5583
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -5596,9 +5596,13 @@ class BackupVaultsImpl {
5596
5596
  }
5597
5597
  };
5598
5598
  });
5599
- const lro = new LroImpl(sendOperation, { resourceGroupName, vaultName, parameters, options }, updateOperationSpec);
5600
- const poller = new coreLro.LroEngine(lro, {
5601
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
5599
+ const lro = createLroSpec({
5600
+ sendOperationFn,
5601
+ args: { resourceGroupName, vaultName, parameters, options },
5602
+ spec: updateOperationSpec
5603
+ });
5604
+ const poller = yield coreLro.createHttpPoller(lro, {
5605
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
5602
5606
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
5603
5607
  });
5604
5608
  yield poller.poll();
@@ -6642,7 +6646,7 @@ class BackupInstancesImpl {
6642
6646
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
6643
6647
  return this.client.sendOperationRequest(args, spec);
6644
6648
  });
6645
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
6649
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
6646
6650
  var _a;
6647
6651
  let currentRawResponse = undefined;
6648
6652
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -6661,9 +6665,19 @@ class BackupInstancesImpl {
6661
6665
  }
6662
6666
  };
6663
6667
  });
6664
- const lro = new LroImpl(sendOperation, { resourceGroupName, vaultName, backupInstanceName, parameters, options }, createOrUpdateOperationSpec);
6665
- const poller = new coreLro.LroEngine(lro, {
6666
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
6668
+ const lro = createLroSpec({
6669
+ sendOperationFn,
6670
+ args: {
6671
+ resourceGroupName,
6672
+ vaultName,
6673
+ backupInstanceName,
6674
+ parameters,
6675
+ options
6676
+ },
6677
+ spec: createOrUpdateOperationSpec
6678
+ });
6679
+ const poller = yield coreLro.createHttpPoller(lro, {
6680
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
6667
6681
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
6668
6682
  });
6669
6683
  yield poller.poll();
@@ -6696,7 +6710,7 @@ class BackupInstancesImpl {
6696
6710
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
6697
6711
  return this.client.sendOperationRequest(args, spec);
6698
6712
  });
6699
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
6713
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
6700
6714
  var _a;
6701
6715
  let currentRawResponse = undefined;
6702
6716
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -6715,9 +6729,13 @@ class BackupInstancesImpl {
6715
6729
  }
6716
6730
  };
6717
6731
  });
6718
- const lro = new LroImpl(sendOperation, { resourceGroupName, vaultName, backupInstanceName, options }, deleteOperationSpec$1);
6719
- const poller = new coreLro.LroEngine(lro, {
6720
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
6732
+ const lro = createLroSpec({
6733
+ sendOperationFn,
6734
+ args: { resourceGroupName, vaultName, backupInstanceName, options },
6735
+ spec: deleteOperationSpec$1
6736
+ });
6737
+ const poller = yield coreLro.createHttpPoller(lro, {
6738
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
6721
6739
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
6722
6740
  });
6723
6741
  yield poller.poll();
@@ -6750,7 +6768,7 @@ class BackupInstancesImpl {
6750
6768
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
6751
6769
  return this.client.sendOperationRequest(args, spec);
6752
6770
  });
6753
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
6771
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
6754
6772
  var _a;
6755
6773
  let currentRawResponse = undefined;
6756
6774
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -6769,9 +6787,19 @@ class BackupInstancesImpl {
6769
6787
  }
6770
6788
  };
6771
6789
  });
6772
- const lro = new LroImpl(sendOperation, { resourceGroupName, vaultName, backupInstanceName, parameters, options }, adhocBackupOperationSpec);
6773
- const poller = new coreLro.LroEngine(lro, {
6774
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
6790
+ const lro = createLroSpec({
6791
+ sendOperationFn,
6792
+ args: {
6793
+ resourceGroupName,
6794
+ vaultName,
6795
+ backupInstanceName,
6796
+ parameters,
6797
+ options
6798
+ },
6799
+ spec: adhocBackupOperationSpec
6800
+ });
6801
+ const poller = yield coreLro.createHttpPoller(lro, {
6802
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
6775
6803
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
6776
6804
  });
6777
6805
  yield poller.poll();
@@ -6804,7 +6832,7 @@ class BackupInstancesImpl {
6804
6832
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
6805
6833
  return this.client.sendOperationRequest(args, spec);
6806
6834
  });
6807
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
6835
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
6808
6836
  var _a;
6809
6837
  let currentRawResponse = undefined;
6810
6838
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -6823,9 +6851,13 @@ class BackupInstancesImpl {
6823
6851
  }
6824
6852
  };
6825
6853
  });
6826
- const lro = new LroImpl(sendOperation, { resourceGroupName, vaultName, parameters, options }, validateForBackupOperationSpec);
6827
- const poller = new coreLro.LroEngine(lro, {
6828
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
6854
+ const lro = createLroSpec({
6855
+ sendOperationFn,
6856
+ args: { resourceGroupName, vaultName, parameters, options },
6857
+ spec: validateForBackupOperationSpec
6858
+ });
6859
+ const poller = yield coreLro.createHttpPoller(lro, {
6860
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
6829
6861
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
6830
6862
  });
6831
6863
  yield poller.poll();
@@ -6875,7 +6907,7 @@ class BackupInstancesImpl {
6875
6907
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
6876
6908
  return this.client.sendOperationRequest(args, spec);
6877
6909
  });
6878
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
6910
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
6879
6911
  var _a;
6880
6912
  let currentRawResponse = undefined;
6881
6913
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -6894,9 +6926,19 @@ class BackupInstancesImpl {
6894
6926
  }
6895
6927
  };
6896
6928
  });
6897
- const lro = new LroImpl(sendOperation, { resourceGroupName, vaultName, backupInstanceName, parameters, options }, triggerRehydrateOperationSpec);
6898
- const poller = new coreLro.LroEngine(lro, {
6899
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
6929
+ const lro = createLroSpec({
6930
+ sendOperationFn,
6931
+ args: {
6932
+ resourceGroupName,
6933
+ vaultName,
6934
+ backupInstanceName,
6935
+ parameters,
6936
+ options
6937
+ },
6938
+ spec: triggerRehydrateOperationSpec
6939
+ });
6940
+ const poller = yield coreLro.createHttpPoller(lro, {
6941
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
6900
6942
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
6901
6943
  });
6902
6944
  yield poller.poll();
@@ -6930,7 +6972,7 @@ class BackupInstancesImpl {
6930
6972
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
6931
6973
  return this.client.sendOperationRequest(args, spec);
6932
6974
  });
6933
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
6975
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
6934
6976
  var _a;
6935
6977
  let currentRawResponse = undefined;
6936
6978
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -6949,9 +6991,19 @@ class BackupInstancesImpl {
6949
6991
  }
6950
6992
  };
6951
6993
  });
6952
- const lro = new LroImpl(sendOperation, { resourceGroupName, vaultName, backupInstanceName, parameters, options }, triggerRestoreOperationSpec);
6953
- const poller = new coreLro.LroEngine(lro, {
6954
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
6994
+ const lro = createLroSpec({
6995
+ sendOperationFn,
6996
+ args: {
6997
+ resourceGroupName,
6998
+ vaultName,
6999
+ backupInstanceName,
7000
+ parameters,
7001
+ options
7002
+ },
7003
+ spec: triggerRestoreOperationSpec
7004
+ });
7005
+ const poller = yield coreLro.createHttpPoller(lro, {
7006
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
6955
7007
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
6956
7008
  });
6957
7009
  yield poller.poll();
@@ -6984,7 +7036,7 @@ class BackupInstancesImpl {
6984
7036
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
6985
7037
  return this.client.sendOperationRequest(args, spec);
6986
7038
  });
6987
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
7039
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
6988
7040
  var _a;
6989
7041
  let currentRawResponse = undefined;
6990
7042
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -7003,9 +7055,13 @@ class BackupInstancesImpl {
7003
7055
  }
7004
7056
  };
7005
7057
  });
7006
- const lro = new LroImpl(sendOperation, { resourceGroupName, vaultName, backupInstanceName, options }, resumeBackupsOperationSpec);
7007
- const poller = new coreLro.LroEngine(lro, {
7008
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
7058
+ const lro = createLroSpec({
7059
+ sendOperationFn,
7060
+ args: { resourceGroupName, vaultName, backupInstanceName, options },
7061
+ spec: resumeBackupsOperationSpec
7062
+ });
7063
+ const poller = yield coreLro.createHttpPoller(lro, {
7064
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
7009
7065
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
7010
7066
  });
7011
7067
  yield poller.poll();
@@ -7037,7 +7093,7 @@ class BackupInstancesImpl {
7037
7093
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
7038
7094
  return this.client.sendOperationRequest(args, spec);
7039
7095
  });
7040
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
7096
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
7041
7097
  var _a;
7042
7098
  let currentRawResponse = undefined;
7043
7099
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -7056,9 +7112,13 @@ class BackupInstancesImpl {
7056
7112
  }
7057
7113
  };
7058
7114
  });
7059
- const lro = new LroImpl(sendOperation, { resourceGroupName, vaultName, backupInstanceName, options }, resumeProtectionOperationSpec);
7060
- const poller = new coreLro.LroEngine(lro, {
7061
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
7115
+ const lro = createLroSpec({
7116
+ sendOperationFn,
7117
+ args: { resourceGroupName, vaultName, backupInstanceName, options },
7118
+ spec: resumeProtectionOperationSpec
7119
+ });
7120
+ const poller = yield coreLro.createHttpPoller(lro, {
7121
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
7062
7122
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
7063
7123
  });
7064
7124
  yield poller.poll();
@@ -7090,7 +7150,7 @@ class BackupInstancesImpl {
7090
7150
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
7091
7151
  return this.client.sendOperationRequest(args, spec);
7092
7152
  });
7093
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
7153
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
7094
7154
  var _a;
7095
7155
  let currentRawResponse = undefined;
7096
7156
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -7109,9 +7169,13 @@ class BackupInstancesImpl {
7109
7169
  }
7110
7170
  };
7111
7171
  });
7112
- const lro = new LroImpl(sendOperation, { resourceGroupName, vaultName, backupInstanceName, options }, stopProtectionOperationSpec);
7113
- const poller = new coreLro.LroEngine(lro, {
7114
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
7172
+ const lro = createLroSpec({
7173
+ sendOperationFn,
7174
+ args: { resourceGroupName, vaultName, backupInstanceName, options },
7175
+ spec: stopProtectionOperationSpec
7176
+ });
7177
+ const poller = yield coreLro.createHttpPoller(lro, {
7178
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
7115
7179
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
7116
7180
  });
7117
7181
  yield poller.poll();
@@ -7144,7 +7208,7 @@ class BackupInstancesImpl {
7144
7208
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
7145
7209
  return this.client.sendOperationRequest(args, spec);
7146
7210
  });
7147
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
7211
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
7148
7212
  var _a;
7149
7213
  let currentRawResponse = undefined;
7150
7214
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -7163,9 +7227,13 @@ class BackupInstancesImpl {
7163
7227
  }
7164
7228
  };
7165
7229
  });
7166
- const lro = new LroImpl(sendOperation, { resourceGroupName, vaultName, backupInstanceName, options }, suspendBackupsOperationSpec);
7167
- const poller = new coreLro.LroEngine(lro, {
7168
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
7230
+ const lro = createLroSpec({
7231
+ sendOperationFn,
7232
+ args: { resourceGroupName, vaultName, backupInstanceName, options },
7233
+ spec: suspendBackupsOperationSpec
7234
+ });
7235
+ const poller = yield coreLro.createHttpPoller(lro, {
7236
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
7169
7237
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
7170
7238
  });
7171
7239
  yield poller.poll();
@@ -7200,7 +7268,7 @@ class BackupInstancesImpl {
7200
7268
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
7201
7269
  return this.client.sendOperationRequest(args, spec);
7202
7270
  });
7203
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
7271
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
7204
7272
  var _a;
7205
7273
  let currentRawResponse = undefined;
7206
7274
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -7219,9 +7287,19 @@ class BackupInstancesImpl {
7219
7287
  }
7220
7288
  };
7221
7289
  });
7222
- const lro = new LroImpl(sendOperation, { resourceGroupName, vaultName, backupInstanceName, parameters, options }, syncBackupInstanceOperationSpec);
7223
- const poller = new coreLro.LroEngine(lro, {
7224
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
7290
+ const lro = createLroSpec({
7291
+ sendOperationFn,
7292
+ args: {
7293
+ resourceGroupName,
7294
+ vaultName,
7295
+ backupInstanceName,
7296
+ parameters,
7297
+ options
7298
+ },
7299
+ spec: syncBackupInstanceOperationSpec
7300
+ });
7301
+ const poller = yield coreLro.createHttpPoller(lro, {
7302
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
7225
7303
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
7226
7304
  });
7227
7305
  yield poller.poll();
@@ -7256,7 +7334,7 @@ class BackupInstancesImpl {
7256
7334
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
7257
7335
  return this.client.sendOperationRequest(args, spec);
7258
7336
  });
7259
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
7337
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
7260
7338
  var _a;
7261
7339
  let currentRawResponse = undefined;
7262
7340
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -7275,9 +7353,19 @@ class BackupInstancesImpl {
7275
7353
  }
7276
7354
  };
7277
7355
  });
7278
- const lro = new LroImpl(sendOperation, { resourceGroupName, vaultName, backupInstanceName, parameters, options }, validateForRestoreOperationSpec);
7279
- const poller = new coreLro.LroEngine(lro, {
7280
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
7356
+ const lro = createLroSpec({
7357
+ sendOperationFn,
7358
+ args: {
7359
+ resourceGroupName,
7360
+ vaultName,
7361
+ backupInstanceName,
7362
+ parameters,
7363
+ options
7364
+ },
7365
+ spec: validateForRestoreOperationSpec
7366
+ });
7367
+ const poller = yield coreLro.createHttpPoller(lro, {
7368
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
7281
7369
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
7282
7370
  });
7283
7371
  yield poller.poll();
@@ -8186,7 +8274,7 @@ class ExportJobsImpl {
8186
8274
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
8187
8275
  return this.client.sendOperationRequest(args, spec);
8188
8276
  });
8189
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
8277
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
8190
8278
  var _a;
8191
8279
  let currentRawResponse = undefined;
8192
8280
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -8205,11 +8293,15 @@ class ExportJobsImpl {
8205
8293
  }
8206
8294
  };
8207
8295
  });
8208
- const lro = new LroImpl(sendOperation, { resourceGroupName, vaultName, options }, triggerOperationSpec);
8209
- const poller = new coreLro.LroEngine(lro, {
8210
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
8296
+ const lro = createLroSpec({
8297
+ sendOperationFn,
8298
+ args: { resourceGroupName, vaultName, options },
8299
+ spec: triggerOperationSpec
8300
+ });
8301
+ const poller = yield coreLro.createHttpPoller(lro, {
8302
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
8211
8303
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
8212
- lroResourceLocationConfig: "location"
8304
+ resourceLocationConfig: "location"
8213
8305
  });
8214
8306
  yield poller.poll();
8215
8307
  return poller;
@@ -8424,7 +8516,7 @@ class DeletedBackupInstancesImpl {
8424
8516
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
8425
8517
  return this.client.sendOperationRequest(args, spec);
8426
8518
  });
8427
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
8519
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
8428
8520
  var _a;
8429
8521
  let currentRawResponse = undefined;
8430
8522
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -8443,9 +8535,13 @@ class DeletedBackupInstancesImpl {
8443
8535
  }
8444
8536
  };
8445
8537
  });
8446
- const lro = new LroImpl(sendOperation, { resourceGroupName, vaultName, backupInstanceName, options }, undeleteOperationSpec);
8447
- const poller = new coreLro.LroEngine(lro, {
8448
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
8538
+ const lro = createLroSpec({
8539
+ sendOperationFn,
8540
+ args: { resourceGroupName, vaultName, backupInstanceName, options },
8541
+ spec: undeleteOperationSpec
8542
+ });
8543
+ const poller = yield coreLro.createHttpPoller(lro, {
8544
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
8449
8545
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
8450
8546
  });
8451
8547
  yield poller.poll();
@@ -9921,7 +10017,7 @@ class DataProtectionClient extends coreClient__namespace.ServiceClient {
9921
10017
  requestContentType: "application/json; charset=utf-8",
9922
10018
  credential: credentials
9923
10019
  };
9924
- const packageDetails = `azsdk-js-arm-dataprotection/1.0.0-beta.2`;
10020
+ const packageDetails = `azsdk-js-arm-dataprotection/1.0.0`;
9925
10021
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
9926
10022
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
9927
10023
  : `${packageDetails}`;