@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
@@ -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 BillingSubscriptions operations. */
17
16
  export class BillingSubscriptionsImpl {
17
+ client;
18
18
  /**
19
19
  * Initialize a new instance of the class BillingSubscriptions class.
20
20
  * @param client Reference to the service client
@@ -39,52 +39,35 @@ export class BillingSubscriptionsImpl {
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
- });
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
+ }
68
66
  }
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
- });
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 subscriptions for a customer. The operation is supported only for billing accounts with
@@ -104,52 +87,35 @@ export class BillingSubscriptionsImpl {
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
- });
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
+ }
133
114
  }
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
- });
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 subscriptions that are billed to an invoice section. The operation is supported only for
@@ -169,52 +135,35 @@ export class BillingSubscriptionsImpl {
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
- });
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
+ }
198
162
  }
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
- });
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 subscriptions for a billing account.
@@ -231,52 +180,35 @@ export class BillingSubscriptionsImpl {
231
180
  return this;
232
181
  },
233
182
  byPage: (settings) => {
234
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
183
+ if (settings?.maxPageSize) {
235
184
  throw new Error("maxPageSize is not supported by this operation.");
236
185
  }
237
186
  return this.listByBillingAccountPagingPage(billingAccountName, options, settings);
238
187
  },
239
188
  };
240
189
  }
241
- listByBillingAccountPagingPage(billingAccountName, options, settings) {
242
- return __asyncGenerator(this, arguments, function* listByBillingAccountPagingPage_1() {
243
- let result;
244
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
245
- if (!continuationToken) {
246
- result = yield __await(this._listByBillingAccount(billingAccountName, options));
247
- let page = result.value || [];
248
- continuationToken = result.nextLink;
249
- setContinuationToken(page, continuationToken);
250
- yield yield __await(page);
251
- }
252
- while (continuationToken) {
253
- result = yield __await(this._listByBillingAccountNext(billingAccountName, continuationToken, options));
254
- continuationToken = result.nextLink;
255
- let page = result.value || [];
256
- setContinuationToken(page, continuationToken);
257
- yield yield __await(page);
258
- }
259
- });
190
+ async *listByBillingAccountPagingPage(billingAccountName, options, settings) {
191
+ let result;
192
+ let continuationToken = settings?.continuationToken;
193
+ if (!continuationToken) {
194
+ result = await this._listByBillingAccount(billingAccountName, options);
195
+ let page = result.value || [];
196
+ continuationToken = result.nextLink;
197
+ setContinuationToken(page, continuationToken);
198
+ yield page;
199
+ }
200
+ while (continuationToken) {
201
+ result = await this._listByBillingAccountNext(billingAccountName, continuationToken, options);
202
+ continuationToken = result.nextLink;
203
+ let page = result.value || [];
204
+ setContinuationToken(page, continuationToken);
205
+ yield page;
206
+ }
260
207
  }
261
- listByBillingAccountPagingAll(billingAccountName, options) {
262
- return __asyncGenerator(this, arguments, function* listByBillingAccountPagingAll_1() {
263
- var _a, e_4, _b, _c;
264
- try {
265
- for (var _d = true, _e = __asyncValues(this.listByBillingAccountPagingPage(billingAccountName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
266
- _c = _f.value;
267
- _d = false;
268
- const page = _c;
269
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
270
- }
271
- }
272
- catch (e_4_1) { e_4 = { error: e_4_1 }; }
273
- finally {
274
- try {
275
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
276
- }
277
- finally { if (e_4) throw e_4.error; }
278
- }
279
- });
208
+ async *listByBillingAccountPagingAll(billingAccountName, options) {
209
+ for await (const page of this.listByBillingAccountPagingPage(billingAccountName, options)) {
210
+ yield* page;
211
+ }
280
212
  }
281
213
  /**
282
214
  * Lists the subscriptions for a customer at billing account level. The operation is supported only for
@@ -295,52 +227,35 @@ export class BillingSubscriptionsImpl {
295
227
  return this;
296
228
  },
297
229
  byPage: (settings) => {
298
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
230
+ if (settings?.maxPageSize) {
299
231
  throw new Error("maxPageSize is not supported by this operation.");
300
232
  }
301
233
  return this.listByCustomerAtBillingAccountPagingPage(billingAccountName, customerName, options, settings);
302
234
  },
303
235
  };
304
236
  }
305
- listByCustomerAtBillingAccountPagingPage(billingAccountName, customerName, options, settings) {
306
- return __asyncGenerator(this, arguments, function* listByCustomerAtBillingAccountPagingPage_1() {
307
- let result;
308
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
309
- if (!continuationToken) {
310
- result = yield __await(this._listByCustomerAtBillingAccount(billingAccountName, customerName, options));
311
- let page = result.value || [];
312
- continuationToken = result.nextLink;
313
- setContinuationToken(page, continuationToken);
314
- yield yield __await(page);
315
- }
316
- while (continuationToken) {
317
- result = yield __await(this._listByCustomerAtBillingAccountNext(billingAccountName, customerName, continuationToken, options));
318
- continuationToken = result.nextLink;
319
- let page = result.value || [];
320
- setContinuationToken(page, continuationToken);
321
- yield yield __await(page);
322
- }
323
- });
237
+ async *listByCustomerAtBillingAccountPagingPage(billingAccountName, customerName, options, settings) {
238
+ let result;
239
+ let continuationToken = settings?.continuationToken;
240
+ if (!continuationToken) {
241
+ result = await this._listByCustomerAtBillingAccount(billingAccountName, customerName, options);
242
+ let page = result.value || [];
243
+ continuationToken = result.nextLink;
244
+ setContinuationToken(page, continuationToken);
245
+ yield page;
246
+ }
247
+ while (continuationToken) {
248
+ result = await this._listByCustomerAtBillingAccountNext(billingAccountName, customerName, continuationToken, options);
249
+ continuationToken = result.nextLink;
250
+ let page = result.value || [];
251
+ setContinuationToken(page, continuationToken);
252
+ yield page;
253
+ }
324
254
  }
325
- listByCustomerAtBillingAccountPagingAll(billingAccountName, customerName, options) {
326
- return __asyncGenerator(this, arguments, function* listByCustomerAtBillingAccountPagingAll_1() {
327
- var _a, e_5, _b, _c;
328
- try {
329
- for (var _d = true, _e = __asyncValues(this.listByCustomerAtBillingAccountPagingPage(billingAccountName, customerName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
330
- _c = _f.value;
331
- _d = false;
332
- const page = _c;
333
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
334
- }
335
- }
336
- catch (e_5_1) { e_5 = { error: e_5_1 }; }
337
- finally {
338
- try {
339
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
340
- }
341
- finally { if (e_5) throw e_5.error; }
342
- }
343
- });
255
+ async *listByCustomerAtBillingAccountPagingAll(billingAccountName, customerName, options) {
256
+ for await (const page of this.listByCustomerAtBillingAccountPagingPage(billingAccountName, customerName, options)) {
257
+ yield* page;
258
+ }
344
259
  }
345
260
  /**
346
261
  * Lists the subscriptions for an enrollment account. The operation is supported for billing accounts
@@ -359,52 +274,35 @@ export class BillingSubscriptionsImpl {
359
274
  return this;
360
275
  },
361
276
  byPage: (settings) => {
362
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
277
+ if (settings?.maxPageSize) {
363
278
  throw new Error("maxPageSize is not supported by this operation.");
364
279
  }
365
280
  return this.listByEnrollmentAccountPagingPage(billingAccountName, enrollmentAccountName, options, settings);
366
281
  },
367
282
  };
368
283
  }
369
- listByEnrollmentAccountPagingPage(billingAccountName, enrollmentAccountName, options, settings) {
370
- return __asyncGenerator(this, arguments, function* listByEnrollmentAccountPagingPage_1() {
371
- let result;
372
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
373
- if (!continuationToken) {
374
- result = yield __await(this._listByEnrollmentAccount(billingAccountName, enrollmentAccountName, options));
375
- let page = result.value || [];
376
- continuationToken = result.nextLink;
377
- setContinuationToken(page, continuationToken);
378
- yield yield __await(page);
379
- }
380
- while (continuationToken) {
381
- result = yield __await(this._listByEnrollmentAccountNext(billingAccountName, enrollmentAccountName, continuationToken, options));
382
- continuationToken = result.nextLink;
383
- let page = result.value || [];
384
- setContinuationToken(page, continuationToken);
385
- yield yield __await(page);
386
- }
387
- });
284
+ async *listByEnrollmentAccountPagingPage(billingAccountName, enrollmentAccountName, options, settings) {
285
+ let result;
286
+ let continuationToken = settings?.continuationToken;
287
+ if (!continuationToken) {
288
+ result = await this._listByEnrollmentAccount(billingAccountName, enrollmentAccountName, options);
289
+ let page = result.value || [];
290
+ continuationToken = result.nextLink;
291
+ setContinuationToken(page, continuationToken);
292
+ yield page;
293
+ }
294
+ while (continuationToken) {
295
+ result = await this._listByEnrollmentAccountNext(billingAccountName, enrollmentAccountName, continuationToken, options);
296
+ continuationToken = result.nextLink;
297
+ let page = result.value || [];
298
+ setContinuationToken(page, continuationToken);
299
+ yield page;
300
+ }
388
301
  }
389
- listByEnrollmentAccountPagingAll(billingAccountName, enrollmentAccountName, options) {
390
- return __asyncGenerator(this, arguments, function* listByEnrollmentAccountPagingAll_1() {
391
- var _a, e_6, _b, _c;
392
- try {
393
- for (var _d = true, _e = __asyncValues(this.listByEnrollmentAccountPagingPage(billingAccountName, enrollmentAccountName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
394
- _c = _f.value;
395
- _d = false;
396
- const page = _c;
397
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
398
- }
399
- }
400
- catch (e_6_1) { e_6 = { error: e_6_1 }; }
401
- finally {
402
- try {
403
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
404
- }
405
- finally { if (e_6) throw e_6.error; }
406
- }
407
- });
302
+ async *listByEnrollmentAccountPagingAll(billingAccountName, enrollmentAccountName, options) {
303
+ for await (const page of this.listByEnrollmentAccountPagingPage(billingAccountName, enrollmentAccountName, options)) {
304
+ yield* page;
305
+ }
408
306
  }
409
307
  /**
410
308
  * Gets a subscription by its billing profile and ID. The operation is supported for billing accounts
@@ -467,14 +365,19 @@ export class BillingSubscriptionsImpl {
467
365
  return this.client.sendOperationRequest(args, spec);
468
366
  };
469
367
  const sendOperationFn = async (args, spec) => {
470
- var _a;
471
368
  let currentRawResponse = undefined;
472
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
369
+ const providedCallback = args.options?.onResponse;
473
370
  const callback = (rawResponse, flatResponse) => {
474
371
  currentRawResponse = rawResponse;
475
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
372
+ providedCallback?.(rawResponse, flatResponse);
373
+ };
374
+ const updatedArgs = {
375
+ ...args,
376
+ options: {
377
+ ...args.options,
378
+ onResponse: callback,
379
+ },
476
380
  };
477
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
478
381
  const flatResponse = await directSendOperation(updatedArgs, spec);
479
382
  return {
480
383
  flatResponse,
@@ -496,8 +399,8 @@ export class BillingSubscriptionsImpl {
496
399
  spec: cancelOperationSpec,
497
400
  });
498
401
  const poller = await createHttpPoller(lro, {
499
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
500
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
402
+ restoreFrom: options?.resumeFrom,
403
+ intervalInMs: options?.updateIntervalInMs,
501
404
  resourceLocationConfig: "location",
502
405
  });
503
406
  await poller.poll();
@@ -527,14 +430,19 @@ export class BillingSubscriptionsImpl {
527
430
  return this.client.sendOperationRequest(args, spec);
528
431
  };
529
432
  const sendOperationFn = async (args, spec) => {
530
- var _a;
531
433
  let currentRawResponse = undefined;
532
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
434
+ const providedCallback = args.options?.onResponse;
533
435
  const callback = (rawResponse, flatResponse) => {
534
436
  currentRawResponse = rawResponse;
535
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
437
+ providedCallback?.(rawResponse, flatResponse);
438
+ };
439
+ const updatedArgs = {
440
+ ...args,
441
+ options: {
442
+ ...args.options,
443
+ onResponse: callback,
444
+ },
536
445
  };
537
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
538
446
  const flatResponse = await directSendOperation(updatedArgs, spec);
539
447
  return {
540
448
  flatResponse,
@@ -556,8 +464,8 @@ export class BillingSubscriptionsImpl {
556
464
  spec: mergeOperationSpec,
557
465
  });
558
466
  const poller = await createHttpPoller(lro, {
559
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
560
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
467
+ restoreFrom: options?.resumeFrom,
468
+ intervalInMs: options?.updateIntervalInMs,
561
469
  resourceLocationConfig: "location",
562
470
  });
563
471
  await poller.poll();
@@ -588,14 +496,19 @@ export class BillingSubscriptionsImpl {
588
496
  return this.client.sendOperationRequest(args, spec);
589
497
  };
590
498
  const sendOperationFn = async (args, spec) => {
591
- var _a;
592
499
  let currentRawResponse = undefined;
593
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
500
+ const providedCallback = args.options?.onResponse;
594
501
  const callback = (rawResponse, flatResponse) => {
595
502
  currentRawResponse = rawResponse;
596
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
503
+ providedCallback?.(rawResponse, flatResponse);
504
+ };
505
+ const updatedArgs = {
506
+ ...args,
507
+ options: {
508
+ ...args.options,
509
+ onResponse: callback,
510
+ },
597
511
  };
598
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
599
512
  const flatResponse = await directSendOperation(updatedArgs, spec);
600
513
  return {
601
514
  flatResponse,
@@ -617,8 +530,8 @@ export class BillingSubscriptionsImpl {
617
530
  spec: moveOperationSpec,
618
531
  });
619
532
  const poller = await createHttpPoller(lro, {
620
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
621
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
533
+ restoreFrom: options?.resumeFrom,
534
+ intervalInMs: options?.updateIntervalInMs,
622
535
  resourceLocationConfig: "location",
623
536
  });
624
537
  await poller.poll();
@@ -650,14 +563,19 @@ export class BillingSubscriptionsImpl {
650
563
  return this.client.sendOperationRequest(args, spec);
651
564
  };
652
565
  const sendOperationFn = async (args, spec) => {
653
- var _a;
654
566
  let currentRawResponse = undefined;
655
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
567
+ const providedCallback = args.options?.onResponse;
656
568
  const callback = (rawResponse, flatResponse) => {
657
569
  currentRawResponse = rawResponse;
658
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
570
+ providedCallback?.(rawResponse, flatResponse);
571
+ };
572
+ const updatedArgs = {
573
+ ...args,
574
+ options: {
575
+ ...args.options,
576
+ onResponse: callback,
577
+ },
659
578
  };
660
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
661
579
  const flatResponse = await directSendOperation(updatedArgs, spec);
662
580
  return {
663
581
  flatResponse,
@@ -679,8 +597,8 @@ export class BillingSubscriptionsImpl {
679
597
  spec: splitOperationSpec,
680
598
  });
681
599
  const poller = await createHttpPoller(lro, {
682
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
683
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
600
+ restoreFrom: options?.resumeFrom,
601
+ intervalInMs: options?.updateIntervalInMs,
684
602
  resourceLocationConfig: "location",
685
603
  });
686
604
  await poller.poll();
@@ -721,14 +639,19 @@ export class BillingSubscriptionsImpl {
721
639
  return this.client.sendOperationRequest(args, spec);
722
640
  };
723
641
  const sendOperationFn = async (args, spec) => {
724
- var _a;
725
642
  let currentRawResponse = undefined;
726
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
643
+ const providedCallback = args.options?.onResponse;
727
644
  const callback = (rawResponse, flatResponse) => {
728
645
  currentRawResponse = rawResponse;
729
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
646
+ providedCallback?.(rawResponse, flatResponse);
647
+ };
648
+ const updatedArgs = {
649
+ ...args,
650
+ options: {
651
+ ...args.options,
652
+ onResponse: callback,
653
+ },
730
654
  };
731
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
732
655
  const flatResponse = await directSendOperation(updatedArgs, spec);
733
656
  return {
734
657
  flatResponse,
@@ -745,8 +668,8 @@ export class BillingSubscriptionsImpl {
745
668
  spec: deleteOperationSpec,
746
669
  });
747
670
  const poller = await createHttpPoller(lro, {
748
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
749
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
671
+ restoreFrom: options?.resumeFrom,
672
+ intervalInMs: options?.updateIntervalInMs,
750
673
  resourceLocationConfig: "location",
751
674
  });
752
675
  await poller.poll();
@@ -785,14 +708,19 @@ export class BillingSubscriptionsImpl {
785
708
  return this.client.sendOperationRequest(args, spec);
786
709
  };
787
710
  const sendOperationFn = async (args, spec) => {
788
- var _a;
789
711
  let currentRawResponse = undefined;
790
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
712
+ const providedCallback = args.options?.onResponse;
791
713
  const callback = (rawResponse, flatResponse) => {
792
714
  currentRawResponse = rawResponse;
793
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
715
+ providedCallback?.(rawResponse, flatResponse);
716
+ };
717
+ const updatedArgs = {
718
+ ...args,
719
+ options: {
720
+ ...args.options,
721
+ onResponse: callback,
722
+ },
794
723
  };
795
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
796
724
  const flatResponse = await directSendOperation(updatedArgs, spec);
797
725
  return {
798
726
  flatResponse,
@@ -814,8 +742,8 @@ export class BillingSubscriptionsImpl {
814
742
  spec: updateOperationSpec,
815
743
  });
816
744
  const poller = await createHttpPoller(lro, {
817
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
818
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
745
+ restoreFrom: options?.resumeFrom,
746
+ intervalInMs: options?.updateIntervalInMs,
819
747
  resourceLocationConfig: "location",
820
748
  });
821
749
  await poller.poll();