From bdd6c332eae937a0c8c4ac4a2809816447567a2f Mon Sep 17 00:00:00 2001 From: Phoenix He Date: Thu, 24 Oct 2019 13:28:45 +0800 Subject: [PATCH 1/4] Update swagger_to_sdk_config.json --- swagger_to_sdk_config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swagger_to_sdk_config.json b/swagger_to_sdk_config.json index a4f763911359..399fe6789da5 100644 --- a/swagger_to_sdk_config.json +++ b/swagger_to_sdk_config.json @@ -5,7 +5,7 @@ "typescript": "", "license-header": "MICROSOFT_MIT_NO_VERSION", "sdkrel:typescript-sdks-folder": ".", - "use": "@microsoft.azure/autorest.typescript@4.1.1" + "use": "@microsoft.azure/autorest.typescript@4.2.2" }, "advanced_options": { "clone_dir": "./azure-sdk-for-js", From be583e41b9d1d90a0302d8468afacd475bada73c Mon Sep 17 00:00:00 2001 From: Phoenix He Date: Thu, 24 Oct 2019 14:40:18 +0800 Subject: [PATCH 2/4] Update swagger_to_sdk_config.json --- swagger_to_sdk_config.json | 1 + 1 file changed, 1 insertion(+) diff --git a/swagger_to_sdk_config.json b/swagger_to_sdk_config.json index 399fe6789da5..b8a4c993ce88 100644 --- a/swagger_to_sdk_config.json +++ b/swagger_to_sdk_config.json @@ -5,6 +5,7 @@ "typescript": "", "license-header": "MICROSOFT_MIT_NO_VERSION", "sdkrel:typescript-sdks-folder": ".", + "go.clear-output-folder": "", "use": "@microsoft.azure/autorest.typescript@4.2.2" }, "advanced_options": { From c9511411cee2cb98d6bd53a8deae2c47a3e7c284 Mon Sep 17 00:00:00 2001 From: Phoenix He Date: Thu, 24 Oct 2019 14:49:49 +0800 Subject: [PATCH 3/4] Update swagger_to_sdk_config.json --- swagger_to_sdk_config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swagger_to_sdk_config.json b/swagger_to_sdk_config.json index b8a4c993ce88..0387101043cb 100644 --- a/swagger_to_sdk_config.json +++ b/swagger_to_sdk_config.json @@ -5,7 +5,7 @@ "typescript": "", "license-header": "MICROSOFT_MIT_NO_VERSION", "sdkrel:typescript-sdks-folder": ".", - "go.clear-output-folder": "", + "typescript.clear-output-folder": "", "use": "@microsoft.azure/autorest.typescript@4.2.2" }, "advanced_options": { From dec7330146b2262b18d39978d3557e08d5287f5b Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Fri, 25 Oct 2019 09:51:49 +0000 Subject: [PATCH 4/4] Generated from a71df15a587ec060147aaef2dcfc12d19500fdc8 Fix json format by prettier --- sdk/consumption/arm-consumption/LICENSE.txt | 2 +- sdk/consumption/arm-consumption/README.md | 22 +- sdk/consumption/arm-consumption/package.json | 24 +- .../arm-consumption/rollup.config.js | 22 +- .../src/consumptionManagementClient.ts | 20 +- .../src/consumptionManagementClientContext.ts | 4 +- .../src/models/aggregatedCostMappers.ts | 59 +- .../src/models/balancesMappers.ts | 55 +- .../src/models/budgetsMappers.ts | 59 +- .../src/models/chargesMappers.ts | 57 +- .../src/models/creditsMappers.ts | 48 + .../src/models/eventsOperationsMappers.ts | 49 + .../src/models/forecastsMappers.ts | 61 +- .../arm-consumption/src/models/index.ts | 4539 ++++++++--------- .../src/models/lotsOperationsMappers.ts | 49 + .../arm-consumption/src/models/mappers.ts | 2167 ++++++-- .../src/models/marketplacesMappers.ts | 59 +- .../src/models/operationsMappers.ts | 14 +- .../arm-consumption/src/models/parameters.ts | 70 +- .../src/models/priceSheetMappers.ts | 57 +- .../reservationRecommendationsMappers.ts | 18 +- .../models/reservationTransactionsMappers.ts | 49 + .../src/models/reservationsDetailsMappers.ts | 59 +- .../models/reservationsSummariesMappers.ts | 59 +- .../arm-consumption/src/models/tagsMappers.ts | 57 +- .../src/models/usageDetailsMappers.ts | 59 +- .../arm-consumption/src/operations/budgets.ts | 512 +- .../arm-consumption/src/operations/charges.ts | 266 +- .../arm-consumption/src/operations/credits.ts | 86 + .../src/operations/eventsOperations.ts | 145 + .../arm-consumption/src/operations/index.ts | 10 +- .../src/operations/lotsOperations.ts | 135 + .../src/operations/marketplaces.ts | 1075 +--- .../operations/reservationRecommendations.ts | 32 +- .../src/operations/reservationTransactions.ts | 131 + .../src/operations/reservationsDetails.ts | 115 + .../src/operations/reservationsSummaries.ts | 120 + .../arm-consumption/src/operations/tags.ts | 49 +- .../src/operations/usageDetails.ts | 1138 +---- sdk/consumption/arm-consumption/tsconfig.json | 2 +- 40 files changed, 5820 insertions(+), 5734 deletions(-) create mode 100644 sdk/consumption/arm-consumption/src/models/creditsMappers.ts create mode 100644 sdk/consumption/arm-consumption/src/models/eventsOperationsMappers.ts create mode 100644 sdk/consumption/arm-consumption/src/models/lotsOperationsMappers.ts create mode 100644 sdk/consumption/arm-consumption/src/models/reservationTransactionsMappers.ts create mode 100644 sdk/consumption/arm-consumption/src/operations/credits.ts create mode 100644 sdk/consumption/arm-consumption/src/operations/eventsOperations.ts create mode 100644 sdk/consumption/arm-consumption/src/operations/lotsOperations.ts create mode 100644 sdk/consumption/arm-consumption/src/operations/reservationTransactions.ts diff --git a/sdk/consumption/arm-consumption/LICENSE.txt b/sdk/consumption/arm-consumption/LICENSE.txt index a70e8cf66038..b73b4a1293c3 100644 --- a/sdk/consumption/arm-consumption/LICENSE.txt +++ b/sdk/consumption/arm-consumption/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2018 Microsoft +Copyright (c) 2019 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/consumption/arm-consumption/README.md b/sdk/consumption/arm-consumption/README.md index 60dbbae03bb7..ad627fa4682b 100644 --- a/sdk/consumption/arm-consumption/README.md +++ b/sdk/consumption/arm-consumption/README.md @@ -9,7 +9,7 @@ This package contains an isomorphic SDK for ConsumptionManagementClient. ### How to Install -``` +```bash npm install @azure/arm-consumption ``` @@ -19,13 +19,14 @@ npm install @azure/arm-consumption ##### Install @azure/ms-rest-nodeauth -``` -npm install @azure/ms-rest-nodeauth +- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. +```bash +npm install @azure/ms-rest-nodeauth@"^3.0.0" ``` ##### Sample code -```ts +```typescript import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; @@ -34,12 +35,13 @@ const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; msRestNodeAuth.interactiveLogin().then((creds) => { const client = new ConsumptionManagementClient(creds, subscriptionId); + const scope = "testscope"; const expand = "testexpand"; const filter = "testfilter"; const skiptoken = "testskiptoken"; const top = 1; - const apply = "testapply"; - client.usageDetails.list(expand, filter, skiptoken, top, apply).then((result) => { + const metric = "actualcost"; + client.usageDetails.list(scope, expand, filter, skiptoken, top, metric).then((result) => { console.log("The result is:"); console.log(result); }); @@ -52,7 +54,7 @@ msRestNodeAuth.interactiveLogin().then((creds) => { ##### Install @azure/ms-rest-browserauth -``` +```bash npm install @azure/ms-rest-browserauth ``` @@ -82,12 +84,13 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to authManager.login(); } const client = new Azure.ArmConsumption.ConsumptionManagementClient(res.creds, subscriptionId); + const scope = "testscope"; const expand = "testexpand"; const filter = "testfilter"; const skiptoken = "testskiptoken"; const top = 1; - const apply = "testapply"; - client.usageDetails.list(expand, filter, skiptoken, top, apply).then((result) => { + const metric = "actualcost"; + client.usageDetails.list(scope, expand, filter, skiptoken, top, metric).then((result) => { console.log("The result is:"); console.log(result); }).catch((err) => { @@ -105,5 +108,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/consumption/arm-consumption/README.png) diff --git a/sdk/consumption/arm-consumption/package.json b/sdk/consumption/arm-consumption/package.json index d43ed96f88a0..afa3d904ff6a 100644 --- a/sdk/consumption/arm-consumption/package.json +++ b/sdk/consumption/arm-consumption/package.json @@ -4,9 +4,9 @@ "description": "ConsumptionManagementClient Library with typescript type definitions for node.js and browser.", "version": "6.3.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.1.0", - "@azure/ms-rest-js": "^1.1.0", - "tslib": "^1.9.3" + "@azure/ms-rest-azure-js": "^2.0.1", + "@azure/ms-rest-js": "^2.0.4", + "tslib": "^1.10.0" }, "keywords": [ "node", @@ -20,18 +20,19 @@ "module": "./esm/consumptionManagementClient.js", "types": "./esm/consumptionManagementClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", - "rollup": "^0.66.2", - "rollup-plugin-node-resolve": "^3.4.0", - "uglify-js": "^3.4.9" + "typescript": "^3.5.3", + "rollup": "^1.18.0", + "rollup-plugin-node-resolve": "^5.2.0", + "rollup-plugin-sourcemaps": "^0.4.2", + "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/azure/azure-sdk-for-js/tree/master/sdk/consumption/arm-consumption", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/consumption/arm-consumption", "repository": { "type": "git", - "url": "https://github.com/azure/azure-sdk-for-js.git" + "url": "https://github.com/Azure/azure-sdk-for-js.git" }, "bugs": { - "url": "https://github.com/azure/azure-sdk-for-js/issues" + "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, "files": [ "dist/**/*.js", @@ -43,6 +44,7 @@ "esm/**/*.d.ts", "esm/**/*.d.ts.map", "src/**/*.ts", + "README.md", "rollup.config.js", "tsconfig.json" ], @@ -52,5 +54,5 @@ "prepack": "npm install && npm run build" }, "sideEffects": false, - "authPublish": true + "autoPublish": true } diff --git a/sdk/consumption/arm-consumption/rollup.config.js b/sdk/consumption/arm-consumption/rollup.config.js index e434910415dd..2006259141ce 100644 --- a/sdk/consumption/arm-consumption/rollup.config.js +++ b/sdk/consumption/arm-consumption/rollup.config.js @@ -1,10 +1,16 @@ +import rollup from "rollup"; import nodeResolve from "rollup-plugin-node-resolve"; +import sourcemaps from "rollup-plugin-sourcemaps"; + /** - * @type {import('rollup').RollupFileOptions} + * @type {rollup.RollupFileOptions} */ const config = { - input: './esm/consumptionManagementClient.js', - external: ["@azure/ms-rest-js", "@azure/ms-rest-azure-js"], + input: "./esm/consumptionManagementClient.js", + external: [ + "@azure/ms-rest-js", + "@azure/ms-rest-azure-js" + ], output: { file: "./dist/arm-consumption.js", format: "umd", @@ -16,16 +22,16 @@ const config = { }, banner: `/* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */` }, plugins: [ - nodeResolve({ module: true }) + nodeResolve({ mainFields: ['module', 'main'] }), + sourcemaps() ] }; + export default config; diff --git a/sdk/consumption/arm-consumption/src/consumptionManagementClient.ts b/sdk/consumption/arm-consumption/src/consumptionManagementClient.ts index 6157a62a09ab..0c8fa7086905 100644 --- a/sdk/consumption/arm-consumption/src/consumptionManagementClient.ts +++ b/sdk/consumption/arm-consumption/src/consumptionManagementClient.ts @@ -19,17 +19,21 @@ class ConsumptionManagementClient extends ConsumptionManagementClientContext { // Operation groups usageDetails: operations.UsageDetails; marketplaces: operations.Marketplaces; + budgets: operations.Budgets; + tags: operations.Tags; + charges: operations.Charges; balances: operations.Balances; reservationsSummaries: operations.ReservationsSummaries; reservationsDetails: operations.ReservationsDetails; reservationRecommendations: operations.ReservationRecommendations; - budgets: operations.Budgets; + reservationTransactions: operations.ReservationTransactions; priceSheet: operations.PriceSheet; - tags: operations.Tags; forecasts: operations.Forecasts; operations: operations.Operations; aggregatedCost: operations.AggregatedCost; - charges: operations.Charges; + events: operations.EventsOperations; + lots: operations.LotsOperations; + credits: operations.Credits; /** * Initializes a new instance of the ConsumptionManagementClient class. @@ -41,17 +45,21 @@ class ConsumptionManagementClient extends ConsumptionManagementClientContext { super(credentials, subscriptionId, options); this.usageDetails = new operations.UsageDetails(this); this.marketplaces = new operations.Marketplaces(this); + this.budgets = new operations.Budgets(this); + this.tags = new operations.Tags(this); + this.charges = new operations.Charges(this); this.balances = new operations.Balances(this); this.reservationsSummaries = new operations.ReservationsSummaries(this); this.reservationsDetails = new operations.ReservationsDetails(this); this.reservationRecommendations = new operations.ReservationRecommendations(this); - this.budgets = new operations.Budgets(this); + this.reservationTransactions = new operations.ReservationTransactions(this); this.priceSheet = new operations.PriceSheet(this); - this.tags = new operations.Tags(this); this.forecasts = new operations.Forecasts(this); this.operations = new operations.Operations(this); this.aggregatedCost = new operations.AggregatedCost(this); - this.charges = new operations.Charges(this); + this.events = new operations.EventsOperations(this); + this.lots = new operations.LotsOperations(this); + this.credits = new operations.Credits(this); } } diff --git a/sdk/consumption/arm-consumption/src/consumptionManagementClientContext.ts b/sdk/consumption/arm-consumption/src/consumptionManagementClientContext.ts index ae3c432891eb..91ed1c16c4b8 100644 --- a/sdk/consumption/arm-consumption/src/consumptionManagementClientContext.ts +++ b/sdk/consumption/arm-consumption/src/consumptionManagementClientContext.ts @@ -13,7 +13,7 @@ import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-consumption"; -const packageVersion = "0.1.0"; +const packageVersion = "6.3.0"; export class ConsumptionManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; @@ -44,7 +44,7 @@ export class ConsumptionManagementClientContext extends msRestAzure.AzureService super(credentials, options); - this.apiVersion = '2018-10-01'; + this.apiVersion = '2019-10-01'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; diff --git a/sdk/consumption/arm-consumption/src/models/aggregatedCostMappers.ts b/sdk/consumption/arm-consumption/src/models/aggregatedCostMappers.ts index e520a3af90a2..0a93a1d28e13 100644 --- a/sdk/consumption/arm-consumption/src/models/aggregatedCostMappers.ts +++ b/sdk/consumption/arm-consumption/src/models/aggregatedCostMappers.ts @@ -1,39 +1,48 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - ManagementGroupAggregatedCostResult, - Resource, - BaseResource, - ErrorResponse, - ErrorDetails, - UsageDetail, - MeterDetails, - Marketplace, + discriminators, + Amount, Balance, - BalancePropertiesNewPurchasesDetailsItem, BalancePropertiesAdjustmentDetailsItem, - ReservationSummary, - ReservationDetail, - PriceSheetResult, - PriceSheetProperties, + BalancePropertiesNewPurchasesDetailsItem, + BaseResource, + Budget, + BudgetTimePeriod, + ChargeSummary, + CreditBalanceSummary, + CreditSummary, + CurrentSpend, + ErrorDetails, + ErrorResponse, + EventSummary, + Filters, Forecast, ForecastPropertiesConfidenceLevelsItem, - ChargeSummary, + LegacyChargeSummary, + LegacyUsageDetail, + LotSummary, + ManagementGroupAggregatedCostResult, + Marketplace, + MeterDetails, + MeterDetailsResponse, + ModernChargeSummary, + ModernUsageDetail, + Notification, + PriceSheetProperties, + PriceSheetResult, ProxyResource, - TagsResult, + ReservationDetail, + ReservationSummary, + ReservationTransaction, + Resource, Tag, - Budget, - BudgetTimePeriod, - Filters, - CurrentSpend, - Notification + TagsResult, + UsageDetail } from "../models/mappers"; - diff --git a/sdk/consumption/arm-consumption/src/models/balancesMappers.ts b/sdk/consumption/arm-consumption/src/models/balancesMappers.ts index 036eb9055a36..0a93a1d28e13 100644 --- a/sdk/consumption/arm-consumption/src/models/balancesMappers.ts +++ b/sdk/consumption/arm-consumption/src/models/balancesMappers.ts @@ -1,39 +1,48 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { + discriminators, + Amount, Balance, - Resource, - BaseResource, - BalancePropertiesNewPurchasesDetailsItem, BalancePropertiesAdjustmentDetailsItem, - ErrorResponse, + BalancePropertiesNewPurchasesDetailsItem, + BaseResource, + Budget, + BudgetTimePeriod, + ChargeSummary, + CreditBalanceSummary, + CreditSummary, + CurrentSpend, ErrorDetails, - UsageDetail, - MeterDetails, - Marketplace, - ReservationSummary, - ReservationDetail, - PriceSheetResult, - PriceSheetProperties, + ErrorResponse, + EventSummary, + Filters, Forecast, ForecastPropertiesConfidenceLevelsItem, + LegacyChargeSummary, + LegacyUsageDetail, + LotSummary, ManagementGroupAggregatedCostResult, - ChargeSummary, + Marketplace, + MeterDetails, + MeterDetailsResponse, + ModernChargeSummary, + ModernUsageDetail, + Notification, + PriceSheetProperties, + PriceSheetResult, ProxyResource, - TagsResult, + ReservationDetail, + ReservationSummary, + ReservationTransaction, + Resource, Tag, - Budget, - BudgetTimePeriod, - Filters, - CurrentSpend, - Notification + TagsResult, + UsageDetail } from "../models/mappers"; - diff --git a/sdk/consumption/arm-consumption/src/models/budgetsMappers.ts b/sdk/consumption/arm-consumption/src/models/budgetsMappers.ts index 5e4b32df6314..ba2a529edb80 100644 --- a/sdk/consumption/arm-consumption/src/models/budgetsMappers.ts +++ b/sdk/consumption/arm-consumption/src/models/budgetsMappers.ts @@ -1,40 +1,49 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - BudgetsListResult, - Budget, - ProxyResource, + discriminators, + Amount, + Balance, + BalancePropertiesAdjustmentDetailsItem, + BalancePropertiesNewPurchasesDetailsItem, BaseResource, + Budget, + BudgetsListResult, BudgetTimePeriod, - Filters, + ChargeSummary, + CreditBalanceSummary, + CreditSummary, CurrentSpend, - Notification, - ErrorResponse, ErrorDetails, - TagsResult, - Tag, - Resource, - UsageDetail, - MeterDetails, - Marketplace, - Balance, - BalancePropertiesNewPurchasesDetailsItem, - BalancePropertiesAdjustmentDetailsItem, - ReservationSummary, - ReservationDetail, - PriceSheetResult, - PriceSheetProperties, + ErrorResponse, + EventSummary, + Filters, Forecast, ForecastPropertiesConfidenceLevelsItem, + LegacyChargeSummary, + LegacyUsageDetail, + LotSummary, ManagementGroupAggregatedCostResult, - ChargeSummary + Marketplace, + MeterDetails, + MeterDetailsResponse, + ModernChargeSummary, + ModernUsageDetail, + Notification, + PriceSheetProperties, + PriceSheetResult, + ProxyResource, + ReservationDetail, + ReservationSummary, + ReservationTransaction, + Resource, + Tag, + TagsResult, + UsageDetail } from "../models/mappers"; - diff --git a/sdk/consumption/arm-consumption/src/models/chargesMappers.ts b/sdk/consumption/arm-consumption/src/models/chargesMappers.ts index af91eeda052f..ce684bc70cc7 100644 --- a/sdk/consumption/arm-consumption/src/models/chargesMappers.ts +++ b/sdk/consumption/arm-consumption/src/models/chargesMappers.ts @@ -1,40 +1,49 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { + discriminators, + Amount, + Balance, + BalancePropertiesAdjustmentDetailsItem, + BalancePropertiesNewPurchasesDetailsItem, + BaseResource, + Budget, + BudgetTimePeriod, ChargesListResult, ChargeSummary, - Resource, - BaseResource, - ErrorResponse, + CreditBalanceSummary, + CreditSummary, + CurrentSpend, ErrorDetails, - UsageDetail, - MeterDetails, - Marketplace, - Balance, - BalancePropertiesNewPurchasesDetailsItem, - BalancePropertiesAdjustmentDetailsItem, - ReservationSummary, - ReservationDetail, - PriceSheetResult, - PriceSheetProperties, + ErrorResponse, + EventSummary, + Filters, Forecast, ForecastPropertiesConfidenceLevelsItem, + LegacyChargeSummary, + LegacyUsageDetail, + LotSummary, ManagementGroupAggregatedCostResult, + Marketplace, + MeterDetails, + MeterDetailsResponse, + ModernChargeSummary, + ModernUsageDetail, + Notification, + PriceSheetProperties, + PriceSheetResult, ProxyResource, - TagsResult, + ReservationDetail, + ReservationSummary, + ReservationTransaction, + Resource, Tag, - Budget, - BudgetTimePeriod, - Filters, - CurrentSpend, - Notification + TagsResult, + UsageDetail } from "../models/mappers"; - diff --git a/sdk/consumption/arm-consumption/src/models/creditsMappers.ts b/sdk/consumption/arm-consumption/src/models/creditsMappers.ts new file mode 100644 index 000000000000..0a93a1d28e13 --- /dev/null +++ b/sdk/consumption/arm-consumption/src/models/creditsMappers.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + Amount, + Balance, + BalancePropertiesAdjustmentDetailsItem, + BalancePropertiesNewPurchasesDetailsItem, + BaseResource, + Budget, + BudgetTimePeriod, + ChargeSummary, + CreditBalanceSummary, + CreditSummary, + CurrentSpend, + ErrorDetails, + ErrorResponse, + EventSummary, + Filters, + Forecast, + ForecastPropertiesConfidenceLevelsItem, + LegacyChargeSummary, + LegacyUsageDetail, + LotSummary, + ManagementGroupAggregatedCostResult, + Marketplace, + MeterDetails, + MeterDetailsResponse, + ModernChargeSummary, + ModernUsageDetail, + Notification, + PriceSheetProperties, + PriceSheetResult, + ProxyResource, + ReservationDetail, + ReservationSummary, + ReservationTransaction, + Resource, + Tag, + TagsResult, + UsageDetail +} from "../models/mappers"; diff --git a/sdk/consumption/arm-consumption/src/models/eventsOperationsMappers.ts b/sdk/consumption/arm-consumption/src/models/eventsOperationsMappers.ts new file mode 100644 index 000000000000..66c9310f6d94 --- /dev/null +++ b/sdk/consumption/arm-consumption/src/models/eventsOperationsMappers.ts @@ -0,0 +1,49 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + Amount, + Balance, + BalancePropertiesAdjustmentDetailsItem, + BalancePropertiesNewPurchasesDetailsItem, + BaseResource, + Budget, + BudgetTimePeriod, + ChargeSummary, + CreditBalanceSummary, + CreditSummary, + CurrentSpend, + ErrorDetails, + ErrorResponse, + Events, + EventSummary, + Filters, + Forecast, + ForecastPropertiesConfidenceLevelsItem, + LegacyChargeSummary, + LegacyUsageDetail, + LotSummary, + ManagementGroupAggregatedCostResult, + Marketplace, + MeterDetails, + MeterDetailsResponse, + ModernChargeSummary, + ModernUsageDetail, + Notification, + PriceSheetProperties, + PriceSheetResult, + ProxyResource, + ReservationDetail, + ReservationSummary, + ReservationTransaction, + Resource, + Tag, + TagsResult, + UsageDetail +} from "../models/mappers"; diff --git a/sdk/consumption/arm-consumption/src/models/forecastsMappers.ts b/sdk/consumption/arm-consumption/src/models/forecastsMappers.ts index 1a70ad016741..0ab16b475e03 100644 --- a/sdk/consumption/arm-consumption/src/models/forecastsMappers.ts +++ b/sdk/consumption/arm-consumption/src/models/forecastsMappers.ts @@ -1,40 +1,49 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - ForecastsListResult, - Forecast, - Resource, + discriminators, + Amount, + Balance, + BalancePropertiesAdjustmentDetailsItem, + BalancePropertiesNewPurchasesDetailsItem, BaseResource, - ForecastPropertiesConfidenceLevelsItem, - ErrorResponse, + Budget, + BudgetTimePeriod, + ChargeSummary, + CreditBalanceSummary, + CreditSummary, + CurrentSpend, ErrorDetails, - UsageDetail, - MeterDetails, + ErrorResponse, + EventSummary, + Filters, + Forecast, + ForecastPropertiesConfidenceLevelsItem, + ForecastsListResult, + LegacyChargeSummary, + LegacyUsageDetail, + LotSummary, + ManagementGroupAggregatedCostResult, Marketplace, - Balance, - BalancePropertiesNewPurchasesDetailsItem, - BalancePropertiesAdjustmentDetailsItem, - ReservationSummary, - ReservationDetail, - PriceSheetResult, + MeterDetails, + MeterDetailsResponse, + ModernChargeSummary, + ModernUsageDetail, + Notification, PriceSheetProperties, - ManagementGroupAggregatedCostResult, - ChargeSummary, + PriceSheetResult, ProxyResource, - TagsResult, + ReservationDetail, + ReservationSummary, + ReservationTransaction, + Resource, Tag, - Budget, - BudgetTimePeriod, - Filters, - CurrentSpend, - Notification + TagsResult, + UsageDetail } from "../models/mappers"; - diff --git a/sdk/consumption/arm-consumption/src/models/index.ts b/sdk/consumption/arm-consumption/src/models/index.ts index a0df6be94f6f..2976b423d987 100644 --- a/sdk/consumption/arm-consumption/src/models/index.ts +++ b/sdk/consumption/arm-consumption/src/models/index.ts @@ -1,11 +1,9 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js"; @@ -13,3243 +11,2818 @@ import * as msRest from "@azure/ms-rest-js"; export { BaseResource, CloudError }; - /** - * @interface - * An interface representing MeterDetails. * The properties of the meter detail. - * */ export interface MeterDetails { /** - * @member {string} [meterName] The name of the meter, within the given meter - * category - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The name of the meter, within the given meter category + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly meterName?: string; /** - * @member {string} [meterCategory] The category of the meter, for example, - * 'Cloud services', 'Networking', etc.. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The category of the meter, for example, 'Cloud services', 'Networking', etc.. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly meterCategory?: string; /** - * @member {string} [meterSubCategory] The subcategory of the meter, for - * example, 'A6 Cloud services', 'ExpressRoute (IXP)', etc.. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The subcategory of the meter, for example, 'A6 Cloud services', 'ExpressRoute (IXP)', etc.. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly meterSubCategory?: string; /** - * @member {string} [unit] The unit in which the meter consumption is - * charged, for example, 'Hours', 'GB', etc. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The unit in which the meter consumption is charged, for example, 'Hours', 'GB', etc. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly unit?: string; /** - * @member {string} [meterLocation] The location in which the Azure service - * is available. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The location in which the Azure service is available. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly meterLocation?: string; /** - * @member {number} [totalIncludedQuantity] The total included quantity - * associated with the offer. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The total included quantity associated with the offer. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly totalIncludedQuantity?: number; /** - * @member {number} [pretaxStandardRate] The pretax listing price. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The pretax listing price. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly pretaxStandardRate?: number; /** - * @member {string} [serviceName] The name of the service. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The name of the service. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly serviceName?: string; /** - * @member {string} [serviceTier] The service tier. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The service tier. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly serviceTier?: string; } /** - * @interface - * An interface representing Resource. * The Resource model definition. - * - * @extends BaseResource */ export interface Resource extends BaseResource { /** - * @member {string} [id] Resource Id. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * @member {string} [name] Resource name. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** - * @member {string} [type] Resource type. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: string; /** - * @member {{ [propertyName: string]: string }} [tags] Resource tags. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource tags. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly tags?: { [propertyName: string]: string }; } /** - * @interface - * An interface representing UsageDetail. + * Contains the possible cases for UsageDetail. + */ +export type UsageDetailUnion = UsageDetail | LegacyUsageDetail | ModernUsageDetail; + +/** * An usage detail resource. - * - * @extends Resource */ -export interface UsageDetail extends Resource { +export interface UsageDetail { /** - * @member {string} [billingPeriodId] The id of the billing period resource - * that the usage belongs to. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Polymorphic Discriminator */ - readonly billingPeriodId?: string; + kind: "UsageDetail"; /** - * @member {string} [invoiceId] The id of the invoice resource that the usage - * belongs to. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly invoiceId?: string; + readonly id?: string; /** - * @member {Date} [usageStart] The start of the date time range covered by - * the usage detail. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly usageStart?: Date; + readonly name?: string; /** - * @member {Date} [usageEnd] The end of the date time range covered by the - * usage detail. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly usageEnd?: Date; + readonly type?: string; /** - * @member {string} [instanceName] The name of the resource instance that the - * usage is about. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource tags. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly instanceName?: string; + readonly tags?: { [propertyName: string]: string }; +} + +/** + * The properties of the meter detail. + */ +export interface MeterDetailsResponse { /** - * @member {string} [instanceId] The uri of the resource instance that the - * usage is about. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The name of the meter, within the given meter category + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly instanceId?: string; + readonly meterName?: string; /** - * @member {string} [instanceLocation] The location of the resource instance - * that the usage is about. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The category of the meter, for example, 'Cloud services', 'Networking', etc.. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly instanceLocation?: string; + readonly meterCategory?: string; /** - * @member {string} [currency] The ISO currency in which the meter is - * charged, for example, USD. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The subcategory of the meter, for example, 'A6 Cloud services', 'ExpressRoute (IXP)', etc.. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly currency?: string; + readonly meterSubCategory?: string; /** - * @member {number} [usageQuantity] The quantity of usage. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The unit in which the meter consumption is charged, for example, 'Hours', 'GB', etc. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly usageQuantity?: number; + readonly unitOfMeasure?: string; /** - * @member {number} [billableQuantity] The billable usage quantity. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The service family. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly billableQuantity?: number; + readonly serviceFamily?: string; +} + +/** + * Legacy usage detail. + */ +export interface LegacyUsageDetail { /** - * @member {number} [pretaxCost] The amount of cost before tax. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Polymorphic Discriminator */ - readonly pretaxCost?: number; + kind: "legacy"; /** - * @member {boolean} [isEstimated] The estimated usage is subject to change. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly isEstimated?: boolean; + readonly id?: string; /** - * @member {string} [meterId] The meter id (GUID). - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly meterId?: string; + readonly name?: string; /** - * @member {MeterDetails} [meterDetails] The details about the meter. By - * default this is not populated, unless it's specified in $expand. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly meterDetails?: MeterDetails; + readonly type?: string; /** - * @member {string} [subscriptionGuid] Subscription guid. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource tags. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly subscriptionGuid?: string; + readonly tags?: { [propertyName: string]: string }; /** - * @member {string} [subscriptionName] Subscription name. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Billing Account identifier. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly subscriptionName?: string; + readonly billingAccountId?: string; /** - * @member {string} [accountName] Account name. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Billing Account Name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly accountName?: string; + readonly billingAccountName?: string; /** - * @member {string} [departmentName] Department name. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The billing period start date. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly departmentName?: string; + readonly billingPeriodStartDate?: Date; /** - * @member {string} [product] Product name. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The billing period end date. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly product?: string; + readonly billingPeriodEndDate?: Date; /** - * @member {string} [consumedService] Consumed service name. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Billing Profile identifier. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly consumedService?: string; + readonly billingProfileId?: string; /** - * @member {string} [costCenter] The cost center of this department if it is - * a department and a costcenter exists - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Billing Profile Name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly costCenter?: string; + readonly billingProfileName?: string; /** - * @member {string} [partNumber] Part Number - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Account Owner Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly partNumber?: string; + readonly accountOwnerId?: string; /** - * @member {string} [resourceGuid] Resource Guid - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Account Name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly resourceGuid?: string; + readonly accountName?: string; /** - * @member {string} [offerId] Offer Id - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Subscription guid. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly offerId?: string; + readonly subscriptionId?: string; /** - * @member {boolean} [chargesBilledSeparately] Charges billed separately - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Subscription name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly chargesBilledSeparately?: boolean; + readonly subscriptionName?: string; /** - * @member {string} [location] Resource Location - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Date for the usage record. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly location?: string; + readonly date?: Date; /** - * @member {string} [additionalProperties] Additional details of this usage - * item. By default this is not populated, unless it's specified in $expand. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Product name for the consumed service or purchase. Not available for Marketplace. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly additionalProperties?: string; -} - -/** - * @interface - * An interface representing Marketplace. - * An marketplace resource. - * - * @extends Resource - */ -export interface Marketplace extends Resource { + readonly product?: string; /** - * @member {string} [billingPeriodId] The id of the billing period resource - * that the usage belongs to. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Part Number of the service used. Can be used to join with the price sheet. Not available for + * marketplace. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly billingPeriodId?: string; + readonly partNumber?: string; /** - * @member {Date} [usageStart] The start of the date time range covered by - * the usage detail. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The meter id (GUID). Not available for marketplace. For reserved instance this represents the + * primary meter for which the reservation was purchased. For the actual VM Size for which the + * reservation is purchased see productOrderName. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly usageStart?: Date; + readonly meterId?: string; /** - * @member {Date} [usageEnd] The end of the date time range covered by the - * usage detail. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The details about the meter. By default this is not populated, unless it's specified in + * $expand. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly usageEnd?: Date; + readonly meterDetails?: MeterDetailsResponse; /** - * @member {number} [resourceRate] The marketplace resource rate. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The usage quantity. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly resourceRate?: number; + readonly quantity?: number; /** - * @member {string} [offerName] The type of offer. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Effective Price that's charged for the usage. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly offerName?: string; + readonly effectivePrice?: number; /** - * @member {string} [resourceGroup] The name of resource group. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The amount of cost before tax. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly resourceGroup?: string; + readonly cost?: number; /** - * @member {string} [orderNumber] The order number. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Unit Price is the price applicable to you. (your EA or other contract price). + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly orderNumber?: string; + readonly unitPrice?: number; /** - * @member {string} [instanceName] The name of the resource instance that the - * usage is about. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Billing Currency. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly instanceName?: string; + readonly billingCurrency?: string; /** - * @member {string} [instanceId] The uri of the resource instance that the - * usage is about. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource Location. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly instanceId?: string; + readonly resourceLocation?: string; /** - * @member {string} [currency] The ISO currency in which the meter is - * charged, for example, USD. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Consumed service name. Name of the azure resource provider that emits the usage or was + * purchased. This value is not provided for marketplace usage. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly currency?: string; + readonly consumedService?: string; /** - * @member {number} [consumedQuantity] The quantity of usage. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Azure resource manager resource identifier. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly consumedQuantity?: number; + readonly resourceId?: string; /** - * @member {string} [unitOfMeasure] The unit of measure. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource Name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly unitOfMeasure?: string; + readonly resourceName?: string; /** - * @member {number} [pretaxCost] The amount of cost before tax. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Service Info 1. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly pretaxCost?: number; + readonly serviceInfo1?: string; /** - * @member {boolean} [isEstimated] The estimated usage is subject to change. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Service Info 2. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly isEstimated?: boolean; + readonly serviceInfo2?: string; /** - * @member {string} [meterId] The meter id (GUID). - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Additional details of this usage item. By default this is not populated, unless it's specified + * in $expand. Use this field to get usage line item specific details such as the actual VM Size + * (ServiceType) or the ratio in which the reservation discount is applied. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly meterId?: string; + readonly additionalInfo?: string; /** - * @member {string} [subscriptionGuid] Subscription guid. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Invoice Section Name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly subscriptionGuid?: string; + readonly invoiceSection?: string; /** - * @member {string} [subscriptionName] Subscription name. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The cost center of this department if it is a department and a cost center is provided. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly subscriptionName?: string; + readonly costCenter?: string; /** - * @member {string} [accountName] Account name. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource Group Name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly accountName?: string; + readonly resourceGroup?: string; /** - * @member {string} [departmentName] Department name. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * ARM resource id of the reservation. Only applies to records relevant to reservations. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly departmentName?: string; + readonly reservationId?: string; /** - * @member {string} [consumedService] Consumed service name. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * User provided display name of the reservation. Last known name for a particular day is + * populated in the daily data. Only applies to records relevant to reservations. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly consumedService?: string; + readonly reservationName?: string; /** - * @member {string} [costCenter] The cost center of this department if it is - * a department and a costcenter exists - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Product Order Id. For reservations this is the Reservation Order ID. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly costCenter?: string; + readonly productOrderId?: string; /** - * @member {string} [additionalProperties] Additional details of this usage - * item. By default this is not populated, unless it's specified in $expand. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Product Order Name. For reservations this is the SKU that was purchased. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly additionalProperties?: string; + readonly productOrderName?: string; + /** + * Offer Id. Ex: MS-AZR-0017P, MS-AZR-0148P. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly offerId?: string; /** - * @member {string} [publisherName] The name of publisher. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Is Azure Credit Eligible. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly isAzureCreditEligible?: boolean; + /** + * Term (in months). 1 month for monthly recurring purchase. 12 months for a 1 year reservation. + * 36 months for a 3 year reservation. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly term?: string; + /** + * Publisher Name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly publisherName?: string; /** - * @member {string} [planName] The name of plan. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Publisher Type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly publisherType?: string; + /** + * Plan Name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly planName?: string; /** - * @member {boolean} [isRecurringCharge] Flag indicating whether this is a - * recurring charge or not. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Indicates a charge represents credits, usage, a Marketplace purchase, a reservation fee, or a + * refund. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly isRecurringCharge?: boolean; + readonly chargeType?: string; + /** + * Indicates how frequently this charge will occur. OneTime for purchases which only happen once, + * Monthly for fees which recur every month, and UsageBased for charges based on how much a + * service is used. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly frequency?: string; } /** - * @interface - * An interface representing BalancePropertiesNewPurchasesDetailsItem. + * Modern usage detail. */ -export interface BalancePropertiesNewPurchasesDetailsItem { +export interface ModernUsageDetail { /** - * @member {string} [name] the name of new purchase. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Polymorphic Discriminator */ - readonly name?: string; + kind: "modern"; /** - * @member {number} [value] the value of new purchase. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly value?: number; -} - -/** - * @interface - * An interface representing BalancePropertiesAdjustmentDetailsItem. - */ -export interface BalancePropertiesAdjustmentDetailsItem { + readonly id?: string; /** - * @member {string} [name] the name of new adjustment. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** - * @member {number} [value] the value of new adjustment. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly value?: number; -} - -/** - * @interface - * An interface representing Balance. - * A balance resource. - * - * @extends Resource - */ -export interface Balance extends Resource { + readonly type?: string; /** - * @member {string} [currency] The ISO currency in which the meter is - * charged, for example, USD. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource tags. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly currency?: string; + readonly tags?: { [propertyName: string]: string }; /** - * @member {number} [beginningBalance] The beginning balance for the billing - * period. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Billing Account identifier. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly beginningBalance?: number; + readonly billingAccountId?: string; /** - * @member {number} [endingBalance] The ending balance for the billing period - * (for open periods this will be updated daily). - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Name of the Billing Account. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly endingBalance?: number; + readonly billingAccountName?: string; /** - * @member {number} [newPurchases] Total new purchase amount. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Billing Period Start Date as in the invoice. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly newPurchases?: number; + readonly billingPeriodStartDate?: Date; /** - * @member {number} [adjustments] Total adjustment amount. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Billing Period End Date as in the invoice. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly adjustments?: number; + readonly billingPeriodEndDate?: Date; /** - * @member {number} [utilized] Total Commitment usage. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Identifier for the billing profile that groups costs across invoices in the a singular billing + * currency across across the customers who have onboarded the Microsoft customer agreement and + * the customers in CSP who have made entitlement purchases like SaaS, Marketplace, RI, etc. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly utilized?: number; + readonly billingProfileId?: string; /** - * @member {number} [serviceOverage] Overage for Azure services. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Name of the billing profile that groups costs across invoices in the a singular billing + * currency across across the customers who have onboarded the Microsoft customer agreement and + * the customers in CSP who have made entitlement purchases like SaaS, Marketplace, RI, etc. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly serviceOverage?: number; + readonly billingProfileName?: string; /** - * @member {number} [chargesBilledSeparately] Charges Billed separately. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Unique Microsoft generated identifier for the Azure Subscription. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly chargesBilledSeparately?: number; + readonly subscriptionGuid?: string; /** - * @member {number} [totalOverage] serviceOverage + chargesBilledSeparately. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Name of the Azure Subscription. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly totalOverage?: number; + readonly subscriptionName?: string; /** - * @member {number} [totalUsage] Azure service commitment + total Overage. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Date for the usage record. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly totalUsage?: number; + readonly date?: Date; /** - * @member {number} [azureMarketplaceServiceCharges] Total charges for Azure - * Marketplace. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Name of the product that has accrued charges by consumption or purchase as listed in the + * invoice. Not available for Marketplace. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly azureMarketplaceServiceCharges?: number; + readonly product?: string; /** - * @member {BillingFrequency} [billingFrequency] The billing frequency. - * Possible values include: 'Month', 'Quarter', 'Year' + * The meter id (GUID). Not available for marketplace. For reserved instance this represents the + * primary meter for which the reservation was purchased. For the actual VM Size for which the + * reservation is purchased see productOrderName. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - billingFrequency?: BillingFrequency; + readonly meterId?: string; /** - * @member {boolean} [priceHidden] Price is hidden or not. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Identifies the name of the meter against which consumption is measured. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly priceHidden?: boolean; + readonly meterName?: string; /** - * @member {BalancePropertiesNewPurchasesDetailsItem[]} [newPurchasesDetails] - * List of new purchases. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Identifies the location of the datacenter for certain services that are priced based on + * datacenter location. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly newPurchasesDetails?: BalancePropertiesNewPurchasesDetailsItem[]; + readonly meterRegion?: string; /** - * @member {BalancePropertiesAdjustmentDetailsItem[]} [adjustmentDetails] - * List of Adjustments (Promo credit, SIE credit etc.). - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Identifies the top-level service for the usage. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly adjustmentDetails?: BalancePropertiesAdjustmentDetailsItem[]; -} - -/** - * @interface - * An interface representing ReservationSummary. - * reservation summary resource. - * - * @extends Resource - */ -export interface ReservationSummary extends Resource { + readonly meterCategory?: string; /** - * @member {string} [reservationOrderId] The reservation order ID is the - * identifier for a reservation purchase. Each reservation order ID - * represents a single purchase transaction. A reservation order contains - * reservations. The reservation order specifies the VM size and region for - * the reservations. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Defines the type or sub-category of Azure service that can affect the rate. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly reservationOrderId?: string; + readonly meterSubCategory?: string; /** - * @member {string} [reservationId] The reservation ID is the identifier of a - * reservation within a reservation order. Each reservation is the grouping - * for applying the benefit scope and also specifies the number of instances - * to which the reservation benefit can be applied to. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * List the service family for the product purchased or charged (Example: Storage ; Compute). + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly reservationId?: string; + readonly serviceFamily?: string; /** - * @member {string} [skuName] This is the ARM Sku name. It can be used to - * join with the servicetype field in additoinalinfo in usage records. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Measure the quantity purchased or consumed.The amount of the meter used during the billing + * period. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly skuName?: string; + readonly quantity?: number; /** - * @member {number} [reservedHours] This is the total hours reserved. E.g. if - * reservation for 1 instance was made on 1 PM, this will be 11 hours for - * that day and 24 hours from subsequent days - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Identifies the Unit that the service is charged in. For example, GB, hours, 10,000 s. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly reservedHours?: number; + readonly unitOfMeasure?: string; /** - * @member {Date} [usageDate] Data corresponding to the utilization record. - * If the grain of data is monthly, it will be first day of month. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Instance Name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly usageDate?: Date; + readonly instanceName?: string; /** - * @member {number} [usedHours] Total used hours by the reservation - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Estimated extendedCost or blended cost before tax in USD. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly usedHours?: number; + readonly costInUSD?: number; /** - * @member {number} [minUtilizationPercentage] This is the minimum hourly - * utilization in the usage time (day or month). E.g. if usage record - * corresponds to 12/10/2017 and on that for hour 4 and 5, utilization was - * 10%, this field will return 10% for that day - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Unit Price is the price applicable to you. (your EA or other contract price). + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly minUtilizationPercentage?: number; + readonly unitPrice?: number; /** - * @member {number} [avgUtilizationPercentage] This is average utilization - * for the entire time range. (day or month depending on the grain) - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The currency defining the billed cost. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly avgUtilizationPercentage?: number; + readonly billingCurrencyCode?: string; /** - * @member {number} [maxUtilizationPercentage] This is the maximum hourly - * utilization in the usage time (day or month). E.g. if usage record - * corresponds to 12/10/2017 and on that for hour 4 and 5, utilization was - * 100%, this field will return 100% for that day. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Name of the resource location. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly maxUtilizationPercentage?: number; -} - -/** - * @interface - * An interface representing ReservationDetail. - * reservation detail resource. - * - * @extends Resource - */ -export interface ReservationDetail extends Resource { + readonly resourceLocation?: string; /** - * @member {string} [reservationOrderId] The reservation order ID is the - * identifier for a reservation purchase. Each reservation order ID - * represents a single purchase transaction. A reservation order contains - * reservations. The reservation order specifies the VM size and region for - * the reservations. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Consumed service name. Name of the azure resource provider that emits the usage or was + * purchased. This value is not provided for marketplace usage. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly reservationOrderId?: string; + readonly consumedService?: string; /** - * @member {string} [reservationId] The reservation ID is the identifier of a - * reservation within a reservation order. Each reservation is the grouping - * for applying the benefit scope and also specifies the number of instances - * to which the reservation benefit can be applied to. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Service Info 1. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly reservationId?: string; + readonly serviceInfo1?: string; /** - * @member {string} [skuName] This is the ARM Sku name. It can be used to - * join with the servicetype field in additoinalinfo in usage records. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Service Info 2. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly skuName?: string; + readonly serviceInfo2?: string; /** - * @member {number} [reservedHours] This is the total hours reserved for the - * day. E.g. if reservation for 1 instance was made on 1 PM, this will be 11 - * hours for that day and 24 hours from subsequent days. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Additional details of this usage item. Use this field to get usage line item specific details + * such as the actual VM Size (ServiceType) or the ratio in which the reservation discount is + * applied. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly reservedHours?: number; + readonly additionalInfo?: string; /** - * @member {Date} [usageDate] The date on which consumption occurred. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Identifier of the project that is being charged in the invoice. Not applicable for Microsoft + * Customer Agreements onboarded by partners. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly usageDate?: Date; + readonly invoiceSectionId?: string; /** - * @member {number} [usedHours] This is the total hours used by the instance. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Name of the project that is being charged in the invoice. Not applicable for Microsoft + * Customer Agreements onboarded by partners. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly usedHours?: number; + readonly invoiceSectionName?: string; /** - * @member {string} [instanceId] This identifier is the name of the resource - * or the fully qualified Resource ID. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The cost center of this department if it is a department and a cost center is provided. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly instanceId?: string; + readonly costCenter?: string; /** - * @member {number} [totalReservedQuantity] This is the total count of - * instances that are reserved for the reservationid. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Name of the Azure resource group used for cohesive lifecycle management of resources. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly totalReservedQuantity?: number; -} - -/** - * @interface - * An interface representing ReservationRecommendation. - * Reservation recommendation resource. - * - */ -export interface ReservationRecommendation { + readonly resourceGroup?: string; /** - * @member {string} [id] Resource Id. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * ARM resource id of the reservation. Only applies to records relevant to reservations. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly id?: string; + readonly reservationId?: string; /** - * @member {string} [name] Resource name. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * User provided display name of the reservation. Last known name for a particular day is + * populated in the daily data. Only applies to records relevant to reservations. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly name?: string; + readonly reservationName?: string; /** - * @member {string} [type] Resource type. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The identifier for the asset or Azure plan name that the subscription belongs to. For example: + * Azure Plan. For reservations this is the Reservation Order ID. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly type?: string; + readonly productOrderId?: string; /** - * @member {{ [propertyName: string]: string }} [tags] Resource tags. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Product Order Name. For reservations this is the SKU that was purchased. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly tags?: { [propertyName: string]: string }; + readonly productOrderName?: string; /** - * @member {string} [location] Resource location - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Determines if the cost is eligible to be paid for using Azure credits. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly location?: string; + readonly isAzureCreditEligible?: boolean; /** - * @member {string} [sku] Resource sku - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Term (in months). Displays the term for the validity of the offer. For example. In case of + * reserved instances it displays 12 months for yearly term of reserved instance. For one time + * purchases or recurring purchases, the terms displays 1 month; This is not applicable for Azure + * consumption. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly sku?: string; + readonly term?: string; /** - * @member {string} [lookBackPeriod] The number of days of usage to look back - * for recommendation. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Name of the publisher of the service including Microsoft or Third Party publishers. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly lookBackPeriod?: string; + readonly publisherName?: string; /** - * @member {string} [meterId] The meter id (GUID) - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Type of publisher that identifies if the publisher is first party, third party reseller or + * third party agency. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly meterId?: string; + readonly publisherType?: string; /** - * @member {string} [term] RI recommendations in one or three year terms. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Indicates a charge represents credits, usage, a Marketplace purchase, a reservation fee, or a + * refund. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly term?: string; + readonly chargeType?: string; /** - * @member {number} [costWithNoReservedInstances] The total amount of cost - * without reserved instances. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Indicates how frequently this charge will occur. OneTime for purchases which only happen once, + * Monthly for fees which recur every month, and UsageBased for charges based on how much a + * service is used. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly costWithNoReservedInstances?: number; + readonly frequency?: string; /** - * @member {number} [recommendedQuantity] Recomended quality for reserved - * instances. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * ExtendedCost or blended cost before tax in billed currency. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly recommendedQuantity?: number; + readonly costInBillingCurrency?: number; /** - * @member {number} [totalCostWithReservedInstances] The total amount of cost - * with reserved instances. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * ExtendedCost or blended cost before tax in pricing currency to correlate with prices. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly totalCostWithReservedInstances?: number; + readonly costInPricingCurrency?: number; /** - * @member {number} [netSavings] Total estimated savings with reserved - * instances. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Exchange rate used in conversion from pricing currency to billing currency. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly netSavings?: number; + readonly exchangeRate?: string; /** - * @member {Date} [firstUsageDate] The usage date for looking back. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Date on which exchange rate used in conversion from pricing currency to billing currency. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly firstUsageDate?: Date; + readonly exchangeRateDate?: Date; /** - * @member {string} [scope] Shared or single recommendation. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Invoice ID as on the invoice where the specific transaction appears. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly scope?: string; -} - -/** - * @interface - * An interface representing Tag. - * The tag resource. - * - */ -export interface Tag { + readonly invoiceId?: string; /** - * @member {string} [key] Tag key. + * Reference to an original invoice there is a refund (negative cost). This is populated only + * when there is a refund. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - key?: string; -} - -/** - * @interface - * An interface representing ProxyResource. - * The Resource model definition. - * - * @extends BaseResource - */ -export interface ProxyResource extends BaseResource { + readonly previousInvoiceId?: string; /** - * @member {string} [id] Resource Id. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Pricing Billing Currency. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly id?: string; + readonly pricingCurrencyCode?: string; /** - * @member {string} [name] Resource name. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Identifer for the product that has accrued charges by consumption or purchase . This is the + * concatenated key of productId and SKuId in partner center. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly name?: string; + readonly productIdentifier?: string; /** - * @member {string} [type] Resource type. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource Location Normalized. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly type?: string; + readonly resourceLocationNormalized?: string; /** - * @member {string} [eTag] eTag of the resource. To handle concurrent update - * scenarion, this field will be used to determine whether the user is - * updating the latest version or not. + * Start date for the rating period when the service usage was rated for charges. The prices for + * Azure services are determined for the rating period. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - eTag?: string; -} - -/** - * @interface - * An interface representing TagsResult. - * A resource listing all tags. - * - * @extends ProxyResource - */ -export interface TagsResult extends ProxyResource { + readonly servicePeriodStartDate?: Date; /** - * @member {Tag[]} [tags] A list of Tag. + * End date for the period when the service usage was rated for charges. The prices for Azure + * services are determined based on the rating period. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - tags?: Tag[]; -} - -/** - * @interface - * An interface representing BudgetTimePeriod. - * The start and end date for a budget. - * - */ -export interface BudgetTimePeriod { + readonly servicePeriodEndDate?: Date; /** - * @member {Date} startDate The start date for the budget. + * Identifier of the customer's AAD tenant. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - startDate: Date; + readonly customerTenantId?: string; /** - * @member {Date} [endDate] The end date for the budget. If not provided, we - * default this to 10 years from the start date. + * Name of the customer's AAD tenant. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - endDate?: Date; -} - -/** - * @interface - * An interface representing Filters. - * May be used to filter budgets by resource group, resource, or meter. - * - */ -export interface Filters { + readonly customerName?: string; /** - * @member {string[]} [resourceGroups] The list of filters on resource - * groups, allowed at subscription level only. + * Identifier for the partner's AAD tenant. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - resourceGroups?: string[]; + readonly partnerTenantId?: string; /** - * @member {string[]} [resources] The list of filters on resources. + * Name of the partner' AAD tenant. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - resources?: string[]; + readonly partnerName?: string; /** - * @member {string[]} [meters] The list of filters on meters (GUID), - * mandatory for budgets of usage category. + * MPNId for the reseller associated with the subscription. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - meters?: string[]; + readonly resellerMpnId?: string; /** - * @member {{ [propertyName: string]: string[] }} [tags] The dictionary of - * filters on tags. + * Reseller Name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - tags?: { [propertyName: string]: string[] }; -} - -/** - * @interface - * An interface representing CurrentSpend. - * The current amount of cost which is being tracked for a budget. - * - */ -export interface CurrentSpend { + readonly resellerName?: string; /** - * @member {number} [amount] The total amount of cost which is being tracked - * by the budget. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Publisher Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly amount?: number; + readonly publisherId?: string; /** - * @member {string} [unit] The unit of measure for the budget amount. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Market Price that's charged for the usage. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly unit?: string; + readonly marketPrice?: number; + /** + * Exchange Rate from pricing currency to billing currency. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly exchangeRatePricingToBilling?: number; + /** + * The amount of PayG cost before tax in billing currency. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly paygCostInBillingCurrency?: number; + /** + * The amount of PayG cost before tax in US Dollar currency. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly paygCostInUSD?: number; + /** + * Rate of discount applied if there is a partner earned credit (PEC) based on partner admin link + * access. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly partnerEarnedCreditRate?: number; + /** + * Flag to indicate if partner earned credit has been applied or not. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly partnerEarnedCreditApplied?: string; } /** - * @interface - * An interface representing Notification. - * The notification associated with a budget. - * + * An marketplace resource. */ -export interface Notification { +export interface Marketplace extends Resource { /** - * @member {boolean} enabled The notification is enabled or not. + * The id of the billing period resource that the usage belongs to. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - enabled: boolean; + readonly billingPeriodId?: string; /** - * @member {OperatorType} operator The comparison operator. Possible values - * include: 'EqualTo', 'GreaterThan', 'GreaterThanOrEqualTo' + * The start of the date time range covered by the usage detail. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - operator: OperatorType; + readonly usageStart?: Date; /** - * @member {number} threshold Threshold value associated with a notification. - * Notification is sent when the cost exceeded the threshold. It is always - * percent and has to be between 0 and 1000. + * The end of the date time range covered by the usage detail. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - threshold: number; + readonly usageEnd?: Date; /** - * @member {string[]} contactEmails Email addresses to send the budget - * notification to when the threshold is exceeded. + * The marketplace resource rate. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - contactEmails: string[]; + readonly resourceRate?: number; /** - * @member {string[]} [contactRoles] Contact roles to send the budget - * notification to when the threshold is exceeded. + * The type of offer. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - contactRoles?: string[]; + readonly offerName?: string; /** - * @member {string[]} [contactGroups] Action groups to send the budget - * notification to when the threshold is exceeded. + * The name of resource group. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - contactGroups?: string[]; -} - -/** - * @interface - * An interface representing Budget. - * A budget resource. - * - * @extends ProxyResource - */ -export interface Budget extends ProxyResource { + readonly resourceGroup?: string; /** - * @member {CategoryType} category The category of the budget, whether the - * budget tracks cost or usage. Possible values include: 'Cost', 'Usage' + * The order number. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - category: CategoryType; + readonly orderNumber?: string; /** - * @member {number} amount The total amount of cost to track with the budget + * The name of the resource instance that the usage is about. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - amount: number; + readonly instanceName?: string; /** - * @member {TimeGrainType} timeGrain The time covered by a budget. Tracking - * of the amount will be reset based on the time grain. Possible values - * include: 'Monthly', 'Quarterly', 'Annually' + * The uri of the resource instance that the usage is about. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - timeGrain: TimeGrainType; + readonly instanceId?: string; /** - * @member {BudgetTimePeriod} timePeriod Has start and end date of the - * budget. The start date must be first of the month and should be less than - * the end date. Budget start date must be on or after June 1, 2017. Future - * start date should not be more than three months. Past start date should - * be selected within the timegrain preiod. There are no restrictions on the - * end date. + * The ISO currency in which the meter is charged, for example, USD. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - timePeriod: BudgetTimePeriod; + readonly currency?: string; /** - * @member {Filters} [filters] May be used to filter budgets by resource - * group, resource, or meter. + * The quantity of usage. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - filters?: Filters; + readonly consumedQuantity?: number; /** - * @member {CurrentSpend} [currentSpend] The current amount of cost which is - * being tracked for a budget. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The unit of measure. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly currentSpend?: CurrentSpend; + readonly unitOfMeasure?: string; /** - * @member {{ [propertyName: string]: Notification }} [notifications] - * Dictionary of notifications associated with the budget. Budget can have up - * to five notifications. + * The amount of cost before tax. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - notifications?: { [propertyName: string]: Notification }; -} - -/** - * @interface - * An interface representing PriceSheetProperties. - * The properties of the price sheet. - * - */ -export interface PriceSheetProperties { + readonly pretaxCost?: number; /** - * @member {string} [billingPeriodId] The id of the billing period resource - * that the usage belongs to. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The estimated usage is subject to change. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly billingPeriodId?: string; + readonly isEstimated?: boolean; /** - * @member {string} [meterId] The meter id (GUID) - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The meter id (GUID). + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly meterId?: string; /** - * @member {MeterDetails} [meterDetails] The details about the meter. By - * default this is not populated, unless it's specified in $expand. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Subscription guid. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly meterDetails?: MeterDetails; + readonly subscriptionGuid?: string; /** - * @member {string} [unitOfMeasure] Unit of measure - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Subscription name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly unitOfMeasure?: string; + readonly subscriptionName?: string; /** - * @member {number} [includedQuantity] Included quality for an offer - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Account name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly includedQuantity?: number; + readonly accountName?: string; /** - * @member {string} [partNumber] Part Number - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Department name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly partNumber?: string; + readonly departmentName?: string; /** - * @member {number} [unitPrice] Unit Price - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Consumed service name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly unitPrice?: number; + readonly consumedService?: string; /** - * @member {string} [currencyCode] Currency Code - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The cost center of this department if it is a department and a costcenter exists + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly currencyCode?: string; + readonly costCenter?: string; /** - * @member {string} [offerId] Offer Id - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Additional details of this usage item. By default this is not populated, unless it's specified + * in $expand. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly offerId?: string; + readonly additionalProperties?: string; + /** + * The name of publisher. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly publisherName?: string; + /** + * The name of plan. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly planName?: string; + /** + * Flag indicating whether this is a recurring charge or not. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly isRecurringCharge?: boolean; } /** - * @interface - * An interface representing PriceSheetResult. - * An pricesheet resource. - * - * @extends Resource + * An interface representing BalancePropertiesNewPurchasesDetailsItem. */ -export interface PriceSheetResult extends Resource { +export interface BalancePropertiesNewPurchasesDetailsItem { /** - * @member {PriceSheetProperties[]} [pricesheets] Price sheet - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * the name of new purchase. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly pricesheets?: PriceSheetProperties[]; + readonly name?: string; /** - * @member {string} [nextLink] The link (url) to the next page of results. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * the value of new purchase. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly nextLink?: string; + readonly value?: number; } /** - * @interface - * An interface representing ForecastPropertiesConfidenceLevelsItem. + * An interface representing BalancePropertiesAdjustmentDetailsItem. */ -export interface ForecastPropertiesConfidenceLevelsItem { - /** - * @member {number} [percentage] The percentage level of the confidence - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly percentage?: number; +export interface BalancePropertiesAdjustmentDetailsItem { /** - * @member {Bound} [bound] The boundary of the percentage, values could be - * 'Upper' or 'Lower'. Possible values include: 'Upper', 'Lower' + * the name of new adjustment. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - bound?: Bound; + readonly name?: string; /** - * @member {number} [value] The amount of forecast within the percentage - * level - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * the value of new adjustment. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly value?: number; } /** - * @interface - * An interface representing Forecast. - * A forecast resource. - * - * @extends Resource + * A balance resource. */ -export interface Forecast extends Resource { - /** - * @member {string} [usageDate] The usage date of the forecast. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly usageDate?: string; +export interface Balance extends Resource { /** - * @member {Grain} [grain] The granularity of forecast. Possible values - * include: 'Daily', 'Monthly', 'Yearly' + * The ISO currency in which the meter is charged, for example, USD. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - grain?: Grain; + readonly currency?: string; /** - * @member {number} [charge] The amount of charge - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The beginning balance for the billing period. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly charge?: number; + readonly beginningBalance?: number; /** - * @member {string} [currency] The ISO currency in which the meter is - * charged, for example, USD. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The ending balance for the billing period (for open periods this will be updated daily). + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly currency?: string; + readonly endingBalance?: number; /** - * @member {ChargeType} [chargeType] The type of the charge. Could be actual - * or forecast. Possible values include: 'Actual', 'Forecast' + * Total new purchase amount. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - chargeType?: ChargeType; + readonly newPurchases?: number; /** - * @member {ForecastPropertiesConfidenceLevelsItem[]} [confidenceLevels] The - * details about the forecast confidence levels. This is populated only when - * chargeType is Forecast. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Total adjustment amount. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly confidenceLevels?: ForecastPropertiesConfidenceLevelsItem[]; -} - -/** - * @interface - * An interface representing ManagementGroupAggregatedCostResult. - * A management group aggregated cost resource. - * - * @extends Resource - */ -export interface ManagementGroupAggregatedCostResult extends Resource { + readonly adjustments?: number; /** - * @member {string} [billingPeriodId] The id of the billing period resource - * that the aggregated cost belongs to. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Total Commitment usage. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly billingPeriodId?: string; + readonly utilized?: number; /** - * @member {Date} [usageStart] The start of the date time range covered by - * aggregated cost. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Overage for Azure services. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly usageStart?: Date; + readonly serviceOverage?: number; /** - * @member {Date} [usageEnd] The end of the date time range covered by the - * aggregated cost. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Charges Billed separately. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly usageEnd?: Date; + readonly chargesBilledSeparately?: number; /** - * @member {number} [azureCharges] Azure Charges. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * serviceOverage + chargesBilledSeparately. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly azureCharges?: number; + readonly totalOverage?: number; /** - * @member {number} [marketplaceCharges] Marketplace Charges. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Azure service commitment + total Overage. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly marketplaceCharges?: number; + readonly totalUsage?: number; /** - * @member {number} [chargesBilledSeparately] Charges Billed Separately. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Total charges for Azure Marketplace. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly chargesBilledSeparately?: number; + readonly azureMarketplaceServiceCharges?: number; /** - * @member {string} [currency] The ISO currency in which the meter is - * charged, for example, USD. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The billing frequency. Possible values include: 'Month', 'Quarter', 'Year' */ - readonly currency?: string; + billingFrequency?: BillingFrequency; /** - * @member {ManagementGroupAggregatedCostResult[]} [children] Children of a - * management group + * Price is hidden or not. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - children?: ManagementGroupAggregatedCostResult[]; + readonly priceHidden?: boolean; /** - * @member {string[]} [includedSubscriptions] List of subscription Guids - * included in the calculation of aggregated cost + * List of new purchases. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - includedSubscriptions?: string[]; + readonly newPurchasesDetails?: BalancePropertiesNewPurchasesDetailsItem[]; /** - * @member {string[]} [excludedSubscriptions] List of subscription Guids - * excluded from the calculation of aggregated cost + * List of Adjustments (Promo credit, SIE credit etc.). + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - excludedSubscriptions?: string[]; + readonly adjustmentDetails?: BalancePropertiesAdjustmentDetailsItem[]; } /** - * @interface - * An interface representing ChargeSummary. - * A charge summary resource. - * - * @extends Resource + * reservation summary resource. */ -export interface ChargeSummary extends Resource { - /** - * @member {string} [billingPeriodId] The id of the billing period resource - * that the charge belongs to. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly billingPeriodId?: string; +export interface ReservationSummary extends Resource { /** - * @member {string} [usageStart] Usage start date. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The reservation order ID is the identifier for a reservation purchase. Each reservation order + * ID represents a single purchase transaction. A reservation order contains reservations. The + * reservation order specifies the VM size and region for the reservations. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly usageStart?: string; + readonly reservationOrderId?: string; /** - * @member {string} [usageEnd] Usage end date. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The reservation ID is the identifier of a reservation within a reservation order. Each + * reservation is the grouping for applying the benefit scope and also specifies the number of + * instances to which the reservation benefit can be applied to. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly usageEnd?: string; + readonly reservationId?: string; /** - * @member {number} [azureCharges] Azure Charges. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * This is the ARM Sku name. It can be used to join with the serviceType field in additional info + * in usage records. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly azureCharges?: number; + readonly skuName?: string; /** - * @member {number} [chargesBilledSeparately] Charges Billed separately. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * This is the total hours reserved. E.g. if reservation for 1 instance was made on 1 PM, this + * will be 11 hours for that day and 24 hours from subsequent days + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly chargesBilledSeparately?: number; + readonly reservedHours?: number; /** - * @member {number} [marketplaceCharges] Marketplace Charges. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Data corresponding to the utilization record. If the grain of data is monthly, it will be + * first day of month. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly marketplaceCharges?: number; + readonly usageDate?: Date; /** - * @member {string} [currency] Currency Code - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Total used hours by the reservation + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly currency?: string; -} - -/** - * @interface - * An interface representing ChargesListResult. - * Result of listing charge summary. - * - */ -export interface ChargesListResult { + readonly usedHours?: number; /** - * @member {ChargeSummary[]} [value] The list of charge summary - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * This is the minimum hourly utilization in the usage time (day or month). E.g. if usage record + * corresponds to 12/10/2017 and on that for hour 4 and 5, utilization was 10%, this field will + * return 10% for that day + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly value?: ChargeSummary[]; -} - -/** - * @interface - * An interface representing ErrorDetails. - * The details of the error. - * - */ -export interface ErrorDetails { + readonly minUtilizationPercentage?: number; /** - * @member {string} [code] Error code. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * This is average utilization for the entire time range. (day or month depending on the grain) + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly code?: string; + readonly avgUtilizationPercentage?: number; /** - * @member {string} [message] Error message indicating why the operation - * failed. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * This is the maximum hourly utilization in the usage time (day or month). E.g. if usage record + * corresponds to 12/10/2017 and on that for hour 4 and 5, utilization was 100%, this field will + * return 100% for that day. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly message?: string; -} - -/** - * @interface - * An interface representing ErrorResponse. - * Error response indicates that the service is not able to process the - * incoming request. The reason is provided in the error message. - * - */ -export interface ErrorResponse { + readonly maxUtilizationPercentage?: number; /** - * @member {ErrorDetails} [error] The details of the error. + * The reservation kind. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - error?: ErrorDetails; -} - -/** - * @interface - * An interface representing OperationDisplay. - * The object that represents the operation. - * - */ -export interface OperationDisplay { + readonly kind?: string; /** - * @member {string} [provider] Service provider: Microsoft.Consumption. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * This is the purchased quantity for the reservationId. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly provider?: string; + readonly purchasedQuantity?: number; /** - * @member {string} [resource] Resource on which the operation is performed: - * UsageDetail, etc. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * This is the remaining quantity for the reservationId. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly resource?: string; + readonly remainingQuantity?: number; /** - * @member {string} [operation] Operation type: Read, write, delete, etc. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * This is the total count of instances that are reserved for the reservationId. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly operation?: string; -} - -/** - * @interface - * An interface representing Operation. - * A Consumption REST API operation. - * - */ -export interface Operation { + readonly totalReservedQuantity?: number; /** - * @member {string} [name] Operation name: {provider}/{resource}/{operation}. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * This is the used quantity for the reservationId. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly name?: string; + readonly usedQuantity?: number; /** - * @member {OperationDisplay} [display] The object that represents the - * operation. + * This is the utilized percentage for the reservation Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - display?: OperationDisplay; + readonly utilizedPercentage?: number; } /** - * @interface - * An interface representing ResourceAttributes. - * The Resource model definition. - * + * reservation detail resource. */ -export interface ResourceAttributes { +export interface ReservationDetail extends Resource { /** - * @member {string} [location] Resource location - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The reservation order ID is the identifier for a reservation purchase. Each reservation order + * ID represents a single purchase transaction. A reservation order contains reservations. The + * reservation order specifies the VM size and region for the reservations. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly location?: string; + readonly reservationOrderId?: string; /** - * @member {string} [sku] Resource sku - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The instance Flexibility Ratio. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly sku?: string; -} - -/** - * @interface - * An interface representing QueryOptions. - * Additional parameters for a set of operations. - * - */ -export interface QueryOptions { + readonly instanceFlexibilityRatio?: string; /** - * @member {string} [apply] OData apply expression to aggregate usageDetails - * by tags or (tags and properties/usageStart) + * The instance Flexibility Group. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - apply?: string; -} - -/** - * @interface - * An interface representing UsageDetailsListOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase - */ -export interface UsageDetailsListOptionalParams extends msRest.RequestOptionsBase { + readonly instanceFlexibilityGroup?: string; /** - * @member {string} [expand] May be used to expand the - * properties/additionalProperties or properties/meterDetails within a list - * of usage details. By default, these fields are not included when listing - * usage details. + * The reservation ID is the identifier of a reservation within a reservation order. Each + * reservation is the grouping for applying the benefit scope and also specifies the number of + * instances to which the reservation benefit can be applied to. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - expand?: string; + readonly reservationId?: string; /** - * @member {string} [filter] May be used to filter usageDetails by - * properties/usageEnd (Utc time), properties/usageStart (Utc time), - * properties/resourceGroup, properties/instanceName, properties/instanceId - * or tags. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It - * does not currently support 'ne', 'or', or 'not'. Tag filter is a key value - * pair string where key and value is separated by a colon (:). + * This is the ARM Sku name. It can be used to join with the serviceType field in additional info + * in usage records. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - filter?: string; + readonly skuName?: string; /** - * @member {string} [skiptoken] Skiptoken is only used if a previous - * operation returned a partial result. If a previous response contains a - * nextLink element, the value of the nextLink element will include a - * skiptoken parameter that specifies a starting point to use for subsequent - * calls. + * This is the total hours reserved for the day. E.g. if reservation for 1 instance was made on 1 + * PM, this will be 11 hours for that day and 24 hours from subsequent days. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - skiptoken?: string; + readonly reservedHours?: number; /** - * @member {number} [top] May be used to limit the number of results to the - * most recent N usageDetails. + * The date on which consumption occurred. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - top?: number; + readonly usageDate?: Date; + /** + * This is the total hours used by the instance. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly usedHours?: number; + /** + * This identifier is the name of the resource or the fully qualified Resource ID. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly instanceId?: string; /** - * @member {QueryOptions} [queryOptions] Additional parameters for the - * operation + * This is the total count of instances that are reserved for the reservationId. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - queryOptions?: QueryOptions; + readonly totalReservedQuantity?: number; + /** + * The reservation kind. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly kind?: string; } /** - * @interface - * An interface representing UsageDetailsListByBillingPeriodOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * Contains the possible cases for ReservationRecommendation. + */ +export type ReservationRecommendationUnion = ReservationRecommendation | LegacyReservationRecommendation | ModernReservationRecommendation; + +/** + * A reservation recommendation resource. */ -export interface UsageDetailsListByBillingPeriodOptionalParams extends msRest.RequestOptionsBase { +export interface ReservationRecommendation { /** - * @member {string} [expand] May be used to expand the - * properties/additionalProperties or properties/meterDetails within a list - * of usage details. By default, these fields are not included when listing - * usage details. + * Polymorphic Discriminator */ - expand?: string; + kind: "ReservationRecommendation"; /** - * @member {string} [filter] May be used to filter usageDetails by - * properties/usageEnd (Utc time), properties/usageStart (Utc time), - * properties/resourceGroup, properties/instanceName or - * properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', - * and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter - * is a key value pair string where key and value is separated by a colon - * (:). + * Resource Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - filter?: string; + readonly id?: string; /** - * @member {string} [skiptoken] Skiptoken is only used if a previous - * operation returned a partial result. If a previous response contains a - * nextLink element, the value of the nextLink element will include a - * skiptoken parameter that specifies a starting point to use for subsequent - * calls. + * Resource name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - skiptoken?: string; + readonly name?: string; /** - * @member {number} [top] May be used to limit the number of results to the - * most recent N usageDetails. + * Resource type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - top?: number; + readonly type?: string; + /** + * Resource tags. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly tags?: { [propertyName: string]: string }; /** - * @member {QueryOptions} [queryOptions] Additional parameters for the - * operation + * Resource location + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - queryOptions?: QueryOptions; + readonly location?: string; + /** + * Resource sku + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly sku?: string; } /** - * @interface - * An interface representing UsageDetailsListByBillingAccountOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * The Sku property */ -export interface UsageDetailsListByBillingAccountOptionalParams extends msRest.RequestOptionsBase { +export interface SkuProperty { /** - * @member {string} [expand] May be used to expand the - * properties/additionalProperties or properties/meterDetails within a list - * of usage details. By default, these fields are not included when listing - * usage details. + * The name of sku property. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - expand?: string; + readonly name?: string; /** - * @member {string} [filter] May be used to filter usageDetails by - * properties/usageEnd (Utc time), properties/usageStart (Utc time), - * properties/resourceGroup, properties/instanceName, properties/instanceId - * or tags. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It - * does not currently support 'ne', 'or', or 'not'. Tag filter is a key value - * pair string where key and value is separated by a colon (:). + * The value of sku property. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - filter?: string; + readonly value?: string; +} + +/** + * Legacy reservation recommendation. + */ +export interface LegacyReservationRecommendation { /** - * @member {string} [skiptoken] Skiptoken is only used if a previous - * operation returned a partial result. If a previous response contains a - * nextLink element, the value of the nextLink element will include a - * skiptoken parameter that specifies a starting point to use for subsequent - * calls. + * Polymorphic Discriminator */ - skiptoken?: string; + kind: "legacy"; /** - * @member {number} [top] May be used to limit the number of results to the - * most recent N usageDetails. + * Resource Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - top?: number; + readonly id?: string; /** - * @member {QueryOptions} [queryOptions] Additional parameters for the - * operation + * Resource name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - queryOptions?: QueryOptions; -} - -/** - * @interface - * An interface representing UsageDetailsListForBillingPeriodByBillingAccountOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase - */ -export interface UsageDetailsListForBillingPeriodByBillingAccountOptionalParams extends msRest.RequestOptionsBase { + readonly name?: string; /** - * @member {string} [expand] May be used to expand the - * properties/additionalProperties or properties/meterDetails within a list - * of usage details. By default, these fields are not included when listing - * usage details. + * Resource type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - expand?: string; + readonly type?: string; /** - * @member {string} [filter] May be used to filter usageDetails by - * properties/usageEnd (Utc time), properties/usageStart (Utc time), - * properties/resourceGroup, properties/instanceName or - * properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', - * and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter - * is a key value pair string where key and value is separated by a colon - * (:). + * Resource tags. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - filter?: string; + readonly tags?: { [propertyName: string]: string }; /** - * @member {string} [skiptoken] Skiptoken is only used if a previous - * operation returned a partial result. If a previous response contains a - * nextLink element, the value of the nextLink element will include a - * skiptoken parameter that specifies a starting point to use for subsequent - * calls. + * Resource location + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - skiptoken?: string; + readonly location?: string; /** - * @member {number} [top] May be used to limit the number of results to the - * most recent N usageDetails. + * Resource sku + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - top?: number; + readonly sku?: string; /** - * @member {QueryOptions} [queryOptions] Additional parameters for the - * operation + * The number of days of usage to look back for recommendation. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - queryOptions?: QueryOptions; -} - -/** - * @interface - * An interface representing UsageDetailsListByDepartmentOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase - */ -export interface UsageDetailsListByDepartmentOptionalParams extends msRest.RequestOptionsBase { + readonly lookBackPeriod?: string; /** - * @member {string} [expand] May be used to expand the - * properties/additionalProperties or properties/meterDetails within a list - * of usage details. By default, these fields are not included when listing - * usage details. + * The instance Flexibility Ratio. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - expand?: string; + readonly instanceFlexibilityRatio?: number; /** - * @member {string} [filter] May be used to filter usageDetails by - * properties/usageEnd (Utc time), properties/usageStart (Utc time), - * properties/resourceGroup, properties/instanceName, properties/instanceId - * or tags. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It - * does not currently support 'ne', 'or', or 'not'. Tag filter is a key value - * pair string where key and value is separated by a colon (:). + * The instance Flexibility Group. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - filter?: string; + readonly instanceFlexibilityGroup?: string; /** - * @member {string} [skiptoken] Skiptoken is only used if a previous - * operation returned a partial result. If a previous response contains a - * nextLink element, the value of the nextLink element will include a - * skiptoken parameter that specifies a starting point to use for subsequent - * calls. + * The normalized Size. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - skiptoken?: string; + readonly normalizedSize?: string; /** - * @member {number} [top] May be used to limit the number of results to the - * most recent N usageDetails. + * The recommended Quantity Normalized. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - top?: number; + readonly recommendedQuantityNormalized?: number; /** - * @member {QueryOptions} [queryOptions] Additional parameters for the - * operation + * The meter id (GUID) + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - queryOptions?: QueryOptions; -} - -/** - * @interface - * An interface representing UsageDetailsListForBillingPeriodByDepartmentOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase - */ -export interface UsageDetailsListForBillingPeriodByDepartmentOptionalParams extends msRest.RequestOptionsBase { + readonly meterId?: string; /** - * @member {string} [expand] May be used to expand the - * properties/additionalProperties or properties/meterDetails within a list - * of usage details. By default, these fields are not included when listing - * usage details. + * RI recommendations in one or three year terms. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - expand?: string; + readonly term?: string; /** - * @member {string} [filter] May be used to filter usageDetails by - * properties/usageEnd (Utc time), properties/usageStart (Utc time), - * properties/resourceGroup, properties/instanceName or - * properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', - * and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter - * is a key value pair string where key and value is separated by a colon - * (:). + * The total amount of cost without reserved instances. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - filter?: string; + readonly costWithNoReservedInstances?: number; /** - * @member {string} [skiptoken] Skiptoken is only used if a previous - * operation returned a partial result. If a previous response contains a - * nextLink element, the value of the nextLink element will include a - * skiptoken parameter that specifies a starting point to use for subsequent - * calls. + * Recommended quality for reserved instances. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - skiptoken?: string; + readonly recommendedQuantity?: number; /** - * @member {number} [top] May be used to limit the number of results to the - * most recent N usageDetails. + * The total amount of cost with reserved instances. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - top?: number; + readonly totalCostWithReservedInstances?: number; /** - * @member {QueryOptions} [queryOptions] Additional parameters for the - * operation + * Total estimated savings with reserved instances. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - queryOptions?: QueryOptions; -} - -/** - * @interface - * An interface representing UsageDetailsListByEnrollmentAccountOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase - */ -export interface UsageDetailsListByEnrollmentAccountOptionalParams extends msRest.RequestOptionsBase { + readonly netSavings?: number; /** - * @member {string} [expand] May be used to expand the - * properties/additionalProperties or properties/meterDetails within a list - * of usage details. By default, these fields are not included when listing - * usage details. + * The usage date for looking back. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - expand?: string; + readonly firstUsageDate?: Date; /** - * @member {string} [filter] May be used to filter usageDetails by - * properties/usageEnd (Utc time), properties/usageStart (Utc time), - * properties/resourceGroup, properties/instanceName, properties/instanceId - * or tags. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It - * does not currently support 'ne', 'or', or 'not'. Tag filter is a key value - * pair string where key and value is separated by a colon (:). + * Shared or single recommendation. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - filter?: string; + readonly scope?: string; /** - * @member {string} [skiptoken] Skiptoken is only used if a previous - * operation returned a partial result. If a previous response contains a - * nextLink element, the value of the nextLink element will include a - * skiptoken parameter that specifies a starting point to use for subsequent - * calls. + * List of sku properties + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - skiptoken?: string; + readonly skuProperties?: SkuProperty[]; +} + +/** + * The amount plus currency . + */ +export interface Amount { /** - * @member {number} [top] May be used to limit the number of results to the - * most recent N usageDetails. + * Amount currency. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - top?: number; + readonly currency?: string; /** - * @member {QueryOptions} [queryOptions] Additional parameters for the - * operation + * Amount. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - queryOptions?: QueryOptions; + readonly value?: number; } /** - * @interface - * An interface representing UsageDetailsListForBillingPeriodByEnrollmentAccountOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * Modern reservation recommendation. */ -export interface UsageDetailsListForBillingPeriodByEnrollmentAccountOptionalParams extends msRest.RequestOptionsBase { +export interface ModernReservationRecommendation { /** - * @member {string} [expand] May be used to expand the - * properties/additionalProperties or properties/meterDetails within a list - * of usage details. By default, these fields are not included when listing - * usage details. + * Polymorphic Discriminator */ - expand?: string; + kind: "modern"; /** - * @member {string} [filter] May be used to filter usageDetails by - * properties/usageEnd (Utc time), properties/usageStart (Utc time), - * properties/resourceGroup, properties/instanceName or - * properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', - * and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter - * is a key value pair string where key and value is separated by a colon - * (:). + * Resource Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - filter?: string; + readonly id?: string; /** - * @member {string} [skiptoken] Skiptoken is only used if a previous - * operation returned a partial result. If a previous response contains a - * nextLink element, the value of the nextLink element will include a - * skiptoken parameter that specifies a starting point to use for subsequent - * calls. + * Resource name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - skiptoken?: string; + readonly name?: string; /** - * @member {number} [top] May be used to limit the number of results to the - * most recent N usageDetails. + * Resource type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - top?: number; + readonly type?: string; /** - * @member {QueryOptions} [queryOptions] Additional parameters for the - * operation + * Resource tags. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - queryOptions?: QueryOptions; -} - -/** - * @interface - * An interface representing UsageDetailsListByManagementGroupOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase - */ -export interface UsageDetailsListByManagementGroupOptionalParams extends msRest.RequestOptionsBase { + readonly tags?: { [propertyName: string]: string }; /** - * @member {string} [expand] May be used to expand the - * properties/additionalProperties or properties/meterDetails within a list - * of usage details. By default, these fields are not included when listing - * usage details. + * Resource location + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - expand?: string; + readonly location?: string; /** - * @member {string} [filter] May be used to filter usageDetails by - * properties/usageEnd (Utc time), properties/usageStart (Utc time), - * properties/resourceGroup, properties/instanceName, properties/instanceId - * or tags. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It - * does not currently support 'ne', 'or', or 'not'. Tag filter is a key value - * pair string where key and value is separated by a colon (:). + * Resource sku + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - filter?: string; + readonly sku?: string; /** - * @member {string} [skiptoken] Skiptoken is only used if a previous - * operation returned a partial result. If a previous response contains a - * nextLink element, the value of the nextLink element will include a - * skiptoken parameter that specifies a starting point to use for subsequent - * calls. + * The number of days of usage to look back for recommendation. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - skiptoken?: string; + readonly lookBackPeriod?: string; /** - * @member {number} [top] May be used to limit the number of results to the - * most recent N usageDetails. + * The instance Flexibility Ratio. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - top?: number; + readonly instanceFlexibilityRatio?: number; /** - * @member {QueryOptions} [queryOptions] Additional parameters for the - * operation + * The instance Flexibility Group. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - queryOptions?: QueryOptions; -} - -/** - * @interface - * An interface representing UsageDetailsListForBillingPeriodByManagementGroupOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase - */ -export interface UsageDetailsListForBillingPeriodByManagementGroupOptionalParams extends msRest.RequestOptionsBase { + readonly instanceFlexibilityGroup?: string; /** - * @member {string} [expand] May be used to expand the - * properties/additionalProperties or properties/meterDetails within a list - * of usage details. By default, these fields are not included when listing - * usage details. + * The normalized Size. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - expand?: string; + readonly normalizedSize?: string; /** - * @member {string} [filter] May be used to filter usageDetails by - * properties/usageEnd (Utc time), properties/usageStart (Utc time), - * properties/resourceGroup, properties/instanceName or - * properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', - * and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter - * is a key value pair string where key and value is separated by a colon - * (:). + * The recommended Quantity Normalized. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - filter?: string; + readonly recommendedQuantityNormalized?: number; /** - * @member {string} [skiptoken] Skiptoken is only used if a previous - * operation returned a partial result. If a previous response contains a - * nextLink element, the value of the nextLink element will include a - * skiptoken parameter that specifies a starting point to use for subsequent - * calls. + * The meter id (GUID) + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - skiptoken?: string; + readonly meterId?: string; /** - * @member {number} [top] May be used to limit the number of results to the - * most recent N usageDetails. + * RI recommendations in one or three year terms. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - top?: number; + readonly term?: string; /** - * @member {QueryOptions} [queryOptions] Additional parameters for the - * operation + * The total amount of cost without reserved instances. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - queryOptions?: QueryOptions; -} - -/** - * @interface - * An interface representing MarketplacesListOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase - */ -export interface MarketplacesListOptionalParams extends msRest.RequestOptionsBase { + readonly costWithNoReservedInstances?: Amount; /** - * @member {string} [filter] May be used to filter marketplaces by - * properties/usageEnd (Utc time), properties/usageStart (Utc time), - * properties/resourceGroup, properties/instanceName or - * properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', - * and 'and'. It does not currently support 'ne', 'or', or 'not'. + * Recommended quality for reserved instances. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - filter?: string; + readonly recommendedQuantity?: number; /** - * @member {number} [top] May be used to limit the number of results to the - * most recent N marketplaces. + * The total amount of cost with reserved instances. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - top?: number; + readonly totalCostWithReservedInstances?: Amount; /** - * @member {string} [skiptoken] Skiptoken is only used if a previous - * operation returned a partial result. If a previous response contains a - * nextLink element, the value of the nextLink element will include a - * skiptoken parameter that specifies a starting point to use for subsequent - * calls. + * Total estimated savings with reserved instances. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - skiptoken?: string; -} - -/** - * @interface - * An interface representing MarketplacesListByBillingPeriodOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase - */ -export interface MarketplacesListByBillingPeriodOptionalParams extends msRest.RequestOptionsBase { + readonly netSavings?: Amount; /** - * @member {string} [filter] May be used to filter marketplaces by - * properties/usageEnd (Utc time), properties/usageStart (Utc time), - * properties/resourceGroup, properties/instanceName or - * properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', - * and 'and'. It does not currently support 'ne', 'or', or 'not'. + * The usage date for looking back. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - filter?: string; + readonly firstUsageDate?: Date; /** - * @member {number} [top] May be used to limit the number of results to the - * most recent N marketplaces. + * Shared or single recommendation. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - top?: number; + readonly scope?: string; /** - * @member {string} [skiptoken] Skiptoken is only used if a previous - * operation returned a partial result. If a previous response contains a - * nextLink element, the value of the nextLink element will include a - * skiptoken parameter that specifies a starting point to use for subsequent - * calls. + * List of sku properties + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - skiptoken?: string; + readonly skuProperties?: SkuProperty[]; } /** - * @interface - * An interface representing MarketplacesListByBillingAccountOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * Reservation transaction resource. */ -export interface MarketplacesListByBillingAccountOptionalParams extends msRest.RequestOptionsBase { +export interface ReservationTransaction extends Resource { /** - * @member {string} [filter] May be used to filter marketplaces by - * properties/usageEnd (Utc time), properties/usageStart (Utc time), - * properties/resourceGroup, properties/instanceName or - * properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', - * and 'and'. It does not currently support 'ne', 'or', or 'not'. + * The date of the transaction + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - filter?: string; + readonly eventDate?: Date; /** - * @member {number} [top] May be used to limit the number of results to the - * most recent N marketplaces. + * The reservation order ID is the identifier for a reservation purchase. Each reservation order + * ID represents a single purchase transaction. A reservation order contains reservations. The + * reservation order specifies the VM size and region for the reservations. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - top?: number; + readonly reservationOrderId?: string; /** - * @member {string} [skiptoken] Skiptoken is only used if a previous - * operation returned a partial result. If a previous response contains a - * nextLink element, the value of the nextLink element will include a - * skiptoken parameter that specifies a starting point to use for subsequent - * calls. + * The description of the transaction. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - skiptoken?: string; -} - -/** - * @interface - * An interface representing MarketplacesListForBillingPeriodByBillingAccountOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase - */ -export interface MarketplacesListForBillingPeriodByBillingAccountOptionalParams extends msRest.RequestOptionsBase { + readonly description?: string; /** - * @member {string} [filter] May be used to filter marketplaces by - * properties/usageEnd (Utc time), properties/usageStart (Utc time), - * properties/resourceGroup, properties/instanceName or - * properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', - * and 'and'. It does not currently support 'ne', 'or', or 'not'. + * The type of the transaction (Purchase, Cancel, etc.) + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - filter?: string; + readonly eventType?: string; /** - * @member {number} [top] May be used to limit the number of results to the - * most recent N marketplaces. + * The quantity of the transaction. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - top?: number; + readonly quantity?: number; /** - * @member {string} [skiptoken] Skiptoken is only used if a previous - * operation returned a partial result. If a previous response contains a - * nextLink element, the value of the nextLink element will include a - * skiptoken parameter that specifies a starting point to use for subsequent - * calls. + * The charge of the transaction. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - skiptoken?: string; -} - -/** - * @interface - * An interface representing MarketplacesListByDepartmentOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase - */ -export interface MarketplacesListByDepartmentOptionalParams extends msRest.RequestOptionsBase { + readonly amount?: number; /** - * @member {string} [filter] May be used to filter marketplaces by - * properties/usageEnd (Utc time), properties/usageStart (Utc time), - * properties/resourceGroup, properties/instanceName or - * properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', - * and 'and'. It does not currently support 'ne', 'or', or 'not'. + * The ISO currency in which the transaction is charged, for example, USD. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - filter?: string; + readonly currency?: string; /** - * @member {number} [top] May be used to limit the number of results to the - * most recent N marketplaces. + * The name of the reservation order. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - top?: number; + readonly reservationOrderName?: string; /** - * @member {string} [skiptoken] Skiptoken is only used if a previous - * operation returned a partial result. If a previous response contains a - * nextLink element, the value of the nextLink element will include a - * skiptoken parameter that specifies a starting point to use for subsequent - * calls. + * The purchasing enrollment. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - skiptoken?: string; -} - -/** - * @interface - * An interface representing MarketplacesListForBillingPeriodByDepartmentOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase - */ -export interface MarketplacesListForBillingPeriodByDepartmentOptionalParams extends msRest.RequestOptionsBase { + readonly purchasingEnrollment?: string; /** - * @member {string} [filter] May be used to filter marketplaces by - * properties/usageEnd (Utc time), properties/usageStart (Utc time), - * properties/resourceGroup, properties/instanceName or - * properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', - * and 'and'. It does not currently support 'ne', 'or', or 'not'. + * The subscription guid that makes the transaction. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - filter?: string; + readonly purchasingSubscriptionGuid?: string; /** - * @member {number} [top] May be used to limit the number of results to the - * most recent N marketplaces. + * The subscription name that makes the transaction. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - top?: number; + readonly purchasingSubscriptionName?: string; /** - * @member {string} [skiptoken] Skiptoken is only used if a previous - * operation returned a partial result. If a previous response contains a - * nextLink element, the value of the nextLink element will include a - * skiptoken parameter that specifies a starting point to use for subsequent - * calls. + * This is the ARM Sku name. It can be used to join with the serviceType field in additional info + * in usage records. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - skiptoken?: string; -} - -/** - * @interface - * An interface representing MarketplacesListByEnrollmentAccountOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase - */ -export interface MarketplacesListByEnrollmentAccountOptionalParams extends msRest.RequestOptionsBase { + readonly armSkuName?: string; /** - * @member {string} [filter] May be used to filter marketplaces by - * properties/usageEnd (Utc time), properties/usageStart (Utc time), - * properties/resourceGroup, properties/instanceName or - * properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', - * and 'and'. It does not currently support 'ne', 'or', or 'not'. + * This is the term of the transaction. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - filter?: string; + readonly term?: string; /** - * @member {number} [top] May be used to limit the number of results to the - * most recent N marketplaces. + * The region of the transaction. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - top?: number; + readonly region?: string; /** - * @member {string} [skiptoken] Skiptoken is only used if a previous - * operation returned a partial result. If a previous response contains a - * nextLink element, the value of the nextLink element will include a - * skiptoken parameter that specifies a starting point to use for subsequent - * calls. + * The name of the account that makes the transaction. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - skiptoken?: string; -} - -/** - * @interface - * An interface representing MarketplacesListForBillingPeriodByEnrollmentAccountOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase - */ -export interface MarketplacesListForBillingPeriodByEnrollmentAccountOptionalParams extends msRest.RequestOptionsBase { + readonly accountName?: string; /** - * @member {string} [filter] May be used to filter marketplaces by - * properties/usageEnd (Utc time), properties/usageStart (Utc time), - * properties/resourceGroup, properties/instanceName or - * properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', - * and 'and'. It does not currently support 'ne', 'or', or 'not'. + * The email of the account owner that makes the transaction. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - filter?: string; + readonly accountOwnerEmail?: string; /** - * @member {number} [top] May be used to limit the number of results to the - * most recent N marketplaces. + * The department name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - top?: number; + readonly departmentName?: string; /** - * @member {string} [skiptoken] Skiptoken is only used if a previous - * operation returned a partial result. If a previous response contains a - * nextLink element, the value of the nextLink element will include a - * skiptoken parameter that specifies a starting point to use for subsequent - * calls. + * The cost center of this department if it is a department and a cost center is provided. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - skiptoken?: string; + readonly costCenter?: string; + /** + * The current enrollment. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly currentEnrollment?: string; } /** - * @interface - * An interface representing MarketplacesListByManagementGroupOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * The tag resource. */ -export interface MarketplacesListByManagementGroupOptionalParams extends msRest.RequestOptionsBase { - /** - * @member {string} [filter] May be used to filter marketplaces by - * properties/usageEnd (Utc time), properties/usageStart (Utc time), - * properties/resourceGroup, properties/instanceName or - * properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', - * and 'and'. It does not currently support 'ne', 'or', or 'not'. - */ - filter?: string; - /** - * @member {number} [top] May be used to limit the number of results to the - * most recent N marketplaces. - */ - top?: number; +export interface Tag { /** - * @member {string} [skiptoken] Skiptoken is only used if a previous - * operation returned a partial result. If a previous response contains a - * nextLink element, the value of the nextLink element will include a - * skiptoken parameter that specifies a starting point to use for subsequent - * calls. + * Tag key. */ - skiptoken?: string; + key?: string; } /** - * @interface - * An interface representing MarketplacesListForBillingPeriodByManagementGroupOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * The Resource model definition. */ -export interface MarketplacesListForBillingPeriodByManagementGroupOptionalParams extends msRest.RequestOptionsBase { +export interface ProxyResource extends BaseResource { /** - * @member {string} [filter] May be used to filter marketplaces by - * properties/usageEnd (Utc time), properties/usageStart (Utc time), - * properties/resourceGroup, properties/instanceName or - * properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', - * and 'and'. It does not currently support 'ne', 'or', or 'not'. + * Resource Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - filter?: string; + readonly id?: string; /** - * @member {number} [top] May be used to limit the number of results to the - * most recent N marketplaces. + * Resource name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - top?: number; + readonly name?: string; /** - * @member {string} [skiptoken] Skiptoken is only used if a previous - * operation returned a partial result. If a previous response contains a - * nextLink element, the value of the nextLink element will include a - * skiptoken parameter that specifies a starting point to use for subsequent - * calls. + * Resource type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - skiptoken?: string; -} - -/** - * @interface - * An interface representing ReservationsSummariesListByReservationOrderOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase - */ -export interface ReservationsSummariesListByReservationOrderOptionalParams extends msRest.RequestOptionsBase { + readonly type?: string; /** - * @member {string} [filter] Required only for daily grain. The - * properties/UsageDate for start date and end date. The filter supports 'le' - * and 'ge' + * eTag of the resource. To handle concurrent update scenario, this field will be used to + * determine whether the user is updating the latest version or not. */ - filter?: string; + eTag?: string; } /** - * @interface - * An interface representing ReservationsSummariesListByReservationOrderAndReservationOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * A resource listing all tags. */ -export interface ReservationsSummariesListByReservationOrderAndReservationOptionalParams extends msRest.RequestOptionsBase { +export interface TagsResult extends ProxyResource { /** - * @member {string} [filter] Required only for daily grain. The - * properties/UsageDate for start date and end date. The filter supports 'le' - * and 'ge' + * A list of Tag. */ - filter?: string; + tags?: Tag[]; } /** - * @interface - * An interface representing ReservationRecommendationsListOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * The start and end date for a budget. */ -export interface ReservationRecommendationsListOptionalParams extends msRest.RequestOptionsBase { +export interface BudgetTimePeriod { /** - * @member {string} [filter] May be used to filter reservationRecommendations - * by properties/scope and properties/lookBackPeriod. + * The start date for the budget. */ - filter?: string; + startDate: Date; + /** + * The end date for the budget. If not provided, we default this to 10 years from the start date. + */ + endDate?: Date; } /** - * @interface - * An interface representing PriceSheetGetOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * May be used to filter budgets by resource group, resource, or meter. */ -export interface PriceSheetGetOptionalParams extends msRest.RequestOptionsBase { +export interface Filters { /** - * @member {string} [expand] May be used to expand the - * properties/meterDetails within a price sheet. By default, these fields are - * not included when returning price sheet. + * The list of filters on resource groups, allowed at subscription level only. */ - expand?: string; + resourceGroups?: string[]; /** - * @member {string} [skiptoken] Skiptoken is only used if a previous - * operation returned a partial result. If a previous response contains a - * nextLink element, the value of the nextLink element will include a - * skiptoken parameter that specifies a starting point to use for subsequent - * calls. + * The list of filters on resources. */ - skiptoken?: string; + resources?: string[]; /** - * @member {number} [top] May be used to limit the number of results to the - * top N results. + * The list of filters on meters (GUID), mandatory for budgets of usage category. */ - top?: number; + meters?: string[]; + /** + * The dictionary of filters on tags. + */ + tags?: { [propertyName: string]: string[] }; } /** - * @interface - * An interface representing PriceSheetGetByBillingPeriodOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * The current amount of cost which is being tracked for a budget. */ -export interface PriceSheetGetByBillingPeriodOptionalParams extends msRest.RequestOptionsBase { - /** - * @member {string} [expand] May be used to expand the - * properties/meterDetails within a price sheet. By default, these fields are - * not included when returning price sheet. - */ - expand?: string; +export interface CurrentSpend { /** - * @member {string} [skiptoken] Skiptoken is only used if a previous - * operation returned a partial result. If a previous response contains a - * nextLink element, the value of the nextLink element will include a - * skiptoken parameter that specifies a starting point to use for subsequent - * calls. + * The total amount of cost which is being tracked by the budget. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - skiptoken?: string; + readonly amount?: number; /** - * @member {number} [top] May be used to limit the number of results to the - * top N results. + * The unit of measure for the budget amount. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - top?: number; + readonly unit?: string; } /** - * @interface - * An interface representing ForecastsListOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * The notification associated with a budget. */ -export interface ForecastsListOptionalParams extends msRest.RequestOptionsBase { +export interface Notification { /** - * @member {string} [filter] May be used to filter forecasts by - * properties/usageDate (Utc time), properties/chargeType or - * properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and - * 'and'. It does not currently support 'ne', 'or', or 'not'. + * The notification is enabled or not. */ - filter?: string; -} - -/** - * @interface - * An interface representing AggregatedCostGetByManagementGroupOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase - */ -export interface AggregatedCostGetByManagementGroupOptionalParams extends msRest.RequestOptionsBase { + enabled: boolean; /** - * @member {string} [filter] May be used to filter aggregated cost by - * properties/usageStart (Utc time), properties/usageEnd (Utc time). The - * filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not - * currently support 'ne', 'or', or 'not'. Tag filter is a key value pair - * string where key and value is separated by a colon (:). + * The comparison operator. Possible values include: 'EqualTo', 'GreaterThan', + * 'GreaterThanOrEqualTo' */ - filter?: string; -} - -/** - * @interface - * An interface representing ChargesListByEnrollmentAccountOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase - */ -export interface ChargesListByEnrollmentAccountOptionalParams extends msRest.RequestOptionsBase { + operator: OperatorType; /** - * @member {string} [filter] May be used to filter charges by - * properties/usageEnd (Utc time), properties/usageStart (Utc time). The - * filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not - * currently support 'ne', 'or', or 'not'. Tag filter is a key value pair - * string where key and value is separated by a colon (:). + * Threshold value associated with a notification. Notification is sent when the cost exceeded + * the threshold. It is always percent and has to be between 0 and 1000. */ - filter?: string; -} - -/** - * @interface - * An interface representing ChargesListForBillingPeriodByEnrollmentAccountOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase - */ -export interface ChargesListForBillingPeriodByEnrollmentAccountOptionalParams extends msRest.RequestOptionsBase { + threshold: number; /** - * @member {string} [filter] May be used to filter charges by - * properties/usageEnd (Utc time), properties/usageStart (Utc time). The - * filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not - * currently support 'ne', 'or', or 'not'. Tag filter is a key value pair - * string where key and value is separated by a colon (:). + * Email addresses to send the budget notification to when the threshold is exceeded. */ - filter?: string; -} - -/** - * @interface - * An interface representing ChargesListByDepartmentOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase - */ -export interface ChargesListByDepartmentOptionalParams extends msRest.RequestOptionsBase { + contactEmails: string[]; /** - * @member {string} [filter] May be used to filter charges by - * properties/usageEnd (Utc time), properties/usageStart (Utc time). The - * filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not - * currently support 'ne', 'or', or 'not'. Tag filter is a key value pair - * string where key and value is separated by a colon (:). + * Contact roles to send the budget notification to when the threshold is exceeded. */ - filter?: string; -} - -/** - * @interface - * An interface representing ChargesListForBillingPeriodByDepartmentOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase - */ -export interface ChargesListForBillingPeriodByDepartmentOptionalParams extends msRest.RequestOptionsBase { + contactRoles?: string[]; /** - * @member {string} [filter] May be used to filter charges by - * properties/usageEnd (Utc time), properties/usageStart (Utc time). The - * filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not - * currently support 'ne', 'or', or 'not'. Tag filter is a key value pair - * string where key and value is separated by a colon (:). + * Action groups to send the budget notification to when the threshold is exceeded. */ - filter?: string; + contactGroups?: string[]; } /** - * @interface - * An interface representing ConsumptionManagementClientOptions. - * @extends AzureServiceClientOptions + * A budget resource. */ -export interface ConsumptionManagementClientOptions extends AzureServiceClientOptions { +export interface Budget extends ProxyResource { /** - * @member {string} [baseUri] + * The category of the budget, whether the budget tracks cost or usage. Possible values include: + * 'Cost', 'Usage' */ - baseUri?: string; -} - - -/** - * @interface - * An interface representing the UsageDetailsListResult. - * Result of listing usage details. It contains a list of available usage - * details in reverse chronological order by billing period. - * - * @extends Array - */ -export interface UsageDetailsListResult extends Array { + category: CategoryType; /** - * @member {string} [nextLink] The link (url) to the next page of results. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The total amount of cost to track with the budget */ - readonly nextLink?: string; + amount: number; + /** + * The time covered by a budget. Tracking of the amount will be reset based on the time grain. + * Possible values include: 'Monthly', 'Quarterly', 'Annually', 'BillingMonth', 'BillingQuarter', + * 'BillingAnnual' + */ + timeGrain: TimeGrainType; + /** + * Has start and end date of the budget. The start date must be first of the month and should be + * less than the end date. Budget start date must be on or after June 1, 2017. Future start date + * should not be more than three months. Past start date should be selected within the timegrain + * period. There are no restrictions on the end date. + */ + timePeriod: BudgetTimePeriod; + /** + * May be used to filter budgets by resource group, resource, or meter. + */ + filters?: Filters; + /** + * The current amount of cost which is being tracked for a budget. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly currentSpend?: CurrentSpend; + /** + * Dictionary of notifications associated with the budget. Budget can have up to five + * notifications. + */ + notifications?: { [propertyName: string]: Notification }; } /** - * @interface - * An interface representing the MarketplacesListResult. - * Result of listing marketplaces. It contains a list of available marketplaces - * in reverse chronological order by billing period. - * - * @extends Array + * The properties of the price sheet. */ -export interface MarketplacesListResult extends Array { +export interface PriceSheetProperties { /** - * @member {string} [nextLink] The link (url) to the next page of results. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The id of the billing period resource that the usage belongs to. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly nextLink?: string; + readonly billingPeriodId?: string; + /** + * The meter id (GUID) + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly meterId?: string; + /** + * The details about the meter. By default this is not populated, unless it's specified in + * $expand. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly meterDetails?: MeterDetails; + /** + * Unit of measure + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly unitOfMeasure?: string; + /** + * Included quality for an offer + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly includedQuantity?: number; + /** + * Part Number + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly partNumber?: string; + /** + * Unit Price + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly unitPrice?: number; + /** + * Currency Code + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly currencyCode?: string; + /** + * Offer Id + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly offerId?: string; } /** - * @interface - * An interface representing the ReservationSummariesListResult. - * Result of listing reservation summaries. - * - * @extends Array + * An pricesheet resource. */ -export interface ReservationSummariesListResult extends Array { +export interface PriceSheetResult extends Resource { + /** + * Price sheet + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly pricesheets?: PriceSheetProperties[]; /** - * @member {string} [nextLink] The link (url) to the next page of results. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The link (url) to the next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly nextLink?: string; } /** - * @interface - * An interface representing the ReservationDetailsListResult. - * Result of listing reservation details. - * - * @extends Array + * An interface representing ForecastPropertiesConfidenceLevelsItem. */ -export interface ReservationDetailsListResult extends Array { +export interface ForecastPropertiesConfidenceLevelsItem { /** - * @member {string} [nextLink] The link (url) to the next page of results. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The percentage level of the confidence + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly nextLink?: string; + readonly percentage?: number; + /** + * The boundary of the percentage, values could be 'Upper' or 'Lower'. Possible values include: + * 'Upper', 'Lower' + */ + bound?: Bound; + /** + * The amount of forecast within the percentage level + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly value?: number; } /** - * @interface - * An interface representing the ReservationRecommendationsListResult. - * Result of listing reservation recommendations. - * - * @extends Array + * A forecast resource. */ -export interface ReservationRecommendationsListResult extends Array { +export interface Forecast extends Resource { /** - * @member {string} [nextLink] The link (url) to the next page of results. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The usage date of the forecast. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly nextLink?: string; + readonly usageDate?: string; + /** + * The granularity of forecast. Possible values include: 'Daily', 'Monthly', 'Yearly' + */ + grain?: Grain; + /** + * The amount of charge + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly charge?: number; + /** + * The ISO currency in which the meter is charged, for example, USD. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly currency?: string; + /** + * The type of the charge. Could be actual or forecast. Possible values include: 'Actual', + * 'Forecast' + */ + chargeType?: ChargeType; + /** + * The details about the forecast confidence levels. This is populated only when chargeType is + * Forecast. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly confidenceLevels?: ForecastPropertiesConfidenceLevelsItem[]; } /** - * @interface - * An interface representing the BudgetsListResult. - * Result of listing budgets. It contains a list of available budgets in the - * scope provided. - * - * @extends Array + * A management group aggregated cost resource. */ -export interface BudgetsListResult extends Array { +export interface ManagementGroupAggregatedCostResult extends Resource { /** - * @member {string} [nextLink] The link (url) to the next page of results. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The id of the billing period resource that the aggregated cost belongs to. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly nextLink?: string; + readonly billingPeriodId?: string; + /** + * The start of the date time range covered by aggregated cost. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly usageStart?: Date; + /** + * The end of the date time range covered by the aggregated cost. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly usageEnd?: Date; + /** + * Azure Charges. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly azureCharges?: number; + /** + * Marketplace Charges. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly marketplaceCharges?: number; + /** + * Charges Billed Separately. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly chargesBilledSeparately?: number; + /** + * The ISO currency in which the meter is charged, for example, USD. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly currency?: string; + /** + * Children of a management group + */ + children?: ManagementGroupAggregatedCostResult[]; + /** + * List of subscription Guids included in the calculation of aggregated cost + */ + includedSubscriptions?: string[]; + /** + * List of subscription Guids excluded from the calculation of aggregated cost + */ + excludedSubscriptions?: string[]; } /** - * @interface - * An interface representing the ForecastsListResult. - * Result of listing forecasts. It contains a list of available forecasts. - * - * @extends Array + * Contains the possible cases for ChargeSummary. */ -export interface ForecastsListResult extends Array { +export type ChargeSummaryUnion = ChargeSummary | LegacyChargeSummary | ModernChargeSummary; + +/** + * A charge summary resource. + */ +export interface ChargeSummary { + /** + * Polymorphic Discriminator + */ + kind: "ChargeSummary"; + /** + * Resource Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * Resource name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * Resource type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * Resource tags. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly tags?: { [propertyName: string]: string }; } /** - * @interface - * An interface representing the OperationListResult. - * Result of listing consumption operations. It contains a list of operations - * and a URL link to get the next set of results. - * - * @extends Array + * Result of listing charge summary. */ -export interface OperationListResult extends Array { +export interface ChargesListResult { /** - * @member {string} [nextLink] URL to get the next set of operation list - * results if there are any. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The list of charge summary + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly nextLink?: string; + readonly value?: ChargeSummaryUnion[]; } /** - * Defines values for BillingFrequency. - * Possible values include: 'Month', 'Quarter', 'Year' - * @readonly - * @enum {string} + * Legacy charge summary. */ -export type BillingFrequency = 'Month' | 'Quarter' | 'Year'; +export interface LegacyChargeSummary { + /** + * Polymorphic Discriminator + */ + kind: "legacy"; + /** + * Resource Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * Resource name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * Resource type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * Resource tags. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly tags?: { [propertyName: string]: string }; + /** + * The id of the billing period resource that the charge belongs to. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingPeriodId?: string; + /** + * Usage start date. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly usageStart?: string; + /** + * Usage end date. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly usageEnd?: string; + /** + * Azure Charges. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly azureCharges?: number; + /** + * Charges Billed separately. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly chargesBilledSeparately?: number; + /** + * Marketplace Charges. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly marketplaceCharges?: number; + /** + * Currency Code + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly currency?: string; +} /** - * Defines values for CategoryType. - * Possible values include: 'Cost', 'Usage' - * @readonly - * @enum {string} + * Modern charge summary. */ -export type CategoryType = 'Cost' | 'Usage'; +export interface ModernChargeSummary { + /** + * Polymorphic Discriminator + */ + kind: "modern"; + /** + * Resource Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * Resource name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * Resource type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * Resource tags. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly tags?: { [propertyName: string]: string }; + /** + * The id of the billing period resource that the charge belongs to. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingPeriodId?: string; + /** + * Usage start date. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly usageStart?: string; + /** + * Usage end date. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly usageEnd?: string; + /** + * Azure Charges. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly azureCharges?: Amount; + /** + * Charges Billed separately. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly chargesBilledSeparately?: Amount; + /** + * Marketplace Charges. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly marketplaceCharges?: Amount; + /** + * Billing Account Id + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingAccountId?: string; + /** + * Billing Profile Id + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileId?: string; + /** + * Invoice Section Id + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceSectionId?: string; + /** + * Customer Id + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly customerId?: string; + /** + * Is charge Invoiced + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly isInvoiced?: boolean; +} /** - * Defines values for TimeGrainType. - * Possible values include: 'Monthly', 'Quarterly', 'Annually' - * @readonly - * @enum {string} + * The details of the error. */ -export type TimeGrainType = 'Monthly' | 'Quarterly' | 'Annually'; +export interface ErrorDetails { + /** + * Error code. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly code?: string; + /** + * Error message indicating why the operation failed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly message?: string; +} /** - * Defines values for OperatorType. - * Possible values include: 'EqualTo', 'GreaterThan', 'GreaterThanOrEqualTo' - * @readonly - * @enum {string} + * Error response indicates that the service is not able to process the incoming request. The + * reason is provided in the error message. */ -export type OperatorType = 'EqualTo' | 'GreaterThan' | 'GreaterThanOrEqualTo'; +export interface ErrorResponse { + /** + * The details of the error. + */ + error?: ErrorDetails; +} /** - * Defines values for Grain. - * Possible values include: 'Daily', 'Monthly', 'Yearly' - * @readonly - * @enum {string} + * The object that represents the operation. */ -export type Grain = 'Daily' | 'Monthly' | 'Yearly'; +export interface OperationDisplay { + /** + * Service provider: Microsoft.Consumption. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provider?: string; + /** + * Resource on which the operation is performed: UsageDetail, etc. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly resource?: string; + /** + * Operation type: Read, write, delete, etc. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly operation?: string; +} /** - * Defines values for ChargeType. - * Possible values include: 'Actual', 'Forecast' - * @readonly - * @enum {string} + * A Consumption REST API operation. */ -export type ChargeType = 'Actual' | 'Forecast'; +export interface Operation { + /** + * Operation name: {provider}/{resource}/{operation}. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The object that represents the operation. + */ + display?: OperationDisplay; +} /** - * Defines values for Bound. - * Possible values include: 'Upper', 'Lower' - * @readonly - * @enum {string} + * An event summary resource. */ -export type Bound = 'Upper' | 'Lower'; +export interface EventSummary extends Resource { + /** + * Transaction date. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly transactionDate?: Date; + /** + * Transaction description. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly description?: string; + /** + * New Credit. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly newCredit?: Amount; + /** + * Adjustments amount. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly adjustments?: Amount; + /** + * Credit expired. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly creditExpired?: Amount; + /** + * Charges amount. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly charges?: Amount; + /** + * Closed balance. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly closedBalance?: Amount; + /** + * The type of event. Possible values include: 'SettledCharges', 'PendingCharges', + * 'PendingAdjustments', 'PendingNewCredit', 'PendingExpiredCredit', 'UnKnown', 'NewCredit' + */ + eventType?: EventType; + /** + * Invoice number. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceNumber?: string; +} /** - * Defines values for Datagrain. - * Possible values include: 'DailyGrain', 'MonthlyGrain' - * @readonly - * @enum {string} + * A lot summary resource. */ -export type Datagrain = 'daily' | 'monthly'; +export interface LotSummary extends Resource { + /** + * Original amount. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly originalAmount?: Amount; + /** + * Closed balance. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly closedBalance?: Amount; + /** + * Lot source. Possible values include: 'PurchasedCredit', 'PromotionalCredit' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly source?: LotSource; + /** + * Start date. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly startDate?: Date; + /** + * Expiration date. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly expirationDate?: Date; + /** + * PO number. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly poNumber?: string; +} /** - * Contains response data for the list operation. + * Summary of credit balances. */ -export type UsageDetailsListResponse = UsageDetailsListResult & { +export interface CreditBalanceSummary { /** - * The underlying HTTP response. + * Estimated balance. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: UsageDetailsListResult; - }; -}; + readonly estimatedBalance?: Amount; + /** + * Current balance. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly currentBalance?: Amount; +} /** - * Contains response data for the listByBillingPeriod operation. + * A credit summary resource. */ -export type UsageDetailsListByBillingPeriodResponse = UsageDetailsListResult & { +export interface CreditSummary extends Resource { /** - * The underlying HTTP response. + * Summary of balances associated with this credit summary. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: UsageDetailsListResult; - }; -}; + readonly balanceSummary?: CreditBalanceSummary; + /** + * Pending credit adjustments. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly pendingCreditAdjustments?: Amount; + /** + * Expired credit. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly expiredCredit?: Amount; + /** + * Pending eligible charges. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly pendingEligibleCharges?: Amount; +} + +/** + * The Resource model definition. + */ +export interface ResourceAttributes { + /** + * Resource location + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly location?: string; + /** + * Resource sku + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly sku?: string; +} /** - * Contains response data for the listByBillingAccount operation. + * Optional Parameters. */ -export type UsageDetailsListByBillingAccountResponse = UsageDetailsListResult & { +export interface UsageDetailsListOptionalParams extends msRest.RequestOptionsBase { /** - * The underlying HTTP response. + * May be used to expand the properties/additionalInfo or properties/meterDetails within a list + * of usage details. By default, these fields are not included when listing usage details. */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: UsageDetailsListResult; - }; -}; + expand?: string; + /** + * May be used to filter usageDetails by properties/resourceGroup, properties/resourceName, + * properties/resourceId, properties/chargeType, properties/reservationId, + * properties/publisherType or tags. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. + * It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string + * where key and value is separated by a colon (:). PublisherType Filter accepts two values azure + * and marketplace and it is currently supported for Web Direct Offer Type + */ + filter?: string; + /** + * Skiptoken is only used if a previous operation returned a partial result. If a previous + * response contains a nextLink element, the value of the nextLink element will include a + * skiptoken parameter that specifies a starting point to use for subsequent calls. + */ + skiptoken?: string; + /** + * May be used to limit the number of results to the most recent N usageDetails. + */ + top?: number; + /** + * Allows to select different type of cost/usage records. Possible values include: + * 'ActualCostMetricType', 'AmortizedCostMetricType', 'UsageMetricType' + */ + metric?: Metrictype; +} /** - * Contains response data for the listForBillingPeriodByBillingAccount operation. + * Optional Parameters. */ -export type UsageDetailsListForBillingPeriodByBillingAccountResponse = UsageDetailsListResult & { +export interface MarketplacesListOptionalParams extends msRest.RequestOptionsBase { /** - * The underlying HTTP response. + * May be used to filter marketplaces by properties/usageEnd (Utc time), properties/usageStart + * (Utc time), properties/resourceGroup, properties/instanceName or properties/instanceId. The + * filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', + * 'or', or 'not'. */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: UsageDetailsListResult; - }; -}; + filter?: string; + /** + * May be used to limit the number of results to the most recent N marketplaces. + */ + top?: number; + /** + * Skiptoken is only used if a previous operation returned a partial result. If a previous + * response contains a nextLink element, the value of the nextLink element will include a + * skiptoken parameter that specifies a starting point to use for subsequent calls. + */ + skiptoken?: string; +} /** - * Contains response data for the listByDepartment operation. + * Optional Parameters. */ -export type UsageDetailsListByDepartmentResponse = UsageDetailsListResult & { +export interface ChargesListOptionalParams extends msRest.RequestOptionsBase { /** - * The underlying HTTP response. + * Start date */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: UsageDetailsListResult; - }; -}; + startDate?: string; + /** + * End date + */ + endDate?: string; + /** + * May be used to filter charges by properties/usageEnd (Utc time), properties/usageStart (Utc + * time). The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently + * support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value is + * separated by a colon (:). + */ + filter?: string; + /** + * May be used to group charges for billingAccount scope by properties/billingProfileId, + * properties/invoiceSectionId, properties/customerId (specific for Partner Led), or for + * billingProfile scope by properties/invoiceSectionId. + */ + apply?: string; +} /** - * Contains response data for the listForBillingPeriodByDepartment operation. + * Optional Parameters. */ -export type UsageDetailsListForBillingPeriodByDepartmentResponse = UsageDetailsListResult & { +export interface ReservationsSummariesListByReservationOrderOptionalParams extends msRest.RequestOptionsBase { /** - * The underlying HTTP response. + * Required only for daily grain. The properties/UsageDate for start date and end date. The + * filter supports 'le' and 'ge' */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: UsageDetailsListResult; - }; -}; + filter?: string; +} /** - * Contains response data for the listByEnrollmentAccount operation. + * Optional Parameters. */ -export type UsageDetailsListByEnrollmentAccountResponse = UsageDetailsListResult & { +export interface ReservationsSummariesListByReservationOrderAndReservationOptionalParams extends msRest.RequestOptionsBase { /** - * The underlying HTTP response. + * Required only for daily grain. The properties/UsageDate for start date and end date. The + * filter supports 'le' and 'ge' */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: UsageDetailsListResult; - }; -}; + filter?: string; +} /** - * Contains response data for the listForBillingPeriodByEnrollmentAccount operation. + * Optional Parameters. */ -export type UsageDetailsListForBillingPeriodByEnrollmentAccountResponse = UsageDetailsListResult & { +export interface ReservationsSummariesListOptionalParams extends msRest.RequestOptionsBase { /** - * The underlying HTTP response. + * Start date */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: UsageDetailsListResult; - }; -}; + startDate?: string; + /** + * End date + */ + endDate?: string; + /** + * Required only for daily grain. The properties/UsageDate for start date and end date. The + * filter supports 'le' and 'ge' + */ + filter?: string; +} /** - * Contains response data for the listByManagementGroup operation. + * Optional Parameters. */ -export type UsageDetailsListByManagementGroupResponse = UsageDetailsListResult & { +export interface ReservationsDetailsListOptionalParams extends msRest.RequestOptionsBase { /** - * The underlying HTTP response. + * Start date */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: UsageDetailsListResult; - }; -}; + startDate?: string; + /** + * End date + */ + endDate?: string; + /** + * Filter reservation details by date range. The properties/UsageDate for start date and end + * date. The filter supports 'le' and 'ge' + */ + filter?: string; +} /** - * Contains response data for the listForBillingPeriodByManagementGroup operation. + * Optional Parameters. */ -export type UsageDetailsListForBillingPeriodByManagementGroupResponse = UsageDetailsListResult & { +export interface ReservationRecommendationsListOptionalParams extends msRest.RequestOptionsBase { /** - * The underlying HTTP response. + * May be used to filter reservationRecommendations by properties/scope and + * properties/lookBackPeriod. */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: UsageDetailsListResult; - }; -}; + filter?: string; +} /** - * Contains response data for the listNext operation. + * Optional Parameters. */ -export type UsageDetailsListNextResponse = UsageDetailsListResult & { +export interface ReservationTransactionsListOptionalParams extends msRest.RequestOptionsBase { /** - * The underlying HTTP response. + * Filter reservation transactions by date range. The properties/UsageDate for start date and end + * date. The filter supports 'le' and 'ge' */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: UsageDetailsListResult; - }; -}; + filter?: string; +} /** - * Contains response data for the listByBillingPeriodNext operation. + * Optional Parameters. */ -export type UsageDetailsListByBillingPeriodNextResponse = UsageDetailsListResult & { +export interface PriceSheetGetOptionalParams extends msRest.RequestOptionsBase { /** - * The underlying HTTP response. + * May be used to expand the properties/meterDetails within a price sheet. By default, these + * fields are not included when returning price sheet. */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: UsageDetailsListResult; - }; -}; + expand?: string; + /** + * Skiptoken is only used if a previous operation returned a partial result. If a previous + * response contains a nextLink element, the value of the nextLink element will include a + * skiptoken parameter that specifies a starting point to use for subsequent calls. + */ + skiptoken?: string; + /** + * May be used to limit the number of results to the top N results. + */ + top?: number; +} /** - * Contains response data for the listByBillingAccountNext operation. + * Optional Parameters. */ -export type UsageDetailsListByBillingAccountNextResponse = UsageDetailsListResult & { +export interface PriceSheetGetByBillingPeriodOptionalParams extends msRest.RequestOptionsBase { /** - * The underlying HTTP response. + * May be used to expand the properties/meterDetails within a price sheet. By default, these + * fields are not included when returning price sheet. */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: UsageDetailsListResult; - }; -}; + expand?: string; + /** + * Skiptoken is only used if a previous operation returned a partial result. If a previous + * response contains a nextLink element, the value of the nextLink element will include a + * skiptoken parameter that specifies a starting point to use for subsequent calls. + */ + skiptoken?: string; + /** + * May be used to limit the number of results to the top N results. + */ + top?: number; +} /** - * Contains response data for the listForBillingPeriodByBillingAccountNext operation. + * Optional Parameters. */ -export type UsageDetailsListForBillingPeriodByBillingAccountNextResponse = UsageDetailsListResult & { +export interface ForecastsListOptionalParams extends msRest.RequestOptionsBase { /** - * The underlying HTTP response. + * May be used to filter forecasts by properties/usageDate (Utc time), properties/chargeType or + * properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not + * currently support 'ne', 'or', or 'not'. */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: UsageDetailsListResult; - }; -}; + filter?: string; +} /** - * Contains response data for the listByDepartmentNext operation. + * Optional Parameters. */ -export type UsageDetailsListByDepartmentNextResponse = UsageDetailsListResult & { +export interface AggregatedCostGetByManagementGroupOptionalParams extends msRest.RequestOptionsBase { /** - * The underlying HTTP response. + * May be used to filter aggregated cost by properties/usageStart (Utc time), properties/usageEnd + * (Utc time). The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently + * support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value is + * separated by a colon (:). */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: UsageDetailsListResult; - }; -}; + filter?: string; +} + +/** + * An interface representing ConsumptionManagementClientOptions. + */ +export interface ConsumptionManagementClientOptions extends AzureServiceClientOptions { + baseUri?: string; +} /** - * Contains response data for the listForBillingPeriodByDepartmentNext operation. + * @interface + * Result of listing usage details. It contains a list of available usage details in reverse + * chronological order by billing period. + * @extends Array */ -export type UsageDetailsListForBillingPeriodByDepartmentNextResponse = UsageDetailsListResult & { +export interface UsageDetailsListResult extends Array { /** - * The underlying HTTP response. + * The link (url) to the next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: UsageDetailsListResult; - }; -}; + readonly nextLink?: string; +} /** - * Contains response data for the listByEnrollmentAccountNext operation. + * @interface + * Result of listing marketplaces. It contains a list of available marketplaces in reverse + * chronological order by billing period. + * @extends Array */ -export type UsageDetailsListByEnrollmentAccountNextResponse = UsageDetailsListResult & { +export interface MarketplacesListResult extends Array { /** - * The underlying HTTP response. + * The link (url) to the next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: UsageDetailsListResult; - }; -}; + readonly nextLink?: string; +} /** - * Contains response data for the listForBillingPeriodByEnrollmentAccountNext operation. + * @interface + * Result of listing budgets. It contains a list of available budgets in the scope provided. + * @extends Array */ -export type UsageDetailsListForBillingPeriodByEnrollmentAccountNextResponse = UsageDetailsListResult & { +export interface BudgetsListResult extends Array { /** - * The underlying HTTP response. + * The link (url) to the next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: UsageDetailsListResult; - }; -}; + readonly nextLink?: string; +} /** - * Contains response data for the listByManagementGroupNext operation. + * @interface + * Result of listing reservation summaries. + * @extends Array */ -export type UsageDetailsListByManagementGroupNextResponse = UsageDetailsListResult & { +export interface ReservationSummariesListResult extends Array { /** - * The underlying HTTP response. + * The link (url) to the next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: UsageDetailsListResult; - }; -}; + readonly nextLink?: string; +} /** - * Contains response data for the listForBillingPeriodByManagementGroupNext operation. + * @interface + * Result of listing reservation details. + * @extends Array */ -export type UsageDetailsListForBillingPeriodByManagementGroupNextResponse = UsageDetailsListResult & { +export interface ReservationDetailsListResult extends Array { /** - * The underlying HTTP response. + * The link (url) to the next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: UsageDetailsListResult; - }; -}; + readonly nextLink?: string; +} /** - * Contains response data for the list operation. + * @interface + * Result of listing reservation recommendations. + * @extends Array */ -export type MarketplacesListResponse = MarketplacesListResult & { +export interface ReservationRecommendationsListResult extends Array { /** - * The underlying HTTP response. + * The link (url) to the next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: MarketplacesListResult; - }; -}; + readonly nextLink?: string; +} /** - * Contains response data for the listByBillingPeriod operation. + * @interface + * Result of listing reservation transactions + * @extends Array */ -export type MarketplacesListByBillingPeriodResponse = MarketplacesListResult & { +export interface ReservationTransactionsListResult extends Array { /** - * The underlying HTTP response. + * The link (url) to the next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: MarketplacesListResult; - }; -}; + readonly nextLink?: string; +} /** - * Contains response data for the listByBillingAccount operation. + * @interface + * Result of listing forecasts. It contains a list of available forecasts. + * @extends Array */ -export type MarketplacesListByBillingAccountResponse = MarketplacesListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: MarketplacesListResult; - }; -}; +export interface ForecastsListResult extends Array { +} /** - * Contains response data for the listForBillingPeriodByBillingAccount operation. + * @interface + * Result of listing consumption operations. It contains a list of operations and a URL link to get + * the next set of results. + * @extends Array */ -export type MarketplacesListForBillingPeriodByBillingAccountResponse = MarketplacesListResult & { +export interface OperationListResult extends Array { /** - * The underlying HTTP response. + * URL to get the next set of operation list results if there are any. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: MarketplacesListResult; - }; -}; + readonly nextLink?: string; +} /** - * Contains response data for the listByDepartment operation. + * @interface + * Result of listing event summary. + * @extends Array */ -export type MarketplacesListByDepartmentResponse = MarketplacesListResult & { +export interface Events extends Array { /** - * The underlying HTTP response. + * The link (url) to the next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: MarketplacesListResult; - }; -}; + readonly nextLink?: string; +} /** - * Contains response data for the listForBillingPeriodByDepartment operation. + * @interface + * Result of listing lot summary. + * @extends Array */ -export type MarketplacesListForBillingPeriodByDepartmentResponse = MarketplacesListResult & { +export interface Lots extends Array { /** - * The underlying HTTP response. + * The link (url) to the next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: MarketplacesListResult; - }; -}; + readonly nextLink?: string; +} + +/** + * Defines values for BillingFrequency. + * Possible values include: 'Month', 'Quarter', 'Year' + * @readonly + * @enum {string} + */ +export type BillingFrequency = 'Month' | 'Quarter' | 'Year'; /** - * Contains response data for the listByEnrollmentAccount operation. + * Defines values for CategoryType. + * Possible values include: 'Cost', 'Usage' + * @readonly + * @enum {string} */ -export type MarketplacesListByEnrollmentAccountResponse = MarketplacesListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: MarketplacesListResult; - }; -}; +export type CategoryType = 'Cost' | 'Usage'; + +/** + * Defines values for TimeGrainType. + * Possible values include: 'Monthly', 'Quarterly', 'Annually', 'BillingMonth', 'BillingQuarter', + * 'BillingAnnual' + * @readonly + * @enum {string} + */ +export type TimeGrainType = 'Monthly' | 'Quarterly' | 'Annually' | 'BillingMonth' | 'BillingQuarter' | 'BillingAnnual'; + +/** + * Defines values for OperatorType. + * Possible values include: 'EqualTo', 'GreaterThan', 'GreaterThanOrEqualTo' + * @readonly + * @enum {string} + */ +export type OperatorType = 'EqualTo' | 'GreaterThan' | 'GreaterThanOrEqualTo'; + +/** + * Defines values for Grain. + * Possible values include: 'Daily', 'Monthly', 'Yearly' + * @readonly + * @enum {string} + */ +export type Grain = 'Daily' | 'Monthly' | 'Yearly'; + +/** + * Defines values for ChargeType. + * Possible values include: 'Actual', 'Forecast' + * @readonly + * @enum {string} + */ +export type ChargeType = 'Actual' | 'Forecast'; + +/** + * Defines values for Bound. + * Possible values include: 'Upper', 'Lower' + * @readonly + * @enum {string} + */ +export type Bound = 'Upper' | 'Lower'; + +/** + * Defines values for EventType. + * Possible values include: 'SettledCharges', 'PendingCharges', 'PendingAdjustments', + * 'PendingNewCredit', 'PendingExpiredCredit', 'UnKnown', 'NewCredit' + * @readonly + * @enum {string} + */ +export type EventType = 'SettledCharges' | 'PendingCharges' | 'PendingAdjustments' | 'PendingNewCredit' | 'PendingExpiredCredit' | 'UnKnown' | 'NewCredit'; /** - * Contains response data for the listForBillingPeriodByEnrollmentAccount operation. + * Defines values for LotSource. + * Possible values include: 'PurchasedCredit', 'PromotionalCredit' + * @readonly + * @enum {string} */ -export type MarketplacesListForBillingPeriodByEnrollmentAccountResponse = MarketplacesListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: MarketplacesListResult; - }; -}; +export type LotSource = 'PurchasedCredit' | 'PromotionalCredit'; /** - * Contains response data for the listByManagementGroup operation. + * Defines values for Datagrain. + * Possible values include: 'DailyGrain', 'MonthlyGrain' + * @readonly + * @enum {string} */ -export type MarketplacesListByManagementGroupResponse = MarketplacesListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: MarketplacesListResult; - }; -}; +export type Datagrain = 'daily' | 'monthly'; /** - * Contains response data for the listForBillingPeriodByManagementGroup operation. + * Defines values for Metrictype. + * Possible values include: 'ActualCostMetricType', 'AmortizedCostMetricType', 'UsageMetricType' + * @readonly + * @enum {string} */ -export type MarketplacesListForBillingPeriodByManagementGroupResponse = MarketplacesListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: MarketplacesListResult; - }; -}; +export type Metrictype = 'actualcost' | 'amortizedcost' | 'usage'; /** - * Contains response data for the listNext operation. + * Contains response data for the list operation. */ -export type MarketplacesListNextResponse = MarketplacesListResult & { +export type UsageDetailsListResponse = UsageDetailsListResult & { /** * The underlying HTTP response. */ @@ -3258,17 +2831,18 @@ export type MarketplacesListNextResponse = MarketplacesListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: MarketplacesListResult; + parsedBody: UsageDetailsListResult; }; }; /** - * Contains response data for the listByBillingPeriodNext operation. + * Contains response data for the listNext operation. */ -export type MarketplacesListByBillingPeriodNextResponse = MarketplacesListResult & { +export type UsageDetailsListNextResponse = UsageDetailsListResult & { /** * The underlying HTTP response. */ @@ -3277,17 +2851,18 @@ export type MarketplacesListByBillingPeriodNextResponse = MarketplacesListResult * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: MarketplacesListResult; + parsedBody: UsageDetailsListResult; }; }; /** - * Contains response data for the listByBillingAccountNext operation. + * Contains response data for the list operation. */ -export type MarketplacesListByBillingAccountNextResponse = MarketplacesListResult & { +export type MarketplacesListResponse = MarketplacesListResult & { /** * The underlying HTTP response. */ @@ -3296,6 +2871,7 @@ export type MarketplacesListByBillingAccountNextResponse = MarketplacesListResul * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -3304,9 +2880,9 @@ export type MarketplacesListByBillingAccountNextResponse = MarketplacesListResul }; /** - * Contains response data for the listForBillingPeriodByBillingAccountNext operation. + * Contains response data for the listNext operation. */ -export type MarketplacesListForBillingPeriodByBillingAccountNextResponse = MarketplacesListResult & { +export type MarketplacesListNextResponse = MarketplacesListResult & { /** * The underlying HTTP response. */ @@ -3315,6 +2891,7 @@ export type MarketplacesListForBillingPeriodByBillingAccountNextResponse = Marke * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -3323,9 +2900,9 @@ export type MarketplacesListForBillingPeriodByBillingAccountNextResponse = Marke }; /** - * Contains response data for the listByDepartmentNext operation. + * Contains response data for the list operation. */ -export type MarketplacesListByDepartmentNextResponse = MarketplacesListResult & { +export type BudgetsListResponse = BudgetsListResult & { /** * The underlying HTTP response. */ @@ -3334,17 +2911,18 @@ export type MarketplacesListByDepartmentNextResponse = MarketplacesListResult & * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: MarketplacesListResult; + parsedBody: BudgetsListResult; }; }; /** - * Contains response data for the listForBillingPeriodByDepartmentNext operation. + * Contains response data for the get operation. */ -export type MarketplacesListForBillingPeriodByDepartmentNextResponse = MarketplacesListResult & { +export type BudgetsGetResponse = Budget & { /** * The underlying HTTP response. */ @@ -3353,17 +2931,18 @@ export type MarketplacesListForBillingPeriodByDepartmentNextResponse = Marketpla * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: MarketplacesListResult; + parsedBody: Budget; }; }; /** - * Contains response data for the listByEnrollmentAccountNext operation. + * Contains response data for the createOrUpdate operation. */ -export type MarketplacesListByEnrollmentAccountNextResponse = MarketplacesListResult & { +export type BudgetsCreateOrUpdateResponse = Budget & { /** * The underlying HTTP response. */ @@ -3372,17 +2951,18 @@ export type MarketplacesListByEnrollmentAccountNextResponse = MarketplacesListRe * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: MarketplacesListResult; + parsedBody: Budget; }; }; /** - * Contains response data for the listForBillingPeriodByEnrollmentAccountNext operation. + * Contains response data for the listNext operation. */ -export type MarketplacesListForBillingPeriodByEnrollmentAccountNextResponse = MarketplacesListResult & { +export type BudgetsListNextResponse = BudgetsListResult & { /** * The underlying HTTP response. */ @@ -3391,17 +2971,18 @@ export type MarketplacesListForBillingPeriodByEnrollmentAccountNextResponse = Ma * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: MarketplacesListResult; + parsedBody: BudgetsListResult; }; }; /** - * Contains response data for the listByManagementGroupNext operation. + * Contains response data for the get operation. */ -export type MarketplacesListByManagementGroupNextResponse = MarketplacesListResult & { +export type TagsGetResponse = TagsResult & { /** * The underlying HTTP response. */ @@ -3410,17 +2991,18 @@ export type MarketplacesListByManagementGroupNextResponse = MarketplacesListResu * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: MarketplacesListResult; + parsedBody: TagsResult; }; }; /** - * Contains response data for the listForBillingPeriodByManagementGroupNext operation. + * Contains response data for the list operation. */ -export type MarketplacesListForBillingPeriodByManagementGroupNextResponse = MarketplacesListResult & { +export type ChargesListResponse = ChargesListResult & { /** * The underlying HTTP response. */ @@ -3429,10 +3011,11 @@ export type MarketplacesListForBillingPeriodByManagementGroupNextResponse = Mark * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: MarketplacesListResult; + parsedBody: ChargesListResult; }; }; @@ -3448,6 +3031,7 @@ export type BalancesGetByBillingAccountResponse = Balance & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -3467,6 +3051,7 @@ export type BalancesGetForBillingPeriodByBillingAccountResponse = Balance & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -3486,6 +3071,7 @@ export type ReservationsSummariesListByReservationOrderResponse = ReservationSum * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -3505,6 +3091,7 @@ export type ReservationsSummariesListByReservationOrderAndReservationResponse = * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -3513,9 +3100,9 @@ export type ReservationsSummariesListByReservationOrderAndReservationResponse = }; /** - * Contains response data for the listByReservationOrderNext operation. + * Contains response data for the list operation. */ -export type ReservationsSummariesListByReservationOrderNextResponse = ReservationSummariesListResult & { +export type ReservationsSummariesListResponse = ReservationSummariesListResult & { /** * The underlying HTTP response. */ @@ -3524,6 +3111,7 @@ export type ReservationsSummariesListByReservationOrderNextResponse = Reservatio * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -3532,9 +3120,9 @@ export type ReservationsSummariesListByReservationOrderNextResponse = Reservatio }; /** - * Contains response data for the listByReservationOrderAndReservationNext operation. + * Contains response data for the listByReservationOrderNext operation. */ -export type ReservationsSummariesListByReservationOrderAndReservationNextResponse = ReservationSummariesListResult & { +export type ReservationsSummariesListByReservationOrderNextResponse = ReservationSummariesListResult & { /** * The underlying HTTP response. */ @@ -3543,6 +3131,7 @@ export type ReservationsSummariesListByReservationOrderAndReservationNextRespons * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -3551,9 +3140,9 @@ export type ReservationsSummariesListByReservationOrderAndReservationNextRespons }; /** - * Contains response data for the listByReservationOrder operation. + * Contains response data for the listByReservationOrderAndReservationNext operation. */ -export type ReservationsDetailsListByReservationOrderResponse = ReservationDetailsListResult & { +export type ReservationsSummariesListByReservationOrderAndReservationNextResponse = ReservationSummariesListResult & { /** * The underlying HTTP response. */ @@ -3562,17 +3151,18 @@ export type ReservationsDetailsListByReservationOrderResponse = ReservationDetai * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: ReservationDetailsListResult; + parsedBody: ReservationSummariesListResult; }; }; /** - * Contains response data for the listByReservationOrderAndReservation operation. + * Contains response data for the listNext operation. */ -export type ReservationsDetailsListByReservationOrderAndReservationResponse = ReservationDetailsListResult & { +export type ReservationsSummariesListNextResponse = ReservationSummariesListResult & { /** * The underlying HTTP response. */ @@ -3581,17 +3171,18 @@ export type ReservationsDetailsListByReservationOrderAndReservationResponse = Re * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: ReservationDetailsListResult; + parsedBody: ReservationSummariesListResult; }; }; /** - * Contains response data for the listByReservationOrderNext operation. + * Contains response data for the listByReservationOrder operation. */ -export type ReservationsDetailsListByReservationOrderNextResponse = ReservationDetailsListResult & { +export type ReservationsDetailsListByReservationOrderResponse = ReservationDetailsListResult & { /** * The underlying HTTP response. */ @@ -3600,6 +3191,7 @@ export type ReservationsDetailsListByReservationOrderNextResponse = ReservationD * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -3608,9 +3200,9 @@ export type ReservationsDetailsListByReservationOrderNextResponse = ReservationD }; /** - * Contains response data for the listByReservationOrderAndReservationNext operation. + * Contains response data for the listByReservationOrderAndReservation operation. */ -export type ReservationsDetailsListByReservationOrderAndReservationNextResponse = ReservationDetailsListResult & { +export type ReservationsDetailsListByReservationOrderAndReservationResponse = ReservationDetailsListResult & { /** * The underlying HTTP response. */ @@ -3619,6 +3211,7 @@ export type ReservationsDetailsListByReservationOrderAndReservationNextResponse * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -3629,7 +3222,7 @@ export type ReservationsDetailsListByReservationOrderAndReservationNextResponse /** * Contains response data for the list operation. */ -export type ReservationRecommendationsListResponse = ReservationRecommendationsListResult & { +export type ReservationsDetailsListResponse = ReservationDetailsListResult & { /** * The underlying HTTP response. */ @@ -3638,36 +3231,18 @@ export type ReservationRecommendationsListResponse = ReservationRecommendationsL * The response body as text (string format) */ bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: ReservationRecommendationsListResult; - }; -}; -/** - * Contains response data for the listNext operation. - */ -export type ReservationRecommendationsListNextResponse = ReservationRecommendationsListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; /** * The response body as parsed JSON or XML */ - parsedBody: ReservationRecommendationsListResult; + parsedBody: ReservationDetailsListResult; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listByReservationOrderNext operation. */ -export type BudgetsListResponse = BudgetsListResult & { +export type ReservationsDetailsListByReservationOrderNextResponse = ReservationDetailsListResult & { /** * The underlying HTTP response. */ @@ -3676,17 +3251,18 @@ export type BudgetsListResponse = BudgetsListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: BudgetsListResult; + parsedBody: ReservationDetailsListResult; }; }; /** - * Contains response data for the listByResourceGroupName operation. + * Contains response data for the listByReservationOrderAndReservationNext operation. */ -export type BudgetsListByResourceGroupNameResponse = BudgetsListResult & { +export type ReservationsDetailsListByReservationOrderAndReservationNextResponse = ReservationDetailsListResult & { /** * The underlying HTTP response. */ @@ -3695,17 +3271,18 @@ export type BudgetsListByResourceGroupNameResponse = BudgetsListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: BudgetsListResult; + parsedBody: ReservationDetailsListResult; }; }; /** - * Contains response data for the get operation. + * Contains response data for the listNext operation. */ -export type BudgetsGetResponse = Budget & { +export type ReservationsDetailsListNextResponse = ReservationDetailsListResult & { /** * The underlying HTTP response. */ @@ -3714,17 +3291,18 @@ export type BudgetsGetResponse = Budget & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: Budget; + parsedBody: ReservationDetailsListResult; }; }; /** - * Contains response data for the createOrUpdate operation. + * Contains response data for the list operation. */ -export type BudgetsCreateOrUpdateResponse = Budget & { +export type ReservationRecommendationsListResponse = ReservationRecommendationsListResult & { /** * The underlying HTTP response. */ @@ -3733,17 +3311,18 @@ export type BudgetsCreateOrUpdateResponse = Budget & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: Budget; + parsedBody: ReservationRecommendationsListResult; }; }; /** - * Contains response data for the getByResourceGroupName operation. + * Contains response data for the listNext operation. */ -export type BudgetsGetByResourceGroupNameResponse = Budget & { +export type ReservationRecommendationsListNextResponse = ReservationRecommendationsListResult & { /** * The underlying HTTP response. */ @@ -3752,17 +3331,18 @@ export type BudgetsGetByResourceGroupNameResponse = Budget & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: Budget; + parsedBody: ReservationRecommendationsListResult; }; }; /** - * Contains response data for the createOrUpdateByResourceGroupName operation. + * Contains response data for the list operation. */ -export type BudgetsCreateOrUpdateByResourceGroupNameResponse = Budget & { +export type ReservationTransactionsListResponse = ReservationTransactionsListResult & { /** * The underlying HTTP response. */ @@ -3771,17 +3351,18 @@ export type BudgetsCreateOrUpdateByResourceGroupNameResponse = Budget & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: Budget; + parsedBody: ReservationTransactionsListResult; }; }; /** * Contains response data for the listNext operation. */ -export type BudgetsListNextResponse = BudgetsListResult & { +export type ReservationTransactionsListNextResponse = ReservationTransactionsListResult & { /** * The underlying HTTP response. */ @@ -3790,29 +3371,11 @@ export type BudgetsListNextResponse = BudgetsListResult & { * The response body as text (string format) */ bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: BudgetsListResult; - }; -}; -/** - * Contains response data for the listByResourceGroupNameNext operation. - */ -export type BudgetsListByResourceGroupNameNextResponse = BudgetsListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; /** * The response body as parsed JSON or XML */ - parsedBody: BudgetsListResult; + parsedBody: ReservationTransactionsListResult; }; }; @@ -3828,6 +3391,7 @@ export type PriceSheetGetResponse = PriceSheetResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -3847,6 +3411,7 @@ export type PriceSheetGetByBillingPeriodResponse = PriceSheetResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -3855,9 +3420,9 @@ export type PriceSheetGetByBillingPeriodResponse = PriceSheetResult & { }; /** - * Contains response data for the get operation. + * Contains response data for the list operation. */ -export type TagsGetResponse = TagsResult & { +export type ForecastsListResponse = ForecastsListResult & { /** * The underlying HTTP response. */ @@ -3866,17 +3431,18 @@ export type TagsGetResponse = TagsResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: TagsResult; + parsedBody: ForecastsListResult; }; }; /** * Contains response data for the list operation. */ -export type ForecastsListResponse = ForecastsListResult & { +export type OperationsListResponse = OperationListResult & { /** * The underlying HTTP response. */ @@ -3885,17 +3451,18 @@ export type ForecastsListResponse = ForecastsListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: ForecastsListResult; + parsedBody: OperationListResult; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listNext operation. */ -export type OperationsListResponse = OperationListResult & { +export type OperationsListNextResponse = OperationListResult & { /** * The underlying HTTP response. */ @@ -3904,6 +3471,7 @@ export type OperationsListResponse = OperationListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -3912,9 +3480,9 @@ export type OperationsListResponse = OperationListResult & { }; /** - * Contains response data for the listNext operation. + * Contains response data for the getByManagementGroup operation. */ -export type OperationsListNextResponse = OperationListResult & { +export type AggregatedCostGetByManagementGroupResponse = ManagementGroupAggregatedCostResult & { /** * The underlying HTTP response. */ @@ -3923,17 +3491,18 @@ export type OperationsListNextResponse = OperationListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: OperationListResult; + parsedBody: ManagementGroupAggregatedCostResult; }; }; /** - * Contains response data for the getByManagementGroup operation. + * Contains response data for the getForBillingPeriodByManagementGroup operation. */ -export type AggregatedCostGetByManagementGroupResponse = ManagementGroupAggregatedCostResult & { +export type AggregatedCostGetForBillingPeriodByManagementGroupResponse = ManagementGroupAggregatedCostResult & { /** * The underlying HTTP response. */ @@ -3942,6 +3511,7 @@ export type AggregatedCostGetByManagementGroupResponse = ManagementGroupAggregat * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -3950,9 +3520,9 @@ export type AggregatedCostGetByManagementGroupResponse = ManagementGroupAggregat }; /** - * Contains response data for the getForBillingPeriodByManagementGroup operation. + * Contains response data for the list operation. */ -export type AggregatedCostGetForBillingPeriodByManagementGroupResponse = ManagementGroupAggregatedCostResult & { +export type EventsListResponse = Events & { /** * The underlying HTTP response. */ @@ -3961,17 +3531,18 @@ export type AggregatedCostGetForBillingPeriodByManagementGroupResponse = Managem * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: ManagementGroupAggregatedCostResult; + parsedBody: Events; }; }; /** - * Contains response data for the listByEnrollmentAccount operation. + * Contains response data for the listNext operation. */ -export type ChargesListByEnrollmentAccountResponse = ChargesListResult & { +export type EventsListNextResponse = Events & { /** * The underlying HTTP response. */ @@ -3980,17 +3551,18 @@ export type ChargesListByEnrollmentAccountResponse = ChargesListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: ChargesListResult; + parsedBody: Events; }; }; /** - * Contains response data for the listForBillingPeriodByEnrollmentAccount operation. + * Contains response data for the list operation. */ -export type ChargesListForBillingPeriodByEnrollmentAccountResponse = ChargeSummary & { +export type LotsListResponse = Lots & { /** * The underlying HTTP response. */ @@ -3999,17 +3571,18 @@ export type ChargesListForBillingPeriodByEnrollmentAccountResponse = ChargeSumma * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: ChargeSummary; + parsedBody: Lots; }; }; /** - * Contains response data for the listByDepartment operation. + * Contains response data for the listNext operation. */ -export type ChargesListByDepartmentResponse = ChargesListResult & { +export type LotsListNextResponse = Lots & { /** * The underlying HTTP response. */ @@ -4018,17 +3591,18 @@ export type ChargesListByDepartmentResponse = ChargesListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: ChargesListResult; + parsedBody: Lots; }; }; /** - * Contains response data for the listForBillingPeriodByDepartment operation. + * Contains response data for the get operation. */ -export type ChargesListForBillingPeriodByDepartmentResponse = ChargeSummary & { +export type CreditsGetResponse = CreditSummary & { /** * The underlying HTTP response. */ @@ -4037,9 +3611,10 @@ export type ChargesListForBillingPeriodByDepartmentResponse = ChargeSummary & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: ChargeSummary; + parsedBody: CreditSummary; }; }; diff --git a/sdk/consumption/arm-consumption/src/models/lotsOperationsMappers.ts b/sdk/consumption/arm-consumption/src/models/lotsOperationsMappers.ts new file mode 100644 index 000000000000..456753f8b70f --- /dev/null +++ b/sdk/consumption/arm-consumption/src/models/lotsOperationsMappers.ts @@ -0,0 +1,49 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + Amount, + Balance, + BalancePropertiesAdjustmentDetailsItem, + BalancePropertiesNewPurchasesDetailsItem, + BaseResource, + Budget, + BudgetTimePeriod, + ChargeSummary, + CreditBalanceSummary, + CreditSummary, + CurrentSpend, + ErrorDetails, + ErrorResponse, + EventSummary, + Filters, + Forecast, + ForecastPropertiesConfidenceLevelsItem, + LegacyChargeSummary, + LegacyUsageDetail, + Lots, + LotSummary, + ManagementGroupAggregatedCostResult, + Marketplace, + MeterDetails, + MeterDetailsResponse, + ModernChargeSummary, + ModernUsageDetail, + Notification, + PriceSheetProperties, + PriceSheetResult, + ProxyResource, + ReservationDetail, + ReservationSummary, + ReservationTransaction, + Resource, + Tag, + TagsResult, + UsageDetail +} from "../models/mappers"; diff --git a/sdk/consumption/arm-consumption/src/models/mappers.ts b/sdk/consumption/arm-consumption/src/models/mappers.ts index 69f5bcfaaee2..8b9e57e2daf6 100644 --- a/sdk/consumption/arm-consumption/src/models/mappers.ts +++ b/sdk/consumption/arm-consumption/src/models/mappers.ts @@ -1,11 +1,9 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import { CloudErrorMapper, BaseResourceMapper } from "@azure/ms-rest-azure-js"; @@ -134,91 +132,166 @@ export const UsageDetail: msRest.CompositeMapper = { serializedName: "UsageDetail", type: { name: "Composite", + polymorphicDiscriminator: { + serializedName: "kind", + clientName: "kind" + }, + uberParent: "BaseResource", className: "UsageDetail", modelProperties: { ...Resource.type.modelProperties, - billingPeriodId: { + kind: { + required: true, + serializedName: "kind", + type: { + name: "String" + } + } + } + } +}; + +export const MeterDetailsResponse: msRest.CompositeMapper = { + serializedName: "MeterDetailsResponse", + type: { + name: "Composite", + className: "MeterDetailsResponse", + modelProperties: { + meterName: { readOnly: true, - serializedName: "properties.billingPeriodId", + serializedName: "meterName", type: { name: "String" } }, - invoiceId: { + meterCategory: { readOnly: true, - serializedName: "properties.invoiceId", + serializedName: "meterCategory", type: { name: "String" } }, - usageStart: { + meterSubCategory: { readOnly: true, - serializedName: "properties.usageStart", + serializedName: "meterSubCategory", + type: { + name: "String" + } + }, + unitOfMeasure: { + readOnly: true, + serializedName: "unitOfMeasure", + type: { + name: "String" + } + }, + serviceFamily: { + readOnly: true, + serializedName: "serviceFamily", + type: { + name: "String" + } + } + } + } +}; + +export const LegacyUsageDetail: msRest.CompositeMapper = { + serializedName: "legacy", + type: { + name: "Composite", + className: "LegacyUsageDetail", + modelProperties: { + ...UsageDetail.type.modelProperties, + billingAccountId: { + readOnly: true, + serializedName: "properties.billingAccountId", + type: { + name: "String" + } + }, + billingAccountName: { + readOnly: true, + serializedName: "properties.billingAccountName", + type: { + name: "String" + } + }, + billingPeriodStartDate: { + readOnly: true, + serializedName: "properties.billingPeriodStartDate", type: { name: "DateTime" } }, - usageEnd: { + billingPeriodEndDate: { readOnly: true, - serializedName: "properties.usageEnd", + serializedName: "properties.billingPeriodEndDate", type: { name: "DateTime" } }, - instanceName: { + billingProfileId: { readOnly: true, - serializedName: "properties.instanceName", + serializedName: "properties.billingProfileId", type: { name: "String" } }, - instanceId: { + billingProfileName: { readOnly: true, - serializedName: "properties.instanceId", + serializedName: "properties.billingProfileName", type: { name: "String" } }, - instanceLocation: { + accountOwnerId: { readOnly: true, - serializedName: "properties.instanceLocation", + serializedName: "properties.accountOwnerId", type: { name: "String" } }, - currency: { + accountName: { readOnly: true, - serializedName: "properties.currency", + serializedName: "properties.accountName", type: { name: "String" } }, - usageQuantity: { + subscriptionId: { readOnly: true, - serializedName: "properties.usageQuantity", + serializedName: "properties.subscriptionId", type: { - name: "Number" + name: "String" } }, - billableQuantity: { + subscriptionName: { readOnly: true, - serializedName: "properties.billableQuantity", + serializedName: "properties.subscriptionName", type: { - name: "Number" + name: "String" } }, - pretaxCost: { + date: { readOnly: true, - serializedName: "properties.pretaxCost", + serializedName: "properties.date", type: { - name: "Number" + name: "DateTime" } }, - isEstimated: { + product: { readOnly: true, - serializedName: "properties.isEstimated", + serializedName: "properties.product", type: { - name: "Boolean" + name: "String" + } + }, + partNumber: { + readOnly: true, + serializedName: "properties.partNumber", + type: { + name: "String" } }, meterId: { @@ -233,40 +306,47 @@ export const UsageDetail: msRest.CompositeMapper = { serializedName: "properties.meterDetails", type: { name: "Composite", - className: "MeterDetails" + className: "MeterDetailsResponse" } }, - subscriptionGuid: { + quantity: { readOnly: true, - serializedName: "properties.subscriptionGuid", + serializedName: "properties.quantity", type: { - name: "Uuid" + name: "Number" } }, - subscriptionName: { + effectivePrice: { readOnly: true, - serializedName: "properties.subscriptionName", + serializedName: "properties.effectivePrice", type: { - name: "String" + name: "Number" } }, - accountName: { + cost: { readOnly: true, - serializedName: "properties.accountName", + serializedName: "properties.cost", type: { - name: "String" + name: "Number" } }, - departmentName: { + unitPrice: { readOnly: true, - serializedName: "properties.departmentName", + serializedName: "properties.unitPrice", + type: { + name: "Number" + } + }, + billingCurrency: { + readOnly: true, + serializedName: "properties.billingCurrency", type: { name: "String" } }, - product: { + resourceLocation: { readOnly: true, - serializedName: "properties.product", + serializedName: "properties.resourceLocation", type: { name: "String" } @@ -278,176 +358,204 @@ export const UsageDetail: msRest.CompositeMapper = { name: "String" } }, - costCenter: { + resourceId: { readOnly: true, - serializedName: "properties.costCenter", + serializedName: "properties.resourceId", type: { name: "String" } }, - partNumber: { + resourceName: { readOnly: true, - serializedName: "properties.partNumber", + serializedName: "properties.resourceName", type: { name: "String" } }, - resourceGuid: { + serviceInfo1: { readOnly: true, - serializedName: "properties.resourceGuid", + serializedName: "properties.serviceInfo1", type: { name: "String" } }, - offerId: { + serviceInfo2: { readOnly: true, - serializedName: "properties.offerId", + serializedName: "properties.serviceInfo2", type: { name: "String" } }, - chargesBilledSeparately: { + additionalInfo: { readOnly: true, - serializedName: "properties.chargesBilledSeparately", + serializedName: "properties.additionalInfo", type: { - name: "Boolean" + name: "String" } }, - location: { + invoiceSection: { readOnly: true, - serializedName: "properties.location", + serializedName: "properties.invoiceSection", type: { name: "String" } }, - additionalProperties: { + costCenter: { readOnly: true, - serializedName: "properties.additionalProperties", + serializedName: "properties.costCenter", type: { name: "String" } - } - } - } -}; - -export const Marketplace: msRest.CompositeMapper = { - serializedName: "Marketplace", - type: { - name: "Composite", - className: "Marketplace", - modelProperties: { - ...Resource.type.modelProperties, - billingPeriodId: { + }, + resourceGroup: { readOnly: true, - serializedName: "properties.billingPeriodId", + serializedName: "properties.resourceGroup", type: { name: "String" } }, - usageStart: { + reservationId: { readOnly: true, - serializedName: "properties.usageStart", + serializedName: "properties.reservationId", type: { - name: "DateTime" + name: "String" } }, - usageEnd: { + reservationName: { readOnly: true, - serializedName: "properties.usageEnd", + serializedName: "properties.reservationName", type: { - name: "DateTime" + name: "String" } }, - resourceRate: { + productOrderId: { readOnly: true, - serializedName: "properties.resourceRate", + serializedName: "properties.productOrderId", type: { - name: "Number" + name: "String" } }, - offerName: { + productOrderName: { readOnly: true, - serializedName: "properties.offerName", + serializedName: "properties.productOrderName", type: { name: "String" } }, - resourceGroup: { + offerId: { readOnly: true, - serializedName: "properties.resourceGroup", + serializedName: "properties.offerId", type: { name: "String" } }, - orderNumber: { + isAzureCreditEligible: { readOnly: true, - serializedName: "properties.orderNumber", + serializedName: "properties.isAzureCreditEligible", + type: { + name: "Boolean" + } + }, + term: { + readOnly: true, + serializedName: "properties.term", type: { name: "String" } }, - instanceName: { + publisherName: { readOnly: true, - serializedName: "properties.instanceName", + serializedName: "properties.publisherName", type: { name: "String" } }, - instanceId: { + publisherType: { readOnly: true, - serializedName: "properties.instanceId", + serializedName: "properties.publisherType", type: { name: "String" } }, - currency: { + planName: { readOnly: true, - serializedName: "properties.currency", + serializedName: "properties.planName", type: { name: "String" } }, - consumedQuantity: { + chargeType: { readOnly: true, - serializedName: "properties.consumedQuantity", + serializedName: "properties.chargeType", type: { - name: "Number" + name: "String" } }, - unitOfMeasure: { + frequency: { readOnly: true, - serializedName: "properties.unitOfMeasure", + serializedName: "properties.frequency", + type: { + name: "String" + } + } + } + } +}; + +export const ModernUsageDetail: msRest.CompositeMapper = { + serializedName: "modern", + type: { + name: "Composite", + className: "ModernUsageDetail", + modelProperties: { + ...UsageDetail.type.modelProperties, + billingAccountId: { + readOnly: true, + serializedName: "properties.billingAccountId", type: { name: "String" } }, - pretaxCost: { + billingAccountName: { readOnly: true, - serializedName: "properties.pretaxCost", + serializedName: "properties.billingAccountName", type: { - name: "Number" + name: "String" } }, - isEstimated: { + billingPeriodStartDate: { readOnly: true, - serializedName: "properties.isEstimated", + serializedName: "properties.billingPeriodStartDate", type: { - name: "Boolean" + name: "DateTime" } }, - meterId: { + billingPeriodEndDate: { readOnly: true, - serializedName: "properties.meterId", + serializedName: "properties.billingPeriodEndDate", type: { - name: "Uuid" + name: "DateTime" + } + }, + billingProfileId: { + readOnly: true, + serializedName: "properties.billingProfileId", + type: { + name: "String" + } + }, + billingProfileName: { + readOnly: true, + serializedName: "properties.billingProfileName", + type: { + name: "String" } }, subscriptionGuid: { readOnly: true, serializedName: "properties.subscriptionGuid", type: { - name: "Uuid" + name: "String" } }, subscriptionName: { @@ -457,72 +565,992 @@ export const Marketplace: msRest.CompositeMapper = { name: "String" } }, - accountName: { + date: { readOnly: true, - serializedName: "properties.accountName", + serializedName: "properties.date", type: { - name: "String" + name: "DateTime" } }, - departmentName: { + product: { readOnly: true, - serializedName: "properties.departmentName", + serializedName: "properties.product", type: { name: "String" } }, - consumedService: { + meterId: { readOnly: true, - serializedName: "properties.consumedService", + serializedName: "properties.meterId", type: { - name: "String" + name: "Uuid" } }, - costCenter: { + meterName: { readOnly: true, - serializedName: "properties.costCenter", + serializedName: "properties.meterName", type: { name: "String" } }, - additionalProperties: { + meterRegion: { readOnly: true, - serializedName: "properties.additionalProperties", + serializedName: "properties.meterRegion", type: { name: "String" } }, - publisherName: { + meterCategory: { readOnly: true, - serializedName: "properties.publisherName", + serializedName: "properties.meterCategory", type: { name: "String" } }, - planName: { + meterSubCategory: { readOnly: true, - serializedName: "properties.planName", + serializedName: "properties.meterSubCategory", type: { name: "String" } }, - isRecurringCharge: { + serviceFamily: { readOnly: true, - serializedName: "properties.isRecurringCharge", + serializedName: "properties.serviceFamily", + type: { + name: "String" + } + }, + quantity: { + readOnly: true, + serializedName: "properties.quantity", + type: { + name: "Number" + } + }, + unitOfMeasure: { + readOnly: true, + serializedName: "properties.unitOfMeasure", + type: { + name: "String" + } + }, + instanceName: { + readOnly: true, + serializedName: "properties.instanceName", + type: { + name: "String" + } + }, + costInUSD: { + readOnly: true, + serializedName: "properties.costInUSD", + type: { + name: "Number" + } + }, + unitPrice: { + readOnly: true, + serializedName: "properties.unitPrice", + type: { + name: "Number" + } + }, + billingCurrencyCode: { + readOnly: true, + serializedName: "properties.billingCurrencyCode", + type: { + name: "String" + } + }, + resourceLocation: { + readOnly: true, + serializedName: "properties.resourceLocation", + type: { + name: "String" + } + }, + consumedService: { + readOnly: true, + serializedName: "properties.consumedService", + type: { + name: "String" + } + }, + serviceInfo1: { + readOnly: true, + serializedName: "properties.serviceInfo1", + type: { + name: "String" + } + }, + serviceInfo2: { + readOnly: true, + serializedName: "properties.serviceInfo2", + type: { + name: "String" + } + }, + additionalInfo: { + readOnly: true, + serializedName: "properties.additionalInfo", + type: { + name: "String" + } + }, + invoiceSectionId: { + readOnly: true, + serializedName: "properties.invoiceSectionId", + type: { + name: "String" + } + }, + invoiceSectionName: { + readOnly: true, + serializedName: "properties.invoiceSectionName", + type: { + name: "String" + } + }, + costCenter: { + readOnly: true, + serializedName: "properties.costCenter", + type: { + name: "String" + } + }, + resourceGroup: { + readOnly: true, + serializedName: "properties.resourceGroup", + type: { + name: "String" + } + }, + reservationId: { + readOnly: true, + serializedName: "properties.reservationId", + type: { + name: "String" + } + }, + reservationName: { + readOnly: true, + serializedName: "properties.reservationName", + type: { + name: "String" + } + }, + productOrderId: { + readOnly: true, + serializedName: "properties.productOrderId", + type: { + name: "String" + } + }, + productOrderName: { + readOnly: true, + serializedName: "properties.productOrderName", + type: { + name: "String" + } + }, + isAzureCreditEligible: { + readOnly: true, + serializedName: "properties.isAzureCreditEligible", + type: { + name: "Boolean" + } + }, + term: { + readOnly: true, + serializedName: "properties.term", + type: { + name: "String" + } + }, + publisherName: { + readOnly: true, + serializedName: "properties.publisherName", + type: { + name: "String" + } + }, + publisherType: { + readOnly: true, + serializedName: "properties.publisherType", + type: { + name: "String" + } + }, + chargeType: { + readOnly: true, + serializedName: "properties.chargeType", + type: { + name: "String" + } + }, + frequency: { + readOnly: true, + serializedName: "properties.frequency", + type: { + name: "String" + } + }, + costInBillingCurrency: { + readOnly: true, + serializedName: "properties.costInBillingCurrency", + type: { + name: "Number" + } + }, + costInPricingCurrency: { + readOnly: true, + serializedName: "properties.costInPricingCurrency", + type: { + name: "Number" + } + }, + exchangeRate: { + readOnly: true, + serializedName: "properties.exchangeRate", + type: { + name: "String" + } + }, + exchangeRateDate: { + readOnly: true, + serializedName: "properties.exchangeRateDate", + type: { + name: "DateTime" + } + }, + invoiceId: { + readOnly: true, + serializedName: "properties.invoiceId", + type: { + name: "String" + } + }, + previousInvoiceId: { + readOnly: true, + serializedName: "properties.previousInvoiceId", + type: { + name: "String" + } + }, + pricingCurrencyCode: { + readOnly: true, + serializedName: "properties.pricingCurrencyCode", + type: { + name: "String" + } + }, + productIdentifier: { + readOnly: true, + serializedName: "properties.productIdentifier", + type: { + name: "String" + } + }, + resourceLocationNormalized: { + readOnly: true, + serializedName: "properties.resourceLocationNormalized", + type: { + name: "String" + } + }, + servicePeriodStartDate: { + readOnly: true, + serializedName: "properties.servicePeriodStartDate", + type: { + name: "DateTime" + } + }, + servicePeriodEndDate: { + readOnly: true, + serializedName: "properties.servicePeriodEndDate", + type: { + name: "DateTime" + } + }, + customerTenantId: { + readOnly: true, + serializedName: "properties.customerTenantId", + type: { + name: "String" + } + }, + customerName: { + readOnly: true, + serializedName: "properties.customerName", + type: { + name: "String" + } + }, + partnerTenantId: { + readOnly: true, + serializedName: "properties.partnerTenantId", + type: { + name: "String" + } + }, + partnerName: { + readOnly: true, + serializedName: "properties.partnerName", + type: { + name: "String" + } + }, + resellerMpnId: { + readOnly: true, + serializedName: "properties.resellerMpnId", + type: { + name: "String" + } + }, + resellerName: { + readOnly: true, + serializedName: "properties.resellerName", + type: { + name: "String" + } + }, + publisherId: { + readOnly: true, + serializedName: "properties.publisherId", + type: { + name: "String" + } + }, + marketPrice: { + readOnly: true, + serializedName: "properties.marketPrice", + type: { + name: "Number" + } + }, + exchangeRatePricingToBilling: { + readOnly: true, + serializedName: "properties.exchangeRatePricingToBilling", + type: { + name: "Number" + } + }, + paygCostInBillingCurrency: { + readOnly: true, + serializedName: "properties.paygCostInBillingCurrency", + type: { + name: "Number" + } + }, + paygCostInUSD: { + readOnly: true, + serializedName: "properties.paygCostInUSD", + type: { + name: "Number" + } + }, + partnerEarnedCreditRate: { + readOnly: true, + serializedName: "properties.partnerEarnedCreditRate", + type: { + name: "Number" + } + }, + partnerEarnedCreditApplied: { + readOnly: true, + serializedName: "properties.partnerEarnedCreditApplied", + type: { + name: "String" + } + } + } + } +}; + +export const Marketplace: msRest.CompositeMapper = { + serializedName: "Marketplace", + type: { + name: "Composite", + className: "Marketplace", + modelProperties: { + ...Resource.type.modelProperties, + billingPeriodId: { + readOnly: true, + serializedName: "properties.billingPeriodId", + type: { + name: "String" + } + }, + usageStart: { + readOnly: true, + serializedName: "properties.usageStart", + type: { + name: "DateTime" + } + }, + usageEnd: { + readOnly: true, + serializedName: "properties.usageEnd", + type: { + name: "DateTime" + } + }, + resourceRate: { + readOnly: true, + serializedName: "properties.resourceRate", + type: { + name: "Number" + } + }, + offerName: { + readOnly: true, + serializedName: "properties.offerName", + type: { + name: "String" + } + }, + resourceGroup: { + readOnly: true, + serializedName: "properties.resourceGroup", + type: { + name: "String" + } + }, + orderNumber: { + readOnly: true, + serializedName: "properties.orderNumber", + type: { + name: "String" + } + }, + instanceName: { + readOnly: true, + serializedName: "properties.instanceName", + type: { + name: "String" + } + }, + instanceId: { + readOnly: true, + serializedName: "properties.instanceId", + type: { + name: "String" + } + }, + currency: { + readOnly: true, + serializedName: "properties.currency", + type: { + name: "String" + } + }, + consumedQuantity: { + readOnly: true, + serializedName: "properties.consumedQuantity", + type: { + name: "Number" + } + }, + unitOfMeasure: { + readOnly: true, + serializedName: "properties.unitOfMeasure", + type: { + name: "String" + } + }, + pretaxCost: { + readOnly: true, + serializedName: "properties.pretaxCost", + type: { + name: "Number" + } + }, + isEstimated: { + readOnly: true, + serializedName: "properties.isEstimated", + type: { + name: "Boolean" + } + }, + meterId: { + readOnly: true, + serializedName: "properties.meterId", + type: { + name: "Uuid" + } + }, + subscriptionGuid: { + readOnly: true, + serializedName: "properties.subscriptionGuid", + type: { + name: "Uuid" + } + }, + subscriptionName: { + readOnly: true, + serializedName: "properties.subscriptionName", + type: { + name: "String" + } + }, + accountName: { + readOnly: true, + serializedName: "properties.accountName", + type: { + name: "String" + } + }, + departmentName: { + readOnly: true, + serializedName: "properties.departmentName", + type: { + name: "String" + } + }, + consumedService: { + readOnly: true, + serializedName: "properties.consumedService", + type: { + name: "String" + } + }, + costCenter: { + readOnly: true, + serializedName: "properties.costCenter", + type: { + name: "String" + } + }, + additionalProperties: { + readOnly: true, + serializedName: "properties.additionalProperties", + type: { + name: "String" + } + }, + publisherName: { + readOnly: true, + serializedName: "properties.publisherName", + type: { + name: "String" + } + }, + planName: { + readOnly: true, + serializedName: "properties.planName", + type: { + name: "String" + } + }, + isRecurringCharge: { + readOnly: true, + serializedName: "properties.isRecurringCharge", + type: { + name: "Boolean" + } + } + } + } +}; + +export const BalancePropertiesNewPurchasesDetailsItem: msRest.CompositeMapper = { + serializedName: "BalanceProperties_newPurchasesDetailsItem", + type: { + name: "Composite", + className: "BalancePropertiesNewPurchasesDetailsItem", + modelProperties: { + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + value: { + readOnly: true, + serializedName: "value", + type: { + name: "Number" + } + } + } + } +}; + +export const BalancePropertiesAdjustmentDetailsItem: msRest.CompositeMapper = { + serializedName: "BalanceProperties_adjustmentDetailsItem", + type: { + name: "Composite", + className: "BalancePropertiesAdjustmentDetailsItem", + modelProperties: { + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + value: { + readOnly: true, + serializedName: "value", + type: { + name: "Number" + } + } + } + } +}; + +export const Balance: msRest.CompositeMapper = { + serializedName: "Balance", + type: { + name: "Composite", + className: "Balance", + modelProperties: { + ...Resource.type.modelProperties, + currency: { + readOnly: true, + serializedName: "properties.currency", + type: { + name: "String" + } + }, + beginningBalance: { + readOnly: true, + serializedName: "properties.beginningBalance", + type: { + name: "Number" + } + }, + endingBalance: { + readOnly: true, + serializedName: "properties.endingBalance", + type: { + name: "Number" + } + }, + newPurchases: { + readOnly: true, + serializedName: "properties.newPurchases", + type: { + name: "Number" + } + }, + adjustments: { + readOnly: true, + serializedName: "properties.adjustments", + type: { + name: "Number" + } + }, + utilized: { + readOnly: true, + serializedName: "properties.utilized", + type: { + name: "Number" + } + }, + serviceOverage: { + readOnly: true, + serializedName: "properties.serviceOverage", + type: { + name: "Number" + } + }, + chargesBilledSeparately: { + readOnly: true, + serializedName: "properties.chargesBilledSeparately", + type: { + name: "Number" + } + }, + totalOverage: { + readOnly: true, + serializedName: "properties.totalOverage", + type: { + name: "Number" + } + }, + totalUsage: { + readOnly: true, + serializedName: "properties.totalUsage", + type: { + name: "Number" + } + }, + azureMarketplaceServiceCharges: { + readOnly: true, + serializedName: "properties.azureMarketplaceServiceCharges", + type: { + name: "Number" + } + }, + billingFrequency: { + serializedName: "properties.billingFrequency", + type: { + name: "String" + } + }, + priceHidden: { + readOnly: true, + serializedName: "properties.priceHidden", type: { name: "Boolean" } + }, + newPurchasesDetails: { + readOnly: true, + serializedName: "properties.newPurchasesDetails", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BalancePropertiesNewPurchasesDetailsItem" + } + } + } + }, + adjustmentDetails: { + readOnly: true, + serializedName: "properties.adjustmentDetails", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BalancePropertiesAdjustmentDetailsItem" + } + } + } + } + } + } +}; + +export const ReservationSummary: msRest.CompositeMapper = { + serializedName: "ReservationSummary", + type: { + name: "Composite", + className: "ReservationSummary", + modelProperties: { + ...Resource.type.modelProperties, + reservationOrderId: { + readOnly: true, + serializedName: "properties.reservationOrderId", + type: { + name: "String" + } + }, + reservationId: { + readOnly: true, + serializedName: "properties.reservationId", + type: { + name: "String" + } + }, + skuName: { + readOnly: true, + serializedName: "properties.skuName", + type: { + name: "String" + } + }, + reservedHours: { + readOnly: true, + serializedName: "properties.reservedHours", + type: { + name: "Number" + } + }, + usageDate: { + readOnly: true, + serializedName: "properties.usageDate", + type: { + name: "DateTime" + } + }, + usedHours: { + readOnly: true, + serializedName: "properties.usedHours", + type: { + name: "Number" + } + }, + minUtilizationPercentage: { + readOnly: true, + serializedName: "properties.minUtilizationPercentage", + type: { + name: "Number" + } + }, + avgUtilizationPercentage: { + readOnly: true, + serializedName: "properties.avgUtilizationPercentage", + type: { + name: "Number" + } + }, + maxUtilizationPercentage: { + readOnly: true, + serializedName: "properties.maxUtilizationPercentage", + type: { + name: "Number" + } + }, + kind: { + readOnly: true, + serializedName: "properties.kind", + type: { + name: "String" + } + }, + purchasedQuantity: { + readOnly: true, + serializedName: "properties.purchasedQuantity", + type: { + name: "Number" + } + }, + remainingQuantity: { + readOnly: true, + serializedName: "properties.remainingQuantity", + type: { + name: "Number" + } + }, + totalReservedQuantity: { + readOnly: true, + serializedName: "properties.totalReservedQuantity", + type: { + name: "Number" + } + }, + usedQuantity: { + readOnly: true, + serializedName: "properties.usedQuantity", + type: { + name: "Number" + } + }, + utilizedPercentage: { + readOnly: true, + serializedName: "properties.utilizedPercentage", + type: { + name: "Number" + } + } + } + } +}; + +export const ReservationDetail: msRest.CompositeMapper = { + serializedName: "ReservationDetail", + type: { + name: "Composite", + className: "ReservationDetail", + modelProperties: { + ...Resource.type.modelProperties, + reservationOrderId: { + readOnly: true, + serializedName: "properties.reservationOrderId", + type: { + name: "String" + } + }, + instanceFlexibilityRatio: { + readOnly: true, + serializedName: "properties.instanceFlexibilityRatio", + type: { + name: "String" + } + }, + instanceFlexibilityGroup: { + readOnly: true, + serializedName: "properties.instanceFlexibilityGroup", + type: { + name: "String" + } + }, + reservationId: { + readOnly: true, + serializedName: "properties.reservationId", + type: { + name: "String" + } + }, + skuName: { + readOnly: true, + serializedName: "properties.skuName", + type: { + name: "String" + } + }, + reservedHours: { + readOnly: true, + serializedName: "properties.reservedHours", + type: { + name: "Number" + } + }, + usageDate: { + readOnly: true, + serializedName: "properties.usageDate", + type: { + name: "DateTime" + } + }, + usedHours: { + readOnly: true, + serializedName: "properties.usedHours", + type: { + name: "Number" + } + }, + instanceId: { + readOnly: true, + serializedName: "properties.instanceId", + type: { + name: "String" + } + }, + totalReservedQuantity: { + readOnly: true, + serializedName: "properties.totalReservedQuantity", + type: { + name: "Number" + } + }, + kind: { + readOnly: true, + serializedName: "properties.kind", + type: { + name: "String" + } } } } }; -export const BalancePropertiesNewPurchasesDetailsItem: msRest.CompositeMapper = { - serializedName: "BalanceProperties_newPurchasesDetailsItem", +export const ReservationRecommendation: msRest.CompositeMapper = { + serializedName: "ReservationRecommendation", type: { name: "Composite", - className: "BalancePropertiesNewPurchasesDetailsItem", + polymorphicDiscriminator: { + serializedName: "kind", + clientName: "kind" + }, + uberParent: "ReservationRecommendation", + className: "ReservationRecommendation", modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, name: { readOnly: true, serializedName: "name", @@ -530,22 +1558,55 @@ export const BalancePropertiesNewPurchasesDetailsItem: msRest.CompositeMapper = name: "String" } }, - value: { + type: { readOnly: true, - serializedName: "value", + serializedName: "type", type: { - name: "Number" + name: "String" + } + }, + tags: { + readOnly: true, + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + location: { + readOnly: true, + serializedName: "location", + type: { + name: "String" + } + }, + sku: { + readOnly: true, + serializedName: "sku", + type: { + name: "String" + } + }, + kind: { + required: true, + serializedName: "kind", + type: { + name: "String" } } } } }; -export const BalancePropertiesAdjustmentDetailsItem: msRest.CompositeMapper = { - serializedName: "BalanceProperties_adjustmentDetailsItem", +export const SkuProperty: msRest.CompositeMapper = { + serializedName: "SkuProperty", type: { name: "Composite", - className: "BalancePropertiesAdjustmentDetailsItem", + className: "SkuProperty", modelProperties: { name: { readOnly: true, @@ -558,346 +1619,363 @@ export const BalancePropertiesAdjustmentDetailsItem: msRest.CompositeMapper = { readOnly: true, serializedName: "value", type: { - name: "Number" + name: "String" } } } } }; -export const Balance: msRest.CompositeMapper = { - serializedName: "Balance", +export const LegacyReservationRecommendation: msRest.CompositeMapper = { + serializedName: "legacy", type: { name: "Composite", - className: "Balance", + polymorphicDiscriminator: ReservationRecommendation.type.polymorphicDiscriminator, + uberParent: "ReservationRecommendation", + className: "LegacyReservationRecommendation", modelProperties: { - ...Resource.type.modelProperties, - currency: { + ...ReservationRecommendation.type.modelProperties, + lookBackPeriod: { readOnly: true, - serializedName: "properties.currency", + serializedName: "properties.lookBackPeriod", type: { name: "String" } }, - beginningBalance: { + instanceFlexibilityRatio: { readOnly: true, - serializedName: "properties.beginningBalance", + serializedName: "properties.instanceFlexibilityRatio", type: { name: "Number" } }, - endingBalance: { + instanceFlexibilityGroup: { readOnly: true, - serializedName: "properties.endingBalance", + serializedName: "properties.instanceFlexibilityGroup", type: { - name: "Number" + name: "String" } }, - newPurchases: { + normalizedSize: { readOnly: true, - serializedName: "properties.newPurchases", + serializedName: "properties.normalizedSize", type: { - name: "Number" + name: "String" } }, - adjustments: { + recommendedQuantityNormalized: { readOnly: true, - serializedName: "properties.adjustments", + serializedName: "properties.recommendedQuantityNormalized", type: { name: "Number" } }, - utilized: { + meterId: { readOnly: true, - serializedName: "properties.utilized", + serializedName: "properties.meterId", type: { - name: "Number" + name: "Uuid" } }, - serviceOverage: { + term: { readOnly: true, - serializedName: "properties.serviceOverage", + serializedName: "properties.term", type: { - name: "Number" + name: "String" } }, - chargesBilledSeparately: { + costWithNoReservedInstances: { readOnly: true, - serializedName: "properties.chargesBilledSeparately", + serializedName: "properties.costWithNoReservedInstances", type: { name: "Number" } }, - totalOverage: { + recommendedQuantity: { readOnly: true, - serializedName: "properties.totalOverage", + serializedName: "properties.recommendedQuantity", type: { name: "Number" } }, - totalUsage: { + totalCostWithReservedInstances: { readOnly: true, - serializedName: "properties.totalUsage", + serializedName: "properties.totalCostWithReservedInstances", type: { name: "Number" } }, - azureMarketplaceServiceCharges: { + netSavings: { readOnly: true, - serializedName: "properties.azureMarketplaceServiceCharges", + serializedName: "properties.netSavings", type: { name: "Number" } }, - billingFrequency: { - serializedName: "properties.billingFrequency", + firstUsageDate: { + readOnly: true, + serializedName: "properties.firstUsageDate", type: { - name: "String" + name: "DateTime" } }, - priceHidden: { + scope: { readOnly: true, - serializedName: "properties.priceHidden", + serializedName: "properties.scope", type: { - name: "Boolean" + name: "String" } }, - newPurchasesDetails: { + skuProperties: { readOnly: true, - serializedName: "properties.newPurchasesDetails", + serializedName: "properties.skuProperties", type: { name: "Sequence", element: { type: { name: "Composite", - className: "BalancePropertiesNewPurchasesDetailsItem" + className: "SkuProperty" } } } + } + } + } +}; + +export const Amount: msRest.CompositeMapper = { + serializedName: "amount", + type: { + name: "Composite", + className: "Amount", + modelProperties: { + currency: { + readOnly: true, + serializedName: "currency", + type: { + name: "String" + } }, - adjustmentDetails: { + value: { readOnly: true, - serializedName: "properties.adjustmentDetails", + serializedName: "value", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "BalancePropertiesAdjustmentDetailsItem" - } - } + name: "Number" } } } } }; -export const ReservationSummary: msRest.CompositeMapper = { - serializedName: "ReservationSummary", +export const ModernReservationRecommendation: msRest.CompositeMapper = { + serializedName: "modern", type: { name: "Composite", - className: "ReservationSummary", + polymorphicDiscriminator: ReservationRecommendation.type.polymorphicDiscriminator, + uberParent: "ReservationRecommendation", + className: "ModernReservationRecommendation", modelProperties: { - ...Resource.type.modelProperties, - reservationOrderId: { + ...ReservationRecommendation.type.modelProperties, + lookBackPeriod: { readOnly: true, - serializedName: "properties.reservationOrderId", + serializedName: "properties.lookBackPeriod", type: { name: "String" } }, - reservationId: { + instanceFlexibilityRatio: { readOnly: true, - serializedName: "properties.reservationId", + serializedName: "properties.instanceFlexibilityRatio", + type: { + name: "Number" + } + }, + instanceFlexibilityGroup: { + readOnly: true, + serializedName: "properties.instanceFlexibilityGroup", type: { name: "String" } }, - skuName: { + normalizedSize: { readOnly: true, - serializedName: "properties.skuName", + serializedName: "properties.normalizedSize", + type: { + name: "String" + } + }, + recommendedQuantityNormalized: { + readOnly: true, + serializedName: "properties.recommendedQuantityNormalized", + type: { + name: "Number" + } + }, + meterId: { + readOnly: true, + serializedName: "properties.meterId", + type: { + name: "Uuid" + } + }, + term: { + readOnly: true, + serializedName: "properties.term", type: { name: "String" } }, - reservedHours: { + costWithNoReservedInstances: { + readOnly: true, + serializedName: "properties.costWithNoReservedInstances", + type: { + name: "Composite", + className: "Amount" + } + }, + recommendedQuantity: { readOnly: true, - serializedName: "properties.reservedHours", + serializedName: "properties.recommendedQuantity", type: { name: "Number" } }, - usageDate: { + totalCostWithReservedInstances: { readOnly: true, - serializedName: "properties.usageDate", + serializedName: "properties.totalCostWithReservedInstances", type: { - name: "DateTime" + name: "Composite", + className: "Amount" } }, - usedHours: { + netSavings: { readOnly: true, - serializedName: "properties.usedHours", + serializedName: "properties.netSavings", type: { - name: "Number" + name: "Composite", + className: "Amount" } }, - minUtilizationPercentage: { + firstUsageDate: { readOnly: true, - serializedName: "properties.minUtilizationPercentage", + serializedName: "properties.firstUsageDate", type: { - name: "Number" + name: "DateTime" } }, - avgUtilizationPercentage: { + scope: { readOnly: true, - serializedName: "properties.avgUtilizationPercentage", + serializedName: "properties.scope", type: { - name: "Number" + name: "String" } }, - maxUtilizationPercentage: { + skuProperties: { readOnly: true, - serializedName: "properties.maxUtilizationPercentage", + serializedName: "properties.skuProperties", type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SkuProperty" + } + } } } } } }; -export const ReservationDetail: msRest.CompositeMapper = { - serializedName: "ReservationDetail", +export const ReservationTransaction: msRest.CompositeMapper = { + serializedName: "ReservationTransaction", type: { name: "Composite", - className: "ReservationDetail", + className: "ReservationTransaction", modelProperties: { ...Resource.type.modelProperties, - reservationOrderId: { + eventDate: { readOnly: true, - serializedName: "properties.reservationOrderId", + serializedName: "properties.eventDate", type: { - name: "String" + name: "DateTime" } }, - reservationId: { + reservationOrderId: { readOnly: true, - serializedName: "properties.reservationId", + serializedName: "properties.reservationOrderId", type: { name: "String" } }, - skuName: { + description: { readOnly: true, - serializedName: "properties.skuName", + serializedName: "properties.description", type: { name: "String" } }, - reservedHours: { - readOnly: true, - serializedName: "properties.reservedHours", - type: { - name: "Number" - } - }, - usageDate: { + eventType: { readOnly: true, - serializedName: "properties.usageDate", + serializedName: "properties.eventType", type: { - name: "DateTime" + name: "String" } }, - usedHours: { + quantity: { readOnly: true, - serializedName: "properties.usedHours", + serializedName: "properties.quantity", type: { name: "Number" } }, - instanceId: { - readOnly: true, - serializedName: "properties.instanceId", - type: { - name: "String" - } - }, - totalReservedQuantity: { + amount: { readOnly: true, - serializedName: "properties.totalReservedQuantity", + serializedName: "properties.amount", type: { name: "Number" } - } - } - } -}; - -export const ReservationRecommendation: msRest.CompositeMapper = { - serializedName: "ReservationRecommendation", - type: { - name: "Composite", - className: "ReservationRecommendation", - modelProperties: { - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" - } }, - name: { + currency: { readOnly: true, - serializedName: "name", + serializedName: "properties.currency", type: { name: "String" } }, - type: { + reservationOrderName: { readOnly: true, - serializedName: "type", + serializedName: "properties.reservationOrderName", type: { name: "String" } }, - tags: { - readOnly: true, - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - }, - location: { + purchasingEnrollment: { readOnly: true, - serializedName: "location", + serializedName: "properties.purchasingEnrollment", type: { name: "String" } }, - sku: { + purchasingSubscriptionGuid: { readOnly: true, - serializedName: "sku", + serializedName: "properties.purchasingSubscriptionGuid", type: { - name: "String" + name: "Uuid" } }, - lookBackPeriod: { + purchasingSubscriptionName: { readOnly: true, - serializedName: "properties.lookBackPeriod", + serializedName: "properties.purchasingSubscriptionName", type: { name: "String" } }, - meterId: { + armSkuName: { readOnly: true, - serializedName: "properties.meterId", + serializedName: "properties.armSkuName", type: { - name: "Uuid" + name: "String" } }, term: { @@ -907,44 +1985,44 @@ export const ReservationRecommendation: msRest.CompositeMapper = { name: "String" } }, - costWithNoReservedInstances: { + region: { readOnly: true, - serializedName: "properties.costWithNoReservedInstances", + serializedName: "properties.region", type: { - name: "Number" + name: "String" } }, - recommendedQuantity: { + accountName: { readOnly: true, - serializedName: "properties.recommendedQuantity", + serializedName: "properties.accountName", type: { - name: "Number" + name: "String" } }, - totalCostWithReservedInstances: { + accountOwnerEmail: { readOnly: true, - serializedName: "properties.totalCostWithReservedInstances", + serializedName: "properties.accountOwnerEmail", type: { - name: "Number" + name: "String" } }, - netSavings: { + departmentName: { readOnly: true, - serializedName: "properties.netSavings", + serializedName: "properties.departmentName", type: { - name: "Number" + name: "String" } }, - firstUsageDate: { + costCenter: { readOnly: true, - serializedName: "properties.firstUsageDate", + serializedName: "properties.costCenter", type: { - name: "DateTime" + name: "String" } }, - scope: { + currentEnrollment: { readOnly: true, - serializedName: "properties.scope", + serializedName: "properties.currentEnrollment", type: { name: "String" } @@ -1577,9 +2655,55 @@ export const ChargeSummary: msRest.CompositeMapper = { serializedName: "ChargeSummary", type: { name: "Composite", + polymorphicDiscriminator: { + serializedName: "kind", + clientName: "kind" + }, + uberParent: "BaseResource", className: "ChargeSummary", modelProperties: { ...Resource.type.modelProperties, + kind: { + required: true, + serializedName: "kind", + type: { + name: "String" + } + } + } + } +}; + +export const ChargesListResult: msRest.CompositeMapper = { + serializedName: "ChargesListResult", + type: { + name: "Composite", + className: "ChargesListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ChargeSummary" + } + } + } + } + } + } +}; + +export const LegacyChargeSummary: msRest.CompositeMapper = { + serializedName: "legacy", + type: { + name: "Composite", + className: "LegacyChargeSummary", + modelProperties: { + ...ChargeSummary.type.modelProperties, billingPeriodId: { readOnly: true, serializedName: "properties.billingPeriodId", @@ -1619,37 +2743,105 @@ export const ChargeSummary: msRest.CompositeMapper = { readOnly: true, serializedName: "properties.marketplaceCharges", type: { - name: "Number" + name: "Number" + } + }, + currency: { + readOnly: true, + serializedName: "properties.currency", + type: { + name: "String" + } + } + } + } +}; + +export const ModernChargeSummary: msRest.CompositeMapper = { + serializedName: "modern", + type: { + name: "Composite", + className: "ModernChargeSummary", + modelProperties: { + ...ChargeSummary.type.modelProperties, + billingPeriodId: { + readOnly: true, + serializedName: "properties.billingPeriodId", + type: { + name: "String" + } + }, + usageStart: { + readOnly: true, + serializedName: "properties.usageStart", + type: { + name: "String" + } + }, + usageEnd: { + readOnly: true, + serializedName: "properties.usageEnd", + type: { + name: "String" + } + }, + azureCharges: { + readOnly: true, + serializedName: "properties.azureCharges", + type: { + name: "Composite", + className: "Amount" + } + }, + chargesBilledSeparately: { + readOnly: true, + serializedName: "properties.chargesBilledSeparately", + type: { + name: "Composite", + className: "Amount" + } + }, + marketplaceCharges: { + readOnly: true, + serializedName: "properties.marketplaceCharges", + type: { + name: "Composite", + className: "Amount" + } + }, + billingAccountId: { + readOnly: true, + serializedName: "properties.billingAccountId", + type: { + name: "String" + } + }, + billingProfileId: { + readOnly: true, + serializedName: "properties.billingProfileId", + type: { + name: "String" + } + }, + invoiceSectionId: { + readOnly: true, + serializedName: "properties.invoiceSectionId", + type: { + name: "String" } }, - currency: { + customerId: { readOnly: true, - serializedName: "properties.currency", + serializedName: "properties.customerId", type: { name: "String" } - } - } - } -}; - -export const ChargesListResult: msRest.CompositeMapper = { - serializedName: "ChargesListResult", - type: { - name: "Composite", - className: "ChargesListResult", - modelProperties: { - value: { + }, + isInvoiced: { readOnly: true, - serializedName: "value", + serializedName: "properties.isInvoiced", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ChargeSummary" - } - } + name: "Boolean" } } } @@ -1752,22 +2944,131 @@ export const Operation: msRest.CompositeMapper = { } }; -export const ResourceAttributes: msRest.CompositeMapper = { - serializedName: "ResourceAttributes", +export const EventSummary: msRest.CompositeMapper = { + serializedName: "EventSummary", type: { name: "Composite", - className: "ResourceAttributes", + className: "EventSummary", modelProperties: { - location: { + ...Resource.type.modelProperties, + transactionDate: { readOnly: true, - serializedName: "location", + serializedName: "properties.transactionDate", + type: { + name: "DateTime" + } + }, + description: { + readOnly: true, + serializedName: "properties.description", type: { name: "String" } }, - sku: { + newCredit: { readOnly: true, - serializedName: "sku", + serializedName: "properties.newCredit", + type: { + name: "Composite", + className: "Amount" + } + }, + adjustments: { + readOnly: true, + serializedName: "properties.adjustments", + type: { + name: "Composite", + className: "Amount" + } + }, + creditExpired: { + readOnly: true, + serializedName: "properties.creditExpired", + type: { + name: "Composite", + className: "Amount" + } + }, + charges: { + readOnly: true, + serializedName: "properties.charges", + type: { + name: "Composite", + className: "Amount" + } + }, + closedBalance: { + readOnly: true, + serializedName: "properties.closedBalance", + type: { + name: "Composite", + className: "Amount" + } + }, + eventType: { + serializedName: "properties.eventType", + type: { + name: "String" + } + }, + invoiceNumber: { + readOnly: true, + serializedName: "properties.invoiceNumber", + type: { + name: "String" + } + } + } + } +}; + +export const LotSummary: msRest.CompositeMapper = { + serializedName: "LotSummary", + type: { + name: "Composite", + className: "LotSummary", + modelProperties: { + ...Resource.type.modelProperties, + originalAmount: { + readOnly: true, + serializedName: "properties.originalAmount", + type: { + name: "Composite", + className: "Amount" + } + }, + closedBalance: { + readOnly: true, + serializedName: "properties.closedBalance", + type: { + name: "Composite", + className: "Amount" + } + }, + source: { + readOnly: true, + serializedName: "properties.source", + type: { + name: "String" + } + }, + startDate: { + readOnly: true, + serializedName: "properties.startDate", + type: { + name: "DateTime" + } + }, + expirationDate: { + readOnly: true, + serializedName: "properties.expirationDate", + type: { + name: "DateTime" + } + }, + poNumber: { + readOnly: true, + serializedName: "properties.poNumber", type: { name: "String" } @@ -1776,12 +3077,91 @@ export const ResourceAttributes: msRest.CompositeMapper = { } }; -export const QueryOptions: msRest.CompositeMapper = { +export const CreditBalanceSummary: msRest.CompositeMapper = { + serializedName: "CreditBalanceSummary", + type: { + name: "Composite", + className: "CreditBalanceSummary", + modelProperties: { + estimatedBalance: { + readOnly: true, + serializedName: "estimatedBalance", + type: { + name: "Composite", + className: "Amount" + } + }, + currentBalance: { + readOnly: true, + serializedName: "currentBalance", + type: { + name: "Composite", + className: "Amount" + } + } + } + } +}; + +export const CreditSummary: msRest.CompositeMapper = { + serializedName: "CreditSummary", + type: { + name: "Composite", + className: "CreditSummary", + modelProperties: { + ...Resource.type.modelProperties, + balanceSummary: { + readOnly: true, + serializedName: "properties.balanceSummary", + type: { + name: "Composite", + className: "CreditBalanceSummary" + } + }, + pendingCreditAdjustments: { + readOnly: true, + serializedName: "properties.pendingCreditAdjustments", + type: { + name: "Composite", + className: "Amount" + } + }, + expiredCredit: { + readOnly: true, + serializedName: "properties.expiredCredit", + type: { + name: "Composite", + className: "Amount" + } + }, + pendingEligibleCharges: { + readOnly: true, + serializedName: "properties.pendingEligibleCharges", + type: { + name: "Composite", + className: "Amount" + } + } + } + } +}; + +export const ResourceAttributes: msRest.CompositeMapper = { + serializedName: "ResourceAttributes", type: { name: "Composite", - className: "QueryOptions", + className: "ResourceAttributes", modelProperties: { - apply: { + location: { + readOnly: true, + serializedName: "location", + type: { + name: "String" + } + }, + sku: { + readOnly: true, + serializedName: "sku", type: { name: "String" } @@ -1850,6 +3230,36 @@ export const MarketplacesListResult: msRest.CompositeMapper = { } }; +export const BudgetsListResult: msRest.CompositeMapper = { + serializedName: "BudgetsListResult", + type: { + name: "Composite", + className: "BudgetsListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Budget" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + export const ReservationSummariesListResult: msRest.CompositeMapper = { serializedName: "ReservationSummariesListResult", type: { @@ -1940,11 +3350,11 @@ export const ReservationRecommendationsListResult: msRest.CompositeMapper = { } }; -export const BudgetsListResult: msRest.CompositeMapper = { - serializedName: "BudgetsListResult", +export const ReservationTransactionsListResult: msRest.CompositeMapper = { + serializedName: "ReservationTransactionsListResult", type: { name: "Composite", - className: "BudgetsListResult", + className: "ReservationTransactionsListResult", modelProperties: { value: { readOnly: true, @@ -1954,7 +3364,7 @@ export const BudgetsListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "Budget" + className: "ReservationTransaction" } } } @@ -2022,3 +3432,76 @@ export const OperationListResult: msRest.CompositeMapper = { } } }; + +export const Events: msRest.CompositeMapper = { + serializedName: "Events", + type: { + name: "Composite", + className: "Events", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EventSummary" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const Lots: msRest.CompositeMapper = { + serializedName: "Lots", + type: { + name: "Composite", + className: "Lots", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "LotSummary" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const discriminators = { + 'BaseResource.UsageDetail' : UsageDetail, + 'BaseResource.legacy' : LegacyUsageDetail, + 'BaseResource.modern' : ModernUsageDetail, + 'ReservationRecommendation' : ReservationRecommendation, + 'ReservationRecommendation.legacy' : LegacyReservationRecommendation, + 'ReservationRecommendation.modern' : ModernReservationRecommendation, + 'BaseResource.ChargeSummary' : ChargeSummary, + 'BaseResource.legacy' : LegacyChargeSummary, + 'BaseResource.modern' : ModernChargeSummary + +}; diff --git a/sdk/consumption/arm-consumption/src/models/marketplacesMappers.ts b/sdk/consumption/arm-consumption/src/models/marketplacesMappers.ts index 785130c039b3..a3c09435bee6 100644 --- a/sdk/consumption/arm-consumption/src/models/marketplacesMappers.ts +++ b/sdk/consumption/arm-consumption/src/models/marketplacesMappers.ts @@ -1,40 +1,49 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - MarketplacesListResult, - Marketplace, - Resource, - BaseResource, - ErrorResponse, - ErrorDetails, - UsageDetail, - MeterDetails, + discriminators, + Amount, Balance, - BalancePropertiesNewPurchasesDetailsItem, BalancePropertiesAdjustmentDetailsItem, - ReservationSummary, - ReservationDetail, - PriceSheetResult, - PriceSheetProperties, + BalancePropertiesNewPurchasesDetailsItem, + BaseResource, + Budget, + BudgetTimePeriod, + ChargeSummary, + CreditBalanceSummary, + CreditSummary, + CurrentSpend, + ErrorDetails, + ErrorResponse, + EventSummary, + Filters, Forecast, ForecastPropertiesConfidenceLevelsItem, + LegacyChargeSummary, + LegacyUsageDetail, + LotSummary, ManagementGroupAggregatedCostResult, - ChargeSummary, + Marketplace, + MarketplacesListResult, + MeterDetails, + MeterDetailsResponse, + ModernChargeSummary, + ModernUsageDetail, + Notification, + PriceSheetProperties, + PriceSheetResult, ProxyResource, - TagsResult, + ReservationDetail, + ReservationSummary, + ReservationTransaction, + Resource, Tag, - Budget, - BudgetTimePeriod, - Filters, - CurrentSpend, - Notification + TagsResult, + UsageDetail } from "../models/mappers"; - diff --git a/sdk/consumption/arm-consumption/src/models/operationsMappers.ts b/sdk/consumption/arm-consumption/src/models/operationsMappers.ts index 22478f5be09f..f9b7a13a8e9d 100644 --- a/sdk/consumption/arm-consumption/src/models/operationsMappers.ts +++ b/sdk/consumption/arm-consumption/src/models/operationsMappers.ts @@ -1,18 +1,16 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - OperationListResult, + discriminators, + ErrorDetails, + ErrorResponse, Operation, OperationDisplay, - ErrorResponse, - ErrorDetails + OperationListResult } from "../models/mappers"; - diff --git a/sdk/consumption/arm-consumption/src/models/parameters.ts b/sdk/consumption/arm-consumption/src/models/parameters.ts index 307ad6cae657..39515bf53cab 100644 --- a/sdk/consumption/arm-consumption/src/models/parameters.ts +++ b/sdk/consumption/arm-consumption/src/models/parameters.ts @@ -33,7 +33,6 @@ export const apiVersion: msRest.OperationQueryParameter = { export const apply: msRest.OperationQueryParameter = { parameterPath: [ "options", - "queryOptions", "apply" ], mapper: { @@ -63,6 +62,16 @@ export const billingPeriodName: msRest.OperationURLParameter = { } } }; +export const billingProfileId: msRest.OperationURLParameter = { + parameterPath: "billingProfileId", + mapper: { + required: true, + serializedName: "billingProfileId", + type: { + name: "String" + } + } +}; export const budgetName: msRest.OperationURLParameter = { parameterPath: "budgetName", mapper: { @@ -73,21 +82,23 @@ export const budgetName: msRest.OperationURLParameter = { } } }; -export const departmentId: msRest.OperationURLParameter = { - parameterPath: "departmentId", +export const endDate0: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "endDate" + ], mapper: { - required: true, - serializedName: "departmentId", + serializedName: "endDate", type: { name: "String" } } }; -export const enrollmentAccountId: msRest.OperationURLParameter = { - parameterPath: "enrollmentAccountId", +export const endDate1: msRest.OperationQueryParameter = { + parameterPath: "endDate", mapper: { required: true, - serializedName: "enrollmentAccountId", + serializedName: "endDate", type: { name: "String" } @@ -147,6 +158,18 @@ export const managementGroupId: msRest.OperationURLParameter = { } } }; +export const metric: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "metric" + ], + mapper: { + serializedName: "metric", + type: { + name: "String" + } + } +}; export const nextPageLink: msRest.OperationURLParameter = { parameterPath: "nextPageLink", mapper: { @@ -178,15 +201,16 @@ export const reservationOrderId: msRest.OperationURLParameter = { } } }; -export const resourceGroupName: msRest.OperationURLParameter = { - parameterPath: "resourceGroupName", +export const scope: msRest.OperationURLParameter = { + parameterPath: "scope", mapper: { required: true, - serializedName: "resourceGroupName", + serializedName: "scope", type: { name: "String" } - } + }, + skipEncoding: true }; export const skiptoken: msRest.OperationQueryParameter = { parameterPath: [ @@ -200,6 +224,28 @@ export const skiptoken: msRest.OperationQueryParameter = { } } }; +export const startDate0: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "startDate" + ], + mapper: { + serializedName: "startDate", + type: { + name: "String" + } + } +}; +export const startDate1: msRest.OperationQueryParameter = { + parameterPath: "startDate", + mapper: { + required: true, + serializedName: "startDate", + type: { + name: "String" + } + } +}; export const subscriptionId: msRest.OperationURLParameter = { parameterPath: "subscriptionId", mapper: { diff --git a/sdk/consumption/arm-consumption/src/models/priceSheetMappers.ts b/sdk/consumption/arm-consumption/src/models/priceSheetMappers.ts index 4e3fbf038eea..0a93a1d28e13 100644 --- a/sdk/consumption/arm-consumption/src/models/priceSheetMappers.ts +++ b/sdk/consumption/arm-consumption/src/models/priceSheetMappers.ts @@ -1,39 +1,48 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - PriceSheetResult, - Resource, - BaseResource, - PriceSheetProperties, - MeterDetails, - ErrorResponse, - ErrorDetails, - UsageDetail, - Marketplace, + discriminators, + Amount, Balance, - BalancePropertiesNewPurchasesDetailsItem, BalancePropertiesAdjustmentDetailsItem, - ReservationSummary, - ReservationDetail, + BalancePropertiesNewPurchasesDetailsItem, + BaseResource, + Budget, + BudgetTimePeriod, + ChargeSummary, + CreditBalanceSummary, + CreditSummary, + CurrentSpend, + ErrorDetails, + ErrorResponse, + EventSummary, + Filters, Forecast, ForecastPropertiesConfidenceLevelsItem, + LegacyChargeSummary, + LegacyUsageDetail, + LotSummary, ManagementGroupAggregatedCostResult, - ChargeSummary, + Marketplace, + MeterDetails, + MeterDetailsResponse, + ModernChargeSummary, + ModernUsageDetail, + Notification, + PriceSheetProperties, + PriceSheetResult, ProxyResource, - TagsResult, + ReservationDetail, + ReservationSummary, + ReservationTransaction, + Resource, Tag, - Budget, - BudgetTimePeriod, - Filters, - CurrentSpend, - Notification + TagsResult, + UsageDetail } from "../models/mappers"; - diff --git a/sdk/consumption/arm-consumption/src/models/reservationRecommendationsMappers.ts b/sdk/consumption/arm-consumption/src/models/reservationRecommendationsMappers.ts index 14979c923c67..67e5ef7423bc 100644 --- a/sdk/consumption/arm-consumption/src/models/reservationRecommendationsMappers.ts +++ b/sdk/consumption/arm-consumption/src/models/reservationRecommendationsMappers.ts @@ -1,17 +1,19 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - ReservationRecommendationsListResult, - ReservationRecommendation, + discriminators, + Amount, + ErrorDetails, ErrorResponse, - ErrorDetails + LegacyReservationRecommendation, + ModernReservationRecommendation, + ReservationRecommendation, + ReservationRecommendationsListResult, + SkuProperty } from "../models/mappers"; - diff --git a/sdk/consumption/arm-consumption/src/models/reservationTransactionsMappers.ts b/sdk/consumption/arm-consumption/src/models/reservationTransactionsMappers.ts new file mode 100644 index 000000000000..32fd7c3079be --- /dev/null +++ b/sdk/consumption/arm-consumption/src/models/reservationTransactionsMappers.ts @@ -0,0 +1,49 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + Amount, + Balance, + BalancePropertiesAdjustmentDetailsItem, + BalancePropertiesNewPurchasesDetailsItem, + BaseResource, + Budget, + BudgetTimePeriod, + ChargeSummary, + CreditBalanceSummary, + CreditSummary, + CurrentSpend, + ErrorDetails, + ErrorResponse, + EventSummary, + Filters, + Forecast, + ForecastPropertiesConfidenceLevelsItem, + LegacyChargeSummary, + LegacyUsageDetail, + LotSummary, + ManagementGroupAggregatedCostResult, + Marketplace, + MeterDetails, + MeterDetailsResponse, + ModernChargeSummary, + ModernUsageDetail, + Notification, + PriceSheetProperties, + PriceSheetResult, + ProxyResource, + ReservationDetail, + ReservationSummary, + ReservationTransaction, + ReservationTransactionsListResult, + Resource, + Tag, + TagsResult, + UsageDetail +} from "../models/mappers"; diff --git a/sdk/consumption/arm-consumption/src/models/reservationsDetailsMappers.ts b/sdk/consumption/arm-consumption/src/models/reservationsDetailsMappers.ts index 419858b006e4..763c35a926a6 100644 --- a/sdk/consumption/arm-consumption/src/models/reservationsDetailsMappers.ts +++ b/sdk/consumption/arm-consumption/src/models/reservationsDetailsMappers.ts @@ -1,40 +1,49 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - ReservationDetailsListResult, - ReservationDetail, - Resource, - BaseResource, - ErrorResponse, - ErrorDetails, - UsageDetail, - MeterDetails, - Marketplace, + discriminators, + Amount, Balance, - BalancePropertiesNewPurchasesDetailsItem, BalancePropertiesAdjustmentDetailsItem, - ReservationSummary, - PriceSheetResult, - PriceSheetProperties, + BalancePropertiesNewPurchasesDetailsItem, + BaseResource, + Budget, + BudgetTimePeriod, + ChargeSummary, + CreditBalanceSummary, + CreditSummary, + CurrentSpend, + ErrorDetails, + ErrorResponse, + EventSummary, + Filters, Forecast, ForecastPropertiesConfidenceLevelsItem, + LegacyChargeSummary, + LegacyUsageDetail, + LotSummary, ManagementGroupAggregatedCostResult, - ChargeSummary, + Marketplace, + MeterDetails, + MeterDetailsResponse, + ModernChargeSummary, + ModernUsageDetail, + Notification, + PriceSheetProperties, + PriceSheetResult, ProxyResource, - TagsResult, + ReservationDetail, + ReservationDetailsListResult, + ReservationSummary, + ReservationTransaction, + Resource, Tag, - Budget, - BudgetTimePeriod, - Filters, - CurrentSpend, - Notification + TagsResult, + UsageDetail } from "../models/mappers"; - diff --git a/sdk/consumption/arm-consumption/src/models/reservationsSummariesMappers.ts b/sdk/consumption/arm-consumption/src/models/reservationsSummariesMappers.ts index 0017619e2588..35a147d91fc4 100644 --- a/sdk/consumption/arm-consumption/src/models/reservationsSummariesMappers.ts +++ b/sdk/consumption/arm-consumption/src/models/reservationsSummariesMappers.ts @@ -1,40 +1,49 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - ReservationSummariesListResult, - ReservationSummary, - Resource, - BaseResource, - ErrorResponse, - ErrorDetails, - UsageDetail, - MeterDetails, - Marketplace, + discriminators, + Amount, Balance, - BalancePropertiesNewPurchasesDetailsItem, BalancePropertiesAdjustmentDetailsItem, - ReservationDetail, - PriceSheetResult, - PriceSheetProperties, + BalancePropertiesNewPurchasesDetailsItem, + BaseResource, + Budget, + BudgetTimePeriod, + ChargeSummary, + CreditBalanceSummary, + CreditSummary, + CurrentSpend, + ErrorDetails, + ErrorResponse, + EventSummary, + Filters, Forecast, ForecastPropertiesConfidenceLevelsItem, + LegacyChargeSummary, + LegacyUsageDetail, + LotSummary, ManagementGroupAggregatedCostResult, - ChargeSummary, + Marketplace, + MeterDetails, + MeterDetailsResponse, + ModernChargeSummary, + ModernUsageDetail, + Notification, + PriceSheetProperties, + PriceSheetResult, ProxyResource, - TagsResult, + ReservationDetail, + ReservationSummariesListResult, + ReservationSummary, + ReservationTransaction, + Resource, Tag, - Budget, - BudgetTimePeriod, - Filters, - CurrentSpend, - Notification + TagsResult, + UsageDetail } from "../models/mappers"; - diff --git a/sdk/consumption/arm-consumption/src/models/tagsMappers.ts b/sdk/consumption/arm-consumption/src/models/tagsMappers.ts index 6f5638472fd8..0a93a1d28e13 100644 --- a/sdk/consumption/arm-consumption/src/models/tagsMappers.ts +++ b/sdk/consumption/arm-consumption/src/models/tagsMappers.ts @@ -1,39 +1,48 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - TagsResult, - ProxyResource, + discriminators, + Amount, + Balance, + BalancePropertiesAdjustmentDetailsItem, + BalancePropertiesNewPurchasesDetailsItem, BaseResource, - Tag, - ErrorResponse, - ErrorDetails, Budget, BudgetTimePeriod, - Filters, + ChargeSummary, + CreditBalanceSummary, + CreditSummary, CurrentSpend, - Notification, - Resource, - UsageDetail, - MeterDetails, - Marketplace, - Balance, - BalancePropertiesNewPurchasesDetailsItem, - BalancePropertiesAdjustmentDetailsItem, - ReservationSummary, - ReservationDetail, - PriceSheetResult, - PriceSheetProperties, + ErrorDetails, + ErrorResponse, + EventSummary, + Filters, Forecast, ForecastPropertiesConfidenceLevelsItem, + LegacyChargeSummary, + LegacyUsageDetail, + LotSummary, ManagementGroupAggregatedCostResult, - ChargeSummary + Marketplace, + MeterDetails, + MeterDetailsResponse, + ModernChargeSummary, + ModernUsageDetail, + Notification, + PriceSheetProperties, + PriceSheetResult, + ProxyResource, + ReservationDetail, + ReservationSummary, + ReservationTransaction, + Resource, + Tag, + TagsResult, + UsageDetail } from "../models/mappers"; - diff --git a/sdk/consumption/arm-consumption/src/models/usageDetailsMappers.ts b/sdk/consumption/arm-consumption/src/models/usageDetailsMappers.ts index bae331383d71..720f67d33b8f 100644 --- a/sdk/consumption/arm-consumption/src/models/usageDetailsMappers.ts +++ b/sdk/consumption/arm-consumption/src/models/usageDetailsMappers.ts @@ -1,40 +1,49 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - UsageDetailsListResult, - UsageDetail, - Resource, - BaseResource, - MeterDetails, - ErrorResponse, - ErrorDetails, - Marketplace, + discriminators, + Amount, Balance, - BalancePropertiesNewPurchasesDetailsItem, BalancePropertiesAdjustmentDetailsItem, - ReservationSummary, - ReservationDetail, - PriceSheetResult, - PriceSheetProperties, + BalancePropertiesNewPurchasesDetailsItem, + BaseResource, + Budget, + BudgetTimePeriod, + ChargeSummary, + CreditBalanceSummary, + CreditSummary, + CurrentSpend, + ErrorDetails, + ErrorResponse, + EventSummary, + Filters, Forecast, ForecastPropertiesConfidenceLevelsItem, + LegacyChargeSummary, + LegacyUsageDetail, + LotSummary, ManagementGroupAggregatedCostResult, - ChargeSummary, + Marketplace, + MeterDetails, + MeterDetailsResponse, + ModernChargeSummary, + ModernUsageDetail, + Notification, + PriceSheetProperties, + PriceSheetResult, ProxyResource, - TagsResult, + ReservationDetail, + ReservationSummary, + ReservationTransaction, + Resource, Tag, - Budget, - BudgetTimePeriod, - Filters, - CurrentSpend, - Notification + TagsResult, + UsageDetail, + UsageDetailsListResult } from "../models/mappers"; - diff --git a/sdk/consumption/arm-consumption/src/operations/budgets.ts b/sdk/consumption/arm-consumption/src/operations/budgets.ts index ea97f7785722..445f41c5ee03 100644 --- a/sdk/consumption/arm-consumption/src/operations/budgets.ts +++ b/sdk/consumption/arm-consumption/src/operations/budgets.ts @@ -27,23 +27,66 @@ export class Budgets { } /** - * Lists all budgets for a subscription. + * Lists all budgets for the defined scope. + * @param scope The scope associated with budget operations. This includes + * '/subscriptions/{subscriptionId}/' for subscription scope, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for + * Department scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + * for EnrollmentAccount scope, + * '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group + * scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + * for billingProfile scope, + * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' + * for invoiceSection scope. * @param [options] The optional parameters * @returns Promise */ - list(options?: msRest.RequestOptionsBase): Promise; + list(scope: string, options?: msRest.RequestOptionsBase): Promise; /** + * @param scope The scope associated with budget operations. This includes + * '/subscriptions/{subscriptionId}/' for subscription scope, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for + * Department scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + * for EnrollmentAccount scope, + * '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group + * scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + * for billingProfile scope, + * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' + * for invoiceSection scope. * @param callback The callback */ - list(callback: msRest.ServiceCallback): void; + list(scope: string, callback: msRest.ServiceCallback): void; /** + * @param scope The scope associated with budget operations. This includes + * '/subscriptions/{subscriptionId}/' for subscription scope, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for + * Department scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + * for EnrollmentAccount scope, + * '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group + * scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + * for billingProfile scope, + * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' + * for invoiceSection scope. * @param options The optional parameters * @param callback The callback */ - list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + list(scope: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(scope: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { + scope, options }, listOperationSpec, @@ -51,54 +94,69 @@ export class Budgets { } /** - * Lists all budgets for a resource group under a subscription. - * @param resourceGroupName Azure Resource Group Name. - * @param [options] The optional parameters - * @returns Promise - */ - listByResourceGroupName(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName Azure Resource Group Name. - * @param callback The callback - */ - listByResourceGroupName(resourceGroupName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName Azure Resource Group Name. - * @param options The optional parameters - * @param callback The callback - */ - listByResourceGroupName(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByResourceGroupName(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - options - }, - listByResourceGroupNameOperationSpec, - callback) as Promise; - } - - /** - * Gets the budget for a subscription by budget name. + * Gets the budget for the scope by budget name. + * @param scope The scope associated with budget operations. This includes + * '/subscriptions/{subscriptionId}/' for subscription scope, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for + * Department scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + * for EnrollmentAccount scope, + * '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group + * scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + * for billingProfile scope, + * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' + * for invoiceSection scope. * @param budgetName Budget Name. * @param [options] The optional parameters * @returns Promise */ - get(budgetName: string, options?: msRest.RequestOptionsBase): Promise; + get(scope: string, budgetName: string, options?: msRest.RequestOptionsBase): Promise; /** + * @param scope The scope associated with budget operations. This includes + * '/subscriptions/{subscriptionId}/' for subscription scope, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for + * Department scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + * for EnrollmentAccount scope, + * '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group + * scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + * for billingProfile scope, + * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' + * for invoiceSection scope. * @param budgetName Budget Name. * @param callback The callback */ - get(budgetName: string, callback: msRest.ServiceCallback): void; + get(scope: string, budgetName: string, callback: msRest.ServiceCallback): void; /** + * @param scope The scope associated with budget operations. This includes + * '/subscriptions/{subscriptionId}/' for subscription scope, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for + * Department scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + * for EnrollmentAccount scope, + * '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group + * scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + * for billingProfile scope, + * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' + * for invoiceSection scope. * @param budgetName Budget Name. * @param options The optional parameters * @param callback The callback */ - get(budgetName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(budgetName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get(scope: string, budgetName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(scope: string, budgetName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { + scope, budgetName, options }, @@ -110,28 +168,71 @@ export class Budgets { * The operation to create or update a budget. Update operation requires latest eTag to be set in * the request mandatorily. You may obtain the latest eTag by performing a get operation. Create * operation does not require eTag. + * @param scope The scope associated with budget operations. This includes + * '/subscriptions/{subscriptionId}/' for subscription scope, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for + * Department scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + * for EnrollmentAccount scope, + * '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group + * scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + * for billingProfile scope, + * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' + * for invoiceSection scope. * @param budgetName Budget Name. * @param parameters Parameters supplied to the Create Budget operation. * @param [options] The optional parameters * @returns Promise */ - createOrUpdate(budgetName: string, parameters: Models.Budget, options?: msRest.RequestOptionsBase): Promise; + createOrUpdate(scope: string, budgetName: string, parameters: Models.Budget, options?: msRest.RequestOptionsBase): Promise; /** + * @param scope The scope associated with budget operations. This includes + * '/subscriptions/{subscriptionId}/' for subscription scope, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for + * Department scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + * for EnrollmentAccount scope, + * '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group + * scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + * for billingProfile scope, + * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' + * for invoiceSection scope. * @param budgetName Budget Name. * @param parameters Parameters supplied to the Create Budget operation. * @param callback The callback */ - createOrUpdate(budgetName: string, parameters: Models.Budget, callback: msRest.ServiceCallback): void; + createOrUpdate(scope: string, budgetName: string, parameters: Models.Budget, callback: msRest.ServiceCallback): void; /** + * @param scope The scope associated with budget operations. This includes + * '/subscriptions/{subscriptionId}/' for subscription scope, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for + * Department scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + * for EnrollmentAccount scope, + * '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group + * scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + * for billingProfile scope, + * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' + * for invoiceSection scope. * @param budgetName Budget Name. * @param parameters Parameters supplied to the Create Budget operation. * @param options The optional parameters * @param callback The callback */ - createOrUpdate(budgetName: string, parameters: Models.Budget, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createOrUpdate(budgetName: string, parameters: Models.Budget, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + createOrUpdate(scope: string, budgetName: string, parameters: Models.Budget, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(scope: string, budgetName: string, parameters: Models.Budget, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { + scope, budgetName, parameters, options @@ -142,25 +243,68 @@ export class Budgets { /** * The operation to delete a budget. + * @param scope The scope associated with budget operations. This includes + * '/subscriptions/{subscriptionId}/' for subscription scope, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for + * Department scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + * for EnrollmentAccount scope, + * '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group + * scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + * for billingProfile scope, + * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' + * for invoiceSection scope. * @param budgetName Budget Name. * @param [options] The optional parameters * @returns Promise */ - deleteMethod(budgetName: string, options?: msRest.RequestOptionsBase): Promise; + deleteMethod(scope: string, budgetName: string, options?: msRest.RequestOptionsBase): Promise; /** + * @param scope The scope associated with budget operations. This includes + * '/subscriptions/{subscriptionId}/' for subscription scope, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for + * Department scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + * for EnrollmentAccount scope, + * '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group + * scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + * for billingProfile scope, + * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' + * for invoiceSection scope. * @param budgetName Budget Name. * @param callback The callback */ - deleteMethod(budgetName: string, callback: msRest.ServiceCallback): void; + deleteMethod(scope: string, budgetName: string, callback: msRest.ServiceCallback): void; /** + * @param scope The scope associated with budget operations. This includes + * '/subscriptions/{subscriptionId}/' for subscription scope, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for + * Department scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + * for EnrollmentAccount scope, + * '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group + * scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + * for billingProfile scope, + * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' + * for invoiceSection scope. * @param budgetName Budget Name. * @param options The optional parameters * @param callback The callback */ - deleteMethod(budgetName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(budgetName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + deleteMethod(scope: string, budgetName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(scope: string, budgetName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { + scope, budgetName, options }, @@ -169,109 +313,7 @@ export class Budgets { } /** - * Gets the budget for a resource group under a subscription by budget name. - * @param resourceGroupName Azure Resource Group Name. - * @param budgetName Budget Name. - * @param [options] The optional parameters - * @returns Promise - */ - getByResourceGroupName(resourceGroupName: string, budgetName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName Azure Resource Group Name. - * @param budgetName Budget Name. - * @param callback The callback - */ - getByResourceGroupName(resourceGroupName: string, budgetName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName Azure Resource Group Name. - * @param budgetName Budget Name. - * @param options The optional parameters - * @param callback The callback - */ - getByResourceGroupName(resourceGroupName: string, budgetName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getByResourceGroupName(resourceGroupName: string, budgetName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - budgetName, - options - }, - getByResourceGroupNameOperationSpec, - callback) as Promise; - } - - /** - * The operation to create or update a budget. Update operation requires latest eTag to be set in - * the request mandatorily. You may obtain the latest eTag by performing a get operation. Create - * operation does not require eTag. - * @param resourceGroupName Azure Resource Group Name. - * @param budgetName Budget Name. - * @param parameters Parameters supplied to the Create Budget operation. - * @param [options] The optional parameters - * @returns Promise - */ - createOrUpdateByResourceGroupName(resourceGroupName: string, budgetName: string, parameters: Models.Budget, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName Azure Resource Group Name. - * @param budgetName Budget Name. - * @param parameters Parameters supplied to the Create Budget operation. - * @param callback The callback - */ - createOrUpdateByResourceGroupName(resourceGroupName: string, budgetName: string, parameters: Models.Budget, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName Azure Resource Group Name. - * @param budgetName Budget Name. - * @param parameters Parameters supplied to the Create Budget operation. - * @param options The optional parameters - * @param callback The callback - */ - createOrUpdateByResourceGroupName(resourceGroupName: string, budgetName: string, parameters: Models.Budget, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createOrUpdateByResourceGroupName(resourceGroupName: string, budgetName: string, parameters: Models.Budget, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - budgetName, - parameters, - options - }, - createOrUpdateByResourceGroupNameOperationSpec, - callback) as Promise; - } - - /** - * The operation to delete a budget. - * @param resourceGroupName Azure Resource Group Name. - * @param budgetName Budget Name. - * @param [options] The optional parameters - * @returns Promise - */ - deleteByResourceGroupName(resourceGroupName: string, budgetName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName Azure Resource Group Name. - * @param budgetName Budget Name. - * @param callback The callback - */ - deleteByResourceGroupName(resourceGroupName: string, budgetName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName Azure Resource Group Name. - * @param budgetName Budget Name. - * @param options The optional parameters - * @param callback The callback - */ - deleteByResourceGroupName(resourceGroupName: string, budgetName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteByResourceGroupName(resourceGroupName: string, budgetName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - budgetName, - options - }, - deleteByResourceGroupNameOperationSpec, - callback); - } - - /** - * Lists all budgets for a subscription. + * Lists all budgets for the defined scope. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise @@ -297,67 +339,15 @@ export class Budgets { listNextOperationSpec, callback) as Promise; } - - /** - * Lists all budgets for a resource group under a subscription. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByResourceGroupNameNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByResourceGroupNameNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback - */ - listByResourceGroupNameNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByResourceGroupNameNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByResourceGroupNameNextOperationSpec, - callback) as Promise; - } } // Operation Specifications const serializer = new msRest.Serializer(Mappers); const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Consumption/budgets", + path: "{scope}/providers/Microsoft.Consumption/budgets", urlParameters: [ - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.BudgetsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listByResourceGroupNameOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Consumption/budgets", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName + Parameters.scope ], queryParameters: [ Parameters.apiVersion @@ -378,9 +368,9 @@ const listByResourceGroupNameOperationSpec: msRest.OperationSpec = { const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Consumption/budgets/{budgetName}", + path: "{scope}/providers/Microsoft.Consumption/budgets/{budgetName}", urlParameters: [ - Parameters.subscriptionId, + Parameters.scope, Parameters.budgetName ], queryParameters: [ @@ -402,9 +392,9 @@ const getOperationSpec: msRest.OperationSpec = { const createOrUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Consumption/budgets/{budgetName}", + path: "{scope}/providers/Microsoft.Consumption/budgets/{budgetName}", urlParameters: [ - Parameters.subscriptionId, + Parameters.scope, Parameters.budgetName ], queryParameters: [ @@ -436,92 +426,9 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { const deleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Consumption/budgets/{budgetName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.budgetName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const getByResourceGroupNameOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Consumption/budgets/{budgetName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.budgetName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.Budget - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const createOrUpdateByResourceGroupNameOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Consumption/budgets/{budgetName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.budgetName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.Budget, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.Budget - }, - 201: { - bodyMapper: Mappers.Budget - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const deleteByResourceGroupNameOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Consumption/budgets/{budgetName}", + path: "{scope}/providers/Microsoft.Consumption/budgets/{budgetName}", urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, + Parameters.scope, Parameters.budgetName ], queryParameters: [ @@ -559,24 +466,3 @@ const listNextOperationSpec: msRest.OperationSpec = { }, serializer }; - -const listByResourceGroupNameNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.BudgetsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; diff --git a/sdk/consumption/arm-consumption/src/operations/charges.ts b/sdk/consumption/arm-consumption/src/operations/charges.ts index 8ba1f7efd45a..a4bfed7b8af9 100644 --- a/sdk/consumption/arm-consumption/src/operations/charges.ts +++ b/sdk/consumption/arm-consumption/src/operations/charges.ts @@ -27,205 +27,93 @@ export class Charges { } /** - * Lists the charges by enrollmentAccountId. - * @param billingAccountId BillingAccount ID - * @param enrollmentAccountId EnrollmentAccount ID + * Lists the charges based for the defined scope. + * @param scope The scope associated with charges operations. This includes + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for + * Department scope, and + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + * for EnrollmentAccount scope. For department and enrollment accounts, you can also add billing + * period to the scope using '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For + * e.g. to specify billing period at department scope use + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. + * Also, Modern Commerce Account scopes are + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for billingAccount scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + * for billingProfile scope, + * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + * for invoiceSection scope, and + * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific + * for partners. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - listByEnrollmentAccount(billingAccountId: string, enrollmentAccountId: string, options?: Models.ChargesListByEnrollmentAccountOptionalParams): Promise; + list(scope: string, options?: Models.ChargesListOptionalParams): Promise; /** - * @param billingAccountId BillingAccount ID - * @param enrollmentAccountId EnrollmentAccount ID + * @param scope The scope associated with charges operations. This includes + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for + * Department scope, and + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + * for EnrollmentAccount scope. For department and enrollment accounts, you can also add billing + * period to the scope using '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For + * e.g. to specify billing period at department scope use + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. + * Also, Modern Commerce Account scopes are + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for billingAccount scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + * for billingProfile scope, + * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + * for invoiceSection scope, and + * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific + * for partners. * @param callback The callback */ - listByEnrollmentAccount(billingAccountId: string, enrollmentAccountId: string, callback: msRest.ServiceCallback): void; + list(scope: string, callback: msRest.ServiceCallback): void; /** - * @param billingAccountId BillingAccount ID - * @param enrollmentAccountId EnrollmentAccount ID + * @param scope The scope associated with charges operations. This includes + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for + * Department scope, and + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + * for EnrollmentAccount scope. For department and enrollment accounts, you can also add billing + * period to the scope using '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For + * e.g. to specify billing period at department scope use + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. + * Also, Modern Commerce Account scopes are + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for billingAccount scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + * for billingProfile scope, + * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + * for invoiceSection scope, and + * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific + * for partners. * @param options The optional parameters * @param callback The callback */ - listByEnrollmentAccount(billingAccountId: string, enrollmentAccountId: string, options: Models.ChargesListByEnrollmentAccountOptionalParams, callback: msRest.ServiceCallback): void; - listByEnrollmentAccount(billingAccountId: string, enrollmentAccountId: string, options?: Models.ChargesListByEnrollmentAccountOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + list(scope: string, options: Models.ChargesListOptionalParams, callback: msRest.ServiceCallback): void; + list(scope: string, options?: Models.ChargesListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { - billingAccountId, - enrollmentAccountId, + scope, options }, - listByEnrollmentAccountOperationSpec, - callback) as Promise; - } - - /** - * Lists the charges based on enrollmentAccountId by billing period. - * @param billingAccountId BillingAccount ID - * @param enrollmentAccountId EnrollmentAccount ID - * @param billingPeriodName Billing Period Name. - * @param [options] The optional parameters - * @returns Promise - */ - listForBillingPeriodByEnrollmentAccount(billingAccountId: string, enrollmentAccountId: string, billingPeriodName: string, options?: Models.ChargesListForBillingPeriodByEnrollmentAccountOptionalParams): Promise; - /** - * @param billingAccountId BillingAccount ID - * @param enrollmentAccountId EnrollmentAccount ID - * @param billingPeriodName Billing Period Name. - * @param callback The callback - */ - listForBillingPeriodByEnrollmentAccount(billingAccountId: string, enrollmentAccountId: string, billingPeriodName: string, callback: msRest.ServiceCallback): void; - /** - * @param billingAccountId BillingAccount ID - * @param enrollmentAccountId EnrollmentAccount ID - * @param billingPeriodName Billing Period Name. - * @param options The optional parameters - * @param callback The callback - */ - listForBillingPeriodByEnrollmentAccount(billingAccountId: string, enrollmentAccountId: string, billingPeriodName: string, options: Models.ChargesListForBillingPeriodByEnrollmentAccountOptionalParams, callback: msRest.ServiceCallback): void; - listForBillingPeriodByEnrollmentAccount(billingAccountId: string, enrollmentAccountId: string, billingPeriodName: string, options?: Models.ChargesListForBillingPeriodByEnrollmentAccountOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - billingAccountId, - enrollmentAccountId, - billingPeriodName, - options - }, - listForBillingPeriodByEnrollmentAccountOperationSpec, - callback) as Promise; - } - - /** - * Lists the charges by departmentId. - * @param billingAccountId BillingAccount ID - * @param departmentId Department ID - * @param [options] The optional parameters - * @returns Promise - */ - listByDepartment(billingAccountId: string, departmentId: string, options?: Models.ChargesListByDepartmentOptionalParams): Promise; - /** - * @param billingAccountId BillingAccount ID - * @param departmentId Department ID - * @param callback The callback - */ - listByDepartment(billingAccountId: string, departmentId: string, callback: msRest.ServiceCallback): void; - /** - * @param billingAccountId BillingAccount ID - * @param departmentId Department ID - * @param options The optional parameters - * @param callback The callback - */ - listByDepartment(billingAccountId: string, departmentId: string, options: Models.ChargesListByDepartmentOptionalParams, callback: msRest.ServiceCallback): void; - listByDepartment(billingAccountId: string, departmentId: string, options?: Models.ChargesListByDepartmentOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - billingAccountId, - departmentId, - options - }, - listByDepartmentOperationSpec, - callback) as Promise; - } - - /** - * Lists the charges based on departmentId by billing period. - * @param billingAccountId BillingAccount ID - * @param departmentId Department ID - * @param billingPeriodName Billing Period Name. - * @param [options] The optional parameters - * @returns Promise - */ - listForBillingPeriodByDepartment(billingAccountId: string, departmentId: string, billingPeriodName: string, options?: Models.ChargesListForBillingPeriodByDepartmentOptionalParams): Promise; - /** - * @param billingAccountId BillingAccount ID - * @param departmentId Department ID - * @param billingPeriodName Billing Period Name. - * @param callback The callback - */ - listForBillingPeriodByDepartment(billingAccountId: string, departmentId: string, billingPeriodName: string, callback: msRest.ServiceCallback): void; - /** - * @param billingAccountId BillingAccount ID - * @param departmentId Department ID - * @param billingPeriodName Billing Period Name. - * @param options The optional parameters - * @param callback The callback - */ - listForBillingPeriodByDepartment(billingAccountId: string, departmentId: string, billingPeriodName: string, options: Models.ChargesListForBillingPeriodByDepartmentOptionalParams, callback: msRest.ServiceCallback): void; - listForBillingPeriodByDepartment(billingAccountId: string, departmentId: string, billingPeriodName: string, options?: Models.ChargesListForBillingPeriodByDepartmentOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - billingAccountId, - departmentId, - billingPeriodName, - options - }, - listForBillingPeriodByDepartmentOperationSpec, - callback) as Promise; + listOperationSpec, + callback) as Promise; } } // Operation Specifications const serializer = new msRest.Serializer(Mappers); -const listByEnrollmentAccountOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}/providers/Microsoft.Consumption/charges", - urlParameters: [ - Parameters.billingAccountId, - Parameters.enrollmentAccountId - ], - queryParameters: [ - Parameters.apiVersion, - Parameters.filter0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.ChargesListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listForBillingPeriodByEnrollmentAccountOperationSpec: msRest.OperationSpec = { +const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/charges", + path: "{scope}/providers/Microsoft.Consumption/charges", urlParameters: [ - Parameters.billingAccountId, - Parameters.enrollmentAccountId, - Parameters.billingPeriodName + Parameters.scope ], queryParameters: [ Parameters.apiVersion, - Parameters.filter0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.ChargeSummary - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listByDepartmentOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}/providers/Microsoft.Consumption/charges", - urlParameters: [ - Parameters.billingAccountId, - Parameters.departmentId - ], - queryParameters: [ - Parameters.apiVersion, - Parameters.filter0 + Parameters.startDate0, + Parameters.endDate0, + Parameters.filter0, + Parameters.apply ], headerParameters: [ Parameters.acceptLanguage @@ -240,29 +128,3 @@ const listByDepartmentOperationSpec: msRest.OperationSpec = { }, serializer }; - -const listForBillingPeriodByDepartmentOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/charges", - urlParameters: [ - Parameters.billingAccountId, - Parameters.departmentId, - Parameters.billingPeriodName - ], - queryParameters: [ - Parameters.apiVersion, - Parameters.filter0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.ChargeSummary - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; diff --git a/sdk/consumption/arm-consumption/src/operations/credits.ts b/sdk/consumption/arm-consumption/src/operations/credits.ts new file mode 100644 index 000000000000..4353ebeb8c5e --- /dev/null +++ b/sdk/consumption/arm-consumption/src/operations/credits.ts @@ -0,0 +1,86 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/creditsMappers"; +import * as Parameters from "../models/parameters"; +import { ConsumptionManagementClientContext } from "../consumptionManagementClientContext"; + +/** Class representing a Credits. */ +export class Credits { + private readonly client: ConsumptionManagementClientContext; + + /** + * Create a Credits. + * @param {ConsumptionManagementClientContext} client Reference to the service client. + */ + constructor(client: ConsumptionManagementClientContext) { + this.client = client; + } + + /** + * The credit summary by billingAccountId and billingProfileId. + * @param billingAccountId BillingAccount ID + * @param billingProfileId Azure Billing Profile ID. + * @param [options] The optional parameters + * @returns Promise + */ + get(billingAccountId: string, billingProfileId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountId BillingAccount ID + * @param billingProfileId Azure Billing Profile ID. + * @param callback The callback + */ + get(billingAccountId: string, billingProfileId: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountId BillingAccount ID + * @param billingProfileId Azure Billing Profile ID. + * @param options The optional parameters + * @param callback The callback + */ + get(billingAccountId: string, billingProfileId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(billingAccountId: string, billingProfileId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountId, + billingProfileId, + options + }, + getOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.Consumption/credits/balanceSummary", + urlParameters: [ + Parameters.billingAccountId, + Parameters.billingProfileId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.CreditSummary + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/consumption/arm-consumption/src/operations/eventsOperations.ts b/sdk/consumption/arm-consumption/src/operations/eventsOperations.ts new file mode 100644 index 000000000000..55557a112194 --- /dev/null +++ b/sdk/consumption/arm-consumption/src/operations/eventsOperations.ts @@ -0,0 +1,145 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/eventsOperationsMappers"; +import * as Parameters from "../models/parameters"; +import { ConsumptionManagementClientContext } from "../consumptionManagementClientContext"; + +/** Class representing a EventsOperations. */ +export class EventsOperations { + private readonly client: ConsumptionManagementClientContext; + + /** + * Create a EventsOperations. + * @param {ConsumptionManagementClientContext} client Reference to the service client. + */ + constructor(client: ConsumptionManagementClientContext) { + this.client = client; + } + + /** + * Lists the events by billingAccountId and billingProfileId for given start and end date. + * @param billingAccountId BillingAccount ID + * @param billingProfileId Azure Billing Profile ID. + * @param startDate Start date + * @param endDate End date + * @param [options] The optional parameters + * @returns Promise + */ + list(billingAccountId: string, billingProfileId: string, startDate: string, endDate: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountId BillingAccount ID + * @param billingProfileId Azure Billing Profile ID. + * @param startDate Start date + * @param endDate End date + * @param callback The callback + */ + list(billingAccountId: string, billingProfileId: string, startDate: string, endDate: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountId BillingAccount ID + * @param billingProfileId Azure Billing Profile ID. + * @param startDate Start date + * @param endDate End date + * @param options The optional parameters + * @param callback The callback + */ + list(billingAccountId: string, billingProfileId: string, startDate: string, endDate: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(billingAccountId: string, billingProfileId: string, startDate: string, endDate: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountId, + billingProfileId, + startDate, + endDate, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Lists the events by billingAccountId and billingProfileId for given start and end date. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.Consumption/events", + urlParameters: [ + Parameters.billingAccountId, + Parameters.billingProfileId + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.startDate1, + Parameters.endDate1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Events + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Events + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/consumption/arm-consumption/src/operations/index.ts b/sdk/consumption/arm-consumption/src/operations/index.ts index 77ea57064d73..51b497eb0d5c 100644 --- a/sdk/consumption/arm-consumption/src/operations/index.ts +++ b/sdk/consumption/arm-consumption/src/operations/index.ts @@ -10,14 +10,18 @@ export * from "./usageDetails"; export * from "./marketplaces"; +export * from "./budgets"; +export * from "./tags"; +export * from "./charges"; export * from "./balances"; export * from "./reservationsSummaries"; export * from "./reservationsDetails"; export * from "./reservationRecommendations"; -export * from "./budgets"; +export * from "./reservationTransactions"; export * from "./priceSheet"; -export * from "./tags"; export * from "./forecasts"; export * from "./operations"; export * from "./aggregatedCost"; -export * from "./charges"; +export * from "./eventsOperations"; +export * from "./lotsOperations"; +export * from "./credits"; diff --git a/sdk/consumption/arm-consumption/src/operations/lotsOperations.ts b/sdk/consumption/arm-consumption/src/operations/lotsOperations.ts new file mode 100644 index 000000000000..500b037b466c --- /dev/null +++ b/sdk/consumption/arm-consumption/src/operations/lotsOperations.ts @@ -0,0 +1,135 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/lotsOperationsMappers"; +import * as Parameters from "../models/parameters"; +import { ConsumptionManagementClientContext } from "../consumptionManagementClientContext"; + +/** Class representing a LotsOperations. */ +export class LotsOperations { + private readonly client: ConsumptionManagementClientContext; + + /** + * Create a LotsOperations. + * @param {ConsumptionManagementClientContext} client Reference to the service client. + */ + constructor(client: ConsumptionManagementClientContext) { + this.client = client; + } + + /** + * Lists the lots by billingAccountId and billingProfileId. + * @param billingAccountId BillingAccount ID + * @param billingProfileId Azure Billing Profile ID. + * @param [options] The optional parameters + * @returns Promise + */ + list(billingAccountId: string, billingProfileId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountId BillingAccount ID + * @param billingProfileId Azure Billing Profile ID. + * @param callback The callback + */ + list(billingAccountId: string, billingProfileId: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountId BillingAccount ID + * @param billingProfileId Azure Billing Profile ID. + * @param options The optional parameters + * @param callback The callback + */ + list(billingAccountId: string, billingProfileId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(billingAccountId: string, billingProfileId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountId, + billingProfileId, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Lists the lots by billingAccountId and billingProfileId. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.Consumption/lots", + urlParameters: [ + Parameters.billingAccountId, + Parameters.billingProfileId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Lots + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Lots + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/consumption/arm-consumption/src/operations/marketplaces.ts b/sdk/consumption/arm-consumption/src/operations/marketplaces.ts index b324d9f44a8f..e423551d66c6 100644 --- a/sdk/consumption/arm-consumption/src/operations/marketplaces.ts +++ b/sdk/consumption/arm-consumption/src/operations/marketplaces.ts @@ -27,24 +27,61 @@ export class Marketplaces { } /** - * Lists the marketplaces for a scope by subscriptionId and current billing period. Marketplaces - * are available via this API only for May 1, 2014 or later. + * Lists the marketplaces for a scope at the defined scope. Marketplaces are available via this API + * only for May 1, 2014 or later. + * @param scope The scope associated with marketplace operations. This includes + * '/subscriptions/{subscriptionId}/' for subscription scope, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + * '/providers/Microsoft.Billing/departments/{departmentId}' for Department scope, + * '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount + * scope and '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management + * Group scope. For subscription, billing account, department, enrollment account and + * ManagementGroup, you can also add billing period to the scope using + * '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to specify billing + * period at department scope use + * '/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}' * @param [options] The optional parameters * @returns Promise */ - list(options?: Models.MarketplacesListOptionalParams): Promise; + list(scope: string, options?: Models.MarketplacesListOptionalParams): Promise; /** + * @param scope The scope associated with marketplace operations. This includes + * '/subscriptions/{subscriptionId}/' for subscription scope, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + * '/providers/Microsoft.Billing/departments/{departmentId}' for Department scope, + * '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount + * scope and '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management + * Group scope. For subscription, billing account, department, enrollment account and + * ManagementGroup, you can also add billing period to the scope using + * '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to specify billing + * period at department scope use + * '/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}' * @param callback The callback */ - list(callback: msRest.ServiceCallback): void; + list(scope: string, callback: msRest.ServiceCallback): void; /** + * @param scope The scope associated with marketplace operations. This includes + * '/subscriptions/{subscriptionId}/' for subscription scope, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + * '/providers/Microsoft.Billing/departments/{departmentId}' for Department scope, + * '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount + * scope and '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management + * Group scope. For subscription, billing account, department, enrollment account and + * ManagementGroup, you can also add billing period to the scope using + * '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to specify billing + * period at department scope use + * '/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}' * @param options The optional parameters * @param callback The callback */ - list(options: Models.MarketplacesListOptionalParams, callback: msRest.ServiceCallback): void; - list(options?: Models.MarketplacesListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + list(scope: string, options: Models.MarketplacesListOptionalParams, callback: msRest.ServiceCallback): void; + list(scope: string, options?: Models.MarketplacesListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { + scope, options }, listOperationSpec, @@ -52,285 +89,8 @@ export class Marketplaces { } /** - * Lists the marketplaces for a scope by billing period and subscripotionId. Marketplaces are - * available via this API only for May 1, 2014 or later. - * @param billingPeriodName Billing Period Name. - * @param [options] The optional parameters - * @returns Promise - */ - listByBillingPeriod(billingPeriodName: string, options?: Models.MarketplacesListByBillingPeriodOptionalParams): Promise; - /** - * @param billingPeriodName Billing Period Name. - * @param callback The callback - */ - listByBillingPeriod(billingPeriodName: string, callback: msRest.ServiceCallback): void; - /** - * @param billingPeriodName Billing Period Name. - * @param options The optional parameters - * @param callback The callback - */ - listByBillingPeriod(billingPeriodName: string, options: Models.MarketplacesListByBillingPeriodOptionalParams, callback: msRest.ServiceCallback): void; - listByBillingPeriod(billingPeriodName: string, options?: Models.MarketplacesListByBillingPeriodOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - billingPeriodName, - options - }, - listByBillingPeriodOperationSpec, - callback) as Promise; - } - - /** - * Lists the marketplaces for a scope by billingAccountId and current billing period. Marketplaces - * are available via this API only for May 1, 2014 or later. - * @param billingAccountId BillingAccount ID - * @param [options] The optional parameters - * @returns Promise - */ - listByBillingAccount(billingAccountId: string, options?: Models.MarketplacesListByBillingAccountOptionalParams): Promise; - /** - * @param billingAccountId BillingAccount ID - * @param callback The callback - */ - listByBillingAccount(billingAccountId: string, callback: msRest.ServiceCallback): void; - /** - * @param billingAccountId BillingAccount ID - * @param options The optional parameters - * @param callback The callback - */ - listByBillingAccount(billingAccountId: string, options: Models.MarketplacesListByBillingAccountOptionalParams, callback: msRest.ServiceCallback): void; - listByBillingAccount(billingAccountId: string, options?: Models.MarketplacesListByBillingAccountOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - billingAccountId, - options - }, - listByBillingAccountOperationSpec, - callback) as Promise; - } - - /** - * Lists the marketplaces for a scope by billing period and billingAccountId. Marketplaces are - * available via this API only for May 1, 2014 or later. - * @param billingAccountId BillingAccount ID - * @param billingPeriodName Billing Period Name. - * @param [options] The optional parameters - * @returns Promise - */ - listForBillingPeriodByBillingAccount(billingAccountId: string, billingPeriodName: string, options?: Models.MarketplacesListForBillingPeriodByBillingAccountOptionalParams): Promise; - /** - * @param billingAccountId BillingAccount ID - * @param billingPeriodName Billing Period Name. - * @param callback The callback - */ - listForBillingPeriodByBillingAccount(billingAccountId: string, billingPeriodName: string, callback: msRest.ServiceCallback): void; - /** - * @param billingAccountId BillingAccount ID - * @param billingPeriodName Billing Period Name. - * @param options The optional parameters - * @param callback The callback - */ - listForBillingPeriodByBillingAccount(billingAccountId: string, billingPeriodName: string, options: Models.MarketplacesListForBillingPeriodByBillingAccountOptionalParams, callback: msRest.ServiceCallback): void; - listForBillingPeriodByBillingAccount(billingAccountId: string, billingPeriodName: string, options?: Models.MarketplacesListForBillingPeriodByBillingAccountOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - billingAccountId, - billingPeriodName, - options - }, - listForBillingPeriodByBillingAccountOperationSpec, - callback) as Promise; - } - - /** - * Lists the marketplaces for a scope by departmentId and current billing period. Marketplaces are - * available via this API only for May 1, 2014 or later. - * @param departmentId Department ID - * @param [options] The optional parameters - * @returns Promise - */ - listByDepartment(departmentId: string, options?: Models.MarketplacesListByDepartmentOptionalParams): Promise; - /** - * @param departmentId Department ID - * @param callback The callback - */ - listByDepartment(departmentId: string, callback: msRest.ServiceCallback): void; - /** - * @param departmentId Department ID - * @param options The optional parameters - * @param callback The callback - */ - listByDepartment(departmentId: string, options: Models.MarketplacesListByDepartmentOptionalParams, callback: msRest.ServiceCallback): void; - listByDepartment(departmentId: string, options?: Models.MarketplacesListByDepartmentOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - departmentId, - options - }, - listByDepartmentOperationSpec, - callback) as Promise; - } - - /** - * Lists the marketplaces for a scope by billing period and departmentId. Marketplaces are - * available via this API only for May 1, 2014 or later. - * @param departmentId Department ID - * @param billingPeriodName Billing Period Name. - * @param [options] The optional parameters - * @returns Promise - */ - listForBillingPeriodByDepartment(departmentId: string, billingPeriodName: string, options?: Models.MarketplacesListForBillingPeriodByDepartmentOptionalParams): Promise; - /** - * @param departmentId Department ID - * @param billingPeriodName Billing Period Name. - * @param callback The callback - */ - listForBillingPeriodByDepartment(departmentId: string, billingPeriodName: string, callback: msRest.ServiceCallback): void; - /** - * @param departmentId Department ID - * @param billingPeriodName Billing Period Name. - * @param options The optional parameters - * @param callback The callback - */ - listForBillingPeriodByDepartment(departmentId: string, billingPeriodName: string, options: Models.MarketplacesListForBillingPeriodByDepartmentOptionalParams, callback: msRest.ServiceCallback): void; - listForBillingPeriodByDepartment(departmentId: string, billingPeriodName: string, options?: Models.MarketplacesListForBillingPeriodByDepartmentOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - departmentId, - billingPeriodName, - options - }, - listForBillingPeriodByDepartmentOperationSpec, - callback) as Promise; - } - - /** - * Lists the marketplaces for a scope by enrollmentAccountId and current billing period. - * Marketplaces are available via this API only for May 1, 2014 or later. - * @param enrollmentAccountId EnrollmentAccount ID - * @param [options] The optional parameters - * @returns Promise - */ - listByEnrollmentAccount(enrollmentAccountId: string, options?: Models.MarketplacesListByEnrollmentAccountOptionalParams): Promise; - /** - * @param enrollmentAccountId EnrollmentAccount ID - * @param callback The callback - */ - listByEnrollmentAccount(enrollmentAccountId: string, callback: msRest.ServiceCallback): void; - /** - * @param enrollmentAccountId EnrollmentAccount ID - * @param options The optional parameters - * @param callback The callback - */ - listByEnrollmentAccount(enrollmentAccountId: string, options: Models.MarketplacesListByEnrollmentAccountOptionalParams, callback: msRest.ServiceCallback): void; - listByEnrollmentAccount(enrollmentAccountId: string, options?: Models.MarketplacesListByEnrollmentAccountOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - enrollmentAccountId, - options - }, - listByEnrollmentAccountOperationSpec, - callback) as Promise; - } - - /** - * Lists the marketplaces for a scope by billing period and enrollmentAccountId. Marketplaces are - * available via this API only for May 1, 2014 or later. - * @param enrollmentAccountId EnrollmentAccount ID - * @param billingPeriodName Billing Period Name. - * @param [options] The optional parameters - * @returns Promise - */ - listForBillingPeriodByEnrollmentAccount(enrollmentAccountId: string, billingPeriodName: string, options?: Models.MarketplacesListForBillingPeriodByEnrollmentAccountOptionalParams): Promise; - /** - * @param enrollmentAccountId EnrollmentAccount ID - * @param billingPeriodName Billing Period Name. - * @param callback The callback - */ - listForBillingPeriodByEnrollmentAccount(enrollmentAccountId: string, billingPeriodName: string, callback: msRest.ServiceCallback): void; - /** - * @param enrollmentAccountId EnrollmentAccount ID - * @param billingPeriodName Billing Period Name. - * @param options The optional parameters - * @param callback The callback - */ - listForBillingPeriodByEnrollmentAccount(enrollmentAccountId: string, billingPeriodName: string, options: Models.MarketplacesListForBillingPeriodByEnrollmentAccountOptionalParams, callback: msRest.ServiceCallback): void; - listForBillingPeriodByEnrollmentAccount(enrollmentAccountId: string, billingPeriodName: string, options?: Models.MarketplacesListForBillingPeriodByEnrollmentAccountOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - enrollmentAccountId, - billingPeriodName, - options - }, - listForBillingPeriodByEnrollmentAccountOperationSpec, - callback) as Promise; - } - - /** - * Lists the marketplace records for all subscriptions belonging to a management group scope by - * current billing period. Marketplaces are available via this API only for May 1, 2014 or later. - * @param managementGroupId Azure Management Group ID. - * @param [options] The optional parameters - * @returns Promise - */ - listByManagementGroup(managementGroupId: string, options?: Models.MarketplacesListByManagementGroupOptionalParams): Promise; - /** - * @param managementGroupId Azure Management Group ID. - * @param callback The callback - */ - listByManagementGroup(managementGroupId: string, callback: msRest.ServiceCallback): void; - /** - * @param managementGroupId Azure Management Group ID. - * @param options The optional parameters - * @param callback The callback - */ - listByManagementGroup(managementGroupId: string, options: Models.MarketplacesListByManagementGroupOptionalParams, callback: msRest.ServiceCallback): void; - listByManagementGroup(managementGroupId: string, options?: Models.MarketplacesListByManagementGroupOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - managementGroupId, - options - }, - listByManagementGroupOperationSpec, - callback) as Promise; - } - - /** - * Lists the marketplace records for all subscriptions belonging to a management group scope by - * specified billing period. Marketplaces are available via this API only for May 1, 2014 or later. - * @param managementGroupId Azure Management Group ID. - * @param billingPeriodName Billing Period Name. - * @param [options] The optional parameters - * @returns Promise - */ - listForBillingPeriodByManagementGroup(managementGroupId: string, billingPeriodName: string, options?: Models.MarketplacesListForBillingPeriodByManagementGroupOptionalParams): Promise; - /** - * @param managementGroupId Azure Management Group ID. - * @param billingPeriodName Billing Period Name. - * @param callback The callback - */ - listForBillingPeriodByManagementGroup(managementGroupId: string, billingPeriodName: string, callback: msRest.ServiceCallback): void; - /** - * @param managementGroupId Azure Management Group ID. - * @param billingPeriodName Billing Period Name. - * @param options The optional parameters - * @param callback The callback - */ - listForBillingPeriodByManagementGroup(managementGroupId: string, billingPeriodName: string, options: Models.MarketplacesListForBillingPeriodByManagementGroupOptionalParams, callback: msRest.ServiceCallback): void; - listForBillingPeriodByManagementGroup(managementGroupId: string, billingPeriodName: string, options?: Models.MarketplacesListForBillingPeriodByManagementGroupOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - managementGroupId, - billingPeriodName, - options - }, - listForBillingPeriodByManagementGroupOperationSpec, - callback) as Promise; - } - - /** - * Lists the marketplaces for a scope by subscriptionId and current billing period. Marketplaces - * are available via this API only for May 1, 2014 or later. + * Lists the marketplaces for a scope at the defined scope. Marketplaces are available via this API + * only for May 1, 2014 or later. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise @@ -356,535 +116,35 @@ export class Marketplaces { listNextOperationSpec, callback) as Promise; } +} - /** - * Lists the marketplaces for a scope by billing period and subscripotionId. Marketplaces are - * available via this API only for May 1, 2014 or later. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByBillingPeriodNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByBillingPeriodNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback - */ - listByBillingPeriodNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByBillingPeriodNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByBillingPeriodNextOperationSpec, - callback) as Promise; - } - - /** - * Lists the marketplaces for a scope by billingAccountId and current billing period. Marketplaces - * are available via this API only for May 1, 2014 or later. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByBillingAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByBillingAccountNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback - */ - listByBillingAccountNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByBillingAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByBillingAccountNextOperationSpec, - callback) as Promise; - } - - /** - * Lists the marketplaces for a scope by billing period and billingAccountId. Marketplaces are - * available via this API only for May 1, 2014 or later. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listForBillingPeriodByBillingAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listForBillingPeriodByBillingAccountNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback - */ - listForBillingPeriodByBillingAccountNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listForBillingPeriodByBillingAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listForBillingPeriodByBillingAccountNextOperationSpec, - callback) as Promise; - } - - /** - * Lists the marketplaces for a scope by departmentId and current billing period. Marketplaces are - * available via this API only for May 1, 2014 or later. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByDepartmentNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByDepartmentNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback - */ - listByDepartmentNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByDepartmentNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByDepartmentNextOperationSpec, - callback) as Promise; - } - - /** - * Lists the marketplaces for a scope by billing period and departmentId. Marketplaces are - * available via this API only for May 1, 2014 or later. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listForBillingPeriodByDepartmentNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listForBillingPeriodByDepartmentNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback - */ - listForBillingPeriodByDepartmentNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listForBillingPeriodByDepartmentNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listForBillingPeriodByDepartmentNextOperationSpec, - callback) as Promise; - } - - /** - * Lists the marketplaces for a scope by enrollmentAccountId and current billing period. - * Marketplaces are available via this API only for May 1, 2014 or later. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByEnrollmentAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByEnrollmentAccountNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback - */ - listByEnrollmentAccountNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByEnrollmentAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByEnrollmentAccountNextOperationSpec, - callback) as Promise; - } - - /** - * Lists the marketplaces for a scope by billing period and enrollmentAccountId. Marketplaces are - * available via this API only for May 1, 2014 or later. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listForBillingPeriodByEnrollmentAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listForBillingPeriodByEnrollmentAccountNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback - */ - listForBillingPeriodByEnrollmentAccountNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listForBillingPeriodByEnrollmentAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listForBillingPeriodByEnrollmentAccountNextOperationSpec, - callback) as Promise; - } - - /** - * Lists the marketplace records for all subscriptions belonging to a management group scope by - * current billing period. Marketplaces are available via this API only for May 1, 2014 or later. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByManagementGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByManagementGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback - */ - listByManagementGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByManagementGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByManagementGroupNextOperationSpec, - callback) as Promise; - } - - /** - * Lists the marketplace records for all subscriptions belonging to a management group scope by - * specified billing period. Marketplaces are available via this API only for May 1, 2014 or later. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listForBillingPeriodByManagementGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listForBillingPeriodByManagementGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback - */ - listForBillingPeriodByManagementGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listForBillingPeriodByManagementGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listForBillingPeriodByManagementGroupNextOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Consumption/marketplaces", - urlParameters: [ - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.filter0, - Parameters.top, - Parameters.skiptoken, - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.MarketplacesListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listByBillingPeriodOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/marketplaces", - urlParameters: [ - Parameters.subscriptionId, - Parameters.billingPeriodName - ], - queryParameters: [ - Parameters.filter0, - Parameters.top, - Parameters.skiptoken, - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.MarketplacesListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listByBillingAccountOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/marketplaces", - urlParameters: [ - Parameters.billingAccountId - ], - queryParameters: [ - Parameters.filter0, - Parameters.top, - Parameters.skiptoken, - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.MarketplacesListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listForBillingPeriodByBillingAccountOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/marketplaces", - urlParameters: [ - Parameters.billingAccountId, - Parameters.billingPeriodName - ], - queryParameters: [ - Parameters.filter0, - Parameters.top, - Parameters.skiptoken, - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.MarketplacesListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listByDepartmentOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Consumption/marketplaces", - urlParameters: [ - Parameters.departmentId - ], - queryParameters: [ - Parameters.filter0, - Parameters.top, - Parameters.skiptoken, - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.MarketplacesListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listForBillingPeriodByDepartmentOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/marketplaces", - urlParameters: [ - Parameters.departmentId, - Parameters.billingPeriodName - ], - queryParameters: [ - Parameters.filter0, - Parameters.top, - Parameters.skiptoken, - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.MarketplacesListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listByEnrollmentAccountOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}/providers/Microsoft.Consumption/marketplaces", - urlParameters: [ - Parameters.enrollmentAccountId - ], - queryParameters: [ - Parameters.filter0, - Parameters.top, - Parameters.skiptoken, - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.MarketplacesListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listForBillingPeriodByEnrollmentAccountOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/marketplaces", - urlParameters: [ - Parameters.enrollmentAccountId, - Parameters.billingPeriodName - ], - queryParameters: [ - Parameters.filter0, - Parameters.top, - Parameters.skiptoken, - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.MarketplacesListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listByManagementGroupOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Consumption/marketplaces", - urlParameters: [ - Parameters.managementGroupId - ], - queryParameters: [ - Parameters.filter0, - Parameters.top, - Parameters.skiptoken, - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.MarketplacesListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listForBillingPeriodByManagementGroupOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/marketplaces", - urlParameters: [ - Parameters.managementGroupId, - Parameters.billingPeriodName - ], - queryParameters: [ - Parameters.filter0, - Parameters.top, - Parameters.skiptoken, - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.MarketplacesListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{scope}/providers/Microsoft.Consumption/marketplaces", + urlParameters: [ + Parameters.scope + ], + queryParameters: [ + Parameters.filter0, + Parameters.top, + Parameters.skiptoken, + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.MarketplacesListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; const listNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", @@ -906,192 +166,3 @@ const listNextOperationSpec: msRest.OperationSpec = { }, serializer }; - -const listByBillingPeriodNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.MarketplacesListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listByBillingAccountNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.MarketplacesListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listForBillingPeriodByBillingAccountNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.MarketplacesListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listByDepartmentNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.MarketplacesListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listForBillingPeriodByDepartmentNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.MarketplacesListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listByEnrollmentAccountNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.MarketplacesListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listForBillingPeriodByEnrollmentAccountNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.MarketplacesListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listByManagementGroupNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.MarketplacesListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listForBillingPeriodByManagementGroupNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.MarketplacesListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; diff --git a/sdk/consumption/arm-consumption/src/operations/reservationRecommendations.ts b/sdk/consumption/arm-consumption/src/operations/reservationRecommendations.ts index 3f4787a580a9..42ca47b08055 100644 --- a/sdk/consumption/arm-consumption/src/operations/reservationRecommendations.ts +++ b/sdk/consumption/arm-consumption/src/operations/reservationRecommendations.ts @@ -27,23 +27,39 @@ export class ReservationRecommendations { } /** - * List of recomendations for purchasing reserved instances. + * List of recommendations for purchasing reserved instances. + * @param scope The scope associated with reservation recommendations operations. This includes + * '/subscriptions/{subscriptionId}/' for subscription scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope, and + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + * for billingProfile scope * @param [options] The optional parameters * @returns Promise */ - list(options?: Models.ReservationRecommendationsListOptionalParams): Promise; + list(scope: string, options?: Models.ReservationRecommendationsListOptionalParams): Promise; /** + * @param scope The scope associated with reservation recommendations operations. This includes + * '/subscriptions/{subscriptionId}/' for subscription scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope, and + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + * for billingProfile scope * @param callback The callback */ - list(callback: msRest.ServiceCallback): void; + list(scope: string, callback: msRest.ServiceCallback): void; /** + * @param scope The scope associated with reservation recommendations operations. This includes + * '/subscriptions/{subscriptionId}/' for subscription scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope, and + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + * for billingProfile scope * @param options The optional parameters * @param callback The callback */ - list(options: Models.ReservationRecommendationsListOptionalParams, callback: msRest.ServiceCallback): void; - list(options?: Models.ReservationRecommendationsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + list(scope: string, options: Models.ReservationRecommendationsListOptionalParams, callback: msRest.ServiceCallback): void; + list(scope: string, options?: Models.ReservationRecommendationsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { + scope, options }, listOperationSpec, @@ -51,7 +67,7 @@ export class ReservationRecommendations { } /** - * List of recomendations for purchasing reserved instances. + * List of recommendations for purchasing reserved instances. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise @@ -83,9 +99,9 @@ export class ReservationRecommendations { const serializer = new msRest.Serializer(Mappers); const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Consumption/reservationRecommendations", + path: "{scope}/providers/Microsoft.Consumption/reservationRecommendations", urlParameters: [ - Parameters.subscriptionId + Parameters.scope ], queryParameters: [ Parameters.filter0, diff --git a/sdk/consumption/arm-consumption/src/operations/reservationTransactions.ts b/sdk/consumption/arm-consumption/src/operations/reservationTransactions.ts new file mode 100644 index 000000000000..288f4c42bd3c --- /dev/null +++ b/sdk/consumption/arm-consumption/src/operations/reservationTransactions.ts @@ -0,0 +1,131 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/reservationTransactionsMappers"; +import * as Parameters from "../models/parameters"; +import { ConsumptionManagementClientContext } from "../consumptionManagementClientContext"; + +/** Class representing a ReservationTransactions. */ +export class ReservationTransactions { + private readonly client: ConsumptionManagementClientContext; + + /** + * Create a ReservationTransactions. + * @param {ConsumptionManagementClientContext} client Reference to the service client. + */ + constructor(client: ConsumptionManagementClientContext) { + this.client = client; + } + + /** + * List of transactions for reserved instances on billing account scope + * @param billingAccountId BillingAccount ID + * @param [options] The optional parameters + * @returns Promise + */ + list(billingAccountId: string, options?: Models.ReservationTransactionsListOptionalParams): Promise; + /** + * @param billingAccountId BillingAccount ID + * @param callback The callback + */ + list(billingAccountId: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountId BillingAccount ID + * @param options The optional parameters + * @param callback The callback + */ + list(billingAccountId: string, options: Models.ReservationTransactionsListOptionalParams, callback: msRest.ServiceCallback): void; + list(billingAccountId: string, options?: Models.ReservationTransactionsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountId, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * List of transactions for reserved instances on billing account scope + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/reservationTransactions", + urlParameters: [ + Parameters.billingAccountId + ], + queryParameters: [ + Parameters.filter0, + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ReservationTransactionsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ReservationTransactionsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/consumption/arm-consumption/src/operations/reservationsDetails.ts b/sdk/consumption/arm-consumption/src/operations/reservationsDetails.ts index c712a50bbfcc..1d1d9751a298 100644 --- a/sdk/consumption/arm-consumption/src/operations/reservationsDetails.ts +++ b/sdk/consumption/arm-consumption/src/operations/reservationsDetails.ts @@ -100,6 +100,46 @@ export class ReservationsDetails { callback) as Promise; } + /** + * Lists the reservations details for the defined scope and provided date range. + * @param scope The scope associated with reservations details operations. This includes + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope + * (legacy), and + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + * for BillingProfile scope (modern). + * @param [options] The optional parameters + * @returns Promise + */ + list(scope: string, options?: Models.ReservationsDetailsListOptionalParams): Promise; + /** + * @param scope The scope associated with reservations details operations. This includes + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope + * (legacy), and + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + * for BillingProfile scope (modern). + * @param callback The callback + */ + list(scope: string, callback: msRest.ServiceCallback): void; + /** + * @param scope The scope associated with reservations details operations. This includes + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope + * (legacy), and + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + * for BillingProfile scope (modern). + * @param options The optional parameters + * @param callback The callback + */ + list(scope: string, options: Models.ReservationsDetailsListOptionalParams, callback: msRest.ServiceCallback): void; + list(scope: string, options?: Models.ReservationsDetailsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scope, + options + }, + listOperationSpec, + callback) as Promise; + } + /** * Lists the reservations details for provided date range. * @param nextPageLink The NextLink from the previous successful call to List operation. @@ -155,6 +195,34 @@ export class ReservationsDetails { listByReservationOrderAndReservationNextOperationSpec, callback) as Promise; } + + /** + * Lists the reservations details for the defined scope and provided date range. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } } // Operation Specifications @@ -208,6 +276,32 @@ const listByReservationOrderAndReservationOperationSpec: msRest.OperationSpec = serializer }; +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{scope}/providers/Microsoft.Consumption/reservationDetails", + urlParameters: [ + Parameters.scope + ], + queryParameters: [ + Parameters.startDate0, + Parameters.endDate0, + Parameters.filter0, + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ReservationDetailsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + const listByReservationOrderNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", @@ -249,3 +343,24 @@ const listByReservationOrderAndReservationNextOperationSpec: msRest.OperationSpe }, serializer }; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ReservationDetailsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/consumption/arm-consumption/src/operations/reservationsSummaries.ts b/sdk/consumption/arm-consumption/src/operations/reservationsSummaries.ts index 47d212f52431..25738bedec68 100644 --- a/sdk/consumption/arm-consumption/src/operations/reservationsSummaries.ts +++ b/sdk/consumption/arm-consumption/src/operations/reservationsSummaries.ts @@ -94,6 +94,50 @@ export class ReservationsSummaries { callback) as Promise; } + /** + * Lists the reservations summaries for the defined scope daily or monthly grain. + * @param scope The scope associated with reservations summaries operations. This includes + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope + * (legacy), and + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + * for BillingProfile scope (modern). + * @param grain Can be daily or monthly. Possible values include: 'DailyGrain', 'MonthlyGrain' + * @param [options] The optional parameters + * @returns Promise + */ + list(scope: string, grain: Models.Datagrain, options?: Models.ReservationsSummariesListOptionalParams): Promise; + /** + * @param scope The scope associated with reservations summaries operations. This includes + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope + * (legacy), and + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + * for BillingProfile scope (modern). + * @param grain Can be daily or monthly. Possible values include: 'DailyGrain', 'MonthlyGrain' + * @param callback The callback + */ + list(scope: string, grain: Models.Datagrain, callback: msRest.ServiceCallback): void; + /** + * @param scope The scope associated with reservations summaries operations. This includes + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope + * (legacy), and + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + * for BillingProfile scope (modern). + * @param grain Can be daily or monthly. Possible values include: 'DailyGrain', 'MonthlyGrain' + * @param options The optional parameters + * @param callback The callback + */ + list(scope: string, grain: Models.Datagrain, options: Models.ReservationsSummariesListOptionalParams, callback: msRest.ServiceCallback): void; + list(scope: string, grain: Models.Datagrain, options?: Models.ReservationsSummariesListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scope, + grain, + options + }, + listOperationSpec, + callback) as Promise; + } + /** * Lists the reservations summaries for daily or monthly grain. * @param nextPageLink The NextLink from the previous successful call to List operation. @@ -149,6 +193,34 @@ export class ReservationsSummaries { listByReservationOrderAndReservationNextOperationSpec, callback) as Promise; } + + /** + * Lists the reservations summaries for the defined scope daily or monthly grain. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } } // Operation Specifications @@ -204,6 +276,33 @@ const listByReservationOrderAndReservationOperationSpec: msRest.OperationSpec = serializer }; +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{scope}/providers/Microsoft.Consumption/reservationSummaries", + urlParameters: [ + Parameters.scope + ], + queryParameters: [ + Parameters.grain, + Parameters.startDate0, + Parameters.endDate0, + Parameters.filter0, + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ReservationSummariesListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + const listByReservationOrderNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", @@ -245,3 +344,24 @@ const listByReservationOrderAndReservationNextOperationSpec: msRest.OperationSpe }, serializer }; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ReservationSummariesListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/consumption/arm-consumption/src/operations/tags.ts b/sdk/consumption/arm-consumption/src/operations/tags.ts index 81d26e09da89..3d2b5a4046e1 100644 --- a/sdk/consumption/arm-consumption/src/operations/tags.ts +++ b/sdk/consumption/arm-consumption/src/operations/tags.ts @@ -27,27 +27,54 @@ export class Tags { } /** - * Get all available tag keys for a billing account. - * @param billingAccountId BillingAccount ID + * Get all available tag keys for the defined scope + * @param scope The scope associated with tags operations. This includes + * '/subscriptions/{subscriptionId}/' for subscription scope, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for + * Department scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + * for EnrollmentAccount scope and + * '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group + * scope.. * @param [options] The optional parameters * @returns Promise */ - get(billingAccountId: string, options?: msRest.RequestOptionsBase): Promise; + get(scope: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param billingAccountId BillingAccount ID + * @param scope The scope associated with tags operations. This includes + * '/subscriptions/{subscriptionId}/' for subscription scope, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for + * Department scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + * for EnrollmentAccount scope and + * '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group + * scope.. * @param callback The callback */ - get(billingAccountId: string, callback: msRest.ServiceCallback): void; + get(scope: string, callback: msRest.ServiceCallback): void; /** - * @param billingAccountId BillingAccount ID + * @param scope The scope associated with tags operations. This includes + * '/subscriptions/{subscriptionId}/' for subscription scope, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for + * Department scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + * for EnrollmentAccount scope and + * '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group + * scope.. * @param options The optional parameters * @param callback The callback */ - get(billingAccountId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(billingAccountId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get(scope: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(scope: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { - billingAccountId, + scope, options }, getOperationSpec, @@ -59,9 +86,9 @@ export class Tags { const serializer = new msRest.Serializer(Mappers); const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "providers/Microsoft.CostManagement/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/tags", + path: "{scope}/providers/Microsoft.Consumption/tags", urlParameters: [ - Parameters.billingAccountId + Parameters.scope ], queryParameters: [ Parameters.apiVersion diff --git a/sdk/consumption/arm-consumption/src/operations/usageDetails.ts b/sdk/consumption/arm-consumption/src/operations/usageDetails.ts index a35d44831b51..40002fbfbfe8 100644 --- a/sdk/consumption/arm-consumption/src/operations/usageDetails.ts +++ b/sdk/consumption/arm-consumption/src/operations/usageDetails.ts @@ -27,24 +27,82 @@ export class UsageDetails { } /** - * Lists the usage details for a scope by current billing period. Usage details are available via - * this API only for May 1, 2014 or later. + * Lists the usage details for the defined scope. Usage details are available via this API only for + * May 1, 2014 or later. + * @param scope The scope associated with usage details operations. This includes + * '/subscriptions/{subscriptionId}/' for subscription scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + * '/providers/Microsoft.Billing/departments/{departmentId}' for Department scope, + * '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount + * scope and '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management + * Group scope. For subscription, billing account, department, enrollment account and management + * group, you can also add billing period to the scope using + * '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to specify billing + * period at department scope use + * '/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. + * Also, Modern Commerce Account scopes are + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for billingAccount scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + * for billingProfile scope, + * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + * for invoiceSection scope, and + * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific + * for partners. * @param [options] The optional parameters * @returns Promise */ - list(options?: Models.UsageDetailsListOptionalParams): Promise; - /** - * @param callback The callback - */ - list(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - list(options: Models.UsageDetailsListOptionalParams, callback: msRest.ServiceCallback): void; - list(options?: Models.UsageDetailsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { + list(scope: string, options?: Models.UsageDetailsListOptionalParams): Promise; + /** + * @param scope The scope associated with usage details operations. This includes + * '/subscriptions/{subscriptionId}/' for subscription scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + * '/providers/Microsoft.Billing/departments/{departmentId}' for Department scope, + * '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount + * scope and '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management + * Group scope. For subscription, billing account, department, enrollment account and management + * group, you can also add billing period to the scope using + * '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to specify billing + * period at department scope use + * '/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. + * Also, Modern Commerce Account scopes are + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for billingAccount scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + * for billingProfile scope, + * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + * for invoiceSection scope, and + * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific + * for partners. + * @param callback The callback + */ + list(scope: string, callback: msRest.ServiceCallback): void; + /** + * @param scope The scope associated with usage details operations. This includes + * '/subscriptions/{subscriptionId}/' for subscription scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + * '/providers/Microsoft.Billing/departments/{departmentId}' for Department scope, + * '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount + * scope and '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management + * Group scope. For subscription, billing account, department, enrollment account and management + * group, you can also add billing period to the scope using + * '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to specify billing + * period at department scope use + * '/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. + * Also, Modern Commerce Account scopes are + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for billingAccount scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + * for billingProfile scope, + * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + * for invoiceSection scope, and + * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific + * for partners. + * @param options The optional parameters + * @param callback The callback + */ + list(scope: string, options: Models.UsageDetailsListOptionalParams, callback: msRest.ServiceCallback): void; + list(scope: string, options?: Models.UsageDetailsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scope, options }, listOperationSpec, @@ -52,286 +110,8 @@ export class UsageDetails { } /** - * Lists the usage details for a scope by billing period. Usage details are available via this API - * only for May 1, 2014 or later. - * @param billingPeriodName Billing Period Name. - * @param [options] The optional parameters - * @returns Promise - */ - listByBillingPeriod(billingPeriodName: string, options?: Models.UsageDetailsListByBillingPeriodOptionalParams): Promise; - /** - * @param billingPeriodName Billing Period Name. - * @param callback The callback - */ - listByBillingPeriod(billingPeriodName: string, callback: msRest.ServiceCallback): void; - /** - * @param billingPeriodName Billing Period Name. - * @param options The optional parameters - * @param callback The callback - */ - listByBillingPeriod(billingPeriodName: string, options: Models.UsageDetailsListByBillingPeriodOptionalParams, callback: msRest.ServiceCallback): void; - listByBillingPeriod(billingPeriodName: string, options?: Models.UsageDetailsListByBillingPeriodOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - billingPeriodName, - options - }, - listByBillingPeriodOperationSpec, - callback) as Promise; - } - - /** - * Lists the usage details by billingAccountId for a scope by current billing period. Usage details - * are available via this API only for May 1, 2014 or later. - * @param billingAccountId BillingAccount ID - * @param [options] The optional parameters - * @returns Promise - */ - listByBillingAccount(billingAccountId: string, options?: Models.UsageDetailsListByBillingAccountOptionalParams): Promise; - /** - * @param billingAccountId BillingAccount ID - * @param callback The callback - */ - listByBillingAccount(billingAccountId: string, callback: msRest.ServiceCallback): void; - /** - * @param billingAccountId BillingAccount ID - * @param options The optional parameters - * @param callback The callback - */ - listByBillingAccount(billingAccountId: string, options: Models.UsageDetailsListByBillingAccountOptionalParams, callback: msRest.ServiceCallback): void; - listByBillingAccount(billingAccountId: string, options?: Models.UsageDetailsListByBillingAccountOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - billingAccountId, - options - }, - listByBillingAccountOperationSpec, - callback) as Promise; - } - - /** - * Lists the usage details based on billingAccountId for a scope by billing period. Usage details - * are available via this API only for May 1, 2014 or later. - * @param billingAccountId BillingAccount ID - * @param billingPeriodName Billing Period Name. - * @param [options] The optional parameters - * @returns Promise - */ - listForBillingPeriodByBillingAccount(billingAccountId: string, billingPeriodName: string, options?: Models.UsageDetailsListForBillingPeriodByBillingAccountOptionalParams): Promise; - /** - * @param billingAccountId BillingAccount ID - * @param billingPeriodName Billing Period Name. - * @param callback The callback - */ - listForBillingPeriodByBillingAccount(billingAccountId: string, billingPeriodName: string, callback: msRest.ServiceCallback): void; - /** - * @param billingAccountId BillingAccount ID - * @param billingPeriodName Billing Period Name. - * @param options The optional parameters - * @param callback The callback - */ - listForBillingPeriodByBillingAccount(billingAccountId: string, billingPeriodName: string, options: Models.UsageDetailsListForBillingPeriodByBillingAccountOptionalParams, callback: msRest.ServiceCallback): void; - listForBillingPeriodByBillingAccount(billingAccountId: string, billingPeriodName: string, options?: Models.UsageDetailsListForBillingPeriodByBillingAccountOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - billingAccountId, - billingPeriodName, - options - }, - listForBillingPeriodByBillingAccountOperationSpec, - callback) as Promise; - } - - /** - * Lists the usage details by departmentId for a scope by current billing period. Usage details are - * available via this API only for May 1, 2014 or later. - * @param departmentId Department ID - * @param [options] The optional parameters - * @returns Promise - */ - listByDepartment(departmentId: string, options?: Models.UsageDetailsListByDepartmentOptionalParams): Promise; - /** - * @param departmentId Department ID - * @param callback The callback - */ - listByDepartment(departmentId: string, callback: msRest.ServiceCallback): void; - /** - * @param departmentId Department ID - * @param options The optional parameters - * @param callback The callback - */ - listByDepartment(departmentId: string, options: Models.UsageDetailsListByDepartmentOptionalParams, callback: msRest.ServiceCallback): void; - listByDepartment(departmentId: string, options?: Models.UsageDetailsListByDepartmentOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - departmentId, - options - }, - listByDepartmentOperationSpec, - callback) as Promise; - } - - /** - * Lists the usage details based on departmentId for a scope by billing period. Usage details are - * available via this API only for May 1, 2014 or later. - * @param departmentId Department ID - * @param billingPeriodName Billing Period Name. - * @param [options] The optional parameters - * @returns Promise - */ - listForBillingPeriodByDepartment(departmentId: string, billingPeriodName: string, options?: Models.UsageDetailsListForBillingPeriodByDepartmentOptionalParams): Promise; - /** - * @param departmentId Department ID - * @param billingPeriodName Billing Period Name. - * @param callback The callback - */ - listForBillingPeriodByDepartment(departmentId: string, billingPeriodName: string, callback: msRest.ServiceCallback): void; - /** - * @param departmentId Department ID - * @param billingPeriodName Billing Period Name. - * @param options The optional parameters - * @param callback The callback - */ - listForBillingPeriodByDepartment(departmentId: string, billingPeriodName: string, options: Models.UsageDetailsListForBillingPeriodByDepartmentOptionalParams, callback: msRest.ServiceCallback): void; - listForBillingPeriodByDepartment(departmentId: string, billingPeriodName: string, options?: Models.UsageDetailsListForBillingPeriodByDepartmentOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - departmentId, - billingPeriodName, - options - }, - listForBillingPeriodByDepartmentOperationSpec, - callback) as Promise; - } - - /** - * Lists the usage details by enrollmentAccountId for a scope by current billing period. Usage - * details are available via this API only for May 1, 2014 or later. - * @param enrollmentAccountId EnrollmentAccount ID - * @param [options] The optional parameters - * @returns Promise - */ - listByEnrollmentAccount(enrollmentAccountId: string, options?: Models.UsageDetailsListByEnrollmentAccountOptionalParams): Promise; - /** - * @param enrollmentAccountId EnrollmentAccount ID - * @param callback The callback - */ - listByEnrollmentAccount(enrollmentAccountId: string, callback: msRest.ServiceCallback): void; - /** - * @param enrollmentAccountId EnrollmentAccount ID - * @param options The optional parameters - * @param callback The callback - */ - listByEnrollmentAccount(enrollmentAccountId: string, options: Models.UsageDetailsListByEnrollmentAccountOptionalParams, callback: msRest.ServiceCallback): void; - listByEnrollmentAccount(enrollmentAccountId: string, options?: Models.UsageDetailsListByEnrollmentAccountOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - enrollmentAccountId, - options - }, - listByEnrollmentAccountOperationSpec, - callback) as Promise; - } - - /** - * Lists the usage details based on enrollmentAccountId for a scope by billing period. Usage - * details are available via this API only for May 1, 2014 or later. - * @param enrollmentAccountId EnrollmentAccount ID - * @param billingPeriodName Billing Period Name. - * @param [options] The optional parameters - * @returns Promise - */ - listForBillingPeriodByEnrollmentAccount(enrollmentAccountId: string, billingPeriodName: string, options?: Models.UsageDetailsListForBillingPeriodByEnrollmentAccountOptionalParams): Promise; - /** - * @param enrollmentAccountId EnrollmentAccount ID - * @param billingPeriodName Billing Period Name. - * @param callback The callback - */ - listForBillingPeriodByEnrollmentAccount(enrollmentAccountId: string, billingPeriodName: string, callback: msRest.ServiceCallback): void; - /** - * @param enrollmentAccountId EnrollmentAccount ID - * @param billingPeriodName Billing Period Name. - * @param options The optional parameters - * @param callback The callback - */ - listForBillingPeriodByEnrollmentAccount(enrollmentAccountId: string, billingPeriodName: string, options: Models.UsageDetailsListForBillingPeriodByEnrollmentAccountOptionalParams, callback: msRest.ServiceCallback): void; - listForBillingPeriodByEnrollmentAccount(enrollmentAccountId: string, billingPeriodName: string, options?: Models.UsageDetailsListForBillingPeriodByEnrollmentAccountOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - enrollmentAccountId, - billingPeriodName, - options - }, - listForBillingPeriodByEnrollmentAccountOperationSpec, - callback) as Promise; - } - - /** - * Lists the usage detail records for all subscriptions belonging to a management group scope by - * current billing period. Usage details are available via this API only for May 1, 2014 or later. - * @param managementGroupId Azure Management Group ID. - * @param [options] The optional parameters - * @returns Promise - */ - listByManagementGroup(managementGroupId: string, options?: Models.UsageDetailsListByManagementGroupOptionalParams): Promise; - /** - * @param managementGroupId Azure Management Group ID. - * @param callback The callback - */ - listByManagementGroup(managementGroupId: string, callback: msRest.ServiceCallback): void; - /** - * @param managementGroupId Azure Management Group ID. - * @param options The optional parameters - * @param callback The callback - */ - listByManagementGroup(managementGroupId: string, options: Models.UsageDetailsListByManagementGroupOptionalParams, callback: msRest.ServiceCallback): void; - listByManagementGroup(managementGroupId: string, options?: Models.UsageDetailsListByManagementGroupOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - managementGroupId, - options - }, - listByManagementGroupOperationSpec, - callback) as Promise; - } - - /** - * Lists the usage detail records for all subscriptions belonging to a management group scope by - * specified billing period. Usage details are available via this API only for May 1, 2014 or - * later. - * @param managementGroupId Azure Management Group ID. - * @param billingPeriodName Billing Period Name. - * @param [options] The optional parameters - * @returns Promise - */ - listForBillingPeriodByManagementGroup(managementGroupId: string, billingPeriodName: string, options?: Models.UsageDetailsListForBillingPeriodByManagementGroupOptionalParams): Promise; - /** - * @param managementGroupId Azure Management Group ID. - * @param billingPeriodName Billing Period Name. - * @param callback The callback - */ - listForBillingPeriodByManagementGroup(managementGroupId: string, billingPeriodName: string, callback: msRest.ServiceCallback): void; - /** - * @param managementGroupId Azure Management Group ID. - * @param billingPeriodName Billing Period Name. - * @param options The optional parameters - * @param callback The callback - */ - listForBillingPeriodByManagementGroup(managementGroupId: string, billingPeriodName: string, options: Models.UsageDetailsListForBillingPeriodByManagementGroupOptionalParams, callback: msRest.ServiceCallback): void; - listForBillingPeriodByManagementGroup(managementGroupId: string, billingPeriodName: string, options?: Models.UsageDetailsListForBillingPeriodByManagementGroupOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - managementGroupId, - billingPeriodName, - options - }, - listForBillingPeriodByManagementGroupOperationSpec, - callback) as Promise; - } - - /** - * Lists the usage details for a scope by current billing period. Usage details are available via - * this API only for May 1, 2014 or later. + * Lists the usage details for the defined scope. Usage details are available via this API only for + * May 1, 2014 or later. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise @@ -357,556 +137,37 @@ export class UsageDetails { listNextOperationSpec, callback) as Promise; } +} - /** - * Lists the usage details for a scope by billing period. Usage details are available via this API - * only for May 1, 2014 or later. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByBillingPeriodNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByBillingPeriodNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback - */ - listByBillingPeriodNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByBillingPeriodNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByBillingPeriodNextOperationSpec, - callback) as Promise; - } - - /** - * Lists the usage details by billingAccountId for a scope by current billing period. Usage details - * are available via this API only for May 1, 2014 or later. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByBillingAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByBillingAccountNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback - */ - listByBillingAccountNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByBillingAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByBillingAccountNextOperationSpec, - callback) as Promise; - } - - /** - * Lists the usage details based on billingAccountId for a scope by billing period. Usage details - * are available via this API only for May 1, 2014 or later. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listForBillingPeriodByBillingAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listForBillingPeriodByBillingAccountNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback - */ - listForBillingPeriodByBillingAccountNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listForBillingPeriodByBillingAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listForBillingPeriodByBillingAccountNextOperationSpec, - callback) as Promise; - } - - /** - * Lists the usage details by departmentId for a scope by current billing period. Usage details are - * available via this API only for May 1, 2014 or later. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByDepartmentNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByDepartmentNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback - */ - listByDepartmentNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByDepartmentNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByDepartmentNextOperationSpec, - callback) as Promise; - } - - /** - * Lists the usage details based on departmentId for a scope by billing period. Usage details are - * available via this API only for May 1, 2014 or later. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listForBillingPeriodByDepartmentNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listForBillingPeriodByDepartmentNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback - */ - listForBillingPeriodByDepartmentNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listForBillingPeriodByDepartmentNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listForBillingPeriodByDepartmentNextOperationSpec, - callback) as Promise; - } - - /** - * Lists the usage details by enrollmentAccountId for a scope by current billing period. Usage - * details are available via this API only for May 1, 2014 or later. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByEnrollmentAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByEnrollmentAccountNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback - */ - listByEnrollmentAccountNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByEnrollmentAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByEnrollmentAccountNextOperationSpec, - callback) as Promise; - } - - /** - * Lists the usage details based on enrollmentAccountId for a scope by billing period. Usage - * details are available via this API only for May 1, 2014 or later. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listForBillingPeriodByEnrollmentAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listForBillingPeriodByEnrollmentAccountNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback - */ - listForBillingPeriodByEnrollmentAccountNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listForBillingPeriodByEnrollmentAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listForBillingPeriodByEnrollmentAccountNextOperationSpec, - callback) as Promise; - } - - /** - * Lists the usage detail records for all subscriptions belonging to a management group scope by - * current billing period. Usage details are available via this API only for May 1, 2014 or later. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByManagementGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByManagementGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback - */ - listByManagementGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByManagementGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByManagementGroupNextOperationSpec, - callback) as Promise; - } - - /** - * Lists the usage detail records for all subscriptions belonging to a management group scope by - * specified billing period. Usage details are available via this API only for May 1, 2014 or - * later. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listForBillingPeriodByManagementGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listForBillingPeriodByManagementGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback - */ - listForBillingPeriodByManagementGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listForBillingPeriodByManagementGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listForBillingPeriodByManagementGroupNextOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Consumption/usageDetails", - urlParameters: [ - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.expand, - Parameters.filter0, - Parameters.skiptoken, - Parameters.top, - Parameters.apiVersion, - Parameters.apply - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.UsageDetailsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listByBillingPeriodOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/usageDetails", - urlParameters: [ - Parameters.subscriptionId, - Parameters.billingPeriodName - ], - queryParameters: [ - Parameters.expand, - Parameters.filter0, - Parameters.skiptoken, - Parameters.top, - Parameters.apiVersion, - Parameters.apply - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.UsageDetailsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listByBillingAccountOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/usageDetails", - urlParameters: [ - Parameters.billingAccountId - ], - queryParameters: [ - Parameters.expand, - Parameters.filter0, - Parameters.skiptoken, - Parameters.top, - Parameters.apiVersion, - Parameters.apply - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.UsageDetailsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listForBillingPeriodByBillingAccountOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/usageDetails", - urlParameters: [ - Parameters.billingAccountId, - Parameters.billingPeriodName - ], - queryParameters: [ - Parameters.expand, - Parameters.filter0, - Parameters.skiptoken, - Parameters.top, - Parameters.apiVersion, - Parameters.apply - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.UsageDetailsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listByDepartmentOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Consumption/usageDetails", - urlParameters: [ - Parameters.departmentId - ], - queryParameters: [ - Parameters.expand, - Parameters.filter0, - Parameters.skiptoken, - Parameters.top, - Parameters.apiVersion, - Parameters.apply - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.UsageDetailsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listForBillingPeriodByDepartmentOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/usageDetails", - urlParameters: [ - Parameters.departmentId, - Parameters.billingPeriodName - ], - queryParameters: [ - Parameters.expand, - Parameters.filter0, - Parameters.skiptoken, - Parameters.top, - Parameters.apiVersion, - Parameters.apply - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.UsageDetailsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listByEnrollmentAccountOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}/providers/Microsoft.Consumption/usageDetails", - urlParameters: [ - Parameters.enrollmentAccountId - ], - queryParameters: [ - Parameters.expand, - Parameters.filter0, - Parameters.skiptoken, - Parameters.top, - Parameters.apiVersion, - Parameters.apply - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.UsageDetailsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listForBillingPeriodByEnrollmentAccountOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/usageDetails", - urlParameters: [ - Parameters.enrollmentAccountId, - Parameters.billingPeriodName - ], - queryParameters: [ - Parameters.expand, - Parameters.filter0, - Parameters.skiptoken, - Parameters.top, - Parameters.apiVersion, - Parameters.apply - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.UsageDetailsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listByManagementGroupOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Consumption/usageDetails", - urlParameters: [ - Parameters.managementGroupId - ], - queryParameters: [ - Parameters.expand, - Parameters.filter0, - Parameters.skiptoken, - Parameters.top, - Parameters.apiVersion, - Parameters.apply - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.UsageDetailsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listForBillingPeriodByManagementGroupOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/usageDetails", - urlParameters: [ - Parameters.managementGroupId, - Parameters.billingPeriodName - ], - queryParameters: [ - Parameters.expand, - Parameters.filter0, - Parameters.skiptoken, - Parameters.top, - Parameters.apiVersion, - Parameters.apply - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.UsageDetailsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{scope}/providers/Microsoft.Consumption/usageDetails", + urlParameters: [ + Parameters.scope + ], + queryParameters: [ + Parameters.expand, + Parameters.filter0, + Parameters.skiptoken, + Parameters.top, + Parameters.apiVersion, + Parameters.metric + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.UsageDetailsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; const listNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", @@ -928,192 +189,3 @@ const listNextOperationSpec: msRest.OperationSpec = { }, serializer }; - -const listByBillingPeriodNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.UsageDetailsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listByBillingAccountNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.UsageDetailsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listForBillingPeriodByBillingAccountNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.UsageDetailsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listByDepartmentNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.UsageDetailsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listForBillingPeriodByDepartmentNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.UsageDetailsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listByEnrollmentAccountNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.UsageDetailsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listForBillingPeriodByEnrollmentAccountNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.UsageDetailsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listByManagementGroupNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.UsageDetailsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listForBillingPeriodByManagementGroupNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.UsageDetailsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; diff --git a/sdk/consumption/arm-consumption/tsconfig.json b/sdk/consumption/arm-consumption/tsconfig.json index 87bbf5b5fa49..422b584abd5e 100644 --- a/sdk/consumption/arm-consumption/tsconfig.json +++ b/sdk/consumption/arm-consumption/tsconfig.json @@ -9,7 +9,7 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6"], + "lib": ["es6", "dom"], "declaration": true, "outDir": "./esm", "importHelpers": true