@azure/arm-consumption 9.2.1-alpha.20250619.1 → 9.2.1-alpha.20250718.2
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/browser/consumptionManagementClient.js +30 -5
- package/dist/browser/consumptionManagementClient.js.map +1 -1
- package/dist/browser/models/mappers.js +798 -385
- package/dist/browser/models/mappers.js.map +1 -1
- package/dist/browser/operations/aggregatedCost.js +1 -0
- package/dist/browser/operations/aggregatedCost.js.map +1 -1
- package/dist/browser/operations/balances.js +1 -0
- package/dist/browser/operations/balances.js.map +1 -1
- package/dist/browser/operations/budgets.js +23 -40
- package/dist/browser/operations/budgets.js.map +1 -1
- package/dist/browser/operations/charges.js +1 -0
- package/dist/browser/operations/charges.js.map +1 -1
- package/dist/browser/operations/credits.js +1 -0
- package/dist/browser/operations/credits.js.map +1 -1
- package/dist/browser/operations/eventsOperations.js +45 -79
- package/dist/browser/operations/eventsOperations.js.map +1 -1
- package/dist/browser/operations/lotsOperations.js +45 -79
- package/dist/browser/operations/lotsOperations.js.map +1 -1
- package/dist/browser/operations/marketplaces.js +23 -40
- package/dist/browser/operations/marketplaces.js.map +1 -1
- package/dist/browser/operations/operations.js +23 -40
- package/dist/browser/operations/operations.js.map +1 -1
- package/dist/browser/operations/priceSheet.js +1 -0
- package/dist/browser/operations/priceSheet.js.map +1 -1
- package/dist/browser/operations/reservationRecommendationDetails.js +1 -0
- package/dist/browser/operations/reservationRecommendationDetails.js.map +1 -1
- package/dist/browser/operations/reservationRecommendations.js +23 -40
- package/dist/browser/operations/reservationRecommendations.js.map +1 -1
- package/dist/browser/operations/reservationTransactions.js +45 -79
- package/dist/browser/operations/reservationTransactions.js.map +1 -1
- package/dist/browser/operations/reservationsDetails.js +67 -118
- package/dist/browser/operations/reservationsDetails.js.map +1 -1
- package/dist/browser/operations/reservationsSummaries.js +67 -118
- package/dist/browser/operations/reservationsSummaries.js.map +1 -1
- package/dist/browser/operations/tags.js +1 -0
- package/dist/browser/operations/tags.js.map +1 -1
- package/dist/browser/operations/usageDetails.js +23 -40
- package/dist/browser/operations/usageDetails.js.map +1 -1
- package/dist/browser/pagingHelper.js +2 -4
- package/dist/browser/pagingHelper.js.map +1 -1
- package/dist/commonjs/consumptionManagementClient.js +30 -5
- package/dist/commonjs/consumptionManagementClient.js.map +1 -1
- package/dist/commonjs/models/mappers.js +798 -385
- package/dist/commonjs/models/mappers.js.map +1 -1
- package/dist/commonjs/operations/aggregatedCost.js +1 -0
- package/dist/commonjs/operations/aggregatedCost.js.map +1 -1
- package/dist/commonjs/operations/balances.js +1 -0
- package/dist/commonjs/operations/balances.js.map +1 -1
- package/dist/commonjs/operations/budgets.js +23 -39
- package/dist/commonjs/operations/budgets.js.map +1 -1
- package/dist/commonjs/operations/charges.js +1 -0
- package/dist/commonjs/operations/charges.js.map +1 -1
- package/dist/commonjs/operations/credits.js +1 -0
- package/dist/commonjs/operations/credits.js.map +1 -1
- package/dist/commonjs/operations/eventsOperations.js +45 -78
- package/dist/commonjs/operations/eventsOperations.js.map +1 -1
- package/dist/commonjs/operations/lotsOperations.js +45 -78
- package/dist/commonjs/operations/lotsOperations.js.map +1 -1
- package/dist/commonjs/operations/marketplaces.js +23 -39
- package/dist/commonjs/operations/marketplaces.js.map +1 -1
- package/dist/commonjs/operations/operations.js +23 -39
- package/dist/commonjs/operations/operations.js.map +1 -1
- package/dist/commonjs/operations/priceSheet.js +1 -0
- package/dist/commonjs/operations/priceSheet.js.map +1 -1
- package/dist/commonjs/operations/reservationRecommendationDetails.js +1 -0
- package/dist/commonjs/operations/reservationRecommendationDetails.js.map +1 -1
- package/dist/commonjs/operations/reservationRecommendations.js +23 -39
- package/dist/commonjs/operations/reservationRecommendations.js.map +1 -1
- package/dist/commonjs/operations/reservationTransactions.js +45 -78
- package/dist/commonjs/operations/reservationTransactions.js.map +1 -1
- package/dist/commonjs/operations/reservationsDetails.js +67 -117
- package/dist/commonjs/operations/reservationsDetails.js.map +1 -1
- package/dist/commonjs/operations/reservationsSummaries.js +67 -117
- package/dist/commonjs/operations/reservationsSummaries.js.map +1 -1
- package/dist/commonjs/operations/tags.js +1 -0
- package/dist/commonjs/operations/tags.js.map +1 -1
- package/dist/commonjs/operations/usageDetails.js +23 -39
- package/dist/commonjs/operations/usageDetails.js.map +1 -1
- package/dist/commonjs/pagingHelper.js +2 -4
- package/dist/commonjs/pagingHelper.js.map +1 -1
- package/dist/commonjs/tsdoc-metadata.json +11 -11
- package/dist/esm/consumptionManagementClient.js +30 -5
- package/dist/esm/consumptionManagementClient.js.map +1 -1
- package/dist/esm/models/mappers.js +798 -385
- package/dist/esm/models/mappers.js.map +1 -1
- package/dist/esm/operations/aggregatedCost.js +1 -0
- package/dist/esm/operations/aggregatedCost.js.map +1 -1
- package/dist/esm/operations/balances.js +1 -0
- package/dist/esm/operations/balances.js.map +1 -1
- package/dist/esm/operations/budgets.js +23 -40
- package/dist/esm/operations/budgets.js.map +1 -1
- package/dist/esm/operations/charges.js +1 -0
- package/dist/esm/operations/charges.js.map +1 -1
- package/dist/esm/operations/credits.js +1 -0
- package/dist/esm/operations/credits.js.map +1 -1
- package/dist/esm/operations/eventsOperations.js +45 -79
- package/dist/esm/operations/eventsOperations.js.map +1 -1
- package/dist/esm/operations/lotsOperations.js +45 -79
- package/dist/esm/operations/lotsOperations.js.map +1 -1
- package/dist/esm/operations/marketplaces.js +23 -40
- package/dist/esm/operations/marketplaces.js.map +1 -1
- package/dist/esm/operations/operations.js +23 -40
- package/dist/esm/operations/operations.js.map +1 -1
- package/dist/esm/operations/priceSheet.js +1 -0
- package/dist/esm/operations/priceSheet.js.map +1 -1
- package/dist/esm/operations/reservationRecommendationDetails.js +1 -0
- package/dist/esm/operations/reservationRecommendationDetails.js.map +1 -1
- package/dist/esm/operations/reservationRecommendations.js +23 -40
- package/dist/esm/operations/reservationRecommendations.js.map +1 -1
- package/dist/esm/operations/reservationTransactions.js +45 -79
- package/dist/esm/operations/reservationTransactions.js.map +1 -1
- package/dist/esm/operations/reservationsDetails.js +67 -118
- package/dist/esm/operations/reservationsDetails.js.map +1 -1
- package/dist/esm/operations/reservationsSummaries.js +67 -118
- package/dist/esm/operations/reservationsSummaries.js.map +1 -1
- package/dist/esm/operations/tags.js +1 -0
- package/dist/esm/operations/tags.js.map +1 -1
- package/dist/esm/operations/usageDetails.js +23 -40
- package/dist/esm/operations/usageDetails.js.map +1 -1
- package/dist/esm/pagingHelper.js +2 -4
- package/dist/esm/pagingHelper.js.map +1 -1
- package/dist/react-native/consumptionManagementClient.js +30 -5
- package/dist/react-native/consumptionManagementClient.js.map +1 -1
- package/dist/react-native/models/mappers.js +798 -385
- package/dist/react-native/models/mappers.js.map +1 -1
- package/dist/react-native/operations/aggregatedCost.js +1 -0
- package/dist/react-native/operations/aggregatedCost.js.map +1 -1
- package/dist/react-native/operations/balances.js +1 -0
- package/dist/react-native/operations/balances.js.map +1 -1
- package/dist/react-native/operations/budgets.js +23 -40
- package/dist/react-native/operations/budgets.js.map +1 -1
- package/dist/react-native/operations/charges.js +1 -0
- package/dist/react-native/operations/charges.js.map +1 -1
- package/dist/react-native/operations/credits.js +1 -0
- package/dist/react-native/operations/credits.js.map +1 -1
- package/dist/react-native/operations/eventsOperations.js +45 -79
- package/dist/react-native/operations/eventsOperations.js.map +1 -1
- package/dist/react-native/operations/lotsOperations.js +45 -79
- package/dist/react-native/operations/lotsOperations.js.map +1 -1
- package/dist/react-native/operations/marketplaces.js +23 -40
- package/dist/react-native/operations/marketplaces.js.map +1 -1
- package/dist/react-native/operations/operations.js +23 -40
- package/dist/react-native/operations/operations.js.map +1 -1
- package/dist/react-native/operations/priceSheet.js +1 -0
- package/dist/react-native/operations/priceSheet.js.map +1 -1
- package/dist/react-native/operations/reservationRecommendationDetails.js +1 -0
- package/dist/react-native/operations/reservationRecommendationDetails.js.map +1 -1
- package/dist/react-native/operations/reservationRecommendations.js +23 -40
- package/dist/react-native/operations/reservationRecommendations.js.map +1 -1
- package/dist/react-native/operations/reservationTransactions.js +45 -79
- package/dist/react-native/operations/reservationTransactions.js.map +1 -1
- package/dist/react-native/operations/reservationsDetails.js +67 -118
- package/dist/react-native/operations/reservationsDetails.js.map +1 -1
- package/dist/react-native/operations/reservationsSummaries.js +67 -118
- package/dist/react-native/operations/reservationsSummaries.js.map +1 -1
- package/dist/react-native/operations/tags.js +1 -0
- package/dist/react-native/operations/tags.js.map +1 -1
- package/dist/react-native/operations/usageDetails.js +23 -40
- package/dist/react-native/operations/usageDetails.js.map +1 -1
- package/dist/react-native/pagingHelper.js +2 -4
- package/dist/react-native/pagingHelper.js.map +1 -1
- package/package.json +2 -2
- /package/review/{arm-consumption.api.md → arm-consumption-node.api.md} +0 -0
|
@@ -16,6 +16,7 @@ const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
|
|
|
16
16
|
/// <reference lib="esnext.asynciterable" />
|
|
17
17
|
/** Class containing ReservationRecommendations operations. */
|
|
18
18
|
class ReservationRecommendationsImpl {
|
|
19
|
+
client;
|
|
19
20
|
/**
|
|
20
21
|
* Initialize a new instance of the class ReservationRecommendations class.
|
|
21
22
|
* @param client Reference to the service client
|
|
@@ -43,52 +44,35 @@ class ReservationRecommendationsImpl {
|
|
|
43
44
|
return this;
|
|
44
45
|
},
|
|
45
46
|
byPage: (settings) => {
|
|
46
|
-
if (settings
|
|
47
|
+
if (settings?.maxPageSize) {
|
|
47
48
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
48
49
|
}
|
|
49
50
|
return this.listPagingPage(scope, options, settings);
|
|
50
51
|
}
|
|
51
52
|
};
|
|
52
53
|
}
|
|
53
|
-
listPagingPage(scope, options, settings) {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}
|
|
71
|
-
});
|
|
54
|
+
async *listPagingPage(scope, options, settings) {
|
|
55
|
+
let result;
|
|
56
|
+
let continuationToken = settings?.continuationToken;
|
|
57
|
+
if (!continuationToken) {
|
|
58
|
+
result = await this._list(scope, options);
|
|
59
|
+
let page = result.value || [];
|
|
60
|
+
continuationToken = result.nextLink;
|
|
61
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
62
|
+
yield page;
|
|
63
|
+
}
|
|
64
|
+
while (continuationToken) {
|
|
65
|
+
result = await this._listNext(scope, continuationToken, options);
|
|
66
|
+
continuationToken = result.nextLink;
|
|
67
|
+
let page = result.value || [];
|
|
68
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
69
|
+
yield page;
|
|
70
|
+
}
|
|
72
71
|
}
|
|
73
|
-
listPagingAll(scope, options) {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listPagingPage(scope, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
78
|
-
_c = _f.value;
|
|
79
|
-
_d = false;
|
|
80
|
-
const page = _c;
|
|
81
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
85
|
-
finally {
|
|
86
|
-
try {
|
|
87
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
|
88
|
-
}
|
|
89
|
-
finally { if (e_1) throw e_1.error; }
|
|
90
|
-
}
|
|
91
|
-
});
|
|
72
|
+
async *listPagingAll(scope, options) {
|
|
73
|
+
for await (const page of this.listPagingPage(scope, options)) {
|
|
74
|
+
yield* page;
|
|
75
|
+
}
|
|
92
76
|
}
|
|
93
77
|
/**
|
|
94
78
|
* List of recommendations for purchasing reserved instances.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reservationRecommendations.js","sourceRoot":"","sources":["../../../src/operations/reservationRecommendations.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAUtD,4CAA4C;AAC5C,8DAA8D;AAC9D,MAAa,8BAA8B;IAIzC;;;OAGG;IACH,YAAY,MAAmC;QAC7C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;;OASG;IACI,IAAI,CACT,KAAa,EACb,OAAsD;QAEtD,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QAChD,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;YACvD,CAAC;SACF,CAAC;IACJ,CAAC;IAEc,cAAc,CAC3B,KAAa,EACb,OAAsD,EACtD,QAAuB;;YAEvB,IAAI,MAA8C,CAAC;YACnD,IAAI,iBAAiB,GAAG,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,iBAAiB,CAAC;YACpD,IAAI,CAAC,iBAAiB,EAAE,CAAC;gBACvB,MAAM,GAAG,sBAAM,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA,CAAC;gBAC1C,IAAI,IAAI,GAAG,MAAM,CAAC,KAAK,IAAI,EAA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F;AApHD,wEAoHC;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,iBAAiB,GAA6B;IAClD,IAAI,EAAE,qEAAqE;IAC3E,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,oCAAoC;SACzD;QACD,GAAG,EAAE,EAAE;QACP,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,UAAU,CAAC;IAC3D,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,KAAK,CAAC;IACnD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,qBAAqB,GAA6B;IACtD,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,oCAAoC;SACzD;QACD,GAAG,EAAE,EAAE;QACP,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,QAAQ,CAAC;IACxE,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { ReservationRecommendations } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { ConsumptionManagementClient } from \"../consumptionManagementClient.js\";\nimport {\n ReservationRecommendationUnion,\n ReservationRecommendationsListNextOptionalParams,\n ReservationRecommendationsListOptionalParams,\n ReservationRecommendationsListResponse,\n ReservationRecommendationsListNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing ReservationRecommendations operations. */\nexport class ReservationRecommendationsImpl\n implements ReservationRecommendations {\n private readonly client: ConsumptionManagementClient;\n\n /**\n * Initialize a new instance of the class ReservationRecommendations class.\n * @param client Reference to the service client\n */\n constructor(client: ConsumptionManagementClient) {\n this.client = client;\n }\n\n /**\n * List of recommendations for purchasing reserved instances.\n * @param scope The scope associated with reservation recommendations operations. This includes\n * '/subscriptions/{subscriptionId}/' for subscription scope,\n * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resource group scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope, and\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}'\n * for billingProfile scope\n * @param options The options parameters.\n */\n public list(\n scope: string,\n options?: ReservationRecommendationsListOptionalParams\n ): PagedAsyncIterableIterator<ReservationRecommendationUnion> {\n const iter = this.listPagingAll(scope, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(scope, options, settings);\n }\n };\n }\n\n private async *listPagingPage(\n scope: string,\n options?: ReservationRecommendationsListOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<ReservationRecommendationUnion[]> {\n let result: ReservationRecommendationsListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(scope, options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listNext(scope, continuationToken, options);\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listPagingAll(\n scope: string,\n options?: ReservationRecommendationsListOptionalParams\n ): AsyncIterableIterator<ReservationRecommendationUnion> {\n for await (const page of this.listPagingPage(scope, options)) {\n yield* page;\n }\n }\n\n /**\n * List of recommendations for purchasing reserved instances.\n * @param scope The scope associated with reservation recommendations operations. This includes\n * '/subscriptions/{subscriptionId}/' for subscription scope,\n * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resource group scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope, and\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}'\n * for billingProfile scope\n * @param options The options parameters.\n */\n private _list(\n scope: string,\n options?: ReservationRecommendationsListOptionalParams\n ): Promise<ReservationRecommendationsListResponse> {\n return this.client.sendOperationRequest(\n { scope, options },\n listOperationSpec\n );\n }\n\n /**\n * ListNext\n * @param scope The scope associated with reservation recommendations operations. This includes\n * '/subscriptions/{subscriptionId}/' for subscription scope,\n * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resource group scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope, and\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}'\n * for billingProfile scope\n * @param nextLink The nextLink from the previous successful call to the List method.\n * @param options The options parameters.\n */\n private _listNext(\n scope: string,\n nextLink: string,\n options?: ReservationRecommendationsListNextOptionalParams\n ): Promise<ReservationRecommendationsListNextResponse> {\n return this.client.sendOperationRequest(\n { scope, nextLink, options },\n listNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/{scope}/providers/Microsoft.Consumption/reservationRecommendations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ReservationRecommendationsListResult\n },\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.filter, Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.scope],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ReservationRecommendationsListResult\n },\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [Parameters.$host, Parameters.scope, Parameters.nextLink],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
|
|
1
|
+
{"version":3,"file":"reservationRecommendations.js","sourceRoot":"","sources":["../../../src/operations/reservationRecommendations.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAUtD,4CAA4C;AAC5C,8DAA8D;AAC9D,MAAa,8BAA8B;IAExB,MAAM,CAA8B;IAErD;;;OAGG;IACH,YAAY,MAAmC;QAC7C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;;OASG;IACI,IAAI,CACT,KAAa,EACb,OAAsD;QAEtD,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QAChD,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,EAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IA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AU,CAAC,QAAQ,CAAC;IACxE,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { ReservationRecommendations } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { ConsumptionManagementClient } from \"../consumptionManagementClient.js\";\nimport {\n ReservationRecommendationUnion,\n ReservationRecommendationsListNextOptionalParams,\n ReservationRecommendationsListOptionalParams,\n ReservationRecommendationsListResponse,\n ReservationRecommendationsListNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing ReservationRecommendations operations. */\nexport class ReservationRecommendationsImpl\n implements ReservationRecommendations {\n private readonly client: ConsumptionManagementClient;\n\n /**\n * Initialize a new instance of the class ReservationRecommendations class.\n * @param client Reference to the service client\n */\n constructor(client: ConsumptionManagementClient) {\n this.client = client;\n }\n\n /**\n * List of recommendations for purchasing reserved instances.\n * @param scope The scope associated with reservation recommendations operations. This includes\n * '/subscriptions/{subscriptionId}/' for subscription scope,\n * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resource group scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope, and\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}'\n * for billingProfile scope\n * @param options The options parameters.\n */\n public list(\n scope: string,\n options?: ReservationRecommendationsListOptionalParams\n ): PagedAsyncIterableIterator<ReservationRecommendationUnion> {\n const iter = this.listPagingAll(scope, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(scope, options, settings);\n }\n };\n }\n\n private async *listPagingPage(\n scope: string,\n options?: ReservationRecommendationsListOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<ReservationRecommendationUnion[]> {\n let result: ReservationRecommendationsListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(scope, options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listNext(scope, continuationToken, options);\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listPagingAll(\n scope: string,\n options?: ReservationRecommendationsListOptionalParams\n ): AsyncIterableIterator<ReservationRecommendationUnion> {\n for await (const page of this.listPagingPage(scope, options)) {\n yield* page;\n }\n }\n\n /**\n * List of recommendations for purchasing reserved instances.\n * @param scope The scope associated with reservation recommendations operations. This includes\n * '/subscriptions/{subscriptionId}/' for subscription scope,\n * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resource group scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope, and\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}'\n * for billingProfile scope\n * @param options The options parameters.\n */\n private _list(\n scope: string,\n options?: ReservationRecommendationsListOptionalParams\n ): Promise<ReservationRecommendationsListResponse> {\n return this.client.sendOperationRequest(\n { scope, options },\n listOperationSpec\n );\n }\n\n /**\n * ListNext\n * @param scope The scope associated with reservation recommendations operations. This includes\n * '/subscriptions/{subscriptionId}/' for subscription scope,\n * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resource group scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope, and\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}'\n * for billingProfile scope\n * @param nextLink The nextLink from the previous successful call to the List method.\n * @param options The options parameters.\n */\n private _listNext(\n scope: string,\n nextLink: string,\n options?: ReservationRecommendationsListNextOptionalParams\n ): Promise<ReservationRecommendationsListNextResponse> {\n return this.client.sendOperationRequest(\n { scope, nextLink, options },\n listNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/{scope}/providers/Microsoft.Consumption/reservationRecommendations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ReservationRecommendationsListResult\n },\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.filter, Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.scope],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ReservationRecommendationsListResult\n },\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [Parameters.$host, Parameters.scope, Parameters.nextLink],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
|
|
@@ -16,6 +16,7 @@ const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
|
|
|
16
16
|
/// <reference lib="esnext.asynciterable" />
|
|
17
17
|
/** Class containing ReservationTransactions operations. */
|
|
18
18
|
class ReservationTransactionsImpl {
|
|
19
|
+
client;
|
|
19
20
|
/**
|
|
20
21
|
* Initialize a new instance of the class ReservationTransactions class.
|
|
21
22
|
* @param client Reference to the service client
|
|
@@ -38,52 +39,35 @@ class ReservationTransactionsImpl {
|
|
|
38
39
|
return this;
|
|
39
40
|
},
|
|
40
41
|
byPage: (settings) => {
|
|
41
|
-
if (settings
|
|
42
|
+
if (settings?.maxPageSize) {
|
|
42
43
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
43
44
|
}
|
|
44
45
|
return this.listPagingPage(billingAccountId, options, settings);
|
|
45
46
|
}
|
|
46
47
|
};
|
|
47
48
|
}
|
|
48
|
-
listPagingPage(billingAccountId, options, settings) {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
});
|
|
49
|
+
async *listPagingPage(billingAccountId, options, settings) {
|
|
50
|
+
let result;
|
|
51
|
+
let continuationToken = settings?.continuationToken;
|
|
52
|
+
if (!continuationToken) {
|
|
53
|
+
result = await this._list(billingAccountId, options);
|
|
54
|
+
let page = result.value || [];
|
|
55
|
+
continuationToken = result.nextLink;
|
|
56
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
57
|
+
yield page;
|
|
58
|
+
}
|
|
59
|
+
while (continuationToken) {
|
|
60
|
+
result = await this._listNext(billingAccountId, continuationToken, options);
|
|
61
|
+
continuationToken = result.nextLink;
|
|
62
|
+
let page = result.value || [];
|
|
63
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
64
|
+
yield page;
|
|
65
|
+
}
|
|
67
66
|
}
|
|
68
|
-
listPagingAll(billingAccountId, options) {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listPagingPage(billingAccountId, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
73
|
-
_c = _f.value;
|
|
74
|
-
_d = false;
|
|
75
|
-
const page = _c;
|
|
76
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
80
|
-
finally {
|
|
81
|
-
try {
|
|
82
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
|
83
|
-
}
|
|
84
|
-
finally { if (e_1) throw e_1.error; }
|
|
85
|
-
}
|
|
86
|
-
});
|
|
67
|
+
async *listPagingAll(billingAccountId, options) {
|
|
68
|
+
for await (const page of this.listPagingPage(billingAccountId, options)) {
|
|
69
|
+
yield* page;
|
|
70
|
+
}
|
|
87
71
|
}
|
|
88
72
|
/**
|
|
89
73
|
* List of transactions for reserved instances on billing account scope
|
|
@@ -101,52 +85,35 @@ class ReservationTransactionsImpl {
|
|
|
101
85
|
return this;
|
|
102
86
|
},
|
|
103
87
|
byPage: (settings) => {
|
|
104
|
-
if (settings
|
|
88
|
+
if (settings?.maxPageSize) {
|
|
105
89
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
106
90
|
}
|
|
107
91
|
return this.listByBillingProfilePagingPage(billingAccountId, billingProfileId, options, settings);
|
|
108
92
|
}
|
|
109
93
|
};
|
|
110
94
|
}
|
|
111
|
-
listByBillingProfilePagingPage(billingAccountId, billingProfileId, options, settings) {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
}
|
|
129
|
-
});
|
|
95
|
+
async *listByBillingProfilePagingPage(billingAccountId, billingProfileId, options, settings) {
|
|
96
|
+
let result;
|
|
97
|
+
let continuationToken = settings?.continuationToken;
|
|
98
|
+
if (!continuationToken) {
|
|
99
|
+
result = await this._listByBillingProfile(billingAccountId, billingProfileId, options);
|
|
100
|
+
let page = result.value || [];
|
|
101
|
+
continuationToken = result.nextLink;
|
|
102
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
103
|
+
yield page;
|
|
104
|
+
}
|
|
105
|
+
while (continuationToken) {
|
|
106
|
+
result = await this._listByBillingProfileNext(billingAccountId, billingProfileId, continuationToken, options);
|
|
107
|
+
continuationToken = result.nextLink;
|
|
108
|
+
let page = result.value || [];
|
|
109
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
110
|
+
yield page;
|
|
111
|
+
}
|
|
130
112
|
}
|
|
131
|
-
listByBillingProfilePagingAll(billingAccountId, billingProfileId, options) {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listByBillingProfilePagingPage(billingAccountId, billingProfileId, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
136
|
-
_c = _f.value;
|
|
137
|
-
_d = false;
|
|
138
|
-
const page = _c;
|
|
139
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
143
|
-
finally {
|
|
144
|
-
try {
|
|
145
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
|
146
|
-
}
|
|
147
|
-
finally { if (e_2) throw e_2.error; }
|
|
148
|
-
}
|
|
149
|
-
});
|
|
113
|
+
async *listByBillingProfilePagingAll(billingAccountId, billingProfileId, options) {
|
|
114
|
+
for await (const page of this.listByBillingProfilePagingPage(billingAccountId, billingProfileId, options)) {
|
|
115
|
+
yield* page;
|
|
116
|
+
}
|
|
150
117
|
}
|
|
151
118
|
/**
|
|
152
119
|
* List of transactions for reserved instances on billing account scope
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reservationTransactions.js","sourceRoot":"","sources":["../../../src/operations/reservationTransactions.ts"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rC,UAAU;CACX,CAAC;AACF,MAAM,qCAAqC,GAA6B;IACtE,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,uCAAuC;SAC5D;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,gBAAgB;QAC3B,UAAU,CAAC,gBAAgB;KAC5B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { ReservationTransactions } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { ConsumptionManagementClient } from \"../consumptionManagementClient.js\";\nimport {\n ReservationTransaction,\n ReservationTransactionsListNextOptionalParams,\n ReservationTransactionsListOptionalParams,\n ReservationTransactionsListResponse,\n ModernReservationTransaction,\n ReservationTransactionsListByBillingProfileNextOptionalParams,\n ReservationTransactionsListByBillingProfileOptionalParams,\n ReservationTransactionsListByBillingProfileResponse,\n ReservationTransactionsListNextResponse,\n ReservationTransactionsListByBillingProfileNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing ReservationTransactions operations. */\nexport class ReservationTransactionsImpl implements ReservationTransactions {\n private readonly client: ConsumptionManagementClient;\n\n /**\n * Initialize a new instance of the class ReservationTransactions class.\n * @param client Reference to the service client\n */\n constructor(client: ConsumptionManagementClient) {\n this.client = client;\n }\n\n /**\n * List of transactions for reserved instances on billing account scope\n * @param billingAccountId BillingAccount ID\n * @param options The options parameters.\n */\n public list(\n billingAccountId: string,\n options?: ReservationTransactionsListOptionalParams\n ): PagedAsyncIterableIterator<ReservationTransaction> {\n const iter = this.listPagingAll(billingAccountId, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(billingAccountId, options, settings);\n }\n };\n }\n\n private async *listPagingPage(\n billingAccountId: string,\n options?: ReservationTransactionsListOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<ReservationTransaction[]> {\n let result: ReservationTransactionsListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(billingAccountId, options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listNext(\n billingAccountId,\n continuationToken,\n options\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listPagingAll(\n billingAccountId: string,\n options?: ReservationTransactionsListOptionalParams\n ): AsyncIterableIterator<ReservationTransaction> {\n for await (const page of this.listPagingPage(billingAccountId, options)) {\n yield* page;\n }\n }\n\n /**\n * List of transactions for reserved instances on billing account scope\n * @param billingAccountId BillingAccount ID\n * @param billingProfileId Azure Billing Profile ID.\n * @param options The options parameters.\n */\n public listByBillingProfile(\n billingAccountId: string,\n billingProfileId: string,\n options?: ReservationTransactionsListByBillingProfileOptionalParams\n ): PagedAsyncIterableIterator<ModernReservationTransaction> {\n const iter = this.listByBillingProfilePagingAll(\n billingAccountId,\n billingProfileId,\n options\n );\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listByBillingProfilePagingPage(\n billingAccountId,\n billingProfileId,\n options,\n settings\n );\n }\n };\n }\n\n private async *listByBillingProfilePagingPage(\n billingAccountId: string,\n billingProfileId: string,\n options?: ReservationTransactionsListByBillingProfileOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<ModernReservationTransaction[]> {\n let result: ReservationTransactionsListByBillingProfileResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByBillingProfile(\n billingAccountId,\n billingProfileId,\n options\n );\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listByBillingProfileNext(\n billingAccountId,\n billingProfileId,\n continuationToken,\n options\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listByBillingProfilePagingAll(\n billingAccountId: string,\n billingProfileId: string,\n options?: ReservationTransactionsListByBillingProfileOptionalParams\n ): AsyncIterableIterator<ModernReservationTransaction> {\n for await (const page of this.listByBillingProfilePagingPage(\n billingAccountId,\n billingProfileId,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * List of transactions for reserved instances on billing account scope\n * @param billingAccountId BillingAccount ID\n * @param options The options parameters.\n */\n private _list(\n billingAccountId: string,\n options?: ReservationTransactionsListOptionalParams\n ): Promise<ReservationTransactionsListResponse> {\n return this.client.sendOperationRequest(\n { billingAccountId, options },\n listOperationSpec\n );\n }\n\n /**\n * List of transactions for reserved instances on billing account scope\n * @param billingAccountId BillingAccount ID\n * @param billingProfileId Azure Billing Profile ID.\n * @param options The options parameters.\n */\n private _listByBillingProfile(\n billingAccountId: string,\n billingProfileId: string,\n options?: ReservationTransactionsListByBillingProfileOptionalParams\n ): Promise<ReservationTransactionsListByBillingProfileResponse> {\n return this.client.sendOperationRequest(\n { billingAccountId, billingProfileId, options },\n listByBillingProfileOperationSpec\n );\n }\n\n /**\n * ListNext\n * @param billingAccountId BillingAccount ID\n * @param nextLink The nextLink from the previous successful call to the List method.\n * @param options The options parameters.\n */\n private _listNext(\n billingAccountId: string,\n nextLink: string,\n options?: ReservationTransactionsListNextOptionalParams\n ): Promise<ReservationTransactionsListNextResponse> {\n return this.client.sendOperationRequest(\n { billingAccountId, nextLink, options },\n listNextOperationSpec\n );\n }\n\n /**\n * ListByBillingProfileNext\n * @param billingAccountId BillingAccount ID\n * @param billingProfileId Azure Billing Profile ID.\n * @param nextLink The nextLink from the previous successful call to the ListByBillingProfile method.\n * @param options The options parameters.\n */\n private _listByBillingProfileNext(\n billingAccountId: string,\n billingProfileId: string,\n nextLink: string,\n options?: ReservationTransactionsListByBillingProfileNextOptionalParams\n ): Promise<ReservationTransactionsListByBillingProfileNextResponse> {\n return this.client.sendOperationRequest(\n { billingAccountId, billingProfileId, nextLink, options },\n listByBillingProfileNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path:\n \"/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/reservationTransactions\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ReservationTransactionsListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.filter, Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.billingAccountId],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listByBillingProfileOperationSpec: coreClient.OperationSpec = {\n path:\n \"/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.Consumption/reservationTransactions\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ModernReservationTransactionsListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.filter, Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.billingAccountId,\n Parameters.billingProfileId\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ReservationTransactionsListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [\n Parameters.$host,\n Parameters.nextLink,\n Parameters.billingAccountId\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listByBillingProfileNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ModernReservationTransactionsListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [\n Parameters.$host,\n Parameters.nextLink,\n Parameters.billingAccountId,\n Parameters.billingProfileId\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
|
|
1
|
+
{"version":3,"file":"reservationTransactions.js","sourceRoot":"","sources":["../../../src/operations/reservationTransactions.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAetD,4CAA4C;AAC5C,2DAA2D;AAC3D,MAAa,2BAA2B;IACrB,MAAM,CAA8B;IAErD;;;OAGG;IACH,YAAY,MAAmC;QAC7C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACI,IAAI,CACT,gBAAwB,EACxB,OAAmD;QAEnD,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;QAC3D,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC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AY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,iCAAiC;SACtD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,gBAAgB;KAC5B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,qCAAqC,GAA6B;IACtE,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,uCAAuC;SAC5D;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,gBAAgB;QAC3B,UAAU,CAAC,gBAAgB;KAC5B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { ReservationTransactions } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { ConsumptionManagementClient } from \"../consumptionManagementClient.js\";\nimport {\n ReservationTransaction,\n ReservationTransactionsListNextOptionalParams,\n ReservationTransactionsListOptionalParams,\n ReservationTransactionsListResponse,\n ModernReservationTransaction,\n ReservationTransactionsListByBillingProfileNextOptionalParams,\n ReservationTransactionsListByBillingProfileOptionalParams,\n ReservationTransactionsListByBillingProfileResponse,\n ReservationTransactionsListNextResponse,\n ReservationTransactionsListByBillingProfileNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing ReservationTransactions operations. */\nexport class ReservationTransactionsImpl implements ReservationTransactions {\n private readonly client: ConsumptionManagementClient;\n\n /**\n * Initialize a new instance of the class ReservationTransactions class.\n * @param client Reference to the service client\n */\n constructor(client: ConsumptionManagementClient) {\n this.client = client;\n }\n\n /**\n * List of transactions for reserved instances on billing account scope\n * @param billingAccountId BillingAccount ID\n * @param options The options parameters.\n */\n public list(\n billingAccountId: string,\n options?: ReservationTransactionsListOptionalParams\n ): PagedAsyncIterableIterator<ReservationTransaction> {\n const iter = this.listPagingAll(billingAccountId, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(billingAccountId, options, settings);\n }\n };\n }\n\n private async *listPagingPage(\n billingAccountId: string,\n options?: ReservationTransactionsListOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<ReservationTransaction[]> {\n let result: ReservationTransactionsListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(billingAccountId, options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listNext(\n billingAccountId,\n continuationToken,\n options\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listPagingAll(\n billingAccountId: string,\n options?: ReservationTransactionsListOptionalParams\n ): AsyncIterableIterator<ReservationTransaction> {\n for await (const page of this.listPagingPage(billingAccountId, options)) {\n yield* page;\n }\n }\n\n /**\n * List of transactions for reserved instances on billing account scope\n * @param billingAccountId BillingAccount ID\n * @param billingProfileId Azure Billing Profile ID.\n * @param options The options parameters.\n */\n public listByBillingProfile(\n billingAccountId: string,\n billingProfileId: string,\n options?: ReservationTransactionsListByBillingProfileOptionalParams\n ): PagedAsyncIterableIterator<ModernReservationTransaction> {\n const iter = this.listByBillingProfilePagingAll(\n billingAccountId,\n billingProfileId,\n options\n );\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listByBillingProfilePagingPage(\n billingAccountId,\n billingProfileId,\n options,\n settings\n );\n }\n };\n }\n\n private async *listByBillingProfilePagingPage(\n billingAccountId: string,\n billingProfileId: string,\n options?: ReservationTransactionsListByBillingProfileOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<ModernReservationTransaction[]> {\n let result: ReservationTransactionsListByBillingProfileResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByBillingProfile(\n billingAccountId,\n billingProfileId,\n options\n );\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listByBillingProfileNext(\n billingAccountId,\n billingProfileId,\n continuationToken,\n options\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listByBillingProfilePagingAll(\n billingAccountId: string,\n billingProfileId: string,\n options?: ReservationTransactionsListByBillingProfileOptionalParams\n ): AsyncIterableIterator<ModernReservationTransaction> {\n for await (const page of this.listByBillingProfilePagingPage(\n billingAccountId,\n billingProfileId,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * List of transactions for reserved instances on billing account scope\n * @param billingAccountId BillingAccount ID\n * @param options The options parameters.\n */\n private _list(\n billingAccountId: string,\n options?: ReservationTransactionsListOptionalParams\n ): Promise<ReservationTransactionsListResponse> {\n return this.client.sendOperationRequest(\n { billingAccountId, options },\n listOperationSpec\n );\n }\n\n /**\n * List of transactions for reserved instances on billing account scope\n * @param billingAccountId BillingAccount ID\n * @param billingProfileId Azure Billing Profile ID.\n * @param options The options parameters.\n */\n private _listByBillingProfile(\n billingAccountId: string,\n billingProfileId: string,\n options?: ReservationTransactionsListByBillingProfileOptionalParams\n ): Promise<ReservationTransactionsListByBillingProfileResponse> {\n return this.client.sendOperationRequest(\n { billingAccountId, billingProfileId, options },\n listByBillingProfileOperationSpec\n );\n }\n\n /**\n * ListNext\n * @param billingAccountId BillingAccount ID\n * @param nextLink The nextLink from the previous successful call to the List method.\n * @param options The options parameters.\n */\n private _listNext(\n billingAccountId: string,\n nextLink: string,\n options?: ReservationTransactionsListNextOptionalParams\n ): Promise<ReservationTransactionsListNextResponse> {\n return this.client.sendOperationRequest(\n { billingAccountId, nextLink, options },\n listNextOperationSpec\n );\n }\n\n /**\n * ListByBillingProfileNext\n * @param billingAccountId BillingAccount ID\n * @param billingProfileId Azure Billing Profile ID.\n * @param nextLink The nextLink from the previous successful call to the ListByBillingProfile method.\n * @param options The options parameters.\n */\n private _listByBillingProfileNext(\n billingAccountId: string,\n billingProfileId: string,\n nextLink: string,\n options?: ReservationTransactionsListByBillingProfileNextOptionalParams\n ): Promise<ReservationTransactionsListByBillingProfileNextResponse> {\n return this.client.sendOperationRequest(\n { billingAccountId, billingProfileId, nextLink, options },\n listByBillingProfileNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path:\n \"/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/reservationTransactions\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ReservationTransactionsListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.filter, Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.billingAccountId],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listByBillingProfileOperationSpec: coreClient.OperationSpec = {\n path:\n \"/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.Consumption/reservationTransactions\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ModernReservationTransactionsListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.filter, Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.billingAccountId,\n Parameters.billingProfileId\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ReservationTransactionsListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [\n Parameters.$host,\n Parameters.nextLink,\n Parameters.billingAccountId\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listByBillingProfileNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ModernReservationTransactionsListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [\n Parameters.$host,\n Parameters.nextLink,\n Parameters.billingAccountId,\n Parameters.billingProfileId\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
|
|
@@ -16,6 +16,7 @@ const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
|
|
|
16
16
|
/// <reference lib="esnext.asynciterable" />
|
|
17
17
|
/** Class containing ReservationsDetails operations. */
|
|
18
18
|
class ReservationsDetailsImpl {
|
|
19
|
+
client;
|
|
19
20
|
/**
|
|
20
21
|
* Initialize a new instance of the class ReservationsDetails class.
|
|
21
22
|
* @param client Reference to the service client
|
|
@@ -40,52 +41,35 @@ class ReservationsDetailsImpl {
|
|
|
40
41
|
return this;
|
|
41
42
|
},
|
|
42
43
|
byPage: (settings) => {
|
|
43
|
-
if (settings
|
|
44
|
+
if (settings?.maxPageSize) {
|
|
44
45
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
45
46
|
}
|
|
46
47
|
return this.listByReservationOrderPagingPage(reservationOrderId, filter, options, settings);
|
|
47
48
|
}
|
|
48
49
|
};
|
|
49
50
|
}
|
|
50
|
-
listByReservationOrderPagingPage(reservationOrderId, filter, options, settings) {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
});
|
|
51
|
+
async *listByReservationOrderPagingPage(reservationOrderId, filter, options, settings) {
|
|
52
|
+
let result;
|
|
53
|
+
let continuationToken = settings?.continuationToken;
|
|
54
|
+
if (!continuationToken) {
|
|
55
|
+
result = await this._listByReservationOrder(reservationOrderId, filter, options);
|
|
56
|
+
let page = result.value || [];
|
|
57
|
+
continuationToken = result.nextLink;
|
|
58
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
59
|
+
yield page;
|
|
60
|
+
}
|
|
61
|
+
while (continuationToken) {
|
|
62
|
+
result = await this._listByReservationOrderNext(reservationOrderId, continuationToken, options);
|
|
63
|
+
continuationToken = result.nextLink;
|
|
64
|
+
let page = result.value || [];
|
|
65
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
66
|
+
yield page;
|
|
67
|
+
}
|
|
69
68
|
}
|
|
70
|
-
listByReservationOrderPagingAll(reservationOrderId, filter, options) {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listByReservationOrderPagingPage(reservationOrderId, filter, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
75
|
-
_c = _f.value;
|
|
76
|
-
_d = false;
|
|
77
|
-
const page = _c;
|
|
78
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
82
|
-
finally {
|
|
83
|
-
try {
|
|
84
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
|
85
|
-
}
|
|
86
|
-
finally { if (e_1) throw e_1.error; }
|
|
87
|
-
}
|
|
88
|
-
});
|
|
69
|
+
async *listByReservationOrderPagingAll(reservationOrderId, filter, options) {
|
|
70
|
+
for await (const page of this.listByReservationOrderPagingPage(reservationOrderId, filter, options)) {
|
|
71
|
+
yield* page;
|
|
72
|
+
}
|
|
89
73
|
}
|
|
90
74
|
/**
|
|
91
75
|
* Lists the reservations details for provided date range.
|
|
@@ -105,52 +89,35 @@ class ReservationsDetailsImpl {
|
|
|
105
89
|
return this;
|
|
106
90
|
},
|
|
107
91
|
byPage: (settings) => {
|
|
108
|
-
if (settings
|
|
92
|
+
if (settings?.maxPageSize) {
|
|
109
93
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
110
94
|
}
|
|
111
95
|
return this.listByReservationOrderAndReservationPagingPage(reservationOrderId, reservationId, filter, options, settings);
|
|
112
96
|
}
|
|
113
97
|
};
|
|
114
98
|
}
|
|
115
|
-
listByReservationOrderAndReservationPagingPage(reservationOrderId, reservationId, filter, options, settings) {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
}
|
|
133
|
-
});
|
|
99
|
+
async *listByReservationOrderAndReservationPagingPage(reservationOrderId, reservationId, filter, options, settings) {
|
|
100
|
+
let result;
|
|
101
|
+
let continuationToken = settings?.continuationToken;
|
|
102
|
+
if (!continuationToken) {
|
|
103
|
+
result = await this._listByReservationOrderAndReservation(reservationOrderId, reservationId, filter, options);
|
|
104
|
+
let page = result.value || [];
|
|
105
|
+
continuationToken = result.nextLink;
|
|
106
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
107
|
+
yield page;
|
|
108
|
+
}
|
|
109
|
+
while (continuationToken) {
|
|
110
|
+
result = await this._listByReservationOrderAndReservationNext(reservationOrderId, reservationId, continuationToken, options);
|
|
111
|
+
continuationToken = result.nextLink;
|
|
112
|
+
let page = result.value || [];
|
|
113
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
114
|
+
yield page;
|
|
115
|
+
}
|
|
134
116
|
}
|
|
135
|
-
listByReservationOrderAndReservationPagingAll(reservationOrderId, reservationId, filter, options) {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listByReservationOrderAndReservationPagingPage(reservationOrderId, reservationId, filter, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
140
|
-
_c = _f.value;
|
|
141
|
-
_d = false;
|
|
142
|
-
const page = _c;
|
|
143
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
147
|
-
finally {
|
|
148
|
-
try {
|
|
149
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
|
150
|
-
}
|
|
151
|
-
finally { if (e_2) throw e_2.error; }
|
|
152
|
-
}
|
|
153
|
-
});
|
|
117
|
+
async *listByReservationOrderAndReservationPagingAll(reservationOrderId, reservationId, filter, options) {
|
|
118
|
+
for await (const page of this.listByReservationOrderAndReservationPagingPage(reservationOrderId, reservationId, filter, options)) {
|
|
119
|
+
yield* page;
|
|
120
|
+
}
|
|
154
121
|
}
|
|
155
122
|
/**
|
|
156
123
|
* Lists the reservations details for the defined scope and provided date range.
|
|
@@ -171,52 +138,35 @@ class ReservationsDetailsImpl {
|
|
|
171
138
|
return this;
|
|
172
139
|
},
|
|
173
140
|
byPage: (settings) => {
|
|
174
|
-
if (settings
|
|
141
|
+
if (settings?.maxPageSize) {
|
|
175
142
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
176
143
|
}
|
|
177
144
|
return this.listPagingPage(scope, options, settings);
|
|
178
145
|
}
|
|
179
146
|
};
|
|
180
147
|
}
|
|
181
|
-
listPagingPage(scope, options, settings) {
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
}
|
|
199
|
-
});
|
|
148
|
+
async *listPagingPage(scope, options, settings) {
|
|
149
|
+
let result;
|
|
150
|
+
let continuationToken = settings?.continuationToken;
|
|
151
|
+
if (!continuationToken) {
|
|
152
|
+
result = await this._list(scope, options);
|
|
153
|
+
let page = result.value || [];
|
|
154
|
+
continuationToken = result.nextLink;
|
|
155
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
156
|
+
yield page;
|
|
157
|
+
}
|
|
158
|
+
while (continuationToken) {
|
|
159
|
+
result = await this._listNext(scope, continuationToken, options);
|
|
160
|
+
continuationToken = result.nextLink;
|
|
161
|
+
let page = result.value || [];
|
|
162
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
163
|
+
yield page;
|
|
164
|
+
}
|
|
200
165
|
}
|
|
201
|
-
listPagingAll(scope, options) {
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listPagingPage(scope, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
206
|
-
_c = _f.value;
|
|
207
|
-
_d = false;
|
|
208
|
-
const page = _c;
|
|
209
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
213
|
-
finally {
|
|
214
|
-
try {
|
|
215
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
|
216
|
-
}
|
|
217
|
-
finally { if (e_3) throw e_3.error; }
|
|
218
|
-
}
|
|
219
|
-
});
|
|
166
|
+
async *listPagingAll(scope, options) {
|
|
167
|
+
for await (const page of this.listPagingPage(scope, options)) {
|
|
168
|
+
yield* page;
|
|
169
|
+
}
|
|
220
170
|
}
|
|
221
171
|
/**
|
|
222
172
|
* Lists the reservations details for provided date range.
|