@azure/arm-reservations 9.0.1-alpha.20250207.1 → 9.0.1-alpha.20250210.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 +102 -102
- package/dist/index.js.map +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -47,14 +47,14 @@ function getContinuationToken(page) {
|
|
|
47
47
|
if (typeof page !== "object" || page === null) {
|
|
48
48
|
return undefined;
|
|
49
49
|
}
|
|
50
|
-
return (_a = pageMap.get(page)) === null || _a ===
|
|
50
|
+
return (_a = pageMap.get(page)) === null || _a === void 0 ? void 0 : _a.continuationToken;
|
|
51
51
|
}
|
|
52
52
|
function setContinuationToken(page, continuationToken) {
|
|
53
53
|
var _a;
|
|
54
54
|
if (typeof page !== "object" || page === null || !continuationToken) {
|
|
55
55
|
return;
|
|
56
56
|
}
|
|
57
|
-
const pageInfo = (_a = pageMap.get(page)) !== null && _a !==
|
|
57
|
+
const pageInfo = (_a = pageMap.get(page)) !== null && _a !== void 0 ? _a : {};
|
|
58
58
|
pageInfo.continuationToken = continuationToken;
|
|
59
59
|
pageMap.set(page, pageInfo);
|
|
60
60
|
}
|
|
@@ -4904,7 +4904,7 @@ function createLroSpec(inputs) {
|
|
|
4904
4904
|
sendInitialRequest: () => sendOperationFn(args, spec),
|
|
4905
4905
|
sendPollRequest: (path, options) => {
|
|
4906
4906
|
const { requestBody } = spec, restSpec = tslib.__rest(spec, ["requestBody"]);
|
|
4907
|
-
return sendOperationFn(args, Object.assign(Object.assign({}, restSpec), { httpMethod: "GET", path, abortSignal: options === null || options ===
|
|
4907
|
+
return sendOperationFn(args, Object.assign(Object.assign({}, restSpec), { httpMethod: "GET", path, abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal }));
|
|
4908
4908
|
}
|
|
4909
4909
|
};
|
|
4910
4910
|
}
|
|
@@ -4941,7 +4941,7 @@ class ReservationImpl {
|
|
|
4941
4941
|
return this;
|
|
4942
4942
|
},
|
|
4943
4943
|
byPage: (settings) => {
|
|
4944
|
-
if (settings === null || settings ===
|
|
4944
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
|
4945
4945
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
4946
4946
|
}
|
|
4947
4947
|
return this.listPagingPage(reservationOrderId, options, settings);
|
|
@@ -4951,7 +4951,7 @@ class ReservationImpl {
|
|
|
4951
4951
|
listPagingPage(reservationOrderId, options, settings) {
|
|
4952
4952
|
return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
|
|
4953
4953
|
let result;
|
|
4954
|
-
let continuationToken = settings === null || settings ===
|
|
4954
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
|
4955
4955
|
if (!continuationToken) {
|
|
4956
4956
|
result = yield tslib.__await(this._list(reservationOrderId, options));
|
|
4957
4957
|
let page = result.value || [];
|
|
@@ -5004,7 +5004,7 @@ class ReservationImpl {
|
|
|
5004
5004
|
return this;
|
|
5005
5005
|
},
|
|
5006
5006
|
byPage: (settings) => {
|
|
5007
|
-
if (settings === null || settings ===
|
|
5007
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
|
5008
5008
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
5009
5009
|
}
|
|
5010
5010
|
return this.listRevisionsPagingPage(reservationOrderId, reservationId, options, settings);
|
|
@@ -5014,7 +5014,7 @@ class ReservationImpl {
|
|
|
5014
5014
|
listRevisionsPagingPage(reservationOrderId, reservationId, options, settings) {
|
|
5015
5015
|
return tslib.__asyncGenerator(this, arguments, function* listRevisionsPagingPage_1() {
|
|
5016
5016
|
let result;
|
|
5017
|
-
let continuationToken = settings === null || settings ===
|
|
5017
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
|
5018
5018
|
if (!continuationToken) {
|
|
5019
5019
|
result = yield tslib.__await(this._listRevisions(reservationOrderId, reservationId, options));
|
|
5020
5020
|
let page = result.value || [];
|
|
@@ -5066,7 +5066,7 @@ class ReservationImpl {
|
|
|
5066
5066
|
return this;
|
|
5067
5067
|
},
|
|
5068
5068
|
byPage: (settings) => {
|
|
5069
|
-
if (settings === null || settings ===
|
|
5069
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
|
5070
5070
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
5071
5071
|
}
|
|
5072
5072
|
return this.listAllPagingPage(options, settings);
|
|
@@ -5076,7 +5076,7 @@ class ReservationImpl {
|
|
|
5076
5076
|
listAllPagingPage(options, settings) {
|
|
5077
5077
|
return tslib.__asyncGenerator(this, arguments, function* listAllPagingPage_1() {
|
|
5078
5078
|
let result;
|
|
5079
|
-
let continuationToken = settings === null || settings ===
|
|
5079
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
|
5080
5080
|
if (!continuationToken) {
|
|
5081
5081
|
result = yield tslib.__await(this._listAll(options));
|
|
5082
5082
|
let page = result.value || [];
|
|
@@ -5122,17 +5122,17 @@ class ReservationImpl {
|
|
|
5122
5122
|
* @param options The options parameters.
|
|
5123
5123
|
*/
|
|
5124
5124
|
beginAvailableScopes(reservationOrderId, reservationId, body, options) {
|
|
5125
|
-
return tslib.__awaiter(this,
|
|
5126
|
-
const directSendOperation = (args, spec) => tslib.__awaiter(this,
|
|
5125
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
5126
|
+
const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
5127
5127
|
return this.client.sendOperationRequest(args, spec);
|
|
5128
5128
|
});
|
|
5129
|
-
const sendOperationFn = (args, spec) => tslib.__awaiter(this,
|
|
5129
|
+
const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
5130
5130
|
var _a;
|
|
5131
5131
|
let currentRawResponse = undefined;
|
|
5132
|
-
const providedCallback = (_a = args.options) === null || _a ===
|
|
5132
|
+
const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
|
|
5133
5133
|
const callback = (rawResponse, flatResponse) => {
|
|
5134
5134
|
currentRawResponse = rawResponse;
|
|
5135
|
-
providedCallback === null || providedCallback ===
|
|
5135
|
+
providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
|
|
5136
5136
|
};
|
|
5137
5137
|
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
5138
5138
|
const flatResponse = yield directSendOperation(updatedArgs, spec);
|
|
@@ -5151,8 +5151,8 @@ class ReservationImpl {
|
|
|
5151
5151
|
spec: availableScopesOperationSpec
|
|
5152
5152
|
});
|
|
5153
5153
|
const poller = yield coreLro.createHttpPoller(lro, {
|
|
5154
|
-
restoreFrom: options === null || options ===
|
|
5155
|
-
intervalInMs: options === null || options ===
|
|
5154
|
+
restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
5155
|
+
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
|
|
5156
5156
|
});
|
|
5157
5157
|
yield poller.poll();
|
|
5158
5158
|
return poller;
|
|
@@ -5167,7 +5167,7 @@ class ReservationImpl {
|
|
|
5167
5167
|
* @param options The options parameters.
|
|
5168
5168
|
*/
|
|
5169
5169
|
beginAvailableScopesAndWait(reservationOrderId, reservationId, body, options) {
|
|
5170
|
-
return tslib.__awaiter(this,
|
|
5170
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
5171
5171
|
const poller = yield this.beginAvailableScopes(reservationOrderId, reservationId, body, options);
|
|
5172
5172
|
return poller.pollUntilDone();
|
|
5173
5173
|
});
|
|
@@ -5179,17 +5179,17 @@ class ReservationImpl {
|
|
|
5179
5179
|
* @param options The options parameters.
|
|
5180
5180
|
*/
|
|
5181
5181
|
beginSplit(reservationOrderId, body, options) {
|
|
5182
|
-
return tslib.__awaiter(this,
|
|
5183
|
-
const directSendOperation = (args, spec) => tslib.__awaiter(this,
|
|
5182
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
5183
|
+
const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
5184
5184
|
return this.client.sendOperationRequest(args, spec);
|
|
5185
5185
|
});
|
|
5186
|
-
const sendOperationFn = (args, spec) => tslib.__awaiter(this,
|
|
5186
|
+
const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
5187
5187
|
var _a;
|
|
5188
5188
|
let currentRawResponse = undefined;
|
|
5189
|
-
const providedCallback = (_a = args.options) === null || _a ===
|
|
5189
|
+
const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
|
|
5190
5190
|
const callback = (rawResponse, flatResponse) => {
|
|
5191
5191
|
currentRawResponse = rawResponse;
|
|
5192
|
-
providedCallback === null || providedCallback ===
|
|
5192
|
+
providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
|
|
5193
5193
|
};
|
|
5194
5194
|
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
5195
5195
|
const flatResponse = yield directSendOperation(updatedArgs, spec);
|
|
@@ -5208,8 +5208,8 @@ class ReservationImpl {
|
|
|
5208
5208
|
spec: splitOperationSpec
|
|
5209
5209
|
});
|
|
5210
5210
|
const poller = yield coreLro.createHttpPoller(lro, {
|
|
5211
|
-
restoreFrom: options === null || options ===
|
|
5212
|
-
intervalInMs: options === null || options ===
|
|
5211
|
+
restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
5212
|
+
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
|
|
5213
5213
|
resourceLocationConfig: "location"
|
|
5214
5214
|
});
|
|
5215
5215
|
yield poller.poll();
|
|
@@ -5223,7 +5223,7 @@ class ReservationImpl {
|
|
|
5223
5223
|
* @param options The options parameters.
|
|
5224
5224
|
*/
|
|
5225
5225
|
beginSplitAndWait(reservationOrderId, body, options) {
|
|
5226
|
-
return tslib.__awaiter(this,
|
|
5226
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
5227
5227
|
const poller = yield this.beginSplit(reservationOrderId, body, options);
|
|
5228
5228
|
return poller.pollUntilDone();
|
|
5229
5229
|
});
|
|
@@ -5236,17 +5236,17 @@ class ReservationImpl {
|
|
|
5236
5236
|
* @param options The options parameters.
|
|
5237
5237
|
*/
|
|
5238
5238
|
beginMerge(reservationOrderId, body, options) {
|
|
5239
|
-
return tslib.__awaiter(this,
|
|
5240
|
-
const directSendOperation = (args, spec) => tslib.__awaiter(this,
|
|
5239
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
5240
|
+
const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
5241
5241
|
return this.client.sendOperationRequest(args, spec);
|
|
5242
5242
|
});
|
|
5243
|
-
const sendOperationFn = (args, spec) => tslib.__awaiter(this,
|
|
5243
|
+
const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
5244
5244
|
var _a;
|
|
5245
5245
|
let currentRawResponse = undefined;
|
|
5246
|
-
const providedCallback = (_a = args.options) === null || _a ===
|
|
5246
|
+
const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
|
|
5247
5247
|
const callback = (rawResponse, flatResponse) => {
|
|
5248
5248
|
currentRawResponse = rawResponse;
|
|
5249
|
-
providedCallback === null || providedCallback ===
|
|
5249
|
+
providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
|
|
5250
5250
|
};
|
|
5251
5251
|
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
5252
5252
|
const flatResponse = yield directSendOperation(updatedArgs, spec);
|
|
@@ -5265,8 +5265,8 @@ class ReservationImpl {
|
|
|
5265
5265
|
spec: mergeOperationSpec
|
|
5266
5266
|
});
|
|
5267
5267
|
const poller = yield coreLro.createHttpPoller(lro, {
|
|
5268
|
-
restoreFrom: options === null || options ===
|
|
5269
|
-
intervalInMs: options === null || options ===
|
|
5268
|
+
restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
5269
|
+
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
|
|
5270
5270
|
resourceLocationConfig: "location"
|
|
5271
5271
|
});
|
|
5272
5272
|
yield poller.poll();
|
|
@@ -5281,7 +5281,7 @@ class ReservationImpl {
|
|
|
5281
5281
|
* @param options The options parameters.
|
|
5282
5282
|
*/
|
|
5283
5283
|
beginMergeAndWait(reservationOrderId, body, options) {
|
|
5284
|
-
return tslib.__awaiter(this,
|
|
5284
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
5285
5285
|
const poller = yield this.beginMerge(reservationOrderId, body, options);
|
|
5286
5286
|
return poller.pollUntilDone();
|
|
5287
5287
|
});
|
|
@@ -5311,17 +5311,17 @@ class ReservationImpl {
|
|
|
5311
5311
|
* @param options The options parameters.
|
|
5312
5312
|
*/
|
|
5313
5313
|
beginUpdate(reservationOrderId, reservationId, parameters, options) {
|
|
5314
|
-
return tslib.__awaiter(this,
|
|
5315
|
-
const directSendOperation = (args, spec) => tslib.__awaiter(this,
|
|
5314
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
5315
|
+
const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
5316
5316
|
return this.client.sendOperationRequest(args, spec);
|
|
5317
5317
|
});
|
|
5318
|
-
const sendOperationFn = (args, spec) => tslib.__awaiter(this,
|
|
5318
|
+
const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
5319
5319
|
var _a;
|
|
5320
5320
|
let currentRawResponse = undefined;
|
|
5321
|
-
const providedCallback = (_a = args.options) === null || _a ===
|
|
5321
|
+
const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
|
|
5322
5322
|
const callback = (rawResponse, flatResponse) => {
|
|
5323
5323
|
currentRawResponse = rawResponse;
|
|
5324
|
-
providedCallback === null || providedCallback ===
|
|
5324
|
+
providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
|
|
5325
5325
|
};
|
|
5326
5326
|
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
5327
5327
|
const flatResponse = yield directSendOperation(updatedArgs, spec);
|
|
@@ -5340,8 +5340,8 @@ class ReservationImpl {
|
|
|
5340
5340
|
spec: updateOperationSpec$1
|
|
5341
5341
|
});
|
|
5342
5342
|
const poller = yield coreLro.createHttpPoller(lro, {
|
|
5343
|
-
restoreFrom: options === null || options ===
|
|
5344
|
-
intervalInMs: options === null || options ===
|
|
5343
|
+
restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
5344
|
+
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
|
|
5345
5345
|
resourceLocationConfig: "azure-async-operation"
|
|
5346
5346
|
});
|
|
5347
5347
|
yield poller.poll();
|
|
@@ -5356,7 +5356,7 @@ class ReservationImpl {
|
|
|
5356
5356
|
* @param options The options parameters.
|
|
5357
5357
|
*/
|
|
5358
5358
|
beginUpdateAndWait(reservationOrderId, reservationId, parameters, options) {
|
|
5359
|
-
return tslib.__awaiter(this,
|
|
5359
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
5360
5360
|
const poller = yield this.beginUpdate(reservationOrderId, reservationId, parameters, options);
|
|
5361
5361
|
return poller.pollUntilDone();
|
|
5362
5362
|
});
|
|
@@ -5801,7 +5801,7 @@ class ReservationOrderImpl {
|
|
|
5801
5801
|
return this;
|
|
5802
5802
|
},
|
|
5803
5803
|
byPage: (settings) => {
|
|
5804
|
-
if (settings === null || settings ===
|
|
5804
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
|
5805
5805
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
5806
5806
|
}
|
|
5807
5807
|
return this.listPagingPage(options, settings);
|
|
@@ -5811,7 +5811,7 @@ class ReservationOrderImpl {
|
|
|
5811
5811
|
listPagingPage(options, settings) {
|
|
5812
5812
|
return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
|
|
5813
5813
|
let result;
|
|
5814
|
-
let continuationToken = settings === null || settings ===
|
|
5814
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
|
5815
5815
|
if (!continuationToken) {
|
|
5816
5816
|
result = yield tslib.__await(this._list(options));
|
|
5817
5817
|
let page = result.value || [];
|
|
@@ -5870,17 +5870,17 @@ class ReservationOrderImpl {
|
|
|
5870
5870
|
* @param options The options parameters.
|
|
5871
5871
|
*/
|
|
5872
5872
|
beginPurchase(reservationOrderId, body, options) {
|
|
5873
|
-
return tslib.__awaiter(this,
|
|
5874
|
-
const directSendOperation = (args, spec) => tslib.__awaiter(this,
|
|
5873
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
5874
|
+
const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
5875
5875
|
return this.client.sendOperationRequest(args, spec);
|
|
5876
5876
|
});
|
|
5877
|
-
const sendOperationFn = (args, spec) => tslib.__awaiter(this,
|
|
5877
|
+
const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
5878
5878
|
var _a;
|
|
5879
5879
|
let currentRawResponse = undefined;
|
|
5880
|
-
const providedCallback = (_a = args.options) === null || _a ===
|
|
5880
|
+
const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
|
|
5881
5881
|
const callback = (rawResponse, flatResponse) => {
|
|
5882
5882
|
currentRawResponse = rawResponse;
|
|
5883
|
-
providedCallback === null || providedCallback ===
|
|
5883
|
+
providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
|
|
5884
5884
|
};
|
|
5885
5885
|
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
5886
5886
|
const flatResponse = yield directSendOperation(updatedArgs, spec);
|
|
@@ -5899,8 +5899,8 @@ class ReservationOrderImpl {
|
|
|
5899
5899
|
spec: purchaseOperationSpec
|
|
5900
5900
|
});
|
|
5901
5901
|
const poller = yield coreLro.createHttpPoller(lro, {
|
|
5902
|
-
restoreFrom: options === null || options ===
|
|
5903
|
-
intervalInMs: options === null || options ===
|
|
5902
|
+
restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
5903
|
+
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
|
|
5904
5904
|
resourceLocationConfig: "location"
|
|
5905
5905
|
});
|
|
5906
5906
|
yield poller.poll();
|
|
@@ -5914,7 +5914,7 @@ class ReservationOrderImpl {
|
|
|
5914
5914
|
* @param options The options parameters.
|
|
5915
5915
|
*/
|
|
5916
5916
|
beginPurchaseAndWait(reservationOrderId, body, options) {
|
|
5917
|
-
return tslib.__awaiter(this,
|
|
5917
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
5918
5918
|
const poller = yield this.beginPurchase(reservationOrderId, body, options);
|
|
5919
5919
|
return poller.pollUntilDone();
|
|
5920
5920
|
});
|
|
@@ -6090,7 +6090,7 @@ class OperationImpl {
|
|
|
6090
6090
|
return this;
|
|
6091
6091
|
},
|
|
6092
6092
|
byPage: (settings) => {
|
|
6093
|
-
if (settings === null || settings ===
|
|
6093
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
|
6094
6094
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
6095
6095
|
}
|
|
6096
6096
|
return this.listPagingPage(options, settings);
|
|
@@ -6100,7 +6100,7 @@ class OperationImpl {
|
|
|
6100
6100
|
listPagingPage(options, settings) {
|
|
6101
6101
|
return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
|
|
6102
6102
|
let result;
|
|
6103
|
-
let continuationToken = settings === null || settings ===
|
|
6103
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
|
6104
6104
|
if (!continuationToken) {
|
|
6105
6105
|
result = yield tslib.__await(this._list(options));
|
|
6106
6106
|
let page = result.value || [];
|
|
@@ -6258,17 +6258,17 @@ class ReturnImpl {
|
|
|
6258
6258
|
* @param options The options parameters.
|
|
6259
6259
|
*/
|
|
6260
6260
|
beginPost(reservationOrderId, body, options) {
|
|
6261
|
-
return tslib.__awaiter(this,
|
|
6262
|
-
const directSendOperation = (args, spec) => tslib.__awaiter(this,
|
|
6261
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
6262
|
+
const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
6263
6263
|
return this.client.sendOperationRequest(args, spec);
|
|
6264
6264
|
});
|
|
6265
|
-
const sendOperationFn = (args, spec) => tslib.__awaiter(this,
|
|
6265
|
+
const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
6266
6266
|
var _a;
|
|
6267
6267
|
let currentRawResponse = undefined;
|
|
6268
|
-
const providedCallback = (_a = args.options) === null || _a ===
|
|
6268
|
+
const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
|
|
6269
6269
|
const callback = (rawResponse, flatResponse) => {
|
|
6270
6270
|
currentRawResponse = rawResponse;
|
|
6271
|
-
providedCallback === null || providedCallback ===
|
|
6271
|
+
providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
|
|
6272
6272
|
};
|
|
6273
6273
|
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
6274
6274
|
const flatResponse = yield directSendOperation(updatedArgs, spec);
|
|
@@ -6287,8 +6287,8 @@ class ReturnImpl {
|
|
|
6287
6287
|
spec: postOperationSpec$2
|
|
6288
6288
|
});
|
|
6289
6289
|
const poller = yield coreLro.createHttpPoller(lro, {
|
|
6290
|
-
restoreFrom: options === null || options ===
|
|
6291
|
-
intervalInMs: options === null || options ===
|
|
6290
|
+
restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
6291
|
+
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
|
|
6292
6292
|
resourceLocationConfig: "location"
|
|
6293
6293
|
});
|
|
6294
6294
|
yield poller.poll();
|
|
@@ -6302,7 +6302,7 @@ class ReturnImpl {
|
|
|
6302
6302
|
* @param options The options parameters.
|
|
6303
6303
|
*/
|
|
6304
6304
|
beginPostAndWait(reservationOrderId, body, options) {
|
|
6305
|
-
return tslib.__awaiter(this,
|
|
6305
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
6306
6306
|
const poller = yield this.beginPost(reservationOrderId, body, options);
|
|
6307
6307
|
return poller.pollUntilDone();
|
|
6308
6308
|
});
|
|
@@ -6361,17 +6361,17 @@ class CalculateExchangeImpl {
|
|
|
6361
6361
|
* @param options The options parameters.
|
|
6362
6362
|
*/
|
|
6363
6363
|
beginPost(body, options) {
|
|
6364
|
-
return tslib.__awaiter(this,
|
|
6365
|
-
const directSendOperation = (args, spec) => tslib.__awaiter(this,
|
|
6364
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
6365
|
+
const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
6366
6366
|
return this.client.sendOperationRequest(args, spec);
|
|
6367
6367
|
});
|
|
6368
|
-
const sendOperationFn = (args, spec) => tslib.__awaiter(this,
|
|
6368
|
+
const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
6369
6369
|
var _a;
|
|
6370
6370
|
let currentRawResponse = undefined;
|
|
6371
|
-
const providedCallback = (_a = args.options) === null || _a ===
|
|
6371
|
+
const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
|
|
6372
6372
|
const callback = (rawResponse, flatResponse) => {
|
|
6373
6373
|
currentRawResponse = rawResponse;
|
|
6374
|
-
providedCallback === null || providedCallback ===
|
|
6374
|
+
providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
|
|
6375
6375
|
};
|
|
6376
6376
|
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
6377
6377
|
const flatResponse = yield directSendOperation(updatedArgs, spec);
|
|
@@ -6390,8 +6390,8 @@ class CalculateExchangeImpl {
|
|
|
6390
6390
|
spec: postOperationSpec$1
|
|
6391
6391
|
});
|
|
6392
6392
|
const poller = yield coreLro.createHttpPoller(lro, {
|
|
6393
|
-
restoreFrom: options === null || options ===
|
|
6394
|
-
intervalInMs: options === null || options ===
|
|
6393
|
+
restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
6394
|
+
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
|
|
6395
6395
|
resourceLocationConfig: "azure-async-operation"
|
|
6396
6396
|
});
|
|
6397
6397
|
yield poller.poll();
|
|
@@ -6405,7 +6405,7 @@ class CalculateExchangeImpl {
|
|
|
6405
6405
|
* @param options The options parameters.
|
|
6406
6406
|
*/
|
|
6407
6407
|
beginPostAndWait(body, options) {
|
|
6408
|
-
return tslib.__awaiter(this,
|
|
6408
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
6409
6409
|
const poller = yield this.beginPost(body, options);
|
|
6410
6410
|
return poller.pollUntilDone();
|
|
6411
6411
|
});
|
|
@@ -6464,17 +6464,17 @@ class ExchangeImpl {
|
|
|
6464
6464
|
* @param options The options parameters.
|
|
6465
6465
|
*/
|
|
6466
6466
|
beginPost(body, options) {
|
|
6467
|
-
return tslib.__awaiter(this,
|
|
6468
|
-
const directSendOperation = (args, spec) => tslib.__awaiter(this,
|
|
6467
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
6468
|
+
const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
6469
6469
|
return this.client.sendOperationRequest(args, spec);
|
|
6470
6470
|
});
|
|
6471
|
-
const sendOperationFn = (args, spec) => tslib.__awaiter(this,
|
|
6471
|
+
const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
6472
6472
|
var _a;
|
|
6473
6473
|
let currentRawResponse = undefined;
|
|
6474
|
-
const providedCallback = (_a = args.options) === null || _a ===
|
|
6474
|
+
const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
|
|
6475
6475
|
const callback = (rawResponse, flatResponse) => {
|
|
6476
6476
|
currentRawResponse = rawResponse;
|
|
6477
|
-
providedCallback === null || providedCallback ===
|
|
6477
|
+
providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
|
|
6478
6478
|
};
|
|
6479
6479
|
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
6480
6480
|
const flatResponse = yield directSendOperation(updatedArgs, spec);
|
|
@@ -6493,8 +6493,8 @@ class ExchangeImpl {
|
|
|
6493
6493
|
spec: postOperationSpec
|
|
6494
6494
|
});
|
|
6495
6495
|
const poller = yield coreLro.createHttpPoller(lro, {
|
|
6496
|
-
restoreFrom: options === null || options ===
|
|
6497
|
-
intervalInMs: options === null || options ===
|
|
6496
|
+
restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
6497
|
+
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
|
|
6498
6498
|
resourceLocationConfig: "azure-async-operation"
|
|
6499
6499
|
});
|
|
6500
6500
|
yield poller.poll();
|
|
@@ -6508,7 +6508,7 @@ class ExchangeImpl {
|
|
|
6508
6508
|
* @param options The options parameters.
|
|
6509
6509
|
*/
|
|
6510
6510
|
beginPostAndWait(body, options) {
|
|
6511
|
-
return tslib.__awaiter(this,
|
|
6511
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
6512
6512
|
const poller = yield this.beginPost(body, options);
|
|
6513
6513
|
return poller.pollUntilDone();
|
|
6514
6514
|
});
|
|
@@ -6579,7 +6579,7 @@ class QuotaImpl {
|
|
|
6579
6579
|
return this;
|
|
6580
6580
|
},
|
|
6581
6581
|
byPage: (settings) => {
|
|
6582
|
-
if (settings === null || settings ===
|
|
6582
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
|
6583
6583
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
6584
6584
|
}
|
|
6585
6585
|
return this.listPagingPage(subscriptionId, providerId, location, options, settings);
|
|
@@ -6589,7 +6589,7 @@ class QuotaImpl {
|
|
|
6589
6589
|
listPagingPage(subscriptionId, providerId, location, options, settings) {
|
|
6590
6590
|
return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
|
|
6591
6591
|
let result;
|
|
6592
|
-
let continuationToken = settings === null || settings ===
|
|
6592
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
|
6593
6593
|
if (!continuationToken) {
|
|
6594
6594
|
result = yield tslib.__await(this._list(subscriptionId, providerId, location, options));
|
|
6595
6595
|
let page = result.value || [];
|
|
@@ -6656,17 +6656,17 @@ class QuotaImpl {
|
|
|
6656
6656
|
* @param options The options parameters.
|
|
6657
6657
|
*/
|
|
6658
6658
|
beginCreateOrUpdate(subscriptionId, providerId, location, resourceName, createQuotaRequest, options) {
|
|
6659
|
-
return tslib.__awaiter(this,
|
|
6660
|
-
const directSendOperation = (args, spec) => tslib.__awaiter(this,
|
|
6659
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
6660
|
+
const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
6661
6661
|
return this.client.sendOperationRequest(args, spec);
|
|
6662
6662
|
});
|
|
6663
|
-
const sendOperationFn = (args, spec) => tslib.__awaiter(this,
|
|
6663
|
+
const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
6664
6664
|
var _a;
|
|
6665
6665
|
let currentRawResponse = undefined;
|
|
6666
|
-
const providedCallback = (_a = args.options) === null || _a ===
|
|
6666
|
+
const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
|
|
6667
6667
|
const callback = (rawResponse, flatResponse) => {
|
|
6668
6668
|
currentRawResponse = rawResponse;
|
|
6669
|
-
providedCallback === null || providedCallback ===
|
|
6669
|
+
providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
|
|
6670
6670
|
};
|
|
6671
6671
|
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
6672
6672
|
const flatResponse = yield directSendOperation(updatedArgs, spec);
|
|
@@ -6692,8 +6692,8 @@ class QuotaImpl {
|
|
|
6692
6692
|
spec: createOrUpdateOperationSpec
|
|
6693
6693
|
});
|
|
6694
6694
|
const poller = yield coreLro.createHttpPoller(lro, {
|
|
6695
|
-
restoreFrom: options === null || options ===
|
|
6696
|
-
intervalInMs: options === null || options ===
|
|
6695
|
+
restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
6696
|
+
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
|
|
6697
6697
|
resourceLocationConfig: "original-uri"
|
|
6698
6698
|
});
|
|
6699
6699
|
yield poller.poll();
|
|
@@ -6717,7 +6717,7 @@ class QuotaImpl {
|
|
|
6717
6717
|
* @param options The options parameters.
|
|
6718
6718
|
*/
|
|
6719
6719
|
beginCreateOrUpdateAndWait(subscriptionId, providerId, location, resourceName, createQuotaRequest, options) {
|
|
6720
|
-
return tslib.__awaiter(this,
|
|
6720
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
6721
6721
|
const poller = yield this.beginCreateOrUpdate(subscriptionId, providerId, location, resourceName, createQuotaRequest, options);
|
|
6722
6722
|
return poller.pollUntilDone();
|
|
6723
6723
|
});
|
|
@@ -6738,17 +6738,17 @@ class QuotaImpl {
|
|
|
6738
6738
|
* @param options The options parameters.
|
|
6739
6739
|
*/
|
|
6740
6740
|
beginUpdate(subscriptionId, providerId, location, resourceName, createQuotaRequest, options) {
|
|
6741
|
-
return tslib.__awaiter(this,
|
|
6742
|
-
const directSendOperation = (args, spec) => tslib.__awaiter(this,
|
|
6741
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
6742
|
+
const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
6743
6743
|
return this.client.sendOperationRequest(args, spec);
|
|
6744
6744
|
});
|
|
6745
|
-
const sendOperationFn = (args, spec) => tslib.__awaiter(this,
|
|
6745
|
+
const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
6746
6746
|
var _a;
|
|
6747
6747
|
let currentRawResponse = undefined;
|
|
6748
|
-
const providedCallback = (_a = args.options) === null || _a ===
|
|
6748
|
+
const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
|
|
6749
6749
|
const callback = (rawResponse, flatResponse) => {
|
|
6750
6750
|
currentRawResponse = rawResponse;
|
|
6751
|
-
providedCallback === null || providedCallback ===
|
|
6751
|
+
providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
|
|
6752
6752
|
};
|
|
6753
6753
|
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
6754
6754
|
const flatResponse = yield directSendOperation(updatedArgs, spec);
|
|
@@ -6774,8 +6774,8 @@ class QuotaImpl {
|
|
|
6774
6774
|
spec: updateOperationSpec
|
|
6775
6775
|
});
|
|
6776
6776
|
const poller = yield coreLro.createHttpPoller(lro, {
|
|
6777
|
-
restoreFrom: options === null || options ===
|
|
6778
|
-
intervalInMs: options === null || options ===
|
|
6777
|
+
restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
6778
|
+
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
|
|
6779
6779
|
resourceLocationConfig: "original-uri"
|
|
6780
6780
|
});
|
|
6781
6781
|
yield poller.poll();
|
|
@@ -6798,7 +6798,7 @@ class QuotaImpl {
|
|
|
6798
6798
|
* @param options The options parameters.
|
|
6799
6799
|
*/
|
|
6800
6800
|
beginUpdateAndWait(subscriptionId, providerId, location, resourceName, createQuotaRequest, options) {
|
|
6801
|
-
return tslib.__awaiter(this,
|
|
6801
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
6802
6802
|
const poller = yield this.beginUpdate(subscriptionId, providerId, location, resourceName, createQuotaRequest, options);
|
|
6803
6803
|
return poller.pollUntilDone();
|
|
6804
6804
|
});
|
|
@@ -6997,7 +6997,7 @@ class QuotaRequestStatusImpl {
|
|
|
6997
6997
|
return this;
|
|
6998
6998
|
},
|
|
6999
6999
|
byPage: (settings) => {
|
|
7000
|
-
if (settings === null || settings ===
|
|
7000
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
|
7001
7001
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
7002
7002
|
}
|
|
7003
7003
|
return this.listPagingPage(subscriptionId, providerId, location, options, settings);
|
|
@@ -7007,7 +7007,7 @@ class QuotaRequestStatusImpl {
|
|
|
7007
7007
|
listPagingPage(subscriptionId, providerId, location, options, settings) {
|
|
7008
7008
|
return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
|
|
7009
7009
|
let result;
|
|
7010
|
-
let continuationToken = settings === null || settings ===
|
|
7010
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
|
7011
7011
|
if (!continuationToken) {
|
|
7012
7012
|
result = yield tslib.__await(this._list(subscriptionId, providerId, location, options));
|
|
7013
7013
|
let page = result.value || [];
|
|
@@ -7185,10 +7185,10 @@ class AzureReservationAPI extends coreClient__namespace.ServiceClient {
|
|
|
7185
7185
|
: `${packageDetails}`;
|
|
7186
7186
|
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
|
|
7187
7187
|
userAgentPrefix
|
|
7188
|
-
}, endpoint: (_b = (_a = options.endpoint) !== null && _a !==
|
|
7188
|
+
}, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
|
|
7189
7189
|
super(optionsWithDefaults);
|
|
7190
7190
|
let bearerTokenAuthenticationPolicyFound = false;
|
|
7191
|
-
if ((options === null || options ===
|
|
7191
|
+
if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
|
|
7192
7192
|
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
|
7193
7193
|
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
|
|
7194
7194
|
coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName);
|
|
@@ -7202,7 +7202,7 @@ class AzureReservationAPI extends coreClient__namespace.ServiceClient {
|
|
|
7202
7202
|
});
|
|
7203
7203
|
this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
|
|
7204
7204
|
credential: credentials,
|
|
7205
|
-
scopes: (_c = optionsWithDefaults.credentialScopes) !== null && _c !==
|
|
7205
|
+
scopes: (_c = optionsWithDefaults.credentialScopes) !== null && _c !== void 0 ? _c : `${optionsWithDefaults.endpoint}/.default`,
|
|
7206
7206
|
challengeCallbacks: {
|
|
7207
7207
|
authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
|
|
7208
7208
|
}
|
|
@@ -7235,7 +7235,7 @@ class AzureReservationAPI extends coreClient__namespace.ServiceClient {
|
|
|
7235
7235
|
return this;
|
|
7236
7236
|
},
|
|
7237
7237
|
byPage: (settings) => {
|
|
7238
|
-
if (settings === null || settings ===
|
|
7238
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
|
7239
7239
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
7240
7240
|
}
|
|
7241
7241
|
return this.getCatalogPagingPage(subscriptionId, options, settings);
|
|
@@ -7245,7 +7245,7 @@ class AzureReservationAPI extends coreClient__namespace.ServiceClient {
|
|
|
7245
7245
|
getCatalogPagingPage(subscriptionId, options, settings) {
|
|
7246
7246
|
return tslib.__asyncGenerator(this, arguments, function* getCatalogPagingPage_1() {
|
|
7247
7247
|
let result;
|
|
7248
|
-
let continuationToken = settings === null || settings ===
|
|
7248
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
|
7249
7249
|
if (!continuationToken) {
|
|
7250
7250
|
result = yield tslib.__await(this._getCatalog(subscriptionId, options));
|
|
7251
7251
|
let page = result.value || [];
|