@azure/arm-billing 5.0.1-alpha.20250619.1 → 5.0.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 (275) hide show
  1. package/dist/browser/billingManagementClient.js +43 -5
  2. package/dist/browser/billingManagementClient.js.map +1 -1
  3. package/dist/browser/lroImpl.js +7 -3
  4. package/dist/browser/lroImpl.js.map +1 -1
  5. package/dist/browser/models/mappers.js +868 -393
  6. package/dist/browser/models/mappers.js.map +1 -1
  7. package/dist/browser/operations/address.js +1 -0
  8. package/dist/browser/operations/address.js.map +1 -1
  9. package/dist/browser/operations/agreements.js +23 -40
  10. package/dist/browser/operations/agreements.js.map +1 -1
  11. package/dist/browser/operations/associatedTenants.js +45 -52
  12. package/dist/browser/operations/associatedTenants.js.map +1 -1
  13. package/dist/browser/operations/availableBalances.js +1 -0
  14. package/dist/browser/operations/availableBalances.js.map +1 -1
  15. package/dist/browser/operations/billingAccounts.js +79 -98
  16. package/dist/browser/operations/billingAccounts.js.map +1 -1
  17. package/dist/browser/operations/billingPermissions.js +162 -281
  18. package/dist/browser/operations/billingPermissions.js.map +1 -1
  19. package/dist/browser/operations/billingProfiles.js +45 -52
  20. package/dist/browser/operations/billingProfiles.js.map +1 -1
  21. package/dist/browser/operations/billingPropertyOperations.js +1 -0
  22. package/dist/browser/operations/billingPropertyOperations.js.map +1 -1
  23. package/dist/browser/operations/billingRequests.js +122 -202
  24. package/dist/browser/operations/billingRequests.js.map +1 -1
  25. package/dist/browser/operations/billingRoleAssignments.js +260 -307
  26. package/dist/browser/operations/billingRoleAssignments.js.map +1 -1
  27. package/dist/browser/operations/billingRoleDefinitionOperations.js +139 -241
  28. package/dist/browser/operations/billingRoleDefinitionOperations.js.map +1 -1
  29. package/dist/browser/operations/billingSubscriptions.js +199 -271
  30. package/dist/browser/operations/billingSubscriptions.js.map +1 -1
  31. package/dist/browser/operations/billingSubscriptionsAliases.js +34 -46
  32. package/dist/browser/operations/billingSubscriptionsAliases.js.map +1 -1
  33. package/dist/browser/operations/customers.js +45 -79
  34. package/dist/browser/operations/customers.js.map +1 -1
  35. package/dist/browser/operations/departments.js +23 -40
  36. package/dist/browser/operations/departments.js.map +1 -1
  37. package/dist/browser/operations/enrollmentAccounts.js +45 -79
  38. package/dist/browser/operations/enrollmentAccounts.js.map +1 -1
  39. package/dist/browser/operations/invoiceSections.js +45 -52
  40. package/dist/browser/operations/invoiceSections.js.map +1 -1
  41. package/dist/browser/operations/invoices.js +133 -154
  42. package/dist/browser/operations/invoices.js.map +1 -1
  43. package/dist/browser/operations/operations.js +23 -40
  44. package/dist/browser/operations/operations.js.map +1 -1
  45. package/dist/browser/operations/partnerTransfers.js +23 -40
  46. package/dist/browser/operations/partnerTransfers.js.map +1 -1
  47. package/dist/browser/operations/paymentMethods.js +67 -118
  48. package/dist/browser/operations/paymentMethods.js.map +1 -1
  49. package/dist/browser/operations/policies.js +45 -24
  50. package/dist/browser/operations/policies.js.map +1 -1
  51. package/dist/browser/operations/products.js +100 -163
  52. package/dist/browser/operations/products.js.map +1 -1
  53. package/dist/browser/operations/recipientTransfers.js +23 -40
  54. package/dist/browser/operations/recipientTransfers.js.map +1 -1
  55. package/dist/browser/operations/reservationOrders.js +23 -40
  56. package/dist/browser/operations/reservationOrders.js.map +1 -1
  57. package/dist/browser/operations/reservations.js +78 -124
  58. package/dist/browser/operations/reservations.js.map +1 -1
  59. package/dist/browser/operations/savingsPlanOrders.js +23 -40
  60. package/dist/browser/operations/savingsPlanOrders.js.map +1 -1
  61. package/dist/browser/operations/savingsPlans.js +56 -85
  62. package/dist/browser/operations/savingsPlans.js.map +1 -1
  63. package/dist/browser/operations/transactions.js +100 -163
  64. package/dist/browser/operations/transactions.js.map +1 -1
  65. package/dist/browser/operations/transfers.js +23 -40
  66. package/dist/browser/operations/transfers.js.map +1 -1
  67. package/dist/browser/pagingHelper.js +2 -4
  68. package/dist/browser/pagingHelper.js.map +1 -1
  69. package/dist/commonjs/billingManagementClient.js +43 -5
  70. package/dist/commonjs/billingManagementClient.js.map +1 -1
  71. package/dist/commonjs/lroImpl.js +7 -3
  72. package/dist/commonjs/lroImpl.js.map +1 -1
  73. package/dist/commonjs/models/mappers.js +868 -393
  74. package/dist/commonjs/models/mappers.js.map +1 -1
  75. package/dist/commonjs/operations/address.js +1 -0
  76. package/dist/commonjs/operations/address.js.map +1 -1
  77. package/dist/commonjs/operations/agreements.js +23 -39
  78. package/dist/commonjs/operations/agreements.js.map +1 -1
  79. package/dist/commonjs/operations/associatedTenants.js +45 -51
  80. package/dist/commonjs/operations/associatedTenants.js.map +1 -1
  81. package/dist/commonjs/operations/availableBalances.js +1 -0
  82. package/dist/commonjs/operations/availableBalances.js.map +1 -1
  83. package/dist/commonjs/operations/billingAccounts.js +79 -97
  84. package/dist/commonjs/operations/billingAccounts.js.map +1 -1
  85. package/dist/commonjs/operations/billingPermissions.js +155 -273
  86. package/dist/commonjs/operations/billingPermissions.js.map +1 -1
  87. package/dist/commonjs/operations/billingProfiles.js +45 -51
  88. package/dist/commonjs/operations/billingProfiles.js.map +1 -1
  89. package/dist/commonjs/operations/billingPropertyOperations.js +1 -0
  90. package/dist/commonjs/operations/billingPropertyOperations.js.map +1 -1
  91. package/dist/commonjs/operations/billingRequests.js +122 -201
  92. package/dist/commonjs/operations/billingRequests.js.map +1 -1
  93. package/dist/commonjs/operations/billingRoleAssignments.js +260 -306
  94. package/dist/commonjs/operations/billingRoleAssignments.js.map +1 -1
  95. package/dist/commonjs/operations/billingRoleDefinitionOperations.js +139 -240
  96. package/dist/commonjs/operations/billingRoleDefinitionOperations.js.map +1 -1
  97. package/dist/commonjs/operations/billingSubscriptions.js +199 -270
  98. package/dist/commonjs/operations/billingSubscriptions.js.map +1 -1
  99. package/dist/commonjs/operations/billingSubscriptionsAliases.js +34 -45
  100. package/dist/commonjs/operations/billingSubscriptionsAliases.js.map +1 -1
  101. package/dist/commonjs/operations/customers.js +45 -78
  102. package/dist/commonjs/operations/customers.js.map +1 -1
  103. package/dist/commonjs/operations/departments.js +23 -39
  104. package/dist/commonjs/operations/departments.js.map +1 -1
  105. package/dist/commonjs/operations/enrollmentAccounts.js +45 -78
  106. package/dist/commonjs/operations/enrollmentAccounts.js.map +1 -1
  107. package/dist/commonjs/operations/invoiceSections.js +45 -51
  108. package/dist/commonjs/operations/invoiceSections.js.map +1 -1
  109. package/dist/commonjs/operations/invoices.js +133 -153
  110. package/dist/commonjs/operations/invoices.js.map +1 -1
  111. package/dist/commonjs/operations/operations.js +23 -39
  112. package/dist/commonjs/operations/operations.js.map +1 -1
  113. package/dist/commonjs/operations/partnerTransfers.js +23 -39
  114. package/dist/commonjs/operations/partnerTransfers.js.map +1 -1
  115. package/dist/commonjs/operations/paymentMethods.js +67 -117
  116. package/dist/commonjs/operations/paymentMethods.js.map +1 -1
  117. package/dist/commonjs/operations/policies.js +45 -24
  118. package/dist/commonjs/operations/policies.js.map +1 -1
  119. package/dist/commonjs/operations/products.js +100 -162
  120. package/dist/commonjs/operations/products.js.map +1 -1
  121. package/dist/commonjs/operations/recipientTransfers.js +23 -39
  122. package/dist/commonjs/operations/recipientTransfers.js.map +1 -1
  123. package/dist/commonjs/operations/reservationOrders.js +23 -39
  124. package/dist/commonjs/operations/reservationOrders.js.map +1 -1
  125. package/dist/commonjs/operations/reservations.js +78 -123
  126. package/dist/commonjs/operations/reservations.js.map +1 -1
  127. package/dist/commonjs/operations/savingsPlanOrders.js +23 -39
  128. package/dist/commonjs/operations/savingsPlanOrders.js.map +1 -1
  129. package/dist/commonjs/operations/savingsPlans.js +56 -84
  130. package/dist/commonjs/operations/savingsPlans.js.map +1 -1
  131. package/dist/commonjs/operations/transactions.js +100 -162
  132. package/dist/commonjs/operations/transactions.js.map +1 -1
  133. package/dist/commonjs/operations/transfers.js +23 -39
  134. package/dist/commonjs/operations/transfers.js.map +1 -1
  135. package/dist/commonjs/pagingHelper.js +2 -4
  136. package/dist/commonjs/pagingHelper.js.map +1 -1
  137. package/dist/commonjs/tsdoc-metadata.json +11 -11
  138. package/dist/esm/billingManagementClient.js +43 -5
  139. package/dist/esm/billingManagementClient.js.map +1 -1
  140. package/dist/esm/lroImpl.js +7 -3
  141. package/dist/esm/lroImpl.js.map +1 -1
  142. package/dist/esm/models/mappers.js +868 -393
  143. package/dist/esm/models/mappers.js.map +1 -1
  144. package/dist/esm/operations/address.js +1 -0
  145. package/dist/esm/operations/address.js.map +1 -1
  146. package/dist/esm/operations/agreements.js +23 -40
  147. package/dist/esm/operations/agreements.js.map +1 -1
  148. package/dist/esm/operations/associatedTenants.js +45 -52
  149. package/dist/esm/operations/associatedTenants.js.map +1 -1
  150. package/dist/esm/operations/availableBalances.js +1 -0
  151. package/dist/esm/operations/availableBalances.js.map +1 -1
  152. package/dist/esm/operations/billingAccounts.js +79 -98
  153. package/dist/esm/operations/billingAccounts.js.map +1 -1
  154. package/dist/esm/operations/billingPermissions.js +162 -281
  155. package/dist/esm/operations/billingPermissions.js.map +1 -1
  156. package/dist/esm/operations/billingProfiles.js +45 -52
  157. package/dist/esm/operations/billingProfiles.js.map +1 -1
  158. package/dist/esm/operations/billingPropertyOperations.js +1 -0
  159. package/dist/esm/operations/billingPropertyOperations.js.map +1 -1
  160. package/dist/esm/operations/billingRequests.js +122 -202
  161. package/dist/esm/operations/billingRequests.js.map +1 -1
  162. package/dist/esm/operations/billingRoleAssignments.js +260 -307
  163. package/dist/esm/operations/billingRoleAssignments.js.map +1 -1
  164. package/dist/esm/operations/billingRoleDefinitionOperations.js +139 -241
  165. package/dist/esm/operations/billingRoleDefinitionOperations.js.map +1 -1
  166. package/dist/esm/operations/billingSubscriptions.js +199 -271
  167. package/dist/esm/operations/billingSubscriptions.js.map +1 -1
  168. package/dist/esm/operations/billingSubscriptionsAliases.js +34 -46
  169. package/dist/esm/operations/billingSubscriptionsAliases.js.map +1 -1
  170. package/dist/esm/operations/customers.js +45 -79
  171. package/dist/esm/operations/customers.js.map +1 -1
  172. package/dist/esm/operations/departments.js +23 -40
  173. package/dist/esm/operations/departments.js.map +1 -1
  174. package/dist/esm/operations/enrollmentAccounts.js +45 -79
  175. package/dist/esm/operations/enrollmentAccounts.js.map +1 -1
  176. package/dist/esm/operations/invoiceSections.js +45 -52
  177. package/dist/esm/operations/invoiceSections.js.map +1 -1
  178. package/dist/esm/operations/invoices.js +133 -154
  179. package/dist/esm/operations/invoices.js.map +1 -1
  180. package/dist/esm/operations/operations.js +23 -40
  181. package/dist/esm/operations/operations.js.map +1 -1
  182. package/dist/esm/operations/partnerTransfers.js +23 -40
  183. package/dist/esm/operations/partnerTransfers.js.map +1 -1
  184. package/dist/esm/operations/paymentMethods.js +67 -118
  185. package/dist/esm/operations/paymentMethods.js.map +1 -1
  186. package/dist/esm/operations/policies.js +45 -24
  187. package/dist/esm/operations/policies.js.map +1 -1
  188. package/dist/esm/operations/products.js +100 -163
  189. package/dist/esm/operations/products.js.map +1 -1
  190. package/dist/esm/operations/recipientTransfers.js +23 -40
  191. package/dist/esm/operations/recipientTransfers.js.map +1 -1
  192. package/dist/esm/operations/reservationOrders.js +23 -40
  193. package/dist/esm/operations/reservationOrders.js.map +1 -1
  194. package/dist/esm/operations/reservations.js +78 -124
  195. package/dist/esm/operations/reservations.js.map +1 -1
  196. package/dist/esm/operations/savingsPlanOrders.js +23 -40
  197. package/dist/esm/operations/savingsPlanOrders.js.map +1 -1
  198. package/dist/esm/operations/savingsPlans.js +56 -85
  199. package/dist/esm/operations/savingsPlans.js.map +1 -1
  200. package/dist/esm/operations/transactions.js +100 -163
  201. package/dist/esm/operations/transactions.js.map +1 -1
  202. package/dist/esm/operations/transfers.js +23 -40
  203. package/dist/esm/operations/transfers.js.map +1 -1
  204. package/dist/esm/pagingHelper.js +2 -4
  205. package/dist/esm/pagingHelper.js.map +1 -1
  206. package/dist/react-native/billingManagementClient.js +43 -5
  207. package/dist/react-native/billingManagementClient.js.map +1 -1
  208. package/dist/react-native/lroImpl.js +7 -3
  209. package/dist/react-native/lroImpl.js.map +1 -1
  210. package/dist/react-native/models/mappers.js +868 -393
  211. package/dist/react-native/models/mappers.js.map +1 -1
  212. package/dist/react-native/operations/address.js +1 -0
  213. package/dist/react-native/operations/address.js.map +1 -1
  214. package/dist/react-native/operations/agreements.js +23 -40
  215. package/dist/react-native/operations/agreements.js.map +1 -1
  216. package/dist/react-native/operations/associatedTenants.js +45 -52
  217. package/dist/react-native/operations/associatedTenants.js.map +1 -1
  218. package/dist/react-native/operations/availableBalances.js +1 -0
  219. package/dist/react-native/operations/availableBalances.js.map +1 -1
  220. package/dist/react-native/operations/billingAccounts.js +79 -98
  221. package/dist/react-native/operations/billingAccounts.js.map +1 -1
  222. package/dist/react-native/operations/billingPermissions.js +162 -281
  223. package/dist/react-native/operations/billingPermissions.js.map +1 -1
  224. package/dist/react-native/operations/billingProfiles.js +45 -52
  225. package/dist/react-native/operations/billingProfiles.js.map +1 -1
  226. package/dist/react-native/operations/billingPropertyOperations.js +1 -0
  227. package/dist/react-native/operations/billingPropertyOperations.js.map +1 -1
  228. package/dist/react-native/operations/billingRequests.js +122 -202
  229. package/dist/react-native/operations/billingRequests.js.map +1 -1
  230. package/dist/react-native/operations/billingRoleAssignments.js +260 -307
  231. package/dist/react-native/operations/billingRoleAssignments.js.map +1 -1
  232. package/dist/react-native/operations/billingRoleDefinitionOperations.js +139 -241
  233. package/dist/react-native/operations/billingRoleDefinitionOperations.js.map +1 -1
  234. package/dist/react-native/operations/billingSubscriptions.js +199 -271
  235. package/dist/react-native/operations/billingSubscriptions.js.map +1 -1
  236. package/dist/react-native/operations/billingSubscriptionsAliases.js +34 -46
  237. package/dist/react-native/operations/billingSubscriptionsAliases.js.map +1 -1
  238. package/dist/react-native/operations/customers.js +45 -79
  239. package/dist/react-native/operations/customers.js.map +1 -1
  240. package/dist/react-native/operations/departments.js +23 -40
  241. package/dist/react-native/operations/departments.js.map +1 -1
  242. package/dist/react-native/operations/enrollmentAccounts.js +45 -79
  243. package/dist/react-native/operations/enrollmentAccounts.js.map +1 -1
  244. package/dist/react-native/operations/invoiceSections.js +45 -52
  245. package/dist/react-native/operations/invoiceSections.js.map +1 -1
  246. package/dist/react-native/operations/invoices.js +133 -154
  247. package/dist/react-native/operations/invoices.js.map +1 -1
  248. package/dist/react-native/operations/operations.js +23 -40
  249. package/dist/react-native/operations/operations.js.map +1 -1
  250. package/dist/react-native/operations/partnerTransfers.js +23 -40
  251. package/dist/react-native/operations/partnerTransfers.js.map +1 -1
  252. package/dist/react-native/operations/paymentMethods.js +67 -118
  253. package/dist/react-native/operations/paymentMethods.js.map +1 -1
  254. package/dist/react-native/operations/policies.js +45 -24
  255. package/dist/react-native/operations/policies.js.map +1 -1
  256. package/dist/react-native/operations/products.js +100 -163
  257. package/dist/react-native/operations/products.js.map +1 -1
  258. package/dist/react-native/operations/recipientTransfers.js +23 -40
  259. package/dist/react-native/operations/recipientTransfers.js.map +1 -1
  260. package/dist/react-native/operations/reservationOrders.js +23 -40
  261. package/dist/react-native/operations/reservationOrders.js.map +1 -1
  262. package/dist/react-native/operations/reservations.js +78 -124
  263. package/dist/react-native/operations/reservations.js.map +1 -1
  264. package/dist/react-native/operations/savingsPlanOrders.js +23 -40
  265. package/dist/react-native/operations/savingsPlanOrders.js.map +1 -1
  266. package/dist/react-native/operations/savingsPlans.js +56 -85
  267. package/dist/react-native/operations/savingsPlans.js.map +1 -1
  268. package/dist/react-native/operations/transactions.js +100 -163
  269. package/dist/react-native/operations/transactions.js.map +1 -1
  270. package/dist/react-native/operations/transfers.js +23 -40
  271. package/dist/react-native/operations/transfers.js.map +1 -1
  272. package/dist/react-native/pagingHelper.js +2 -4
  273. package/dist/react-native/pagingHelper.js.map +1 -1
  274. package/package.json +2 -2
  275. /package/review/{arm-billing.api.md → arm-billing-node.api.md} +0 -0
@@ -5,7 +5,6 @@
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
- import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
9
8
  import { setContinuationToken } from "../pagingHelper.js";
10
9
  import * as coreClient from "@azure/core-client";
11
10
  import * as Mappers from "../models/mappers.js";
@@ -15,6 +14,7 @@ import { createLroSpec } from "../lroImpl.js";
15
14
  /// <reference lib="esnext.asynciterable" />
16
15
  /** Class containing Reservations operations. */
17
16
  export class ReservationsImpl {
17
+ client;
18
18
  /**
19
19
  * Initialize a new instance of the class Reservations class.
20
20
  * @param client Reference to the service client
@@ -38,52 +38,35 @@ export class ReservationsImpl {
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.listByBillingAccountPagingPage(billingAccountName, options, settings);
45
45
  },
46
46
  };
47
47
  }
48
- listByBillingAccountPagingPage(billingAccountName, options, settings) {
49
- return __asyncGenerator(this, arguments, function* listByBillingAccountPagingPage_1() {
50
- let result;
51
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
52
- if (!continuationToken) {
53
- result = yield __await(this._listByBillingAccount(billingAccountName, 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._listByBillingAccountNext(billingAccountName, continuationToken, options));
61
- continuationToken = result.nextLink;
62
- let page = result.value || [];
63
- setContinuationToken(page, continuationToken);
64
- yield yield __await(page);
65
- }
66
- });
48
+ async *listByBillingAccountPagingPage(billingAccountName, options, settings) {
49
+ let result;
50
+ let continuationToken = settings?.continuationToken;
51
+ if (!continuationToken) {
52
+ result = await this._listByBillingAccount(billingAccountName, 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._listByBillingAccountNext(billingAccountName, continuationToken, options);
60
+ continuationToken = result.nextLink;
61
+ let page = result.value || [];
62
+ setContinuationToken(page, continuationToken);
63
+ yield page;
64
+ }
67
65
  }
68
- listByBillingAccountPagingAll(billingAccountName, options) {
69
- return __asyncGenerator(this, arguments, function* listByBillingAccountPagingAll_1() {
70
- var _a, e_1, _b, _c;
71
- try {
72
- for (var _d = true, _e = __asyncValues(this.listByBillingAccountPagingPage(billingAccountName, 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 *listByBillingAccountPagingAll(billingAccountName, options) {
67
+ for await (const page of this.listByBillingAccountPagingPage(billingAccountName, options)) {
68
+ yield* page;
69
+ }
87
70
  }
88
71
  /**
89
72
  * Lists the reservations for a billing profile and the roll up counts of reservations group by
@@ -102,52 +85,35 @@ export class ReservationsImpl {
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.listByBillingProfilePagingPage(billingAccountName, billingProfileName, options, settings);
109
92
  },
110
93
  };
111
94
  }
112
- listByBillingProfilePagingPage(billingAccountName, billingProfileName, options, settings) {
113
- return __asyncGenerator(this, arguments, function* listByBillingProfilePagingPage_1() {
114
- let result;
115
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
116
- if (!continuationToken) {
117
- result = yield __await(this._listByBillingProfile(billingAccountName, billingProfileName, 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._listByBillingProfileNext(billingAccountName, billingProfileName, continuationToken, options));
125
- continuationToken = result.nextLink;
126
- let page = result.value || [];
127
- setContinuationToken(page, continuationToken);
128
- yield yield __await(page);
129
- }
130
- });
95
+ async *listByBillingProfilePagingPage(billingAccountName, billingProfileName, options, settings) {
96
+ let result;
97
+ let continuationToken = settings?.continuationToken;
98
+ if (!continuationToken) {
99
+ result = await this._listByBillingProfile(billingAccountName, billingProfileName, 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._listByBillingProfileNext(billingAccountName, billingProfileName, continuationToken, options);
107
+ continuationToken = result.nextLink;
108
+ let page = result.value || [];
109
+ setContinuationToken(page, continuationToken);
110
+ yield page;
111
+ }
131
112
  }
132
- listByBillingProfilePagingAll(billingAccountName, billingProfileName, options) {
133
- return __asyncGenerator(this, arguments, function* listByBillingProfilePagingAll_1() {
134
- var _a, e_2, _b, _c;
135
- try {
136
- for (var _d = true, _e = __asyncValues(this.listByBillingProfilePagingPage(billingAccountName, billingProfileName, 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 *listByBillingProfilePagingAll(billingAccountName, billingProfileName, options) {
114
+ for await (const page of this.listByBillingProfilePagingPage(billingAccountName, billingProfileName, options)) {
115
+ yield* page;
116
+ }
151
117
  }
152
118
  /**
153
119
  * List Reservations within a single ReservationOrder in the billing account.
@@ -165,52 +131,35 @@ export class ReservationsImpl {
165
131
  return this;
166
132
  },
167
133
  byPage: (settings) => {
168
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
134
+ if (settings?.maxPageSize) {
169
135
  throw new Error("maxPageSize is not supported by this operation.");
170
136
  }
171
137
  return this.listByReservationOrderPagingPage(billingAccountName, reservationOrderId, options, settings);
172
138
  },
173
139
  };
174
140
  }
175
- listByReservationOrderPagingPage(billingAccountName, reservationOrderId, options, settings) {
176
- return __asyncGenerator(this, arguments, function* listByReservationOrderPagingPage_1() {
177
- let result;
178
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
179
- if (!continuationToken) {
180
- result = yield __await(this._listByReservationOrder(billingAccountName, reservationOrderId, options));
181
- let page = result.value || [];
182
- continuationToken = result.nextLink;
183
- setContinuationToken(page, continuationToken);
184
- yield yield __await(page);
185
- }
186
- while (continuationToken) {
187
- result = yield __await(this._listByReservationOrderNext(billingAccountName, reservationOrderId, continuationToken, options));
188
- continuationToken = result.nextLink;
189
- let page = result.value || [];
190
- setContinuationToken(page, continuationToken);
191
- yield yield __await(page);
192
- }
193
- });
141
+ async *listByReservationOrderPagingPage(billingAccountName, reservationOrderId, options, settings) {
142
+ let result;
143
+ let continuationToken = settings?.continuationToken;
144
+ if (!continuationToken) {
145
+ result = await this._listByReservationOrder(billingAccountName, reservationOrderId, options);
146
+ let page = result.value || [];
147
+ continuationToken = result.nextLink;
148
+ setContinuationToken(page, continuationToken);
149
+ yield page;
150
+ }
151
+ while (continuationToken) {
152
+ result = await this._listByReservationOrderNext(billingAccountName, reservationOrderId, continuationToken, options);
153
+ continuationToken = result.nextLink;
154
+ let page = result.value || [];
155
+ setContinuationToken(page, continuationToken);
156
+ yield page;
157
+ }
194
158
  }
195
- listByReservationOrderPagingAll(billingAccountName, reservationOrderId, options) {
196
- return __asyncGenerator(this, arguments, function* listByReservationOrderPagingAll_1() {
197
- var _a, e_3, _b, _c;
198
- try {
199
- for (var _d = true, _e = __asyncValues(this.listByReservationOrderPagingPage(billingAccountName, reservationOrderId, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
200
- _c = _f.value;
201
- _d = false;
202
- const page = _c;
203
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
204
- }
205
- }
206
- catch (e_3_1) { e_3 = { error: e_3_1 }; }
207
- finally {
208
- try {
209
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
210
- }
211
- finally { if (e_3) throw e_3.error; }
212
- }
213
- });
159
+ async *listByReservationOrderPagingAll(billingAccountName, reservationOrderId, options) {
160
+ for await (const page of this.listByReservationOrderPagingPage(billingAccountName, reservationOrderId, options)) {
161
+ yield* page;
162
+ }
214
163
  }
215
164
  /**
216
165
  * Lists the reservations in the billing account and the roll up counts of reservations group by
@@ -254,14 +203,19 @@ export class ReservationsImpl {
254
203
  return this.client.sendOperationRequest(args, spec);
255
204
  };
256
205
  const sendOperationFn = async (args, spec) => {
257
- var _a;
258
206
  let currentRawResponse = undefined;
259
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
207
+ const providedCallback = args.options?.onResponse;
260
208
  const callback = (rawResponse, flatResponse) => {
261
209
  currentRawResponse = rawResponse;
262
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
210
+ providedCallback?.(rawResponse, flatResponse);
211
+ };
212
+ const updatedArgs = {
213
+ ...args,
214
+ options: {
215
+ ...args.options,
216
+ onResponse: callback,
217
+ },
263
218
  };
264
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
265
219
  const flatResponse = await directSendOperation(updatedArgs, spec);
266
220
  return {
267
221
  flatResponse,
@@ -284,8 +238,8 @@ export class ReservationsImpl {
284
238
  spec: updateByBillingAccountOperationSpec,
285
239
  });
286
240
  const poller = await createHttpPoller(lro, {
287
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
288
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
241
+ restoreFrom: options?.resumeFrom,
242
+ intervalInMs: options?.updateIntervalInMs,
289
243
  resourceLocationConfig: "azure-async-operation",
290
244
  });
291
245
  await poller.poll();
@@ -1 +1 @@
1
- {"version":3,"file":"reservations.js","sourceRoot":"","sources":["../../../src/operations/reservations.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAGL,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAsB9C,4CAA4C;AAC5C,gDAAgD;AAChD,MAAM,OAAO,gBAAgB;IAG3B;;;OAGG;IACH,YAAY,MAA+B;QACzC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACI,oBAAoB,CACzB,kBAA0B,EAC1B,OAAwD;QAExD,MAAM,IAAI,GAAG,IAAI,CAAC,6BAA6B,CAC7C,kBAAkB,EAClB,OAAO,CACR,CAAC;QACF,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,8BAA8B,CACxC,kBAAkB,EAClB,OAAO,EACP,QAAQ,CACT,CAAC;YACJ,CAAC;SACF,CAAC;IACJ,CAAC;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AAC,KAAK;QAChB,UAAU,CAAC,kBAAkB;QAC7B,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,kBAAkB;KAC9B;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 { Reservations } 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 { BillingManagementClient } from \"../billingManagementClient.js\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n Reservation,\n ReservationsListByBillingAccountNextOptionalParams,\n ReservationsListByBillingAccountOptionalParams,\n ReservationsListByBillingAccountResponse,\n ReservationsListByBillingProfileNextOptionalParams,\n ReservationsListByBillingProfileOptionalParams,\n ReservationsListByBillingProfileResponse,\n ReservationsListByReservationOrderNextOptionalParams,\n ReservationsListByReservationOrderOptionalParams,\n ReservationsListByReservationOrderResponse,\n ReservationsGetByReservationOrderOptionalParams,\n ReservationsGetByReservationOrderResponse,\n Patch,\n ReservationsUpdateByBillingAccountOptionalParams,\n ReservationsUpdateByBillingAccountResponse,\n ReservationsListByBillingAccountNextResponse,\n ReservationsListByBillingProfileNextResponse,\n ReservationsListByReservationOrderNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Reservations operations. */\nexport class ReservationsImpl implements Reservations {\n private readonly client: BillingManagementClient;\n\n /**\n * Initialize a new instance of the class Reservations class.\n * @param client Reference to the service client\n */\n constructor(client: BillingManagementClient) {\n this.client = client;\n }\n\n /**\n * Lists the reservations in the billing account and the roll up counts of reservations group by\n * provisioning states.\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param options The options parameters.\n */\n public listByBillingAccount(\n billingAccountName: string,\n options?: ReservationsListByBillingAccountOptionalParams,\n ): PagedAsyncIterableIterator<Reservation> {\n const iter = this.listByBillingAccountPagingAll(\n billingAccountName,\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.listByBillingAccountPagingPage(\n billingAccountName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listByBillingAccountPagingPage(\n billingAccountName: string,\n options?: ReservationsListByBillingAccountOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<Reservation[]> {\n let result: ReservationsListByBillingAccountResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByBillingAccount(billingAccountName, 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 billingAccountName,\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 billingAccountName: string,\n options?: ReservationsListByBillingAccountOptionalParams,\n ): AsyncIterableIterator<Reservation> {\n for await (const page of this.listByBillingAccountPagingPage(\n billingAccountName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Lists the reservations for a billing profile and the roll up counts of reservations group by\n * provisioning state.\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param billingProfileName The ID that uniquely identifies a billing profile.\n * @param options The options parameters.\n */\n public listByBillingProfile(\n billingAccountName: string,\n billingProfileName: string,\n options?: ReservationsListByBillingProfileOptionalParams,\n ): PagedAsyncIterableIterator<Reservation> {\n const iter = this.listByBillingProfilePagingAll(\n billingAccountName,\n billingProfileName,\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 billingAccountName,\n billingProfileName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listByBillingProfilePagingPage(\n billingAccountName: string,\n billingProfileName: string,\n options?: ReservationsListByBillingProfileOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<Reservation[]> {\n let result: ReservationsListByBillingProfileResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByBillingProfile(\n billingAccountName,\n billingProfileName,\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 billingAccountName,\n billingProfileName,\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 billingAccountName: string,\n billingProfileName: string,\n options?: ReservationsListByBillingProfileOptionalParams,\n ): AsyncIterableIterator<Reservation> {\n for await (const page of this.listByBillingProfilePagingPage(\n billingAccountName,\n billingProfileName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * List Reservations within a single ReservationOrder in the billing account.\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param reservationOrderId Order Id of the reservation\n * @param options The options parameters.\n */\n public listByReservationOrder(\n billingAccountName: string,\n reservationOrderId: string,\n options?: ReservationsListByReservationOrderOptionalParams,\n ): PagedAsyncIterableIterator<Reservation> {\n const iter = this.listByReservationOrderPagingAll(\n billingAccountName,\n reservationOrderId,\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.listByReservationOrderPagingPage(\n billingAccountName,\n reservationOrderId,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listByReservationOrderPagingPage(\n billingAccountName: string,\n reservationOrderId: string,\n options?: ReservationsListByReservationOrderOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<Reservation[]> {\n let result: ReservationsListByReservationOrderResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByReservationOrder(\n billingAccountName,\n reservationOrderId,\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._listByReservationOrderNext(\n billingAccountName,\n reservationOrderId,\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 *listByReservationOrderPagingAll(\n billingAccountName: string,\n reservationOrderId: string,\n options?: ReservationsListByReservationOrderOptionalParams,\n ): AsyncIterableIterator<Reservation> {\n for await (const page of this.listByReservationOrderPagingPage(\n billingAccountName,\n reservationOrderId,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Lists the reservations in the billing account and the roll up counts of reservations group by\n * provisioning states.\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param options The options parameters.\n */\n private _listByBillingAccount(\n billingAccountName: string,\n options?: ReservationsListByBillingAccountOptionalParams,\n ): Promise<ReservationsListByBillingAccountResponse> {\n return this.client.sendOperationRequest(\n { billingAccountName, options },\n listByBillingAccountOperationSpec,\n );\n }\n\n /**\n * Lists the reservations for a billing profile and the roll up counts of reservations group by\n * provisioning state.\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param billingProfileName The ID that uniquely identifies a billing profile.\n * @param options The options parameters.\n */\n private _listByBillingProfile(\n billingAccountName: string,\n billingProfileName: string,\n options?: ReservationsListByBillingProfileOptionalParams,\n ): Promise<ReservationsListByBillingProfileResponse> {\n return this.client.sendOperationRequest(\n { billingAccountName, billingProfileName, options },\n listByBillingProfileOperationSpec,\n );\n }\n\n /**\n * Get specific Reservation details in the billing account.\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param reservationOrderId Order Id of the reservation\n * @param reservationId Id of the reservation item\n * @param options The options parameters.\n */\n getByReservationOrder(\n billingAccountName: string,\n reservationOrderId: string,\n reservationId: string,\n options?: ReservationsGetByReservationOrderOptionalParams,\n ): Promise<ReservationsGetByReservationOrderResponse> {\n return this.client.sendOperationRequest(\n { billingAccountName, reservationOrderId, reservationId, options },\n getByReservationOrderOperationSpec,\n );\n }\n\n /**\n * Update reservation by billing account.\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param reservationOrderId Order Id of the reservation\n * @param reservationId Id of the reservation item\n * @param body Request body for patching a reservation\n * @param options The options parameters.\n */\n async beginUpdateByBillingAccount(\n billingAccountName: string,\n reservationOrderId: string,\n reservationId: string,\n body: Patch,\n options?: ReservationsUpdateByBillingAccountOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<ReservationsUpdateByBillingAccountResponse>,\n ReservationsUpdateByBillingAccountResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<ReservationsUpdateByBillingAccountResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: {\n billingAccountName,\n reservationOrderId,\n reservationId,\n body,\n options,\n },\n spec: updateByBillingAccountOperationSpec,\n });\n const poller = await createHttpPoller<\n ReservationsUpdateByBillingAccountResponse,\n OperationState<ReservationsUpdateByBillingAccountResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"azure-async-operation\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Update reservation by billing account.\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param reservationOrderId Order Id of the reservation\n * @param reservationId Id of the reservation item\n * @param body Request body for patching a reservation\n * @param options The options parameters.\n */\n async beginUpdateByBillingAccountAndWait(\n billingAccountName: string,\n reservationOrderId: string,\n reservationId: string,\n body: Patch,\n options?: ReservationsUpdateByBillingAccountOptionalParams,\n ): Promise<ReservationsUpdateByBillingAccountResponse> {\n const poller = await this.beginUpdateByBillingAccount(\n billingAccountName,\n reservationOrderId,\n reservationId,\n body,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * List Reservations within a single ReservationOrder in the billing account.\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param reservationOrderId Order Id of the reservation\n * @param options The options parameters.\n */\n private _listByReservationOrder(\n billingAccountName: string,\n reservationOrderId: string,\n options?: ReservationsListByReservationOrderOptionalParams,\n ): Promise<ReservationsListByReservationOrderResponse> {\n return this.client.sendOperationRequest(\n { billingAccountName, reservationOrderId, options },\n listByReservationOrderOperationSpec,\n );\n }\n\n /**\n * ListByBillingAccountNext\n * @param billingAccountName The ID that uniquely identifies a billing account.\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 billingAccountName: string,\n nextLink: string,\n options?: ReservationsListByBillingAccountNextOptionalParams,\n ): Promise<ReservationsListByBillingAccountNextResponse> {\n return this.client.sendOperationRequest(\n { billingAccountName, nextLink, options },\n listByBillingAccountNextOperationSpec,\n );\n }\n\n /**\n * ListByBillingProfileNext\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param billingProfileName The ID that uniquely identifies a billing profile.\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 billingAccountName: string,\n billingProfileName: string,\n nextLink: string,\n options?: ReservationsListByBillingProfileNextOptionalParams,\n ): Promise<ReservationsListByBillingProfileNextResponse> {\n return this.client.sendOperationRequest(\n { billingAccountName, billingProfileName, nextLink, options },\n listByBillingProfileNextOperationSpec,\n );\n }\n\n /**\n * ListByReservationOrderNext\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param reservationOrderId Order Id of the reservation\n * @param nextLink The nextLink from the previous successful call to the ListByReservationOrder method.\n * @param options The options parameters.\n */\n private _listByReservationOrderNext(\n billingAccountName: string,\n reservationOrderId: string,\n nextLink: string,\n options?: ReservationsListByReservationOrderNextOptionalParams,\n ): Promise<ReservationsListByReservationOrderNextResponse> {\n return this.client.sendOperationRequest(\n { billingAccountName, reservationOrderId, nextLink, options },\n listByReservationOrderNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listByBillingAccountOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/reservations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ReservationsListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [\n Parameters.apiVersion,\n Parameters.filter,\n Parameters.orderBy,\n Parameters.skiptoken,\n Parameters.take,\n Parameters.selectedState,\n Parameters.refreshSummary,\n ],\n urlParameters: [Parameters.$host, Parameters.billingAccountName],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByBillingProfileOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/reservations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ReservationsListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [\n Parameters.apiVersion,\n Parameters.filter,\n Parameters.orderBy,\n Parameters.skiptoken,\n Parameters.take,\n Parameters.selectedState,\n Parameters.refreshSummary,\n ],\n urlParameters: [\n Parameters.$host,\n Parameters.billingAccountName,\n Parameters.billingProfileName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getByReservationOrderOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/reservationOrders/{reservationOrderId}/reservations/{reservationId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Reservation,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion, Parameters.expand],\n urlParameters: [\n Parameters.$host,\n Parameters.billingAccountName,\n Parameters.reservationOrderId,\n Parameters.reservationId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst updateByBillingAccountOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/reservationOrders/{reservationOrderId}/reservations/{reservationId}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.Reservation,\n },\n 201: {\n bodyMapper: Mappers.Reservation,\n },\n 202: {\n bodyMapper: Mappers.Reservation,\n },\n 204: {\n bodyMapper: Mappers.Reservation,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.body2,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.billingAccountName,\n Parameters.reservationOrderId,\n Parameters.reservationId,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst listByReservationOrderOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/reservationOrders/{reservationOrderId}/reservations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ReservationList,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.billingAccountName,\n Parameters.reservationOrderId,\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.ReservationsListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.billingAccountName,\n Parameters.nextLink,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByBillingProfileNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ReservationsListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.billingAccountName,\n Parameters.nextLink,\n Parameters.billingProfileName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByReservationOrderNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ReservationList,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.billingAccountName,\n Parameters.nextLink,\n Parameters.reservationOrderId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
1
+ {"version":3,"file":"reservations.js","sourceRoot":"","sources":["../../../src/operations/reservations.ts"],"names":[],"mappings":"AAAA;;;;;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AU,CAAC,KAAK;QAChB,UAAU,CAAC,kBAAkB;QAC7B,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,kBAAkB;KAC9B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,uCAAuC,GAA6B;IACxE,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,eAAe;SACpC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,kBAAkB;QAC7B,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,kBAAkB;KAC9B;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 { Reservations } 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 { BillingManagementClient } from \"../billingManagementClient.js\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n Reservation,\n ReservationsListByBillingAccountNextOptionalParams,\n ReservationsListByBillingAccountOptionalParams,\n ReservationsListByBillingAccountResponse,\n ReservationsListByBillingProfileNextOptionalParams,\n ReservationsListByBillingProfileOptionalParams,\n ReservationsListByBillingProfileResponse,\n ReservationsListByReservationOrderNextOptionalParams,\n ReservationsListByReservationOrderOptionalParams,\n ReservationsListByReservationOrderResponse,\n ReservationsGetByReservationOrderOptionalParams,\n ReservationsGetByReservationOrderResponse,\n Patch,\n ReservationsUpdateByBillingAccountOptionalParams,\n ReservationsUpdateByBillingAccountResponse,\n ReservationsListByBillingAccountNextResponse,\n ReservationsListByBillingProfileNextResponse,\n ReservationsListByReservationOrderNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Reservations operations. */\nexport class ReservationsImpl implements Reservations {\n private readonly client: BillingManagementClient;\n\n /**\n * Initialize a new instance of the class Reservations class.\n * @param client Reference to the service client\n */\n constructor(client: BillingManagementClient) {\n this.client = client;\n }\n\n /**\n * Lists the reservations in the billing account and the roll up counts of reservations group by\n * provisioning states.\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param options The options parameters.\n */\n public listByBillingAccount(\n billingAccountName: string,\n options?: ReservationsListByBillingAccountOptionalParams,\n ): PagedAsyncIterableIterator<Reservation> {\n const iter = this.listByBillingAccountPagingAll(\n billingAccountName,\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.listByBillingAccountPagingPage(\n billingAccountName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listByBillingAccountPagingPage(\n billingAccountName: string,\n options?: ReservationsListByBillingAccountOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<Reservation[]> {\n let result: ReservationsListByBillingAccountResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByBillingAccount(billingAccountName, 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 billingAccountName,\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 billingAccountName: string,\n options?: ReservationsListByBillingAccountOptionalParams,\n ): AsyncIterableIterator<Reservation> {\n for await (const page of this.listByBillingAccountPagingPage(\n billingAccountName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Lists the reservations for a billing profile and the roll up counts of reservations group by\n * provisioning state.\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param billingProfileName The ID that uniquely identifies a billing profile.\n * @param options The options parameters.\n */\n public listByBillingProfile(\n billingAccountName: string,\n billingProfileName: string,\n options?: ReservationsListByBillingProfileOptionalParams,\n ): PagedAsyncIterableIterator<Reservation> {\n const iter = this.listByBillingProfilePagingAll(\n billingAccountName,\n billingProfileName,\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 billingAccountName,\n billingProfileName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listByBillingProfilePagingPage(\n billingAccountName: string,\n billingProfileName: string,\n options?: ReservationsListByBillingProfileOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<Reservation[]> {\n let result: ReservationsListByBillingProfileResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByBillingProfile(\n billingAccountName,\n billingProfileName,\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 billingAccountName,\n billingProfileName,\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 billingAccountName: string,\n billingProfileName: string,\n options?: ReservationsListByBillingProfileOptionalParams,\n ): AsyncIterableIterator<Reservation> {\n for await (const page of this.listByBillingProfilePagingPage(\n billingAccountName,\n billingProfileName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * List Reservations within a single ReservationOrder in the billing account.\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param reservationOrderId Order Id of the reservation\n * @param options The options parameters.\n */\n public listByReservationOrder(\n billingAccountName: string,\n reservationOrderId: string,\n options?: ReservationsListByReservationOrderOptionalParams,\n ): PagedAsyncIterableIterator<Reservation> {\n const iter = this.listByReservationOrderPagingAll(\n billingAccountName,\n reservationOrderId,\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.listByReservationOrderPagingPage(\n billingAccountName,\n reservationOrderId,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listByReservationOrderPagingPage(\n billingAccountName: string,\n reservationOrderId: string,\n options?: ReservationsListByReservationOrderOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<Reservation[]> {\n let result: ReservationsListByReservationOrderResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByReservationOrder(\n billingAccountName,\n reservationOrderId,\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._listByReservationOrderNext(\n billingAccountName,\n reservationOrderId,\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 *listByReservationOrderPagingAll(\n billingAccountName: string,\n reservationOrderId: string,\n options?: ReservationsListByReservationOrderOptionalParams,\n ): AsyncIterableIterator<Reservation> {\n for await (const page of this.listByReservationOrderPagingPage(\n billingAccountName,\n reservationOrderId,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Lists the reservations in the billing account and the roll up counts of reservations group by\n * provisioning states.\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param options The options parameters.\n */\n private _listByBillingAccount(\n billingAccountName: string,\n options?: ReservationsListByBillingAccountOptionalParams,\n ): Promise<ReservationsListByBillingAccountResponse> {\n return this.client.sendOperationRequest(\n { billingAccountName, options },\n listByBillingAccountOperationSpec,\n );\n }\n\n /**\n * Lists the reservations for a billing profile and the roll up counts of reservations group by\n * provisioning state.\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param billingProfileName The ID that uniquely identifies a billing profile.\n * @param options The options parameters.\n */\n private _listByBillingProfile(\n billingAccountName: string,\n billingProfileName: string,\n options?: ReservationsListByBillingProfileOptionalParams,\n ): Promise<ReservationsListByBillingProfileResponse> {\n return this.client.sendOperationRequest(\n { billingAccountName, billingProfileName, options },\n listByBillingProfileOperationSpec,\n );\n }\n\n /**\n * Get specific Reservation details in the billing account.\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param reservationOrderId Order Id of the reservation\n * @param reservationId Id of the reservation item\n * @param options The options parameters.\n */\n getByReservationOrder(\n billingAccountName: string,\n reservationOrderId: string,\n reservationId: string,\n options?: ReservationsGetByReservationOrderOptionalParams,\n ): Promise<ReservationsGetByReservationOrderResponse> {\n return this.client.sendOperationRequest(\n { billingAccountName, reservationOrderId, reservationId, options },\n getByReservationOrderOperationSpec,\n );\n }\n\n /**\n * Update reservation by billing account.\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param reservationOrderId Order Id of the reservation\n * @param reservationId Id of the reservation item\n * @param body Request body for patching a reservation\n * @param options The options parameters.\n */\n async beginUpdateByBillingAccount(\n billingAccountName: string,\n reservationOrderId: string,\n reservationId: string,\n body: Patch,\n options?: ReservationsUpdateByBillingAccountOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<ReservationsUpdateByBillingAccountResponse>,\n ReservationsUpdateByBillingAccountResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<ReservationsUpdateByBillingAccountResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: {\n billingAccountName,\n reservationOrderId,\n reservationId,\n body,\n options,\n },\n spec: updateByBillingAccountOperationSpec,\n });\n const poller = await createHttpPoller<\n ReservationsUpdateByBillingAccountResponse,\n OperationState<ReservationsUpdateByBillingAccountResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"azure-async-operation\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Update reservation by billing account.\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param reservationOrderId Order Id of the reservation\n * @param reservationId Id of the reservation item\n * @param body Request body for patching a reservation\n * @param options The options parameters.\n */\n async beginUpdateByBillingAccountAndWait(\n billingAccountName: string,\n reservationOrderId: string,\n reservationId: string,\n body: Patch,\n options?: ReservationsUpdateByBillingAccountOptionalParams,\n ): Promise<ReservationsUpdateByBillingAccountResponse> {\n const poller = await this.beginUpdateByBillingAccount(\n billingAccountName,\n reservationOrderId,\n reservationId,\n body,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * List Reservations within a single ReservationOrder in the billing account.\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param reservationOrderId Order Id of the reservation\n * @param options The options parameters.\n */\n private _listByReservationOrder(\n billingAccountName: string,\n reservationOrderId: string,\n options?: ReservationsListByReservationOrderOptionalParams,\n ): Promise<ReservationsListByReservationOrderResponse> {\n return this.client.sendOperationRequest(\n { billingAccountName, reservationOrderId, options },\n listByReservationOrderOperationSpec,\n );\n }\n\n /**\n * ListByBillingAccountNext\n * @param billingAccountName The ID that uniquely identifies a billing account.\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 billingAccountName: string,\n nextLink: string,\n options?: ReservationsListByBillingAccountNextOptionalParams,\n ): Promise<ReservationsListByBillingAccountNextResponse> {\n return this.client.sendOperationRequest(\n { billingAccountName, nextLink, options },\n listByBillingAccountNextOperationSpec,\n );\n }\n\n /**\n * ListByBillingProfileNext\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param billingProfileName The ID that uniquely identifies a billing profile.\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 billingAccountName: string,\n billingProfileName: string,\n nextLink: string,\n options?: ReservationsListByBillingProfileNextOptionalParams,\n ): Promise<ReservationsListByBillingProfileNextResponse> {\n return this.client.sendOperationRequest(\n { billingAccountName, billingProfileName, nextLink, options },\n listByBillingProfileNextOperationSpec,\n );\n }\n\n /**\n * ListByReservationOrderNext\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param reservationOrderId Order Id of the reservation\n * @param nextLink The nextLink from the previous successful call to the ListByReservationOrder method.\n * @param options The options parameters.\n */\n private _listByReservationOrderNext(\n billingAccountName: string,\n reservationOrderId: string,\n nextLink: string,\n options?: ReservationsListByReservationOrderNextOptionalParams,\n ): Promise<ReservationsListByReservationOrderNextResponse> {\n return this.client.sendOperationRequest(\n { billingAccountName, reservationOrderId, nextLink, options },\n listByReservationOrderNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listByBillingAccountOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/reservations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ReservationsListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [\n Parameters.apiVersion,\n Parameters.filter,\n Parameters.orderBy,\n Parameters.skiptoken,\n Parameters.take,\n Parameters.selectedState,\n Parameters.refreshSummary,\n ],\n urlParameters: [Parameters.$host, Parameters.billingAccountName],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByBillingProfileOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/reservations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ReservationsListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [\n Parameters.apiVersion,\n Parameters.filter,\n Parameters.orderBy,\n Parameters.skiptoken,\n Parameters.take,\n Parameters.selectedState,\n Parameters.refreshSummary,\n ],\n urlParameters: [\n Parameters.$host,\n Parameters.billingAccountName,\n Parameters.billingProfileName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getByReservationOrderOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/reservationOrders/{reservationOrderId}/reservations/{reservationId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Reservation,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion, Parameters.expand],\n urlParameters: [\n Parameters.$host,\n Parameters.billingAccountName,\n Parameters.reservationOrderId,\n Parameters.reservationId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst updateByBillingAccountOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/reservationOrders/{reservationOrderId}/reservations/{reservationId}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.Reservation,\n },\n 201: {\n bodyMapper: Mappers.Reservation,\n },\n 202: {\n bodyMapper: Mappers.Reservation,\n },\n 204: {\n bodyMapper: Mappers.Reservation,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.body2,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.billingAccountName,\n Parameters.reservationOrderId,\n Parameters.reservationId,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst listByReservationOrderOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/reservationOrders/{reservationOrderId}/reservations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ReservationList,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.billingAccountName,\n Parameters.reservationOrderId,\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.ReservationsListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.billingAccountName,\n Parameters.nextLink,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByBillingProfileNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ReservationsListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.billingAccountName,\n Parameters.nextLink,\n Parameters.billingProfileName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByReservationOrderNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ReservationList,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.billingAccountName,\n Parameters.nextLink,\n Parameters.reservationOrderId,\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 SavingsPlanOrders operations. */
15
14
  export class SavingsPlanOrdersImpl {
15
+ client;
16
16
  /**
17
17
  * Initialize a new instance of the class SavingsPlanOrders class.
18
18
  * @param client Reference to the service client
@@ -35,52 +35,35 @@ export class SavingsPlanOrdersImpl {
35
35
  return this;
36
36
  },
37
37
  byPage: (settings) => {
38
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
38
+ if (settings?.maxPageSize) {
39
39
  throw new Error("maxPageSize is not supported by this operation.");
40
40
  }
41
41
  return this.listByBillingAccountPagingPage(billingAccountName, options, settings);
42
42
  },
43
43
  };
44
44
  }
45
- listByBillingAccountPagingPage(billingAccountName, options, settings) {
46
- return __asyncGenerator(this, arguments, function* listByBillingAccountPagingPage_1() {
47
- let result;
48
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
49
- if (!continuationToken) {
50
- result = yield __await(this._listByBillingAccount(billingAccountName, options));
51
- let page = result.value || [];
52
- continuationToken = result.nextLink;
53
- setContinuationToken(page, continuationToken);
54
- yield yield __await(page);
55
- }
56
- while (continuationToken) {
57
- result = yield __await(this._listByBillingAccountNext(billingAccountName, continuationToken, options));
58
- continuationToken = result.nextLink;
59
- let page = result.value || [];
60
- setContinuationToken(page, continuationToken);
61
- yield yield __await(page);
62
- }
63
- });
45
+ async *listByBillingAccountPagingPage(billingAccountName, options, settings) {
46
+ let result;
47
+ let continuationToken = settings?.continuationToken;
48
+ if (!continuationToken) {
49
+ result = await this._listByBillingAccount(billingAccountName, options);
50
+ let page = result.value || [];
51
+ continuationToken = result.nextLink;
52
+ setContinuationToken(page, continuationToken);
53
+ yield page;
54
+ }
55
+ while (continuationToken) {
56
+ result = await this._listByBillingAccountNext(billingAccountName, continuationToken, options);
57
+ continuationToken = result.nextLink;
58
+ let page = result.value || [];
59
+ setContinuationToken(page, continuationToken);
60
+ yield page;
61
+ }
64
62
  }
65
- listByBillingAccountPagingAll(billingAccountName, options) {
66
- return __asyncGenerator(this, arguments, function* listByBillingAccountPagingAll_1() {
67
- var _a, e_1, _b, _c;
68
- try {
69
- for (var _d = true, _e = __asyncValues(this.listByBillingAccountPagingPage(billingAccountName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
70
- _c = _f.value;
71
- _d = false;
72
- const page = _c;
73
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
74
- }
75
- }
76
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
77
- finally {
78
- try {
79
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
80
- }
81
- finally { if (e_1) throw e_1.error; }
82
- }
83
- });
63
+ async *listByBillingAccountPagingAll(billingAccountName, options) {
64
+ for await (const page of this.listByBillingAccountPagingPage(billingAccountName, options)) {
65
+ yield* page;
66
+ }
84
67
  }
85
68
  /**
86
69
  * Get a savings plan order by billing account.
@@ -1 +1 @@
1
- {"version":3,"file":"savingsPlanOrders.js","sourceRoot":"","s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ACrB;IACD,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,kBAAkB,CAAC;IAChE,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,yBAAyB;SAC9C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,kBAAkB;QAC7B,UAAU,CAAC,QAAQ;KACpB;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 { SavingsPlanOrders } 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 { BillingManagementClient } from \"../billingManagementClient.js\";\nimport {\n SavingsPlanOrderModel,\n SavingsPlanOrdersListByBillingAccountNextOptionalParams,\n SavingsPlanOrdersListByBillingAccountOptionalParams,\n SavingsPlanOrdersListByBillingAccountResponse,\n SavingsPlanOrdersGetByBillingAccountOptionalParams,\n SavingsPlanOrdersGetByBillingAccountResponse,\n SavingsPlanOrdersListByBillingAccountNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing SavingsPlanOrders operations. */\nexport class SavingsPlanOrdersImpl implements SavingsPlanOrders {\n private readonly client: BillingManagementClient;\n\n /**\n * Initialize a new instance of the class SavingsPlanOrders class.\n * @param client Reference to the service client\n */\n constructor(client: BillingManagementClient) {\n this.client = client;\n }\n\n /**\n * List all Savings plan orders by billing account.\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param options The options parameters.\n */\n public listByBillingAccount(\n billingAccountName: string,\n options?: SavingsPlanOrdersListByBillingAccountOptionalParams,\n ): PagedAsyncIterableIterator<SavingsPlanOrderModel> {\n const iter = this.listByBillingAccountPagingAll(\n billingAccountName,\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.listByBillingAccountPagingPage(\n billingAccountName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listByBillingAccountPagingPage(\n billingAccountName: string,\n options?: SavingsPlanOrdersListByBillingAccountOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<SavingsPlanOrderModel[]> {\n let result: SavingsPlanOrdersListByBillingAccountResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByBillingAccount(billingAccountName, 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 billingAccountName,\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 billingAccountName: string,\n options?: SavingsPlanOrdersListByBillingAccountOptionalParams,\n ): AsyncIterableIterator<SavingsPlanOrderModel> {\n for await (const page of this.listByBillingAccountPagingPage(\n billingAccountName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Get a savings plan order by billing account.\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param savingsPlanOrderId Order ID of the savings plan\n * @param options The options parameters.\n */\n getByBillingAccount(\n billingAccountName: string,\n savingsPlanOrderId: string,\n options?: SavingsPlanOrdersGetByBillingAccountOptionalParams,\n ): Promise<SavingsPlanOrdersGetByBillingAccountResponse> {\n return this.client.sendOperationRequest(\n { billingAccountName, savingsPlanOrderId, options },\n getByBillingAccountOperationSpec,\n );\n }\n\n /**\n * List all Savings plan orders by billing account.\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param options The options parameters.\n */\n private _listByBillingAccount(\n billingAccountName: string,\n options?: SavingsPlanOrdersListByBillingAccountOptionalParams,\n ): Promise<SavingsPlanOrdersListByBillingAccountResponse> {\n return this.client.sendOperationRequest(\n { billingAccountName, options },\n listByBillingAccountOperationSpec,\n );\n }\n\n /**\n * ListByBillingAccountNext\n * @param billingAccountName The ID that uniquely identifies a billing account.\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 billingAccountName: string,\n nextLink: string,\n options?: SavingsPlanOrdersListByBillingAccountNextOptionalParams,\n ): Promise<SavingsPlanOrdersListByBillingAccountNextResponse> {\n return this.client.sendOperationRequest(\n { billingAccountName, nextLink, options },\n listByBillingAccountNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getByBillingAccountOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/savingsPlanOrders/{savingsPlanOrderId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SavingsPlanOrderModel,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion, Parameters.expand],\n urlParameters: [\n Parameters.$host,\n Parameters.billingAccountName,\n Parameters.savingsPlanOrderId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByBillingAccountOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/savingsPlanOrders\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SavingsPlanOrderModelList,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [\n Parameters.apiVersion,\n Parameters.filter,\n Parameters.orderBy,\n Parameters.skiptoken,\n ],\n urlParameters: [Parameters.$host, Parameters.billingAccountName],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByBillingAccountNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SavingsPlanOrderModelList,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.billingAccountName,\n Parameters.nextLink,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
1
+ {"version":3,"file":"savingsPlanOrders.js","sourceRoot":"","sources":["../../../src/operations/savingsPlanOrders.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;AAYtD,4CAA4C;AAC5C,qDAAqD;AACrD,MAAM,OAAO,qBAAqB;IACf,MAAM,CAA0B;IAEjD;;;OAGG;IACH,YAAY,MAA+B;QACzC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACI,oBAAoB,CACzB,kBAA0B,EAC1B,OAA6D;QAE7D,MAAM,IAAI,GAAG,IAAI,CAAC,6BAA6B,CAC7C,kBAAkB,EAClB,OAAO,CACR,CAAC;QACF,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,M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kB;KAC9B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,iCAAiC,GAA6B;IAClE,IAAI,EAAE,qFAAqF;IAC3F,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,yBAAyB;SAC9C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE;QACf,UAAU,CAAC,UAAU;QACrB,UAAU,CAAC,MAAM;QACjB,UAAU,CAAC,OAAO;QAClB,UAAU,CAAC,SAAS;KACrB;IACD,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,kBAAkB,CAAC;IAChE,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,yBAAyB;SAC9C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,kBAAkB;QAC7B,UAAU,CAAC,QAAQ;KACpB;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 { SavingsPlanOrders } 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 { BillingManagementClient } from \"../billingManagementClient.js\";\nimport {\n SavingsPlanOrderModel,\n SavingsPlanOrdersListByBillingAccountNextOptionalParams,\n SavingsPlanOrdersListByBillingAccountOptionalParams,\n SavingsPlanOrdersListByBillingAccountResponse,\n SavingsPlanOrdersGetByBillingAccountOptionalParams,\n SavingsPlanOrdersGetByBillingAccountResponse,\n SavingsPlanOrdersListByBillingAccountNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing SavingsPlanOrders operations. */\nexport class SavingsPlanOrdersImpl implements SavingsPlanOrders {\n private readonly client: BillingManagementClient;\n\n /**\n * Initialize a new instance of the class SavingsPlanOrders class.\n * @param client Reference to the service client\n */\n constructor(client: BillingManagementClient) {\n this.client = client;\n }\n\n /**\n * List all Savings plan orders by billing account.\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param options The options parameters.\n */\n public listByBillingAccount(\n billingAccountName: string,\n options?: SavingsPlanOrdersListByBillingAccountOptionalParams,\n ): PagedAsyncIterableIterator<SavingsPlanOrderModel> {\n const iter = this.listByBillingAccountPagingAll(\n billingAccountName,\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.listByBillingAccountPagingPage(\n billingAccountName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listByBillingAccountPagingPage(\n billingAccountName: string,\n options?: SavingsPlanOrdersListByBillingAccountOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<SavingsPlanOrderModel[]> {\n let result: SavingsPlanOrdersListByBillingAccountResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByBillingAccount(billingAccountName, 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 billingAccountName,\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 billingAccountName: string,\n options?: SavingsPlanOrdersListByBillingAccountOptionalParams,\n ): AsyncIterableIterator<SavingsPlanOrderModel> {\n for await (const page of this.listByBillingAccountPagingPage(\n billingAccountName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Get a savings plan order by billing account.\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param savingsPlanOrderId Order ID of the savings plan\n * @param options The options parameters.\n */\n getByBillingAccount(\n billingAccountName: string,\n savingsPlanOrderId: string,\n options?: SavingsPlanOrdersGetByBillingAccountOptionalParams,\n ): Promise<SavingsPlanOrdersGetByBillingAccountResponse> {\n return this.client.sendOperationRequest(\n { billingAccountName, savingsPlanOrderId, options },\n getByBillingAccountOperationSpec,\n );\n }\n\n /**\n * List all Savings plan orders by billing account.\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param options The options parameters.\n */\n private _listByBillingAccount(\n billingAccountName: string,\n options?: SavingsPlanOrdersListByBillingAccountOptionalParams,\n ): Promise<SavingsPlanOrdersListByBillingAccountResponse> {\n return this.client.sendOperationRequest(\n { billingAccountName, options },\n listByBillingAccountOperationSpec,\n );\n }\n\n /**\n * ListByBillingAccountNext\n * @param billingAccountName The ID that uniquely identifies a billing account.\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 billingAccountName: string,\n nextLink: string,\n options?: SavingsPlanOrdersListByBillingAccountNextOptionalParams,\n ): Promise<SavingsPlanOrdersListByBillingAccountNextResponse> {\n return this.client.sendOperationRequest(\n { billingAccountName, nextLink, options },\n listByBillingAccountNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getByBillingAccountOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/savingsPlanOrders/{savingsPlanOrderId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SavingsPlanOrderModel,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion, Parameters.expand],\n urlParameters: [\n Parameters.$host,\n Parameters.billingAccountName,\n Parameters.savingsPlanOrderId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByBillingAccountOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/savingsPlanOrders\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SavingsPlanOrderModelList,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [\n Parameters.apiVersion,\n Parameters.filter,\n Parameters.orderBy,\n Parameters.skiptoken,\n ],\n urlParameters: [Parameters.$host, Parameters.billingAccountName],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByBillingAccountNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SavingsPlanOrderModelList,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.billingAccountName,\n Parameters.nextLink,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}