@azure/arm-consumption 9.2.1-alpha.20250619.1 → 9.2.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 (163) hide show
  1. package/dist/browser/consumptionManagementClient.js +30 -5
  2. package/dist/browser/consumptionManagementClient.js.map +1 -1
  3. package/dist/browser/models/mappers.js +798 -385
  4. package/dist/browser/models/mappers.js.map +1 -1
  5. package/dist/browser/operations/aggregatedCost.js +1 -0
  6. package/dist/browser/operations/aggregatedCost.js.map +1 -1
  7. package/dist/browser/operations/balances.js +1 -0
  8. package/dist/browser/operations/balances.js.map +1 -1
  9. package/dist/browser/operations/budgets.js +23 -40
  10. package/dist/browser/operations/budgets.js.map +1 -1
  11. package/dist/browser/operations/charges.js +1 -0
  12. package/dist/browser/operations/charges.js.map +1 -1
  13. package/dist/browser/operations/credits.js +1 -0
  14. package/dist/browser/operations/credits.js.map +1 -1
  15. package/dist/browser/operations/eventsOperations.js +45 -79
  16. package/dist/browser/operations/eventsOperations.js.map +1 -1
  17. package/dist/browser/operations/lotsOperations.js +45 -79
  18. package/dist/browser/operations/lotsOperations.js.map +1 -1
  19. package/dist/browser/operations/marketplaces.js +23 -40
  20. package/dist/browser/operations/marketplaces.js.map +1 -1
  21. package/dist/browser/operations/operations.js +23 -40
  22. package/dist/browser/operations/operations.js.map +1 -1
  23. package/dist/browser/operations/priceSheet.js +1 -0
  24. package/dist/browser/operations/priceSheet.js.map +1 -1
  25. package/dist/browser/operations/reservationRecommendationDetails.js +1 -0
  26. package/dist/browser/operations/reservationRecommendationDetails.js.map +1 -1
  27. package/dist/browser/operations/reservationRecommendations.js +23 -40
  28. package/dist/browser/operations/reservationRecommendations.js.map +1 -1
  29. package/dist/browser/operations/reservationTransactions.js +45 -79
  30. package/dist/browser/operations/reservationTransactions.js.map +1 -1
  31. package/dist/browser/operations/reservationsDetails.js +67 -118
  32. package/dist/browser/operations/reservationsDetails.js.map +1 -1
  33. package/dist/browser/operations/reservationsSummaries.js +67 -118
  34. package/dist/browser/operations/reservationsSummaries.js.map +1 -1
  35. package/dist/browser/operations/tags.js +1 -0
  36. package/dist/browser/operations/tags.js.map +1 -1
  37. package/dist/browser/operations/usageDetails.js +23 -40
  38. package/dist/browser/operations/usageDetails.js.map +1 -1
  39. package/dist/browser/pagingHelper.js +2 -4
  40. package/dist/browser/pagingHelper.js.map +1 -1
  41. package/dist/commonjs/consumptionManagementClient.js +30 -5
  42. package/dist/commonjs/consumptionManagementClient.js.map +1 -1
  43. package/dist/commonjs/models/mappers.js +798 -385
  44. package/dist/commonjs/models/mappers.js.map +1 -1
  45. package/dist/commonjs/operations/aggregatedCost.js +1 -0
  46. package/dist/commonjs/operations/aggregatedCost.js.map +1 -1
  47. package/dist/commonjs/operations/balances.js +1 -0
  48. package/dist/commonjs/operations/balances.js.map +1 -1
  49. package/dist/commonjs/operations/budgets.js +23 -39
  50. package/dist/commonjs/operations/budgets.js.map +1 -1
  51. package/dist/commonjs/operations/charges.js +1 -0
  52. package/dist/commonjs/operations/charges.js.map +1 -1
  53. package/dist/commonjs/operations/credits.js +1 -0
  54. package/dist/commonjs/operations/credits.js.map +1 -1
  55. package/dist/commonjs/operations/eventsOperations.js +45 -78
  56. package/dist/commonjs/operations/eventsOperations.js.map +1 -1
  57. package/dist/commonjs/operations/lotsOperations.js +45 -78
  58. package/dist/commonjs/operations/lotsOperations.js.map +1 -1
  59. package/dist/commonjs/operations/marketplaces.js +23 -39
  60. package/dist/commonjs/operations/marketplaces.js.map +1 -1
  61. package/dist/commonjs/operations/operations.js +23 -39
  62. package/dist/commonjs/operations/operations.js.map +1 -1
  63. package/dist/commonjs/operations/priceSheet.js +1 -0
  64. package/dist/commonjs/operations/priceSheet.js.map +1 -1
  65. package/dist/commonjs/operations/reservationRecommendationDetails.js +1 -0
  66. package/dist/commonjs/operations/reservationRecommendationDetails.js.map +1 -1
  67. package/dist/commonjs/operations/reservationRecommendations.js +23 -39
  68. package/dist/commonjs/operations/reservationRecommendations.js.map +1 -1
  69. package/dist/commonjs/operations/reservationTransactions.js +45 -78
  70. package/dist/commonjs/operations/reservationTransactions.js.map +1 -1
  71. package/dist/commonjs/operations/reservationsDetails.js +67 -117
  72. package/dist/commonjs/operations/reservationsDetails.js.map +1 -1
  73. package/dist/commonjs/operations/reservationsSummaries.js +67 -117
  74. package/dist/commonjs/operations/reservationsSummaries.js.map +1 -1
  75. package/dist/commonjs/operations/tags.js +1 -0
  76. package/dist/commonjs/operations/tags.js.map +1 -1
  77. package/dist/commonjs/operations/usageDetails.js +23 -39
  78. package/dist/commonjs/operations/usageDetails.js.map +1 -1
  79. package/dist/commonjs/pagingHelper.js +2 -4
  80. package/dist/commonjs/pagingHelper.js.map +1 -1
  81. package/dist/commonjs/tsdoc-metadata.json +11 -11
  82. package/dist/esm/consumptionManagementClient.js +30 -5
  83. package/dist/esm/consumptionManagementClient.js.map +1 -1
  84. package/dist/esm/models/mappers.js +798 -385
  85. package/dist/esm/models/mappers.js.map +1 -1
  86. package/dist/esm/operations/aggregatedCost.js +1 -0
  87. package/dist/esm/operations/aggregatedCost.js.map +1 -1
  88. package/dist/esm/operations/balances.js +1 -0
  89. package/dist/esm/operations/balances.js.map +1 -1
  90. package/dist/esm/operations/budgets.js +23 -40
  91. package/dist/esm/operations/budgets.js.map +1 -1
  92. package/dist/esm/operations/charges.js +1 -0
  93. package/dist/esm/operations/charges.js.map +1 -1
  94. package/dist/esm/operations/credits.js +1 -0
  95. package/dist/esm/operations/credits.js.map +1 -1
  96. package/dist/esm/operations/eventsOperations.js +45 -79
  97. package/dist/esm/operations/eventsOperations.js.map +1 -1
  98. package/dist/esm/operations/lotsOperations.js +45 -79
  99. package/dist/esm/operations/lotsOperations.js.map +1 -1
  100. package/dist/esm/operations/marketplaces.js +23 -40
  101. package/dist/esm/operations/marketplaces.js.map +1 -1
  102. package/dist/esm/operations/operations.js +23 -40
  103. package/dist/esm/operations/operations.js.map +1 -1
  104. package/dist/esm/operations/priceSheet.js +1 -0
  105. package/dist/esm/operations/priceSheet.js.map +1 -1
  106. package/dist/esm/operations/reservationRecommendationDetails.js +1 -0
  107. package/dist/esm/operations/reservationRecommendationDetails.js.map +1 -1
  108. package/dist/esm/operations/reservationRecommendations.js +23 -40
  109. package/dist/esm/operations/reservationRecommendations.js.map +1 -1
  110. package/dist/esm/operations/reservationTransactions.js +45 -79
  111. package/dist/esm/operations/reservationTransactions.js.map +1 -1
  112. package/dist/esm/operations/reservationsDetails.js +67 -118
  113. package/dist/esm/operations/reservationsDetails.js.map +1 -1
  114. package/dist/esm/operations/reservationsSummaries.js +67 -118
  115. package/dist/esm/operations/reservationsSummaries.js.map +1 -1
  116. package/dist/esm/operations/tags.js +1 -0
  117. package/dist/esm/operations/tags.js.map +1 -1
  118. package/dist/esm/operations/usageDetails.js +23 -40
  119. package/dist/esm/operations/usageDetails.js.map +1 -1
  120. package/dist/esm/pagingHelper.js +2 -4
  121. package/dist/esm/pagingHelper.js.map +1 -1
  122. package/dist/react-native/consumptionManagementClient.js +30 -5
  123. package/dist/react-native/consumptionManagementClient.js.map +1 -1
  124. package/dist/react-native/models/mappers.js +798 -385
  125. package/dist/react-native/models/mappers.js.map +1 -1
  126. package/dist/react-native/operations/aggregatedCost.js +1 -0
  127. package/dist/react-native/operations/aggregatedCost.js.map +1 -1
  128. package/dist/react-native/operations/balances.js +1 -0
  129. package/dist/react-native/operations/balances.js.map +1 -1
  130. package/dist/react-native/operations/budgets.js +23 -40
  131. package/dist/react-native/operations/budgets.js.map +1 -1
  132. package/dist/react-native/operations/charges.js +1 -0
  133. package/dist/react-native/operations/charges.js.map +1 -1
  134. package/dist/react-native/operations/credits.js +1 -0
  135. package/dist/react-native/operations/credits.js.map +1 -1
  136. package/dist/react-native/operations/eventsOperations.js +45 -79
  137. package/dist/react-native/operations/eventsOperations.js.map +1 -1
  138. package/dist/react-native/operations/lotsOperations.js +45 -79
  139. package/dist/react-native/operations/lotsOperations.js.map +1 -1
  140. package/dist/react-native/operations/marketplaces.js +23 -40
  141. package/dist/react-native/operations/marketplaces.js.map +1 -1
  142. package/dist/react-native/operations/operations.js +23 -40
  143. package/dist/react-native/operations/operations.js.map +1 -1
  144. package/dist/react-native/operations/priceSheet.js +1 -0
  145. package/dist/react-native/operations/priceSheet.js.map +1 -1
  146. package/dist/react-native/operations/reservationRecommendationDetails.js +1 -0
  147. package/dist/react-native/operations/reservationRecommendationDetails.js.map +1 -1
  148. package/dist/react-native/operations/reservationRecommendations.js +23 -40
  149. package/dist/react-native/operations/reservationRecommendations.js.map +1 -1
  150. package/dist/react-native/operations/reservationTransactions.js +45 -79
  151. package/dist/react-native/operations/reservationTransactions.js.map +1 -1
  152. package/dist/react-native/operations/reservationsDetails.js +67 -118
  153. package/dist/react-native/operations/reservationsDetails.js.map +1 -1
  154. package/dist/react-native/operations/reservationsSummaries.js +67 -118
  155. package/dist/react-native/operations/reservationsSummaries.js.map +1 -1
  156. package/dist/react-native/operations/tags.js +1 -0
  157. package/dist/react-native/operations/tags.js.map +1 -1
  158. package/dist/react-native/operations/usageDetails.js +23 -40
  159. package/dist/react-native/operations/usageDetails.js.map +1 -1
  160. package/dist/react-native/pagingHelper.js +2 -4
  161. package/dist/react-native/pagingHelper.js.map +1 -1
  162. package/package.json +2 -2
  163. /package/review/{arm-consumption.api.md → arm-consumption-node.api.md} +0 -0
@@ -14,6 +14,7 @@ const Mappers = tslib_1.__importStar(require("../models/mappers.js"));
14
14
  const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
15
15
  /** Class containing AggregatedCost operations. */
16
16
  class AggregatedCostImpl {
17
+ client;
17
18
  /**
18
19
  * Initialize a new instance of the class AggregatedCost class.
19
20
  * @param client Reference to the service client
@@ -1 +1 @@
1
- {"version":3,"file":"aggregatedCost.js","sourceRoot":"","sources":["../../../src/operations/aggregatedCost.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAStD,k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,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,iBAAiB;KAC7B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { AggregatedCost } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { ConsumptionManagementClient } from \"../consumptionManagementClient.js\";\nimport {\n AggregatedCostGetByManagementGroupOptionalParams,\n AggregatedCostGetByManagementGroupResponse,\n AggregatedCostGetForBillingPeriodByManagementGroupOptionalParams,\n AggregatedCostGetForBillingPeriodByManagementGroupResponse\n} from \"../models/index.js\";\n\n/** Class containing AggregatedCost operations. */\nexport class AggregatedCostImpl implements AggregatedCost {\n private readonly client: ConsumptionManagementClient;\n\n /**\n * Initialize a new instance of the class AggregatedCost class.\n * @param client Reference to the service client\n */\n constructor(client: ConsumptionManagementClient) {\n this.client = client;\n }\n\n /**\n * Provides the aggregate cost of a management group and all child management groups by current billing\n * period.\n * @param managementGroupId Azure Management Group ID.\n * @param options The options parameters.\n */\n getByManagementGroup(\n managementGroupId: string,\n options?: AggregatedCostGetByManagementGroupOptionalParams\n ): Promise<AggregatedCostGetByManagementGroupResponse> {\n return this.client.sendOperationRequest(\n { managementGroupId, options },\n getByManagementGroupOperationSpec\n );\n }\n\n /**\n * Provides the aggregate cost of a management group and all child management groups by specified\n * billing period\n * @param managementGroupId Azure Management Group ID.\n * @param billingPeriodName Billing Period Name.\n * @param options The options parameters.\n */\n getForBillingPeriodByManagementGroup(\n managementGroupId: string,\n billingPeriodName: string,\n options?: AggregatedCostGetForBillingPeriodByManagementGroupOptionalParams\n ): Promise<AggregatedCostGetForBillingPeriodByManagementGroupResponse> {\n return this.client.sendOperationRequest(\n { managementGroupId, billingPeriodName, options },\n getForBillingPeriodByManagementGroupOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getByManagementGroupOperationSpec: coreClient.OperationSpec = {\n path:\n \"/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Consumption/aggregatedcost\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ManagementGroupAggregatedCostResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.filter, Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.managementGroupId],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getForBillingPeriodByManagementGroupOperationSpec: coreClient.OperationSpec = {\n path:\n \"/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/aggregatedCost\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ManagementGroupAggregatedCostResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.billingPeriodName,\n Parameters.managementGroupId\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
1
+ {"version":3,"file":"aggregatedCost.js","sourceRoot":"","sources":["../../../src/operations/aggregatedCost.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAStD,kDAAkD;AAClD,MAAa,kBAAkB;IACZ,MAAM,CAA8B;IAErD;;;OAGG;IACH,YAAY,MAAm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IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,iBAAiB;KAC7B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { AggregatedCost } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { ConsumptionManagementClient } from \"../consumptionManagementClient.js\";\nimport {\n AggregatedCostGetByManagementGroupOptionalParams,\n AggregatedCostGetByManagementGroupResponse,\n AggregatedCostGetForBillingPeriodByManagementGroupOptionalParams,\n AggregatedCostGetForBillingPeriodByManagementGroupResponse\n} from \"../models/index.js\";\n\n/** Class containing AggregatedCost operations. */\nexport class AggregatedCostImpl implements AggregatedCost {\n private readonly client: ConsumptionManagementClient;\n\n /**\n * Initialize a new instance of the class AggregatedCost class.\n * @param client Reference to the service client\n */\n constructor(client: ConsumptionManagementClient) {\n this.client = client;\n }\n\n /**\n * Provides the aggregate cost of a management group and all child management groups by current billing\n * period.\n * @param managementGroupId Azure Management Group ID.\n * @param options The options parameters.\n */\n getByManagementGroup(\n managementGroupId: string,\n options?: AggregatedCostGetByManagementGroupOptionalParams\n ): Promise<AggregatedCostGetByManagementGroupResponse> {\n return this.client.sendOperationRequest(\n { managementGroupId, options },\n getByManagementGroupOperationSpec\n );\n }\n\n /**\n * Provides the aggregate cost of a management group and all child management groups by specified\n * billing period\n * @param managementGroupId Azure Management Group ID.\n * @param billingPeriodName Billing Period Name.\n * @param options The options parameters.\n */\n getForBillingPeriodByManagementGroup(\n managementGroupId: string,\n billingPeriodName: string,\n options?: AggregatedCostGetForBillingPeriodByManagementGroupOptionalParams\n ): Promise<AggregatedCostGetForBillingPeriodByManagementGroupResponse> {\n return this.client.sendOperationRequest(\n { managementGroupId, billingPeriodName, options },\n getForBillingPeriodByManagementGroupOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getByManagementGroupOperationSpec: coreClient.OperationSpec = {\n path:\n \"/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Consumption/aggregatedcost\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ManagementGroupAggregatedCostResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.filter, Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.managementGroupId],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getForBillingPeriodByManagementGroupOperationSpec: coreClient.OperationSpec = {\n path:\n \"/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/aggregatedCost\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ManagementGroupAggregatedCostResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.billingPeriodName,\n Parameters.managementGroupId\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
@@ -14,6 +14,7 @@ const Mappers = tslib_1.__importStar(require("../models/mappers.js"));
14
14
  const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
15
15
  /** Class containing Balances operations. */
16
16
  class BalancesImpl {
17
+ client;
17
18
  /**
18
19
  * Initialize a new instance of the class Balances class.
19
20
  * @param client Reference to the service client
@@ -1 +1 @@
1
- {"version":3,"file":"balances.js","sourceRoot":"","sources":["../../../src/operations/balances.ts"],"names":[],"mappings":";AA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H,UAAU,EAAE,OAAO,CAAC,OAAO;SAC5B;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,gBAAgB;QAC3B,UAAU,CAAC,iBAAiB;KAC7B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { Balances } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { ConsumptionManagementClient } from \"../consumptionManagementClient.js\";\nimport {\n BalancesGetByBillingAccountOptionalParams,\n BalancesGetByBillingAccountResponse,\n BalancesGetForBillingPeriodByBillingAccountOptionalParams,\n BalancesGetForBillingPeriodByBillingAccountResponse\n} from \"../models/index.js\";\n\n/** Class containing Balances operations. */\nexport class BalancesImpl implements Balances {\n private readonly client: ConsumptionManagementClient;\n\n /**\n * Initialize a new instance of the class Balances class.\n * @param client Reference to the service client\n */\n constructor(client: ConsumptionManagementClient) {\n this.client = client;\n }\n\n /**\n * Gets the balances for a scope by billingAccountId. Balances are available via this API only for May\n * 1, 2014 or later.\n * @param billingAccountId BillingAccount ID\n * @param options The options parameters.\n */\n getByBillingAccount(\n billingAccountId: string,\n options?: BalancesGetByBillingAccountOptionalParams\n ): Promise<BalancesGetByBillingAccountResponse> {\n return this.client.sendOperationRequest(\n { billingAccountId, options },\n getByBillingAccountOperationSpec\n );\n }\n\n /**\n * Gets the balances for a scope by billing period and billingAccountId. Balances are available via\n * this API only for May 1, 2014 or later.\n * @param billingAccountId BillingAccount ID\n * @param billingPeriodName Billing Period Name.\n * @param options The options parameters.\n */\n getForBillingPeriodByBillingAccount(\n billingAccountId: string,\n billingPeriodName: string,\n options?: BalancesGetForBillingPeriodByBillingAccountOptionalParams\n ): Promise<BalancesGetForBillingPeriodByBillingAccountResponse> {\n return this.client.sendOperationRequest(\n { billingAccountId, billingPeriodName, options },\n getForBillingPeriodByBillingAccountOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getByBillingAccountOperationSpec: coreClient.OperationSpec = {\n path:\n \"/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/balances\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Balance\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.billingAccountId],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getForBillingPeriodByBillingAccountOperationSpec: coreClient.OperationSpec = {\n path:\n \"/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/balances\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Balance\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.billingAccountId,\n Parameters.billingPeriodName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
1
+ {"version":3,"file":"balances.js","sourceRoot":"","sources":["../../../src/operations/balances.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAStD,4CAA4C;AAC5C,MAAa,YAAY;IACN,MAAM,CAA8B;IAErD;;;OAGG;IACH,YAAY,MAAmC;QAC7C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAA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,KAAK;QAChB,UAAU,CAAC,gBAAgB;QAC3B,UAAU,CAAC,iBAAiB;KAC7B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { Balances } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { ConsumptionManagementClient } from \"../consumptionManagementClient.js\";\nimport {\n BalancesGetByBillingAccountOptionalParams,\n BalancesGetByBillingAccountResponse,\n BalancesGetForBillingPeriodByBillingAccountOptionalParams,\n BalancesGetForBillingPeriodByBillingAccountResponse\n} from \"../models/index.js\";\n\n/** Class containing Balances operations. */\nexport class BalancesImpl implements Balances {\n private readonly client: ConsumptionManagementClient;\n\n /**\n * Initialize a new instance of the class Balances class.\n * @param client Reference to the service client\n */\n constructor(client: ConsumptionManagementClient) {\n this.client = client;\n }\n\n /**\n * Gets the balances for a scope by billingAccountId. Balances are available via this API only for May\n * 1, 2014 or later.\n * @param billingAccountId BillingAccount ID\n * @param options The options parameters.\n */\n getByBillingAccount(\n billingAccountId: string,\n options?: BalancesGetByBillingAccountOptionalParams\n ): Promise<BalancesGetByBillingAccountResponse> {\n return this.client.sendOperationRequest(\n { billingAccountId, options },\n getByBillingAccountOperationSpec\n );\n }\n\n /**\n * Gets the balances for a scope by billing period and billingAccountId. Balances are available via\n * this API only for May 1, 2014 or later.\n * @param billingAccountId BillingAccount ID\n * @param billingPeriodName Billing Period Name.\n * @param options The options parameters.\n */\n getForBillingPeriodByBillingAccount(\n billingAccountId: string,\n billingPeriodName: string,\n options?: BalancesGetForBillingPeriodByBillingAccountOptionalParams\n ): Promise<BalancesGetForBillingPeriodByBillingAccountResponse> {\n return this.client.sendOperationRequest(\n { billingAccountId, billingPeriodName, options },\n getForBillingPeriodByBillingAccountOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getByBillingAccountOperationSpec: coreClient.OperationSpec = {\n path:\n \"/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/balances\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Balance\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.billingAccountId],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getForBillingPeriodByBillingAccountOperationSpec: coreClient.OperationSpec = {\n path:\n \"/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/balances\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Balance\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.billingAccountId,\n Parameters.billingPeriodName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
@@ -16,6 +16,7 @@ const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
16
16
  /// <reference lib="esnext.asynciterable" />
17
17
  /** Class containing Budgets operations. */
18
18
  class BudgetsImpl {
19
+ client;
19
20
  /**
20
21
  * Initialize a new instance of the class Budgets class.
21
22
  * @param client Reference to the service client
@@ -50,52 +51,35 @@ class BudgetsImpl {
50
51
  return this;
51
52
  },
52
53
  byPage: (settings) => {
53
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
54
+ if (settings?.maxPageSize) {
54
55
  throw new Error("maxPageSize is not supported by this operation.");
55
56
  }
56
57
  return this.listPagingPage(scope, options, settings);
57
58
  }
58
59
  };
59
60
  }
60
- listPagingPage(scope, options, settings) {
61
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingPage_1() {
62
- let result;
63
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
64
- if (!continuationToken) {
65
- result = yield tslib_1.__await(this._list(scope, options));
66
- let page = result.value || [];
67
- continuationToken = result.nextLink;
68
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
69
- yield yield tslib_1.__await(page);
70
- }
71
- while (continuationToken) {
72
- result = yield tslib_1.__await(this._listNext(scope, continuationToken, options));
73
- continuationToken = result.nextLink;
74
- let page = result.value || [];
75
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
76
- yield yield tslib_1.__await(page);
77
- }
78
- });
61
+ async *listPagingPage(scope, options, settings) {
62
+ let result;
63
+ let continuationToken = settings?.continuationToken;
64
+ if (!continuationToken) {
65
+ result = await this._list(scope, options);
66
+ let page = result.value || [];
67
+ continuationToken = result.nextLink;
68
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
69
+ yield page;
70
+ }
71
+ while (continuationToken) {
72
+ result = await this._listNext(scope, continuationToken, options);
73
+ continuationToken = result.nextLink;
74
+ let page = result.value || [];
75
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
76
+ yield page;
77
+ }
79
78
  }
80
- listPagingAll(scope, options) {
81
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingAll_1() {
82
- var _a, e_1, _b, _c;
83
- try {
84
- for (var _d = true, _e = tslib_1.__asyncValues(this.listPagingPage(scope, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
85
- _c = _f.value;
86
- _d = false;
87
- const page = _c;
88
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
89
- }
90
- }
91
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
92
- finally {
93
- try {
94
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
95
- }
96
- finally { if (e_1) throw e_1.error; }
97
- }
98
- });
79
+ async *listPagingAll(scope, options) {
80
+ for await (const page of this.listPagingPage(scope, options)) {
81
+ yield* page;
82
+ }
99
83
  }
100
84
  /**
101
85
  * Lists all budgets for the defined scope.
@@ -1 +1 @@
1
- {"version":3,"file":"budgets.js","sourceRoot":"","sources":["../../../src/operations/budgets.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAetD,4CAA4C;AAC5C,2CAA2C;AAC3C,MAAa,WAAW;IAGtB;;;OAGG;IACH,YAAY,MAAmC;QAC7C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACI,IAAI,CACT,KAAa,EACb,OAAmC;QAEnC,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QAChD,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;YACvD,CAAC;SACF,CAAC;IACJ,CAAC;IAEc,cAAc,CAC3B,KAAa,EACb,OAAmC,EACnC,QAAuB;;YAEvB,IAAI,MAA2B,CAAC;YAChC,IAAI,iBAAiB,GAAG,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,iBAAiB,CAAC;YACpD,IAAI,CAAC,iBAAiB,EAAE,CAAC;gBACvB,MAAM,GAAG,s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,EAAE,EAAE;QACP,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,UAAU,CAAC;IAC1E,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,qBAAqB,GAA6B;IACtD,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,iBAAiB;SACtC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,QAAQ,CAAC;IACxE,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { Budgets } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { ConsumptionManagementClient } from \"../consumptionManagementClient.js\";\nimport {\n Budget,\n BudgetsListNextOptionalParams,\n BudgetsListOptionalParams,\n BudgetsListResponse,\n BudgetsGetOptionalParams,\n BudgetsGetResponse,\n BudgetsCreateOrUpdateOptionalParams,\n BudgetsCreateOrUpdateResponse,\n BudgetsDeleteOptionalParams,\n BudgetsListNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Budgets operations. */\nexport class BudgetsImpl implements Budgets {\n private readonly client: ConsumptionManagementClient;\n\n /**\n * Initialize a new instance of the class Budgets class.\n * @param client Reference to the service client\n */\n constructor(client: ConsumptionManagementClient) {\n this.client = client;\n }\n\n /**\n * Lists all budgets for the defined scope.\n * @param scope The scope associated with budget operations. This includes\n * '/subscriptions/{subscriptionId}/' for subscription scope,\n * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for\n * Department scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'\n * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}'\n * for Management Group scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}'\n * for billingProfile scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}'\n * for invoiceSection scope.\n * @param options The options parameters.\n */\n public list(\n scope: string,\n options?: BudgetsListOptionalParams\n ): PagedAsyncIterableIterator<Budget> {\n const iter = this.listPagingAll(scope, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(scope, options, settings);\n }\n };\n }\n\n private async *listPagingPage(\n scope: string,\n options?: BudgetsListOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<Budget[]> {\n let result: BudgetsListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(scope, options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listNext(scope, continuationToken, options);\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listPagingAll(\n scope: string,\n options?: BudgetsListOptionalParams\n ): AsyncIterableIterator<Budget> {\n for await (const page of this.listPagingPage(scope, options)) {\n yield* page;\n }\n }\n\n /**\n * Lists all budgets for the defined scope.\n * @param scope The scope associated with budget operations. This includes\n * '/subscriptions/{subscriptionId}/' for subscription scope,\n * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for\n * Department scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'\n * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}'\n * for Management Group scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}'\n * for billingProfile scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}'\n * for invoiceSection scope.\n * @param options The options parameters.\n */\n private _list(\n scope: string,\n options?: BudgetsListOptionalParams\n ): Promise<BudgetsListResponse> {\n return this.client.sendOperationRequest(\n { scope, options },\n listOperationSpec\n );\n }\n\n /**\n * Gets the budget for the scope by budget name.\n * @param scope The scope associated with budget operations. This includes\n * '/subscriptions/{subscriptionId}/' for subscription scope,\n * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for\n * Department scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'\n * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}'\n * for Management Group scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}'\n * for billingProfile scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}'\n * for invoiceSection scope.\n * @param budgetName Budget Name.\n * @param options The options parameters.\n */\n get(\n scope: string,\n budgetName: string,\n options?: BudgetsGetOptionalParams\n ): Promise<BudgetsGetResponse> {\n return this.client.sendOperationRequest(\n { scope, budgetName, options },\n getOperationSpec\n );\n }\n\n /**\n * The operation to create or update a budget. You can optionally provide an eTag if desired as a form\n * of concurrency control. To obtain the latest eTag for a given budget, perform a get operation prior\n * to your put operation.\n * @param scope The scope associated with budget operations. This includes\n * '/subscriptions/{subscriptionId}/' for subscription scope,\n * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for\n * Department scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'\n * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}'\n * for Management Group scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}'\n * for billingProfile scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}'\n * for invoiceSection scope.\n * @param budgetName Budget Name.\n * @param parameters Parameters supplied to the Create Budget operation.\n * @param options The options parameters.\n */\n createOrUpdate(\n scope: string,\n budgetName: string,\n parameters: Budget,\n options?: BudgetsCreateOrUpdateOptionalParams\n ): Promise<BudgetsCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n { scope, budgetName, parameters, options },\n createOrUpdateOperationSpec\n );\n }\n\n /**\n * The operation to delete a budget.\n * @param scope The scope associated with budget operations. This includes\n * '/subscriptions/{subscriptionId}/' for subscription scope,\n * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for\n * Department scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'\n * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}'\n * for Management Group scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}'\n * for billingProfile scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}'\n * for invoiceSection scope.\n * @param budgetName Budget Name.\n * @param options The options parameters.\n */\n delete(\n scope: string,\n budgetName: string,\n options?: BudgetsDeleteOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { scope, budgetName, options },\n deleteOperationSpec\n );\n }\n\n /**\n * ListNext\n * @param scope The scope associated with budget operations. This includes\n * '/subscriptions/{subscriptionId}/' for subscription scope,\n * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for\n * Department scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'\n * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}'\n * for Management Group scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}'\n * for billingProfile scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}'\n * for invoiceSection scope.\n * @param nextLink The nextLink from the previous successful call to the List method.\n * @param options The options parameters.\n */\n private _listNext(\n scope: string,\n nextLink: string,\n options?: BudgetsListNextOptionalParams\n ): Promise<BudgetsListNextResponse> {\n return this.client.sendOperationRequest(\n { scope, nextLink, options },\n listNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/{scope}/providers/Microsoft.Consumption/budgets\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.BudgetsListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.scope],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Budget\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.scope, Parameters.budgetName],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.Budget\n },\n 201: {\n bodyMapper: Mappers.Budget\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.parameters,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.scope, Parameters.budgetName],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.scope, Parameters.budgetName],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.BudgetsListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [Parameters.$host, Parameters.scope, Parameters.nextLink],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
1
+ {"version":3,"file":"budgets.js","sourceRoot":"","sources":["../../../src/operations/budgets.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAetD,4CAA4C;AAC5C,2CAA2C;AAC3C,MAAa,WAAW;IACL,MAAM,CAA8B;IAErD;;;OAGG;IACH,YAAY,MAAmC;QAC7C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACI,IAAI,CACT,KAAa,EACb,OAAmC;QAEnC,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QAChD,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,EAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;YACvD,CAAC;SACF,CAAC;IACJ,CAAC;IAEO,KAAK,CAA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QAAQ;IACpB,SAAS,EAAE;QACT,GAAG,EAAE,EAAE;QACP,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,UAAU,CAAC;IAC1E,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,qBAAqB,GAA6B;IACtD,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,iBAAiB;SACtC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,QAAQ,CAAC;IACxE,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { Budgets } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { ConsumptionManagementClient } from \"../consumptionManagementClient.js\";\nimport {\n Budget,\n BudgetsListNextOptionalParams,\n BudgetsListOptionalParams,\n BudgetsListResponse,\n BudgetsGetOptionalParams,\n BudgetsGetResponse,\n BudgetsCreateOrUpdateOptionalParams,\n BudgetsCreateOrUpdateResponse,\n BudgetsDeleteOptionalParams,\n BudgetsListNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Budgets operations. */\nexport class BudgetsImpl implements Budgets {\n private readonly client: ConsumptionManagementClient;\n\n /**\n * Initialize a new instance of the class Budgets class.\n * @param client Reference to the service client\n */\n constructor(client: ConsumptionManagementClient) {\n this.client = client;\n }\n\n /**\n * Lists all budgets for the defined scope.\n * @param scope The scope associated with budget operations. This includes\n * '/subscriptions/{subscriptionId}/' for subscription scope,\n * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for\n * Department scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'\n * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}'\n * for Management Group scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}'\n * for billingProfile scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}'\n * for invoiceSection scope.\n * @param options The options parameters.\n */\n public list(\n scope: string,\n options?: BudgetsListOptionalParams\n ): PagedAsyncIterableIterator<Budget> {\n const iter = this.listPagingAll(scope, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(scope, options, settings);\n }\n };\n }\n\n private async *listPagingPage(\n scope: string,\n options?: BudgetsListOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<Budget[]> {\n let result: BudgetsListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(scope, options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listNext(scope, continuationToken, options);\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listPagingAll(\n scope: string,\n options?: BudgetsListOptionalParams\n ): AsyncIterableIterator<Budget> {\n for await (const page of this.listPagingPage(scope, options)) {\n yield* page;\n }\n }\n\n /**\n * Lists all budgets for the defined scope.\n * @param scope The scope associated with budget operations. This includes\n * '/subscriptions/{subscriptionId}/' for subscription scope,\n * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for\n * Department scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'\n * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}'\n * for Management Group scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}'\n * for billingProfile scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}'\n * for invoiceSection scope.\n * @param options The options parameters.\n */\n private _list(\n scope: string,\n options?: BudgetsListOptionalParams\n ): Promise<BudgetsListResponse> {\n return this.client.sendOperationRequest(\n { scope, options },\n listOperationSpec\n );\n }\n\n /**\n * Gets the budget for the scope by budget name.\n * @param scope The scope associated with budget operations. This includes\n * '/subscriptions/{subscriptionId}/' for subscription scope,\n * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for\n * Department scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'\n * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}'\n * for Management Group scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}'\n * for billingProfile scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}'\n * for invoiceSection scope.\n * @param budgetName Budget Name.\n * @param options The options parameters.\n */\n get(\n scope: string,\n budgetName: string,\n options?: BudgetsGetOptionalParams\n ): Promise<BudgetsGetResponse> {\n return this.client.sendOperationRequest(\n { scope, budgetName, options },\n getOperationSpec\n );\n }\n\n /**\n * The operation to create or update a budget. You can optionally provide an eTag if desired as a form\n * of concurrency control. To obtain the latest eTag for a given budget, perform a get operation prior\n * to your put operation.\n * @param scope The scope associated with budget operations. This includes\n * '/subscriptions/{subscriptionId}/' for subscription scope,\n * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for\n * Department scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'\n * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}'\n * for Management Group scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}'\n * for billingProfile scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}'\n * for invoiceSection scope.\n * @param budgetName Budget Name.\n * @param parameters Parameters supplied to the Create Budget operation.\n * @param options The options parameters.\n */\n createOrUpdate(\n scope: string,\n budgetName: string,\n parameters: Budget,\n options?: BudgetsCreateOrUpdateOptionalParams\n ): Promise<BudgetsCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n { scope, budgetName, parameters, options },\n createOrUpdateOperationSpec\n );\n }\n\n /**\n * The operation to delete a budget.\n * @param scope The scope associated with budget operations. This includes\n * '/subscriptions/{subscriptionId}/' for subscription scope,\n * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for\n * Department scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'\n * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}'\n * for Management Group scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}'\n * for billingProfile scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}'\n * for invoiceSection scope.\n * @param budgetName Budget Name.\n * @param options The options parameters.\n */\n delete(\n scope: string,\n budgetName: string,\n options?: BudgetsDeleteOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { scope, budgetName, options },\n deleteOperationSpec\n );\n }\n\n /**\n * ListNext\n * @param scope The scope associated with budget operations. This includes\n * '/subscriptions/{subscriptionId}/' for subscription scope,\n * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for\n * Department scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'\n * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}'\n * for Management Group scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}'\n * for billingProfile scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}'\n * for invoiceSection scope.\n * @param nextLink The nextLink from the previous successful call to the List method.\n * @param options The options parameters.\n */\n private _listNext(\n scope: string,\n nextLink: string,\n options?: BudgetsListNextOptionalParams\n ): Promise<BudgetsListNextResponse> {\n return this.client.sendOperationRequest(\n { scope, nextLink, options },\n listNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/{scope}/providers/Microsoft.Consumption/budgets\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.BudgetsListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.scope],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Budget\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.scope, Parameters.budgetName],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.Budget\n },\n 201: {\n bodyMapper: Mappers.Budget\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.parameters,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.scope, Parameters.budgetName],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.scope, Parameters.budgetName],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.BudgetsListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [Parameters.$host, Parameters.scope, Parameters.nextLink],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
@@ -14,6 +14,7 @@ const Mappers = tslib_1.__importStar(require("../models/mappers.js"));
14
14
  const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
15
15
  /** Class containing Charges operations. */
16
16
  class ChargesImpl {
17
+ client;
17
18
  /**
18
19
  * Initialize a new instance of the class Charges class.
19
20
  * @param client Reference to the service client
@@ -1 +1 @@
1
- {"version":3,"file":"charges.js","sourceRoot":"","sources":["../../../src/operations/charges.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAItD,2CAA2C;AAC3C,MAAa,WAAW;IAGtB;;;OAGG;IACH,YAAY,MAAmC;QAC7C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACH,IAAI,CACF,KAAa,EACb,OAAmC;QAEnC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,KAAK,EAAE,OAAO,EAAE,EAClB,iBAAiB,CAClB,CAAC;IACJ,CAAC;CACF;AAxCD,kCAwCC;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,iBAAiB,GAA6B;IAClD,IAAI,EAAE,kDAAkD;IACxD,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,iBAAiB;SACtC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE;QACf,UAAU,CAAC,MAAM;QACjB,UAAU,CAAC,UAAU;QACrB,UAAU,CAAC,SAAS;QACpB,UAAU,CAAC,OAAO;QAClB,UAAU,CAAC,KAAK;KACjB;IACD,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,KAAK,CAAC;IACnD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { Charges } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { ConsumptionManagementClient } from \"../consumptionManagementClient.js\";\nimport { ChargesListOptionalParams, ChargesListResponse } from \"../models/index.js\";\n\n/** Class containing Charges operations. */\nexport class ChargesImpl implements Charges {\n private readonly client: ConsumptionManagementClient;\n\n /**\n * Initialize a new instance of the class Charges class.\n * @param client Reference to the service client\n */\n constructor(client: ConsumptionManagementClient) {\n this.client = client;\n }\n\n /**\n * Lists the charges based for the defined scope.\n * @param scope The scope associated with charges operations. This includes\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for\n * Department scope, and\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'\n * for EnrollmentAccount scope. For department and enrollment accounts, you can also add billing period\n * to the scope using '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to\n * specify billing period at department scope use\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'.\n * Also, Modern Commerce Account scopes are\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for billingAccount scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}'\n * for billingProfile scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}'\n * for invoiceSection scope, and\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for\n * partners.\n * @param options The options parameters.\n */\n list(\n scope: string,\n options?: ChargesListOptionalParams\n ): Promise<ChargesListResponse> {\n return this.client.sendOperationRequest(\n { scope, options },\n listOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/{scope}/providers/Microsoft.Consumption/charges\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ChargesListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [\n Parameters.filter,\n Parameters.apiVersion,\n Parameters.startDate,\n Parameters.endDate,\n Parameters.apply\n ],\n urlParameters: [Parameters.$host, Parameters.scope],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
1
+ {"version":3,"file":"charges.js","sourceRoot":"","sources":["../../../src/operations/charges.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAItD,2CAA2C;AAC3C,MAAa,WAAW;IACL,MAAM,CAA8B;IAErD;;;OAGG;IACH,YAAY,MAAmC;QAC7C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACH,IAAI,CACF,KAAa,EACb,OAAmC;QAEnC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,KAAK,EAAE,OAAO,EAAE,EAClB,iBAAiB,CAClB,CAAC;IACJ,CAAC;CACF;AAxCD,kCAwCC;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,iBAAiB,GAA6B;IAClD,IAAI,EAAE,kDAAkD;IACxD,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,iBAAiB;SACtC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE;QACf,UAAU,CAAC,MAAM;QACjB,UAAU,CAAC,UAAU;QACrB,UAAU,CAAC,SAAS;QACpB,UAAU,CAAC,OAAO;QAClB,UAAU,CAAC,KAAK;KACjB;IACD,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,KAAK,CAAC;IACnD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { Charges } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { ConsumptionManagementClient } from \"../consumptionManagementClient.js\";\nimport { ChargesListOptionalParams, ChargesListResponse } from \"../models/index.js\";\n\n/** Class containing Charges operations. */\nexport class ChargesImpl implements Charges {\n private readonly client: ConsumptionManagementClient;\n\n /**\n * Initialize a new instance of the class Charges class.\n * @param client Reference to the service client\n */\n constructor(client: ConsumptionManagementClient) {\n this.client = client;\n }\n\n /**\n * Lists the charges based for the defined scope.\n * @param scope The scope associated with charges operations. This includes\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for\n * Department scope, and\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'\n * for EnrollmentAccount scope. For department and enrollment accounts, you can also add billing period\n * to the scope using '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to\n * specify billing period at department scope use\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'.\n * Also, Modern Commerce Account scopes are\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for billingAccount scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}'\n * for billingProfile scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}'\n * for invoiceSection scope, and\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for\n * partners.\n * @param options The options parameters.\n */\n list(\n scope: string,\n options?: ChargesListOptionalParams\n ): Promise<ChargesListResponse> {\n return this.client.sendOperationRequest(\n { scope, options },\n listOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/{scope}/providers/Microsoft.Consumption/charges\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ChargesListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [\n Parameters.filter,\n Parameters.apiVersion,\n Parameters.startDate,\n Parameters.endDate,\n Parameters.apply\n ],\n urlParameters: [Parameters.$host, Parameters.scope],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
@@ -14,6 +14,7 @@ const Mappers = tslib_1.__importStar(require("../models/mappers.js"));
14
14
  const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
15
15
  /** Class containing Credits operations. */
16
16
  class CreditsImpl {
17
+ client;
17
18
  /**
18
19
  * Initialize a new instance of the class Credits class.
19
20
  * @param client Reference to the service client
@@ -1 +1 @@
1
- {"version":3,"file":"credits.js","sourceRoot":"","sources":["../../../src/operations/credits.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAItD,2CAA2C;AAC3C,MAAa,WAAW;IAGtB;;;OAGG;IACH,YAAY,MAAmC;QAC7C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACH,GAAG,CACD,gBAAwB,EACxB,gBAAwB,EACxB,OAAkC;QAElC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,OAAO,EAAE,EAC/C,gBAAgB,CACjB,CAAC;IACJ,CAAC;CACF;AA3BD,kCA2BC;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,gBAAgB,GAA6B;IACjD,IAAI,EACF,2JAA2J;IAC7J,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;QACD,GAAG,EAAE,EAAE;QACP,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,gBAAgB;QAC3B,UAAU,CAAC,gBAAgB;KAC5B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { Credits } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { ConsumptionManagementClient } from \"../consumptionManagementClient.js\";\nimport { CreditsGetOptionalParams, CreditsGetResponse } from \"../models/index.js\";\n\n/** Class containing Credits operations. */\nexport class CreditsImpl implements Credits {\n private readonly client: ConsumptionManagementClient;\n\n /**\n * Initialize a new instance of the class Credits class.\n * @param client Reference to the service client\n */\n constructor(client: ConsumptionManagementClient) {\n this.client = client;\n }\n\n /**\n * The credit summary by billingAccountId and billingProfileId.\n * @param billingAccountId BillingAccount ID\n * @param billingProfileId Azure Billing Profile ID.\n * @param options The options parameters.\n */\n get(\n billingAccountId: string,\n billingProfileId: string,\n options?: CreditsGetOptionalParams\n ): Promise<CreditsGetResponse> {\n return this.client.sendOperationRequest(\n { billingAccountId, billingProfileId, options },\n getOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.Consumption/credits/balanceSummary\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.CreditSummary\n },\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.billingAccountId,\n Parameters.billingProfileId\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
1
+ {"version":3,"file":"credits.js","sourceRoot":"","sources":["../../../src/operations/credits.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAItD,2CAA2C;AAC3C,MAAa,WAAW;IACL,MAAM,CAA8B;IAErD;;;OAGG;IACH,YAAY,MAAmC;QAC7C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACH,GAAG,CACD,gBAAwB,EACxB,gBAAwB,EACxB,OAAkC;QAElC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,OAAO,EAAE,EAC/C,gBAAgB,CACjB,CAAC;IACJ,CAAC;CACF;AA3BD,kCA2BC;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,gBAAgB,GAA6B;IACjD,IAAI,EACF,2JAA2J;IAC7J,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;QACD,GAAG,EAAE,EAAE;QACP,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,gBAAgB;QAC3B,UAAU,CAAC,gBAAgB;KAC5B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { Credits } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { ConsumptionManagementClient } from \"../consumptionManagementClient.js\";\nimport { CreditsGetOptionalParams, CreditsGetResponse } from \"../models/index.js\";\n\n/** Class containing Credits operations. */\nexport class CreditsImpl implements Credits {\n private readonly client: ConsumptionManagementClient;\n\n /**\n * Initialize a new instance of the class Credits class.\n * @param client Reference to the service client\n */\n constructor(client: ConsumptionManagementClient) {\n this.client = client;\n }\n\n /**\n * The credit summary by billingAccountId and billingProfileId.\n * @param billingAccountId BillingAccount ID\n * @param billingProfileId Azure Billing Profile ID.\n * @param options The options parameters.\n */\n get(\n billingAccountId: string,\n billingProfileId: string,\n options?: CreditsGetOptionalParams\n ): Promise<CreditsGetResponse> {\n return this.client.sendOperationRequest(\n { billingAccountId, billingProfileId, options },\n getOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.Consumption/credits/balanceSummary\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.CreditSummary\n },\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.billingAccountId,\n Parameters.billingProfileId\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
@@ -16,6 +16,7 @@ const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
16
16
  /// <reference lib="esnext.asynciterable" />
17
17
  /** Class containing EventsOperations operations. */
18
18
  class EventsOperationsImpl {
19
+ client;
19
20
  /**
20
21
  * Initialize a new instance of the class EventsOperations class.
21
22
  * @param client Reference to the service client
@@ -42,52 +43,35 @@ class EventsOperationsImpl {
42
43
  return this;
43
44
  },
44
45
  byPage: (settings) => {
45
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
46
+ if (settings?.maxPageSize) {
46
47
  throw new Error("maxPageSize is not supported by this operation.");
47
48
  }
48
49
  return this.listByBillingProfilePagingPage(billingAccountId, billingProfileId, startDate, endDate, options, settings);
49
50
  }
50
51
  };
51
52
  }
52
- listByBillingProfilePagingPage(billingAccountId, billingProfileId, startDate, endDate, options, settings) {
53
- return tslib_1.__asyncGenerator(this, arguments, function* listByBillingProfilePagingPage_1() {
54
- let result;
55
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
56
- if (!continuationToken) {
57
- result = yield tslib_1.__await(this._listByBillingProfile(billingAccountId, billingProfileId, startDate, endDate, options));
58
- let page = result.value || [];
59
- continuationToken = result.nextLink;
60
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
61
- yield yield tslib_1.__await(page);
62
- }
63
- while (continuationToken) {
64
- result = yield tslib_1.__await(this._listByBillingProfileNext(billingAccountId, billingProfileId, continuationToken, options));
65
- continuationToken = result.nextLink;
66
- let page = result.value || [];
67
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
68
- yield yield tslib_1.__await(page);
69
- }
70
- });
53
+ async *listByBillingProfilePagingPage(billingAccountId, billingProfileId, startDate, endDate, options, settings) {
54
+ let result;
55
+ let continuationToken = settings?.continuationToken;
56
+ if (!continuationToken) {
57
+ result = await this._listByBillingProfile(billingAccountId, billingProfileId, startDate, endDate, options);
58
+ let page = result.value || [];
59
+ continuationToken = result.nextLink;
60
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
61
+ yield page;
62
+ }
63
+ while (continuationToken) {
64
+ result = await this._listByBillingProfileNext(billingAccountId, billingProfileId, continuationToken, options);
65
+ continuationToken = result.nextLink;
66
+ let page = result.value || [];
67
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
68
+ yield page;
69
+ }
71
70
  }
72
- listByBillingProfilePagingAll(billingAccountId, billingProfileId, startDate, endDate, options) {
73
- return tslib_1.__asyncGenerator(this, arguments, function* listByBillingProfilePagingAll_1() {
74
- var _a, e_1, _b, _c;
75
- try {
76
- for (var _d = true, _e = tslib_1.__asyncValues(this.listByBillingProfilePagingPage(billingAccountId, billingProfileId, startDate, endDate, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
77
- _c = _f.value;
78
- _d = false;
79
- const page = _c;
80
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
81
- }
82
- }
83
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
84
- finally {
85
- try {
86
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
87
- }
88
- finally { if (e_1) throw e_1.error; }
89
- }
90
- });
71
+ async *listByBillingProfilePagingAll(billingAccountId, billingProfileId, startDate, endDate, options) {
72
+ for await (const page of this.listByBillingProfilePagingPage(billingAccountId, billingProfileId, startDate, endDate, options)) {
73
+ yield* page;
74
+ }
91
75
  }
92
76
  /**
93
77
  * Lists the events that decrements Azure credits or Microsoft Azure consumption commitment for a
@@ -105,52 +89,35 @@ class EventsOperationsImpl {
105
89
  return this;
106
90
  },
107
91
  byPage: (settings) => {
108
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
92
+ if (settings?.maxPageSize) {
109
93
  throw new Error("maxPageSize is not supported by this operation.");
110
94
  }
111
95
  return this.listByBillingAccountPagingPage(billingAccountId, options, settings);
112
96
  }
113
97
  };
114
98
  }
115
- listByBillingAccountPagingPage(billingAccountId, options, settings) {
116
- return tslib_1.__asyncGenerator(this, arguments, function* listByBillingAccountPagingPage_1() {
117
- let result;
118
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
119
- if (!continuationToken) {
120
- result = yield tslib_1.__await(this._listByBillingAccount(billingAccountId, options));
121
- let page = result.value || [];
122
- continuationToken = result.nextLink;
123
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
124
- yield yield tslib_1.__await(page);
125
- }
126
- while (continuationToken) {
127
- result = yield tslib_1.__await(this._listByBillingAccountNext(billingAccountId, continuationToken, options));
128
- continuationToken = result.nextLink;
129
- let page = result.value || [];
130
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
131
- yield yield tslib_1.__await(page);
132
- }
133
- });
99
+ async *listByBillingAccountPagingPage(billingAccountId, options, settings) {
100
+ let result;
101
+ let continuationToken = settings?.continuationToken;
102
+ if (!continuationToken) {
103
+ result = await this._listByBillingAccount(billingAccountId, options);
104
+ let page = result.value || [];
105
+ continuationToken = result.nextLink;
106
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
107
+ yield page;
108
+ }
109
+ while (continuationToken) {
110
+ result = await this._listByBillingAccountNext(billingAccountId, continuationToken, options);
111
+ continuationToken = result.nextLink;
112
+ let page = result.value || [];
113
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
114
+ yield page;
115
+ }
134
116
  }
135
- listByBillingAccountPagingAll(billingAccountId, options) {
136
- return tslib_1.__asyncGenerator(this, arguments, function* listByBillingAccountPagingAll_1() {
137
- var _a, e_2, _b, _c;
138
- try {
139
- for (var _d = true, _e = tslib_1.__asyncValues(this.listByBillingAccountPagingPage(billingAccountId, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
140
- _c = _f.value;
141
- _d = false;
142
- const page = _c;
143
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
144
- }
145
- }
146
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
147
- finally {
148
- try {
149
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
150
- }
151
- finally { if (e_2) throw e_2.error; }
152
- }
153
- });
117
+ async *listByBillingAccountPagingAll(billingAccountId, options) {
118
+ for await (const page of this.listByBillingAccountPagingPage(billingAccountId, options)) {
119
+ yield* page;
120
+ }
154
121
  }
155
122
  /**
156
123
  * Lists the events that decrements Azure credits or Microsoft Azure consumption commitment for a
@@ -1 +1 @@
1
- {"version":3,"file":"eventsOperations.js","sourceRoot":"","sources":["../../../src/operations/events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;YACH,UAAU,EAAE,OAAO,CAAC,MAAM;SAC3B;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,gBAAgB;QAC3B,UAAU,CAAC,gBAAgB;KAC5B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,qCAAqC,GAA6B;IACtE,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,MAAM;SAC3B;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,gBAAgB;KAC5B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { EventsOperations } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { ConsumptionManagementClient } from \"../consumptionManagementClient.js\";\nimport {\n EventSummary,\n EventsListByBillingProfileNextOptionalParams,\n EventsListByBillingProfileOptionalParams,\n EventsListByBillingProfileResponse,\n EventsListByBillingAccountNextOptionalParams,\n EventsListByBillingAccountOptionalParams,\n EventsListByBillingAccountResponse,\n EventsListByBillingProfileNextResponse,\n EventsListByBillingAccountNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing EventsOperations operations. */\nexport class EventsOperationsImpl implements EventsOperations {\n private readonly client: ConsumptionManagementClient;\n\n /**\n * Initialize a new instance of the class EventsOperations class.\n * @param client Reference to the service client\n */\n constructor(client: ConsumptionManagementClient) {\n this.client = client;\n }\n\n /**\n * Lists the events that decrements Azure credits or Microsoft Azure consumption commitment for a\n * billing account or a billing profile for a given start and end date.\n * @param billingAccountId BillingAccount ID\n * @param billingProfileId Azure Billing Profile ID.\n * @param startDate Start date\n * @param endDate End date\n * @param options The options parameters.\n */\n public listByBillingProfile(\n billingAccountId: string,\n billingProfileId: string,\n startDate: string,\n endDate: string,\n options?: EventsListByBillingProfileOptionalParams\n ): PagedAsyncIterableIterator<EventSummary> {\n const iter = this.listByBillingProfilePagingAll(\n billingAccountId,\n billingProfileId,\n startDate,\n endDate,\n options\n );\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listByBillingProfilePagingPage(\n billingAccountId,\n billingProfileId,\n startDate,\n endDate,\n options,\n settings\n );\n }\n };\n }\n\n private async *listByBillingProfilePagingPage(\n billingAccountId: string,\n billingProfileId: string,\n startDate: string,\n endDate: string,\n options?: EventsListByBillingProfileOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<EventSummary[]> {\n let result: EventsListByBillingProfileResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByBillingProfile(\n billingAccountId,\n billingProfileId,\n startDate,\n endDate,\n options\n );\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listByBillingProfileNext(\n billingAccountId,\n billingProfileId,\n continuationToken,\n options\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listByBillingProfilePagingAll(\n billingAccountId: string,\n billingProfileId: string,\n startDate: string,\n endDate: string,\n options?: EventsListByBillingProfileOptionalParams\n ): AsyncIterableIterator<EventSummary> {\n for await (const page of this.listByBillingProfilePagingPage(\n billingAccountId,\n billingProfileId,\n startDate,\n endDate,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Lists the events that decrements Azure credits or Microsoft Azure consumption commitment for a\n * billing account or a billing profile for a given start and end date.\n * @param billingAccountId BillingAccount ID\n * @param options The options parameters.\n */\n public listByBillingAccount(\n billingAccountId: string,\n options?: EventsListByBillingAccountOptionalParams\n ): PagedAsyncIterableIterator<EventSummary> {\n const iter = this.listByBillingAccountPagingAll(billingAccountId, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listByBillingAccountPagingPage(\n billingAccountId,\n options,\n settings\n );\n }\n };\n }\n\n private async *listByBillingAccountPagingPage(\n billingAccountId: string,\n options?: EventsListByBillingAccountOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<EventSummary[]> {\n let result: EventsListByBillingAccountResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByBillingAccount(billingAccountId, options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listByBillingAccountNext(\n billingAccountId,\n continuationToken,\n options\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listByBillingAccountPagingAll(\n billingAccountId: string,\n options?: EventsListByBillingAccountOptionalParams\n ): AsyncIterableIterator<EventSummary> {\n for await (const page of this.listByBillingAccountPagingPage(\n billingAccountId,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Lists the events that decrements Azure credits or Microsoft Azure consumption commitment for a\n * billing account or a billing profile for a given start and end date.\n * @param billingAccountId BillingAccount ID\n * @param billingProfileId Azure Billing Profile ID.\n * @param startDate Start date\n * @param endDate End date\n * @param options The options parameters.\n */\n private _listByBillingProfile(\n billingAccountId: string,\n billingProfileId: string,\n startDate: string,\n endDate: string,\n options?: EventsListByBillingProfileOptionalParams\n ): Promise<EventsListByBillingProfileResponse> {\n return this.client.sendOperationRequest(\n { billingAccountId, billingProfileId, startDate, endDate, options },\n listByBillingProfileOperationSpec\n );\n }\n\n /**\n * Lists the events that decrements Azure credits or Microsoft Azure consumption commitment for a\n * billing account or a billing profile for a given start and end date.\n * @param billingAccountId BillingAccount ID\n * @param options The options parameters.\n */\n private _listByBillingAccount(\n billingAccountId: string,\n options?: EventsListByBillingAccountOptionalParams\n ): Promise<EventsListByBillingAccountResponse> {\n return this.client.sendOperationRequest(\n { billingAccountId, options },\n listByBillingAccountOperationSpec\n );\n }\n\n /**\n * ListByBillingProfileNext\n * @param billingAccountId BillingAccount ID\n * @param billingProfileId Azure Billing Profile ID.\n * @param nextLink The nextLink from the previous successful call to the ListByBillingProfile method.\n * @param options The options parameters.\n */\n private _listByBillingProfileNext(\n billingAccountId: string,\n billingProfileId: string,\n nextLink: string,\n options?: EventsListByBillingProfileNextOptionalParams\n ): Promise<EventsListByBillingProfileNextResponse> {\n return this.client.sendOperationRequest(\n { billingAccountId, billingProfileId, nextLink, options },\n listByBillingProfileNextOperationSpec\n );\n }\n\n /**\n * ListByBillingAccountNext\n * @param billingAccountId BillingAccount ID\n * @param nextLink The nextLink from the previous successful call to the ListByBillingAccount method.\n * @param options The options parameters.\n */\n private _listByBillingAccountNext(\n billingAccountId: string,\n nextLink: string,\n options?: EventsListByBillingAccountNextOptionalParams\n ): Promise<EventsListByBillingAccountNextResponse> {\n return this.client.sendOperationRequest(\n { billingAccountId, nextLink, options },\n listByBillingAccountNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listByBillingProfileOperationSpec: coreClient.OperationSpec = {\n path:\n \"/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.Consumption/events\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Events\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [\n Parameters.apiVersion,\n Parameters.startDate1,\n Parameters.endDate1\n ],\n urlParameters: [\n Parameters.$host,\n Parameters.billingAccountId,\n Parameters.billingProfileId\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listByBillingAccountOperationSpec: coreClient.OperationSpec = {\n path:\n \"/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/events\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Events\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.filter, Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.billingAccountId],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listByBillingProfileNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Events\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [\n Parameters.$host,\n Parameters.nextLink,\n Parameters.billingAccountId,\n Parameters.billingProfileId\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listByBillingAccountNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Events\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [\n Parameters.$host,\n Parameters.nextLink,\n Parameters.billingAccountId\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
1
+ {"version":3,"file":"eventsOperations.js","sourceRoot":"","sources":["../../../src/operations/eventsOperations.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AActD,4CAA4C;AAC5C,oDAAoD;AACpD,MAAa,oBAAoB;IACd,MAAM,CAA8B;IAErD;;;OAGG;IACH,YAAY,MAAmC;QAC7C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;OAQG;IACI,oBAAoB,CACzB,gBAAwB,EACxB,gBAAwB,EACxB,SAAiB,EACjB,OAAe,EACf,OAAkD;QAElD,MAAM,IAAI,GAAG,IAAI,CAAC,6BAA6B,CAC7C,gBAAgB,EAChB,gBAAgB,EAChB,SAAS,EACT,OAAO,EACP,OAAO,CACR,CAAC;QACF,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,EAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,8BAA8B,CACxC,gBAAgB,EAChB,gBAAgB,EAChB,SAAS,EACT,OAAO,EACP,OAAO,EACP,QAAQ,CACT,CAAC;YACJ,CAAC;SACF,CAAC;IACJ,CAAC;IAEO,KAAK,CAAC,CAAC,8BAA8B,CAC3C,gBAAwB,EACxB,gBAAwB,EACxB,SAAiB,EACjB,OAAe,EACf,OAAkD,EAClD,QAAuB;QAEvB,IAAI,MAA0C,CAAC;QAC/C,IAAI,iBAAiB,GAAG,QAAQ,EAAE,iBAAiB,CAAC;QACpD,IAAI,CAAC,iBAAiB,EAAE,CAAC;YACvB,MAAM,GAAG,MAAM,IAAI,CA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AAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,MAAM;SAC3B;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,gBAAgB;KAC5B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { EventsOperations } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { ConsumptionManagementClient } from \"../consumptionManagementClient.js\";\nimport {\n EventSummary,\n EventsListByBillingProfileNextOptionalParams,\n EventsListByBillingProfileOptionalParams,\n EventsListByBillingProfileResponse,\n EventsListByBillingAccountNextOptionalParams,\n EventsListByBillingAccountOptionalParams,\n EventsListByBillingAccountResponse,\n EventsListByBillingProfileNextResponse,\n EventsListByBillingAccountNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing EventsOperations operations. */\nexport class EventsOperationsImpl implements EventsOperations {\n private readonly client: ConsumptionManagementClient;\n\n /**\n * Initialize a new instance of the class EventsOperations class.\n * @param client Reference to the service client\n */\n constructor(client: ConsumptionManagementClient) {\n this.client = client;\n }\n\n /**\n * Lists the events that decrements Azure credits or Microsoft Azure consumption commitment for a\n * billing account or a billing profile for a given start and end date.\n * @param billingAccountId BillingAccount ID\n * @param billingProfileId Azure Billing Profile ID.\n * @param startDate Start date\n * @param endDate End date\n * @param options The options parameters.\n */\n public listByBillingProfile(\n billingAccountId: string,\n billingProfileId: string,\n startDate: string,\n endDate: string,\n options?: EventsListByBillingProfileOptionalParams\n ): PagedAsyncIterableIterator<EventSummary> {\n const iter = this.listByBillingProfilePagingAll(\n billingAccountId,\n billingProfileId,\n startDate,\n endDate,\n options\n );\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listByBillingProfilePagingPage(\n billingAccountId,\n billingProfileId,\n startDate,\n endDate,\n options,\n settings\n );\n }\n };\n }\n\n private async *listByBillingProfilePagingPage(\n billingAccountId: string,\n billingProfileId: string,\n startDate: string,\n endDate: string,\n options?: EventsListByBillingProfileOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<EventSummary[]> {\n let result: EventsListByBillingProfileResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByBillingProfile(\n billingAccountId,\n billingProfileId,\n startDate,\n endDate,\n options\n );\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listByBillingProfileNext(\n billingAccountId,\n billingProfileId,\n continuationToken,\n options\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listByBillingProfilePagingAll(\n billingAccountId: string,\n billingProfileId: string,\n startDate: string,\n endDate: string,\n options?: EventsListByBillingProfileOptionalParams\n ): AsyncIterableIterator<EventSummary> {\n for await (const page of this.listByBillingProfilePagingPage(\n billingAccountId,\n billingProfileId,\n startDate,\n endDate,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Lists the events that decrements Azure credits or Microsoft Azure consumption commitment for a\n * billing account or a billing profile for a given start and end date.\n * @param billingAccountId BillingAccount ID\n * @param options The options parameters.\n */\n public listByBillingAccount(\n billingAccountId: string,\n options?: EventsListByBillingAccountOptionalParams\n ): PagedAsyncIterableIterator<EventSummary> {\n const iter = this.listByBillingAccountPagingAll(billingAccountId, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listByBillingAccountPagingPage(\n billingAccountId,\n options,\n settings\n );\n }\n };\n }\n\n private async *listByBillingAccountPagingPage(\n billingAccountId: string,\n options?: EventsListByBillingAccountOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<EventSummary[]> {\n let result: EventsListByBillingAccountResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByBillingAccount(billingAccountId, options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listByBillingAccountNext(\n billingAccountId,\n continuationToken,\n options\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listByBillingAccountPagingAll(\n billingAccountId: string,\n options?: EventsListByBillingAccountOptionalParams\n ): AsyncIterableIterator<EventSummary> {\n for await (const page of this.listByBillingAccountPagingPage(\n billingAccountId,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Lists the events that decrements Azure credits or Microsoft Azure consumption commitment for a\n * billing account or a billing profile for a given start and end date.\n * @param billingAccountId BillingAccount ID\n * @param billingProfileId Azure Billing Profile ID.\n * @param startDate Start date\n * @param endDate End date\n * @param options The options parameters.\n */\n private _listByBillingProfile(\n billingAccountId: string,\n billingProfileId: string,\n startDate: string,\n endDate: string,\n options?: EventsListByBillingProfileOptionalParams\n ): Promise<EventsListByBillingProfileResponse> {\n return this.client.sendOperationRequest(\n { billingAccountId, billingProfileId, startDate, endDate, options },\n listByBillingProfileOperationSpec\n );\n }\n\n /**\n * Lists the events that decrements Azure credits or Microsoft Azure consumption commitment for a\n * billing account or a billing profile for a given start and end date.\n * @param billingAccountId BillingAccount ID\n * @param options The options parameters.\n */\n private _listByBillingAccount(\n billingAccountId: string,\n options?: EventsListByBillingAccountOptionalParams\n ): Promise<EventsListByBillingAccountResponse> {\n return this.client.sendOperationRequest(\n { billingAccountId, options },\n listByBillingAccountOperationSpec\n );\n }\n\n /**\n * ListByBillingProfileNext\n * @param billingAccountId BillingAccount ID\n * @param billingProfileId Azure Billing Profile ID.\n * @param nextLink The nextLink from the previous successful call to the ListByBillingProfile method.\n * @param options The options parameters.\n */\n private _listByBillingProfileNext(\n billingAccountId: string,\n billingProfileId: string,\n nextLink: string,\n options?: EventsListByBillingProfileNextOptionalParams\n ): Promise<EventsListByBillingProfileNextResponse> {\n return this.client.sendOperationRequest(\n { billingAccountId, billingProfileId, nextLink, options },\n listByBillingProfileNextOperationSpec\n );\n }\n\n /**\n * ListByBillingAccountNext\n * @param billingAccountId BillingAccount ID\n * @param nextLink The nextLink from the previous successful call to the ListByBillingAccount method.\n * @param options The options parameters.\n */\n private _listByBillingAccountNext(\n billingAccountId: string,\n nextLink: string,\n options?: EventsListByBillingAccountNextOptionalParams\n ): Promise<EventsListByBillingAccountNextResponse> {\n return this.client.sendOperationRequest(\n { billingAccountId, nextLink, options },\n listByBillingAccountNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listByBillingProfileOperationSpec: coreClient.OperationSpec = {\n path:\n \"/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.Consumption/events\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Events\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [\n Parameters.apiVersion,\n Parameters.startDate1,\n Parameters.endDate1\n ],\n urlParameters: [\n Parameters.$host,\n Parameters.billingAccountId,\n Parameters.billingProfileId\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listByBillingAccountOperationSpec: coreClient.OperationSpec = {\n path:\n \"/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/events\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Events\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.filter, Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.billingAccountId],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listByBillingProfileNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Events\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [\n Parameters.$host,\n Parameters.nextLink,\n Parameters.billingAccountId,\n Parameters.billingProfileId\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listByBillingAccountNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Events\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [\n Parameters.$host,\n Parameters.nextLink,\n Parameters.billingAccountId\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}