@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.
Files changed (163) hide show
  1. package/dist/browser/consumptionManagementClient.js +30 -5
  2. package/dist/browser/consumptionManagementClient.js.map +1 -1
  3. package/dist/browser/models/mappers.js +798 -385
  4. package/dist/browser/models/mappers.js.map +1 -1
  5. package/dist/browser/operations/aggregatedCost.js +1 -0
  6. package/dist/browser/operations/aggregatedCost.js.map +1 -1
  7. package/dist/browser/operations/balances.js +1 -0
  8. package/dist/browser/operations/balances.js.map +1 -1
  9. package/dist/browser/operations/budgets.js +23 -40
  10. package/dist/browser/operations/budgets.js.map +1 -1
  11. package/dist/browser/operations/charges.js +1 -0
  12. package/dist/browser/operations/charges.js.map +1 -1
  13. package/dist/browser/operations/credits.js +1 -0
  14. package/dist/browser/operations/credits.js.map +1 -1
  15. package/dist/browser/operations/eventsOperations.js +45 -79
  16. package/dist/browser/operations/eventsOperations.js.map +1 -1
  17. package/dist/browser/operations/lotsOperations.js +45 -79
  18. package/dist/browser/operations/lotsOperations.js.map +1 -1
  19. package/dist/browser/operations/marketplaces.js +23 -40
  20. package/dist/browser/operations/marketplaces.js.map +1 -1
  21. package/dist/browser/operations/operations.js +23 -40
  22. package/dist/browser/operations/operations.js.map +1 -1
  23. package/dist/browser/operations/priceSheet.js +1 -0
  24. package/dist/browser/operations/priceSheet.js.map +1 -1
  25. package/dist/browser/operations/reservationRecommendationDetails.js +1 -0
  26. package/dist/browser/operations/reservationRecommendationDetails.js.map +1 -1
  27. package/dist/browser/operations/reservationRecommendations.js +23 -40
  28. package/dist/browser/operations/reservationRecommendations.js.map +1 -1
  29. package/dist/browser/operations/reservationTransactions.js +45 -79
  30. package/dist/browser/operations/reservationTransactions.js.map +1 -1
  31. package/dist/browser/operations/reservationsDetails.js +67 -118
  32. package/dist/browser/operations/reservationsDetails.js.map +1 -1
  33. package/dist/browser/operations/reservationsSummaries.js +67 -118
  34. package/dist/browser/operations/reservationsSummaries.js.map +1 -1
  35. package/dist/browser/operations/tags.js +1 -0
  36. package/dist/browser/operations/tags.js.map +1 -1
  37. package/dist/browser/operations/usageDetails.js +23 -40
  38. package/dist/browser/operations/usageDetails.js.map +1 -1
  39. package/dist/browser/pagingHelper.js +2 -4
  40. package/dist/browser/pagingHelper.js.map +1 -1
  41. package/dist/commonjs/consumptionManagementClient.js +30 -5
  42. package/dist/commonjs/consumptionManagementClient.js.map +1 -1
  43. package/dist/commonjs/models/mappers.js +798 -385
  44. package/dist/commonjs/models/mappers.js.map +1 -1
  45. package/dist/commonjs/operations/aggregatedCost.js +1 -0
  46. package/dist/commonjs/operations/aggregatedCost.js.map +1 -1
  47. package/dist/commonjs/operations/balances.js +1 -0
  48. package/dist/commonjs/operations/balances.js.map +1 -1
  49. package/dist/commonjs/operations/budgets.js +23 -39
  50. package/dist/commonjs/operations/budgets.js.map +1 -1
  51. package/dist/commonjs/operations/charges.js +1 -0
  52. package/dist/commonjs/operations/charges.js.map +1 -1
  53. package/dist/commonjs/operations/credits.js +1 -0
  54. package/dist/commonjs/operations/credits.js.map +1 -1
  55. package/dist/commonjs/operations/eventsOperations.js +45 -78
  56. package/dist/commonjs/operations/eventsOperations.js.map +1 -1
  57. package/dist/commonjs/operations/lotsOperations.js +45 -78
  58. package/dist/commonjs/operations/lotsOperations.js.map +1 -1
  59. package/dist/commonjs/operations/marketplaces.js +23 -39
  60. package/dist/commonjs/operations/marketplaces.js.map +1 -1
  61. package/dist/commonjs/operations/operations.js +23 -39
  62. package/dist/commonjs/operations/operations.js.map +1 -1
  63. package/dist/commonjs/operations/priceSheet.js +1 -0
  64. package/dist/commonjs/operations/priceSheet.js.map +1 -1
  65. package/dist/commonjs/operations/reservationRecommendationDetails.js +1 -0
  66. package/dist/commonjs/operations/reservationRecommendationDetails.js.map +1 -1
  67. package/dist/commonjs/operations/reservationRecommendations.js +23 -39
  68. package/dist/commonjs/operations/reservationRecommendations.js.map +1 -1
  69. package/dist/commonjs/operations/reservationTransactions.js +45 -78
  70. package/dist/commonjs/operations/reservationTransactions.js.map +1 -1
  71. package/dist/commonjs/operations/reservationsDetails.js +67 -117
  72. package/dist/commonjs/operations/reservationsDetails.js.map +1 -1
  73. package/dist/commonjs/operations/reservationsSummaries.js +67 -117
  74. package/dist/commonjs/operations/reservationsSummaries.js.map +1 -1
  75. package/dist/commonjs/operations/tags.js +1 -0
  76. package/dist/commonjs/operations/tags.js.map +1 -1
  77. package/dist/commonjs/operations/usageDetails.js +23 -39
  78. package/dist/commonjs/operations/usageDetails.js.map +1 -1
  79. package/dist/commonjs/pagingHelper.js +2 -4
  80. package/dist/commonjs/pagingHelper.js.map +1 -1
  81. package/dist/commonjs/tsdoc-metadata.json +11 -11
  82. package/dist/esm/consumptionManagementClient.js +30 -5
  83. package/dist/esm/consumptionManagementClient.js.map +1 -1
  84. package/dist/esm/models/mappers.js +798 -385
  85. package/dist/esm/models/mappers.js.map +1 -1
  86. package/dist/esm/operations/aggregatedCost.js +1 -0
  87. package/dist/esm/operations/aggregatedCost.js.map +1 -1
  88. package/dist/esm/operations/balances.js +1 -0
  89. package/dist/esm/operations/balances.js.map +1 -1
  90. package/dist/esm/operations/budgets.js +23 -40
  91. package/dist/esm/operations/budgets.js.map +1 -1
  92. package/dist/esm/operations/charges.js +1 -0
  93. package/dist/esm/operations/charges.js.map +1 -1
  94. package/dist/esm/operations/credits.js +1 -0
  95. package/dist/esm/operations/credits.js.map +1 -1
  96. package/dist/esm/operations/eventsOperations.js +45 -79
  97. package/dist/esm/operations/eventsOperations.js.map +1 -1
  98. package/dist/esm/operations/lotsOperations.js +45 -79
  99. package/dist/esm/operations/lotsOperations.js.map +1 -1
  100. package/dist/esm/operations/marketplaces.js +23 -40
  101. package/dist/esm/operations/marketplaces.js.map +1 -1
  102. package/dist/esm/operations/operations.js +23 -40
  103. package/dist/esm/operations/operations.js.map +1 -1
  104. package/dist/esm/operations/priceSheet.js +1 -0
  105. package/dist/esm/operations/priceSheet.js.map +1 -1
  106. package/dist/esm/operations/reservationRecommendationDetails.js +1 -0
  107. package/dist/esm/operations/reservationRecommendationDetails.js.map +1 -1
  108. package/dist/esm/operations/reservationRecommendations.js +23 -40
  109. package/dist/esm/operations/reservationRecommendations.js.map +1 -1
  110. package/dist/esm/operations/reservationTransactions.js +45 -79
  111. package/dist/esm/operations/reservationTransactions.js.map +1 -1
  112. package/dist/esm/operations/reservationsDetails.js +67 -118
  113. package/dist/esm/operations/reservationsDetails.js.map +1 -1
  114. package/dist/esm/operations/reservationsSummaries.js +67 -118
  115. package/dist/esm/operations/reservationsSummaries.js.map +1 -1
  116. package/dist/esm/operations/tags.js +1 -0
  117. package/dist/esm/operations/tags.js.map +1 -1
  118. package/dist/esm/operations/usageDetails.js +23 -40
  119. package/dist/esm/operations/usageDetails.js.map +1 -1
  120. package/dist/esm/pagingHelper.js +2 -4
  121. package/dist/esm/pagingHelper.js.map +1 -1
  122. package/dist/react-native/consumptionManagementClient.js +30 -5
  123. package/dist/react-native/consumptionManagementClient.js.map +1 -1
  124. package/dist/react-native/models/mappers.js +798 -385
  125. package/dist/react-native/models/mappers.js.map +1 -1
  126. package/dist/react-native/operations/aggregatedCost.js +1 -0
  127. package/dist/react-native/operations/aggregatedCost.js.map +1 -1
  128. package/dist/react-native/operations/balances.js +1 -0
  129. package/dist/react-native/operations/balances.js.map +1 -1
  130. package/dist/react-native/operations/budgets.js +23 -40
  131. package/dist/react-native/operations/budgets.js.map +1 -1
  132. package/dist/react-native/operations/charges.js +1 -0
  133. package/dist/react-native/operations/charges.js.map +1 -1
  134. package/dist/react-native/operations/credits.js +1 -0
  135. package/dist/react-native/operations/credits.js.map +1 -1
  136. package/dist/react-native/operations/eventsOperations.js +45 -79
  137. package/dist/react-native/operations/eventsOperations.js.map +1 -1
  138. package/dist/react-native/operations/lotsOperations.js +45 -79
  139. package/dist/react-native/operations/lotsOperations.js.map +1 -1
  140. package/dist/react-native/operations/marketplaces.js +23 -40
  141. package/dist/react-native/operations/marketplaces.js.map +1 -1
  142. package/dist/react-native/operations/operations.js +23 -40
  143. package/dist/react-native/operations/operations.js.map +1 -1
  144. package/dist/react-native/operations/priceSheet.js +1 -0
  145. package/dist/react-native/operations/priceSheet.js.map +1 -1
  146. package/dist/react-native/operations/reservationRecommendationDetails.js +1 -0
  147. package/dist/react-native/operations/reservationRecommendationDetails.js.map +1 -1
  148. package/dist/react-native/operations/reservationRecommendations.js +23 -40
  149. package/dist/react-native/operations/reservationRecommendations.js.map +1 -1
  150. package/dist/react-native/operations/reservationTransactions.js +45 -79
  151. package/dist/react-native/operations/reservationTransactions.js.map +1 -1
  152. package/dist/react-native/operations/reservationsDetails.js +67 -118
  153. package/dist/react-native/operations/reservationsDetails.js.map +1 -1
  154. package/dist/react-native/operations/reservationsSummaries.js +67 -118
  155. package/dist/react-native/operations/reservationsSummaries.js.map +1 -1
  156. package/dist/react-native/operations/tags.js +1 -0
  157. package/dist/react-native/operations/tags.js.map +1 -1
  158. package/dist/react-native/operations/usageDetails.js +23 -40
  159. package/dist/react-native/operations/usageDetails.js.map +1 -1
  160. package/dist/react-native/pagingHelper.js +2 -4
  161. package/dist/react-native/pagingHelper.js.map +1 -1
  162. package/package.json +2 -2
  163. /package/review/{arm-consumption.api.md → arm-consumption-node.api.md} +0 -0
@@ -5,7 +5,6 @@
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
- import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
9
8
  import { setContinuationToken } from "../pagingHelper.js";
10
9
  import * as coreClient from "@azure/core-client";
11
10
  import * as Mappers from "../models/mappers.js";
@@ -13,6 +12,7 @@ import * as Parameters from "../models/parameters.js";
13
12
  /// <reference lib="esnext.asynciterable" />
14
13
  /** Class containing ReservationRecommendations operations. */
15
14
  export class ReservationRecommendationsImpl {
15
+ client;
16
16
  /**
17
17
  * Initialize a new instance of the class ReservationRecommendations class.
18
18
  * @param client Reference to the service client
@@ -40,52 +40,35 @@ export class ReservationRecommendationsImpl {
40
40
  return this;
41
41
  },
42
42
  byPage: (settings) => {
43
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
43
+ if (settings?.maxPageSize) {
44
44
  throw new Error("maxPageSize is not supported by this operation.");
45
45
  }
46
46
  return this.listPagingPage(scope, options, settings);
47
47
  }
48
48
  };
49
49
  }
50
- listPagingPage(scope, options, settings) {
51
- return __asyncGenerator(this, arguments, function* listPagingPage_1() {
52
- let result;
53
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
54
- if (!continuationToken) {
55
- result = yield __await(this._list(scope, options));
56
- let page = result.value || [];
57
- continuationToken = result.nextLink;
58
- setContinuationToken(page, continuationToken);
59
- yield yield __await(page);
60
- }
61
- while (continuationToken) {
62
- result = yield __await(this._listNext(scope, continuationToken, options));
63
- continuationToken = result.nextLink;
64
- let page = result.value || [];
65
- setContinuationToken(page, continuationToken);
66
- yield yield __await(page);
67
- }
68
- });
50
+ async *listPagingPage(scope, options, settings) {
51
+ let result;
52
+ let continuationToken = settings?.continuationToken;
53
+ if (!continuationToken) {
54
+ result = await this._list(scope, options);
55
+ let page = result.value || [];
56
+ continuationToken = result.nextLink;
57
+ setContinuationToken(page, continuationToken);
58
+ yield page;
59
+ }
60
+ while (continuationToken) {
61
+ result = await this._listNext(scope, continuationToken, options);
62
+ continuationToken = result.nextLink;
63
+ let page = result.value || [];
64
+ setContinuationToken(page, continuationToken);
65
+ yield page;
66
+ }
69
67
  }
70
- listPagingAll(scope, options) {
71
- return __asyncGenerator(this, arguments, function* listPagingAll_1() {
72
- var _a, e_1, _b, _c;
73
- try {
74
- for (var _d = true, _e = __asyncValues(this.listPagingPage(scope, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
75
- _c = _f.value;
76
- _d = false;
77
- const page = _c;
78
- yield __await(yield* __asyncDelegator(__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 __await(_b.call(_e));
85
- }
86
- finally { if (e_1) throw e_1.error; }
87
- }
88
- });
68
+ async *listPagingAll(scope, options) {
69
+ for await (const page of this.listPagingPage(scope, options)) {
70
+ yield* page;
71
+ }
89
72
  }
90
73
  /**
91
74
  * 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,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAUtD,4CAA4C;AAC5C,8DAA8D;AAC9D,MAAM,OAAO,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,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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,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAUtD,4CAA4C;AAC5C,8DAA8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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"]}
@@ -5,7 +5,6 @@
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
- import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
9
8
  import { setContinuationToken } from "../pagingHelper.js";
10
9
  import * as coreClient from "@azure/core-client";
11
10
  import * as Mappers from "../models/mappers.js";
@@ -13,6 +12,7 @@ import * as Parameters from "../models/parameters.js";
13
12
  /// <reference lib="esnext.asynciterable" />
14
13
  /** Class containing ReservationTransactions operations. */
15
14
  export class ReservationTransactionsImpl {
15
+ client;
16
16
  /**
17
17
  * Initialize a new instance of the class ReservationTransactions class.
18
18
  * @param client Reference to the service client
@@ -35,52 +35,35 @@ export class ReservationTransactionsImpl {
35
35
  return this;
36
36
  },
37
37
  byPage: (settings) => {
38
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
38
+ if (settings?.maxPageSize) {
39
39
  throw new Error("maxPageSize is not supported by this operation.");
40
40
  }
41
41
  return this.listPagingPage(billingAccountId, options, settings);
42
42
  }
43
43
  };
44
44
  }
45
- listPagingPage(billingAccountId, options, settings) {
46
- return __asyncGenerator(this, arguments, function* listPagingPage_1() {
47
- let result;
48
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
49
- if (!continuationToken) {
50
- result = yield __await(this._list(billingAccountId, options));
51
- let page = result.value || [];
52
- continuationToken = result.nextLink;
53
- setContinuationToken(page, continuationToken);
54
- yield yield __await(page);
55
- }
56
- while (continuationToken) {
57
- result = yield __await(this._listNext(billingAccountId, continuationToken, options));
58
- continuationToken = result.nextLink;
59
- let page = result.value || [];
60
- setContinuationToken(page, continuationToken);
61
- yield yield __await(page);
62
- }
63
- });
45
+ async *listPagingPage(billingAccountId, options, settings) {
46
+ let result;
47
+ let continuationToken = settings?.continuationToken;
48
+ if (!continuationToken) {
49
+ result = await this._list(billingAccountId, options);
50
+ let page = result.value || [];
51
+ continuationToken = result.nextLink;
52
+ setContinuationToken(page, continuationToken);
53
+ yield page;
54
+ }
55
+ while (continuationToken) {
56
+ result = await this._listNext(billingAccountId, continuationToken, options);
57
+ continuationToken = result.nextLink;
58
+ let page = result.value || [];
59
+ setContinuationToken(page, continuationToken);
60
+ yield page;
61
+ }
64
62
  }
65
- listPagingAll(billingAccountId, options) {
66
- return __asyncGenerator(this, arguments, function* listPagingAll_1() {
67
- var _a, e_1, _b, _c;
68
- try {
69
- for (var _d = true, _e = __asyncValues(this.listPagingPage(billingAccountId, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
70
- _c = _f.value;
71
- _d = false;
72
- const page = _c;
73
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
74
- }
75
- }
76
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
77
- finally {
78
- try {
79
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
80
- }
81
- finally { if (e_1) throw e_1.error; }
82
- }
83
- });
63
+ async *listPagingAll(billingAccountId, options) {
64
+ for await (const page of this.listPagingPage(billingAccountId, options)) {
65
+ yield* page;
66
+ }
84
67
  }
85
68
  /**
86
69
  * List of transactions for reserved instances on billing account scope
@@ -98,52 +81,35 @@ export class ReservationTransactionsImpl {
98
81
  return this;
99
82
  },
100
83
  byPage: (settings) => {
101
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
84
+ if (settings?.maxPageSize) {
102
85
  throw new Error("maxPageSize is not supported by this operation.");
103
86
  }
104
87
  return this.listByBillingProfilePagingPage(billingAccountId, billingProfileId, options, settings);
105
88
  }
106
89
  };
107
90
  }
108
- listByBillingProfilePagingPage(billingAccountId, billingProfileId, options, settings) {
109
- return __asyncGenerator(this, arguments, function* listByBillingProfilePagingPage_1() {
110
- let result;
111
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
112
- if (!continuationToken) {
113
- result = yield __await(this._listByBillingProfile(billingAccountId, billingProfileId, options));
114
- let page = result.value || [];
115
- continuationToken = result.nextLink;
116
- setContinuationToken(page, continuationToken);
117
- yield yield __await(page);
118
- }
119
- while (continuationToken) {
120
- result = yield __await(this._listByBillingProfileNext(billingAccountId, billingProfileId, continuationToken, options));
121
- continuationToken = result.nextLink;
122
- let page = result.value || [];
123
- setContinuationToken(page, continuationToken);
124
- yield yield __await(page);
125
- }
126
- });
91
+ async *listByBillingProfilePagingPage(billingAccountId, billingProfileId, options, settings) {
92
+ let result;
93
+ let continuationToken = settings?.continuationToken;
94
+ if (!continuationToken) {
95
+ result = await this._listByBillingProfile(billingAccountId, billingProfileId, options);
96
+ let page = result.value || [];
97
+ continuationToken = result.nextLink;
98
+ setContinuationToken(page, continuationToken);
99
+ yield page;
100
+ }
101
+ while (continuationToken) {
102
+ result = await this._listByBillingProfileNext(billingAccountId, billingProfileId, continuationToken, options);
103
+ continuationToken = result.nextLink;
104
+ let page = result.value || [];
105
+ setContinuationToken(page, continuationToken);
106
+ yield page;
107
+ }
127
108
  }
128
- listByBillingProfilePagingAll(billingAccountId, billingProfileId, options) {
129
- return __asyncGenerator(this, arguments, function* listByBillingProfilePagingAll_1() {
130
- var _a, e_2, _b, _c;
131
- try {
132
- for (var _d = true, _e = __asyncValues(this.listByBillingProfilePagingPage(billingAccountId, billingProfileId, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
133
- _c = _f.value;
134
- _d = false;
135
- const page = _c;
136
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
137
- }
138
- }
139
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
140
- finally {
141
- try {
142
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
143
- }
144
- finally { if (e_2) throw e_2.error; }
145
- }
146
- });
109
+ async *listByBillingProfilePagingAll(billingAccountId, billingProfileId, options) {
110
+ for await (const page of this.listByBillingProfilePagingPage(billingAccountId, billingProfileId, options)) {
111
+ yield* page;
112
+ }
147
113
  }
148
114
  /**
149
115
  * List of transactions for reserved instances on billing account scope
@@ -1 +1 @@
1
- {"version":3,"file":"reservationTransactions.js","sourceRoot":"","sources":["../../../src/operations/reservationTransactions.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAetD,4CAA4C;AAC5C,2DAA2D;AAC3D,MAAM,OAAO,2BAA2B;IAGtC;;;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;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,gBAAgB,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;YAClE,CAAC;SACF,CAAC;IACJ,CAAC;IAEc,cAAc,CAC3B,gBAAwB,EACxB,OAAmD,EACnD,QAAuB;;YAEvB,IAAI,MAA2C,CAAC;YAChD,IAAI,iBAAiB,GAAG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;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"]}
1
+ {"version":3,"file":"reservationTransactions.js","sourceRoot":"","sources":["../../../src/operations/reservationTransactions.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAetD,4CAA4C;AAC5C,2DAA2D;AAC3D,MAAM,OAAO,2BAA2B;IACrB,M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E;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,UAAU,CAAC;IAC3D,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,gBAAgB;QAC3B,UAAU,CAAC,gBAAgB;KAC5B;IACD,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,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"]}
@@ -5,7 +5,6 @@
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
- import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
9
8
  import { setContinuationToken } from "../pagingHelper.js";
10
9
  import * as coreClient from "@azure/core-client";
11
10
  import * as Mappers from "../models/mappers.js";
@@ -13,6 +12,7 @@ import * as Parameters from "../models/parameters.js";
13
12
  /// <reference lib="esnext.asynciterable" />
14
13
  /** Class containing ReservationsDetails operations. */
15
14
  export class ReservationsDetailsImpl {
15
+ client;
16
16
  /**
17
17
  * Initialize a new instance of the class ReservationsDetails class.
18
18
  * @param client Reference to the service client
@@ -37,52 +37,35 @@ export class ReservationsDetailsImpl {
37
37
  return this;
38
38
  },
39
39
  byPage: (settings) => {
40
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
40
+ if (settings?.maxPageSize) {
41
41
  throw new Error("maxPageSize is not supported by this operation.");
42
42
  }
43
43
  return this.listByReservationOrderPagingPage(reservationOrderId, filter, options, settings);
44
44
  }
45
45
  };
46
46
  }
47
- listByReservationOrderPagingPage(reservationOrderId, filter, options, settings) {
48
- return __asyncGenerator(this, arguments, function* listByReservationOrderPagingPage_1() {
49
- let result;
50
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
51
- if (!continuationToken) {
52
- result = yield __await(this._listByReservationOrder(reservationOrderId, filter, options));
53
- let page = result.value || [];
54
- continuationToken = result.nextLink;
55
- setContinuationToken(page, continuationToken);
56
- yield yield __await(page);
57
- }
58
- while (continuationToken) {
59
- result = yield __await(this._listByReservationOrderNext(reservationOrderId, continuationToken, options));
60
- continuationToken = result.nextLink;
61
- let page = result.value || [];
62
- setContinuationToken(page, continuationToken);
63
- yield yield __await(page);
64
- }
65
- });
47
+ async *listByReservationOrderPagingPage(reservationOrderId, filter, options, settings) {
48
+ let result;
49
+ let continuationToken = settings?.continuationToken;
50
+ if (!continuationToken) {
51
+ result = await this._listByReservationOrder(reservationOrderId, filter, options);
52
+ let page = result.value || [];
53
+ continuationToken = result.nextLink;
54
+ setContinuationToken(page, continuationToken);
55
+ yield page;
56
+ }
57
+ while (continuationToken) {
58
+ result = await this._listByReservationOrderNext(reservationOrderId, continuationToken, options);
59
+ continuationToken = result.nextLink;
60
+ let page = result.value || [];
61
+ setContinuationToken(page, continuationToken);
62
+ yield page;
63
+ }
66
64
  }
67
- listByReservationOrderPagingAll(reservationOrderId, filter, options) {
68
- return __asyncGenerator(this, arguments, function* listByReservationOrderPagingAll_1() {
69
- var _a, e_1, _b, _c;
70
- try {
71
- for (var _d = true, _e = __asyncValues(this.listByReservationOrderPagingPage(reservationOrderId, filter, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
72
- _c = _f.value;
73
- _d = false;
74
- const page = _c;
75
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
76
- }
77
- }
78
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
79
- finally {
80
- try {
81
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
82
- }
83
- finally { if (e_1) throw e_1.error; }
84
- }
85
- });
65
+ async *listByReservationOrderPagingAll(reservationOrderId, filter, options) {
66
+ for await (const page of this.listByReservationOrderPagingPage(reservationOrderId, filter, options)) {
67
+ yield* page;
68
+ }
86
69
  }
87
70
  /**
88
71
  * Lists the reservations details for provided date range.
@@ -102,52 +85,35 @@ export class ReservationsDetailsImpl {
102
85
  return this;
103
86
  },
104
87
  byPage: (settings) => {
105
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
88
+ if (settings?.maxPageSize) {
106
89
  throw new Error("maxPageSize is not supported by this operation.");
107
90
  }
108
91
  return this.listByReservationOrderAndReservationPagingPage(reservationOrderId, reservationId, filter, options, settings);
109
92
  }
110
93
  };
111
94
  }
112
- listByReservationOrderAndReservationPagingPage(reservationOrderId, reservationId, filter, options, settings) {
113
- return __asyncGenerator(this, arguments, function* listByReservationOrderAndReservationPagingPage_1() {
114
- let result;
115
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
116
- if (!continuationToken) {
117
- result = yield __await(this._listByReservationOrderAndReservation(reservationOrderId, reservationId, filter, options));
118
- let page = result.value || [];
119
- continuationToken = result.nextLink;
120
- setContinuationToken(page, continuationToken);
121
- yield yield __await(page);
122
- }
123
- while (continuationToken) {
124
- result = yield __await(this._listByReservationOrderAndReservationNext(reservationOrderId, reservationId, continuationToken, options));
125
- continuationToken = result.nextLink;
126
- let page = result.value || [];
127
- setContinuationToken(page, continuationToken);
128
- yield yield __await(page);
129
- }
130
- });
95
+ async *listByReservationOrderAndReservationPagingPage(reservationOrderId, reservationId, filter, options, settings) {
96
+ let result;
97
+ let continuationToken = settings?.continuationToken;
98
+ if (!continuationToken) {
99
+ result = await this._listByReservationOrderAndReservation(reservationOrderId, reservationId, filter, options);
100
+ let page = result.value || [];
101
+ continuationToken = result.nextLink;
102
+ setContinuationToken(page, continuationToken);
103
+ yield page;
104
+ }
105
+ while (continuationToken) {
106
+ result = await this._listByReservationOrderAndReservationNext(reservationOrderId, reservationId, continuationToken, options);
107
+ continuationToken = result.nextLink;
108
+ let page = result.value || [];
109
+ setContinuationToken(page, continuationToken);
110
+ yield page;
111
+ }
131
112
  }
132
- listByReservationOrderAndReservationPagingAll(reservationOrderId, reservationId, filter, options) {
133
- return __asyncGenerator(this, arguments, function* listByReservationOrderAndReservationPagingAll_1() {
134
- var _a, e_2, _b, _c;
135
- try {
136
- for (var _d = true, _e = __asyncValues(this.listByReservationOrderAndReservationPagingPage(reservationOrderId, reservationId, filter, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
137
- _c = _f.value;
138
- _d = false;
139
- const page = _c;
140
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
141
- }
142
- }
143
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
144
- finally {
145
- try {
146
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
147
- }
148
- finally { if (e_2) throw e_2.error; }
149
- }
150
- });
113
+ async *listByReservationOrderAndReservationPagingAll(reservationOrderId, reservationId, filter, options) {
114
+ for await (const page of this.listByReservationOrderAndReservationPagingPage(reservationOrderId, reservationId, filter, options)) {
115
+ yield* page;
116
+ }
151
117
  }
152
118
  /**
153
119
  * Lists the reservations details for the defined scope and provided date range.
@@ -168,52 +134,35 @@ export class ReservationsDetailsImpl {
168
134
  return this;
169
135
  },
170
136
  byPage: (settings) => {
171
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
137
+ if (settings?.maxPageSize) {
172
138
  throw new Error("maxPageSize is not supported by this operation.");
173
139
  }
174
140
  return this.listPagingPage(scope, options, settings);
175
141
  }
176
142
  };
177
143
  }
178
- listPagingPage(scope, options, settings) {
179
- return __asyncGenerator(this, arguments, function* listPagingPage_1() {
180
- let result;
181
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
182
- if (!continuationToken) {
183
- result = yield __await(this._list(scope, options));
184
- let page = result.value || [];
185
- continuationToken = result.nextLink;
186
- setContinuationToken(page, continuationToken);
187
- yield yield __await(page);
188
- }
189
- while (continuationToken) {
190
- result = yield __await(this._listNext(scope, continuationToken, options));
191
- continuationToken = result.nextLink;
192
- let page = result.value || [];
193
- setContinuationToken(page, continuationToken);
194
- yield yield __await(page);
195
- }
196
- });
144
+ async *listPagingPage(scope, options, settings) {
145
+ let result;
146
+ let continuationToken = settings?.continuationToken;
147
+ if (!continuationToken) {
148
+ result = await this._list(scope, options);
149
+ let page = result.value || [];
150
+ continuationToken = result.nextLink;
151
+ setContinuationToken(page, continuationToken);
152
+ yield page;
153
+ }
154
+ while (continuationToken) {
155
+ result = await this._listNext(scope, continuationToken, options);
156
+ continuationToken = result.nextLink;
157
+ let page = result.value || [];
158
+ setContinuationToken(page, continuationToken);
159
+ yield page;
160
+ }
197
161
  }
198
- listPagingAll(scope, options) {
199
- return __asyncGenerator(this, arguments, function* listPagingAll_1() {
200
- var _a, e_3, _b, _c;
201
- try {
202
- for (var _d = true, _e = __asyncValues(this.listPagingPage(scope, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
203
- _c = _f.value;
204
- _d = false;
205
- const page = _c;
206
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
207
- }
208
- }
209
- catch (e_3_1) { e_3 = { error: e_3_1 }; }
210
- finally {
211
- try {
212
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
213
- }
214
- finally { if (e_3) throw e_3.error; }
215
- }
216
- });
162
+ async *listPagingAll(scope, options) {
163
+ for await (const page of this.listPagingPage(scope, options)) {
164
+ yield* page;
165
+ }
217
166
  }
218
167
  /**
219
168
  * Lists the reservations details for provided date range.