@azure/arm-consumption 9.2.1-alpha.20250717.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-node.api.md +1559 -1559
@@ -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 LotsOperations operations. */
15
14
  export class LotsOperationsImpl {
15
+ client;
16
16
  /**
17
17
  * Initialize a new instance of the class LotsOperations class.
18
18
  * @param client Reference to the service client
@@ -38,52 +38,35 @@ export class LotsOperationsImpl {
38
38
  return this;
39
39
  },
40
40
  byPage: (settings) => {
41
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
41
+ if (settings?.maxPageSize) {
42
42
  throw new Error("maxPageSize is not supported by this operation.");
43
43
  }
44
44
  return this.listByBillingProfilePagingPage(billingAccountId, billingProfileId, options, settings);
45
45
  }
46
46
  };
47
47
  }
48
- listByBillingProfilePagingPage(billingAccountId, billingProfileId, options, settings) {
49
- return __asyncGenerator(this, arguments, function* listByBillingProfilePagingPage_1() {
50
- let result;
51
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
52
- if (!continuationToken) {
53
- result = yield __await(this._listByBillingProfile(billingAccountId, billingProfileId, options));
54
- let page = result.value || [];
55
- continuationToken = result.nextLink;
56
- setContinuationToken(page, continuationToken);
57
- yield yield __await(page);
58
- }
59
- while (continuationToken) {
60
- result = yield __await(this._listByBillingProfileNext(billingAccountId, billingProfileId, continuationToken, options));
61
- continuationToken = result.nextLink;
62
- let page = result.value || [];
63
- setContinuationToken(page, continuationToken);
64
- yield yield __await(page);
65
- }
66
- });
48
+ async *listByBillingProfilePagingPage(billingAccountId, billingProfileId, options, settings) {
49
+ let result;
50
+ let continuationToken = settings?.continuationToken;
51
+ if (!continuationToken) {
52
+ result = await this._listByBillingProfile(billingAccountId, billingProfileId, options);
53
+ let page = result.value || [];
54
+ continuationToken = result.nextLink;
55
+ setContinuationToken(page, continuationToken);
56
+ yield page;
57
+ }
58
+ while (continuationToken) {
59
+ result = await this._listByBillingProfileNext(billingAccountId, billingProfileId, continuationToken, options);
60
+ continuationToken = result.nextLink;
61
+ let page = result.value || [];
62
+ setContinuationToken(page, continuationToken);
63
+ yield page;
64
+ }
67
65
  }
68
- listByBillingProfilePagingAll(billingAccountId, billingProfileId, options) {
69
- return __asyncGenerator(this, arguments, function* listByBillingProfilePagingAll_1() {
70
- var _a, e_1, _b, _c;
71
- try {
72
- for (var _d = true, _e = __asyncValues(this.listByBillingProfilePagingPage(billingAccountId, billingProfileId, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
73
- _c = _f.value;
74
- _d = false;
75
- const page = _c;
76
- yield __await(yield* __asyncDelegator(__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 __await(_b.call(_e));
83
- }
84
- finally { if (e_1) throw e_1.error; }
85
- }
86
- });
66
+ async *listByBillingProfilePagingAll(billingAccountId, billingProfileId, options) {
67
+ for await (const page of this.listByBillingProfilePagingPage(billingAccountId, billingProfileId, options)) {
68
+ yield* page;
69
+ }
87
70
  }
88
71
  /**
89
72
  * Lists all Azure credits and Microsoft Azure consumption commitments for a billing account or a
@@ -102,52 +85,35 @@ export class LotsOperationsImpl {
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.listByBillingAccountPagingPage(billingAccountId, options, settings);
109
92
  }
110
93
  };
111
94
  }
112
- listByBillingAccountPagingPage(billingAccountId, options, settings) {
113
- return __asyncGenerator(this, arguments, function* listByBillingAccountPagingPage_1() {
114
- let result;
115
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
116
- if (!continuationToken) {
117
- result = yield __await(this._listByBillingAccount(billingAccountId, 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._listByBillingAccountNext(billingAccountId, continuationToken, options));
125
- continuationToken = result.nextLink;
126
- let page = result.value || [];
127
- setContinuationToken(page, continuationToken);
128
- yield yield __await(page);
129
- }
130
- });
95
+ async *listByBillingAccountPagingPage(billingAccountId, options, settings) {
96
+ let result;
97
+ let continuationToken = settings?.continuationToken;
98
+ if (!continuationToken) {
99
+ result = await this._listByBillingAccount(billingAccountId, 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._listByBillingAccountNext(billingAccountId, continuationToken, options);
107
+ continuationToken = result.nextLink;
108
+ let page = result.value || [];
109
+ setContinuationToken(page, continuationToken);
110
+ yield page;
111
+ }
131
112
  }
132
- listByBillingAccountPagingAll(billingAccountId, options) {
133
- return __asyncGenerator(this, arguments, function* listByBillingAccountPagingAll_1() {
134
- var _a, e_2, _b, _c;
135
- try {
136
- for (var _d = true, _e = __asyncValues(this.listByBillingAccountPagingPage(billingAccountId, 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 *listByBillingAccountPagingAll(billingAccountId, options) {
114
+ for await (const page of this.listByBillingAccountPagingPage(billingAccountId, options)) {
115
+ yield* page;
116
+ }
151
117
  }
152
118
  /**
153
119
  * Lists all Azure credits and Microsoft Azure consumption commitments for a billing account or a
@@ -1 +1 @@
1
- {"version":3,"file":"lotsOperations.js","sourceRoot":"","sources":["../../../src/operations/lotsOperations.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,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jB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,IAAI;SACzB;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","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 { LotsOperations } 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 LotSummary,\n LotsListByBillingProfileNextOptionalParams,\n LotsListByBillingProfileOptionalParams,\n LotsListByBillingProfileResponse,\n LotsListByBillingAccountNextOptionalParams,\n LotsListByBillingAccountOptionalParams,\n LotsListByBillingAccountResponse,\n LotsListByBillingProfileNextResponse,\n LotsListByBillingAccountNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing LotsOperations operations. */\nexport class LotsOperationsImpl implements LotsOperations {\n private readonly client: ConsumptionManagementClient;\n\n /**\n * Initialize a new instance of the class LotsOperations class.\n * @param client Reference to the service client\n */\n constructor(client: ConsumptionManagementClient) {\n this.client = client;\n }\n\n /**\n * Lists all Azure credits and Microsoft Azure consumption commitments for a billing account or a\n * billing profile. Microsoft Azure consumption commitments are only supported for the billing account\n * 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?: LotsListByBillingProfileOptionalParams\n ): PagedAsyncIterableIterator<LotSummary> {\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?: LotsListByBillingProfileOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<LotSummary[]> {\n let result: LotsListByBillingProfileResponse;\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?: LotsListByBillingProfileOptionalParams\n ): AsyncIterableIterator<LotSummary> {\n for await (const page of this.listByBillingProfilePagingPage(\n billingAccountId,\n billingProfileId,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Lists all Azure credits and Microsoft Azure consumption commitments for a billing account or a\n * billing profile. Microsoft Azure consumption commitments are only supported for the billing account\n * scope.\n * @param billingAccountId BillingAccount ID\n * @param options The options parameters.\n */\n public listByBillingAccount(\n billingAccountId: string,\n options?: LotsListByBillingAccountOptionalParams\n ): PagedAsyncIterableIterator<LotSummary> {\n const iter = this.listByBillingAccountPagingAll(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.listByBillingAccountPagingPage(\n billingAccountId,\n options,\n settings\n );\n }\n };\n }\n\n private async *listByBillingAccountPagingPage(\n billingAccountId: string,\n options?: LotsListByBillingAccountOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<LotSummary[]> {\n let result: LotsListByBillingAccountResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByBillingAccount(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._listByBillingAccountNext(\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 *listByBillingAccountPagingAll(\n billingAccountId: string,\n options?: LotsListByBillingAccountOptionalParams\n ): AsyncIterableIterator<LotSummary> {\n for await (const page of this.listByBillingAccountPagingPage(\n billingAccountId,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Lists all Azure credits and Microsoft Azure consumption commitments for a billing account or a\n * billing profile. Microsoft Azure consumption commitments are only supported for the billing account\n * 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?: LotsListByBillingProfileOptionalParams\n ): Promise<LotsListByBillingProfileResponse> {\n return this.client.sendOperationRequest(\n { billingAccountId, billingProfileId, options },\n listByBillingProfileOperationSpec\n );\n }\n\n /**\n * Lists all Azure credits and Microsoft Azure consumption commitments for a billing account or a\n * billing profile. Microsoft Azure consumption commitments are only supported for the billing account\n * scope.\n * @param billingAccountId BillingAccount ID\n * @param options The options parameters.\n */\n private _listByBillingAccount(\n billingAccountId: string,\n options?: LotsListByBillingAccountOptionalParams\n ): Promise<LotsListByBillingAccountResponse> {\n return this.client.sendOperationRequest(\n { billingAccountId, options },\n listByBillingAccountOperationSpec\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?: LotsListByBillingProfileNextOptionalParams\n ): Promise<LotsListByBillingProfileNextResponse> {\n return this.client.sendOperationRequest(\n { billingAccountId, billingProfileId, nextLink, options },\n listByBillingProfileNextOperationSpec\n );\n }\n\n /**\n * ListByBillingAccountNext\n * @param billingAccountId BillingAccount ID\n * @param nextLink The nextLink from the previous successful call to the ListByBillingAccount method.\n * @param options The options parameters.\n */\n private _listByBillingAccountNext(\n billingAccountId: string,\n nextLink: string,\n options?: LotsListByBillingAccountNextOptionalParams\n ): Promise<LotsListByBillingAccountNextResponse> {\n return this.client.sendOperationRequest(\n { billingAccountId, nextLink, options },\n listByBillingAccountNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listByBillingProfileOperationSpec: coreClient.OperationSpec = {\n path:\n \"/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.Consumption/lots\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Lots\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.billingAccountId,\n Parameters.billingProfileId\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listByBillingAccountOperationSpec: coreClient.OperationSpec = {\n path:\n \"/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/lots\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Lots\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 listByBillingProfileNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Lots\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};\nconst listByBillingAccountNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Lots\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};\n"]}
1
+ {"version":3,"file":"lotsOperations.js","sourceRoot":"","sources":["../../../src/operations/lotsOperations.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;AActD,4CAA4C;AAC5C,kDAAkD;AAClD,MAAM,OAAO,kBAAkB;IACZ,MAAM,CAA8B;IAErD;;;OAGG;IACH,YAAY,MAAmC;QAC7C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;OAOG;IACI,oBAAoB,CACzB,gBAAwB,EACxB,gBAAwB,EACxB,OAAgD;QAEhD,MAAM,IAAI,GA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AAE,UAAU,CAAC,gBAAgB,CAAC;IAC9D,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,IAAI;SACzB;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;AACF,MAAM,qCAAqC,GAA6B;IACtE,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,IAAI;SACzB;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","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 { LotsOperations } 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 LotSummary,\n LotsListByBillingProfileNextOptionalParams,\n LotsListByBillingProfileOptionalParams,\n LotsListByBillingProfileResponse,\n LotsListByBillingAccountNextOptionalParams,\n LotsListByBillingAccountOptionalParams,\n LotsListByBillingAccountResponse,\n LotsListByBillingProfileNextResponse,\n LotsListByBillingAccountNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing LotsOperations operations. */\nexport class LotsOperationsImpl implements LotsOperations {\n private readonly client: ConsumptionManagementClient;\n\n /**\n * Initialize a new instance of the class LotsOperations class.\n * @param client Reference to the service client\n */\n constructor(client: ConsumptionManagementClient) {\n this.client = client;\n }\n\n /**\n * Lists all Azure credits and Microsoft Azure consumption commitments for a billing account or a\n * billing profile. Microsoft Azure consumption commitments are only supported for the billing account\n * 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?: LotsListByBillingProfileOptionalParams\n ): PagedAsyncIterableIterator<LotSummary> {\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?: LotsListByBillingProfileOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<LotSummary[]> {\n let result: LotsListByBillingProfileResponse;\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?: LotsListByBillingProfileOptionalParams\n ): AsyncIterableIterator<LotSummary> {\n for await (const page of this.listByBillingProfilePagingPage(\n billingAccountId,\n billingProfileId,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Lists all Azure credits and Microsoft Azure consumption commitments for a billing account or a\n * billing profile. Microsoft Azure consumption commitments are only supported for the billing account\n * scope.\n * @param billingAccountId BillingAccount ID\n * @param options The options parameters.\n */\n public listByBillingAccount(\n billingAccountId: string,\n options?: LotsListByBillingAccountOptionalParams\n ): PagedAsyncIterableIterator<LotSummary> {\n const iter = this.listByBillingAccountPagingAll(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.listByBillingAccountPagingPage(\n billingAccountId,\n options,\n settings\n );\n }\n };\n }\n\n private async *listByBillingAccountPagingPage(\n billingAccountId: string,\n options?: LotsListByBillingAccountOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<LotSummary[]> {\n let result: LotsListByBillingAccountResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByBillingAccount(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._listByBillingAccountNext(\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 *listByBillingAccountPagingAll(\n billingAccountId: string,\n options?: LotsListByBillingAccountOptionalParams\n ): AsyncIterableIterator<LotSummary> {\n for await (const page of this.listByBillingAccountPagingPage(\n billingAccountId,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Lists all Azure credits and Microsoft Azure consumption commitments for a billing account or a\n * billing profile. Microsoft Azure consumption commitments are only supported for the billing account\n * 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?: LotsListByBillingProfileOptionalParams\n ): Promise<LotsListByBillingProfileResponse> {\n return this.client.sendOperationRequest(\n { billingAccountId, billingProfileId, options },\n listByBillingProfileOperationSpec\n );\n }\n\n /**\n * Lists all Azure credits and Microsoft Azure consumption commitments for a billing account or a\n * billing profile. Microsoft Azure consumption commitments are only supported for the billing account\n * scope.\n * @param billingAccountId BillingAccount ID\n * @param options The options parameters.\n */\n private _listByBillingAccount(\n billingAccountId: string,\n options?: LotsListByBillingAccountOptionalParams\n ): Promise<LotsListByBillingAccountResponse> {\n return this.client.sendOperationRequest(\n { billingAccountId, options },\n listByBillingAccountOperationSpec\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?: LotsListByBillingProfileNextOptionalParams\n ): Promise<LotsListByBillingProfileNextResponse> {\n return this.client.sendOperationRequest(\n { billingAccountId, billingProfileId, nextLink, options },\n listByBillingProfileNextOperationSpec\n );\n }\n\n /**\n * ListByBillingAccountNext\n * @param billingAccountId BillingAccount ID\n * @param nextLink The nextLink from the previous successful call to the ListByBillingAccount method.\n * @param options The options parameters.\n */\n private _listByBillingAccountNext(\n billingAccountId: string,\n nextLink: string,\n options?: LotsListByBillingAccountNextOptionalParams\n ): Promise<LotsListByBillingAccountNextResponse> {\n return this.client.sendOperationRequest(\n { billingAccountId, nextLink, options },\n listByBillingAccountNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listByBillingProfileOperationSpec: coreClient.OperationSpec = {\n path:\n \"/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.Consumption/lots\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Lots\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.billingAccountId,\n Parameters.billingProfileId\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listByBillingAccountOperationSpec: coreClient.OperationSpec = {\n path:\n \"/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/lots\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Lots\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 listByBillingProfileNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Lots\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};\nconst listByBillingAccountNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Lots\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};\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 Marketplaces operations. */
15
14
  export class MarketplacesImpl {
15
+ client;
16
16
  /**
17
17
  * Initialize a new instance of the class Marketplaces class.
18
18
  * @param client Reference to the service client
@@ -46,52 +46,35 @@ export class MarketplacesImpl {
46
46
  return this;
47
47
  },
48
48
  byPage: (settings) => {
49
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
49
+ if (settings?.maxPageSize) {
50
50
  throw new Error("maxPageSize is not supported by this operation.");
51
51
  }
52
52
  return this.listPagingPage(scope, options, settings);
53
53
  }
54
54
  };
55
55
  }
56
- listPagingPage(scope, options, settings) {
57
- return __asyncGenerator(this, arguments, function* listPagingPage_1() {
58
- let result;
59
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
60
- if (!continuationToken) {
61
- result = yield __await(this._list(scope, options));
62
- let page = result.value || [];
63
- continuationToken = result.nextLink;
64
- setContinuationToken(page, continuationToken);
65
- yield yield __await(page);
66
- }
67
- while (continuationToken) {
68
- result = yield __await(this._listNext(scope, continuationToken, options));
69
- continuationToken = result.nextLink;
70
- let page = result.value || [];
71
- setContinuationToken(page, continuationToken);
72
- yield yield __await(page);
73
- }
74
- });
56
+ async *listPagingPage(scope, options, settings) {
57
+ let result;
58
+ let continuationToken = settings?.continuationToken;
59
+ if (!continuationToken) {
60
+ result = await this._list(scope, options);
61
+ let page = result.value || [];
62
+ continuationToken = result.nextLink;
63
+ setContinuationToken(page, continuationToken);
64
+ yield page;
65
+ }
66
+ while (continuationToken) {
67
+ result = await this._listNext(scope, continuationToken, options);
68
+ continuationToken = result.nextLink;
69
+ let page = result.value || [];
70
+ setContinuationToken(page, continuationToken);
71
+ yield page;
72
+ }
75
73
  }
76
- listPagingAll(scope, options) {
77
- return __asyncGenerator(this, arguments, function* listPagingAll_1() {
78
- var _a, e_1, _b, _c;
79
- try {
80
- for (var _d = true, _e = __asyncValues(this.listPagingPage(scope, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
81
- _c = _f.value;
82
- _d = false;
83
- const page = _c;
84
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
85
- }
86
- }
87
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
88
- finally {
89
- try {
90
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
91
- }
92
- finally { if (e_1) throw e_1.error; }
93
- }
94
- });
74
+ async *listPagingAll(scope, options) {
75
+ for await (const page of this.listPagingPage(scope, options)) {
76
+ yield* page;
77
+ }
95
78
  }
96
79
  /**
97
80
  * Lists the marketplaces for a scope at the defined scope. Marketplaces are available via this API
@@ -1 +1 @@
1
- {"version":3,"file":"marketplaces.js","sourceRoot":"","sources":["../../../src/operations/marketplaces.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,gDAAgD;AAChD,MAAM,OAAO,gBAAgB;IAG3B;;;OAGG;IACH,YAAY,MAAmC;QAC7C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACI,IAAI,CACT,KAAa,EACb,OA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ACjB,UAAU,CAAC,SAAS;QACpB,UAAU,CAAC,GAAG;QACd,UAAU,CAAC,UAAU;KACtB;IACD,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,sBAAsB;SAC3C;QACD,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 { Marketplaces } 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 Marketplace,\n MarketplacesListNextOptionalParams,\n MarketplacesListOptionalParams,\n MarketplacesListResponse,\n MarketplacesListNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Marketplaces operations. */\nexport class MarketplacesImpl implements Marketplaces {\n private readonly client: ConsumptionManagementClient;\n\n /**\n * Initialize a new instance of the class Marketplaces class.\n * @param client Reference to the service client\n */\n constructor(client: ConsumptionManagementClient) {\n this.client = client;\n }\n\n /**\n * Lists the marketplaces for a scope at the defined scope. Marketplaces are available via this API\n * only for May 1, 2014 or later.\n * @param scope The scope associated with marketplace operations. This includes\n * '/subscriptions/{subscriptionId}/' for subscription scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,\n * '/providers/Microsoft.Billing/departments/{departmentId}' for Department scope,\n * '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope\n * and '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group\n * scope. For subscription, billing account, department, enrollment account and ManagementGroup, you\n * can also add billing period to the scope using\n * '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to specify billing\n * period at department scope use\n * '/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'\n * @param options The options parameters.\n */\n public list(\n scope: string,\n options?: MarketplacesListOptionalParams\n ): PagedAsyncIterableIterator<Marketplace> {\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?: MarketplacesListOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<Marketplace[]> {\n let result: MarketplacesListResponse;\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?: MarketplacesListOptionalParams\n ): AsyncIterableIterator<Marketplace> {\n for await (const page of this.listPagingPage(scope, options)) {\n yield* page;\n }\n }\n\n /**\n * Lists the marketplaces for a scope at the defined scope. Marketplaces are available via this API\n * only for May 1, 2014 or later.\n * @param scope The scope associated with marketplace operations. This includes\n * '/subscriptions/{subscriptionId}/' for subscription scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,\n * '/providers/Microsoft.Billing/departments/{departmentId}' for Department scope,\n * '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope\n * and '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group\n * scope. For subscription, billing account, department, enrollment account and ManagementGroup, you\n * can also add billing period to the scope using\n * '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to specify billing\n * period at department scope use\n * '/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'\n * @param options The options parameters.\n */\n private _list(\n scope: string,\n options?: MarketplacesListOptionalParams\n ): Promise<MarketplacesListResponse> {\n return this.client.sendOperationRequest(\n { scope, options },\n listOperationSpec\n );\n }\n\n /**\n * ListNext\n * @param scope The scope associated with marketplace operations. This includes\n * '/subscriptions/{subscriptionId}/' for subscription scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,\n * '/providers/Microsoft.Billing/departments/{departmentId}' for Department scope,\n * '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope\n * and '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group\n * scope. For subscription, billing account, department, enrollment account and ManagementGroup, you\n * can also add billing period to the scope using\n * '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to specify billing\n * period at department scope use\n * '/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'\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?: MarketplacesListNextOptionalParams\n ): Promise<MarketplacesListNextResponse> {\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/marketplaces\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.MarketplacesListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [\n Parameters.filter,\n Parameters.skiptoken,\n Parameters.top,\n Parameters.apiVersion\n ],\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.MarketplacesListResult\n },\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":"marketplaces.js","sourceRoot":"","sources":["../../../src/operations/marketplaces.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,gDAAgD;AAChD,MAAM,OAAO,gBAAgB;IACV,MAAM,CAA8B;IAErD;;;OAGG;IACH,YAAY,MAAmC;QAC7C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACI,IAAI,CACT,KAAa,EACb,OAAwC;QAExC,M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,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,sBAAsB;SAC3C;QACD,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 { Marketplaces } 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 Marketplace,\n MarketplacesListNextOptionalParams,\n MarketplacesListOptionalParams,\n MarketplacesListResponse,\n MarketplacesListNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Marketplaces operations. */\nexport class MarketplacesImpl implements Marketplaces {\n private readonly client: ConsumptionManagementClient;\n\n /**\n * Initialize a new instance of the class Marketplaces class.\n * @param client Reference to the service client\n */\n constructor(client: ConsumptionManagementClient) {\n this.client = client;\n }\n\n /**\n * Lists the marketplaces for a scope at the defined scope. Marketplaces are available via this API\n * only for May 1, 2014 or later.\n * @param scope The scope associated with marketplace operations. This includes\n * '/subscriptions/{subscriptionId}/' for subscription scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,\n * '/providers/Microsoft.Billing/departments/{departmentId}' for Department scope,\n * '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope\n * and '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group\n * scope. For subscription, billing account, department, enrollment account and ManagementGroup, you\n * can also add billing period to the scope using\n * '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to specify billing\n * period at department scope use\n * '/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'\n * @param options The options parameters.\n */\n public list(\n scope: string,\n options?: MarketplacesListOptionalParams\n ): PagedAsyncIterableIterator<Marketplace> {\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?: MarketplacesListOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<Marketplace[]> {\n let result: MarketplacesListResponse;\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?: MarketplacesListOptionalParams\n ): AsyncIterableIterator<Marketplace> {\n for await (const page of this.listPagingPage(scope, options)) {\n yield* page;\n }\n }\n\n /**\n * Lists the marketplaces for a scope at the defined scope. Marketplaces are available via this API\n * only for May 1, 2014 or later.\n * @param scope The scope associated with marketplace operations. This includes\n * '/subscriptions/{subscriptionId}/' for subscription scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,\n * '/providers/Microsoft.Billing/departments/{departmentId}' for Department scope,\n * '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope\n * and '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group\n * scope. For subscription, billing account, department, enrollment account and ManagementGroup, you\n * can also add billing period to the scope using\n * '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to specify billing\n * period at department scope use\n * '/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'\n * @param options The options parameters.\n */\n private _list(\n scope: string,\n options?: MarketplacesListOptionalParams\n ): Promise<MarketplacesListResponse> {\n return this.client.sendOperationRequest(\n { scope, options },\n listOperationSpec\n );\n }\n\n /**\n * ListNext\n * @param scope The scope associated with marketplace operations. This includes\n * '/subscriptions/{subscriptionId}/' for subscription scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,\n * '/providers/Microsoft.Billing/departments/{departmentId}' for Department scope,\n * '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope\n * and '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group\n * scope. For subscription, billing account, department, enrollment account and ManagementGroup, you\n * can also add billing period to the scope using\n * '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to specify billing\n * period at department scope use\n * '/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'\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?: MarketplacesListNextOptionalParams\n ): Promise<MarketplacesListNextResponse> {\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/marketplaces\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.MarketplacesListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [\n Parameters.filter,\n Parameters.skiptoken,\n Parameters.top,\n Parameters.apiVersion\n ],\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.MarketplacesListResult\n },\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 Operations operations. */
15
14
  export class OperationsImpl {
15
+ client;
16
16
  /**
17
17
  * Initialize a new instance of the class Operations class.
18
18
  * @param client Reference to the service client
@@ -34,52 +34,35 @@ export class OperationsImpl {
34
34
  return this;
35
35
  },
36
36
  byPage: (settings) => {
37
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
37
+ if (settings?.maxPageSize) {
38
38
  throw new Error("maxPageSize is not supported by this operation.");
39
39
  }
40
40
  return this.listPagingPage(options, settings);
41
41
  }
42
42
  };
43
43
  }
44
- listPagingPage(options, settings) {
45
- return __asyncGenerator(this, arguments, function* listPagingPage_1() {
46
- let result;
47
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
48
- if (!continuationToken) {
49
- result = yield __await(this._list(options));
50
- let page = result.value || [];
51
- continuationToken = result.nextLink;
52
- setContinuationToken(page, continuationToken);
53
- yield yield __await(page);
54
- }
55
- while (continuationToken) {
56
- result = yield __await(this._listNext(continuationToken, options));
57
- continuationToken = result.nextLink;
58
- let page = result.value || [];
59
- setContinuationToken(page, continuationToken);
60
- yield yield __await(page);
61
- }
62
- });
44
+ async *listPagingPage(options, settings) {
45
+ let result;
46
+ let continuationToken = settings?.continuationToken;
47
+ if (!continuationToken) {
48
+ result = await this._list(options);
49
+ let page = result.value || [];
50
+ continuationToken = result.nextLink;
51
+ setContinuationToken(page, continuationToken);
52
+ yield page;
53
+ }
54
+ while (continuationToken) {
55
+ result = await this._listNext(continuationToken, options);
56
+ continuationToken = result.nextLink;
57
+ let page = result.value || [];
58
+ setContinuationToken(page, continuationToken);
59
+ yield page;
60
+ }
63
61
  }
64
- listPagingAll(options) {
65
- return __asyncGenerator(this, arguments, function* listPagingAll_1() {
66
- var _a, e_1, _b, _c;
67
- try {
68
- for (var _d = true, _e = __asyncValues(this.listPagingPage(options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
69
- _c = _f.value;
70
- _d = false;
71
- const page = _c;
72
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
73
- }
74
- }
75
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
76
- finally {
77
- try {
78
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
79
- }
80
- finally { if (e_1) throw e_1.error; }
81
- }
82
- });
62
+ async *listPagingAll(options) {
63
+ for await (const page of this.listPagingPage(options)) {
64
+ yield* page;
65
+ }
83
66
  }
84
67
  /**
85
68
  * Lists all of the available consumption REST API operations.
@@ -1 +1 @@
1
- {"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../src/operations/operations.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAGH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IACnD,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,mBAAmB;SACxC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC;IACjC,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,mBAAmB;SACxC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,QAAQ,CAAC;IACtD,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 { Operations } 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 Operation,\n OperationsListNextOptionalParams,\n OperationsListOptionalParams,\n OperationsListResponse,\n OperationsListNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Operations operations. */\nexport class OperationsImpl implements Operations {\n private readonly client: ConsumptionManagementClient;\n\n /**\n * Initialize a new instance of the class Operations class.\n * @param client Reference to the service client\n */\n constructor(client: ConsumptionManagementClient) {\n this.client = client;\n }\n\n /**\n * Lists all of the available consumption REST API operations.\n * @param options The options parameters.\n */\n public list(\n options?: OperationsListOptionalParams\n ): PagedAsyncIterableIterator<Operation> {\n const iter = this.listPagingAll(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(options, settings);\n }\n };\n }\n\n private async *listPagingPage(\n options?: OperationsListOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<Operation[]> {\n let result: OperationsListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(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(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 options?: OperationsListOptionalParams\n ): AsyncIterableIterator<Operation> {\n for await (const page of this.listPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Lists all of the available consumption REST API operations.\n * @param options The options parameters.\n */\n private _list(\n options?: OperationsListOptionalParams\n ): Promise<OperationsListResponse> {\n return this.client.sendOperationRequest({ options }, listOperationSpec);\n }\n\n /**\n * ListNext\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 nextLink: string,\n options?: OperationsListNextOptionalParams\n ): Promise<OperationsListNextResponse> {\n return this.client.sendOperationRequest(\n { nextLink, options },\n listNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Consumption/operations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.OperationListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.OperationListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [Parameters.$host, Parameters.nextLink],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
1
+ {"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../src/operations/operations.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,8CAA8C;AAC9C,MAAM,OAAO,cAAc;IACR,MAAM,CAA8B;IAErD;;;OAGG;IACH,YAAY,MAAmC;QAC7C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACI,IAAI,CACT,OAAsC;QAEtC,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QACzC,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,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAA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,QAAgB,EAChB,OAA0C;QAE1C,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,QAAQ,EAAE,OAAO,EAAE,EACrB,qBAAqB,CACtB,CAAC;IACJ,CAAC;CACF;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,iBAAiB,GAA6B;IAClD,IAAI,EAAE,6CAA6C;IACnD,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,mBAAmB;SACxC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC;IACjC,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,mBAAmB;SACxC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,QAAQ,CAAC;IACtD,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 { Operations } 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 Operation,\n OperationsListNextOptionalParams,\n OperationsListOptionalParams,\n OperationsListResponse,\n OperationsListNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Operations operations. */\nexport class OperationsImpl implements Operations {\n private readonly client: ConsumptionManagementClient;\n\n /**\n * Initialize a new instance of the class Operations class.\n * @param client Reference to the service client\n */\n constructor(client: ConsumptionManagementClient) {\n this.client = client;\n }\n\n /**\n * Lists all of the available consumption REST API operations.\n * @param options The options parameters.\n */\n public list(\n options?: OperationsListOptionalParams\n ): PagedAsyncIterableIterator<Operation> {\n const iter = this.listPagingAll(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(options, settings);\n }\n };\n }\n\n private async *listPagingPage(\n options?: OperationsListOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<Operation[]> {\n let result: OperationsListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(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(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 options?: OperationsListOptionalParams\n ): AsyncIterableIterator<Operation> {\n for await (const page of this.listPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Lists all of the available consumption REST API operations.\n * @param options The options parameters.\n */\n private _list(\n options?: OperationsListOptionalParams\n ): Promise<OperationsListResponse> {\n return this.client.sendOperationRequest({ options }, listOperationSpec);\n }\n\n /**\n * ListNext\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 nextLink: string,\n options?: OperationsListNextOptionalParams\n ): Promise<OperationsListNextResponse> {\n return this.client.sendOperationRequest(\n { nextLink, options },\n listNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Consumption/operations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.OperationListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.OperationListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [Parameters.$host, Parameters.nextLink],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
@@ -10,6 +10,7 @@ import * as Mappers from "../models/mappers.js";
10
10
  import * as Parameters from "../models/parameters.js";
11
11
  /** Class containing PriceSheet operations. */
12
12
  export class PriceSheetImpl {
13
+ client;
13
14
  /**
14
15
  * Initialize a new instance of the class PriceSheet class.
15
16
  * @param client Reference to the service client
@@ -1 +1 @@
1
- {"version":3,"file":"priceSheet.js","sourceRoot":"","sources":["../../../src/operations/priceSheet.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAStD,8CAA8C;AAC9C,MAAM,OAAO,cAAc;IAGzB;;;OAGG;IACH,YAAY,MAAmC;QAC7C,IAAI,CAAC,MAAM,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QACpB,UAAU,CAAC,GAAG;QACd,UAAU,CAAC,UAAU;KACtB;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,cAAc;KAC1B;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 { PriceSheet } 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 PriceSheetGetOptionalParams,\n PriceSheetGetResponse,\n PriceSheetGetByBillingPeriodOptionalParams,\n PriceSheetGetByBillingPeriodResponse\n} from \"../models/index.js\";\n\n/** Class containing PriceSheet operations. */\nexport class PriceSheetImpl implements PriceSheet {\n private readonly client: ConsumptionManagementClient;\n\n /**\n * Initialize a new instance of the class PriceSheet class.\n * @param client Reference to the service client\n */\n constructor(client: ConsumptionManagementClient) {\n this.client = client;\n }\n\n /**\n * Gets the price sheet for a subscription. Price sheet is available via this API only for May 1, 2014\n * or later.\n * @param options The options parameters.\n */\n get(options?: PriceSheetGetOptionalParams): Promise<PriceSheetGetResponse> {\n return this.client.sendOperationRequest({ options }, getOperationSpec);\n }\n\n /**\n * Get the price sheet for a scope by subscriptionId and billing period. Price sheet is available via\n * this API only for May 1, 2014 or later.\n * @param billingPeriodName Billing Period Name.\n * @param options The options parameters.\n */\n getByBillingPeriod(\n billingPeriodName: string,\n options?: PriceSheetGetByBillingPeriodOptionalParams\n ): Promise<PriceSheetGetByBillingPeriodResponse> {\n return this.client.sendOperationRequest(\n { billingPeriodName, options },\n getByBillingPeriodOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.Consumption/pricesheets/default\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PriceSheetResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [\n Parameters.expand,\n Parameters.skiptoken,\n Parameters.top,\n Parameters.apiVersion\n ],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getByBillingPeriodOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/pricesheets/default\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PriceSheetResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [\n Parameters.expand,\n Parameters.skiptoken,\n Parameters.top,\n Parameters.apiVersion\n ],\n urlParameters: [\n Parameters.$host,\n Parameters.billingPeriodName,\n Parameters.subscriptionId\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
1
+ {"version":3,"file":"priceSheet.js","sourceRoot":"","sources":["../../../src/operations/priceSheet.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAStD,8CAA8C;AAC9C,MAAM,OAAO,cAAc;IACR,MAAM,CAA8B;IAErD;;;OAGG;IACH,YAAY,MAAmC;QAC7C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACH,GAAG,CAAC,OAAqC;QACvC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CA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iB;QAC5B,UAAU,CAAC,cAAc;KAC1B;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 { PriceSheet } 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 PriceSheetGetOptionalParams,\n PriceSheetGetResponse,\n PriceSheetGetByBillingPeriodOptionalParams,\n PriceSheetGetByBillingPeriodResponse\n} from \"../models/index.js\";\n\n/** Class containing PriceSheet operations. */\nexport class PriceSheetImpl implements PriceSheet {\n private readonly client: ConsumptionManagementClient;\n\n /**\n * Initialize a new instance of the class PriceSheet class.\n * @param client Reference to the service client\n */\n constructor(client: ConsumptionManagementClient) {\n this.client = client;\n }\n\n /**\n * Gets the price sheet for a subscription. Price sheet is available via this API only for May 1, 2014\n * or later.\n * @param options The options parameters.\n */\n get(options?: PriceSheetGetOptionalParams): Promise<PriceSheetGetResponse> {\n return this.client.sendOperationRequest({ options }, getOperationSpec);\n }\n\n /**\n * Get the price sheet for a scope by subscriptionId and billing period. Price sheet is available via\n * this API only for May 1, 2014 or later.\n * @param billingPeriodName Billing Period Name.\n * @param options The options parameters.\n */\n getByBillingPeriod(\n billingPeriodName: string,\n options?: PriceSheetGetByBillingPeriodOptionalParams\n ): Promise<PriceSheetGetByBillingPeriodResponse> {\n return this.client.sendOperationRequest(\n { billingPeriodName, options },\n getByBillingPeriodOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.Consumption/pricesheets/default\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PriceSheetResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [\n Parameters.expand,\n Parameters.skiptoken,\n Parameters.top,\n Parameters.apiVersion\n ],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getByBillingPeriodOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/pricesheets/default\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PriceSheetResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [\n Parameters.expand,\n Parameters.skiptoken,\n Parameters.top,\n Parameters.apiVersion\n ],\n urlParameters: [\n Parameters.$host,\n Parameters.billingPeriodName,\n Parameters.subscriptionId\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
@@ -10,6 +10,7 @@ import * as Mappers from "../models/mappers.js";
10
10
  import * as Parameters from "../models/parameters.js";
11
11
  /** Class containing ReservationRecommendationDetails operations. */
12
12
  export class ReservationRecommendationDetailsImpl {
13
+ client;
13
14
  /**
14
15
  * Initialize a new instance of the class ReservationRecommendationDetails class.
15
16
  * @param client Reference to the service client
@@ -1 +1 @@
1
- {"version":3,"file":"reservationRecommendationDetails.js","sourceRoot":"","sources":["../../../src/operations/reservationRecommendationDetails.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAStD,oEAAoE;AACpE,MAAM,OAAO,oCAAoC;IAI/C;;;OAGG;IACH,YAAY,MAAmC;QAC7C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,GAAG,CACD,KAAa,EACb,MAAc,EACd,IAAU,EACV,cAA8B,EAC9B,OAAe,EACf,OAA2D;QAE3D,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,EAAE,OAAO,EAAE,OAAO,EAAE,EACzD,gBAAgB,CACjB,CAAC;IACJ,CAAC;CACF;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,gBAAgB,GAA6B;IACjD,IAAI,EACF,2EAA2E;IAC7E,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,qCAAqC;SAC1D;QACD,GAAG,EAAE,EAAE;QACP,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,sBAAsB;SAC3C;KACF;IACD,eAAe,EAAE;QACf,UAAU,CAAC,UAAU;QACrB,UAAU,CAAC,MAAM;QACjB,UAAU,CAAC,IAAI;QACf,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,OAAO;KACnB;IACD,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,KAAK,CAAC;IACnD,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 { ReservationRecommendationDetails } 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 Term,\n LookBackPeriod,\n ReservationRecommendationDetailsGetOptionalParams,\n ReservationRecommendationDetailsGetResponse\n} from \"../models/index.js\";\n\n/** Class containing ReservationRecommendationDetails operations. */\nexport class ReservationRecommendationDetailsImpl\n implements ReservationRecommendationDetails {\n private readonly client: ConsumptionManagementClient;\n\n /**\n * Initialize a new instance of the class ReservationRecommendationDetails class.\n * @param client Reference to the service client\n */\n constructor(client: ConsumptionManagementClient) {\n this.client = client;\n }\n\n /**\n * Details of a reservation recommendation for what-if analysis of reserved instances.\n * @param scope The scope associated with reservation recommendation details 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 region Used to select the region the recommendation should be generated for.\n * @param term Specify length of reservation recommendation term.\n * @param lookBackPeriod Filter the time period on which reservation recommendation results are based.\n * @param product Filter the products for which reservation recommendation results are generated.\n * Examples: Standard_DS1_v2 (for VM), Premium_SSD_Managed_Disks_P30 (for Managed Disks)\n * @param options The options parameters.\n */\n get(\n scope: string,\n region: string,\n term: Term,\n lookBackPeriod: LookBackPeriod,\n product: string,\n options?: ReservationRecommendationDetailsGetOptionalParams\n ): Promise<ReservationRecommendationDetailsGetResponse> {\n return this.client.sendOperationRequest(\n { scope, region, term, lookBackPeriod, product, options },\n getOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/{scope}/providers/Microsoft.Consumption/reservationRecommendationDetails\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ReservationRecommendationDetailsModel\n },\n 204: {},\n default: {\n bodyMapper: Mappers.HighCasedErrorResponse\n }\n },\n queryParameters: [\n Parameters.apiVersion,\n Parameters.region,\n Parameters.term,\n Parameters.lookBackPeriod,\n Parameters.product\n ],\n urlParameters: [Parameters.$host, Parameters.scope],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
1
+ {"version":3,"file":"reservationRecommendationDetails.js","sourceRoot":"","sources":["../../../src/operations/reservationRecommendationDetails.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAStD,oEAAoE;AACpE,MAAM,OAAO,oCAAoC;IAE9B,MAAM,CAA8B;IAErD;;;OAGG;IACH,YAAY,MAAmC;QAC7C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,GAAG,CACD,KAAa,EACb,MAAc,EACd,IAAU,EACV,cAA8B,EAC9B,OAAe,EACf,OAA2D;QAE3D,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,EAAE,OAAO,EAAE,OAAO,EAAE,EACzD,gBAAgB,CACjB,CAAC;IACJ,CAAC;CACF;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,gBAAgB,GAA6B;IACjD,IAAI,EACF,2EAA2E;IAC7E,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,qCAAqC;SAC1D;QACD,GAAG,EAAE,EAAE;QACP,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,sBAAsB;SAC3C;KACF;IACD,eAAe,EAAE;QACf,UAAU,CAAC,UAAU;QACrB,UAAU,CAAC,MAAM;QACjB,UAAU,CAAC,IAAI;QACf,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,OAAO;KACnB;IACD,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,KAAK,CAAC;IACnD,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 { ReservationRecommendationDetails } 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 Term,\n LookBackPeriod,\n ReservationRecommendationDetailsGetOptionalParams,\n ReservationRecommendationDetailsGetResponse\n} from \"../models/index.js\";\n\n/** Class containing ReservationRecommendationDetails operations. */\nexport class ReservationRecommendationDetailsImpl\n implements ReservationRecommendationDetails {\n private readonly client: ConsumptionManagementClient;\n\n /**\n * Initialize a new instance of the class ReservationRecommendationDetails class.\n * @param client Reference to the service client\n */\n constructor(client: ConsumptionManagementClient) {\n this.client = client;\n }\n\n /**\n * Details of a reservation recommendation for what-if analysis of reserved instances.\n * @param scope The scope associated with reservation recommendation details 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 region Used to select the region the recommendation should be generated for.\n * @param term Specify length of reservation recommendation term.\n * @param lookBackPeriod Filter the time period on which reservation recommendation results are based.\n * @param product Filter the products for which reservation recommendation results are generated.\n * Examples: Standard_DS1_v2 (for VM), Premium_SSD_Managed_Disks_P30 (for Managed Disks)\n * @param options The options parameters.\n */\n get(\n scope: string,\n region: string,\n term: Term,\n lookBackPeriod: LookBackPeriod,\n product: string,\n options?: ReservationRecommendationDetailsGetOptionalParams\n ): Promise<ReservationRecommendationDetailsGetResponse> {\n return this.client.sendOperationRequest(\n { scope, region, term, lookBackPeriod, product, options },\n getOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/{scope}/providers/Microsoft.Consumption/reservationRecommendationDetails\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ReservationRecommendationDetailsModel\n },\n 204: {},\n default: {\n bodyMapper: Mappers.HighCasedErrorResponse\n }\n },\n queryParameters: [\n Parameters.apiVersion,\n Parameters.region,\n Parameters.term,\n Parameters.lookBackPeriod,\n Parameters.product\n ],\n urlParameters: [Parameters.$host, Parameters.scope],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}