@azure/arm-consumption 9.2.1-alpha.20250102.1 → 9.2.1-alpha.20250106.1

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.
package/dist/index.js CHANGED
@@ -46,14 +46,14 @@ function getContinuationToken(page) {
46
46
  if (typeof page !== "object" || page === null) {
47
47
  return undefined;
48
48
  }
49
- return (_a = pageMap.get(page)) === null || _a === void 0 ? void 0 : _a.continuationToken;
49
+ return (_a = pageMap.get(page)) === null || _a === undefined ? undefined : _a.continuationToken;
50
50
  }
51
51
  function setContinuationToken(page, continuationToken) {
52
52
  var _a;
53
53
  if (typeof page !== "object" || page === null || !continuationToken) {
54
54
  return;
55
55
  }
56
- const pageInfo = (_a = pageMap.get(page)) !== null && _a !== void 0 ? _a : {};
56
+ const pageInfo = (_a = pageMap.get(page)) !== null && _a !== undefined ? _a : {};
57
57
  pageInfo.continuationToken = continuationToken;
58
58
  pageMap.set(page, pageInfo);
59
59
  }
@@ -4763,7 +4763,7 @@ class UsageDetailsImpl {
4763
4763
  return this;
4764
4764
  },
4765
4765
  byPage: (settings) => {
4766
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
4766
+ if (settings === null || settings === undefined ? undefined : settings.maxPageSize) {
4767
4767
  throw new Error("maxPageSize is not supported by this operation.");
4768
4768
  }
4769
4769
  return this.listPagingPage(scope, options, settings);
@@ -4773,7 +4773,7 @@ class UsageDetailsImpl {
4773
4773
  listPagingPage(scope, options, settings) {
4774
4774
  return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
4775
4775
  let result;
4776
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
4776
+ let continuationToken = settings === null || settings === undefined ? undefined : settings.continuationToken;
4777
4777
  if (!continuationToken) {
4778
4778
  result = yield tslib.__await(this._list(scope, options));
4779
4779
  let page = result.value || [];
@@ -4949,7 +4949,7 @@ class MarketplacesImpl {
4949
4949
  return this;
4950
4950
  },
4951
4951
  byPage: (settings) => {
4952
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
4952
+ if (settings === null || settings === undefined ? undefined : settings.maxPageSize) {
4953
4953
  throw new Error("maxPageSize is not supported by this operation.");
4954
4954
  }
4955
4955
  return this.listPagingPage(scope, options, settings);
@@ -4959,7 +4959,7 @@ class MarketplacesImpl {
4959
4959
  listPagingPage(scope, options, settings) {
4960
4960
  return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
4961
4961
  let result;
4962
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
4962
+ let continuationToken = settings === null || settings === undefined ? undefined : settings.continuationToken;
4963
4963
  if (!continuationToken) {
4964
4964
  result = yield tslib.__await(this._list(scope, options));
4965
4965
  let page = result.value || [];
@@ -5118,7 +5118,7 @@ class BudgetsImpl {
5118
5118
  return this;
5119
5119
  },
5120
5120
  byPage: (settings) => {
5121
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
5121
+ if (settings === null || settings === undefined ? undefined : settings.maxPageSize) {
5122
5122
  throw new Error("maxPageSize is not supported by this operation.");
5123
5123
  }
5124
5124
  return this.listPagingPage(scope, options, settings);
@@ -5128,7 +5128,7 @@ class BudgetsImpl {
5128
5128
  listPagingPage(scope, options, settings) {
5129
5129
  return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
5130
5130
  let result;
5131
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
5131
+ let continuationToken = settings === null || settings === undefined ? undefined : settings.continuationToken;
5132
5132
  if (!continuationToken) {
5133
5133
  result = yield tslib.__await(this._list(scope, options));
5134
5134
  let page = result.value || [];
@@ -5584,7 +5584,7 @@ class ReservationsSummariesImpl {
5584
5584
  return this;
5585
5585
  },
5586
5586
  byPage: (settings) => {
5587
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
5587
+ if (settings === null || settings === undefined ? undefined : settings.maxPageSize) {
5588
5588
  throw new Error("maxPageSize is not supported by this operation.");
5589
5589
  }
5590
5590
  return this.listByReservationOrderPagingPage(reservationOrderId, grain, options, settings);
@@ -5594,7 +5594,7 @@ class ReservationsSummariesImpl {
5594
5594
  listByReservationOrderPagingPage(reservationOrderId, grain, options, settings) {
5595
5595
  return tslib.__asyncGenerator(this, arguments, function* listByReservationOrderPagingPage_1() {
5596
5596
  let result;
5597
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
5597
+ let continuationToken = settings === null || settings === undefined ? undefined : settings.continuationToken;
5598
5598
  if (!continuationToken) {
5599
5599
  result = yield tslib.__await(this._listByReservationOrder(reservationOrderId, grain, options));
5600
5600
  let page = result.value || [];
@@ -5648,7 +5648,7 @@ class ReservationsSummariesImpl {
5648
5648
  return this;
5649
5649
  },
5650
5650
  byPage: (settings) => {
5651
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
5651
+ if (settings === null || settings === undefined ? undefined : settings.maxPageSize) {
5652
5652
  throw new Error("maxPageSize is not supported by this operation.");
5653
5653
  }
5654
5654
  return this.listByReservationOrderAndReservationPagingPage(reservationOrderId, reservationId, grain, options, settings);
@@ -5658,7 +5658,7 @@ class ReservationsSummariesImpl {
5658
5658
  listByReservationOrderAndReservationPagingPage(reservationOrderId, reservationId, grain, options, settings) {
5659
5659
  return tslib.__asyncGenerator(this, arguments, function* listByReservationOrderAndReservationPagingPage_1() {
5660
5660
  let result;
5661
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
5661
+ let continuationToken = settings === null || settings === undefined ? undefined : settings.continuationToken;
5662
5662
  if (!continuationToken) {
5663
5663
  result = yield tslib.__await(this._listByReservationOrderAndReservation(reservationOrderId, reservationId, grain, options));
5664
5664
  let page = result.value || [];
@@ -5715,7 +5715,7 @@ class ReservationsSummariesImpl {
5715
5715
  return this;
5716
5716
  },
5717
5717
  byPage: (settings) => {
5718
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
5718
+ if (settings === null || settings === undefined ? undefined : settings.maxPageSize) {
5719
5719
  throw new Error("maxPageSize is not supported by this operation.");
5720
5720
  }
5721
5721
  return this.listPagingPage(scope, grain, options, settings);
@@ -5725,7 +5725,7 @@ class ReservationsSummariesImpl {
5725
5725
  listPagingPage(scope, grain, options, settings) {
5726
5726
  return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
5727
5727
  let result;
5728
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
5728
+ let continuationToken = settings === null || settings === undefined ? undefined : settings.continuationToken;
5729
5729
  if (!continuationToken) {
5730
5730
  result = yield tslib.__await(this._list(scope, grain, options));
5731
5731
  let page = result.value || [];
@@ -5979,7 +5979,7 @@ class ReservationsDetailsImpl {
5979
5979
  return this;
5980
5980
  },
5981
5981
  byPage: (settings) => {
5982
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
5982
+ if (settings === null || settings === undefined ? undefined : settings.maxPageSize) {
5983
5983
  throw new Error("maxPageSize is not supported by this operation.");
5984
5984
  }
5985
5985
  return this.listByReservationOrderPagingPage(reservationOrderId, filter, options, settings);
@@ -5989,7 +5989,7 @@ class ReservationsDetailsImpl {
5989
5989
  listByReservationOrderPagingPage(reservationOrderId, filter, options, settings) {
5990
5990
  return tslib.__asyncGenerator(this, arguments, function* listByReservationOrderPagingPage_1() {
5991
5991
  let result;
5992
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
5992
+ let continuationToken = settings === null || settings === undefined ? undefined : settings.continuationToken;
5993
5993
  if (!continuationToken) {
5994
5994
  result = yield tslib.__await(this._listByReservationOrder(reservationOrderId, filter, options));
5995
5995
  let page = result.value || [];
@@ -6044,7 +6044,7 @@ class ReservationsDetailsImpl {
6044
6044
  return this;
6045
6045
  },
6046
6046
  byPage: (settings) => {
6047
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
6047
+ if (settings === null || settings === undefined ? undefined : settings.maxPageSize) {
6048
6048
  throw new Error("maxPageSize is not supported by this operation.");
6049
6049
  }
6050
6050
  return this.listByReservationOrderAndReservationPagingPage(reservationOrderId, reservationId, filter, options, settings);
@@ -6054,7 +6054,7 @@ class ReservationsDetailsImpl {
6054
6054
  listByReservationOrderAndReservationPagingPage(reservationOrderId, reservationId, filter, options, settings) {
6055
6055
  return tslib.__asyncGenerator(this, arguments, function* listByReservationOrderAndReservationPagingPage_1() {
6056
6056
  let result;
6057
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
6057
+ let continuationToken = settings === null || settings === undefined ? undefined : settings.continuationToken;
6058
6058
  if (!continuationToken) {
6059
6059
  result = yield tslib.__await(this._listByReservationOrderAndReservation(reservationOrderId, reservationId, filter, options));
6060
6060
  let page = result.value || [];
@@ -6110,7 +6110,7 @@ class ReservationsDetailsImpl {
6110
6110
  return this;
6111
6111
  },
6112
6112
  byPage: (settings) => {
6113
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
6113
+ if (settings === null || settings === undefined ? undefined : settings.maxPageSize) {
6114
6114
  throw new Error("maxPageSize is not supported by this operation.");
6115
6115
  }
6116
6116
  return this.listPagingPage(scope, options, settings);
@@ -6120,7 +6120,7 @@ class ReservationsDetailsImpl {
6120
6120
  listPagingPage(scope, options, settings) {
6121
6121
  return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
6122
6122
  let result;
6123
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
6123
+ let continuationToken = settings === null || settings === undefined ? undefined : settings.continuationToken;
6124
6124
  if (!continuationToken) {
6125
6125
  result = yield tslib.__await(this._list(scope, options));
6126
6126
  let page = result.value || [];
@@ -6377,7 +6377,7 @@ class ReservationRecommendationsImpl {
6377
6377
  return this;
6378
6378
  },
6379
6379
  byPage: (settings) => {
6380
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
6380
+ if (settings === null || settings === undefined ? undefined : settings.maxPageSize) {
6381
6381
  throw new Error("maxPageSize is not supported by this operation.");
6382
6382
  }
6383
6383
  return this.listPagingPage(scope, options, settings);
@@ -6387,7 +6387,7 @@ class ReservationRecommendationsImpl {
6387
6387
  listPagingPage(scope, options, settings) {
6388
6388
  return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
6389
6389
  let result;
6390
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
6390
+ let continuationToken = settings === null || settings === undefined ? undefined : settings.continuationToken;
6391
6391
  if (!continuationToken) {
6392
6392
  result = yield tslib.__await(this._list(scope, options));
6393
6393
  let page = result.value || [];
@@ -6581,7 +6581,7 @@ class ReservationTransactionsImpl {
6581
6581
  return this;
6582
6582
  },
6583
6583
  byPage: (settings) => {
6584
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
6584
+ if (settings === null || settings === undefined ? undefined : settings.maxPageSize) {
6585
6585
  throw new Error("maxPageSize is not supported by this operation.");
6586
6586
  }
6587
6587
  return this.listPagingPage(billingAccountId, options, settings);
@@ -6591,7 +6591,7 @@ class ReservationTransactionsImpl {
6591
6591
  listPagingPage(billingAccountId, options, settings) {
6592
6592
  return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
6593
6593
  let result;
6594
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
6594
+ let continuationToken = settings === null || settings === undefined ? undefined : settings.continuationToken;
6595
6595
  if (!continuationToken) {
6596
6596
  result = yield tslib.__await(this._list(billingAccountId, options));
6597
6597
  let page = result.value || [];
@@ -6644,7 +6644,7 @@ class ReservationTransactionsImpl {
6644
6644
  return this;
6645
6645
  },
6646
6646
  byPage: (settings) => {
6647
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
6647
+ if (settings === null || settings === undefined ? undefined : settings.maxPageSize) {
6648
6648
  throw new Error("maxPageSize is not supported by this operation.");
6649
6649
  }
6650
6650
  return this.listByBillingProfilePagingPage(billingAccountId, billingProfileId, options, settings);
@@ -6654,7 +6654,7 @@ class ReservationTransactionsImpl {
6654
6654
  listByBillingProfilePagingPage(billingAccountId, billingProfileId, options, settings) {
6655
6655
  return tslib.__asyncGenerator(this, arguments, function* listByBillingProfilePagingPage_1() {
6656
6656
  let result;
6657
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
6657
+ let continuationToken = settings === null || settings === undefined ? undefined : settings.continuationToken;
6658
6658
  if (!continuationToken) {
6659
6659
  result = yield tslib.__await(this._listByBillingProfile(billingAccountId, billingProfileId, options));
6660
6660
  let page = result.value || [];
@@ -6920,7 +6920,7 @@ class OperationsImpl {
6920
6920
  return this;
6921
6921
  },
6922
6922
  byPage: (settings) => {
6923
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
6923
+ if (settings === null || settings === undefined ? undefined : settings.maxPageSize) {
6924
6924
  throw new Error("maxPageSize is not supported by this operation.");
6925
6925
  }
6926
6926
  return this.listPagingPage(options, settings);
@@ -6930,7 +6930,7 @@ class OperationsImpl {
6930
6930
  listPagingPage(options, settings) {
6931
6931
  return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
6932
6932
  let result;
6933
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
6933
+ let continuationToken = settings === null || settings === undefined ? undefined : settings.continuationToken;
6934
6934
  if (!continuationToken) {
6935
6935
  result = yield tslib.__await(this._list(options));
6936
6936
  let page = result.value || [];
@@ -7128,7 +7128,7 @@ class EventsOperationsImpl {
7128
7128
  return this;
7129
7129
  },
7130
7130
  byPage: (settings) => {
7131
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
7131
+ if (settings === null || settings === undefined ? undefined : settings.maxPageSize) {
7132
7132
  throw new Error("maxPageSize is not supported by this operation.");
7133
7133
  }
7134
7134
  return this.listByBillingProfilePagingPage(billingAccountId, billingProfileId, startDate, endDate, options, settings);
@@ -7138,7 +7138,7 @@ class EventsOperationsImpl {
7138
7138
  listByBillingProfilePagingPage(billingAccountId, billingProfileId, startDate, endDate, options, settings) {
7139
7139
  return tslib.__asyncGenerator(this, arguments, function* listByBillingProfilePagingPage_1() {
7140
7140
  let result;
7141
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
7141
+ let continuationToken = settings === null || settings === undefined ? undefined : settings.continuationToken;
7142
7142
  if (!continuationToken) {
7143
7143
  result = yield tslib.__await(this._listByBillingProfile(billingAccountId, billingProfileId, startDate, endDate, options));
7144
7144
  let page = result.value || [];
@@ -7191,7 +7191,7 @@ class EventsOperationsImpl {
7191
7191
  return this;
7192
7192
  },
7193
7193
  byPage: (settings) => {
7194
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
7194
+ if (settings === null || settings === undefined ? undefined : settings.maxPageSize) {
7195
7195
  throw new Error("maxPageSize is not supported by this operation.");
7196
7196
  }
7197
7197
  return this.listByBillingAccountPagingPage(billingAccountId, options, settings);
@@ -7201,7 +7201,7 @@ class EventsOperationsImpl {
7201
7201
  listByBillingAccountPagingPage(billingAccountId, options, settings) {
7202
7202
  return tslib.__asyncGenerator(this, arguments, function* listByBillingAccountPagingPage_1() {
7203
7203
  let result;
7204
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
7204
+ let continuationToken = settings === null || settings === undefined ? undefined : settings.continuationToken;
7205
7205
  if (!continuationToken) {
7206
7206
  result = yield tslib.__await(this._listByBillingAccount(billingAccountId, options));
7207
7207
  let page = result.value || [];
@@ -7396,7 +7396,7 @@ class LotsOperationsImpl {
7396
7396
  return this;
7397
7397
  },
7398
7398
  byPage: (settings) => {
7399
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
7399
+ if (settings === null || settings === undefined ? undefined : settings.maxPageSize) {
7400
7400
  throw new Error("maxPageSize is not supported by this operation.");
7401
7401
  }
7402
7402
  return this.listByBillingProfilePagingPage(billingAccountId, billingProfileId, options, settings);
@@ -7406,7 +7406,7 @@ class LotsOperationsImpl {
7406
7406
  listByBillingProfilePagingPage(billingAccountId, billingProfileId, options, settings) {
7407
7407
  return tslib.__asyncGenerator(this, arguments, function* listByBillingProfilePagingPage_1() {
7408
7408
  let result;
7409
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
7409
+ let continuationToken = settings === null || settings === undefined ? undefined : settings.continuationToken;
7410
7410
  if (!continuationToken) {
7411
7411
  result = yield tslib.__await(this._listByBillingProfile(billingAccountId, billingProfileId, options));
7412
7412
  let page = result.value || [];
@@ -7460,7 +7460,7 @@ class LotsOperationsImpl {
7460
7460
  return this;
7461
7461
  },
7462
7462
  byPage: (settings) => {
7463
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
7463
+ if (settings === null || settings === undefined ? undefined : settings.maxPageSize) {
7464
7464
  throw new Error("maxPageSize is not supported by this operation.");
7465
7465
  }
7466
7466
  return this.listByBillingAccountPagingPage(billingAccountId, options, settings);
@@ -7470,7 +7470,7 @@ class LotsOperationsImpl {
7470
7470
  listByBillingAccountPagingPage(billingAccountId, options, settings) {
7471
7471
  return tslib.__asyncGenerator(this, arguments, function* listByBillingAccountPagingPage_1() {
7472
7472
  let result;
7473
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
7473
+ let continuationToken = settings === null || settings === undefined ? undefined : settings.continuationToken;
7474
7474
  if (!continuationToken) {
7475
7475
  result = yield tslib.__await(this._listByBillingAccount(billingAccountId, options));
7476
7476
  let page = result.value || [];
@@ -7712,10 +7712,10 @@ class ConsumptionManagementClient extends coreClient__namespace.ServiceClient {
7712
7712
  : `${packageDetails}`;
7713
7713
  const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
7714
7714
  userAgentPrefix
7715
- }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
7715
+ }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== undefined ? _a : options.baseUri) !== null && _b !== undefined ? _b : "https://management.azure.com" });
7716
7716
  super(optionsWithDefaults);
7717
7717
  let bearerTokenAuthenticationPolicyFound = false;
7718
- if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
7718
+ if ((options === null || options === undefined ? undefined : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
7719
7719
  const pipelinePolicies = options.pipeline.getOrderedPolicies();
7720
7720
  bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
7721
7721
  coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName);
@@ -7729,7 +7729,7 @@ class ConsumptionManagementClient extends coreClient__namespace.ServiceClient {
7729
7729
  });
7730
7730
  this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
7731
7731
  credential: credentials,
7732
- scopes: (_c = optionsWithDefaults.credentialScopes) !== null && _c !== void 0 ? _c : `${optionsWithDefaults.endpoint}/.default`,
7732
+ scopes: (_c = optionsWithDefaults.credentialScopes) !== null && _c !== undefined ? _c : `${optionsWithDefaults.endpoint}/.default`,
7733
7733
  challengeCallbacks: {
7734
7734
  authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
7735
7735
  }
@@ -7767,7 +7767,7 @@ class ConsumptionManagementClient extends coreClient__namespace.ServiceClient {
7767
7767
  const apiVersionPolicy = {
7768
7768
  name: "CustomApiVersionPolicy",
7769
7769
  sendRequest(request, next) {
7770
- return tslib.__awaiter(this, void 0, void 0, function* () {
7770
+ return tslib.__awaiter(this, undefined, undefined, function* () {
7771
7771
  const param = request.url.split("?");
7772
7772
  if (param.length > 1) {
7773
7773
  const newParams = param[1].split("&").map((item) => {