@azure/arm-consumption 9.2.1-alpha.20250717.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.
- package/dist/browser/consumptionManagementClient.js +30 -5
- package/dist/browser/consumptionManagementClient.js.map +1 -1
- package/dist/browser/models/mappers.js +798 -385
- package/dist/browser/models/mappers.js.map +1 -1
- package/dist/browser/operations/aggregatedCost.js +1 -0
- package/dist/browser/operations/aggregatedCost.js.map +1 -1
- package/dist/browser/operations/balances.js +1 -0
- package/dist/browser/operations/balances.js.map +1 -1
- package/dist/browser/operations/budgets.js +23 -40
- package/dist/browser/operations/budgets.js.map +1 -1
- package/dist/browser/operations/charges.js +1 -0
- package/dist/browser/operations/charges.js.map +1 -1
- package/dist/browser/operations/credits.js +1 -0
- package/dist/browser/operations/credits.js.map +1 -1
- package/dist/browser/operations/eventsOperations.js +45 -79
- package/dist/browser/operations/eventsOperations.js.map +1 -1
- package/dist/browser/operations/lotsOperations.js +45 -79
- package/dist/browser/operations/lotsOperations.js.map +1 -1
- package/dist/browser/operations/marketplaces.js +23 -40
- package/dist/browser/operations/marketplaces.js.map +1 -1
- package/dist/browser/operations/operations.js +23 -40
- package/dist/browser/operations/operations.js.map +1 -1
- package/dist/browser/operations/priceSheet.js +1 -0
- package/dist/browser/operations/priceSheet.js.map +1 -1
- package/dist/browser/operations/reservationRecommendationDetails.js +1 -0
- package/dist/browser/operations/reservationRecommendationDetails.js.map +1 -1
- package/dist/browser/operations/reservationRecommendations.js +23 -40
- package/dist/browser/operations/reservationRecommendations.js.map +1 -1
- package/dist/browser/operations/reservationTransactions.js +45 -79
- package/dist/browser/operations/reservationTransactions.js.map +1 -1
- package/dist/browser/operations/reservationsDetails.js +67 -118
- package/dist/browser/operations/reservationsDetails.js.map +1 -1
- package/dist/browser/operations/reservationsSummaries.js +67 -118
- package/dist/browser/operations/reservationsSummaries.js.map +1 -1
- package/dist/browser/operations/tags.js +1 -0
- package/dist/browser/operations/tags.js.map +1 -1
- package/dist/browser/operations/usageDetails.js +23 -40
- package/dist/browser/operations/usageDetails.js.map +1 -1
- package/dist/browser/pagingHelper.js +2 -4
- package/dist/browser/pagingHelper.js.map +1 -1
- package/dist/commonjs/consumptionManagementClient.js +30 -5
- package/dist/commonjs/consumptionManagementClient.js.map +1 -1
- package/dist/commonjs/models/mappers.js +798 -385
- package/dist/commonjs/models/mappers.js.map +1 -1
- package/dist/commonjs/operations/aggregatedCost.js +1 -0
- package/dist/commonjs/operations/aggregatedCost.js.map +1 -1
- package/dist/commonjs/operations/balances.js +1 -0
- package/dist/commonjs/operations/balances.js.map +1 -1
- package/dist/commonjs/operations/budgets.js +23 -39
- package/dist/commonjs/operations/budgets.js.map +1 -1
- package/dist/commonjs/operations/charges.js +1 -0
- package/dist/commonjs/operations/charges.js.map +1 -1
- package/dist/commonjs/operations/credits.js +1 -0
- package/dist/commonjs/operations/credits.js.map +1 -1
- package/dist/commonjs/operations/eventsOperations.js +45 -78
- package/dist/commonjs/operations/eventsOperations.js.map +1 -1
- package/dist/commonjs/operations/lotsOperations.js +45 -78
- package/dist/commonjs/operations/lotsOperations.js.map +1 -1
- package/dist/commonjs/operations/marketplaces.js +23 -39
- package/dist/commonjs/operations/marketplaces.js.map +1 -1
- package/dist/commonjs/operations/operations.js +23 -39
- package/dist/commonjs/operations/operations.js.map +1 -1
- package/dist/commonjs/operations/priceSheet.js +1 -0
- package/dist/commonjs/operations/priceSheet.js.map +1 -1
- package/dist/commonjs/operations/reservationRecommendationDetails.js +1 -0
- package/dist/commonjs/operations/reservationRecommendationDetails.js.map +1 -1
- package/dist/commonjs/operations/reservationRecommendations.js +23 -39
- package/dist/commonjs/operations/reservationRecommendations.js.map +1 -1
- package/dist/commonjs/operations/reservationTransactions.js +45 -78
- package/dist/commonjs/operations/reservationTransactions.js.map +1 -1
- package/dist/commonjs/operations/reservationsDetails.js +67 -117
- package/dist/commonjs/operations/reservationsDetails.js.map +1 -1
- package/dist/commonjs/operations/reservationsSummaries.js +67 -117
- package/dist/commonjs/operations/reservationsSummaries.js.map +1 -1
- package/dist/commonjs/operations/tags.js +1 -0
- package/dist/commonjs/operations/tags.js.map +1 -1
- package/dist/commonjs/operations/usageDetails.js +23 -39
- package/dist/commonjs/operations/usageDetails.js.map +1 -1
- package/dist/commonjs/pagingHelper.js +2 -4
- package/dist/commonjs/pagingHelper.js.map +1 -1
- package/dist/commonjs/tsdoc-metadata.json +11 -11
- package/dist/esm/consumptionManagementClient.js +30 -5
- package/dist/esm/consumptionManagementClient.js.map +1 -1
- package/dist/esm/models/mappers.js +798 -385
- package/dist/esm/models/mappers.js.map +1 -1
- package/dist/esm/operations/aggregatedCost.js +1 -0
- package/dist/esm/operations/aggregatedCost.js.map +1 -1
- package/dist/esm/operations/balances.js +1 -0
- package/dist/esm/operations/balances.js.map +1 -1
- package/dist/esm/operations/budgets.js +23 -40
- package/dist/esm/operations/budgets.js.map +1 -1
- package/dist/esm/operations/charges.js +1 -0
- package/dist/esm/operations/charges.js.map +1 -1
- package/dist/esm/operations/credits.js +1 -0
- package/dist/esm/operations/credits.js.map +1 -1
- package/dist/esm/operations/eventsOperations.js +45 -79
- package/dist/esm/operations/eventsOperations.js.map +1 -1
- package/dist/esm/operations/lotsOperations.js +45 -79
- package/dist/esm/operations/lotsOperations.js.map +1 -1
- package/dist/esm/operations/marketplaces.js +23 -40
- package/dist/esm/operations/marketplaces.js.map +1 -1
- package/dist/esm/operations/operations.js +23 -40
- package/dist/esm/operations/operations.js.map +1 -1
- package/dist/esm/operations/priceSheet.js +1 -0
- package/dist/esm/operations/priceSheet.js.map +1 -1
- package/dist/esm/operations/reservationRecommendationDetails.js +1 -0
- package/dist/esm/operations/reservationRecommendationDetails.js.map +1 -1
- package/dist/esm/operations/reservationRecommendations.js +23 -40
- package/dist/esm/operations/reservationRecommendations.js.map +1 -1
- package/dist/esm/operations/reservationTransactions.js +45 -79
- package/dist/esm/operations/reservationTransactions.js.map +1 -1
- package/dist/esm/operations/reservationsDetails.js +67 -118
- package/dist/esm/operations/reservationsDetails.js.map +1 -1
- package/dist/esm/operations/reservationsSummaries.js +67 -118
- package/dist/esm/operations/reservationsSummaries.js.map +1 -1
- package/dist/esm/operations/tags.js +1 -0
- package/dist/esm/operations/tags.js.map +1 -1
- package/dist/esm/operations/usageDetails.js +23 -40
- package/dist/esm/operations/usageDetails.js.map +1 -1
- package/dist/esm/pagingHelper.js +2 -4
- package/dist/esm/pagingHelper.js.map +1 -1
- package/dist/react-native/consumptionManagementClient.js +30 -5
- package/dist/react-native/consumptionManagementClient.js.map +1 -1
- package/dist/react-native/models/mappers.js +798 -385
- package/dist/react-native/models/mappers.js.map +1 -1
- package/dist/react-native/operations/aggregatedCost.js +1 -0
- package/dist/react-native/operations/aggregatedCost.js.map +1 -1
- package/dist/react-native/operations/balances.js +1 -0
- package/dist/react-native/operations/balances.js.map +1 -1
- package/dist/react-native/operations/budgets.js +23 -40
- package/dist/react-native/operations/budgets.js.map +1 -1
- package/dist/react-native/operations/charges.js +1 -0
- package/dist/react-native/operations/charges.js.map +1 -1
- package/dist/react-native/operations/credits.js +1 -0
- package/dist/react-native/operations/credits.js.map +1 -1
- package/dist/react-native/operations/eventsOperations.js +45 -79
- package/dist/react-native/operations/eventsOperations.js.map +1 -1
- package/dist/react-native/operations/lotsOperations.js +45 -79
- package/dist/react-native/operations/lotsOperations.js.map +1 -1
- package/dist/react-native/operations/marketplaces.js +23 -40
- package/dist/react-native/operations/marketplaces.js.map +1 -1
- package/dist/react-native/operations/operations.js +23 -40
- package/dist/react-native/operations/operations.js.map +1 -1
- package/dist/react-native/operations/priceSheet.js +1 -0
- package/dist/react-native/operations/priceSheet.js.map +1 -1
- package/dist/react-native/operations/reservationRecommendationDetails.js +1 -0
- package/dist/react-native/operations/reservationRecommendationDetails.js.map +1 -1
- package/dist/react-native/operations/reservationRecommendations.js +23 -40
- package/dist/react-native/operations/reservationRecommendations.js.map +1 -1
- package/dist/react-native/operations/reservationTransactions.js +45 -79
- package/dist/react-native/operations/reservationTransactions.js.map +1 -1
- package/dist/react-native/operations/reservationsDetails.js +67 -118
- package/dist/react-native/operations/reservationsDetails.js.map +1 -1
- package/dist/react-native/operations/reservationsSummaries.js +67 -118
- package/dist/react-native/operations/reservationsSummaries.js.map +1 -1
- package/dist/react-native/operations/tags.js +1 -0
- package/dist/react-native/operations/tags.js.map +1 -1
- package/dist/react-native/operations/usageDetails.js +23 -40
- package/dist/react-native/operations/usageDetails.js.map +1 -1
- package/dist/react-native/pagingHelper.js +2 -4
- package/dist/react-native/pagingHelper.js.map +1 -1
- package/package.json +2 -2
- package/review/arm-consumption-node.api.md +1559 -1559
|
@@ -10,6 +10,7 @@ import * as Mappers from "../models/mappers.js";
|
|
|
10
10
|
import * as Parameters from "../models/parameters.js";
|
|
11
11
|
/** Class containing AggregatedCost operations. */
|
|
12
12
|
export class AggregatedCostImpl {
|
|
13
|
+
client;
|
|
13
14
|
/**
|
|
14
15
|
* Initialize a new instance of the class AggregatedCost class.
|
|
15
16
|
* @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,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAStD,kDAAkD;AAClD,MAAM,OAAO,kBAAkB;
|
|
1
|
+
{"version":3,"file":"aggregatedCost.js","sourceRoot":"","sources":["../../../src/operations/aggregatedCost.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAStD,kDAAkD;AAClD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AO,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"]}
|
|
@@ -10,6 +10,7 @@ import * as Mappers from "../models/mappers.js";
|
|
|
10
10
|
import * as Parameters from "../models/parameters.js";
|
|
11
11
|
/** Class containing Balances operations. */
|
|
12
12
|
export class BalancesImpl {
|
|
13
|
+
client;
|
|
13
14
|
/**
|
|
14
15
|
* Initialize a new instance of the class Balances class.
|
|
15
16
|
* @param client Reference to the service client
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"balances.js","sourceRoot":"","sources":["../../../src/operations/balances.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAStD,4CAA4C;AAC5C,MAAM,OAAO,YAAY;
|
|
1
|
+
{"version":3,"file":"balances.js","sourceRoot":"","sources":["../../../src/operations/balances.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAStD,4CAA4C;AAC5C,MAAM,OAAO,YAAY;IACN,MAAM,CAA8B;IAErD;;;OAGG;IACH,YAAY,MAAmC;QAC7C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACH,mBAAmB,CACjB,gBAAwB,EACxB,OAAmD;QAEnD,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,gBAAgB,EAAE,OAAO,EAAE,EAC7B,gCAAgC,CACjC,CAAC;IACJ,CAAC;IAED;;;;;;OAMG;IACH,mCAAmC,CACjC,gBAAwB,EACxB,iBAAyB,EACzB,OAAmE;QAEnE,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,OAAO,EAAE,EAChD,gDAAgD,CACjD,CAAC;IACJ,CAAC;CACF;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,gCAAgC,GAA6B;IACjE,IAAI,EACF,0GAA0G;IAC5G,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,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,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,gBAAgB,CAAC;IAC9D,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,gDAAgD,GAA6B;IACjF,IAAI,EACF,6IAA6I;IAC/I,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,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"]}
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
|
-
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
|
|
9
8
|
import { setContinuationToken } from "../pagingHelper.js";
|
|
10
9
|
import * as coreClient from "@azure/core-client";
|
|
11
10
|
import * as Mappers from "../models/mappers.js";
|
|
@@ -13,6 +12,7 @@ import * as Parameters from "../models/parameters.js";
|
|
|
13
12
|
/// <reference lib="esnext.asynciterable" />
|
|
14
13
|
/** Class containing Budgets operations. */
|
|
15
14
|
export class BudgetsImpl {
|
|
15
|
+
client;
|
|
16
16
|
/**
|
|
17
17
|
* Initialize a new instance of the class Budgets class.
|
|
18
18
|
* @param client Reference to the service client
|
|
@@ -47,52 +47,35 @@ export class BudgetsImpl {
|
|
|
47
47
|
return this;
|
|
48
48
|
},
|
|
49
49
|
byPage: (settings) => {
|
|
50
|
-
if (settings
|
|
50
|
+
if (settings?.maxPageSize) {
|
|
51
51
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
52
52
|
}
|
|
53
53
|
return this.listPagingPage(scope, options, settings);
|
|
54
54
|
}
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
|
-
listPagingPage(scope, options, settings) {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
});
|
|
57
|
+
async *listPagingPage(scope, options, settings) {
|
|
58
|
+
let result;
|
|
59
|
+
let continuationToken = settings?.continuationToken;
|
|
60
|
+
if (!continuationToken) {
|
|
61
|
+
result = await this._list(scope, options);
|
|
62
|
+
let page = result.value || [];
|
|
63
|
+
continuationToken = result.nextLink;
|
|
64
|
+
setContinuationToken(page, continuationToken);
|
|
65
|
+
yield page;
|
|
66
|
+
}
|
|
67
|
+
while (continuationToken) {
|
|
68
|
+
result = await this._listNext(scope, continuationToken, options);
|
|
69
|
+
continuationToken = result.nextLink;
|
|
70
|
+
let page = result.value || [];
|
|
71
|
+
setContinuationToken(page, continuationToken);
|
|
72
|
+
yield page;
|
|
73
|
+
}
|
|
76
74
|
}
|
|
77
|
-
listPagingAll(scope, options) {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
for (var _d = true, _e = __asyncValues(this.listPagingPage(scope, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
82
|
-
_c = _f.value;
|
|
83
|
-
_d = false;
|
|
84
|
-
const page = _c;
|
|
85
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
89
|
-
finally {
|
|
90
|
-
try {
|
|
91
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
92
|
-
}
|
|
93
|
-
finally { if (e_1) throw e_1.error; }
|
|
94
|
-
}
|
|
95
|
-
});
|
|
75
|
+
async *listPagingAll(scope, options) {
|
|
76
|
+
for await (const page of this.listPagingPage(scope, options)) {
|
|
77
|
+
yield* page;
|
|
78
|
+
}
|
|
96
79
|
}
|
|
97
80
|
/**
|
|
98
81
|
* Lists all budgets for the defined scope.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"budgets.js","sourceRoot":"","sources":["../../../src/operations/budgets.ts"],"names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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,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAetD,4CAA4C;AAC5C,2CAA2C;AAC3C,MAAM,OAAO,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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UAAU,EAAE,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"]}
|
|
@@ -10,6 +10,7 @@ import * as Mappers from "../models/mappers.js";
|
|
|
10
10
|
import * as Parameters from "../models/parameters.js";
|
|
11
11
|
/** Class containing Charges operations. */
|
|
12
12
|
export class ChargesImpl {
|
|
13
|
+
client;
|
|
13
14
|
/**
|
|
14
15
|
* Initialize a new instance of the class Charges class.
|
|
15
16
|
* @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,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAItD,2CAA2C;AAC3C,MAAM,OAAO,WAAW;
|
|
1
|
+
{"version":3,"file":"charges.js","sourceRoot":"","sources":["../../../src/operations/charges.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAItD,2CAA2C;AAC3C,MAAM,OAAO,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;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"]}
|
|
@@ -10,6 +10,7 @@ import * as Mappers from "../models/mappers.js";
|
|
|
10
10
|
import * as Parameters from "../models/parameters.js";
|
|
11
11
|
/** Class containing Credits operations. */
|
|
12
12
|
export class CreditsImpl {
|
|
13
|
+
client;
|
|
13
14
|
/**
|
|
14
15
|
* Initialize a new instance of the class Credits class.
|
|
15
16
|
* @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,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAItD,2CAA2C;AAC3C,MAAM,OAAO,WAAW;
|
|
1
|
+
{"version":3,"file":"credits.js","sourceRoot":"","sources":["../../../src/operations/credits.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAItD,2CAA2C;AAC3C,MAAM,OAAO,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;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"]}
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
|
-
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
|
|
9
8
|
import { setContinuationToken } from "../pagingHelper.js";
|
|
10
9
|
import * as coreClient from "@azure/core-client";
|
|
11
10
|
import * as Mappers from "../models/mappers.js";
|
|
@@ -13,6 +12,7 @@ import * as Parameters from "../models/parameters.js";
|
|
|
13
12
|
/// <reference lib="esnext.asynciterable" />
|
|
14
13
|
/** Class containing EventsOperations operations. */
|
|
15
14
|
export class EventsOperationsImpl {
|
|
15
|
+
client;
|
|
16
16
|
/**
|
|
17
17
|
* Initialize a new instance of the class EventsOperations class.
|
|
18
18
|
* @param client Reference to the service client
|
|
@@ -39,52 +39,35 @@ export class EventsOperationsImpl {
|
|
|
39
39
|
return this;
|
|
40
40
|
},
|
|
41
41
|
byPage: (settings) => {
|
|
42
|
-
if (settings
|
|
42
|
+
if (settings?.maxPageSize) {
|
|
43
43
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
44
44
|
}
|
|
45
45
|
return this.listByBillingProfilePagingPage(billingAccountId, billingProfileId, startDate, endDate, options, settings);
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
|
-
listByBillingProfilePagingPage(billingAccountId, billingProfileId, startDate, endDate, options, settings) {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
});
|
|
49
|
+
async *listByBillingProfilePagingPage(billingAccountId, billingProfileId, startDate, endDate, options, settings) {
|
|
50
|
+
let result;
|
|
51
|
+
let continuationToken = settings?.continuationToken;
|
|
52
|
+
if (!continuationToken) {
|
|
53
|
+
result = await this._listByBillingProfile(billingAccountId, billingProfileId, startDate, endDate, options);
|
|
54
|
+
let page = result.value || [];
|
|
55
|
+
continuationToken = result.nextLink;
|
|
56
|
+
setContinuationToken(page, continuationToken);
|
|
57
|
+
yield page;
|
|
58
|
+
}
|
|
59
|
+
while (continuationToken) {
|
|
60
|
+
result = await this._listByBillingProfileNext(billingAccountId, billingProfileId, continuationToken, options);
|
|
61
|
+
continuationToken = result.nextLink;
|
|
62
|
+
let page = result.value || [];
|
|
63
|
+
setContinuationToken(page, continuationToken);
|
|
64
|
+
yield page;
|
|
65
|
+
}
|
|
68
66
|
}
|
|
69
|
-
listByBillingProfilePagingAll(billingAccountId, billingProfileId, startDate, endDate, options) {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
for (var _d = true, _e = __asyncValues(this.listByBillingProfilePagingPage(billingAccountId, billingProfileId, startDate, endDate, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
74
|
-
_c = _f.value;
|
|
75
|
-
_d = false;
|
|
76
|
-
const page = _c;
|
|
77
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
81
|
-
finally {
|
|
82
|
-
try {
|
|
83
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
84
|
-
}
|
|
85
|
-
finally { if (e_1) throw e_1.error; }
|
|
86
|
-
}
|
|
87
|
-
});
|
|
67
|
+
async *listByBillingProfilePagingAll(billingAccountId, billingProfileId, startDate, endDate, options) {
|
|
68
|
+
for await (const page of this.listByBillingProfilePagingPage(billingAccountId, billingProfileId, startDate, endDate, options)) {
|
|
69
|
+
yield* page;
|
|
70
|
+
}
|
|
88
71
|
}
|
|
89
72
|
/**
|
|
90
73
|
* Lists the events that decrements Azure credits or Microsoft Azure consumption commitment for a
|
|
@@ -102,52 +85,35 @@ export class EventsOperationsImpl {
|
|
|
102
85
|
return this;
|
|
103
86
|
},
|
|
104
87
|
byPage: (settings) => {
|
|
105
|
-
if (settings
|
|
88
|
+
if (settings?.maxPageSize) {
|
|
106
89
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
107
90
|
}
|
|
108
91
|
return this.listByBillingAccountPagingPage(billingAccountId, options, settings);
|
|
109
92
|
}
|
|
110
93
|
};
|
|
111
94
|
}
|
|
112
|
-
listByBillingAccountPagingPage(billingAccountId, options, settings) {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
}
|
|
130
|
-
});
|
|
95
|
+
async *listByBillingAccountPagingPage(billingAccountId, options, settings) {
|
|
96
|
+
let result;
|
|
97
|
+
let continuationToken = settings?.continuationToken;
|
|
98
|
+
if (!continuationToken) {
|
|
99
|
+
result = await this._listByBillingAccount(billingAccountId, options);
|
|
100
|
+
let page = result.value || [];
|
|
101
|
+
continuationToken = result.nextLink;
|
|
102
|
+
setContinuationToken(page, continuationToken);
|
|
103
|
+
yield page;
|
|
104
|
+
}
|
|
105
|
+
while (continuationToken) {
|
|
106
|
+
result = await this._listByBillingAccountNext(billingAccountId, continuationToken, options);
|
|
107
|
+
continuationToken = result.nextLink;
|
|
108
|
+
let page = result.value || [];
|
|
109
|
+
setContinuationToken(page, continuationToken);
|
|
110
|
+
yield page;
|
|
111
|
+
}
|
|
131
112
|
}
|
|
132
|
-
listByBillingAccountPagingAll(billingAccountId, options) {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
for (var _d = true, _e = __asyncValues(this.listByBillingAccountPagingPage(billingAccountId, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
137
|
-
_c = _f.value;
|
|
138
|
-
_d = false;
|
|
139
|
-
const page = _c;
|
|
140
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
144
|
-
finally {
|
|
145
|
-
try {
|
|
146
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
147
|
-
}
|
|
148
|
-
finally { if (e_2) throw e_2.error; }
|
|
149
|
-
}
|
|
150
|
-
});
|
|
113
|
+
async *listByBillingAccountPagingAll(billingAccountId, options) {
|
|
114
|
+
for await (const page of this.listByBillingAccountPagingPage(billingAccountId, options)) {
|
|
115
|
+
yield* page;
|
|
116
|
+
}
|
|
151
117
|
}
|
|
152
118
|
/**
|
|
153
119
|
* 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/eventsOperations.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CA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AE;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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X,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"]}
|