@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 BillingRoleAssignments operations. */
17
16
  export class BillingRoleAssignmentsImpl {
17
+ client;
18
18
  /**
19
19
  * Initialize a new instance of the class BillingRoleAssignments class.
20
20
  * @param client Reference to the service client
@@ -39,52 +39,35 @@ export class BillingRoleAssignmentsImpl {
39
39
  return this;
40
40
  },
41
41
  byPage: (settings) => {
42
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
42
+ if (settings?.maxPageSize) {
43
43
  throw new Error("maxPageSize is not supported by this operation.");
44
44
  }
45
45
  return this.listByBillingProfilePagingPage(billingAccountName, billingProfileName, options, settings);
46
46
  },
47
47
  };
48
48
  }
49
- listByBillingProfilePagingPage(billingAccountName, billingProfileName, options, settings) {
50
- return __asyncGenerator(this, arguments, function* listByBillingProfilePagingPage_1() {
51
- let result;
52
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
53
- if (!continuationToken) {
54
- result = yield __await(this._listByBillingProfile(billingAccountName, billingProfileName, options));
55
- let page = result.value || [];
56
- continuationToken = result.nextLink;
57
- setContinuationToken(page, continuationToken);
58
- yield yield __await(page);
59
- }
60
- while (continuationToken) {
61
- result = yield __await(this._listByBillingProfileNext(billingAccountName, billingProfileName, continuationToken, options));
62
- continuationToken = result.nextLink;
63
- let page = result.value || [];
64
- setContinuationToken(page, continuationToken);
65
- yield yield __await(page);
66
- }
67
- });
68
- }
69
- listByBillingProfilePagingAll(billingAccountName, billingProfileName, options) {
70
- return __asyncGenerator(this, arguments, function* listByBillingProfilePagingAll_1() {
71
- var _a, e_1, _b, _c;
72
- try {
73
- for (var _d = true, _e = __asyncValues(this.listByBillingProfilePagingPage(billingAccountName, billingProfileName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
74
- _c = _f.value;
75
- _d = false;
76
- const page = _c;
77
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
78
- }
79
- }
80
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
81
- finally {
82
- try {
83
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
84
- }
85
- finally { if (e_1) throw e_1.error; }
86
- }
87
- });
49
+ async *listByBillingProfilePagingPage(billingAccountName, billingProfileName, options, settings) {
50
+ let result;
51
+ let continuationToken = settings?.continuationToken;
52
+ if (!continuationToken) {
53
+ result = await this._listByBillingProfile(billingAccountName, billingProfileName, options);
54
+ let page = result.value || [];
55
+ continuationToken = result.nextLink;
56
+ setContinuationToken(page, continuationToken);
57
+ yield page;
58
+ }
59
+ while (continuationToken) {
60
+ result = await this._listByBillingProfileNext(billingAccountName, billingProfileName, continuationToken, options);
61
+ continuationToken = result.nextLink;
62
+ let page = result.value || [];
63
+ setContinuationToken(page, continuationToken);
64
+ yield page;
65
+ }
66
+ }
67
+ async *listByBillingProfilePagingAll(billingAccountName, billingProfileName, options) {
68
+ for await (const page of this.listByBillingProfilePagingPage(billingAccountName, billingProfileName, options)) {
69
+ yield* page;
70
+ }
88
71
  }
89
72
  /**
90
73
  * Lists the role assignments for the caller on customer. The operation is supported for billing
@@ -104,52 +87,35 @@ export class BillingRoleAssignmentsImpl {
104
87
  return this;
105
88
  },
106
89
  byPage: (settings) => {
107
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
90
+ if (settings?.maxPageSize) {
108
91
  throw new Error("maxPageSize is not supported by this operation.");
109
92
  }
110
93
  return this.listByCustomerPagingPage(billingAccountName, billingProfileName, customerName, options, settings);
111
94
  },
112
95
  };
113
96
  }
114
- listByCustomerPagingPage(billingAccountName, billingProfileName, customerName, options, settings) {
115
- return __asyncGenerator(this, arguments, function* listByCustomerPagingPage_1() {
116
- let result;
117
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
118
- if (!continuationToken) {
119
- result = yield __await(this._listByCustomer(billingAccountName, billingProfileName, customerName, options));
120
- let page = result.value || [];
121
- continuationToken = result.nextLink;
122
- setContinuationToken(page, continuationToken);
123
- yield yield __await(page);
124
- }
125
- while (continuationToken) {
126
- result = yield __await(this._listByCustomerNext(billingAccountName, billingProfileName, customerName, continuationToken, options));
127
- continuationToken = result.nextLink;
128
- let page = result.value || [];
129
- setContinuationToken(page, continuationToken);
130
- yield yield __await(page);
131
- }
132
- });
133
- }
134
- listByCustomerPagingAll(billingAccountName, billingProfileName, customerName, options) {
135
- return __asyncGenerator(this, arguments, function* listByCustomerPagingAll_1() {
136
- var _a, e_2, _b, _c;
137
- try {
138
- for (var _d = true, _e = __asyncValues(this.listByCustomerPagingPage(billingAccountName, billingProfileName, customerName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
139
- _c = _f.value;
140
- _d = false;
141
- const page = _c;
142
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
143
- }
144
- }
145
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
146
- finally {
147
- try {
148
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
149
- }
150
- finally { if (e_2) throw e_2.error; }
151
- }
152
- });
97
+ async *listByCustomerPagingPage(billingAccountName, billingProfileName, customerName, options, settings) {
98
+ let result;
99
+ let continuationToken = settings?.continuationToken;
100
+ if (!continuationToken) {
101
+ result = await this._listByCustomer(billingAccountName, billingProfileName, customerName, options);
102
+ let page = result.value || [];
103
+ continuationToken = result.nextLink;
104
+ setContinuationToken(page, continuationToken);
105
+ yield page;
106
+ }
107
+ while (continuationToken) {
108
+ result = await this._listByCustomerNext(billingAccountName, billingProfileName, customerName, continuationToken, options);
109
+ continuationToken = result.nextLink;
110
+ let page = result.value || [];
111
+ setContinuationToken(page, continuationToken);
112
+ yield page;
113
+ }
114
+ }
115
+ async *listByCustomerPagingAll(billingAccountName, billingProfileName, customerName, options) {
116
+ for await (const page of this.listByCustomerPagingPage(billingAccountName, billingProfileName, customerName, options)) {
117
+ yield* page;
118
+ }
153
119
  }
154
120
  /**
155
121
  * Lists the role assignments for the caller on an invoice section. The operation is supported for
@@ -169,52 +135,35 @@ export class BillingRoleAssignmentsImpl {
169
135
  return this;
170
136
  },
171
137
  byPage: (settings) => {
172
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
138
+ if (settings?.maxPageSize) {
173
139
  throw new Error("maxPageSize is not supported by this operation.");
174
140
  }
175
141
  return this.listByInvoiceSectionPagingPage(billingAccountName, billingProfileName, invoiceSectionName, options, settings);
176
142
  },
177
143
  };
178
144
  }
179
- listByInvoiceSectionPagingPage(billingAccountName, billingProfileName, invoiceSectionName, options, settings) {
180
- return __asyncGenerator(this, arguments, function* listByInvoiceSectionPagingPage_1() {
181
- let result;
182
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
183
- if (!continuationToken) {
184
- result = yield __await(this._listByInvoiceSection(billingAccountName, billingProfileName, invoiceSectionName, options));
185
- let page = result.value || [];
186
- continuationToken = result.nextLink;
187
- setContinuationToken(page, continuationToken);
188
- yield yield __await(page);
189
- }
190
- while (continuationToken) {
191
- result = yield __await(this._listByInvoiceSectionNext(billingAccountName, billingProfileName, invoiceSectionName, continuationToken, options));
192
- continuationToken = result.nextLink;
193
- let page = result.value || [];
194
- setContinuationToken(page, continuationToken);
195
- yield yield __await(page);
196
- }
197
- });
198
- }
199
- listByInvoiceSectionPagingAll(billingAccountName, billingProfileName, invoiceSectionName, options) {
200
- return __asyncGenerator(this, arguments, function* listByInvoiceSectionPagingAll_1() {
201
- var _a, e_3, _b, _c;
202
- try {
203
- for (var _d = true, _e = __asyncValues(this.listByInvoiceSectionPagingPage(billingAccountName, billingProfileName, invoiceSectionName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
204
- _c = _f.value;
205
- _d = false;
206
- const page = _c;
207
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
208
- }
209
- }
210
- catch (e_3_1) { e_3 = { error: e_3_1 }; }
211
- finally {
212
- try {
213
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
214
- }
215
- finally { if (e_3) throw e_3.error; }
216
- }
217
- });
145
+ async *listByInvoiceSectionPagingPage(billingAccountName, billingProfileName, invoiceSectionName, options, settings) {
146
+ let result;
147
+ let continuationToken = settings?.continuationToken;
148
+ if (!continuationToken) {
149
+ result = await this._listByInvoiceSection(billingAccountName, billingProfileName, invoiceSectionName, options);
150
+ let page = result.value || [];
151
+ continuationToken = result.nextLink;
152
+ setContinuationToken(page, continuationToken);
153
+ yield page;
154
+ }
155
+ while (continuationToken) {
156
+ result = await this._listByInvoiceSectionNext(billingAccountName, billingProfileName, invoiceSectionName, continuationToken, options);
157
+ continuationToken = result.nextLink;
158
+ let page = result.value || [];
159
+ setContinuationToken(page, continuationToken);
160
+ yield page;
161
+ }
162
+ }
163
+ async *listByInvoiceSectionPagingAll(billingAccountName, billingProfileName, invoiceSectionName, options) {
164
+ for await (const page of this.listByInvoiceSectionPagingPage(billingAccountName, billingProfileName, invoiceSectionName, options)) {
165
+ yield* page;
166
+ }
218
167
  }
219
168
  /**
220
169
  * Lists the role assignments for the caller on a billing account. The operation is supported for
@@ -233,52 +182,35 @@ export class BillingRoleAssignmentsImpl {
233
182
  return this;
234
183
  },
235
184
  byPage: (settings) => {
236
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
185
+ if (settings?.maxPageSize) {
237
186
  throw new Error("maxPageSize is not supported by this operation.");
238
187
  }
239
188
  return this.listByBillingAccountPagingPage(billingAccountName, options, settings);
240
189
  },
241
190
  };
242
191
  }
243
- listByBillingAccountPagingPage(billingAccountName, options, settings) {
244
- return __asyncGenerator(this, arguments, function* listByBillingAccountPagingPage_1() {
245
- let result;
246
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
247
- if (!continuationToken) {
248
- result = yield __await(this._listByBillingAccount(billingAccountName, options));
249
- let page = result.value || [];
250
- continuationToken = result.nextLink;
251
- setContinuationToken(page, continuationToken);
252
- yield yield __await(page);
253
- }
254
- while (continuationToken) {
255
- result = yield __await(this._listByBillingAccountNext(billingAccountName, continuationToken, options));
256
- continuationToken = result.nextLink;
257
- let page = result.value || [];
258
- setContinuationToken(page, continuationToken);
259
- yield yield __await(page);
260
- }
261
- });
262
- }
263
- listByBillingAccountPagingAll(billingAccountName, options) {
264
- return __asyncGenerator(this, arguments, function* listByBillingAccountPagingAll_1() {
265
- var _a, e_4, _b, _c;
266
- try {
267
- for (var _d = true, _e = __asyncValues(this.listByBillingAccountPagingPage(billingAccountName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
268
- _c = _f.value;
269
- _d = false;
270
- const page = _c;
271
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
272
- }
273
- }
274
- catch (e_4_1) { e_4 = { error: e_4_1 }; }
275
- finally {
276
- try {
277
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
278
- }
279
- finally { if (e_4) throw e_4.error; }
280
- }
281
- });
192
+ async *listByBillingAccountPagingPage(billingAccountName, options, settings) {
193
+ let result;
194
+ let continuationToken = settings?.continuationToken;
195
+ if (!continuationToken) {
196
+ result = await this._listByBillingAccount(billingAccountName, options);
197
+ let page = result.value || [];
198
+ continuationToken = result.nextLink;
199
+ setContinuationToken(page, continuationToken);
200
+ yield page;
201
+ }
202
+ while (continuationToken) {
203
+ result = await this._listByBillingAccountNext(billingAccountName, continuationToken, options);
204
+ continuationToken = result.nextLink;
205
+ let page = result.value || [];
206
+ setContinuationToken(page, continuationToken);
207
+ yield page;
208
+ }
209
+ }
210
+ async *listByBillingAccountPagingAll(billingAccountName, options) {
211
+ for await (const page of this.listByBillingAccountPagingPage(billingAccountName, options)) {
212
+ yield* page;
213
+ }
282
214
  }
283
215
  /**
284
216
  * Lists the role assignments for the caller on a department. The operation is supported for billing
@@ -297,52 +229,35 @@ export class BillingRoleAssignmentsImpl {
297
229
  return this;
298
230
  },
299
231
  byPage: (settings) => {
300
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
232
+ if (settings?.maxPageSize) {
301
233
  throw new Error("maxPageSize is not supported by this operation.");
302
234
  }
303
235
  return this.listByDepartmentPagingPage(billingAccountName, departmentName, options, settings);
304
236
  },
305
237
  };
306
238
  }
307
- listByDepartmentPagingPage(billingAccountName, departmentName, options, settings) {
308
- return __asyncGenerator(this, arguments, function* listByDepartmentPagingPage_1() {
309
- let result;
310
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
311
- if (!continuationToken) {
312
- result = yield __await(this._listByDepartment(billingAccountName, departmentName, options));
313
- let page = result.value || [];
314
- continuationToken = result.nextLink;
315
- setContinuationToken(page, continuationToken);
316
- yield yield __await(page);
317
- }
318
- while (continuationToken) {
319
- result = yield __await(this._listByDepartmentNext(billingAccountName, departmentName, continuationToken, options));
320
- continuationToken = result.nextLink;
321
- let page = result.value || [];
322
- setContinuationToken(page, continuationToken);
323
- yield yield __await(page);
324
- }
325
- });
326
- }
327
- listByDepartmentPagingAll(billingAccountName, departmentName, options) {
328
- return __asyncGenerator(this, arguments, function* listByDepartmentPagingAll_1() {
329
- var _a, e_5, _b, _c;
330
- try {
331
- for (var _d = true, _e = __asyncValues(this.listByDepartmentPagingPage(billingAccountName, departmentName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
332
- _c = _f.value;
333
- _d = false;
334
- const page = _c;
335
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
336
- }
337
- }
338
- catch (e_5_1) { e_5 = { error: e_5_1 }; }
339
- finally {
340
- try {
341
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
342
- }
343
- finally { if (e_5) throw e_5.error; }
344
- }
345
- });
239
+ async *listByDepartmentPagingPage(billingAccountName, departmentName, options, settings) {
240
+ let result;
241
+ let continuationToken = settings?.continuationToken;
242
+ if (!continuationToken) {
243
+ result = await this._listByDepartment(billingAccountName, departmentName, options);
244
+ let page = result.value || [];
245
+ continuationToken = result.nextLink;
246
+ setContinuationToken(page, continuationToken);
247
+ yield page;
248
+ }
249
+ while (continuationToken) {
250
+ result = await this._listByDepartmentNext(billingAccountName, departmentName, continuationToken, options);
251
+ continuationToken = result.nextLink;
252
+ let page = result.value || [];
253
+ setContinuationToken(page, continuationToken);
254
+ yield page;
255
+ }
256
+ }
257
+ async *listByDepartmentPagingAll(billingAccountName, departmentName, options) {
258
+ for await (const page of this.listByDepartmentPagingPage(billingAccountName, departmentName, options)) {
259
+ yield* page;
260
+ }
346
261
  }
347
262
  /**
348
263
  * Lists the role assignments for the caller on a enrollment account. The operation is supported for
@@ -361,52 +276,35 @@ export class BillingRoleAssignmentsImpl {
361
276
  return this;
362
277
  },
363
278
  byPage: (settings) => {
364
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
279
+ if (settings?.maxPageSize) {
365
280
  throw new Error("maxPageSize is not supported by this operation.");
366
281
  }
367
282
  return this.listByEnrollmentAccountPagingPage(billingAccountName, enrollmentAccountName, options, settings);
368
283
  },
369
284
  };
370
285
  }
371
- listByEnrollmentAccountPagingPage(billingAccountName, enrollmentAccountName, options, settings) {
372
- return __asyncGenerator(this, arguments, function* listByEnrollmentAccountPagingPage_1() {
373
- let result;
374
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
375
- if (!continuationToken) {
376
- result = yield __await(this._listByEnrollmentAccount(billingAccountName, enrollmentAccountName, options));
377
- let page = result.value || [];
378
- continuationToken = result.nextLink;
379
- setContinuationToken(page, continuationToken);
380
- yield yield __await(page);
381
- }
382
- while (continuationToken) {
383
- result = yield __await(this._listByEnrollmentAccountNext(billingAccountName, enrollmentAccountName, continuationToken, options));
384
- continuationToken = result.nextLink;
385
- let page = result.value || [];
386
- setContinuationToken(page, continuationToken);
387
- yield yield __await(page);
388
- }
389
- });
390
- }
391
- listByEnrollmentAccountPagingAll(billingAccountName, enrollmentAccountName, options) {
392
- return __asyncGenerator(this, arguments, function* listByEnrollmentAccountPagingAll_1() {
393
- var _a, e_6, _b, _c;
394
- try {
395
- for (var _d = true, _e = __asyncValues(this.listByEnrollmentAccountPagingPage(billingAccountName, enrollmentAccountName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
396
- _c = _f.value;
397
- _d = false;
398
- const page = _c;
399
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
400
- }
401
- }
402
- catch (e_6_1) { e_6 = { error: e_6_1 }; }
403
- finally {
404
- try {
405
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
406
- }
407
- finally { if (e_6) throw e_6.error; }
408
- }
409
- });
286
+ async *listByEnrollmentAccountPagingPage(billingAccountName, enrollmentAccountName, options, settings) {
287
+ let result;
288
+ let continuationToken = settings?.continuationToken;
289
+ if (!continuationToken) {
290
+ result = await this._listByEnrollmentAccount(billingAccountName, enrollmentAccountName, options);
291
+ let page = result.value || [];
292
+ continuationToken = result.nextLink;
293
+ setContinuationToken(page, continuationToken);
294
+ yield page;
295
+ }
296
+ while (continuationToken) {
297
+ result = await this._listByEnrollmentAccountNext(billingAccountName, enrollmentAccountName, continuationToken, options);
298
+ continuationToken = result.nextLink;
299
+ let page = result.value || [];
300
+ setContinuationToken(page, continuationToken);
301
+ yield page;
302
+ }
303
+ }
304
+ async *listByEnrollmentAccountPagingAll(billingAccountName, enrollmentAccountName, options) {
305
+ for await (const page of this.listByEnrollmentAccountPagingPage(billingAccountName, enrollmentAccountName, options)) {
306
+ yield* page;
307
+ }
410
308
  }
411
309
  /**
412
310
  * Deletes a role assignment on a billing profile. The operation is supported for billing accounts with
@@ -463,14 +361,19 @@ export class BillingRoleAssignmentsImpl {
463
361
  return this.client.sendOperationRequest(args, spec);
464
362
  };
465
363
  const sendOperationFn = async (args, spec) => {
466
- var _a;
467
364
  let currentRawResponse = undefined;
468
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
365
+ const providedCallback = args.options?.onResponse;
469
366
  const callback = (rawResponse, flatResponse) => {
470
367
  currentRawResponse = rawResponse;
471
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
368
+ providedCallback?.(rawResponse, flatResponse);
369
+ };
370
+ const updatedArgs = {
371
+ ...args,
372
+ options: {
373
+ ...args.options,
374
+ onResponse: callback,
375
+ },
472
376
  };
473
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
474
377
  const flatResponse = await directSendOperation(updatedArgs, spec);
475
378
  return {
476
379
  flatResponse,
@@ -487,8 +390,8 @@ export class BillingRoleAssignmentsImpl {
487
390
  spec: createByBillingProfileOperationSpec,
488
391
  });
489
392
  const poller = await createHttpPoller(lro, {
490
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
491
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
393
+ restoreFrom: options?.resumeFrom,
394
+ intervalInMs: options?.updateIntervalInMs,
492
395
  resourceLocationConfig: "location",
493
396
  });
494
397
  await poller.poll();
@@ -567,14 +470,19 @@ export class BillingRoleAssignmentsImpl {
567
470
  return this.client.sendOperationRequest(args, spec);
568
471
  };
569
472
  const sendOperationFn = async (args, spec) => {
570
- var _a;
571
473
  let currentRawResponse = undefined;
572
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
474
+ const providedCallback = args.options?.onResponse;
573
475
  const callback = (rawResponse, flatResponse) => {
574
476
  currentRawResponse = rawResponse;
575
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
477
+ providedCallback?.(rawResponse, flatResponse);
478
+ };
479
+ const updatedArgs = {
480
+ ...args,
481
+ options: {
482
+ ...args.options,
483
+ onResponse: callback,
484
+ },
576
485
  };
577
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
578
486
  const flatResponse = await directSendOperation(updatedArgs, spec);
579
487
  return {
580
488
  flatResponse,
@@ -597,8 +505,8 @@ export class BillingRoleAssignmentsImpl {
597
505
  spec: createByCustomerOperationSpec,
598
506
  });
599
507
  const poller = await createHttpPoller(lro, {
600
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
601
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
508
+ restoreFrom: options?.resumeFrom,
509
+ intervalInMs: options?.updateIntervalInMs,
602
510
  resourceLocationConfig: "location",
603
511
  });
604
512
  await poller.poll();
@@ -631,14 +539,19 @@ export class BillingRoleAssignmentsImpl {
631
539
  return this.client.sendOperationRequest(args, spec);
632
540
  };
633
541
  const sendOperationFn = async (args, spec) => {
634
- var _a;
635
542
  let currentRawResponse = undefined;
636
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
543
+ const providedCallback = args.options?.onResponse;
637
544
  const callback = (rawResponse, flatResponse) => {
638
545
  currentRawResponse = rawResponse;
639
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
546
+ providedCallback?.(rawResponse, flatResponse);
547
+ };
548
+ const updatedArgs = {
549
+ ...args,
550
+ options: {
551
+ ...args.options,
552
+ onResponse: callback,
553
+ },
640
554
  };
641
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
642
555
  const flatResponse = await directSendOperation(updatedArgs, spec);
643
556
  return {
644
557
  flatResponse,
@@ -655,8 +568,8 @@ export class BillingRoleAssignmentsImpl {
655
568
  spec: resolveByCustomerOperationSpec,
656
569
  });
657
570
  const poller = await createHttpPoller(lro, {
658
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
659
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
571
+ restoreFrom: options?.resumeFrom,
572
+ intervalInMs: options?.updateIntervalInMs,
660
573
  resourceLocationConfig: "location",
661
574
  });
662
575
  await poller.poll();
@@ -736,14 +649,19 @@ export class BillingRoleAssignmentsImpl {
736
649
  return this.client.sendOperationRequest(args, spec);
737
650
  };
738
651
  const sendOperationFn = async (args, spec) => {
739
- var _a;
740
652
  let currentRawResponse = undefined;
741
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
653
+ const providedCallback = args.options?.onResponse;
742
654
  const callback = (rawResponse, flatResponse) => {
743
655
  currentRawResponse = rawResponse;
744
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
656
+ providedCallback?.(rawResponse, flatResponse);
657
+ };
658
+ const updatedArgs = {
659
+ ...args,
660
+ options: {
661
+ ...args.options,
662
+ onResponse: callback,
663
+ },
745
664
  };
746
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
747
665
  const flatResponse = await directSendOperation(updatedArgs, spec);
748
666
  return {
749
667
  flatResponse,
@@ -766,8 +684,8 @@ export class BillingRoleAssignmentsImpl {
766
684
  spec: createByInvoiceSectionOperationSpec,
767
685
  });
768
686
  const poller = await createHttpPoller(lro, {
769
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
770
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
687
+ restoreFrom: options?.resumeFrom,
688
+ intervalInMs: options?.updateIntervalInMs,
771
689
  resourceLocationConfig: "location",
772
690
  });
773
691
  await poller.poll();
@@ -800,14 +718,19 @@ export class BillingRoleAssignmentsImpl {
800
718
  return this.client.sendOperationRequest(args, spec);
801
719
  };
802
720
  const sendOperationFn = async (args, spec) => {
803
- var _a;
804
721
  let currentRawResponse = undefined;
805
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
722
+ const providedCallback = args.options?.onResponse;
806
723
  const callback = (rawResponse, flatResponse) => {
807
724
  currentRawResponse = rawResponse;
808
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
725
+ providedCallback?.(rawResponse, flatResponse);
726
+ };
727
+ const updatedArgs = {
728
+ ...args,
729
+ options: {
730
+ ...args.options,
731
+ onResponse: callback,
732
+ },
809
733
  };
810
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
811
734
  const flatResponse = await directSendOperation(updatedArgs, spec);
812
735
  return {
813
736
  flatResponse,
@@ -829,8 +752,8 @@ export class BillingRoleAssignmentsImpl {
829
752
  spec: resolveByInvoiceSectionOperationSpec,
830
753
  });
831
754
  const poller = await createHttpPoller(lro, {
832
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
833
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
755
+ restoreFrom: options?.resumeFrom,
756
+ intervalInMs: options?.updateIntervalInMs,
834
757
  resourceLocationConfig: "location",
835
758
  });
836
759
  await poller.poll();
@@ -862,14 +785,19 @@ export class BillingRoleAssignmentsImpl {
862
785
  return this.client.sendOperationRequest(args, spec);
863
786
  };
864
787
  const sendOperationFn = async (args, spec) => {
865
- var _a;
866
788
  let currentRawResponse = undefined;
867
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
789
+ const providedCallback = args.options?.onResponse;
868
790
  const callback = (rawResponse, flatResponse) => {
869
791
  currentRawResponse = rawResponse;
870
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
792
+ providedCallback?.(rawResponse, flatResponse);
793
+ };
794
+ const updatedArgs = {
795
+ ...args,
796
+ options: {
797
+ ...args.options,
798
+ onResponse: callback,
799
+ },
871
800
  };
872
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
873
801
  const flatResponse = await directSendOperation(updatedArgs, spec);
874
802
  return {
875
803
  flatResponse,
@@ -886,8 +814,8 @@ export class BillingRoleAssignmentsImpl {
886
814
  spec: resolveByBillingProfileOperationSpec,
887
815
  });
888
816
  const poller = await createHttpPoller(lro, {
889
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
890
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
817
+ restoreFrom: options?.resumeFrom,
818
+ intervalInMs: options?.updateIntervalInMs,
891
819
  resourceLocationConfig: "location",
892
820
  });
893
821
  await poller.poll();
@@ -939,14 +867,19 @@ export class BillingRoleAssignmentsImpl {
939
867
  return this.client.sendOperationRequest(args, spec);
940
868
  };
941
869
  const sendOperationFn = async (args, spec) => {
942
- var _a;
943
870
  let currentRawResponse = undefined;
944
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
871
+ const providedCallback = args.options?.onResponse;
945
872
  const callback = (rawResponse, flatResponse) => {
946
873
  currentRawResponse = rawResponse;
947
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
874
+ providedCallback?.(rawResponse, flatResponse);
875
+ };
876
+ const updatedArgs = {
877
+ ...args,
878
+ options: {
879
+ ...args.options,
880
+ onResponse: callback,
881
+ },
948
882
  };
949
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
950
883
  const flatResponse = await directSendOperation(updatedArgs, spec);
951
884
  return {
952
885
  flatResponse,
@@ -968,8 +901,8 @@ export class BillingRoleAssignmentsImpl {
968
901
  spec: createOrUpdateByBillingAccountOperationSpec,
969
902
  });
970
903
  const poller = await createHttpPoller(lro, {
971
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
972
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
904
+ restoreFrom: options?.resumeFrom,
905
+ intervalInMs: options?.updateIntervalInMs,
973
906
  });
974
907
  await poller.poll();
975
908
  return poller;
@@ -1008,14 +941,19 @@ export class BillingRoleAssignmentsImpl {
1008
941
  return this.client.sendOperationRequest(args, spec);
1009
942
  };
1010
943
  const sendOperationFn = async (args, spec) => {
1011
- var _a;
1012
944
  let currentRawResponse = undefined;
1013
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
945
+ const providedCallback = args.options?.onResponse;
1014
946
  const callback = (rawResponse, flatResponse) => {
1015
947
  currentRawResponse = rawResponse;
1016
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
948
+ providedCallback?.(rawResponse, flatResponse);
949
+ };
950
+ const updatedArgs = {
951
+ ...args,
952
+ options: {
953
+ ...args.options,
954
+ onResponse: callback,
955
+ },
1017
956
  };
1018
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
1019
957
  const flatResponse = await directSendOperation(updatedArgs, spec);
1020
958
  return {
1021
959
  flatResponse,
@@ -1032,8 +970,8 @@ export class BillingRoleAssignmentsImpl {
1032
970
  spec: createByBillingAccountOperationSpec,
1033
971
  });
1034
972
  const poller = await createHttpPoller(lro, {
1035
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1036
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
973
+ restoreFrom: options?.resumeFrom,
974
+ intervalInMs: options?.updateIntervalInMs,
1037
975
  resourceLocationConfig: "location",
1038
976
  });
1039
977
  await poller.poll();
@@ -1096,14 +1034,19 @@ export class BillingRoleAssignmentsImpl {
1096
1034
  return this.client.sendOperationRequest(args, spec);
1097
1035
  };
1098
1036
  const sendOperationFn = async (args, spec) => {
1099
- var _a;
1100
1037
  let currentRawResponse = undefined;
1101
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
1038
+ const providedCallback = args.options?.onResponse;
1102
1039
  const callback = (rawResponse, flatResponse) => {
1103
1040
  currentRawResponse = rawResponse;
1104
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
1041
+ providedCallback?.(rawResponse, flatResponse);
1042
+ };
1043
+ const updatedArgs = {
1044
+ ...args,
1045
+ options: {
1046
+ ...args.options,
1047
+ onResponse: callback,
1048
+ },
1105
1049
  };
1106
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
1107
1050
  const flatResponse = await directSendOperation(updatedArgs, spec);
1108
1051
  return {
1109
1052
  flatResponse,
@@ -1126,8 +1069,8 @@ export class BillingRoleAssignmentsImpl {
1126
1069
  spec: createOrUpdateByDepartmentOperationSpec,
1127
1070
  });
1128
1071
  const poller = await createHttpPoller(lro, {
1129
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1130
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
1072
+ restoreFrom: options?.resumeFrom,
1073
+ intervalInMs: options?.updateIntervalInMs,
1131
1074
  });
1132
1075
  await poller.poll();
1133
1076
  return poller;
@@ -1201,14 +1144,19 @@ export class BillingRoleAssignmentsImpl {
1201
1144
  return this.client.sendOperationRequest(args, spec);
1202
1145
  };
1203
1146
  const sendOperationFn = async (args, spec) => {
1204
- var _a;
1205
1147
  let currentRawResponse = undefined;
1206
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
1148
+ const providedCallback = args.options?.onResponse;
1207
1149
  const callback = (rawResponse, flatResponse) => {
1208
1150
  currentRawResponse = rawResponse;
1209
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
1151
+ providedCallback?.(rawResponse, flatResponse);
1152
+ };
1153
+ const updatedArgs = {
1154
+ ...args,
1155
+ options: {
1156
+ ...args.options,
1157
+ onResponse: callback,
1158
+ },
1210
1159
  };
1211
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
1212
1160
  const flatResponse = await directSendOperation(updatedArgs, spec);
1213
1161
  return {
1214
1162
  flatResponse,
@@ -1231,8 +1179,8 @@ export class BillingRoleAssignmentsImpl {
1231
1179
  spec: createOrUpdateByEnrollmentAccountOperationSpec,
1232
1180
  });
1233
1181
  const poller = await createHttpPoller(lro, {
1234
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1235
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
1182
+ restoreFrom: options?.resumeFrom,
1183
+ intervalInMs: options?.updateIntervalInMs,
1236
1184
  });
1237
1185
  await poller.poll();
1238
1186
  return poller;
@@ -1272,14 +1220,19 @@ export class BillingRoleAssignmentsImpl {
1272
1220
  return this.client.sendOperationRequest(args, spec);
1273
1221
  };
1274
1222
  const sendOperationFn = async (args, spec) => {
1275
- var _a;
1276
1223
  let currentRawResponse = undefined;
1277
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
1224
+ const providedCallback = args.options?.onResponse;
1278
1225
  const callback = (rawResponse, flatResponse) => {
1279
1226
  currentRawResponse = rawResponse;
1280
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
1227
+ providedCallback?.(rawResponse, flatResponse);
1228
+ };
1229
+ const updatedArgs = {
1230
+ ...args,
1231
+ options: {
1232
+ ...args.options,
1233
+ onResponse: callback,
1234
+ },
1281
1235
  };
1282
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
1283
1236
  const flatResponse = await directSendOperation(updatedArgs, spec);
1284
1237
  return {
1285
1238
  flatResponse,
@@ -1296,8 +1249,8 @@ export class BillingRoleAssignmentsImpl {
1296
1249
  spec: resolveByBillingAccountOperationSpec,
1297
1250
  });
1298
1251
  const poller = await createHttpPoller(lro, {
1299
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1300
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
1252
+ restoreFrom: options?.resumeFrom,
1253
+ intervalInMs: options?.updateIntervalInMs,
1301
1254
  resourceLocationConfig: "location",
1302
1255
  });
1303
1256
  await poller.poll();