@azure/arm-billing 5.0.1-alpha.20250619.1 → 5.0.1-alpha.20250730.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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 Invoices operations. */
17
16
  export class InvoicesImpl {
17
+ client;
18
18
  /**
19
19
  * Initialize a new instance of the class Invoices class.
20
20
  * @param client Reference to the service client
@@ -40,52 +40,35 @@ export class InvoicesImpl {
40
40
  return this;
41
41
  },
42
42
  byPage: (settings) => {
43
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
43
+ if (settings?.maxPageSize) {
44
44
  throw new Error("maxPageSize is not supported by this operation.");
45
45
  }
46
46
  return this.listByBillingProfilePagingPage(billingAccountName, billingProfileName, options, settings);
47
47
  },
48
48
  };
49
49
  }
50
- listByBillingProfilePagingPage(billingAccountName, billingProfileName, options, settings) {
51
- return __asyncGenerator(this, arguments, function* listByBillingProfilePagingPage_1() {
52
- let result;
53
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
54
- if (!continuationToken) {
55
- result = yield __await(this._listByBillingProfile(billingAccountName, billingProfileName, options));
56
- let page = result.value || [];
57
- continuationToken = result.nextLink;
58
- setContinuationToken(page, continuationToken);
59
- yield yield __await(page);
60
- }
61
- while (continuationToken) {
62
- result = yield __await(this._listByBillingProfileNext(billingAccountName, billingProfileName, continuationToken, options));
63
- continuationToken = result.nextLink;
64
- let page = result.value || [];
65
- setContinuationToken(page, continuationToken);
66
- yield yield __await(page);
67
- }
68
- });
50
+ async *listByBillingProfilePagingPage(billingAccountName, billingProfileName, options, settings) {
51
+ let result;
52
+ let continuationToken = settings?.continuationToken;
53
+ if (!continuationToken) {
54
+ result = await this._listByBillingProfile(billingAccountName, billingProfileName, options);
55
+ let page = result.value || [];
56
+ continuationToken = result.nextLink;
57
+ setContinuationToken(page, continuationToken);
58
+ yield page;
59
+ }
60
+ while (continuationToken) {
61
+ result = await this._listByBillingProfileNext(billingAccountName, billingProfileName, continuationToken, options);
62
+ continuationToken = result.nextLink;
63
+ let page = result.value || [];
64
+ setContinuationToken(page, continuationToken);
65
+ yield page;
66
+ }
69
67
  }
70
- listByBillingProfilePagingAll(billingAccountName, billingProfileName, options) {
71
- return __asyncGenerator(this, arguments, function* listByBillingProfilePagingAll_1() {
72
- var _a, e_1, _b, _c;
73
- try {
74
- for (var _d = true, _e = __asyncValues(this.listByBillingProfilePagingPage(billingAccountName, billingProfileName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
75
- _c = _f.value;
76
- _d = false;
77
- const page = _c;
78
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
79
- }
80
- }
81
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
82
- finally {
83
- try {
84
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
85
- }
86
- finally { if (e_1) throw e_1.error; }
87
- }
88
- });
68
+ async *listByBillingProfilePagingAll(billingAccountName, billingProfileName, options) {
69
+ for await (const page of this.listByBillingProfilePagingPage(billingAccountName, billingProfileName, options)) {
70
+ yield* page;
71
+ }
89
72
  }
90
73
  /**
91
74
  * Lists the invoices for a billing account for a given start date and end date. The operation is
@@ -103,52 +86,35 @@ export class InvoicesImpl {
103
86
  return this;
104
87
  },
105
88
  byPage: (settings) => {
106
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
89
+ if (settings?.maxPageSize) {
107
90
  throw new Error("maxPageSize is not supported by this operation.");
108
91
  }
109
92
  return this.listByBillingAccountPagingPage(billingAccountName, options, settings);
110
93
  },
111
94
  };
112
95
  }
113
- listByBillingAccountPagingPage(billingAccountName, options, settings) {
114
- return __asyncGenerator(this, arguments, function* listByBillingAccountPagingPage_1() {
115
- let result;
116
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
117
- if (!continuationToken) {
118
- result = yield __await(this._listByBillingAccount(billingAccountName, options));
119
- let page = result.value || [];
120
- continuationToken = result.nextLink;
121
- setContinuationToken(page, continuationToken);
122
- yield yield __await(page);
123
- }
124
- while (continuationToken) {
125
- result = yield __await(this._listByBillingAccountNext(billingAccountName, continuationToken, options));
126
- continuationToken = result.nextLink;
127
- let page = result.value || [];
128
- setContinuationToken(page, continuationToken);
129
- yield yield __await(page);
130
- }
131
- });
96
+ async *listByBillingAccountPagingPage(billingAccountName, options, settings) {
97
+ let result;
98
+ let continuationToken = settings?.continuationToken;
99
+ if (!continuationToken) {
100
+ result = await this._listByBillingAccount(billingAccountName, options);
101
+ let page = result.value || [];
102
+ continuationToken = result.nextLink;
103
+ setContinuationToken(page, continuationToken);
104
+ yield page;
105
+ }
106
+ while (continuationToken) {
107
+ result = await this._listByBillingAccountNext(billingAccountName, continuationToken, options);
108
+ continuationToken = result.nextLink;
109
+ let page = result.value || [];
110
+ setContinuationToken(page, continuationToken);
111
+ yield page;
112
+ }
132
113
  }
133
- listByBillingAccountPagingAll(billingAccountName, options) {
134
- return __asyncGenerator(this, arguments, function* listByBillingAccountPagingAll_1() {
135
- var _a, e_2, _b, _c;
136
- try {
137
- for (var _d = true, _e = __asyncValues(this.listByBillingAccountPagingPage(billingAccountName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
138
- _c = _f.value;
139
- _d = false;
140
- const page = _c;
141
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
142
- }
143
- }
144
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
145
- finally {
146
- try {
147
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
148
- }
149
- finally { if (e_2) throw e_2.error; }
150
- }
151
- });
114
+ async *listByBillingAccountPagingAll(billingAccountName, options) {
115
+ for await (const page of this.listByBillingAccountPagingPage(billingAccountName, options)) {
116
+ yield* page;
117
+ }
152
118
  }
153
119
  /**
154
120
  * Lists the invoices for a subscription. The operation is supported for billing accounts with
@@ -165,52 +131,35 @@ export class InvoicesImpl {
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.listByBillingSubscriptionPagingPage(options, settings);
172
138
  },
173
139
  };
174
140
  }
175
- listByBillingSubscriptionPagingPage(options, settings) {
176
- return __asyncGenerator(this, arguments, function* listByBillingSubscriptionPagingPage_1() {
177
- let result;
178
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
179
- if (!continuationToken) {
180
- result = yield __await(this._listByBillingSubscription(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._listByBillingSubscriptionNext(continuationToken, options));
188
- continuationToken = result.nextLink;
189
- let page = result.value || [];
190
- setContinuationToken(page, continuationToken);
191
- yield yield __await(page);
192
- }
193
- });
141
+ async *listByBillingSubscriptionPagingPage(options, settings) {
142
+ let result;
143
+ let continuationToken = settings?.continuationToken;
144
+ if (!continuationToken) {
145
+ result = await this._listByBillingSubscription(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._listByBillingSubscriptionNext(continuationToken, options);
153
+ continuationToken = result.nextLink;
154
+ let page = result.value || [];
155
+ setContinuationToken(page, continuationToken);
156
+ yield page;
157
+ }
194
158
  }
195
- listByBillingSubscriptionPagingAll(options) {
196
- return __asyncGenerator(this, arguments, function* listByBillingSubscriptionPagingAll_1() {
197
- var _a, e_3, _b, _c;
198
- try {
199
- for (var _d = true, _e = __asyncValues(this.listByBillingSubscriptionPagingPage(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 *listByBillingSubscriptionPagingAll(options) {
160
+ for await (const page of this.listByBillingSubscriptionPagingPage(options)) {
161
+ yield* page;
162
+ }
214
163
  }
215
164
  /**
216
165
  * Lists the invoices for a billing profile for a given start date and end date. The operation is
@@ -236,14 +185,19 @@ export class InvoicesImpl {
236
185
  return this.client.sendOperationRequest(args, spec);
237
186
  };
238
187
  const sendOperationFn = async (args, spec) => {
239
- var _a;
240
188
  let currentRawResponse = undefined;
241
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
189
+ const providedCallback = args.options?.onResponse;
242
190
  const callback = (rawResponse, flatResponse) => {
243
191
  currentRawResponse = rawResponse;
244
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
192
+ providedCallback?.(rawResponse, flatResponse);
193
+ };
194
+ const updatedArgs = {
195
+ ...args,
196
+ options: {
197
+ ...args.options,
198
+ onResponse: callback,
199
+ },
245
200
  };
246
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
247
201
  const flatResponse = await directSendOperation(updatedArgs, spec);
248
202
  return {
249
203
  flatResponse,
@@ -260,8 +214,8 @@ export class InvoicesImpl {
260
214
  spec: downloadDocumentsByBillingAccountOperationSpec,
261
215
  });
262
216
  const poller = await createHttpPoller(lro, {
263
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
264
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
217
+ restoreFrom: options?.resumeFrom,
218
+ intervalInMs: options?.updateIntervalInMs,
265
219
  resourceLocationConfig: "location",
266
220
  });
267
221
  await poller.poll();
@@ -291,14 +245,19 @@ export class InvoicesImpl {
291
245
  return this.client.sendOperationRequest(args, spec);
292
246
  };
293
247
  const sendOperationFn = async (args, spec) => {
294
- var _a;
295
248
  let currentRawResponse = undefined;
296
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
249
+ const providedCallback = args.options?.onResponse;
297
250
  const callback = (rawResponse, flatResponse) => {
298
251
  currentRawResponse = rawResponse;
299
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
252
+ providedCallback?.(rawResponse, flatResponse);
253
+ };
254
+ const updatedArgs = {
255
+ ...args,
256
+ options: {
257
+ ...args.options,
258
+ onResponse: callback,
259
+ },
300
260
  };
301
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
302
261
  const flatResponse = await directSendOperation(updatedArgs, spec);
303
262
  return {
304
263
  flatResponse,
@@ -315,8 +274,8 @@ export class InvoicesImpl {
315
274
  spec: amendOperationSpec,
316
275
  });
317
276
  const poller = await createHttpPoller(lro, {
318
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
319
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
277
+ restoreFrom: options?.resumeFrom,
278
+ intervalInMs: options?.updateIntervalInMs,
320
279
  resourceLocationConfig: "location",
321
280
  });
322
281
  await poller.poll();
@@ -345,14 +304,19 @@ export class InvoicesImpl {
345
304
  return this.client.sendOperationRequest(args, spec);
346
305
  };
347
306
  const sendOperationFn = async (args, spec) => {
348
- var _a;
349
307
  let currentRawResponse = undefined;
350
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
308
+ const providedCallback = args.options?.onResponse;
351
309
  const callback = (rawResponse, flatResponse) => {
352
310
  currentRawResponse = rawResponse;
353
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
311
+ providedCallback?.(rawResponse, flatResponse);
312
+ };
313
+ const updatedArgs = {
314
+ ...args,
315
+ options: {
316
+ ...args.options,
317
+ onResponse: callback,
318
+ },
354
319
  };
355
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
356
320
  const flatResponse = await directSendOperation(updatedArgs, spec);
357
321
  return {
358
322
  flatResponse,
@@ -369,8 +333,8 @@ export class InvoicesImpl {
369
333
  spec: downloadByBillingAccountOperationSpec,
370
334
  });
371
335
  const poller = await createHttpPoller(lro, {
372
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
373
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
336
+ restoreFrom: options?.resumeFrom,
337
+ intervalInMs: options?.updateIntervalInMs,
374
338
  resourceLocationConfig: "location",
375
339
  });
376
340
  await poller.poll();
@@ -399,14 +363,19 @@ export class InvoicesImpl {
399
363
  return this.client.sendOperationRequest(args, spec);
400
364
  };
401
365
  const sendOperationFn = async (args, spec) => {
402
- var _a;
403
366
  let currentRawResponse = undefined;
404
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
367
+ const providedCallback = args.options?.onResponse;
405
368
  const callback = (rawResponse, flatResponse) => {
406
369
  currentRawResponse = rawResponse;
407
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
370
+ providedCallback?.(rawResponse, flatResponse);
371
+ };
372
+ const updatedArgs = {
373
+ ...args,
374
+ options: {
375
+ ...args.options,
376
+ onResponse: callback,
377
+ },
408
378
  };
409
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
410
379
  const flatResponse = await directSendOperation(updatedArgs, spec);
411
380
  return {
412
381
  flatResponse,
@@ -423,8 +392,8 @@ export class InvoicesImpl {
423
392
  spec: downloadSummaryByBillingAccountOperationSpec,
424
393
  });
425
394
  const poller = await createHttpPoller(lro, {
426
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
427
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
395
+ restoreFrom: options?.resumeFrom,
396
+ intervalInMs: options?.updateIntervalInMs,
428
397
  resourceLocationConfig: "location",
429
398
  });
430
399
  await poller.poll();
@@ -472,14 +441,19 @@ export class InvoicesImpl {
472
441
  return this.client.sendOperationRequest(args, spec);
473
442
  };
474
443
  const sendOperationFn = async (args, spec) => {
475
- var _a;
476
444
  let currentRawResponse = undefined;
477
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
445
+ const providedCallback = args.options?.onResponse;
478
446
  const callback = (rawResponse, flatResponse) => {
479
447
  currentRawResponse = rawResponse;
480
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
448
+ providedCallback?.(rawResponse, flatResponse);
449
+ };
450
+ const updatedArgs = {
451
+ ...args,
452
+ options: {
453
+ ...args.options,
454
+ onResponse: callback,
455
+ },
481
456
  };
482
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
483
457
  const flatResponse = await directSendOperation(updatedArgs, spec);
484
458
  return {
485
459
  flatResponse,
@@ -496,8 +470,8 @@ export class InvoicesImpl {
496
470
  spec: downloadDocumentsByBillingSubscriptionOperationSpec,
497
471
  });
498
472
  const poller = await createHttpPoller(lro, {
499
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
500
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
473
+ restoreFrom: options?.resumeFrom,
474
+ intervalInMs: options?.updateIntervalInMs,
501
475
  resourceLocationConfig: "location",
502
476
  });
503
477
  await poller.poll();
@@ -525,14 +499,19 @@ export class InvoicesImpl {
525
499
  return this.client.sendOperationRequest(args, spec);
526
500
  };
527
501
  const sendOperationFn = async (args, spec) => {
528
- var _a;
529
502
  let currentRawResponse = undefined;
530
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
503
+ const providedCallback = args.options?.onResponse;
531
504
  const callback = (rawResponse, flatResponse) => {
532
505
  currentRawResponse = rawResponse;
533
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
506
+ providedCallback?.(rawResponse, flatResponse);
507
+ };
508
+ const updatedArgs = {
509
+ ...args,
510
+ options: {
511
+ ...args.options,
512
+ onResponse: callback,
513
+ },
534
514
  };
535
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
536
515
  const flatResponse = await directSendOperation(updatedArgs, spec);
537
516
  return {
538
517
  flatResponse,
@@ -549,8 +528,8 @@ export class InvoicesImpl {
549
528
  spec: downloadByBillingSubscriptionOperationSpec,
550
529
  });
551
530
  const poller = await createHttpPoller(lro, {
552
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
553
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
531
+ restoreFrom: options?.resumeFrom,
532
+ intervalInMs: options?.updateIntervalInMs,
554
533
  resourceLocationConfig: "location",
555
534
  });
556
535
  await poller.poll();