@azure/arm-billing 5.0.1-alpha.20250618.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
@@ -18,6 +18,7 @@ const lroImpl_js_1 = require("../lroImpl.js");
18
18
  /// <reference lib="esnext.asynciterable" />
19
19
  /** Class containing Invoices operations. */
20
20
  class InvoicesImpl {
21
+ client;
21
22
  /**
22
23
  * Initialize a new instance of the class Invoices class.
23
24
  * @param client Reference to the service client
@@ -43,52 +44,35 @@ class InvoicesImpl {
43
44
  return this;
44
45
  },
45
46
  byPage: (settings) => {
46
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
47
+ if (settings?.maxPageSize) {
47
48
  throw new Error("maxPageSize is not supported by this operation.");
48
49
  }
49
50
  return this.listByBillingProfilePagingPage(billingAccountName, billingProfileName, options, settings);
50
51
  },
51
52
  };
52
53
  }
53
- listByBillingProfilePagingPage(billingAccountName, billingProfileName, options, settings) {
54
- return tslib_1.__asyncGenerator(this, arguments, function* listByBillingProfilePagingPage_1() {
55
- let result;
56
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
57
- if (!continuationToken) {
58
- result = yield tslib_1.__await(this._listByBillingProfile(billingAccountName, billingProfileName, options));
59
- let page = result.value || [];
60
- continuationToken = result.nextLink;
61
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
62
- yield yield tslib_1.__await(page);
63
- }
64
- while (continuationToken) {
65
- result = yield tslib_1.__await(this._listByBillingProfileNext(billingAccountName, billingProfileName, continuationToken, options));
66
- continuationToken = result.nextLink;
67
- let page = result.value || [];
68
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
69
- yield yield tslib_1.__await(page);
70
- }
71
- });
54
+ async *listByBillingProfilePagingPage(billingAccountName, billingProfileName, options, settings) {
55
+ let result;
56
+ let continuationToken = settings?.continuationToken;
57
+ if (!continuationToken) {
58
+ result = await this._listByBillingProfile(billingAccountName, billingProfileName, options);
59
+ let page = result.value || [];
60
+ continuationToken = result.nextLink;
61
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
62
+ yield page;
63
+ }
64
+ while (continuationToken) {
65
+ result = await this._listByBillingProfileNext(billingAccountName, billingProfileName, continuationToken, options);
66
+ continuationToken = result.nextLink;
67
+ let page = result.value || [];
68
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
69
+ yield page;
70
+ }
72
71
  }
73
- listByBillingProfilePagingAll(billingAccountName, billingProfileName, options) {
74
- return tslib_1.__asyncGenerator(this, arguments, function* listByBillingProfilePagingAll_1() {
75
- var _a, e_1, _b, _c;
76
- try {
77
- for (var _d = true, _e = tslib_1.__asyncValues(this.listByBillingProfilePagingPage(billingAccountName, billingProfileName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
78
- _c = _f.value;
79
- _d = false;
80
- const page = _c;
81
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
82
- }
83
- }
84
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
85
- finally {
86
- try {
87
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
88
- }
89
- finally { if (e_1) throw e_1.error; }
90
- }
91
- });
72
+ async *listByBillingProfilePagingAll(billingAccountName, billingProfileName, options) {
73
+ for await (const page of this.listByBillingProfilePagingPage(billingAccountName, billingProfileName, options)) {
74
+ yield* page;
75
+ }
92
76
  }
93
77
  /**
94
78
  * Lists the invoices for a billing account for a given start date and end date. The operation is
@@ -106,52 +90,35 @@ class InvoicesImpl {
106
90
  return this;
107
91
  },
108
92
  byPage: (settings) => {
109
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
93
+ if (settings?.maxPageSize) {
110
94
  throw new Error("maxPageSize is not supported by this operation.");
111
95
  }
112
96
  return this.listByBillingAccountPagingPage(billingAccountName, options, settings);
113
97
  },
114
98
  };
115
99
  }
116
- listByBillingAccountPagingPage(billingAccountName, options, settings) {
117
- return tslib_1.__asyncGenerator(this, arguments, function* listByBillingAccountPagingPage_1() {
118
- let result;
119
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
120
- if (!continuationToken) {
121
- result = yield tslib_1.__await(this._listByBillingAccount(billingAccountName, options));
122
- let page = result.value || [];
123
- continuationToken = result.nextLink;
124
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
125
- yield yield tslib_1.__await(page);
126
- }
127
- while (continuationToken) {
128
- result = yield tslib_1.__await(this._listByBillingAccountNext(billingAccountName, continuationToken, options));
129
- continuationToken = result.nextLink;
130
- let page = result.value || [];
131
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
132
- yield yield tslib_1.__await(page);
133
- }
134
- });
100
+ async *listByBillingAccountPagingPage(billingAccountName, options, settings) {
101
+ let result;
102
+ let continuationToken = settings?.continuationToken;
103
+ if (!continuationToken) {
104
+ result = await this._listByBillingAccount(billingAccountName, options);
105
+ let page = result.value || [];
106
+ continuationToken = result.nextLink;
107
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
108
+ yield page;
109
+ }
110
+ while (continuationToken) {
111
+ result = await this._listByBillingAccountNext(billingAccountName, continuationToken, options);
112
+ continuationToken = result.nextLink;
113
+ let page = result.value || [];
114
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
115
+ yield page;
116
+ }
135
117
  }
136
- listByBillingAccountPagingAll(billingAccountName, options) {
137
- return tslib_1.__asyncGenerator(this, arguments, function* listByBillingAccountPagingAll_1() {
138
- var _a, e_2, _b, _c;
139
- try {
140
- for (var _d = true, _e = tslib_1.__asyncValues(this.listByBillingAccountPagingPage(billingAccountName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
141
- _c = _f.value;
142
- _d = false;
143
- const page = _c;
144
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
145
- }
146
- }
147
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
148
- finally {
149
- try {
150
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
151
- }
152
- finally { if (e_2) throw e_2.error; }
153
- }
154
- });
118
+ async *listByBillingAccountPagingAll(billingAccountName, options) {
119
+ for await (const page of this.listByBillingAccountPagingPage(billingAccountName, options)) {
120
+ yield* page;
121
+ }
155
122
  }
156
123
  /**
157
124
  * Lists the invoices for a subscription. The operation is supported for billing accounts with
@@ -168,52 +135,35 @@ class InvoicesImpl {
168
135
  return this;
169
136
  },
170
137
  byPage: (settings) => {
171
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
138
+ if (settings?.maxPageSize) {
172
139
  throw new Error("maxPageSize is not supported by this operation.");
173
140
  }
174
141
  return this.listByBillingSubscriptionPagingPage(options, settings);
175
142
  },
176
143
  };
177
144
  }
178
- listByBillingSubscriptionPagingPage(options, settings) {
179
- return tslib_1.__asyncGenerator(this, arguments, function* listByBillingSubscriptionPagingPage_1() {
180
- let result;
181
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
182
- if (!continuationToken) {
183
- result = yield tslib_1.__await(this._listByBillingSubscription(options));
184
- let page = result.value || [];
185
- continuationToken = result.nextLink;
186
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
187
- yield yield tslib_1.__await(page);
188
- }
189
- while (continuationToken) {
190
- result = yield tslib_1.__await(this._listByBillingSubscriptionNext(continuationToken, options));
191
- continuationToken = result.nextLink;
192
- let page = result.value || [];
193
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
194
- yield yield tslib_1.__await(page);
195
- }
196
- });
145
+ async *listByBillingSubscriptionPagingPage(options, settings) {
146
+ let result;
147
+ let continuationToken = settings?.continuationToken;
148
+ if (!continuationToken) {
149
+ result = await this._listByBillingSubscription(options);
150
+ let page = result.value || [];
151
+ continuationToken = result.nextLink;
152
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
153
+ yield page;
154
+ }
155
+ while (continuationToken) {
156
+ result = await this._listByBillingSubscriptionNext(continuationToken, options);
157
+ continuationToken = result.nextLink;
158
+ let page = result.value || [];
159
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
160
+ yield page;
161
+ }
197
162
  }
198
- listByBillingSubscriptionPagingAll(options) {
199
- return tslib_1.__asyncGenerator(this, arguments, function* listByBillingSubscriptionPagingAll_1() {
200
- var _a, e_3, _b, _c;
201
- try {
202
- for (var _d = true, _e = tslib_1.__asyncValues(this.listByBillingSubscriptionPagingPage(options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
203
- _c = _f.value;
204
- _d = false;
205
- const page = _c;
206
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
207
- }
208
- }
209
- catch (e_3_1) { e_3 = { error: e_3_1 }; }
210
- finally {
211
- try {
212
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
213
- }
214
- finally { if (e_3) throw e_3.error; }
215
- }
216
- });
163
+ async *listByBillingSubscriptionPagingAll(options) {
164
+ for await (const page of this.listByBillingSubscriptionPagingPage(options)) {
165
+ yield* page;
166
+ }
217
167
  }
218
168
  /**
219
169
  * Lists the invoices for a billing profile for a given start date and end date. The operation is
@@ -239,14 +189,19 @@ class InvoicesImpl {
239
189
  return this.client.sendOperationRequest(args, spec);
240
190
  };
241
191
  const sendOperationFn = async (args, spec) => {
242
- var _a;
243
192
  let currentRawResponse = undefined;
244
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
193
+ const providedCallback = args.options?.onResponse;
245
194
  const callback = (rawResponse, flatResponse) => {
246
195
  currentRawResponse = rawResponse;
247
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
196
+ providedCallback?.(rawResponse, flatResponse);
197
+ };
198
+ const updatedArgs = {
199
+ ...args,
200
+ options: {
201
+ ...args.options,
202
+ onResponse: callback,
203
+ },
248
204
  };
249
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
250
205
  const flatResponse = await directSendOperation(updatedArgs, spec);
251
206
  return {
252
207
  flatResponse,
@@ -263,8 +218,8 @@ class InvoicesImpl {
263
218
  spec: downloadDocumentsByBillingAccountOperationSpec,
264
219
  });
265
220
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
266
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
267
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
221
+ restoreFrom: options?.resumeFrom,
222
+ intervalInMs: options?.updateIntervalInMs,
268
223
  resourceLocationConfig: "location",
269
224
  });
270
225
  await poller.poll();
@@ -294,14 +249,19 @@ class InvoicesImpl {
294
249
  return this.client.sendOperationRequest(args, spec);
295
250
  };
296
251
  const sendOperationFn = async (args, spec) => {
297
- var _a;
298
252
  let currentRawResponse = undefined;
299
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
253
+ const providedCallback = args.options?.onResponse;
300
254
  const callback = (rawResponse, flatResponse) => {
301
255
  currentRawResponse = rawResponse;
302
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
256
+ providedCallback?.(rawResponse, flatResponse);
257
+ };
258
+ const updatedArgs = {
259
+ ...args,
260
+ options: {
261
+ ...args.options,
262
+ onResponse: callback,
263
+ },
303
264
  };
304
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
305
265
  const flatResponse = await directSendOperation(updatedArgs, spec);
306
266
  return {
307
267
  flatResponse,
@@ -318,8 +278,8 @@ class InvoicesImpl {
318
278
  spec: amendOperationSpec,
319
279
  });
320
280
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
321
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
322
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
281
+ restoreFrom: options?.resumeFrom,
282
+ intervalInMs: options?.updateIntervalInMs,
323
283
  resourceLocationConfig: "location",
324
284
  });
325
285
  await poller.poll();
@@ -348,14 +308,19 @@ class InvoicesImpl {
348
308
  return this.client.sendOperationRequest(args, spec);
349
309
  };
350
310
  const sendOperationFn = async (args, spec) => {
351
- var _a;
352
311
  let currentRawResponse = undefined;
353
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
312
+ const providedCallback = args.options?.onResponse;
354
313
  const callback = (rawResponse, flatResponse) => {
355
314
  currentRawResponse = rawResponse;
356
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
315
+ providedCallback?.(rawResponse, flatResponse);
316
+ };
317
+ const updatedArgs = {
318
+ ...args,
319
+ options: {
320
+ ...args.options,
321
+ onResponse: callback,
322
+ },
357
323
  };
358
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
359
324
  const flatResponse = await directSendOperation(updatedArgs, spec);
360
325
  return {
361
326
  flatResponse,
@@ -372,8 +337,8 @@ class InvoicesImpl {
372
337
  spec: downloadByBillingAccountOperationSpec,
373
338
  });
374
339
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
375
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
376
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
340
+ restoreFrom: options?.resumeFrom,
341
+ intervalInMs: options?.updateIntervalInMs,
377
342
  resourceLocationConfig: "location",
378
343
  });
379
344
  await poller.poll();
@@ -402,14 +367,19 @@ class InvoicesImpl {
402
367
  return this.client.sendOperationRequest(args, spec);
403
368
  };
404
369
  const sendOperationFn = async (args, spec) => {
405
- var _a;
406
370
  let currentRawResponse = undefined;
407
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
371
+ const providedCallback = args.options?.onResponse;
408
372
  const callback = (rawResponse, flatResponse) => {
409
373
  currentRawResponse = rawResponse;
410
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
374
+ providedCallback?.(rawResponse, flatResponse);
375
+ };
376
+ const updatedArgs = {
377
+ ...args,
378
+ options: {
379
+ ...args.options,
380
+ onResponse: callback,
381
+ },
411
382
  };
412
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
413
383
  const flatResponse = await directSendOperation(updatedArgs, spec);
414
384
  return {
415
385
  flatResponse,
@@ -426,8 +396,8 @@ class InvoicesImpl {
426
396
  spec: downloadSummaryByBillingAccountOperationSpec,
427
397
  });
428
398
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
429
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
430
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
399
+ restoreFrom: options?.resumeFrom,
400
+ intervalInMs: options?.updateIntervalInMs,
431
401
  resourceLocationConfig: "location",
432
402
  });
433
403
  await poller.poll();
@@ -475,14 +445,19 @@ class InvoicesImpl {
475
445
  return this.client.sendOperationRequest(args, spec);
476
446
  };
477
447
  const sendOperationFn = async (args, spec) => {
478
- var _a;
479
448
  let currentRawResponse = undefined;
480
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
449
+ const providedCallback = args.options?.onResponse;
481
450
  const callback = (rawResponse, flatResponse) => {
482
451
  currentRawResponse = rawResponse;
483
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
452
+ providedCallback?.(rawResponse, flatResponse);
453
+ };
454
+ const updatedArgs = {
455
+ ...args,
456
+ options: {
457
+ ...args.options,
458
+ onResponse: callback,
459
+ },
484
460
  };
485
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
486
461
  const flatResponse = await directSendOperation(updatedArgs, spec);
487
462
  return {
488
463
  flatResponse,
@@ -499,8 +474,8 @@ class InvoicesImpl {
499
474
  spec: downloadDocumentsByBillingSubscriptionOperationSpec,
500
475
  });
501
476
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
502
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
503
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
477
+ restoreFrom: options?.resumeFrom,
478
+ intervalInMs: options?.updateIntervalInMs,
504
479
  resourceLocationConfig: "location",
505
480
  });
506
481
  await poller.poll();
@@ -528,14 +503,19 @@ class InvoicesImpl {
528
503
  return this.client.sendOperationRequest(args, spec);
529
504
  };
530
505
  const sendOperationFn = async (args, spec) => {
531
- var _a;
532
506
  let currentRawResponse = undefined;
533
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
507
+ const providedCallback = args.options?.onResponse;
534
508
  const callback = (rawResponse, flatResponse) => {
535
509
  currentRawResponse = rawResponse;
536
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
510
+ providedCallback?.(rawResponse, flatResponse);
511
+ };
512
+ const updatedArgs = {
513
+ ...args,
514
+ options: {
515
+ ...args.options,
516
+ onResponse: callback,
517
+ },
537
518
  };
538
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
539
519
  const flatResponse = await directSendOperation(updatedArgs, spec);
540
520
  return {
541
521
  flatResponse,
@@ -552,8 +532,8 @@ class InvoicesImpl {
552
532
  spec: downloadByBillingSubscriptionOperationSpec,
553
533
  });
554
534
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
555
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
556
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
535
+ restoreFrom: options?.resumeFrom,
536
+ intervalInMs: options?.updateIntervalInMs,
557
537
  resourceLocationConfig: "location",
558
538
  });
559
539
  await poller.poll();