From da1c5ad34e8546ef4d750ceb9685ce0dcc66e07b Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 16 Mar 2021 16:49:32 +0000 Subject: [PATCH] CodeGen from PR 13327 in Azure/azure-rest-api-specs Merge f575ad61e8b434a0927dffb240d1383299a99c45 into a2b6c113528f50d9be6b3e7c4d695a8a971b05b8 --- sdk/consumption/arm-consumption/LICENSE.txt | 2 +- sdk/consumption/arm-consumption/README.md | 33 +- sdk/consumption/arm-consumption/package.json | 22 +- .../arm-consumption/rollup.config.js | 24 +- .../src/consumptionManagementClient.ts | 27 +- .../src/consumptionManagementClientContext.ts | 9 +- .../src/models/aggregatedCostMappers.ts | 72 +- .../src/models/balancesMappers.ts | 68 +- .../src/models/budgetsMappers.ts | 72 +- .../src/models/chargesMappers.ts | 70 +- .../src/models/creditsMappers.ts | 59 + .../src/models/eventsOperationsMappers.ts | 60 + .../src/models/forecastsMappers.ts | 74 +- .../arm-consumption/src/models/index.ts | 5297 +++++++++-------- .../src/models/lotsOperationsMappers.ts | 60 + .../arm-consumption/src/models/mappers.ts | 3884 +++++++++--- .../src/models/marketplacesMappers.ts | 72 +- .../src/models/operationsMappers.ts | 16 +- .../arm-consumption/src/models/parameters.ts | 151 +- .../src/models/priceSheetMappers.ts | 70 +- ...reservationRecommendationDetailsMappers.ts | 59 + .../reservationRecommendationsMappers.ts | 20 +- .../models/reservationTransactionsMappers.ts | 61 + .../src/models/reservationsDetailsMappers.ts | 72 +- .../models/reservationsSummariesMappers.ts | 72 +- .../arm-consumption/src/models/tagsMappers.ts | 70 +- .../src/models/usageDetailsMappers.ts | 72 +- .../src/operations/aggregatedCost.ts | 7 +- .../src/operations/balances.ts | 5 +- .../arm-consumption/src/operations/budgets.ts | 524 +- .../arm-consumption/src/operations/charges.ts | 271 +- .../arm-consumption/src/operations/credits.ts | 85 + .../src/operations/eventsOperations.ts | 157 + .../src/operations/forecasts.ts | 9 +- .../arm-consumption/src/operations/index.ts | 16 +- .../src/operations/lotsOperations.ts | 137 + .../src/operations/marketplaces.ts | 1085 +--- .../src/operations/operations.ts | 8 +- .../src/operations/priceSheet.ts | 9 +- .../reservationRecommendationDetails.ts | 130 + .../operations/reservationRecommendations.ts | 52 +- .../src/operations/reservationTransactions.ts | 244 + .../src/operations/reservationsDetails.ts | 174 +- .../src/operations/reservationsSummaries.ts | 180 +- .../arm-consumption/src/operations/tags.ts | 55 +- .../src/operations/usageDetails.ts | 1153 +--- sdk/consumption/arm-consumption/tsconfig.json | 2 +- 47 files changed, 8627 insertions(+), 6244 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/reservationRecommendationDetailsMappers.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/reservationRecommendationDetails.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..2d3163745319 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) 2021 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 e16d409c27f2..8ecbfe28f551 100644 --- a/sdk/consumption/arm-consumption/README.md +++ b/sdk/consumption/arm-consumption/README.md @@ -9,37 +9,38 @@ This package contains an isomorphic SDK for ConsumptionManagementClient. ### How to Install -``` +```bash npm install @azure/arm-consumption ``` ### How to use -#### nodejs - Authentication, client creation and list usageDetails as an example written in TypeScript. +#### nodejs - client creation and list usageDetails as an example written in TypeScript. ##### 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 -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"; -import { ConsumptionManagementClient, ConsumptionManagementModels, ConsumptionManagementMappers } from "@azure/arm-consumption"; +While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package +```typescript +const msRestNodeAuth = require("@azure/ms-rest-nodeauth"); +const { ConsumptionManagementClient } = require("@azure/arm-consumption"); 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 +53,7 @@ msRestNodeAuth.interactiveLogin().then((creds) => { ##### Install @azure/ms-rest-browserauth -``` +```bash npm install @azure/ms-rest-browserauth ``` @@ -82,12 +83,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 +107,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%2Fsdk%2Fconsumption%2Farm-consumption%2FREADME.png) +![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 7ee2ecadf862..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" ], diff --git a/sdk/consumption/arm-consumption/rollup.config.js b/sdk/consumption/arm-consumption/rollup.config.js index e434910415dd..ed6d8f92fcd2 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", @@ -15,17 +21,17 @@ const config = { "@azure/ms-rest-azure-js": "msRestAzure" }, banner: `/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * 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..ca49072e6233 100644 --- a/sdk/consumption/arm-consumption/src/consumptionManagementClient.ts +++ b/sdk/consumption/arm-consumption/src/consumptionManagementClient.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -19,17 +18,22 @@ 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; + reservationRecommendationDetails: operations.ReservationRecommendationDetails; + 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,22 @@ 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.reservationRecommendationDetails = new operations.ReservationRecommendationDetails(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..1840b36ebad7 100644 --- a/sdk/consumption/arm-consumption/src/consumptionManagementClientContext.ts +++ b/sdk/consumption/arm-consumption/src/consumptionManagementClientContext.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -13,7 +12,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 +43,7 @@ export class ConsumptionManagementClientContext extends msRestAzure.AzureService super(credentials, options); - this.apiVersion = '2018-10-01'; + this.apiVersion = '2019-11-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..dbb1fa8ef540 100644 --- a/sdk/consumption/arm-consumption/src/models/aggregatedCostMappers.ts +++ b/sdk/consumption/arm-consumption/src/models/aggregatedCostMappers.ts @@ -1,39 +1,59 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * 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, + BudgetComparisonExpression, + BudgetFilter, + BudgetFilterProperties, + BudgetTimePeriod, + ChargeSummary, + CreditBalanceSummary, + CreditSummary, + CurrentSpend, + ErrorDetails, + ErrorResponse, + EventSummary, Forecast, ForecastPropertiesConfidenceLevelsItem, - ChargeSummary, + ForecastSpend, + LegacyChargeSummary, + LegacyReservationTransaction, + LegacyUsageDetail, + LotSummary, + ManagementGroupAggregatedCostResult, + Marketplace, + MeterDetails, + MeterDetailsResponse, + ModernChargeSummary, + ModernReservationTransaction, + ModernUsageDetail, + Notification, + PriceSheetProperties, + PriceSheetResult, ProxyResource, - TagsResult, + ReservationDetail, + ReservationRecommendationDetailsCalculatedSavingsProperties, + ReservationRecommendationDetailsModel, + ReservationRecommendationDetailsResourceProperties, + ReservationRecommendationDetailsSavingsProperties, + ReservationRecommendationDetailsUsageProperties, + ReservationSummary, + ReservationTransaction, + ReservationTransactionResource, + 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..dbb1fa8ef540 100644 --- a/sdk/consumption/arm-consumption/src/models/balancesMappers.ts +++ b/sdk/consumption/arm-consumption/src/models/balancesMappers.ts @@ -1,39 +1,59 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * 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, + BudgetComparisonExpression, + BudgetFilter, + BudgetFilterProperties, + BudgetTimePeriod, + ChargeSummary, + CreditBalanceSummary, + CreditSummary, + CurrentSpend, ErrorDetails, - UsageDetail, - MeterDetails, - Marketplace, - ReservationSummary, - ReservationDetail, - PriceSheetResult, - PriceSheetProperties, + ErrorResponse, + EventSummary, Forecast, ForecastPropertiesConfidenceLevelsItem, + ForecastSpend, + LegacyChargeSummary, + LegacyReservationTransaction, + LegacyUsageDetail, + LotSummary, ManagementGroupAggregatedCostResult, - ChargeSummary, + Marketplace, + MeterDetails, + MeterDetailsResponse, + ModernChargeSummary, + ModernReservationTransaction, + ModernUsageDetail, + Notification, + PriceSheetProperties, + PriceSheetResult, ProxyResource, - TagsResult, + ReservationDetail, + ReservationRecommendationDetailsCalculatedSavingsProperties, + ReservationRecommendationDetailsModel, + ReservationRecommendationDetailsResourceProperties, + ReservationRecommendationDetailsSavingsProperties, + ReservationRecommendationDetailsUsageProperties, + ReservationSummary, + ReservationTransaction, + ReservationTransactionResource, + 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..933c9452979b 100644 --- a/sdk/consumption/arm-consumption/src/models/budgetsMappers.ts +++ b/sdk/consumption/arm-consumption/src/models/budgetsMappers.ts @@ -1,40 +1,60 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * 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, + BudgetComparisonExpression, + BudgetFilter, + BudgetFilterProperties, + 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, Forecast, ForecastPropertiesConfidenceLevelsItem, + ForecastSpend, + LegacyChargeSummary, + LegacyReservationTransaction, + LegacyUsageDetail, + LotSummary, ManagementGroupAggregatedCostResult, - ChargeSummary + Marketplace, + MeterDetails, + MeterDetailsResponse, + ModernChargeSummary, + ModernReservationTransaction, + ModernUsageDetail, + Notification, + PriceSheetProperties, + PriceSheetResult, + ProxyResource, + ReservationDetail, + ReservationRecommendationDetailsCalculatedSavingsProperties, + ReservationRecommendationDetailsModel, + ReservationRecommendationDetailsResourceProperties, + ReservationRecommendationDetailsSavingsProperties, + ReservationRecommendationDetailsUsageProperties, + ReservationSummary, + ReservationTransaction, + ReservationTransactionResource, + 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..8ee821e74d91 100644 --- a/sdk/consumption/arm-consumption/src/models/chargesMappers.ts +++ b/sdk/consumption/arm-consumption/src/models/chargesMappers.ts @@ -1,40 +1,60 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * 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, + BudgetComparisonExpression, + BudgetFilter, + BudgetFilterProperties, + BudgetTimePeriod, ChargesListResult, ChargeSummary, - Resource, - BaseResource, - ErrorResponse, + CreditBalanceSummary, + CreditSummary, + CurrentSpend, ErrorDetails, - UsageDetail, - MeterDetails, - Marketplace, - Balance, - BalancePropertiesNewPurchasesDetailsItem, - BalancePropertiesAdjustmentDetailsItem, - ReservationSummary, - ReservationDetail, - PriceSheetResult, - PriceSheetProperties, + ErrorResponse, + EventSummary, Forecast, ForecastPropertiesConfidenceLevelsItem, + ForecastSpend, + LegacyChargeSummary, + LegacyReservationTransaction, + LegacyUsageDetail, + LotSummary, ManagementGroupAggregatedCostResult, + Marketplace, + MeterDetails, + MeterDetailsResponse, + ModernChargeSummary, + ModernReservationTransaction, + ModernUsageDetail, + Notification, + PriceSheetProperties, + PriceSheetResult, ProxyResource, - TagsResult, + ReservationDetail, + ReservationRecommendationDetailsCalculatedSavingsProperties, + ReservationRecommendationDetailsModel, + ReservationRecommendationDetailsResourceProperties, + ReservationRecommendationDetailsSavingsProperties, + ReservationRecommendationDetailsUsageProperties, + ReservationSummary, + ReservationTransaction, + ReservationTransactionResource, + 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..dbb1fa8ef540 --- /dev/null +++ b/sdk/consumption/arm-consumption/src/models/creditsMappers.ts @@ -0,0 +1,59 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * 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, + BudgetComparisonExpression, + BudgetFilter, + BudgetFilterProperties, + BudgetTimePeriod, + ChargeSummary, + CreditBalanceSummary, + CreditSummary, + CurrentSpend, + ErrorDetails, + ErrorResponse, + EventSummary, + Forecast, + ForecastPropertiesConfidenceLevelsItem, + ForecastSpend, + LegacyChargeSummary, + LegacyReservationTransaction, + LegacyUsageDetail, + LotSummary, + ManagementGroupAggregatedCostResult, + Marketplace, + MeterDetails, + MeterDetailsResponse, + ModernChargeSummary, + ModernReservationTransaction, + ModernUsageDetail, + Notification, + PriceSheetProperties, + PriceSheetResult, + ProxyResource, + ReservationDetail, + ReservationRecommendationDetailsCalculatedSavingsProperties, + ReservationRecommendationDetailsModel, + ReservationRecommendationDetailsResourceProperties, + ReservationRecommendationDetailsSavingsProperties, + ReservationRecommendationDetailsUsageProperties, + ReservationSummary, + ReservationTransaction, + ReservationTransactionResource, + 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..331d75871a0f --- /dev/null +++ b/sdk/consumption/arm-consumption/src/models/eventsOperationsMappers.ts @@ -0,0 +1,60 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * 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, + BudgetComparisonExpression, + BudgetFilter, + BudgetFilterProperties, + BudgetTimePeriod, + ChargeSummary, + CreditBalanceSummary, + CreditSummary, + CurrentSpend, + ErrorDetails, + ErrorResponse, + Events, + EventSummary, + Forecast, + ForecastPropertiesConfidenceLevelsItem, + ForecastSpend, + LegacyChargeSummary, + LegacyReservationTransaction, + LegacyUsageDetail, + LotSummary, + ManagementGroupAggregatedCostResult, + Marketplace, + MeterDetails, + MeterDetailsResponse, + ModernChargeSummary, + ModernReservationTransaction, + ModernUsageDetail, + Notification, + PriceSheetProperties, + PriceSheetResult, + ProxyResource, + ReservationDetail, + ReservationRecommendationDetailsCalculatedSavingsProperties, + ReservationRecommendationDetailsModel, + ReservationRecommendationDetailsResourceProperties, + ReservationRecommendationDetailsSavingsProperties, + ReservationRecommendationDetailsUsageProperties, + ReservationSummary, + ReservationTransaction, + ReservationTransactionResource, + 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..71cc2814efa4 100644 --- a/sdk/consumption/arm-consumption/src/models/forecastsMappers.ts +++ b/sdk/consumption/arm-consumption/src/models/forecastsMappers.ts @@ -1,40 +1,60 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * 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, + BudgetComparisonExpression, + BudgetFilter, + BudgetFilterProperties, + BudgetTimePeriod, + ChargeSummary, + CreditBalanceSummary, + CreditSummary, + CurrentSpend, ErrorDetails, - UsageDetail, - MeterDetails, + ErrorResponse, + EventSummary, + Forecast, + ForecastPropertiesConfidenceLevelsItem, + ForecastsListResult, + ForecastSpend, + LegacyChargeSummary, + LegacyReservationTransaction, + LegacyUsageDetail, + LotSummary, + ManagementGroupAggregatedCostResult, Marketplace, - Balance, - BalancePropertiesNewPurchasesDetailsItem, - BalancePropertiesAdjustmentDetailsItem, - ReservationSummary, - ReservationDetail, - PriceSheetResult, + MeterDetails, + MeterDetailsResponse, + ModernChargeSummary, + ModernReservationTransaction, + ModernUsageDetail, + Notification, PriceSheetProperties, - ManagementGroupAggregatedCostResult, - ChargeSummary, + PriceSheetResult, ProxyResource, - TagsResult, + ReservationDetail, + ReservationRecommendationDetailsCalculatedSavingsProperties, + ReservationRecommendationDetailsModel, + ReservationRecommendationDetailsResourceProperties, + ReservationRecommendationDetailsSavingsProperties, + ReservationRecommendationDetailsUsageProperties, + ReservationSummary, + ReservationTransaction, + ReservationTransactionResource, + 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..ba92e786ac0c 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. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * 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,3186 +11,3632 @@ 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 etag. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly etag?: 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 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 etag. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly instanceName?: string; + readonly etag?: 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 tags. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly instanceId?: string; + readonly tags?: { [propertyName: string]: string }; +} + +/** + * The properties of the meter detail. + */ +export interface MeterDetailsResponse { /** - * @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 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 instanceLocation?: string; + readonly meterName?: 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 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 currency?: string; + readonly meterCategory?: string; /** - * @member {number} [usageQuantity] The quantity of usage. - * **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 usageQuantity?: number; + readonly meterSubCategory?: string; /** - * @member {number} [billableQuantity] The billable usage quantity. - * **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 billableQuantity?: number; + readonly unitOfMeasure?: 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.** + * The service family. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly pretaxCost?: number; + readonly serviceFamily?: string; +} + +/** + * Legacy usage detail. + */ +export interface LegacyUsageDetail { /** - * @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.** + * Polymorphic Discriminator */ - readonly isEstimated?: boolean; + kind: "legacy"; /** - * @member {string} [meterId] The meter id (GUID). - * **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 meterId?: string; + readonly id?: 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 name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly meterDetails?: MeterDetails; + readonly name?: string; /** - * @member {string} [subscriptionGuid] Subscription guid. - * **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 subscriptionGuid?: string; + readonly type?: string; /** - * @member {string} [subscriptionName] Subscription name. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource etag. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly subscriptionName?: string; + readonly etag?: string; /** - * @member {string} [accountName] Account name. - * **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 accountName?: string; + readonly tags?: { [propertyName: string]: string }; /** - * @member {string} [departmentName] Department 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 departmentName?: string; + readonly billingAccountId?: string; /** - * @member {string} [product] Product 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 product?: string; + readonly billingAccountName?: string; /** - * @member {string} [consumedService] Consumed service 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 consumedService?: string; + readonly billingPeriodStartDate?: Date; /** - * @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.** + * The billing period end date. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly costCenter?: string; + readonly billingPeriodEndDate?: Date; /** - * @member {string} [partNumber] Part Number - * **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 partNumber?: string; + readonly billingProfileId?: string; /** - * @member {string} [resourceGuid] Resource Guid - * **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 resourceGuid?: string; + readonly billingProfileName?: string; /** - * @member {string} [offerId] Offer Id - * **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 offerId?: string; + readonly accountOwnerId?: string; /** - * @member {boolean} [chargesBilledSeparately] Charges billed separately - * **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 chargesBilledSeparately?: boolean; + readonly accountName?: string; /** - * @member {string} [location] Resource Location - * **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 location?: string; + readonly subscriptionId?: 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.** + * Subscription name. + * **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 subscriptionName?: 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.** + * Date for the usage record. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly billingPeriodId?: string; + readonly date?: Date; /** - * @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.** + * 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 usageStart?: Date; + readonly product?: 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.** + * 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 usageEnd?: Date; + readonly partNumber?: string; /** - * @member {number} [resourceRate] The marketplace resource rate. - * **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 resourceRate?: number; + readonly meterId?: string; /** - * @member {string} [offerName] The type of offer. - * **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 offerName?: string; + readonly meterDetails?: MeterDetailsResponse; /** - * @member {string} [resourceGroup] The name of resource group. - * **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 resourceGroup?: string; + readonly quantity?: number; /** - * @member {string} [orderNumber] The order number. - * **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 orderNumber?: string; + readonly effectivePrice?: 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.** + * The amount of cost before tax. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly instanceName?: string; + readonly cost?: number; /** - * @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.** + * 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 instanceId?: string; + readonly unitPrice?: 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.** + * Billing Currency. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly currency?: string; + readonly billingCurrency?: string; /** - * @member {number} [consumedQuantity] The quantity of usage. - * **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 consumedQuantity?: number; + readonly resourceLocation?: string; /** - * @member {string} [unitOfMeasure] The unit of measure. - * **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 unitOfMeasure?: string; + readonly consumedService?: 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.** + * Unique identifier of the Azure Resource Manager usage detail resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly pretaxCost?: number; + readonly resourceId?: 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.** + * Resource Name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly isEstimated?: boolean; + readonly resourceName?: string; /** - * @member {string} [meterId] The meter id (GUID). - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Service-specific metadata. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly meterId?: string; + readonly serviceInfo1?: string; /** - * @member {string} [subscriptionGuid] Subscription guid. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Legacy field with optional service-specific metadata. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly subscriptionGuid?: string; + readonly serviceInfo2?: string; /** - * @member {string} [subscriptionName] Subscription name. - * **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 subscriptionName?: string; + readonly additionalInfo?: string; /** - * @member {string} [accountName] Account name. - * **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 accountName?: string; + readonly invoiceSection?: string; /** - * @member {string} [departmentName] Department 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 departmentName?: string; + readonly costCenter?: string; /** - * @member {string} [consumedService] Consumed service 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 consumedService?: string; + readonly resourceGroup?: 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.** + * 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 costCenter?: string; + readonly reservationId?: 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.** + * 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 additionalProperties?: string; + readonly reservationName?: string; + /** + * 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 productOrderId?: string; /** - * @member {string} [publisherName] The name of publisher. - * **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 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; + /** + * 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 etag. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly currency?: string; + readonly etag?: 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.** + * Resource tags. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly beginningBalance?: number; + readonly tags?: { [propertyName: string]: 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.** + * Billing Account identifier. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly endingBalance?: number; + readonly billingAccountId?: string; /** - * @member {number} [newPurchases] Total new purchase amount. - * **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 newPurchases?: number; + readonly billingAccountName?: string; /** - * @member {number} [adjustments] Total adjustment 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 adjustments?: number; + readonly billingPeriodStartDate?: Date; /** - * @member {number} [utilized] Total Commitment usage. - * **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 utilized?: number; + readonly billingPeriodEndDate?: Date; /** - * @member {number} [serviceOverage] Overage for Azure services. - * **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 serviceOverage?: number; + readonly billingProfileId?: string; /** - * @member {number} [chargesBilledSeparately] Charges Billed separately. - * **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 chargesBilledSeparately?: number; + readonly billingProfileName?: string; /** - * @member {number} [totalOverage] serviceOverage + chargesBilledSeparately. - * **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 totalOverage?: number; + readonly subscriptionGuid?: string; /** - * @member {number} [totalUsage] Azure service commitment + total Overage. - * **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 totalUsage?: number; + readonly subscriptionName?: string; /** - * @member {number} [azureMarketplaceServiceCharges] Total charges for Azure - * Marketplace. - * **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 azureMarketplaceServiceCharges?: number; + readonly date?: Date; /** - * @member {BillingFrequency} [billingFrequency] The billing frequency. - * Possible values include: 'Month', 'Quarter', 'Year' + * 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.** */ - billingFrequency?: BillingFrequency; + readonly product?: string; /** - * @member {boolean} [priceHidden] Price is hidden or not. - * **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 priceHidden?: boolean; + readonly meterId?: 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 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 newPurchasesDetails?: BalancePropertiesNewPurchasesDetailsItem[]; + readonly meterName?: 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 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 adjustmentDetails?: BalancePropertiesAdjustmentDetailsItem[]; -} - -/** - * @interface - * An interface representing ReservationSummary. - * reservation summary resource. - * - * @extends Resource - */ -export interface ReservationSummary extends Resource { + readonly meterRegion?: 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.** + * Identifies the top-level service for the usage. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly reservationOrderId?: string; + readonly meterCategory?: 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.** + * 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 reservationId?: string; + readonly meterSubCategory?: 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.** + * 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 skuName?: string; + readonly serviceFamily?: string; /** - * @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.** + * 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 reservedHours?: number; + readonly quantity?: number; /** - * @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.** + * 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 usageDate?: Date; + readonly unitOfMeasure?: 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.** + * Instance Name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly usedHours?: number; + readonly instanceName?: string; /** - * @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.** + * 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 minUtilizationPercentage?: number; + readonly costInUSD?: 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.** + * 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 avgUtilizationPercentage?: number; + readonly unitPrice?: number; /** - * @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.** + * The currency defining the billed cost. + * **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 billingCurrencyCode?: 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.** + * Name of the resource location. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly reservationOrderId?: string; + readonly resourceLocation?: 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.** + * 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 reservationId?: string; + readonly consumedService?: 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-specific metadata. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly skuName?: string; + readonly serviceInfo1?: 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.** + * Legacy field with optional service-specific metadata. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly reservedHours?: number; + readonly serviceInfo2?: 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.** + * 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 usageDate?: Date; + readonly additionalInfo?: 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.** + * 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 usedHours?: number; + readonly invoiceSectionId?: 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.** + * 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 instanceId?: string; + readonly invoiceSectionName?: 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.** + * 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 totalReservedQuantity?: number; -} - -/** - * @interface - * An interface representing ReservationRecommendation. - * Reservation recommendation resource. - * - */ -export interface ReservationRecommendation { + readonly costCenter?: string; /** - * @member {string} [id] Resource Id. - * **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 id?: string; + readonly resourceGroup?: string; /** - * @member {string} [name] Resource 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 name?: string; + readonly reservationId?: string; /** - * @member {string} [type] Resource type. - * **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 type?: string; + readonly reservationName?: string; /** - * @member {{ [propertyName: string]: string }} [tags] Resource tags. - * **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 tags?: { [propertyName: string]: string }; + readonly productOrderId?: string; /** - * @member {string} [location] Resource location - * **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 location?: string; + readonly productOrderName?: string; /** - * @member {string} [sku] Resource sku - * **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 sku?: string; + readonly isAzureCreditEligible?: boolean; /** - * @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.** + * 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 lookBackPeriod?: string; + readonly term?: string; /** - * @member {string} [meterId] The meter id (GUID) - * **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 meterId?: string; + readonly publisherName?: 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.** + * 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 term?: string; + readonly publisherType?: 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 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 costWithNoReservedInstances?: number; + readonly chargeType?: string; /** - * @member {number} [recommendedQuantity] Recomended quality for 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 recommendedQuantity?: number; + readonly frequency?: string; /** - * @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 billed currency. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly totalCostWithReservedInstances?: number; + readonly costInBillingCurrency?: 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.** + * 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 netSavings?: number; + readonly costInPricingCurrency?: number; /** - * @member {Date} [firstUsageDate] The usage date for looking back. - * **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 firstUsageDate?: Date; + readonly exchangeRate?: string; /** - * @member {string} [scope] Shared or single recommendation. - * **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 scope?: string; -} - -/** - * @interface - * An interface representing Tag. - * The tag resource. - * - */ -export interface Tag { + readonly exchangeRateDate?: Date; /** - * @member {string} [key] Tag key. + * 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.** */ - key?: string; -} - -/** - * @interface - * An interface representing ProxyResource. - * The Resource model definition. - * - * @extends BaseResource - */ -export interface ProxyResource extends BaseResource { + readonly invoiceId?: string; /** - * @member {string} [id] Resource Id. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * 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.** */ - readonly id?: string; + readonly previousInvoiceId?: string; /** - * @member {string} [name] Resource name. - * **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 name?: string; + readonly pricingCurrencyCode?: string; /** - * @member {string} [type] Resource type. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Identifier 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 type?: string; + readonly productIdentifier?: 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. + * Resource Location Normalized. + * **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 resourceLocationNormalized?: string; /** - * @member {Tag[]} [tags] A list of Tag. + * 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.** */ - tags?: Tag[]; -} - -/** - * @interface - * An interface representing BudgetTimePeriod. - * The start and end date for a budget. - * - */ -export interface BudgetTimePeriod { + readonly servicePeriodStartDate?: Date; /** - * @member {Date} startDate The start date for the budget. + * 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.** */ - startDate: Date; + readonly servicePeriodEndDate?: Date; /** - * @member {Date} [endDate] The end date for the budget. If not provided, we - * default this to 10 years from the start date. + * Identifier 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 customerTenantId?: string; /** - * @member {string[]} [resourceGroups] The list of filters on resource - * groups, allowed at subscription level only. + * Name of the customer's AAD tenant. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - resourceGroups?: string[]; + readonly customerName?: string; /** - * @member {string[]} [resources] The list of filters on resources. + * Identifier for the partner's AAD tenant. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - resources?: string[]; + readonly partnerTenantId?: string; /** - * @member {string[]} [meters] The list of filters on meters (GUID), - * mandatory for budgets of usage category. + * Name of the partner' AAD tenant. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - meters?: string[]; + readonly partnerName?: string; /** - * @member {{ [propertyName: string]: string[] }} [tags] The dictionary of - * filters on tags. + * MPNId for the reseller associated with the subscription. + * **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 resellerMpnId?: 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.** + * Reseller Name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly amount?: number; + readonly resellerName?: 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.** + * Publisher Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly unit?: string; -} - -/** - * @interface - * An interface representing Notification. - * The notification associated with a budget. - * - */ -export interface Notification { + readonly publisherId?: string; /** - * @member {boolean} enabled The notification is enabled or not. + * Market Price that's charged for the usage. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - enabled: boolean; + readonly marketPrice?: number; /** - * @member {OperatorType} operator The comparison operator. Possible values - * include: 'EqualTo', 'GreaterThan', 'GreaterThanOrEqualTo' + * Exchange Rate from pricing currency to billing currency. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - operator: OperatorType; + readonly exchangeRatePricingToBilling?: number; /** - * @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 amount of PayG cost before tax in billing currency. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - threshold: number; + readonly paygCostInBillingCurrency?: number; /** - * @member {string[]} contactEmails Email addresses to send the budget - * notification to when the threshold is exceeded. + * 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.** */ - contactEmails: string[]; + readonly paygCostInUSD?: number; /** - * @member {string[]} [contactRoles] Contact roles to send the budget - * notification to when the threshold is exceeded. + * 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.** */ - contactRoles?: string[]; + readonly partnerEarnedCreditRate?: number; /** - * @member {string[]} [contactGroups] Action groups to send the budget - * notification to when the threshold is exceeded. + * 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.** */ - contactGroups?: string[]; + readonly partnerEarnedCreditApplied?: string; + /** + * Retail price for the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly payGPrice?: number; } /** - * @interface - * An interface representing Budget. - * A budget resource. - * - * @extends ProxyResource + * A marketplace resource. */ -export interface Budget extends ProxyResource { +export interface Marketplace extends Resource { /** - * @member {CategoryType} category The category of the budget, whether the - * budget tracks cost or usage. Possible values include: 'Cost', 'Usage' + * 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.** */ - category: CategoryType; + readonly billingPeriodId?: string; /** - * @member {number} amount The total amount of cost to track with the budget + * 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.** */ - amount: number; + readonly usageStart?: Date; /** - * @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 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.** */ - timeGrain: TimeGrainType; + readonly usageEnd?: Date; /** - * @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 marketplace resource rate. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - timePeriod: BudgetTimePeriod; + readonly resourceRate?: number; /** - * @member {Filters} [filters] May be used to filter budgets by resource - * group, resource, or meter. + * The type of offer. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - filters?: Filters; + readonly offerName?: string; /** - * @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 name of resource group. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly currentSpend?: CurrentSpend; + readonly resourceGroup?: string; /** - * @member {{ [propertyName: string]: Notification }} [notifications] - * Dictionary of notifications associated with the budget. Budget can have up - * to five notifications. + * Additional information. + * **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 additionalInfo?: 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.** + * The order number. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly billingPeriodId?: string; + readonly orderNumber?: string; /** - * @member {string} [meterId] The meter id (GUID) - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * 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.** */ - readonly meterId?: string; + readonly instanceName?: 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.** + * 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.** */ - readonly meterDetails?: MeterDetails; + readonly instanceId?: string; + /** + * 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; /** - * @member {string} [unitOfMeasure] Unit of measure - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The quantity of usage. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly consumedQuantity?: number; + /** + * The unit of measure. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly unitOfMeasure?: string; /** - * @member {number} [includedQuantity] Included quality for an offer - * **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 includedQuantity?: number; + readonly pretaxCost?: number; /** - * @member {string} [partNumber] Part Number - * **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 partNumber?: string; + readonly isEstimated?: boolean; /** - * @member {number} [unitPrice] Unit Price - * **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 unitPrice?: number; + readonly meterId?: string; /** - * @member {string} [currencyCode] Currency Code - * **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 currencyCode?: string; + readonly subscriptionGuid?: string; /** - * @member {string} [offerId] Offer Id - * **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 offerId?: string; + readonly subscriptionName?: string; + /** + * Account name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly accountName?: string; + /** + * Department name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly departmentName?: string; + /** + * Consumed service name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly consumedService?: string; + /** + * 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 costCenter?: string; + /** + * 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 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 { +export interface ReservationSummary 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.** + * 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 billingPeriodId?: string; + readonly reservationOrderId?: string; /** - * @member {string} [usageStart] Usage start 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 usageStart?: string; + readonly reservationId?: string; /** - * @member {string} [usageEnd] Usage end date. - * **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 usageEnd?: string; + readonly skuName?: string; /** - * @member {number} [azureCharges] Azure Charges. - * **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 azureCharges?: number; + readonly reservedHours?: number; /** - * @member {number} [chargesBilledSeparately] Charges Billed separately. - * **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 chargesBilledSeparately?: number; + readonly usageDate?: Date; /** - * @member {number} [marketplaceCharges] Marketplace Charges. - * **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 marketplaceCharges?: number; + readonly usedHours?: number; /** - * @member {string} [currency] Currency Code - * **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 currency?: string; -} - -/** - * @interface - * An interface representing ChargesListResult. - * Result of listing charge summary. - * - */ -export interface ChargesListResult { + readonly minUtilizationPercentage?: 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 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 value?: ChargeSummary[]; -} - -/** - * @interface - * An interface representing ErrorDetails. - * The details of the error. - * - */ -export interface ErrorDetails { + readonly avgUtilizationPercentage?: number; /** - * @member {string} [code] Error code. - * **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 code?: string; + readonly maxUtilizationPercentage?: 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.** + * The reservation kind. + * **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 kind?: string; /** - * @member {ErrorDetails} [error] The details of the error. + * This is the purchased quantity for the reservationId. + * **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 purchasedQuantity?: number; /** - * @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 remaining quantity for the reservationId. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly provider?: string; + readonly remainingQuantity?: 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 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 resource?: string; + readonly totalReservedQuantity?: 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 used quantity for the reservationId. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly operation?: string; + readonly usedQuantity?: number; + /** + * This is the utilized percentage for the reservation Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly utilizedPercentage?: number; } /** - * @interface - * An interface representing Operation. - * A Consumption REST API operation. - * + * reservation detail resource. */ -export interface Operation { +export interface ReservationDetail extends Resource { /** - * @member {string} [name] Operation name: {provider}/{resource}/{operation}. - * **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 name?: string; + readonly reservationOrderId?: string; /** - * @member {OperationDisplay} [display] The object that represents the - * operation. + * The instance Flexibility Ratio. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - display?: OperationDisplay; -} - -/** - * @interface - * An interface representing ResourceAttributes. - * The Resource model definition. - * - */ -export interface ResourceAttributes { + readonly instanceFlexibilityRatio?: string; /** - * @member {string} [location] Resource location - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The instance Flexibility Group. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly location?: string; + readonly instanceFlexibilityGroup?: string; /** - * @member {string} [sku] Resource sku - * **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 sku?: string; -} - -/** - * @interface - * An interface representing QueryOptions. - * Additional parameters for a set of operations. - * - */ -export interface QueryOptions { + readonly reservationId?: string; /** - * @member {string} [apply] OData apply expression to aggregate usageDetails - * by tags or (tags and properties/usageStart) + * 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.** */ - apply?: string; -} - -/** - * @interface - * An interface representing UsageDetailsListOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase - */ -export interface UsageDetailsListOptionalParams extends msRest.RequestOptionsBase { + readonly skuName?: 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. + * 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.** */ - expand?: string; + readonly reservedHours?: 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 date on which consumption occurred. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - filter?: string; + readonly usageDate?: Date; /** - * @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 used by the instance. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - skiptoken?: string; + readonly usedHours?: number; /** - * @member {number} [top] May be used to limit the number of results to the - * most recent N usageDetails. + * 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.** */ - top?: number; + readonly instanceId?: string; + /** + * 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 totalReservedQuantity?: number; /** - * @member {QueryOptions} [queryOptions] Additional parameters for the - * operation + * The reservation kind. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - queryOptions?: QueryOptions; + readonly kind?: string; } /** - * @interface - * An interface representing UsageDetailsListByBillingPeriodOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * Details of the resource. */ -export interface UsageDetailsListByBillingPeriodOptionalParams extends msRest.RequestOptionsBase { +export interface ReservationRecommendationDetailsResourceProperties { /** - * @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. + * List of subscriptions for which the reservation is applied. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - expand?: string; + readonly appliedScopes?: 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 - * (:). + * On demand rate of the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - filter?: string; + readonly onDemandRate?: 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. + * Azure product ex: Standard_E8s_v3 etc. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - skiptoken?: string; + readonly product?: string; /** - * @member {number} [top] May be used to limit the number of results to the - * most recent N usageDetails. + * Azure resource region ex:EastUS, WestUS etc. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - top?: number; + readonly region?: string; + /** + * Reservation rate of the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly reservationRate?: number; /** - * @member {QueryOptions} [queryOptions] Additional parameters for the - * operation + * The azure resource type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - queryOptions?: QueryOptions; + readonly resourceType?: string; } /** - * @interface - * An interface representing UsageDetailsListByBillingAccountOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * Details of estimated savings. */ -export interface UsageDetailsListByBillingAccountOptionalParams extends msRest.RequestOptionsBase { +export interface ReservationRecommendationDetailsCalculatedSavingsProperties { /** - * @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 cost without reservation. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - expand?: string; + readonly onDemandCost?: 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 difference between total reservation cost and reservation cost. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - filter?: string; + readonly overageCost?: 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 quantity for calculated savings. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - skiptoken?: string; + readonly quantity?: number; /** - * @member {number} [top] May be used to limit the number of results to the - * most recent N usageDetails. + * The exact cost of the estimated usage using reservation. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - top?: number; + readonly reservationCost?: number; + /** + * The cost of the suggested quantity. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly totalReservationCost?: number; + /** + * The number of reserved units used to calculate savings. Always 1 for virtual machines. + */ + reservedUnitCount?: number; /** - * @member {QueryOptions} [queryOptions] Additional parameters for the - * operation + * The amount saved by purchasing the recommended quantity of reservation. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - queryOptions?: QueryOptions; + readonly savings?: number; } /** - * @interface - * An interface representing UsageDetailsListForBillingPeriodByBillingAccountOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * Details of the estimated savings. */ -export interface UsageDetailsListForBillingPeriodByBillingAccountOptionalParams extends msRest.RequestOptionsBase { +export interface ReservationRecommendationDetailsSavingsProperties { /** - * @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. + * List of calculated savings. */ - expand?: string; + calculatedSavings?: ReservationRecommendationDetailsCalculatedSavingsProperties[]; /** - * @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 - * (:). + * Number of days of usage to look back used for computing the recommendation. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - filter?: string; + readonly lookBackPeriod?: 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. + * Number of recommended units of the resource. + * **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. + * Term period of the reservation, ex: P1Y or P3Y. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - top?: number; + readonly reservationOrderTerm?: string; + /** + * Type of savings, ex: instance. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly savingsType?: string; /** - * @member {QueryOptions} [queryOptions] Additional parameters for the - * operation + * Measurement unit ex: hour etc. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - queryOptions?: QueryOptions; + readonly unitOfMeasure?: string; } /** - * @interface - * An interface representing UsageDetailsListByDepartmentOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * Details about historical usage data that has been used for computing the recommendation. */ -export interface UsageDetailsListByDepartmentOptionalParams extends msRest.RequestOptionsBase { +export interface ReservationRecommendationDetailsUsageProperties { /** - * @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 first usage date used for looking back for computing the recommendation. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - expand?: string; + readonly firstConsumptionDate?: 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 last usage date used for looking back for computing the recommendation. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - filter?: string; + readonly lastConsumptionDate?: 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. + * What the usage data values represent ex: virtual machine instance. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - skiptoken?: string; + readonly lookBackUnitType?: string; /** - * @member {number} [top] May be used to limit the number of results to the - * most recent N usageDetails. + * The breakdown of historical resource usage. The values are in the order of usage between the + * firstConsumptionDate and the lastConsumptionDate. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - top?: number; + readonly usageData?: number[]; /** - * @member {QueryOptions} [queryOptions] Additional parameters for the - * operation + * The grain of the values represented in the usage data ex: hourly. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - queryOptions?: QueryOptions; + readonly usageGrain?: string; } /** - * @interface - * An interface representing UsageDetailsListForBillingPeriodByDepartmentOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * Reservation recommendation details. */ -export interface UsageDetailsListForBillingPeriodByDepartmentOptionalParams extends msRest.RequestOptionsBase { - /** - * @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. - */ - expand?: 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 - * (:). - */ - filter?: string; +export interface ReservationRecommendationDetailsModel extends Resource { /** - * @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. */ - skiptoken?: string; + location?: string; /** - * @member {number} [top] May be used to limit the number of results to the - * most recent N usageDetails. + * Resource sku */ - top?: number; + sku?: string; /** - * @member {QueryOptions} [queryOptions] Additional parameters for the - * operation + * An ISO 4217 currency code identifier for the costs and savings + * **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 currency?: 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 specific properties. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - expand?: string; + readonly resource?: ReservationRecommendationDetailsResourceProperties; /** - * @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 Group. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - filter?: string; + readonly resourceGroup?: 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. + * Savings information for the recommendation. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - skiptoken?: string; + readonly savings?: ReservationRecommendationDetailsSavingsProperties; /** - * @member {number} [top] May be used to limit the number of results to the - * most recent N usageDetails. + * Scope of the reservation, ex: Single or Shared. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - top?: number; + readonly scope?: string; /** - * @member {QueryOptions} [queryOptions] Additional parameters for the - * operation + * Historical usage details used to calculate the estimated savings. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - queryOptions?: QueryOptions; + readonly usage?: ReservationRecommendationDetailsUsageProperties; } /** - * @interface - * An interface representing UsageDetailsListForBillingPeriodByEnrollmentAccountOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * Contains the possible cases for ReservationRecommendation. + */ +export type ReservationRecommendationUnion = ReservationRecommendation | LegacyReservationRecommendation | ModernReservationRecommendation; + +/** + * A reservation recommendation resource. */ -export interface UsageDetailsListForBillingPeriodByEnrollmentAccountOptionalParams 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; /** - * @member {QueryOptions} [queryOptions] Additional parameters for the - * operation + * Resource etag. + * **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 etag?: 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 tags. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - expand?: string; + readonly tags?: { [propertyName: string]: 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 location + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - filter?: string; + readonly location?: 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 sku + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - skiptoken?: string; + readonly sku?: string; +} + +/** + * The Sku property + */ +export interface SkuProperty { /** - * @member {number} [top] May be used to limit the number of results to the - * most recent N usageDetails. + * The name of sku property. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - top?: number; + readonly name?: string; /** - * @member {QueryOptions} [queryOptions] Additional parameters for the - * operation + * The value of sku property. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - queryOptions?: QueryOptions; + readonly value?: string; } /** - * @interface - * An interface representing UsageDetailsListForBillingPeriodByManagementGroupOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * Legacy reservation recommendation. */ -export interface UsageDetailsListForBillingPeriodByManagementGroupOptionalParams extends msRest.RequestOptionsBase { +export interface LegacyReservationRecommendation { /** - * @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: "legacy"; /** - * @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 etag. + * **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 etag?: 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'. + * 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 {number} [top] May be used to limit the number of results to the - * most recent N marketplaces. + * Resource location + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - top?: number; + readonly location?: 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 sku + * **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 sku?: 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 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.** */ - filter?: string; + readonly lookBackPeriod?: string; /** - * @member {number} [top] May be used to limit the number of results to the - * most recent N marketplaces. + * 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 {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 instance Flexibility Group. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - skiptoken?: string; -} - -/** - * @interface - * An interface representing MarketplacesListByBillingAccountOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase - */ -export interface MarketplacesListByBillingAccountOptionalParams extends msRest.RequestOptionsBase { + readonly instanceFlexibilityGroup?: 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 normalized Size. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - filter?: string; + readonly normalizedSize?: string; /** - * @member {number} [top] May be used to limit the number of results to the - * most recent N marketplaces. + * 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 {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; -} - -/** - * @interface - * An interface representing MarketplacesListForBillingPeriodByBillingAccountOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase - */ -export interface MarketplacesListForBillingPeriodByBillingAccountOptionalParams extends msRest.RequestOptionsBase { + readonly meterId?: 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 azure resource type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - filter?: string; + readonly resourceType?: string; /** - * @member {number} [top] May be used to limit the number of results to the - * most recent N marketplaces. + * 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 {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 without reserved instances. + * **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 costWithNoReservedInstances?: 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'. + * 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?: 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. + * 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 MarketplacesListForBillingPeriodByDepartmentOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase - */ -export interface MarketplacesListForBillingPeriodByDepartmentOptionalParams extends msRest.RequestOptionsBase { + readonly netSavings?: 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 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 MarketplacesListByEnrollmentAccountOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * The amount plus currency . */ -export interface MarketplacesListByEnrollmentAccountOptionalParams 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; +export interface Amount { /** - * @member {number} [top] May be used to limit the number of results to the - * most recent N marketplaces. + * Amount currency. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - top?: number; + readonly currency?: 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. + * Amount. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - skiptoken?: string; + readonly value?: number; } /** - * @interface - * An interface representing MarketplacesListForBillingPeriodByEnrollmentAccountOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * Modern reservation recommendation. */ -export interface MarketplacesListForBillingPeriodByEnrollmentAccountOptionalParams extends msRest.RequestOptionsBase { +export interface ModernReservationRecommendation { /** - * @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'. + * Polymorphic Discriminator */ - filter?: string; + kind: "modern"; /** - * @member {number} [top] May be used to limit the number of results to the - * most recent N marketplaces. + * Resource Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - top?: number; + 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; -} - -/** - * @interface - * An interface representing MarketplacesListByManagementGroupOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase - */ -export interface MarketplacesListByManagementGroupOptionalParams extends msRest.RequestOptionsBase { + readonly name?: 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'. + * Resource type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - filter?: string; + readonly type?: string; /** - * @member {number} [top] May be used to limit the number of results to the - * most recent N marketplaces. + * Resource etag. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - top?: number; + readonly etag?: 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 tags. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - skiptoken?: string; -} - -/** - * @interface - * An interface representing MarketplacesListForBillingPeriodByManagementGroupOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase - */ -export interface MarketplacesListForBillingPeriodByManagementGroupOptionalParams extends msRest.RequestOptionsBase { + readonly tags?: { [propertyName: string]: 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'. + * Resource location + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - filter?: string; + readonly location?: string; /** - * @member {number} [top] May be used to limit the number of results to the - * most recent N marketplaces. + * Resource sku + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - top?: number; + 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. + * Resource Location. + * **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 modernReservationRecommendationLocation?: string; /** - * @member {string} [filter] Required only for daily grain. The - * properties/UsageDate for start date and end date. The filter supports 'le' - * and 'ge' + * 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.** */ - filter?: string; -} - -/** - * @interface - * An interface representing ReservationsSummariesListByReservationOrderAndReservationOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase - */ -export interface ReservationsSummariesListByReservationOrderAndReservationOptionalParams extends msRest.RequestOptionsBase { + readonly lookBackPeriod?: number; /** - * @member {string} [filter] Required only for daily grain. The - * properties/UsageDate for start date and end date. The filter supports 'le' - * and 'ge' + * The instance Flexibility Ratio. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - filter?: string; + readonly instanceFlexibilityRatio?: number; + /** + * The instance Flexibility Group. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly instanceFlexibilityGroup?: string; + /** + * The normalized Size. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly normalizedSize?: string; + /** + * The recommended Quantity Normalized. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly recommendedQuantityNormalized?: number; + /** + * The meter id (GUID) + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly meterId?: string; + /** + * RI recommendations in one or three year terms. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly term?: string; + /** + * The total amount of cost without reserved instances. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly costWithNoReservedInstances?: Amount; + /** + * Recommended quality for reserved instances. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly recommendedQuantity?: number; + /** + * The total amount of cost with reserved instances. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly totalCostWithReservedInstances?: Amount; + /** + * Total estimated savings with reserved instances. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly netSavings?: Amount; + /** + * The usage date for looking back. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly firstUsageDate?: Date; + /** + * Shared or single recommendation. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly scope?: string; + /** + * List of sku properties + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly skuProperties?: SkuProperty[]; + /** + * This is the ARM Sku name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly skuName?: string; } /** - * @interface - * An interface representing ReservationRecommendationsListOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * The Resource model definition. */ -export interface ReservationRecommendationsListOptionalParams extends msRest.RequestOptionsBase { +export interface ReservationTransactionResource extends BaseResource { /** - * @member {string} [filter] May be used to filter reservationRecommendations - * by properties/scope and properties/lookBackPeriod. + * Resource Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - filter?: string; + 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?: string[]; } /** - * @interface - * An interface representing PriceSheetGetOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * Modern Reservation transaction resource. */ -export interface PriceSheetGetOptionalParams extends msRest.RequestOptionsBase { +export interface ModernReservationTransaction extends ReservationTransactionResource { /** - * @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 charge of the transaction. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - expand?: string; + readonly amount?: 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. + * 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; + readonly armSkuName?: string; /** - * @member {number} [top] May be used to limit the number of results to the - * top N results. + * The billing frequency, which can be either one-time or recurring. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - top?: number; + readonly billingFrequency?: string; + /** + * Billing profile Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileId?: string; + /** + * Billing profile name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileName?: string; + /** + * 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.** + */ + readonly currency?: string; + /** + * The description of the transaction. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly description?: string; + /** + * The date of the transaction + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly eventDate?: Date; + /** + * The type of the transaction (Purchase, Cancel, etc.) + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly eventType?: string; + /** + * Invoice Number + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoice?: string; + /** + * 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 invoiceId?: string; + /** + * Invoice Section Id + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceSectionId?: string; + /** + * Invoice Section Name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceSectionName?: string; + /** + * The subscription guid that makes the transaction. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly purchasingSubscriptionGuid?: string; + /** + * The subscription name that makes the transaction. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly purchasingSubscriptionName?: string; + /** + * The quantity of the transaction. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly quantity?: number; + /** + * The region of the transaction. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly region?: string; + /** + * 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 reservationOrderId?: string; + /** + * The name of the reservation order. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly reservationOrderName?: string; + /** + * This is the term of the transaction. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly term?: string; } /** - * @interface - * An interface representing PriceSheetGetByBillingPeriodOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * Reservation transaction resource. */ -export interface PriceSheetGetByBillingPeriodOptionalParams extends msRest.RequestOptionsBase { +export interface ReservationTransaction extends ReservationTransactionResource { /** - * @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 date of the transaction + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - expand?: string; + readonly eventDate?: Date; /** - * @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 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.** */ - skiptoken?: string; + readonly reservationOrderId?: string; /** - * @member {number} [top] May be used to limit the number of results to the - * top N results. + * The description of the transaction. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - top?: number; + readonly description?: string; + /** + * The type of the transaction (Purchase, Cancel, etc.) + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly eventType?: string; + /** + * The quantity of the transaction. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly quantity?: number; + /** + * The charge of the transaction. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly amount?: number; + /** + * 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.** + */ + readonly currency?: string; + /** + * The name of the reservation order. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly reservationOrderName?: string; + /** + * The purchasing enrollment. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly purchasingEnrollment?: string; + /** + * The subscription guid that makes the transaction. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly purchasingSubscriptionGuid?: string; + /** + * The subscription name that makes the transaction. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly purchasingSubscriptionName?: string; + /** + * 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 armSkuName?: string; + /** + * This is the term of the transaction. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly term?: string; + /** + * The region of the transaction. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly region?: string; + /** + * The name of the account that makes the transaction. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly accountName?: string; + /** + * 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.** + */ + readonly accountOwnerEmail?: string; + /** + * The department name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly departmentName?: string; + /** + * 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 costCenter?: string; + /** + * The current enrollment. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly currentEnrollment?: string; + /** + * The billing frequency, which can be either one-time or recurring. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingFrequency?: string; } /** - * @interface - * An interface representing ForecastsListOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * Legacy Reservation transaction resource. */ -export interface ForecastsListOptionalParams extends msRest.RequestOptionsBase { - /** - * @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'. - */ - filter?: string; +export interface LegacyReservationTransaction extends ReservationTransaction { } /** - * @interface - * An interface representing AggregatedCostGetByManagementGroupOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * The tag resource. */ -export interface AggregatedCostGetByManagementGroupOptionalParams extends msRest.RequestOptionsBase { +export interface Tag { /** - * @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 (:). + * Tag key. */ - filter?: string; + key?: string; + /** + * Tag values. + */ + value?: string[]; } /** - * @interface - * An interface representing ChargesListByEnrollmentAccountOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * The Resource model definition. */ -export interface ChargesListByEnrollmentAccountOptionalParams extends msRest.RequestOptionsBase { +export interface ProxyResource extends BaseResource { /** - * @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 (:). + * Resource Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - filter?: string; + 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; + /** + * 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. + */ + eTag?: string; } /** - * @interface - * An interface representing ChargesListForBillingPeriodByEnrollmentAccountOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * A resource listing all tags. */ -export interface ChargesListForBillingPeriodByEnrollmentAccountOptionalParams extends msRest.RequestOptionsBase { +export interface TagsResult extends ProxyResource { /** - * @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 (:). + * A list of Tag. */ - filter?: string; + tags?: Tag[]; + /** + * 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; + /** + * The link (url) to the previous page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly previousLink?: string; } /** - * @interface - * An interface representing ChargesListByDepartmentOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * The start and end date for a budget. */ -export interface ChargesListByDepartmentOptionalParams extends msRest.RequestOptionsBase { +export interface BudgetTimePeriod { /** - * @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 (:). + * 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 ChargesListForBillingPeriodByDepartmentOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * The comparison expression to be used in the budgets. */ -export interface ChargesListForBillingPeriodByDepartmentOptionalParams extends msRest.RequestOptionsBase { +export interface BudgetComparisonExpression { /** - * @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 (:). + * The name of the column to use in comparison. */ - filter?: string; + name: string; + /** + * Array of values to use for comparison + */ + values: string[]; } /** - * @interface - * An interface representing ConsumptionManagementClientOptions. - * @extends AzureServiceClientOptions + * The Dimensions or Tags to filter a budget by. */ -export interface ConsumptionManagementClientOptions extends AzureServiceClientOptions { +export interface BudgetFilterProperties { /** - * @member {string} [baseUri] + * Has comparison expression for a dimension */ - baseUri?: string; + dimensions?: BudgetComparisonExpression; + /** + * Has comparison expression for a tag + */ + tags?: BudgetComparisonExpression; } - /** - * @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 + * May be used to filter budgets by resource group, resource, or meter. */ -export interface UsageDetailsListResult extends Array { +export interface BudgetFilter { /** - * @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 logical "AND" expression. Must have at least 2 items. */ - readonly nextLink?: string; + and?: BudgetFilterProperties[]; + /** + * The logical "NOT" expression. + */ + not?: BudgetFilterProperties; + /** + * Has comparison expression for a dimension + */ + dimensions?: BudgetComparisonExpression; + /** + * Has comparison expression for a tag + */ + tags?: BudgetComparisonExpression; } /** - * @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 current amount of cost which is being tracked for a budget. */ -export interface MarketplacesListResult extends Array { +export interface CurrentSpend { /** - * @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 which is being tracked by the budget. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly nextLink?: string; + readonly amount?: number; + /** + * The unit of measure for the budget amount. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly unit?: string; } /** - * @interface - * An interface representing the ReservationSummariesListResult. - * Result of listing reservation summaries. - * - * @extends Array + * The notification associated with a budget. */ -export interface ReservationSummariesListResult extends Array { +export interface Notification { /** - * @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 notification is enabled or not. */ - readonly nextLink?: string; -} - -/** - * @interface - * An interface representing the ReservationDetailsListResult. - * Result of listing reservation details. - * - * @extends Array - */ -export interface ReservationDetailsListResult extends Array { + enabled: boolean; /** - * @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 comparison operator. Possible values include: 'EqualTo', 'GreaterThan', + * 'GreaterThanOrEqualTo' */ - readonly nextLink?: string; + operator: OperatorType; + /** + * 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. + */ + threshold: number; + /** + * Email addresses to send the budget notification to when the threshold is exceeded. Must have + * at least one contact email or contact group specified at the Subscription or Resource Group + * scopes. All other scopes must have at least one contact email specified. + */ + contactEmails: string[]; + /** + * Contact roles to send the budget notification to when the threshold is exceeded. + */ + contactRoles?: string[]; + /** + * Action groups to send the budget notification to when the threshold is exceeded. Must be + * provided as a fully qualified Azure resource id. Only supported at Subscription or Resource + * Group scopes. + */ + contactGroups?: string[]; + /** + * The type of threshold. Possible values include: 'Actual'. Default value: 'Actual'. + */ + thresholdType?: ThresholdType; } /** - * @interface - * An interface representing the ReservationRecommendationsListResult. - * Result of listing reservation recommendations. - * - * @extends Array + * The forecasted cost which is being tracked for a budget. */ -export interface ReservationRecommendationsListResult extends Array { +export interface ForecastSpend { /** - * @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 forecasted cost for the total time period which is being tracked by the budget. This value + * is only provided if the budget contains a forecast alert type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly nextLink?: string; + readonly amount?: number; + /** + * The unit of measure for the budget amount. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly unit?: string; } /** - * @interface - * An interface representing the BudgetsListResult. - * Result of listing budgets. It contains a list of available budgets in the - * scope provided. - * - * @extends Array + * A budget resource. */ -export interface BudgetsListResult extends Array { +export interface Budget extends ProxyResource { /** - * @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. + * BillingMonth, BillingQuarter, and BillingAnnual are only supported by WD customers. 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 twelve 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 user-specified dimensions and/or tags. + */ + filter?: BudgetFilter; + /** + * 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 }; + /** + * The forecasted cost which is being tracked for a budget. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly forecastSpend?: ForecastSpend; } /** - * @interface - * An interface representing the ForecastsListResult. - * Result of listing forecasts. It contains a list of available forecasts. - * - * @extends Array + * The properties of the price sheet. */ -export interface ForecastsListResult extends Array { +export interface PriceSheetProperties { + /** + * 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 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 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 + * An pricesheet resource. */ -export interface OperationListResult 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] 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 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; + /** + * Pricesheet download details. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly download?: MeterDetails; } /** - * Defines values for BillingFrequency. - * Possible values include: 'Month', 'Quarter', 'Year' - * @readonly - * @enum {string} - */ -export type BillingFrequency = 'Month' | 'Quarter' | 'Year'; - -/** - * Defines values for CategoryType. - * Possible values include: 'Cost', 'Usage' - * @readonly - * @enum {string} - */ -export type CategoryType = 'Cost' | 'Usage'; - -/** - * Defines values for TimeGrainType. - * Possible values include: 'Monthly', 'Quarterly', 'Annually' - * @readonly - * @enum {string} + * The properties of the price sheet download. */ -export type TimeGrainType = 'Monthly' | 'Quarterly' | 'Annually'; +export interface DownloadProperties { + /** + * The link (url) to download the pricesheet. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly downloadUrl?: string; + /** + * Download link validity. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly validTill?: string; +} /** - * Defines values for OperatorType. - * Possible values include: 'EqualTo', 'GreaterThan', 'GreaterThanOrEqualTo' - * @readonly - * @enum {string} + * An interface representing ForecastPropertiesConfidenceLevelsItem. */ -export type OperatorType = 'EqualTo' | 'GreaterThan' | 'GreaterThanOrEqualTo'; +export interface ForecastPropertiesConfidenceLevelsItem { + /** + * The percentage level of the confidence + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + 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; +} /** - * Defines values for Grain. - * Possible values include: 'Daily', 'Monthly', 'Yearly' - * @readonly - * @enum {string} + * A forecast resource. */ -export type Grain = 'Daily' | 'Monthly' | 'Yearly'; +export interface Forecast extends Resource { + /** + * The usage date of the forecast. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly usageDate?: string; + /** + * The granularity of forecast. Please note that Yearly is not currently supported in this API. + * The API will provide responses in the Monthly grain if Yearly is selected. To get yearly grain + * data, please use our newer Forecast API. 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[]; +} /** - * Defines values for ChargeType. - * Possible values include: 'Actual', 'Forecast' - * @readonly - * @enum {string} + * A management group aggregated cost resource. */ -export type ChargeType = 'Actual' | 'Forecast'; +export interface ManagementGroupAggregatedCostResult extends Resource { + /** + * 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 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[]; +} /** - * Defines values for Bound. - * Possible values include: 'Upper', 'Lower' - * @readonly - * @enum {string} + * Contains the possible cases for ChargeSummary. */ -export type Bound = 'Upper' | 'Lower'; +export type ChargeSummaryUnion = ChargeSummary | LegacyChargeSummary | ModernChargeSummary; /** - * Defines values for Datagrain. - * Possible values include: 'DailyGrain', 'MonthlyGrain' - * @readonly - * @enum {string} + * A charge summary resource. */ -export type Datagrain = 'daily' | 'monthly'; +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 etag. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly etag?: string; + /** + * Resource tags. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly tags?: { [propertyName: string]: string }; +} /** - * Contains response data for the list operation. + * Result of listing charge summary. */ -export type UsageDetailsListResponse = UsageDetailsListResult & { +export interface ChargesListResult { /** - * The underlying HTTP response. + * The list of charge 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 value?: ChargeSummaryUnion[]; +} /** - * Contains response data for the listByBillingPeriod operation. + * Legacy charge summary. */ -export type UsageDetailsListByBillingPeriodResponse = UsageDetailsListResult & { +export interface LegacyChargeSummary { /** - * The underlying HTTP response. + * Polymorphic Discriminator */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: UsageDetailsListResult; - }; -}; + 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 etag. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly etag?: 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; +} + +/** + * Modern charge summary. + */ +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 etag. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly etag?: 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; +} + +/** + * The details of the error. + */ +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; +} + +/** + * The details of the error. + */ +export interface HighCasedErrorDetails { + /** + * 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; +} + +/** + * Error response indicates that the service is not able to process the incoming request. The + * reason is provided in the error message. + * + * Some Error responses: + * + * * 429 TooManyRequests - Request is throttled. Retry after waiting for the time specified in the + * "x-ms-ratelimit-microsoft.consumption-retry-after" header. + * + * * 503 ServiceUnavailable - Service is temporarily unavailable. Retry after waiting for the time + * specified in the "Retry-After" header. + */ +export interface HighCasedErrorResponse { + /** + * The details of the error. + */ + error?: HighCasedErrorDetails; +} + +/** + * Error response indicates that the service is not able to process the incoming request. The + * reason is provided in the error message. + * + * Some Error responses: + * + * * 429 TooManyRequests - Request is throttled. Retry after waiting for the time specified in the + * "x-ms-ratelimit-microsoft.consumption-retry-after" header. + * + * * 503 ServiceUnavailable - Service is temporarily unavailable. Retry after waiting for the time + * specified in the "Retry-After" header. + */ +export interface ErrorResponse { + /** + * The details of the error. + */ + error?: ErrorDetails; +} + +/** + * The object that represents the operation. + */ +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; + /** + * Description of the operation. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly description?: string; +} + +/** + * A Consumption REST API operation. + */ +export interface Operation { + /** + * Operation Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * 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; +} + +/** + * An event summary resource. + */ +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; +} + +/** + * A lot summary resource. + */ +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; +} + +/** + * Summary of credit balances. + */ +export interface CreditBalanceSummary { + /** + * Estimated balance. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly estimatedBalance?: Amount; + /** + * Current balance. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly currentBalance?: Amount; +} + +/** + * A credit summary resource. + */ +export interface CreditSummary extends Resource { + /** + * Summary of balances associated with this credit summary. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + 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; +} + +/** + * Optional Parameters. + */ +export interface UsageDetailsListOptionalParams extends msRest.RequestOptionsBase { + /** + * 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. + */ + 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; +} + +/** + * Optional Parameters. + */ +export interface UsageDetailsListNextOptionalParams extends msRest.RequestOptionsBase { + /** + * 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. + */ + 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; +} + +/** + * Optional Parameters. + */ +export interface MarketplacesListOptionalParams extends msRest.RequestOptionsBase { + /** + * 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; + /** + * 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; +} + +/** + * Optional Parameters. + */ +export interface MarketplacesListNextOptionalParams extends msRest.RequestOptionsBase { + /** + * 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; + /** + * 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; +} + +/** + * Optional Parameters. + */ +export interface ChargesListOptionalParams extends msRest.RequestOptionsBase { + /** + * Start date + */ + 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; +} + +/** + * Optional Parameters. + */ +export interface ReservationsSummariesListByReservationOrderOptionalParams extends msRest.RequestOptionsBase { + /** + * Required only for daily grain. The properties/UsageDate for start date and end date. The + * filter supports 'le' and 'ge' + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface ReservationsSummariesListByReservationOrderAndReservationOptionalParams extends msRest.RequestOptionsBase { + /** + * Required only for daily grain. The properties/UsageDate for start date and end date. The + * filter supports 'le' and 'ge' + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface ReservationsSummariesListOptionalParams extends msRest.RequestOptionsBase { + /** + * Start date. Only applicable when querying with billing profile + */ + startDate?: string; + /** + * End date. Only applicable when querying with billing profile + */ + endDate?: string; + /** + * Required only for daily grain. The properties/UsageDate for start date and end date. The + * filter supports 'le' and 'ge'. Not applicable when querying with billing profile + */ + filter?: string; + /** + * Reservation Id GUID. Only valid if reservationOrderId is also provided. Filter to a specific + * reservation + */ + reservationId?: string; + /** + * Reservation Order Id GUID. Required if reservationId is provided. Filter to a specific + * reservation order + */ + reservationOrderId?: string; +} + +/** + * Optional Parameters. + */ +export interface ReservationsSummariesListByReservationOrderNextOptionalParams extends msRest.RequestOptionsBase { + /** + * 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 listByBillingAccount operation. + * Optional Parameters. */ -export type UsageDetailsListByBillingAccountResponse = UsageDetailsListResult & { +export interface ReservationsSummariesListByReservationOrderAndReservationNextOptionalParams 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 listForBillingPeriodByBillingAccount operation. + * Optional Parameters. */ -export type UsageDetailsListForBillingPeriodByBillingAccountResponse = UsageDetailsListResult & { +export interface ReservationsSummariesListNextOptionalParams extends msRest.RequestOptionsBase { /** - * The underlying HTTP response. + * Start date. Only applicable when querying with billing profile */ - _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. Only applicable when querying with billing profile + */ + endDate?: string; + /** + * Required only for daily grain. The properties/UsageDate for start date and end date. The + * filter supports 'le' and 'ge'. Not applicable when querying with billing profile + */ + filter?: string; + /** + * Reservation Id GUID. Only valid if reservationOrderId is also provided. Filter to a specific + * reservation + */ + reservationId?: string; + /** + * Reservation Order Id GUID. Required if reservationId is provided. Filter to a specific + * reservation order + */ + reservationOrderId?: string; +} /** - * Contains response data for the listByDepartment operation. + * Optional Parameters. */ -export type UsageDetailsListByDepartmentResponse = UsageDetailsListResult & { +export interface ReservationsDetailsListOptionalParams extends msRest.RequestOptionsBase { /** - * The underlying HTTP response. + * Start date. Only applicable when querying with billing profile */ - _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. Only applicable when querying with billing profile + */ + endDate?: string; + /** + * Filter reservation details by date range. The properties/UsageDate for start date and end + * date. The filter supports 'le' and 'ge'. Not applicable when querying with billing profile + */ + filter?: string; + /** + * Reservation Id GUID. Only valid if reservationOrderId is also provided. Filter to a specific + * reservation + */ + reservationId?: string; + /** + * Reservation Order Id GUID. Required if reservationId is provided. Filter to a specific + * reservation order + */ + reservationOrderId?: string; +} /** - * Contains response data for the listForBillingPeriodByDepartment operation. + * Optional Parameters. */ -export type UsageDetailsListForBillingPeriodByDepartmentResponse = UsageDetailsListResult & { +export interface ReservationsDetailsListNextOptionalParams extends msRest.RequestOptionsBase { /** - * The underlying HTTP response. + * Start date. Only applicable when querying with billing profile */ - _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. Only applicable when querying with billing profile + */ + endDate?: string; + /** + * Filter reservation details by date range. The properties/UsageDate for start date and end + * date. The filter supports 'le' and 'ge'. Not applicable when querying with billing profile + */ + filter?: string; + /** + * Reservation Id GUID. Only valid if reservationOrderId is also provided. Filter to a specific + * reservation + */ + reservationId?: string; + /** + * Reservation Order Id GUID. Required if reservationId is provided. Filter to a specific + * reservation order + */ + reservationOrderId?: string; +} /** - * Contains response data for the listByEnrollmentAccount operation. + * Optional Parameters. */ -export type UsageDetailsListByEnrollmentAccountResponse = UsageDetailsListResult & { +export interface ReservationRecommendationsListOptionalParams extends msRest.RequestOptionsBase { /** - * The underlying HTTP response. + * May be used to filter reservationRecommendations by: properties/scope with allowed values + * ['Single', 'Shared'] and default value 'Single'; properties/resourceType with allowed values + * ['VirtualMachines', 'SQLDatabases', 'PostgreSQL', 'ManagedDisk', 'MySQL', 'RedHat', 'MariaDB', + * 'RedisCache', 'CosmosDB', 'SqlDataWarehouse', 'SUSELinux', 'AppService', 'BlockBlob', + * 'AzureDataExplorer', 'VMwareCloudSimple'] and default value 'VirtualMachines'; and + * properties/lookBackPeriod with allowed values ['Last7Days', 'Last30Days', 'Last60Days'] and + * default value 'Last7Days'. */ - _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 ReservationRecommendationsListNextOptionalParams extends msRest.RequestOptionsBase { /** - * The underlying HTTP response. + * May be used to filter reservationRecommendations by: properties/scope with allowed values + * ['Single', 'Shared'] and default value 'Single'; properties/resourceType with allowed values + * ['VirtualMachines', 'SQLDatabases', 'PostgreSQL', 'ManagedDisk', 'MySQL', 'RedHat', 'MariaDB', + * 'RedisCache', 'CosmosDB', 'SqlDataWarehouse', 'SUSELinux', 'AppService', 'BlockBlob', + * 'AzureDataExplorer', 'VMwareCloudSimple'] and default value 'VirtualMachines'; and + * properties/lookBackPeriod with allowed values ['Last7Days', 'Last30Days', 'Last60Days'] and + * default value 'Last7Days'. */ - _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 listByManagementGroup operation. + * Optional Parameters. */ -export type UsageDetailsListByManagementGroupResponse = UsageDetailsListResult & { +export interface ReservationTransactionsListOptionalParams extends msRest.RequestOptionsBase { /** - * The underlying HTTP response. + * Filter reservation transactions by date range. The properties/EventDate 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 listForBillingPeriodByManagementGroup operation. + * Optional Parameters. */ -export type UsageDetailsListForBillingPeriodByManagementGroupResponse = UsageDetailsListResult & { +export interface ReservationTransactionsListByBillingProfileOptionalParams extends msRest.RequestOptionsBase { /** - * The underlying HTTP response. + * Filter reservation transactions by date range. The properties/EventDate 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 listNext operation. + * Optional Parameters. */ -export type UsageDetailsListNextResponse = UsageDetailsListResult & { +export interface ReservationTransactionsListNextOptionalParams extends msRest.RequestOptionsBase { /** - * The underlying HTTP response. + * Filter reservation transactions by date range. The properties/EventDate 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 ReservationTransactionsListByBillingProfileNextOptionalParams extends msRest.RequestOptionsBase { /** - * The underlying HTTP response. + * Filter reservation transactions by date range. The properties/EventDate 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 listByBillingAccountNext operation. + * Optional Parameters. */ -export type UsageDetailsListByBillingAccountNextResponse = 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 listForBillingPeriodByBillingAccountNext operation. + * Optional Parameters. */ -export type UsageDetailsListForBillingPeriodByBillingAccountNextResponse = 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; +} + +/** + * Optional Parameters. + */ +export interface ForecastsListOptionalParams extends msRest.RequestOptionsBase { + /** + * 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'. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface AggregatedCostGetByManagementGroupOptionalParams extends msRest.RequestOptionsBase { + /** + * 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 (:). + */ + filter?: string; +} + +/** + * An interface representing ConsumptionManagementClientOptions. + */ +export interface ConsumptionManagementClientOptions extends AzureServiceClientOptions { + baseUri?: string; +} + +/** + * @interface + * 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 { + /** + * 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; +} /** - * Contains response data for the listByDepartmentNext operation. + * @interface + * Result of listing marketplaces. It contains a list of available marketplaces in reverse + * chronological order by billing period. + * @extends Array */ -export type UsageDetailsListByDepartmentNextResponse = 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 listForBillingPeriodByDepartmentNext operation. + * @interface + * Result of listing budgets. It contains a list of available budgets in the scope provided. + * @extends Array */ -export type UsageDetailsListForBillingPeriodByDepartmentNextResponse = 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 listByEnrollmentAccountNext operation. + * @interface + * Result of listing reservation summaries. + * @extends Array */ -export type UsageDetailsListByEnrollmentAccountNextResponse = 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 listForBillingPeriodByEnrollmentAccountNext operation. + * @interface + * Result of listing reservation details. + * @extends Array */ -export type UsageDetailsListForBillingPeriodByEnrollmentAccountNextResponse = 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 listByManagementGroupNext operation. + * @interface + * Result of listing reservation recommendations. + * @extends Array */ -export type UsageDetailsListByManagementGroupNextResponse = UsageDetailsListResult & { +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: UsageDetailsListResult; - }; -}; + readonly nextLink?: string; + /** + * The link (url) to the previous page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly previousLink?: string; +} /** - * Contains response data for the listForBillingPeriodByManagementGroupNext operation. + * @interface + * Result of listing reservation recommendations. + * @extends Array */ -export type UsageDetailsListForBillingPeriodByManagementGroupNextResponse = UsageDetailsListResult & { +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: 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 ModernReservationTransactionsListResult 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; +} + +/** + * @interface + * Result of listing forecasts. It contains a list of available forecasts. + * @extends Array + */ +export interface ForecastsListResult extends Array { +} /** - * Contains response data for the listByBillingPeriod 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 MarketplacesListByBillingPeriodResponse = 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 listByBillingAccount operation. + * @interface + * Result of listing event summary. + * @extends Array */ -export type MarketplacesListByBillingAccountResponse = 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 listForBillingPeriodByBillingAccount operation. + * @interface + * Result of listing lot summary. + * @extends Array */ -export type MarketplacesListForBillingPeriodByBillingAccountResponse = 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'; + +/** + * 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 ThresholdType. + * Possible values include: 'Actual' + * @readonly + * @enum {string} + */ +export type ThresholdType = 'Actual'; + +/** + * 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'; + +/** + * Defines values for LotSource. + * Possible values include: 'PurchasedCredit', 'PromotionalCredit' + * @readonly + * @enum {string} + */ +export type LotSource = 'PurchasedCredit' | 'PromotionalCredit'; + +/** + * Defines values for Datagrain. + * Possible values include: 'DailyGrain', 'MonthlyGrain' + * @readonly + * @enum {string} + */ +export type Datagrain = 'daily' | 'monthly'; + +/** + * Defines values for Metrictype. + * Possible values include: 'ActualCostMetricType', 'AmortizedCostMetricType', 'UsageMetricType' + * @readonly + * @enum {string} + */ +export type Metrictype = 'actualcost' | 'amortizedcost' | 'usage'; + +/** + * Defines values for Term. + * Possible values include: 'P1Y', 'P3Y' + * @readonly + * @enum {string} + */ +export type Term = 'P1Y' | 'P3Y'; /** - * Contains response data for the listByDepartment operation. + * Defines values for LookBackPeriod. + * Possible values include: 'Last07Days', 'Last30Days', 'Last60Days' + * @readonly + * @enum {string} */ -export type MarketplacesListByDepartmentResponse = 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 LookBackPeriod = 'Last7Days' | 'Last30Days' | 'Last60Days'; /** - * Contains response data for the listForBillingPeriodByDepartment operation. + * Defines values for Scope10. + * Possible values include: 'Single', 'Shared' + * @readonly + * @enum {string} */ -export type MarketplacesListForBillingPeriodByDepartmentResponse = 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 Scope10 = 'Single' | 'Shared'; /** - * Contains response data for the listByEnrollmentAccount operation. + * Defines values for Scope12. + * Possible values include: 'Single', 'Shared' + * @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 Scope12 = 'Single' | 'Shared'; /** - * Contains response data for the listForBillingPeriodByEnrollmentAccount operation. + * Contains response data for the list operation. */ -export type MarketplacesListForBillingPeriodByEnrollmentAccountResponse = MarketplacesListResult & { +export type UsageDetailsListResponse = UsageDetailsListResult & { /** * The underlying HTTP response. */ @@ -3201,17 +3645,18 @@ export type MarketplacesListForBillingPeriodByEnrollmentAccountResponse = Market * 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 listByManagementGroup operation. + * Contains response data for the listNext operation. */ -export type MarketplacesListByManagementGroupResponse = MarketplacesListResult & { +export type UsageDetailsListNextResponse = UsageDetailsListResult & { /** * The underlying HTTP response. */ @@ -3220,17 +3665,18 @@ export type MarketplacesListByManagementGroupResponse = 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 listForBillingPeriodByManagementGroup operation. + * Contains response data for the list operation. */ -export type MarketplacesListForBillingPeriodByManagementGroupResponse = MarketplacesListResult & { +export type MarketplacesListResponse = MarketplacesListResult & { /** * The underlying HTTP response. */ @@ -3239,6 +3685,7 @@ export type MarketplacesListForBillingPeriodByManagementGroupResponse = Marketpl * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -3258,25 +3705,7 @@ export type MarketplacesListNextResponse = MarketplacesListResult & { * The response body as text (string format) */ bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: MarketplacesListResult; - }; -}; -/** - * Contains response data for the listByBillingPeriodNext operation. - */ -export type MarketplacesListByBillingPeriodNextResponse = 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 */ @@ -3285,9 +3714,9 @@ export type MarketplacesListByBillingPeriodNextResponse = MarketplacesListResult }; /** - * Contains response data for the listByBillingAccountNext operation. + * Contains response data for the list operation. */ -export type MarketplacesListByBillingAccountNextResponse = MarketplacesListResult & { +export type BudgetsListResponse = BudgetsListResult & { /** * The underlying HTTP response. */ @@ -3296,17 +3725,18 @@ export type MarketplacesListByBillingAccountNextResponse = MarketplacesListResul * 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 listForBillingPeriodByBillingAccountNext operation. + * Contains response data for the get operation. */ -export type MarketplacesListForBillingPeriodByBillingAccountNextResponse = MarketplacesListResult & { +export type BudgetsGetResponse = Budget & { /** * The underlying HTTP response. */ @@ -3315,17 +3745,18 @@ export type MarketplacesListForBillingPeriodByBillingAccountNextResponse = Marke * 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 listByDepartmentNext operation. + * Contains response data for the createOrUpdate operation. */ -export type MarketplacesListByDepartmentNextResponse = MarketplacesListResult & { +export type BudgetsCreateOrUpdateResponse = Budget & { /** * The underlying HTTP response. */ @@ -3334,17 +3765,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: Budget; }; }; /** - * Contains response data for the listForBillingPeriodByDepartmentNext operation. + * Contains response data for the listNext operation. */ -export type MarketplacesListForBillingPeriodByDepartmentNextResponse = MarketplacesListResult & { +export type BudgetsListNextResponse = BudgetsListResult & { /** * The underlying HTTP response. */ @@ -3353,17 +3785,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: BudgetsListResult; }; }; /** - * Contains response data for the listByEnrollmentAccountNext operation. + * Contains response data for the get operation. */ -export type MarketplacesListByEnrollmentAccountNextResponse = MarketplacesListResult & { +export type TagsGetResponse = TagsResult & { /** * The underlying HTTP response. */ @@ -3372,17 +3805,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: TagsResult; }; }; /** - * Contains response data for the listForBillingPeriodByEnrollmentAccountNext operation. + * Contains response data for the list operation. */ -export type MarketplacesListForBillingPeriodByEnrollmentAccountNextResponse = MarketplacesListResult & { +export type ChargesListResponse = ChargesListResult & { /** * The underlying HTTP response. */ @@ -3391,17 +3825,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: ChargesListResult; }; }; /** - * Contains response data for the listByManagementGroupNext operation. + * Contains response data for the getByBillingAccount operation. */ -export type MarketplacesListByManagementGroupNextResponse = MarketplacesListResult & { +export type BalancesGetByBillingAccountResponse = Balance & { /** * The underlying HTTP response. */ @@ -3410,17 +3845,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: Balance; }; }; /** - * Contains response data for the listForBillingPeriodByManagementGroupNext operation. + * Contains response data for the getForBillingPeriodByBillingAccount operation. */ -export type MarketplacesListForBillingPeriodByManagementGroupNextResponse = MarketplacesListResult & { +export type BalancesGetForBillingPeriodByBillingAccountResponse = Balance & { /** * The underlying HTTP response. */ @@ -3429,17 +3865,18 @@ export type MarketplacesListForBillingPeriodByManagementGroupNextResponse = Mark * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: MarketplacesListResult; + parsedBody: Balance; }; }; /** - * Contains response data for the getByBillingAccount operation. + * Contains response data for the listByReservationOrder operation. */ -export type BalancesGetByBillingAccountResponse = Balance & { +export type ReservationsSummariesListByReservationOrderResponse = ReservationSummariesListResult & { /** * The underlying HTTP response. */ @@ -3448,17 +3885,18 @@ export type BalancesGetByBillingAccountResponse = Balance & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: Balance; + parsedBody: ReservationSummariesListResult; }; }; /** - * Contains response data for the getForBillingPeriodByBillingAccount operation. + * Contains response data for the listByReservationOrderAndReservation operation. */ -export type BalancesGetForBillingPeriodByBillingAccountResponse = Balance & { +export type ReservationsSummariesListByReservationOrderAndReservationResponse = ReservationSummariesListResult & { /** * The underlying HTTP response. */ @@ -3467,17 +3905,18 @@ export type BalancesGetForBillingPeriodByBillingAccountResponse = Balance & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: Balance; + parsedBody: ReservationSummariesListResult; }; }; /** - * Contains response data for the listByReservationOrder operation. + * Contains response data for the list operation. */ -export type ReservationsSummariesListByReservationOrderResponse = ReservationSummariesListResult & { +export type ReservationsSummariesListResponse = ReservationSummariesListResult & { /** * The underlying HTTP response. */ @@ -3486,6 +3925,7 @@ export type ReservationsSummariesListByReservationOrderResponse = ReservationSum * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -3494,9 +3934,9 @@ export type ReservationsSummariesListByReservationOrderResponse = ReservationSum }; /** - * Contains response data for the listByReservationOrderAndReservation operation. + * Contains response data for the listByReservationOrderNext operation. */ -export type ReservationsSummariesListByReservationOrderAndReservationResponse = ReservationSummariesListResult & { +export type ReservationsSummariesListByReservationOrderNextResponse = ReservationSummariesListResult & { /** * The underlying HTTP response. */ @@ -3505,6 +3945,7 @@ export type ReservationsSummariesListByReservationOrderAndReservationResponse = * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -3513,9 +3954,9 @@ export type ReservationsSummariesListByReservationOrderAndReservationResponse = }; /** - * Contains response data for the listByReservationOrderNext operation. + * Contains response data for the listByReservationOrderAndReservationNext operation. */ -export type ReservationsSummariesListByReservationOrderNextResponse = ReservationSummariesListResult & { +export type ReservationsSummariesListByReservationOrderAndReservationNextResponse = ReservationSummariesListResult & { /** * The underlying HTTP response. */ @@ -3524,6 +3965,7 @@ export type ReservationsSummariesListByReservationOrderNextResponse = Reservatio * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -3532,9 +3974,9 @@ export type ReservationsSummariesListByReservationOrderNextResponse = Reservatio }; /** - * Contains response data for the listByReservationOrderAndReservationNext operation. + * Contains response data for the listNext operation. */ -export type ReservationsSummariesListByReservationOrderAndReservationNextResponse = ReservationSummariesListResult & { +export type ReservationsSummariesListNextResponse = ReservationSummariesListResult & { /** * The underlying HTTP response. */ @@ -3543,6 +3985,7 @@ export type ReservationsSummariesListByReservationOrderAndReservationNextRespons * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -3562,6 +4005,7 @@ export type ReservationsDetailsListByReservationOrderResponse = ReservationDetai * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -3581,6 +4025,7 @@ export type ReservationsDetailsListByReservationOrderAndReservationResponse = Re * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -3589,9 +4034,9 @@ export type ReservationsDetailsListByReservationOrderAndReservationResponse = Re }; /** - * Contains response data for the listByReservationOrderNext operation. + * Contains response data for the list operation. */ -export type ReservationsDetailsListByReservationOrderNextResponse = ReservationDetailsListResult & { +export type ReservationsDetailsListResponse = ReservationDetailsListResult & { /** * The underlying HTTP response. */ @@ -3600,6 +4045,7 @@ export type ReservationsDetailsListByReservationOrderNextResponse = ReservationD * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -3608,9 +4054,9 @@ export type ReservationsDetailsListByReservationOrderNextResponse = ReservationD }; /** - * Contains response data for the listByReservationOrderAndReservationNext operation. + * Contains response data for the listByReservationOrderNext operation. */ -export type ReservationsDetailsListByReservationOrderAndReservationNextResponse = ReservationDetailsListResult & { +export type ReservationsDetailsListByReservationOrderNextResponse = ReservationDetailsListResult & { /** * The underlying HTTP response. */ @@ -3619,6 +4065,7 @@ export type ReservationsDetailsListByReservationOrderAndReservationNextResponse * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -3627,9 +4074,9 @@ export type ReservationsDetailsListByReservationOrderAndReservationNextResponse }; /** - * Contains response data for the list operation. + * Contains response data for the listByReservationOrderAndReservationNext operation. */ -export type ReservationRecommendationsListResponse = ReservationRecommendationsListResult & { +export type ReservationsDetailsListByReservationOrderAndReservationNextResponse = ReservationDetailsListResult & { /** * The underlying HTTP response. */ @@ -3638,17 +4085,18 @@ export type ReservationRecommendationsListResponse = ReservationRecommendationsL * 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 listNext operation. */ -export type ReservationRecommendationsListNextResponse = ReservationRecommendationsListResult & { +export type ReservationsDetailsListNextResponse = ReservationDetailsListResult & { /** * The underlying HTTP response. */ @@ -3657,17 +4105,18 @@ export type ReservationRecommendationsListNextResponse = ReservationRecommendati * 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. */ -export type BudgetsListResponse = BudgetsListResult & { +export type ReservationRecommendationsListResponse = ReservationRecommendationsListResult & { /** * The underlying HTTP response. */ @@ -3676,17 +4125,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: ReservationRecommendationsListResult; }; }; /** - * Contains response data for the listByResourceGroupName operation. + * Contains response data for the listNext operation. */ -export type BudgetsListByResourceGroupNameResponse = BudgetsListResult & { +export type ReservationRecommendationsListNextResponse = ReservationRecommendationsListResult & { /** * The underlying HTTP response. */ @@ -3695,17 +4145,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: ReservationRecommendationsListResult; }; }; /** * Contains response data for the get operation. */ -export type BudgetsGetResponse = Budget & { +export type ReservationRecommendationDetailsGetResponse = ReservationRecommendationDetailsModel & { /** * The underlying HTTP response. */ @@ -3714,36 +4165,18 @@ export type BudgetsGetResponse = Budget & { * The response body as text (string format) */ bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: Budget; - }; -}; -/** - * Contains response data for the createOrUpdate operation. - */ -export type BudgetsCreateOrUpdateResponse = Budget & { - /** - * 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: Budget; + parsedBody: ReservationRecommendationDetailsModel; }; }; /** - * Contains response data for the getByResourceGroupName operation. + * Contains response data for the list operation. */ -export type BudgetsGetByResourceGroupNameResponse = Budget & { +export type ReservationTransactionsListResponse = ReservationTransactionsListResult & { /** * The underlying HTTP response. */ @@ -3752,17 +4185,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: ReservationTransactionsListResult; }; }; /** - * Contains response data for the createOrUpdateByResourceGroupName operation. + * Contains response data for the listByBillingProfile operation. */ -export type BudgetsCreateOrUpdateByResourceGroupNameResponse = Budget & { +export type ReservationTransactionsListByBillingProfileResponse = ModernReservationTransactionsListResult & { /** * The underlying HTTP response. */ @@ -3771,17 +4205,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: ModernReservationTransactionsListResult; }; }; /** * Contains response data for the listNext operation. */ -export type BudgetsListNextResponse = BudgetsListResult & { +export type ReservationTransactionsListNextResponse = ReservationTransactionsListResult & { /** * The underlying HTTP response. */ @@ -3790,17 +4225,18 @@ export type BudgetsListNextResponse = BudgetsListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: BudgetsListResult; + parsedBody: ReservationTransactionsListResult; }; }; /** - * Contains response data for the listByResourceGroupNameNext operation. + * Contains response data for the listByBillingProfileNext operation. */ -export type BudgetsListByResourceGroupNameNextResponse = BudgetsListResult & { +export type ReservationTransactionsListByBillingProfileNextResponse = ModernReservationTransactionsListResult & { /** * The underlying HTTP response. */ @@ -3809,10 +4245,11 @@ export type BudgetsListByResourceGroupNameNextResponse = BudgetsListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: BudgetsListResult; + parsedBody: ModernReservationTransactionsListResult; }; }; @@ -3828,6 +4265,7 @@ export type PriceSheetGetResponse = PriceSheetResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -3847,6 +4285,7 @@ export type PriceSheetGetByBillingPeriodResponse = PriceSheetResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -3855,9 +4294,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 +4305,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 +4325,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 +4345,7 @@ export type OperationsListResponse = OperationListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -3912,9 +4354,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 +4365,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 +4385,7 @@ export type AggregatedCostGetByManagementGroupResponse = ManagementGroupAggregat * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -3950,9 +4394,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 +4405,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 +4425,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 +4445,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 +4465,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 +4485,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..f2b8f8591e8f --- /dev/null +++ b/sdk/consumption/arm-consumption/src/models/lotsOperationsMappers.ts @@ -0,0 +1,60 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * 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, + BudgetComparisonExpression, + BudgetFilter, + BudgetFilterProperties, + BudgetTimePeriod, + ChargeSummary, + CreditBalanceSummary, + CreditSummary, + CurrentSpend, + ErrorDetails, + ErrorResponse, + EventSummary, + Forecast, + ForecastPropertiesConfidenceLevelsItem, + ForecastSpend, + LegacyChargeSummary, + LegacyReservationTransaction, + LegacyUsageDetail, + Lots, + LotSummary, + ManagementGroupAggregatedCostResult, + Marketplace, + MeterDetails, + MeterDetailsResponse, + ModernChargeSummary, + ModernReservationTransaction, + ModernUsageDetail, + Notification, + PriceSheetProperties, + PriceSheetResult, + ProxyResource, + ReservationDetail, + ReservationRecommendationDetailsCalculatedSavingsProperties, + ReservationRecommendationDetailsModel, + ReservationRecommendationDetailsResourceProperties, + ReservationRecommendationDetailsSavingsProperties, + ReservationRecommendationDetailsUsageProperties, + ReservationSummary, + ReservationTransaction, + ReservationTransactionResource, + 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..8c57c5dd1fa4 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. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * 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"; @@ -114,6 +112,13 @@ export const Resource: msRest.CompositeMapper = { name: "String" } }, + etag: { + readOnly: true, + serializedName: "etag", + type: { + name: "String" + } + }, tags: { readOnly: true, serializedName: "tags", @@ -134,91 +139,168 @@ export const UsageDetail: msRest.CompositeMapper = { serializedName: "UsageDetail", type: { name: "Composite", + polymorphicDiscriminator: { + serializedName: "kind", + clientName: "kind" + }, + uberParent: "UsageDetail", 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", + polymorphicDiscriminator: UsageDetail.type.polymorphicDiscriminator, + uberParent: "UsageDetail", + 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 +315,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,430 +367,372 @@ 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: "String" + name: "Boolean" } }, - instanceName: { + term: { readOnly: true, - serializedName: "properties.instanceName", + serializedName: "properties.term", type: { name: "String" } }, - instanceId: { + publisherName: { readOnly: true, - serializedName: "properties.instanceId", + serializedName: "properties.publisherName", type: { name: "String" } }, - currency: { + publisherType: { readOnly: true, - serializedName: "properties.currency", + serializedName: "properties.publisherType", type: { name: "String" } }, - consumedQuantity: { + planName: { readOnly: true, - serializedName: "properties.consumedQuantity", + serializedName: "properties.planName", type: { - name: "Number" + name: "String" } }, - unitOfMeasure: { + chargeType: { readOnly: true, - serializedName: "properties.unitOfMeasure", + serializedName: "properties.chargeType", type: { name: "String" } }, - pretaxCost: { + frequency: { readOnly: true, - serializedName: "properties.pretaxCost", + serializedName: "properties.frequency", type: { - name: "Number" + name: "String" + } + } + } + } +}; + +export const ModernUsageDetail: msRest.CompositeMapper = { + serializedName: "modern", + type: { + name: "Composite", + polymorphicDiscriminator: UsageDetail.type.polymorphicDiscriminator, + uberParent: "UsageDetail", + className: "ModernUsageDetail", + modelProperties: { + ...UsageDetail.type.modelProperties, + billingAccountId: { + readOnly: true, + serializedName: "properties.billingAccountId", + type: { + name: "String" } }, - isEstimated: { + billingAccountName: { readOnly: true, - serializedName: "properties.isEstimated", + serializedName: "properties.billingAccountName", type: { - name: "Boolean" + name: "String" } }, - meterId: { + billingPeriodStartDate: { readOnly: true, - serializedName: "properties.meterId", + serializedName: "properties.billingPeriodStartDate", type: { - name: "Uuid" + name: "DateTime" } }, - subscriptionGuid: { + billingPeriodEndDate: { readOnly: true, - serializedName: "properties.subscriptionGuid", + serializedName: "properties.billingPeriodEndDate", type: { - name: "Uuid" + name: "DateTime" } }, - subscriptionName: { + billingProfileId: { readOnly: true, - serializedName: "properties.subscriptionName", + serializedName: "properties.billingProfileId", type: { name: "String" } }, - accountName: { + billingProfileName: { readOnly: true, - serializedName: "properties.accountName", + serializedName: "properties.billingProfileName", type: { name: "String" } }, - departmentName: { + subscriptionGuid: { readOnly: true, - serializedName: "properties.departmentName", + serializedName: "properties.subscriptionGuid", type: { name: "String" } }, - consumedService: { + subscriptionName: { readOnly: true, - serializedName: "properties.consumedService", + serializedName: "properties.subscriptionName", type: { name: "String" } }, - costCenter: { + date: { readOnly: true, - serializedName: "properties.costCenter", + serializedName: "properties.date", type: { - name: "String" + name: "DateTime" } }, - additionalProperties: { + product: { readOnly: true, - serializedName: "properties.additionalProperties", + serializedName: "properties.product", type: { name: "String" } }, - publisherName: { + meterId: { readOnly: true, - serializedName: "properties.publisherName", + serializedName: "properties.meterId", type: { - name: "String" + name: "Uuid" } }, - planName: { + meterName: { readOnly: true, - serializedName: "properties.planName", + serializedName: "properties.meterName", type: { name: "String" } }, - isRecurringCharge: { + meterRegion: { 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", + serializedName: "properties.meterRegion", 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: { + meterCategory: { readOnly: true, - serializedName: "name", + serializedName: "properties.meterCategory", type: { name: "String" } }, - value: { + meterSubCategory: { readOnly: true, - serializedName: "value", + serializedName: "properties.meterSubCategory", type: { - name: "Number" + name: "String" } - } - } - } -}; - -export const Balance: msRest.CompositeMapper = { - serializedName: "Balance", - type: { - name: "Composite", - className: "Balance", - modelProperties: { - ...Resource.type.modelProperties, - currency: { + }, + serviceFamily: { readOnly: true, - serializedName: "properties.currency", + serializedName: "properties.serviceFamily", type: { name: "String" } }, - beginningBalance: { + quantity: { readOnly: true, - serializedName: "properties.beginningBalance", + serializedName: "properties.quantity", type: { name: "Number" } }, - endingBalance: { + unitOfMeasure: { readOnly: true, - serializedName: "properties.endingBalance", + serializedName: "properties.unitOfMeasure", type: { - name: "Number" + name: "String" } }, - newPurchases: { + instanceName: { readOnly: true, - serializedName: "properties.newPurchases", + serializedName: "properties.instanceName", type: { - name: "Number" + name: "String" } }, - adjustments: { + costInUSD: { readOnly: true, - serializedName: "properties.adjustments", + serializedName: "properties.costInUSD", type: { name: "Number" } }, - utilized: { + unitPrice: { readOnly: true, - serializedName: "properties.utilized", + serializedName: "properties.unitPrice", type: { name: "Number" } }, - serviceOverage: { + billingCurrencyCode: { readOnly: true, - serializedName: "properties.serviceOverage", + serializedName: "properties.billingCurrencyCode", type: { - name: "Number" + name: "String" } }, - chargesBilledSeparately: { + resourceLocation: { readOnly: true, - serializedName: "properties.chargesBilledSeparately", + serializedName: "properties.resourceLocation", type: { - name: "Number" + name: "String" } }, - totalOverage: { + consumedService: { readOnly: true, - serializedName: "properties.totalOverage", + serializedName: "properties.consumedService", type: { - name: "Number" + name: "String" } }, - totalUsage: { + serviceInfo1: { readOnly: true, - serializedName: "properties.totalUsage", + serializedName: "properties.serviceInfo1", type: { - name: "Number" + name: "String" } }, - azureMarketplaceServiceCharges: { + serviceInfo2: { readOnly: true, - serializedName: "properties.azureMarketplaceServiceCharges", + serializedName: "properties.serviceInfo2", type: { - name: "Number" + name: "String" } }, - billingFrequency: { - serializedName: "properties.billingFrequency", + additionalInfo: { + readOnly: true, + serializedName: "properties.additionalInfo", type: { name: "String" } }, - priceHidden: { + invoiceSectionId: { readOnly: true, - serializedName: "properties.priceHidden", + serializedName: "properties.invoiceSectionId", type: { - name: "Boolean" + name: "String" } }, - newPurchasesDetails: { + invoiceSectionName: { readOnly: true, - serializedName: "properties.newPurchasesDetails", + serializedName: "properties.invoiceSectionName", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "BalancePropertiesNewPurchasesDetailsItem" - } - } + name: "String" } }, - adjustmentDetails: { + costCenter: { readOnly: true, - serializedName: "properties.adjustmentDetails", + serializedName: "properties.costCenter", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "BalancePropertiesAdjustmentDetailsItem" - } - } + name: "String" } - } - } - } -}; - -export const ReservationSummary: msRest.CompositeMapper = { - serializedName: "ReservationSummary", - type: { - name: "Composite", - className: "ReservationSummary", - modelProperties: { - ...Resource.type.modelProperties, - reservationOrderId: { + }, + resourceGroup: { readOnly: true, - serializedName: "properties.reservationOrderId", + serializedName: "properties.resourceGroup", type: { name: "String" } @@ -713,314 +744,2504 @@ export const ReservationSummary: msRest.CompositeMapper = { name: "String" } }, - skuName: { + reservationName: { readOnly: true, - serializedName: "properties.skuName", + serializedName: "properties.reservationName", type: { name: "String" } }, - reservedHours: { + productOrderId: { readOnly: true, - serializedName: "properties.reservedHours", + serializedName: "properties.productOrderId", type: { - name: "Number" + name: "String" } }, - usageDate: { + productOrderName: { readOnly: true, - serializedName: "properties.usageDate", + serializedName: "properties.productOrderName", type: { - name: "DateTime" + name: "String" } }, - usedHours: { + isAzureCreditEligible: { readOnly: true, - serializedName: "properties.usedHours", + serializedName: "properties.isAzureCreditEligible", type: { - name: "Number" + name: "Boolean" } }, - minUtilizationPercentage: { + term: { readOnly: true, - serializedName: "properties.minUtilizationPercentage", + serializedName: "properties.term", type: { - name: "Number" + name: "String" } }, - avgUtilizationPercentage: { + publisherName: { readOnly: true, - serializedName: "properties.avgUtilizationPercentage", + serializedName: "properties.publisherName", type: { - name: "Number" + name: "String" } }, - maxUtilizationPercentage: { + publisherType: { readOnly: true, - serializedName: "properties.maxUtilizationPercentage", + serializedName: "properties.publisherType", type: { - name: "Number" + name: "String" } - } - } - } -}; - -export const ReservationDetail: msRest.CompositeMapper = { - serializedName: "ReservationDetail", - type: { - name: "Composite", - className: "ReservationDetail", - modelProperties: { - ...Resource.type.modelProperties, - reservationOrderId: { + }, + chargeType: { readOnly: true, - serializedName: "properties.reservationOrderId", + serializedName: "properties.chargeType", type: { name: "String" } }, - reservationId: { + frequency: { readOnly: true, - serializedName: "properties.reservationId", + serializedName: "properties.frequency", type: { name: "String" } }, - skuName: { + costInBillingCurrency: { readOnly: true, - serializedName: "properties.skuName", + serializedName: "properties.costInBillingCurrency", type: { - name: "String" + name: "Number" } }, - reservedHours: { + costInPricingCurrency: { readOnly: true, - serializedName: "properties.reservedHours", + serializedName: "properties.costInPricingCurrency", type: { name: "Number" } }, - usageDate: { + exchangeRate: { readOnly: true, - serializedName: "properties.usageDate", + serializedName: "properties.exchangeRate", type: { - name: "DateTime" + name: "String" } }, - usedHours: { + exchangeRateDate: { readOnly: true, - serializedName: "properties.usedHours", + serializedName: "properties.exchangeRateDate", type: { - name: "Number" + name: "DateTime" } }, - instanceId: { + invoiceId: { readOnly: true, - serializedName: "properties.instanceId", + serializedName: "properties.invoiceId", type: { name: "String" } }, - totalReservedQuantity: { + previousInvoiceId: { readOnly: true, - serializedName: "properties.totalReservedQuantity", + serializedName: "properties.previousInvoiceId", type: { - name: "Number" + name: "String" } - } - } - } -}; - -export const ReservationRecommendation: msRest.CompositeMapper = { - serializedName: "ReservationRecommendation", - type: { - name: "Composite", - className: "ReservationRecommendation", - modelProperties: { - id: { + }, + pricingCurrencyCode: { readOnly: true, - serializedName: "id", + serializedName: "properties.pricingCurrencyCode", type: { name: "String" } }, - name: { + productIdentifier: { readOnly: true, - serializedName: "name", + serializedName: "properties.productIdentifier", type: { name: "String" } }, - type: { + resourceLocationNormalized: { readOnly: true, - serializedName: "type", + serializedName: "properties.resourceLocationNormalized", type: { name: "String" } }, - tags: { + servicePeriodStartDate: { readOnly: true, - serializedName: "tags", + serializedName: "properties.servicePeriodStartDate", type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } + name: "DateTime" } }, - location: { + servicePeriodEndDate: { readOnly: true, - serializedName: "location", + serializedName: "properties.servicePeriodEndDate", type: { - name: "String" + name: "DateTime" } }, - sku: { + customerTenantId: { readOnly: true, - serializedName: "sku", + serializedName: "properties.customerTenantId", type: { name: "String" } }, - lookBackPeriod: { + customerName: { readOnly: true, - serializedName: "properties.lookBackPeriod", + serializedName: "properties.customerName", type: { name: "String" } }, - meterId: { + partnerTenantId: { readOnly: true, - serializedName: "properties.meterId", + serializedName: "properties.partnerTenantId", type: { - name: "Uuid" + name: "String" } }, - term: { + partnerName: { readOnly: true, - serializedName: "properties.term", + serializedName: "properties.partnerName", type: { name: "String" } }, - costWithNoReservedInstances: { + resellerMpnId: { readOnly: true, - serializedName: "properties.costWithNoReservedInstances", + 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" } }, - recommendedQuantity: { + exchangeRatePricingToBilling: { readOnly: true, - serializedName: "properties.recommendedQuantity", + serializedName: "properties.exchangeRatePricingToBilling", type: { name: "Number" } }, - totalCostWithReservedInstances: { + paygCostInBillingCurrency: { readOnly: true, - serializedName: "properties.totalCostWithReservedInstances", + serializedName: "properties.paygCostInBillingCurrency", type: { name: "Number" } }, - netSavings: { + paygCostInUSD: { readOnly: true, - serializedName: "properties.netSavings", + serializedName: "properties.paygCostInUSD", type: { name: "Number" } }, - firstUsageDate: { + partnerEarnedCreditRate: { readOnly: true, - serializedName: "properties.firstUsageDate", + serializedName: "properties.partnerEarnedCreditRate", + type: { + name: "Number" + } + }, + partnerEarnedCreditApplied: { + readOnly: true, + serializedName: "properties.partnerEarnedCreditApplied", + type: { + name: "String" + } + }, + payGPrice: { + readOnly: true, + serializedName: "properties.payGPrice", + type: { + name: "Number" + } + } + } + } +}; + +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" } }, - scope: { + usageEnd: { readOnly: true, - serializedName: "properties.scope", + 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" + } + }, + additionalInfo: { + readOnly: true, + serializedName: "properties.additionalInfo", + 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 Tag: msRest.CompositeMapper = { - serializedName: "Tag", +export const BalancePropertiesNewPurchasesDetailsItem: msRest.CompositeMapper = { + serializedName: "BalanceProperties_newPurchasesDetailsItem", type: { name: "Composite", - className: "Tag", + className: "BalancePropertiesNewPurchasesDetailsItem", modelProperties: { - key: { - serializedName: "key", + name: { + readOnly: true, + serializedName: "name", type: { name: "String" } + }, + value: { + readOnly: true, + serializedName: "value", + type: { + name: "Number" + } } } } }; -export const ProxyResource: msRest.CompositeMapper = { - serializedName: "ProxyResource", +export const BalancePropertiesAdjustmentDetailsItem: msRest.CompositeMapper = { + serializedName: "BalanceProperties_adjustmentDetailsItem", type: { name: "Composite", - className: "ProxyResource", + className: "BalancePropertiesAdjustmentDetailsItem", modelProperties: { - id: { + name: { readOnly: true, - serializedName: "id", + 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 ReservationRecommendationDetailsResourceProperties: msRest.CompositeMapper = { + serializedName: "ReservationRecommendationDetailsResourceProperties", + type: { + name: "Composite", + className: "ReservationRecommendationDetailsResourceProperties", + modelProperties: { + appliedScopes: { + readOnly: true, + serializedName: "appliedScopes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + onDemandRate: { + readOnly: true, + serializedName: "onDemandRate", + type: { + name: "Number" + } + }, + product: { + readOnly: true, + serializedName: "product", + type: { + name: "String" + } + }, + region: { + readOnly: true, + serializedName: "region", + type: { + name: "String" + } + }, + reservationRate: { + readOnly: true, + serializedName: "reservationRate", + type: { + name: "Number" + } + }, + resourceType: { + readOnly: true, + serializedName: "resourceType", + type: { + name: "String" + } + } + } + } +}; + +export const ReservationRecommendationDetailsCalculatedSavingsProperties: msRest.CompositeMapper = { + serializedName: "ReservationRecommendationDetailsCalculatedSavingsProperties", + type: { + name: "Composite", + className: "ReservationRecommendationDetailsCalculatedSavingsProperties", + modelProperties: { + onDemandCost: { + readOnly: true, + serializedName: "onDemandCost", + type: { + name: "Number" + } + }, + overageCost: { + readOnly: true, + serializedName: "overageCost", + type: { + name: "Number" + } + }, + quantity: { + readOnly: true, + serializedName: "quantity", + type: { + name: "Number" + } + }, + reservationCost: { + readOnly: true, + serializedName: "reservationCost", + type: { + name: "Number" + } + }, + totalReservationCost: { + readOnly: true, + serializedName: "totalReservationCost", + type: { + name: "Number" + } + }, + reservedUnitCount: { + serializedName: "reservedUnitCount", + type: { + name: "Number" + } + }, + savings: { + readOnly: true, + serializedName: "savings", + type: { + name: "Number" + } + } + } + } +}; + +export const ReservationRecommendationDetailsSavingsProperties: msRest.CompositeMapper = { + serializedName: "ReservationRecommendationDetailsSavingsProperties", + type: { + name: "Composite", + className: "ReservationRecommendationDetailsSavingsProperties", + modelProperties: { + calculatedSavings: { + serializedName: "calculatedSavings", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ReservationRecommendationDetailsCalculatedSavingsProperties" + } + } + } + }, + lookBackPeriod: { + readOnly: true, + serializedName: "lookBackPeriod", + type: { + name: "Number" + } + }, + recommendedQuantity: { + readOnly: true, + serializedName: "recommendedQuantity", + type: { + name: "Number" + } + }, + reservationOrderTerm: { + readOnly: true, + serializedName: "reservationOrderTerm", + type: { + name: "String" + } + }, + savingsType: { + readOnly: true, + serializedName: "savingsType", + type: { + name: "String" + } + }, + unitOfMeasure: { + readOnly: true, + serializedName: "unitOfMeasure", + type: { + name: "String" + } + } + } + } +}; + +export const ReservationRecommendationDetailsUsageProperties: msRest.CompositeMapper = { + serializedName: "ReservationRecommendationDetailsUsageProperties", + type: { + name: "Composite", + className: "ReservationRecommendationDetailsUsageProperties", + modelProperties: { + firstConsumptionDate: { + readOnly: true, + serializedName: "firstConsumptionDate", + type: { + name: "String" + } + }, + lastConsumptionDate: { + readOnly: true, + serializedName: "lastConsumptionDate", + type: { + name: "String" + } + }, + lookBackUnitType: { + readOnly: true, + serializedName: "lookBackUnitType", + type: { + name: "String" + } + }, + usageData: { + readOnly: true, + serializedName: "usageData", + type: { + name: "Sequence", + element: { + type: { + name: "Number" + } + } + } + }, + usageGrain: { + readOnly: true, + serializedName: "usageGrain", + type: { + name: "String" + } + } + } + } +}; + +export const ReservationRecommendationDetailsModel: msRest.CompositeMapper = { + serializedName: "ReservationRecommendationDetailsModel", + type: { + name: "Composite", + className: "ReservationRecommendationDetailsModel", + modelProperties: { + ...Resource.type.modelProperties, + location: { + serializedName: "location", + type: { + name: "String" + } + }, + sku: { + serializedName: "sku", + type: { + name: "String" + } + }, + currency: { + readOnly: true, + serializedName: "properties.currency", + type: { + name: "String" + } + }, + resource: { + readOnly: true, + serializedName: "properties.resource", + type: { + name: "Composite", + className: "ReservationRecommendationDetailsResourceProperties" + } + }, + resourceGroup: { + readOnly: true, + serializedName: "properties.resourceGroup", + type: { + name: "String" + } + }, + savings: { + readOnly: true, + serializedName: "properties.savings", + type: { + name: "Composite", + className: "ReservationRecommendationDetailsSavingsProperties" + } + }, + scope: { + readOnly: true, + serializedName: "properties.scope", + type: { + name: "String" + } + }, + usage: { + readOnly: true, + serializedName: "properties.usage", + type: { + name: "Composite", + className: "ReservationRecommendationDetailsUsageProperties" + } + } + } + } +}; + +export const ReservationRecommendation: msRest.CompositeMapper = { + serializedName: "ReservationRecommendation", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "kind", + clientName: "kind" + }, + uberParent: "ReservationRecommendation", + className: "ReservationRecommendation", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + etag: { + readOnly: true, + serializedName: "etag", + type: { + 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 SkuProperty: msRest.CompositeMapper = { + serializedName: "SkuProperty", + type: { + name: "Composite", + className: "SkuProperty", + modelProperties: { + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + value: { + readOnly: true, + serializedName: "value", + type: { + name: "String" + } + } + } + } +}; + +export const LegacyReservationRecommendation: msRest.CompositeMapper = { + serializedName: "legacy", + type: { + name: "Composite", + polymorphicDiscriminator: ReservationRecommendation.type.polymorphicDiscriminator, + uberParent: "ReservationRecommendation", + className: "LegacyReservationRecommendation", + modelProperties: { + ...ReservationRecommendation.type.modelProperties, + lookBackPeriod: { + readOnly: true, + serializedName: "properties.lookBackPeriod", + type: { + name: "String" + } + }, + instanceFlexibilityRatio: { + readOnly: true, + serializedName: "properties.instanceFlexibilityRatio", + type: { + name: "Number" + } + }, + instanceFlexibilityGroup: { + readOnly: true, + serializedName: "properties.instanceFlexibilityGroup", + type: { + name: "String" + } + }, + normalizedSize: { + readOnly: true, + serializedName: "properties.normalizedSize", + type: { + name: "String" + } + }, + recommendedQuantityNormalized: { + readOnly: true, + serializedName: "properties.recommendedQuantityNormalized", + type: { + name: "Number" + } + }, + meterId: { + readOnly: true, + serializedName: "properties.meterId", + type: { + name: "Uuid" + } + }, + resourceType: { + readOnly: true, + serializedName: "properties.resourceType", + type: { + name: "String" + } + }, + term: { + readOnly: true, + serializedName: "properties.term", + type: { + name: "String" + } + }, + costWithNoReservedInstances: { + readOnly: true, + serializedName: "properties.costWithNoReservedInstances", + type: { + name: "Number" + } + }, + recommendedQuantity: { + readOnly: true, + serializedName: "properties.recommendedQuantity", + type: { + name: "Number" + } + }, + totalCostWithReservedInstances: { + readOnly: true, + serializedName: "properties.totalCostWithReservedInstances", + type: { + name: "Number" + } + }, + netSavings: { + readOnly: true, + serializedName: "properties.netSavings", + type: { + name: "Number" + } + }, + firstUsageDate: { + readOnly: true, + serializedName: "properties.firstUsageDate", + type: { + name: "DateTime" + } + }, + scope: { + readOnly: true, + serializedName: "properties.scope", + type: { + name: "String" + } + }, + skuProperties: { + readOnly: true, + serializedName: "properties.skuProperties", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SkuProperty" + } + } + } + } + } + } +}; + +export const Amount: msRest.CompositeMapper = { + serializedName: "amount", + type: { + name: "Composite", + className: "Amount", + modelProperties: { + currency: { + readOnly: true, + serializedName: "currency", + type: { + name: "String" + } + }, + value: { + readOnly: true, + serializedName: "value", + type: { + name: "Number" + } + } + } + } +}; + +export const ModernReservationRecommendation: msRest.CompositeMapper = { + serializedName: "modern", + type: { + name: "Composite", + polymorphicDiscriminator: ReservationRecommendation.type.polymorphicDiscriminator, + uberParent: "ReservationRecommendation", + className: "ModernReservationRecommendation", + modelProperties: { + ...ReservationRecommendation.type.modelProperties, + modernReservationRecommendationLocation: { + readOnly: true, + serializedName: "properties.location", + type: { + name: "String" + } + }, + lookBackPeriod: { + readOnly: true, + serializedName: "properties.lookBackPeriod", + type: { + name: "Number" + } + }, + instanceFlexibilityRatio: { + readOnly: true, + serializedName: "properties.instanceFlexibilityRatio", + type: { + name: "Number" + } + }, + instanceFlexibilityGroup: { + readOnly: true, + serializedName: "properties.instanceFlexibilityGroup", + type: { + name: "String" + } + }, + normalizedSize: { + readOnly: true, + 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" + } + }, + costWithNoReservedInstances: { + readOnly: true, + serializedName: "properties.costWithNoReservedInstances", + type: { + name: "Composite", + className: "Amount" + } + }, + recommendedQuantity: { + readOnly: true, + serializedName: "properties.recommendedQuantity", + type: { + name: "Number" + } + }, + totalCostWithReservedInstances: { + readOnly: true, + serializedName: "properties.totalCostWithReservedInstances", + type: { + name: "Composite", + className: "Amount" + } + }, + netSavings: { + readOnly: true, + serializedName: "properties.netSavings", + type: { + name: "Composite", + className: "Amount" + } + }, + firstUsageDate: { + readOnly: true, + serializedName: "properties.firstUsageDate", + type: { + name: "DateTime" + } + }, + scope: { + readOnly: true, + serializedName: "properties.scope", + type: { + name: "String" + } + }, + skuProperties: { + readOnly: true, + serializedName: "properties.skuProperties", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SkuProperty" + } + } + } + }, + skuName: { + readOnly: true, + serializedName: "properties.skuName", + type: { + name: "String" + } + } + } + } +}; + +export const ReservationTransactionResource: msRest.CompositeMapper = { + serializedName: "ReservationTransactionResource", + type: { + name: "Composite", + className: "ReservationTransactionResource", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + tags: { + readOnly: true, + serializedName: "tags", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const ModernReservationTransaction: msRest.CompositeMapper = { + serializedName: "Modern", + type: { + name: "Composite", + className: "ModernReservationTransaction", + modelProperties: { + ...ReservationTransactionResource.type.modelProperties, + amount: { + readOnly: true, + serializedName: "properties.amount", + type: { + name: "Number" + } + }, + armSkuName: { + readOnly: true, + serializedName: "properties.armSkuName", + type: { + name: "String" + } + }, + billingFrequency: { + readOnly: true, + serializedName: "properties.billingFrequency", + type: { + name: "String" + } + }, + billingProfileId: { + readOnly: true, + serializedName: "properties.billingProfileId", + type: { + name: "String" + } + }, + billingProfileName: { + readOnly: true, + serializedName: "properties.billingProfileName", + type: { + name: "String" + } + }, + currency: { + readOnly: true, + serializedName: "properties.currency", + type: { + name: "String" + } + }, + description: { + readOnly: true, + serializedName: "properties.description", + type: { + name: "String" + } + }, + eventDate: { + readOnly: true, + serializedName: "properties.eventDate", + type: { + name: "DateTime" + } + }, + eventType: { + readOnly: true, + serializedName: "properties.eventType", + type: { + name: "String" + } + }, + invoice: { + readOnly: true, + serializedName: "properties.invoice", + type: { + name: "String" + } + }, + invoiceId: { + readOnly: true, + serializedName: "properties.invoiceId", + type: { + name: "String" + } + }, + invoiceSectionId: { + readOnly: true, + serializedName: "properties.invoiceSectionId", + type: { + name: "String" + } + }, + invoiceSectionName: { + readOnly: true, + serializedName: "properties.invoiceSectionName", + type: { + name: "String" + } + }, + purchasingSubscriptionGuid: { + readOnly: true, + serializedName: "properties.purchasingSubscriptionGuid", + type: { + name: "Uuid" + } + }, + purchasingSubscriptionName: { + readOnly: true, + serializedName: "properties.purchasingSubscriptionName", + type: { + name: "String" + } + }, + quantity: { + readOnly: true, + serializedName: "properties.quantity", + type: { + name: "Number" + } + }, + region: { + readOnly: true, + serializedName: "properties.region", + type: { + name: "String" + } + }, + reservationOrderId: { + readOnly: true, + serializedName: "properties.reservationOrderId", + type: { + name: "String" + } + }, + reservationOrderName: { + readOnly: true, + serializedName: "properties.reservationOrderName", + type: { + name: "String" + } + }, + term: { + readOnly: true, + serializedName: "properties.term", + type: { + name: "String" + } + } + } + } +}; + +export const ReservationTransaction: msRest.CompositeMapper = { + serializedName: "ReservationTransaction", + type: { + name: "Composite", + className: "ReservationTransaction", + modelProperties: { + ...ReservationTransactionResource.type.modelProperties, + eventDate: { + readOnly: true, + serializedName: "properties.eventDate", + type: { + name: "DateTime" + } + }, + reservationOrderId: { + readOnly: true, + serializedName: "properties.reservationOrderId", + type: { + name: "String" + } + }, + description: { + readOnly: true, + serializedName: "properties.description", + type: { + name: "String" + } + }, + eventType: { + readOnly: true, + serializedName: "properties.eventType", + type: { + name: "String" + } + }, + quantity: { + readOnly: true, + serializedName: "properties.quantity", + type: { + name: "Number" + } + }, + amount: { + readOnly: true, + serializedName: "properties.amount", + type: { + name: "Number" + } + }, + currency: { + readOnly: true, + serializedName: "properties.currency", + type: { + name: "String" + } + }, + reservationOrderName: { + readOnly: true, + serializedName: "properties.reservationOrderName", + type: { + name: "String" + } + }, + purchasingEnrollment: { + readOnly: true, + serializedName: "properties.purchasingEnrollment", + type: { + name: "String" + } + }, + purchasingSubscriptionGuid: { + readOnly: true, + serializedName: "properties.purchasingSubscriptionGuid", + type: { + name: "Uuid" + } + }, + purchasingSubscriptionName: { + readOnly: true, + serializedName: "properties.purchasingSubscriptionName", + type: { + name: "String" + } + }, + armSkuName: { + readOnly: true, + serializedName: "properties.armSkuName", + type: { + name: "String" + } + }, + term: { + readOnly: true, + serializedName: "properties.term", + type: { + name: "String" + } + }, + region: { + readOnly: true, + serializedName: "properties.region", + type: { + name: "String" + } + }, + accountName: { + readOnly: true, + serializedName: "properties.accountName", + type: { + name: "String" + } + }, + accountOwnerEmail: { + readOnly: true, + serializedName: "properties.accountOwnerEmail", + type: { + name: "String" + } + }, + departmentName: { + readOnly: true, + serializedName: "properties.departmentName", + type: { + name: "String" + } + }, + costCenter: { + readOnly: true, + serializedName: "properties.costCenter", + type: { + name: "String" + } + }, + currentEnrollment: { + readOnly: true, + serializedName: "properties.currentEnrollment", + type: { + name: "String" + } + }, + billingFrequency: { + readOnly: true, + serializedName: "properties.billingFrequency", + type: { + name: "String" + } + } + } + } +}; + +export const LegacyReservationTransaction: msRest.CompositeMapper = { + serializedName: "LegacyReservationTransaction", + type: { + name: "Composite", + className: "LegacyReservationTransaction", + modelProperties: { + ...ReservationTransaction.type.modelProperties + } + } +}; + +export const Tag: msRest.CompositeMapper = { + serializedName: "Tag", + type: { + name: "Composite", + className: "Tag", + modelProperties: { + key: { + serializedName: "key", + type: { + name: "String" + } + }, + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const ProxyResource: msRest.CompositeMapper = { + serializedName: "ProxyResource", + type: { + name: "Composite", + className: "ProxyResource", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + eTag: { + serializedName: "eTag", + type: { + name: "String" + } + } + } + } +}; + +export const TagsResult: msRest.CompositeMapper = { + serializedName: "TagsResult", + type: { + name: "Composite", + className: "TagsResult", + modelProperties: { + ...ProxyResource.type.modelProperties, + tags: { + serializedName: "properties.tags", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Tag" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "properties.nextLink", + type: { + name: "String" + } + }, + previousLink: { + readOnly: true, + serializedName: "properties.previousLink", + type: { + name: "String" + } + } + } + } +}; + +export const BudgetTimePeriod: msRest.CompositeMapper = { + serializedName: "BudgetTimePeriod", + type: { + name: "Composite", + className: "BudgetTimePeriod", + modelProperties: { + startDate: { + required: true, + serializedName: "startDate", + type: { + name: "DateTime" + } + }, + endDate: { + serializedName: "endDate", + type: { + name: "DateTime" + } + } + } + } +}; + +export const BudgetComparisonExpression: msRest.CompositeMapper = { + serializedName: "BudgetComparisonExpression", + type: { + name: "Composite", + className: "BudgetComparisonExpression", + modelProperties: { + name: { + required: true, + serializedName: "name", + type: { + name: "String" + } + }, + operator: { + required: true, + isConstant: true, + serializedName: "operator", + defaultValue: 'In', + type: { + name: "String" + } + }, + values: { + required: true, + serializedName: "values", + constraints: { + MinItems: 0 + }, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const BudgetFilterProperties: msRest.CompositeMapper = { + serializedName: "BudgetFilterProperties", + type: { + name: "Composite", + className: "BudgetFilterProperties", + modelProperties: { + dimensions: { + serializedName: "dimensions", + type: { + name: "Composite", + className: "BudgetComparisonExpression" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Composite", + className: "BudgetComparisonExpression" + } + } + } + } +}; + +export const BudgetFilter: msRest.CompositeMapper = { + serializedName: "BudgetFilter", + type: { + name: "Composite", + className: "BudgetFilter", + modelProperties: { + and: { + serializedName: "and", + constraints: { + MinItems: 0 + }, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BudgetFilterProperties" + } + } + } + }, + not: { + serializedName: "not", + type: { + name: "Composite", + className: "BudgetFilterProperties" + } + }, + dimensions: { + serializedName: "dimensions", + type: { + name: "Composite", + className: "BudgetComparisonExpression" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Composite", + className: "BudgetComparisonExpression" + } + } + } + } +}; + +export const CurrentSpend: msRest.CompositeMapper = { + serializedName: "CurrentSpend", + type: { + name: "Composite", + className: "CurrentSpend", + modelProperties: { + amount: { + readOnly: true, + serializedName: "amount", + type: { + name: "Number" + } + }, + unit: { + readOnly: true, + serializedName: "unit", + type: { + name: "String" + } + } + } + } +}; + +export const Notification: msRest.CompositeMapper = { + serializedName: "Notification", + type: { + name: "Composite", + className: "Notification", + modelProperties: { + enabled: { + required: true, + serializedName: "enabled", + type: { + name: "Boolean" + } + }, + operator: { + required: true, + serializedName: "operator", + type: { + name: "String" + } + }, + threshold: { + required: true, + serializedName: "threshold", + type: { + name: "Number" + } + }, + contactEmails: { + required: true, + serializedName: "contactEmails", + constraints: { + MaxItems: 50, + MinItems: 0 + }, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + contactRoles: { + serializedName: "contactRoles", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + contactGroups: { + serializedName: "contactGroups", + constraints: { + MaxItems: 50, + MinItems: 0 + }, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + thresholdType: { + serializedName: "thresholdType", + defaultValue: 'Actual', + type: { + name: "String" + } + } + } + } +}; + +export const ForecastSpend: msRest.CompositeMapper = { + serializedName: "ForecastSpend", + type: { + name: "Composite", + className: "ForecastSpend", + modelProperties: { + amount: { + readOnly: true, + serializedName: "amount", + type: { + name: "Number" + } + }, + unit: { + readOnly: true, + serializedName: "unit", + type: { + name: "String" + } + } + } + } +}; + +export const Budget: msRest.CompositeMapper = { + serializedName: "Budget", + type: { + name: "Composite", + className: "Budget", + modelProperties: { + ...ProxyResource.type.modelProperties, + category: { + required: true, + isConstant: true, + serializedName: "properties.category", + defaultValue: 'Cost', + type: { + name: "String" + } + }, + amount: { + required: true, + serializedName: "properties.amount", + type: { + name: "Number" + } + }, + timeGrain: { + required: true, + serializedName: "properties.timeGrain", + type: { + name: "String" + } + }, + timePeriod: { + required: true, + serializedName: "properties.timePeriod", + type: { + name: "Composite", + className: "BudgetTimePeriod" + } + }, + filter: { + serializedName: "properties.filter", + type: { + name: "Composite", + className: "BudgetFilter" + } + }, + currentSpend: { + readOnly: true, + serializedName: "properties.currentSpend", + type: { + name: "Composite", + className: "CurrentSpend" + } + }, + notifications: { + serializedName: "properties.notifications", + type: { + name: "Dictionary", + value: { + type: { + name: "Composite", + className: "Notification" + } + } + } + }, + forecastSpend: { + readOnly: true, + serializedName: "properties.forecastSpend", + type: { + name: "Composite", + className: "ForecastSpend" + } + } + } + } +}; + +export const PriceSheetProperties: msRest.CompositeMapper = { + serializedName: "PriceSheetProperties", + type: { + name: "Composite", + className: "PriceSheetProperties", + modelProperties: { + billingPeriodId: { + readOnly: true, + serializedName: "billingPeriodId", + type: { + name: "String" + } + }, + meterId: { + readOnly: true, + serializedName: "meterId", + type: { + name: "Uuid" + } + }, + meterDetails: { + readOnly: true, + serializedName: "meterDetails", + type: { + name: "Composite", + className: "MeterDetails" + } + }, + unitOfMeasure: { + readOnly: true, + serializedName: "unitOfMeasure", + type: { + name: "String" + } + }, + includedQuantity: { + readOnly: true, + serializedName: "includedQuantity", + type: { + name: "Number" + } + }, + partNumber: { + readOnly: true, + serializedName: "partNumber", + type: { + name: "String" + } + }, + unitPrice: { + readOnly: true, + serializedName: "unitPrice", + type: { + name: "Number" + } + }, + currencyCode: { + readOnly: true, + serializedName: "currencyCode", + type: { + name: "String" + } + }, + offerId: { + readOnly: true, + serializedName: "offerId", + type: { + name: "String" + } + } + } + } +}; + +export const PriceSheetResult: msRest.CompositeMapper = { + serializedName: "PriceSheetResult", + type: { + name: "Composite", + className: "PriceSheetResult", + modelProperties: { + ...Resource.type.modelProperties, + pricesheets: { + readOnly: true, + serializedName: "properties.pricesheets", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PriceSheetProperties" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "properties.nextLink", + type: { + name: "String" + } + }, + download: { + readOnly: true, + serializedName: "properties.download", + type: { + name: "Composite", + className: "MeterDetails" + } + } + } + } +}; + +export const DownloadProperties: msRest.CompositeMapper = { + serializedName: "DownloadProperties", + type: { + name: "Composite", + className: "DownloadProperties", + modelProperties: { + downloadUrl: { + readOnly: true, + serializedName: "downloadUrl", + type: { + name: "String" + } + }, + validTill: { + readOnly: true, + serializedName: "validTill", + type: { + name: "String" + } + } + } + } +}; + +export const ForecastPropertiesConfidenceLevelsItem: msRest.CompositeMapper = { + serializedName: "ForecastProperties_confidenceLevelsItem", + type: { + name: "Composite", + className: "ForecastPropertiesConfidenceLevelsItem", + modelProperties: { + percentage: { + readOnly: true, + serializedName: "percentage", + type: { + name: "Number" + } + }, + bound: { + serializedName: "bound", + type: { + name: "String" + } + }, + value: { + readOnly: true, + serializedName: "value", + type: { + name: "Number" + } + } + } + } +}; + +export const Forecast: msRest.CompositeMapper = { + serializedName: "Forecast", + type: { + name: "Composite", + className: "Forecast", + modelProperties: { + ...Resource.type.modelProperties, + usageDate: { + readOnly: true, + serializedName: "properties.usageDate", + type: { + name: "String" + } + }, + grain: { + serializedName: "properties.grain", type: { name: "String" } }, - name: { + charge: { readOnly: true, - serializedName: "name", + serializedName: "properties.charge", type: { - name: "String" + name: "Number" } }, - type: { + currency: { readOnly: true, - serializedName: "type", + serializedName: "properties.currency", type: { name: "String" } }, - eTag: { - serializedName: "eTag", + chargeType: { + serializedName: "properties.chargeType", type: { name: "String" } - } - } - } -}; - -export const TagsResult: msRest.CompositeMapper = { - serializedName: "TagsResult", - type: { - name: "Composite", - className: "TagsResult", - modelProperties: { - ...ProxyResource.type.modelProperties, - tags: { - serializedName: "properties.tags", + }, + confidenceLevels: { + readOnly: true, + serializedName: "properties.confidenceLevels", type: { name: "Sequence", element: { type: { name: "Composite", - className: "Tag" + className: "ForecastPropertiesConfidenceLevelsItem" } } } @@ -1029,92 +3250,92 @@ export const TagsResult: msRest.CompositeMapper = { } }; -export const BudgetTimePeriod: msRest.CompositeMapper = { - serializedName: "BudgetTimePeriod", +export const ManagementGroupAggregatedCostResult: msRest.CompositeMapper = { + serializedName: "ManagementGroupAggregatedCostResult", type: { name: "Composite", - className: "BudgetTimePeriod", + className: "ManagementGroupAggregatedCostResult", modelProperties: { - startDate: { - required: true, - serializedName: "startDate", + ...Resource.type.modelProperties, + billingPeriodId: { + readOnly: true, + serializedName: "properties.billingPeriodId", + type: { + name: "String" + } + }, + usageStart: { + readOnly: true, + serializedName: "properties.usageStart", type: { name: "DateTime" } }, - endDate: { - serializedName: "endDate", + usageEnd: { + readOnly: true, + serializedName: "properties.usageEnd", type: { name: "DateTime" } - } - } - } -}; - -export const Filters: msRest.CompositeMapper = { - serializedName: "Filters", - type: { - name: "Composite", - className: "Filters", - modelProperties: { - resourceGroups: { - serializedName: "resourceGroups", - constraints: { - MaxItems: 10, - MinItems: 0 - }, + }, + azureCharges: { + readOnly: true, + serializedName: "properties.azureCharges", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Number" } }, - resources: { - serializedName: "resources", - constraints: { - MaxItems: 10, - MinItems: 0 - }, + marketplaceCharges: { + readOnly: true, + serializedName: "properties.marketplaceCharges", + type: { + name: "Number" + } + }, + chargesBilledSeparately: { + readOnly: true, + serializedName: "properties.chargesBilledSeparately", + type: { + name: "Number" + } + }, + currency: { + readOnly: true, + serializedName: "properties.currency", + type: { + name: "String" + } + }, + children: { + serializedName: "properties.children", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "ManagementGroupAggregatedCostResult" } } } }, - meters: { - serializedName: "meters", - constraints: { - MaxItems: 10, - MinItems: 0 - }, + includedSubscriptions: { + serializedName: "properties.includedSubscriptions", type: { name: "Sequence", element: { type: { - name: "Uuid" + name: "String" } } } }, - tags: { - serializedName: "tags", + excludedSubscriptions: { + serializedName: "properties.excludedSubscriptions", type: { - name: "Dictionary", - value: { + name: "Sequence", + element: { type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } } } @@ -1123,22 +3344,21 @@ export const Filters: msRest.CompositeMapper = { } }; -export const CurrentSpend: msRest.CompositeMapper = { - serializedName: "CurrentSpend", +export const ChargeSummary: msRest.CompositeMapper = { + serializedName: "ChargeSummary", type: { name: "Composite", - className: "CurrentSpend", + polymorphicDiscriminator: { + serializedName: "kind", + clientName: "kind" + }, + uberParent: "ChargeSummary", + className: "ChargeSummary", modelProperties: { - amount: { - readOnly: true, - serializedName: "amount", - type: { - name: "Number" - } - }, - unit: { - readOnly: true, - serializedName: "unit", + ...Resource.type.modelProperties, + kind: { + required: true, + serializedName: "kind", type: { name: "String" } @@ -1147,71 +3367,21 @@ export const CurrentSpend: msRest.CompositeMapper = { } }; -export const Notification: msRest.CompositeMapper = { - serializedName: "Notification", +export const ChargesListResult: msRest.CompositeMapper = { + serializedName: "ChargesListResult", type: { name: "Composite", - className: "Notification", + className: "ChargesListResult", modelProperties: { - enabled: { - required: true, - serializedName: "enabled", - type: { - name: "Boolean" - } - }, - operator: { - required: true, - serializedName: "operator", - type: { - name: "String" - } - }, - threshold: { - required: true, - serializedName: "threshold", - type: { - name: "Number" - } - }, - contactEmails: { - required: true, - serializedName: "contactEmails", - constraints: { - MaxItems: 50, - MinItems: 1 - }, - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - contactRoles: { - serializedName: "contactRoles", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - contactGroups: { - serializedName: "contactGroups", - constraints: { - MaxItems: 50, - MinItems: 0 - }, + value: { + readOnly: true, + serializedName: "value", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "ChargeSummary" } } } @@ -1220,170 +3390,177 @@ export const Notification: msRest.CompositeMapper = { } }; -export const Budget: msRest.CompositeMapper = { - serializedName: "Budget", +export const LegacyChargeSummary: msRest.CompositeMapper = { + serializedName: "legacy", type: { name: "Composite", - className: "Budget", + polymorphicDiscriminator: ChargeSummary.type.polymorphicDiscriminator, + uberParent: "ChargeSummary", + className: "LegacyChargeSummary", modelProperties: { - ...ProxyResource.type.modelProperties, - category: { - required: true, - serializedName: "properties.category", + ...ChargeSummary.type.modelProperties, + billingPeriodId: { + readOnly: true, + serializedName: "properties.billingPeriodId", type: { name: "String" } }, - amount: { - required: true, - serializedName: "properties.amount", + usageStart: { + readOnly: true, + serializedName: "properties.usageStart", type: { - name: "Number" + name: "String" } }, - timeGrain: { - required: true, - serializedName: "properties.timeGrain", + usageEnd: { + readOnly: true, + serializedName: "properties.usageEnd", type: { name: "String" } }, - timePeriod: { - required: true, - serializedName: "properties.timePeriod", + azureCharges: { + readOnly: true, + serializedName: "properties.azureCharges", type: { - name: "Composite", - className: "BudgetTimePeriod" + name: "Number" } }, - filters: { - serializedName: "properties.filters", + chargesBilledSeparately: { + readOnly: true, + serializedName: "properties.chargesBilledSeparately", type: { - name: "Composite", - className: "Filters" + name: "Number" } }, - currentSpend: { + marketplaceCharges: { readOnly: true, - serializedName: "properties.currentSpend", + serializedName: "properties.marketplaceCharges", type: { - name: "Composite", - className: "CurrentSpend" + name: "Number" } }, - notifications: { - serializedName: "properties.notifications", + currency: { + readOnly: true, + serializedName: "properties.currency", type: { - name: "Dictionary", - value: { - type: { - name: "Composite", - className: "Notification" - } - } + name: "String" } } } } }; -export const PriceSheetProperties: msRest.CompositeMapper = { - serializedName: "PriceSheetProperties", +export const ModernChargeSummary: msRest.CompositeMapper = { + serializedName: "modern", type: { name: "Composite", - className: "PriceSheetProperties", + polymorphicDiscriminator: ChargeSummary.type.polymorphicDiscriminator, + uberParent: "ChargeSummary", + className: "ModernChargeSummary", modelProperties: { + ...ChargeSummary.type.modelProperties, billingPeriodId: { readOnly: true, - serializedName: "billingPeriodId", + serializedName: "properties.billingPeriodId", type: { name: "String" } }, - meterId: { + usageStart: { readOnly: true, - serializedName: "meterId", + serializedName: "properties.usageStart", type: { - name: "Uuid" + name: "String" } }, - meterDetails: { + usageEnd: { readOnly: true, - serializedName: "meterDetails", + serializedName: "properties.usageEnd", + type: { + name: "String" + } + }, + azureCharges: { + readOnly: true, + serializedName: "properties.azureCharges", type: { name: "Composite", - className: "MeterDetails" + className: "Amount" } }, - unitOfMeasure: { + chargesBilledSeparately: { readOnly: true, - serializedName: "unitOfMeasure", + serializedName: "properties.chargesBilledSeparately", type: { - name: "String" + name: "Composite", + className: "Amount" } }, - includedQuantity: { + marketplaceCharges: { readOnly: true, - serializedName: "includedQuantity", + serializedName: "properties.marketplaceCharges", type: { - name: "Number" + name: "Composite", + className: "Amount" } }, - partNumber: { + billingAccountId: { readOnly: true, - serializedName: "partNumber", + serializedName: "properties.billingAccountId", type: { name: "String" } }, - unitPrice: { + billingProfileId: { readOnly: true, - serializedName: "unitPrice", + serializedName: "properties.billingProfileId", type: { - name: "Number" + name: "String" } }, - currencyCode: { + invoiceSectionId: { readOnly: true, - serializedName: "currencyCode", + serializedName: "properties.invoiceSectionId", type: { name: "String" } }, - offerId: { + customerId: { readOnly: true, - serializedName: "offerId", + serializedName: "properties.customerId", type: { name: "String" } + }, + isInvoiced: { + readOnly: true, + serializedName: "properties.isInvoiced", + type: { + name: "Boolean" + } } } } }; -export const PriceSheetResult: msRest.CompositeMapper = { - serializedName: "PriceSheetResult", +export const ErrorDetails: msRest.CompositeMapper = { + serializedName: "ErrorDetails", type: { name: "Composite", - className: "PriceSheetResult", + className: "ErrorDetails", modelProperties: { - ...Resource.type.modelProperties, - pricesheets: { + code: { readOnly: true, - serializedName: "properties.pricesheets", + serializedName: "code", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PriceSheetProperties" - } - } + name: "String" } }, - nextLink: { + message: { readOnly: true, - serializedName: "properties.nextLink", + serializedName: "message", type: { name: "String" } @@ -1392,286 +3569,258 @@ export const PriceSheetResult: msRest.CompositeMapper = { } }; -export const ForecastPropertiesConfidenceLevelsItem: msRest.CompositeMapper = { - serializedName: "ForecastProperties_confidenceLevelsItem", +export const HighCasedErrorDetails: msRest.CompositeMapper = { + serializedName: "HighCasedErrorDetails", type: { name: "Composite", - className: "ForecastPropertiesConfidenceLevelsItem", + className: "HighCasedErrorDetails", modelProperties: { - percentage: { + code: { readOnly: true, - serializedName: "percentage", - type: { - name: "Number" - } - }, - bound: { - serializedName: "bound", + serializedName: "code", type: { name: "String" } }, - value: { + message: { readOnly: true, - serializedName: "value", + serializedName: "message", type: { - name: "Number" + name: "String" } } } } }; -export const Forecast: msRest.CompositeMapper = { - serializedName: "Forecast", +export const HighCasedErrorResponse: msRest.CompositeMapper = { + serializedName: "HighCasedErrorResponse", type: { name: "Composite", - className: "Forecast", + className: "HighCasedErrorResponse", modelProperties: { - ...Resource.type.modelProperties, - usageDate: { - readOnly: true, - serializedName: "properties.usageDate", + error: { + serializedName: "error", type: { - name: "String" + name: "Composite", + className: "HighCasedErrorDetails" } - }, - grain: { - serializedName: "properties.grain", + } + } + } +}; + +export const ErrorResponse: msRest.CompositeMapper = { + serializedName: "ErrorResponse", + type: { + name: "Composite", + className: "ErrorResponse", + modelProperties: { + error: { + serializedName: "error", type: { - name: "String" + name: "Composite", + className: "ErrorDetails" } - }, - charge: { + } + } + } +}; + +export const OperationDisplay: msRest.CompositeMapper = { + serializedName: "Operation_display", + type: { + name: "Composite", + className: "OperationDisplay", + modelProperties: { + provider: { readOnly: true, - serializedName: "properties.charge", + serializedName: "provider", type: { - name: "Number" + name: "String" } }, - currency: { + resource: { readOnly: true, - serializedName: "properties.currency", + serializedName: "resource", type: { name: "String" } }, - chargeType: { - serializedName: "properties.chargeType", + operation: { + readOnly: true, + serializedName: "operation", type: { name: "String" } }, - confidenceLevels: { + description: { readOnly: true, - serializedName: "properties.confidenceLevels", + serializedName: "description", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ForecastPropertiesConfidenceLevelsItem" - } - } + name: "String" } } } } }; -export const ManagementGroupAggregatedCostResult: msRest.CompositeMapper = { - serializedName: "ManagementGroupAggregatedCostResult", +export const Operation: msRest.CompositeMapper = { + serializedName: "Operation", type: { name: "Composite", - className: "ManagementGroupAggregatedCostResult", + className: "Operation", modelProperties: { - ...Resource.type.modelProperties, - billingPeriodId: { + id: { readOnly: true, - serializedName: "properties.billingPeriodId", + serializedName: "id", type: { name: "String" } }, - usageStart: { - readOnly: true, - serializedName: "properties.usageStart", - type: { - name: "DateTime" - } - }, - usageEnd: { - readOnly: true, - serializedName: "properties.usageEnd", - type: { - name: "DateTime" - } - }, - azureCharges: { - readOnly: true, - serializedName: "properties.azureCharges", - type: { - name: "Number" - } - }, - marketplaceCharges: { - readOnly: true, - serializedName: "properties.marketplaceCharges", - type: { - name: "Number" - } - }, - chargesBilledSeparately: { - readOnly: true, - serializedName: "properties.chargesBilledSeparately", - type: { - name: "Number" - } - }, - currency: { + name: { readOnly: true, - serializedName: "properties.currency", + serializedName: "name", type: { name: "String" } }, - children: { - serializedName: "properties.children", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ManagementGroupAggregatedCostResult" - } - } - } - }, - includedSubscriptions: { - serializedName: "properties.includedSubscriptions", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - excludedSubscriptions: { - serializedName: "properties.excludedSubscriptions", + display: { + serializedName: "display", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Composite", + className: "OperationDisplay" } } } } }; -export const ChargeSummary: msRest.CompositeMapper = { - serializedName: "ChargeSummary", +export const EventSummary: msRest.CompositeMapper = { + serializedName: "EventSummary", type: { name: "Composite", - className: "ChargeSummary", + className: "EventSummary", modelProperties: { ...Resource.type.modelProperties, - billingPeriodId: { + transactionDate: { readOnly: true, - serializedName: "properties.billingPeriodId", + serializedName: "properties.transactionDate", type: { - name: "String" + name: "DateTime" } }, - usageStart: { + description: { readOnly: true, - serializedName: "properties.usageStart", + serializedName: "properties.description", type: { name: "String" } }, - usageEnd: { + newCredit: { readOnly: true, - serializedName: "properties.usageEnd", + serializedName: "properties.newCredit", type: { - name: "String" + name: "Composite", + className: "Amount" } }, - azureCharges: { + adjustments: { readOnly: true, - serializedName: "properties.azureCharges", + serializedName: "properties.adjustments", type: { - name: "Number" + name: "Composite", + className: "Amount" } }, - chargesBilledSeparately: { + creditExpired: { readOnly: true, - serializedName: "properties.chargesBilledSeparately", + serializedName: "properties.creditExpired", type: { - name: "Number" + name: "Composite", + className: "Amount" } }, - marketplaceCharges: { + charges: { readOnly: true, - serializedName: "properties.marketplaceCharges", + serializedName: "properties.charges", type: { - name: "Number" + name: "Composite", + className: "Amount" } }, - currency: { + closedBalance: { readOnly: true, - serializedName: "properties.currency", + serializedName: "properties.closedBalance", + type: { + name: "Composite", + className: "Amount" + } + }, + eventType: { + serializedName: "properties.eventType", type: { name: "String" } - } - } - } -}; - -export const ChargesListResult: msRest.CompositeMapper = { - serializedName: "ChargesListResult", - type: { - name: "Composite", - className: "ChargesListResult", - modelProperties: { - value: { + }, + invoiceNumber: { readOnly: true, - serializedName: "value", + serializedName: "properties.invoiceNumber", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ChargeSummary" - } - } + name: "String" } } } } }; -export const ErrorDetails: msRest.CompositeMapper = { - serializedName: "ErrorDetails", +export const LotSummary: msRest.CompositeMapper = { + serializedName: "LotSummary", type: { name: "Composite", - className: "ErrorDetails", + className: "LotSummary", modelProperties: { - code: { + ...Resource.type.modelProperties, + originalAmount: { readOnly: true, - serializedName: "code", + 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" } }, - message: { + startDate: { readOnly: true, - serializedName: "message", + serializedName: "properties.startDate", + type: { + name: "DateTime" + } + }, + expirationDate: { + readOnly: true, + serializedName: "properties.expirationDate", + type: { + name: "DateTime" + } + }, + poNumber: { + readOnly: true, + serializedName: "properties.poNumber", type: { name: "String" } @@ -1680,72 +3829,69 @@ export const ErrorDetails: msRest.CompositeMapper = { } }; -export const ErrorResponse: msRest.CompositeMapper = { - serializedName: "ErrorResponse", +export const CreditBalanceSummary: msRest.CompositeMapper = { + serializedName: "CreditBalanceSummary", type: { name: "Composite", - className: "ErrorResponse", + className: "CreditBalanceSummary", modelProperties: { - error: { - serializedName: "error", + estimatedBalance: { + readOnly: true, + serializedName: "estimatedBalance", type: { name: "Composite", - className: "ErrorDetails" + className: "Amount" + } + }, + currentBalance: { + readOnly: true, + serializedName: "currentBalance", + type: { + name: "Composite", + className: "Amount" } } } } }; -export const OperationDisplay: msRest.CompositeMapper = { - serializedName: "Operation_display", +export const CreditSummary: msRest.CompositeMapper = { + serializedName: "CreditSummary", type: { name: "Composite", - className: "OperationDisplay", + className: "CreditSummary", modelProperties: { - provider: { + ...Resource.type.modelProperties, + balanceSummary: { readOnly: true, - serializedName: "provider", + serializedName: "properties.balanceSummary", type: { - name: "String" + name: "Composite", + className: "CreditBalanceSummary" } }, - resource: { + pendingCreditAdjustments: { readOnly: true, - serializedName: "resource", + serializedName: "properties.pendingCreditAdjustments", type: { - name: "String" + name: "Composite", + className: "Amount" } }, - operation: { - readOnly: true, - serializedName: "operation", - type: { - name: "String" - } - } - } - } -}; - -export const Operation: msRest.CompositeMapper = { - serializedName: "Operation", - type: { - name: "Composite", - className: "Operation", - modelProperties: { - name: { + expiredCredit: { readOnly: true, - serializedName: "name", + serializedName: "properties.expiredCredit", type: { - name: "String" + name: "Composite", + className: "Amount" } }, - display: { - serializedName: "display", + pendingEligibleCharges: { + readOnly: true, + serializedName: "properties.pendingEligibleCharges", type: { name: "Composite", - className: "OperationDisplay" + className: "Amount" } } } @@ -1776,12 +3922,28 @@ export const ResourceAttributes: msRest.CompositeMapper = { } }; -export const QueryOptions: msRest.CompositeMapper = { +export const UsageDetailsListResult: msRest.CompositeMapper = { + serializedName: "UsageDetailsListResult", type: { name: "Composite", - className: "QueryOptions", + className: "UsageDetailsListResult", modelProperties: { - apply: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "UsageDetail" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", type: { name: "String" } @@ -1790,11 +3952,11 @@ export const QueryOptions: msRest.CompositeMapper = { } }; -export const UsageDetailsListResult: msRest.CompositeMapper = { - serializedName: "UsageDetailsListResult", +export const MarketplacesListResult: msRest.CompositeMapper = { + serializedName: "MarketplacesListResult", type: { name: "Composite", - className: "UsageDetailsListResult", + className: "MarketplacesListResult", modelProperties: { value: { readOnly: true, @@ -1804,7 +3966,7 @@ export const UsageDetailsListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "UsageDetail" + className: "Marketplace" } } } @@ -1820,11 +3982,11 @@ export const UsageDetailsListResult: msRest.CompositeMapper = { } }; -export const MarketplacesListResult: msRest.CompositeMapper = { - serializedName: "MarketplacesListResult", +export const BudgetsListResult: msRest.CompositeMapper = { + serializedName: "BudgetsListResult", type: { name: "Composite", - className: "MarketplacesListResult", + className: "BudgetsListResult", modelProperties: { value: { readOnly: true, @@ -1834,7 +3996,7 @@ export const MarketplacesListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "Marketplace" + className: "Budget" } } } @@ -1935,16 +4097,23 @@ export const ReservationRecommendationsListResult: msRest.CompositeMapper = { type: { name: "String" } + }, + previousLink: { + readOnly: true, + serializedName: "previousLink", + type: { + name: "String" + } } } } }; -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 +4123,37 @@ export const BudgetsListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "Budget" + className: "ReservationTransaction" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ModernReservationTransactionsListResult: msRest.CompositeMapper = { + serializedName: "ModernReservationTransactionsListResult", + type: { + name: "Composite", + className: "ModernReservationTransactionsListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ModernReservationTransaction" } } } @@ -2022,3 +4221,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 = { + 'UsageDetail' : UsageDetail, + 'UsageDetail.legacy' : LegacyUsageDetail, + 'UsageDetail.modern' : ModernUsageDetail, + 'ReservationRecommendation' : ReservationRecommendation, + 'ReservationRecommendation.legacy' : LegacyReservationRecommendation, + 'ReservationRecommendation.modern' : ModernReservationRecommendation, + 'ChargeSummary' : ChargeSummary, + 'ChargeSummary.legacy' : LegacyChargeSummary, + 'ChargeSummary.modern' : ModernChargeSummary + +}; diff --git a/sdk/consumption/arm-consumption/src/models/marketplacesMappers.ts b/sdk/consumption/arm-consumption/src/models/marketplacesMappers.ts index 785130c039b3..906669d8cbaa 100644 --- a/sdk/consumption/arm-consumption/src/models/marketplacesMappers.ts +++ b/sdk/consumption/arm-consumption/src/models/marketplacesMappers.ts @@ -1,40 +1,60 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * 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, + BudgetComparisonExpression, + BudgetFilter, + BudgetFilterProperties, + BudgetTimePeriod, + ChargeSummary, + CreditBalanceSummary, + CreditSummary, + CurrentSpend, + ErrorDetails, + ErrorResponse, + EventSummary, Forecast, ForecastPropertiesConfidenceLevelsItem, + ForecastSpend, + LegacyChargeSummary, + LegacyReservationTransaction, + LegacyUsageDetail, + LotSummary, ManagementGroupAggregatedCostResult, - ChargeSummary, + Marketplace, + MarketplacesListResult, + MeterDetails, + MeterDetailsResponse, + ModernChargeSummary, + ModernReservationTransaction, + ModernUsageDetail, + Notification, + PriceSheetProperties, + PriceSheetResult, ProxyResource, - TagsResult, + ReservationDetail, + ReservationRecommendationDetailsCalculatedSavingsProperties, + ReservationRecommendationDetailsModel, + ReservationRecommendationDetailsResourceProperties, + ReservationRecommendationDetailsSavingsProperties, + ReservationRecommendationDetailsUsageProperties, + ReservationSummary, + ReservationTransaction, + ReservationTransactionResource, + 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..2968c132c8ce 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. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * 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..ef935b24f852 100644 --- a/sdk/consumption/arm-consumption/src/models/parameters.ts +++ b/sdk/consumption/arm-consumption/src/models/parameters.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -33,7 +32,6 @@ export const apiVersion: msRest.OperationQueryParameter = { export const apply: msRest.OperationQueryParameter = { parameterPath: [ "options", - "queryOptions", "apply" ], mapper: { @@ -63,6 +61,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 +81,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" } @@ -137,6 +147,16 @@ export const grain: msRest.OperationQueryParameter = { } } }; +export const lookBackPeriod: msRest.OperationQueryParameter = { + parameterPath: "lookBackPeriod", + mapper: { + required: true, + serializedName: "lookBackPeriod", + type: { + name: "String" + } + } +}; export const managementGroupId: msRest.OperationURLParameter = { parameterPath: "managementGroupId", mapper: { @@ -147,6 +167,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: { @@ -158,7 +190,27 @@ export const nextPageLink: msRest.OperationURLParameter = { }, skipEncoding: true }; -export const reservationId: msRest.OperationURLParameter = { +export const product: msRest.OperationQueryParameter = { + parameterPath: "product", + mapper: { + required: true, + serializedName: "product", + type: { + name: "String" + } + } +}; +export const region: msRest.OperationQueryParameter = { + parameterPath: "region", + mapper: { + required: true, + serializedName: "region", + type: { + name: "String" + } + } +}; +export const reservationId0: msRest.OperationURLParameter = { parameterPath: "reservationId", mapper: { required: true, @@ -168,7 +220,19 @@ export const reservationId: msRest.OperationURLParameter = { } } }; -export const reservationOrderId: msRest.OperationURLParameter = { +export const reservationId1: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "reservationId" + ], + mapper: { + serializedName: "reservationId", + type: { + name: "String" + } + } +}; +export const reservationOrderId0: msRest.OperationURLParameter = { parameterPath: "reservationOrderId", mapper: { required: true, @@ -178,11 +242,34 @@ export const reservationOrderId: msRest.OperationURLParameter = { } } }; -export const resourceGroupName: msRest.OperationURLParameter = { - parameterPath: "resourceGroupName", +export const reservationOrderId1: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "reservationOrderId" + ], + mapper: { + serializedName: "reservationOrderId", + type: { + name: "String" + } + } +}; +export const scope: msRest.OperationURLParameter = { + parameterPath: "scope", + mapper: { + required: true, + serializedName: "scope", + type: { + name: "String" + } + }, + skipEncoding: true +}; +export const scope1: msRest.OperationQueryParameter = { + parameterPath: "scope1", mapper: { required: true, - serializedName: "resourceGroupName", + serializedName: "scope", type: { name: "String" } @@ -200,6 +287,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: { @@ -210,6 +319,16 @@ export const subscriptionId: msRest.OperationURLParameter = { } } }; +export const term: msRest.OperationQueryParameter = { + parameterPath: "term", + mapper: { + required: true, + serializedName: "term", + type: { + name: "String" + } + } +}; export const top: msRest.OperationQueryParameter = { parameterPath: [ "options", diff --git a/sdk/consumption/arm-consumption/src/models/priceSheetMappers.ts b/sdk/consumption/arm-consumption/src/models/priceSheetMappers.ts index 4e3fbf038eea..dbb1fa8ef540 100644 --- a/sdk/consumption/arm-consumption/src/models/priceSheetMappers.ts +++ b/sdk/consumption/arm-consumption/src/models/priceSheetMappers.ts @@ -1,39 +1,59 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * 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, + BudgetComparisonExpression, + BudgetFilter, + BudgetFilterProperties, + BudgetTimePeriod, + ChargeSummary, + CreditBalanceSummary, + CreditSummary, + CurrentSpend, + ErrorDetails, + ErrorResponse, + EventSummary, Forecast, ForecastPropertiesConfidenceLevelsItem, + ForecastSpend, + LegacyChargeSummary, + LegacyReservationTransaction, + LegacyUsageDetail, + LotSummary, ManagementGroupAggregatedCostResult, - ChargeSummary, + Marketplace, + MeterDetails, + MeterDetailsResponse, + ModernChargeSummary, + ModernReservationTransaction, + ModernUsageDetail, + Notification, + PriceSheetProperties, + PriceSheetResult, ProxyResource, - TagsResult, + ReservationDetail, + ReservationRecommendationDetailsCalculatedSavingsProperties, + ReservationRecommendationDetailsModel, + ReservationRecommendationDetailsResourceProperties, + ReservationRecommendationDetailsSavingsProperties, + ReservationRecommendationDetailsUsageProperties, + ReservationSummary, + ReservationTransaction, + ReservationTransactionResource, + Resource, Tag, - Budget, - BudgetTimePeriod, - Filters, - CurrentSpend, - Notification + TagsResult, + UsageDetail } from "../models/mappers"; - diff --git a/sdk/consumption/arm-consumption/src/models/reservationRecommendationDetailsMappers.ts b/sdk/consumption/arm-consumption/src/models/reservationRecommendationDetailsMappers.ts new file mode 100644 index 000000000000..5ed7f75c5683 --- /dev/null +++ b/sdk/consumption/arm-consumption/src/models/reservationRecommendationDetailsMappers.ts @@ -0,0 +1,59 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * 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, + BudgetComparisonExpression, + BudgetFilter, + BudgetFilterProperties, + BudgetTimePeriod, + ChargeSummary, + CreditBalanceSummary, + CreditSummary, + CurrentSpend, + EventSummary, + Forecast, + ForecastPropertiesConfidenceLevelsItem, + ForecastSpend, + HighCasedErrorDetails, + HighCasedErrorResponse, + LegacyChargeSummary, + LegacyReservationTransaction, + LegacyUsageDetail, + LotSummary, + ManagementGroupAggregatedCostResult, + Marketplace, + MeterDetails, + MeterDetailsResponse, + ModernChargeSummary, + ModernReservationTransaction, + ModernUsageDetail, + Notification, + PriceSheetProperties, + PriceSheetResult, + ProxyResource, + ReservationDetail, + ReservationRecommendationDetailsCalculatedSavingsProperties, + ReservationRecommendationDetailsModel, + ReservationRecommendationDetailsResourceProperties, + ReservationRecommendationDetailsSavingsProperties, + ReservationRecommendationDetailsUsageProperties, + ReservationSummary, + ReservationTransaction, + ReservationTransactionResource, + Resource, + Tag, + 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..0f05495f1196 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. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * 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..68c17a6015d5 --- /dev/null +++ b/sdk/consumption/arm-consumption/src/models/reservationTransactionsMappers.ts @@ -0,0 +1,61 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * 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, + BudgetComparisonExpression, + BudgetFilter, + BudgetFilterProperties, + BudgetTimePeriod, + ChargeSummary, + CreditBalanceSummary, + CreditSummary, + CurrentSpend, + ErrorDetails, + ErrorResponse, + EventSummary, + Forecast, + ForecastPropertiesConfidenceLevelsItem, + ForecastSpend, + LegacyChargeSummary, + LegacyReservationTransaction, + LegacyUsageDetail, + LotSummary, + ManagementGroupAggregatedCostResult, + Marketplace, + MeterDetails, + MeterDetailsResponse, + ModernChargeSummary, + ModernReservationTransaction, + ModernReservationTransactionsListResult, + ModernUsageDetail, + Notification, + PriceSheetProperties, + PriceSheetResult, + ProxyResource, + ReservationDetail, + ReservationRecommendationDetailsCalculatedSavingsProperties, + ReservationRecommendationDetailsModel, + ReservationRecommendationDetailsResourceProperties, + ReservationRecommendationDetailsSavingsProperties, + ReservationRecommendationDetailsUsageProperties, + ReservationSummary, + ReservationTransaction, + ReservationTransactionResource, + 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..7023adbf634f 100644 --- a/sdk/consumption/arm-consumption/src/models/reservationsDetailsMappers.ts +++ b/sdk/consumption/arm-consumption/src/models/reservationsDetailsMappers.ts @@ -1,40 +1,60 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * 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, + BudgetComparisonExpression, + BudgetFilter, + BudgetFilterProperties, + BudgetTimePeriod, + ChargeSummary, + CreditBalanceSummary, + CreditSummary, + CurrentSpend, + ErrorDetails, + ErrorResponse, + EventSummary, Forecast, ForecastPropertiesConfidenceLevelsItem, + ForecastSpend, + LegacyChargeSummary, + LegacyReservationTransaction, + LegacyUsageDetail, + LotSummary, ManagementGroupAggregatedCostResult, - ChargeSummary, + Marketplace, + MeterDetails, + MeterDetailsResponse, + ModernChargeSummary, + ModernReservationTransaction, + ModernUsageDetail, + Notification, + PriceSheetProperties, + PriceSheetResult, ProxyResource, - TagsResult, + ReservationDetail, + ReservationDetailsListResult, + ReservationRecommendationDetailsCalculatedSavingsProperties, + ReservationRecommendationDetailsModel, + ReservationRecommendationDetailsResourceProperties, + ReservationRecommendationDetailsSavingsProperties, + ReservationRecommendationDetailsUsageProperties, + ReservationSummary, + ReservationTransaction, + ReservationTransactionResource, + 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..49f9dbd1ce6d 100644 --- a/sdk/consumption/arm-consumption/src/models/reservationsSummariesMappers.ts +++ b/sdk/consumption/arm-consumption/src/models/reservationsSummariesMappers.ts @@ -1,40 +1,60 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * 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, + BudgetComparisonExpression, + BudgetFilter, + BudgetFilterProperties, + BudgetTimePeriod, + ChargeSummary, + CreditBalanceSummary, + CreditSummary, + CurrentSpend, + ErrorDetails, + ErrorResponse, + EventSummary, Forecast, ForecastPropertiesConfidenceLevelsItem, + ForecastSpend, + LegacyChargeSummary, + LegacyReservationTransaction, + LegacyUsageDetail, + LotSummary, ManagementGroupAggregatedCostResult, - ChargeSummary, + Marketplace, + MeterDetails, + MeterDetailsResponse, + ModernChargeSummary, + ModernReservationTransaction, + ModernUsageDetail, + Notification, + PriceSheetProperties, + PriceSheetResult, ProxyResource, - TagsResult, + ReservationDetail, + ReservationRecommendationDetailsCalculatedSavingsProperties, + ReservationRecommendationDetailsModel, + ReservationRecommendationDetailsResourceProperties, + ReservationRecommendationDetailsSavingsProperties, + ReservationRecommendationDetailsUsageProperties, + ReservationSummariesListResult, + ReservationSummary, + ReservationTransaction, + ReservationTransactionResource, + 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..dbb1fa8ef540 100644 --- a/sdk/consumption/arm-consumption/src/models/tagsMappers.ts +++ b/sdk/consumption/arm-consumption/src/models/tagsMappers.ts @@ -1,39 +1,59 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * 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, + BudgetComparisonExpression, + BudgetFilter, + BudgetFilterProperties, BudgetTimePeriod, - Filters, + ChargeSummary, + CreditBalanceSummary, + CreditSummary, CurrentSpend, - Notification, - Resource, - UsageDetail, - MeterDetails, - Marketplace, - Balance, - BalancePropertiesNewPurchasesDetailsItem, - BalancePropertiesAdjustmentDetailsItem, - ReservationSummary, - ReservationDetail, - PriceSheetResult, - PriceSheetProperties, + ErrorDetails, + ErrorResponse, + EventSummary, Forecast, ForecastPropertiesConfidenceLevelsItem, + ForecastSpend, + LegacyChargeSummary, + LegacyReservationTransaction, + LegacyUsageDetail, + LotSummary, ManagementGroupAggregatedCostResult, - ChargeSummary + Marketplace, + MeterDetails, + MeterDetailsResponse, + ModernChargeSummary, + ModernReservationTransaction, + ModernUsageDetail, + Notification, + PriceSheetProperties, + PriceSheetResult, + ProxyResource, + ReservationDetail, + ReservationRecommendationDetailsCalculatedSavingsProperties, + ReservationRecommendationDetailsModel, + ReservationRecommendationDetailsResourceProperties, + ReservationRecommendationDetailsSavingsProperties, + ReservationRecommendationDetailsUsageProperties, + ReservationSummary, + ReservationTransaction, + ReservationTransactionResource, + 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..e0911ab63138 100644 --- a/sdk/consumption/arm-consumption/src/models/usageDetailsMappers.ts +++ b/sdk/consumption/arm-consumption/src/models/usageDetailsMappers.ts @@ -1,40 +1,60 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * 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, + BudgetComparisonExpression, + BudgetFilter, + BudgetFilterProperties, + BudgetTimePeriod, + ChargeSummary, + CreditBalanceSummary, + CreditSummary, + CurrentSpend, + ErrorDetails, + ErrorResponse, + EventSummary, Forecast, ForecastPropertiesConfidenceLevelsItem, + ForecastSpend, + LegacyChargeSummary, + LegacyReservationTransaction, + LegacyUsageDetail, + LotSummary, ManagementGroupAggregatedCostResult, - ChargeSummary, + Marketplace, + MeterDetails, + MeterDetailsResponse, + ModernChargeSummary, + ModernReservationTransaction, + ModernUsageDetail, + Notification, + PriceSheetProperties, + PriceSheetResult, ProxyResource, - TagsResult, + ReservationDetail, + ReservationRecommendationDetailsCalculatedSavingsProperties, + ReservationRecommendationDetailsModel, + ReservationRecommendationDetailsResourceProperties, + ReservationRecommendationDetailsSavingsProperties, + ReservationRecommendationDetailsUsageProperties, + ReservationSummary, + ReservationTransaction, + ReservationTransactionResource, + Resource, Tag, - Budget, - BudgetTimePeriod, - Filters, - CurrentSpend, - Notification + TagsResult, + UsageDetail, + UsageDetailsListResult } from "../models/mappers"; - diff --git a/sdk/consumption/arm-consumption/src/operations/aggregatedCost.ts b/sdk/consumption/arm-consumption/src/operations/aggregatedCost.ts index b3747dd1e77e..abcc72958d3d 100644 --- a/sdk/consumption/arm-consumption/src/operations/aggregatedCost.ts +++ b/sdk/consumption/arm-consumption/src/operations/aggregatedCost.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -117,7 +116,7 @@ const getByManagementGroupOperationSpec: msRest.OperationSpec = { const getForBillingPeriodByManagementGroupOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/Microsoft.Consumption/aggregatedcost", + path: "providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/Microsoft.Consumption/aggregatedCost", urlParameters: [ Parameters.managementGroupId, Parameters.billingPeriodName diff --git a/sdk/consumption/arm-consumption/src/operations/balances.ts b/sdk/consumption/arm-consumption/src/operations/balances.ts index 2bce5d1e065c..cf9ec7e63e9d 100644 --- a/sdk/consumption/arm-consumption/src/operations/balances.ts +++ b/sdk/consumption/arm-consumption/src/operations/balances.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is diff --git a/sdk/consumption/arm-consumption/src/operations/budgets.ts b/sdk/consumption/arm-consumption/src/operations/budgets.ts index ea97f7785722..06c586da1d83 100644 --- a/sdk/consumption/arm-consumption/src/operations/budgets.ts +++ b/sdk/consumption/arm-consumption/src/operations/budgets.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -27,23 +26,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 +93,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 }, @@ -107,31 +164,74 @@ 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. + * The operation to create or update a budget. You can optionally provide an eTag if desired as a + * form of concurrency control. To obtain the latest eTag for a given budget, perform a get + * operation prior to your put operation. + * @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 +242,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 +312,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 +338,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 +367,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 +391,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 +425,9 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { const deleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Consumption/budgets/{budgetName}", + path: "{scope}/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}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, + Parameters.scope, Parameters.budgetName ], queryParameters: [ @@ -546,26 +452,8 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.BudgetsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listByResourceGroupNameNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink + queryParameters: [ + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/consumption/arm-consumption/src/operations/charges.ts b/sdk/consumption/arm-consumption/src/operations/charges.ts index 8ba1f7efd45a..20e79ffc061c 100644 --- a/sdk/consumption/arm-consumption/src/operations/charges.ts +++ b/sdk/consumption/arm-consumption/src/operations/charges.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -27,205 +26,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 +127,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..69bc405585f0 --- /dev/null +++ b/sdk/consumption/arm-consumption/src/operations/credits.ts @@ -0,0 +1,85 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * 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..87e063383063 --- /dev/null +++ b/sdk/consumption/arm-consumption/src/operations/eventsOperations.ts @@ -0,0 +1,157 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * 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 startDate Start date + * @param endDate End date + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, startDate: string, endDate: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param startDate Start date + * @param endDate End date + * @param callback The callback + */ + listNext(nextPageLink: string, startDate: string, endDate: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param startDate Start date + * @param endDate End date + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, startDate: string, endDate: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, startDate: string, endDate: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + startDate, + endDate, + 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 + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.startDate1, + Parameters.endDate1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Events + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/consumption/arm-consumption/src/operations/forecasts.ts b/sdk/consumption/arm-consumption/src/operations/forecasts.ts index cffd25eed466..c813a7a2375d 100644 --- a/sdk/consumption/arm-consumption/src/operations/forecasts.ts +++ b/sdk/consumption/arm-consumption/src/operations/forecasts.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -27,7 +26,9 @@ export class Forecasts { } /** - * Lists the forecast charges by subscriptionId. + * Lists the forecast charges for scope defined. Please note that this API is no longer actively + * under development. We recommend using our new Forecast API moving forward: + * https://docs.microsoft.com/en-us/rest/api/cost-management/forecast/usage. * @param [options] The optional parameters * @returns Promise */ diff --git a/sdk/consumption/arm-consumption/src/operations/index.ts b/sdk/consumption/arm-consumption/src/operations/index.ts index 77ea57064d73..90515b9dfc4a 100644 --- a/sdk/consumption/arm-consumption/src/operations/index.ts +++ b/sdk/consumption/arm-consumption/src/operations/index.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -10,14 +9,19 @@ 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 "./reservationRecommendationDetails"; +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..3656a40c50a4 --- /dev/null +++ b/sdk/consumption/arm-consumption/src/operations/lotsOperations.ts @@ -0,0 +1,137 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * 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 + ], + queryParameters: [ + Parameters.apiVersion + ], + 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..94299dc9fc92 100644 --- a/sdk/consumption/arm-consumption/src/operations/marketplaces.ts +++ b/sdk/consumption/arm-consumption/src/operations/marketplaces.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -27,24 +26,58 @@ 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, + * '/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, + * '/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, + * '/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,792 +85,42 @@ 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. - * @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; - } - - /** - * 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 -}; + * 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 + */ + listNext(nextPageLink: string, options?: Models.MarketplacesListNextOptionalParams): 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: Models.MarketplacesListNextOptionalParams, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: Models.MarketplacesListNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} -const listByManagementGroupOperationSpec: msRest.OperationSpec = { +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Consumption/marketplaces", + path: "{scope}/providers/Microsoft.Consumption/marketplaces", urlParameters: [ - Parameters.managementGroupId + Parameters.scope ], queryParameters: [ Parameters.filter0, @@ -859,12 +142,12 @@ const listByManagementGroupOperationSpec: msRest.OperationSpec = { serializer }; -const listForBillingPeriodByManagementGroupOperationSpec: msRest.OperationSpec = { +const listNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/marketplaces", + baseUrl: "https://management.azure.com", + path: "{nextLink}", urlParameters: [ - Parameters.managementGroupId, - Parameters.billingPeriodName + Parameters.nextPageLink ], queryParameters: [ Parameters.filter0, @@ -885,213 +168,3 @@ const listForBillingPeriodByManagementGroupOperationSpec: msRest.OperationSpec = }, serializer }; - -const listNextOperationSpec: 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 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/operations.ts b/sdk/consumption/arm-consumption/src/operations/operations.ts index f5d1f7c74f7e..78f3d29fa152 100644 --- a/sdk/consumption/arm-consumption/src/operations/operations.ts +++ b/sdk/consumption/arm-consumption/src/operations/operations.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -108,6 +107,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/consumption/arm-consumption/src/operations/priceSheet.ts b/sdk/consumption/arm-consumption/src/operations/priceSheet.ts index acc62419b42a..6d5c3c12a33d 100644 --- a/sdk/consumption/arm-consumption/src/operations/priceSheet.ts +++ b/sdk/consumption/arm-consumption/src/operations/priceSheet.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -27,8 +26,8 @@ export class PriceSheet { } /** - * Gets the price sheet for a scope by subscriptionId. Price sheet is available via this API only - * for May 1, 2014 or later. + * Gets the price sheet for a subscription. Price sheet is available via this API only for May 1, + * 2014 or later. * @param [options] The optional parameters * @returns Promise */ diff --git a/sdk/consumption/arm-consumption/src/operations/reservationRecommendationDetails.ts b/sdk/consumption/arm-consumption/src/operations/reservationRecommendationDetails.ts new file mode 100644 index 000000000000..7012e4e57671 --- /dev/null +++ b/sdk/consumption/arm-consumption/src/operations/reservationRecommendationDetails.ts @@ -0,0 +1,130 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * 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/reservationRecommendationDetailsMappers"; +import * as Parameters from "../models/parameters"; +import { ConsumptionManagementClientContext } from "../consumptionManagementClientContext"; + +/** Class representing a ReservationRecommendationDetails. */ +export class ReservationRecommendationDetails { + private readonly client: ConsumptionManagementClientContext; + + /** + * Create a ReservationRecommendationDetails. + * @param {ConsumptionManagementClientContext} client Reference to the service client. + */ + constructor(client: ConsumptionManagementClientContext) { + this.client = client; + } + + /** + * Details of a reservation recommendation for what-if analysis of reserved instances. + * @param scope The scope associated with reservation recommendation details operations. This + * includes '/subscriptions/{subscriptionId}/' for subscription scope, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resource group scope, + * /providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope, and + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + * for billingProfile scope + * @param scope1 Scope of the reservation. Possible values include: 'Single', 'Shared' + * @param region Used to select the region the recommendation should be generated for. + * @param term Specify length of reservation recommendation term. Possible values include: 'P1Y', + * 'P3Y' + * @param lookBackPeriod Filter the time period on which reservation recommendation results are + * based. Possible values include: 'Last07Days', 'Last30Days', 'Last60Days' + * @param product Filter the products for which reservation recommendation results are generated. + * Examples: Standard_DS1_v2 (for VM), Premium_SSD_Managed_Disks_P30 (for Managed Disks) + * @param [options] The optional parameters + * @returns Promise + */ + get(scope: string, scope1: Models.Scope12, region: string, term: Models.Term, lookBackPeriod: Models.LookBackPeriod, product: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param scope The scope associated with reservation recommendation details operations. This + * includes '/subscriptions/{subscriptionId}/' for subscription scope, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resource group scope, + * /providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope, and + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + * for billingProfile scope + * @param scope1 Scope of the reservation. Possible values include: 'Single', 'Shared' + * @param region Used to select the region the recommendation should be generated for. + * @param term Specify length of reservation recommendation term. Possible values include: 'P1Y', + * 'P3Y' + * @param lookBackPeriod Filter the time period on which reservation recommendation results are + * based. Possible values include: 'Last07Days', 'Last30Days', 'Last60Days' + * @param product Filter the products for which reservation recommendation results are generated. + * Examples: Standard_DS1_v2 (for VM), Premium_SSD_Managed_Disks_P30 (for Managed Disks) + * @param callback The callback + */ + get(scope: string, scope1: Models.Scope12, region: string, term: Models.Term, lookBackPeriod: Models.LookBackPeriod, product: string, callback: msRest.ServiceCallback): void; + /** + * @param scope The scope associated with reservation recommendation details operations. This + * includes '/subscriptions/{subscriptionId}/' for subscription scope, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resource group scope, + * /providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope, and + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + * for billingProfile scope + * @param scope1 Scope of the reservation. Possible values include: 'Single', 'Shared' + * @param region Used to select the region the recommendation should be generated for. + * @param term Specify length of reservation recommendation term. Possible values include: 'P1Y', + * 'P3Y' + * @param lookBackPeriod Filter the time period on which reservation recommendation results are + * based. Possible values include: 'Last07Days', 'Last30Days', 'Last60Days' + * @param product Filter the products for which reservation recommendation results are generated. + * Examples: Standard_DS1_v2 (for VM), Premium_SSD_Managed_Disks_P30 (for Managed Disks) + * @param options The optional parameters + * @param callback The callback + */ + get(scope: string, scope1: Models.Scope12, region: string, term: Models.Term, lookBackPeriod: Models.LookBackPeriod, product: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(scope: string, scope1: Models.Scope12, region: string, term: Models.Term, lookBackPeriod: Models.LookBackPeriod, product: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + scope, + scope1, + region, + term, + lookBackPeriod, + product, + options + }, + getOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{scope}/providers/Microsoft.Consumption/reservationRecommendationDetails", + urlParameters: [ + Parameters.scope + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.scope1, + Parameters.region, + Parameters.term, + Parameters.lookBackPeriod, + Parameters.product + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ReservationRecommendationDetailsModel + }, + 204: {}, + default: { + bodyMapper: Mappers.HighCasedErrorResponse + } + }, + serializer +}; diff --git a/sdk/consumption/arm-consumption/src/operations/reservationRecommendations.ts b/sdk/consumption/arm-consumption/src/operations/reservationRecommendations.ts index 3f4787a580a9..68a0748eb829 100644 --- a/sdk/consumption/arm-consumption/src/operations/reservationRecommendations.ts +++ b/sdk/consumption/arm-consumption/src/operations/reservationRecommendations.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -27,23 +26,42 @@ 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, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resource group 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, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resource group 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, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resource group 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,12 +69,12 @@ 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 */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listNext(nextPageLink: string, options?: Models.ReservationRecommendationsListNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -67,8 +85,8 @@ export class ReservationRecommendations { * @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 { + listNext(nextPageLink: string, options: Models.ReservationRecommendationsListNextOptionalParams, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: Models.ReservationRecommendationsListNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -83,9 +101,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, @@ -98,6 +116,7 @@ const listOperationSpec: msRest.OperationSpec = { 200: { bodyMapper: Mappers.ReservationRecommendationsListResult }, + 204: {}, default: { bodyMapper: Mappers.ErrorResponse } @@ -112,6 +131,10 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.filter0, + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], @@ -119,6 +142,7 @@ const listNextOperationSpec: msRest.OperationSpec = { 200: { bodyMapper: Mappers.ReservationRecommendationsListResult }, + 204: {}, default: { bodyMapper: Mappers.ErrorResponse } 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..6e17f90d9463 --- /dev/null +++ b/sdk/consumption/arm-consumption/src/operations/reservationTransactions.ts @@ -0,0 +1,244 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * 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 billingAccountId BillingAccount ID + * @param billingProfileId Azure Billing Profile ID. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingProfile(billingAccountId: string, billingProfileId: string, options?: Models.ReservationTransactionsListByBillingProfileOptionalParams): Promise; + /** + * @param billingAccountId BillingAccount ID + * @param billingProfileId Azure Billing Profile ID. + * @param callback The callback + */ + listByBillingProfile(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 + */ + listByBillingProfile(billingAccountId: string, billingProfileId: string, options: Models.ReservationTransactionsListByBillingProfileOptionalParams, callback: msRest.ServiceCallback): void; + listByBillingProfile(billingAccountId: string, billingProfileId: string, options?: Models.ReservationTransactionsListByBillingProfileOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountId, + billingProfileId, + options + }, + listByBillingProfileOperationSpec, + 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?: Models.ReservationTransactionsListNextOptionalParams): 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: Models.ReservationTransactionsListNextOptionalParams, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: Models.ReservationTransactionsListNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + 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 + */ + listByBillingProfileNext(nextPageLink: string, options?: Models.ReservationTransactionsListByBillingProfileNextOptionalParams): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByBillingProfileNext(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 + */ + listByBillingProfileNext(nextPageLink: string, options: Models.ReservationTransactionsListByBillingProfileNextOptionalParams, callback: msRest.ServiceCallback): void; + listByBillingProfileNext(nextPageLink: string, options?: Models.ReservationTransactionsListByBillingProfileNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByBillingProfileNextOperationSpec, + 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 listByBillingProfileOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.Consumption/reservationTransactions", + urlParameters: [ + Parameters.billingAccountId, + Parameters.billingProfileId + ], + queryParameters: [ + Parameters.filter0, + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ModernReservationTransactionsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.filter0, + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ReservationTransactionsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingProfileNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.filter0, + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ModernReservationTransactionsListResult + }, + 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..54231efe08f3 100644 --- a/sdk/consumption/arm-consumption/src/operations/reservationsDetails.ts +++ b/sdk/consumption/arm-consumption/src/operations/reservationsDetails.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -100,28 +99,75 @@ 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. + * @param filter Filter reservation details by date range. The properties/UsageDate for start date + * and end date. The filter supports 'le' and 'ge' * @param [options] The optional parameters * @returns Promise */ - listByReservationOrderNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listByReservationOrderNext(nextPageLink: string, filter: string, options?: msRest.RequestOptionsBase): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param filter Filter reservation details by date range. The properties/UsageDate for start date + * and end date. The filter supports 'le' and 'ge' * @param callback The callback */ - listByReservationOrderNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + listByReservationOrderNext(nextPageLink: string, filter: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param filter Filter reservation details by date range. The properties/UsageDate for start date + * and end date. The filter supports 'le' and 'ge' * @param options The optional parameters * @param callback The callback */ - listByReservationOrderNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByReservationOrderNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listByReservationOrderNext(nextPageLink: string, filter: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByReservationOrderNext(nextPageLink: string, filter: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, + filter, options }, listByReservationOrderNextOperationSpec, @@ -131,30 +177,65 @@ export class ReservationsDetails { /** * Lists the reservations details for provided date range. * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param filter Filter reservation details by date range. The properties/UsageDate for start date + * and end date. The filter supports 'le' and 'ge' * @param [options] The optional parameters * @returns Promise */ - listByReservationOrderAndReservationNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listByReservationOrderAndReservationNext(nextPageLink: string, filter: string, options?: msRest.RequestOptionsBase): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param filter Filter reservation details by date range. The properties/UsageDate for start date + * and end date. The filter supports 'le' and 'ge' * @param callback The callback */ - listByReservationOrderAndReservationNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + listByReservationOrderAndReservationNext(nextPageLink: string, filter: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param filter Filter reservation details by date range. The properties/UsageDate for start date + * and end date. The filter supports 'le' and 'ge' * @param options The optional parameters * @param callback The callback */ - listByReservationOrderAndReservationNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByReservationOrderAndReservationNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listByReservationOrderAndReservationNext(nextPageLink: string, filter: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByReservationOrderAndReservationNext(nextPageLink: string, filter: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, + filter, options }, 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?: Models.ReservationsDetailsListNextOptionalParams): 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: Models.ReservationsDetailsListNextOptionalParams, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: Models.ReservationsDetailsListNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } } // Operation Specifications @@ -163,7 +244,7 @@ const listByReservationOrderOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/providers/Microsoft.Consumption/reservationDetails", urlParameters: [ - Parameters.reservationOrderId + Parameters.reservationOrderId0 ], queryParameters: [ Parameters.filter1, @@ -187,8 +268,8 @@ const listByReservationOrderAndReservationOperationSpec: msRest.OperationSpec = httpMethod: "GET", path: "providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/reservations/{reservationId}/providers/Microsoft.Consumption/reservationDetails", urlParameters: [ - Parameters.reservationOrderId, - Parameters.reservationId + Parameters.reservationOrderId0, + Parameters.reservationId0 ], queryParameters: [ Parameters.filter1, @@ -208,6 +289,34 @@ 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.reservationId1, + Parameters.reservationOrderId1, + 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", @@ -215,6 +324,10 @@ const listByReservationOrderNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.filter1, + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], @@ -236,6 +349,39 @@ const listByReservationOrderAndReservationNextOperationSpec: msRest.OperationSpe urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.filter1, + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ReservationDetailsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.startDate0, + Parameters.endDate0, + Parameters.filter0, + Parameters.reservationId1, + Parameters.reservationOrderId1, + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/consumption/arm-consumption/src/operations/reservationsSummaries.ts b/sdk/consumption/arm-consumption/src/operations/reservationsSummaries.ts index 47d212f52431..12455eefb0c6 100644 --- a/sdk/consumption/arm-consumption/src/operations/reservationsSummaries.ts +++ b/sdk/consumption/arm-consumption/src/operations/reservationsSummaries.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -94,28 +93,76 @@ 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. + * @param grain Can be daily or monthly. Possible values include: 'DailyGrain', 'MonthlyGrain' * @param [options] The optional parameters * @returns Promise */ - listByReservationOrderNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listByReservationOrderNext(nextPageLink: string, grain: Models.Datagrain, options?: Models.ReservationsSummariesListByReservationOrderNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param grain Can be daily or monthly. Possible values include: 'DailyGrain', 'MonthlyGrain' * @param callback The callback */ - listByReservationOrderNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + listByReservationOrderNext(nextPageLink: string, grain: Models.Datagrain, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param grain Can be daily or monthly. Possible values include: 'DailyGrain', 'MonthlyGrain' * @param options The optional parameters * @param callback The callback */ - listByReservationOrderNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByReservationOrderNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listByReservationOrderNext(nextPageLink: string, grain: Models.Datagrain, options: Models.ReservationsSummariesListByReservationOrderNextOptionalParams, callback: msRest.ServiceCallback): void; + listByReservationOrderNext(nextPageLink: string, grain: Models.Datagrain, options?: Models.ReservationsSummariesListByReservationOrderNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, + grain, options }, listByReservationOrderNextOperationSpec, @@ -125,30 +172,66 @@ export class ReservationsSummaries { /** * Lists the reservations summaries for daily or monthly grain. * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param grain Can be daily or monthly. Possible values include: 'DailyGrain', 'MonthlyGrain' * @param [options] The optional parameters * @returns Promise */ - listByReservationOrderAndReservationNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listByReservationOrderAndReservationNext(nextPageLink: string, grain: Models.Datagrain, options?: Models.ReservationsSummariesListByReservationOrderAndReservationNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param grain Can be daily or monthly. Possible values include: 'DailyGrain', 'MonthlyGrain' * @param callback The callback */ - listByReservationOrderAndReservationNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + listByReservationOrderAndReservationNext(nextPageLink: string, grain: Models.Datagrain, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param grain Can be daily or monthly. Possible values include: 'DailyGrain', 'MonthlyGrain' * @param options The optional parameters * @param callback The callback */ - listByReservationOrderAndReservationNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByReservationOrderAndReservationNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listByReservationOrderAndReservationNext(nextPageLink: string, grain: Models.Datagrain, options: Models.ReservationsSummariesListByReservationOrderAndReservationNextOptionalParams, callback: msRest.ServiceCallback): void; + listByReservationOrderAndReservationNext(nextPageLink: string, grain: Models.Datagrain, options?: Models.ReservationsSummariesListByReservationOrderAndReservationNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, + grain, options }, 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 grain Can be daily or monthly. Possible values include: 'DailyGrain', 'MonthlyGrain' + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, grain: Models.Datagrain, options?: Models.ReservationsSummariesListNextOptionalParams): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param grain Can be daily or monthly. Possible values include: 'DailyGrain', 'MonthlyGrain' + * @param callback The callback + */ + listNext(nextPageLink: string, grain: Models.Datagrain, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param grain Can be daily or monthly. Possible values include: 'DailyGrain', 'MonthlyGrain' + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, grain: Models.Datagrain, options: Models.ReservationsSummariesListNextOptionalParams, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, grain: Models.Datagrain, options?: Models.ReservationsSummariesListNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + grain, + options + }, + listNextOperationSpec, + callback) as Promise; + } } // Operation Specifications @@ -157,7 +240,7 @@ const listByReservationOrderOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/providers/Microsoft.Consumption/reservationSummaries", urlParameters: [ - Parameters.reservationOrderId + Parameters.reservationOrderId0 ], queryParameters: [ Parameters.grain, @@ -182,8 +265,8 @@ const listByReservationOrderAndReservationOperationSpec: msRest.OperationSpec = httpMethod: "GET", path: "providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/reservations/{reservationId}/providers/Microsoft.Consumption/reservationSummaries", urlParameters: [ - Parameters.reservationOrderId, - Parameters.reservationId + Parameters.reservationOrderId0, + Parameters.reservationId0 ], queryParameters: [ Parameters.grain, @@ -204,6 +287,35 @@ 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.reservationId1, + Parameters.reservationOrderId1, + 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", @@ -211,6 +323,11 @@ const listByReservationOrderNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.grain, + Parameters.filter0, + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], @@ -232,6 +349,41 @@ const listByReservationOrderAndReservationNextOperationSpec: msRest.OperationSpe urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.grain, + Parameters.filter0, + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ReservationSummariesListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.grain, + Parameters.startDate0, + Parameters.endDate0, + Parameters.filter0, + Parameters.reservationId1, + Parameters.reservationOrderId1, + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/consumption/arm-consumption/src/operations/tags.ts b/sdk/consumption/arm-consumption/src/operations/tags.ts index 81d26e09da89..ba9375de145f 100644 --- a/sdk/consumption/arm-consumption/src/operations/tags.ts +++ b/sdk/consumption/arm-consumption/src/operations/tags.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -27,27 +26,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 +85,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 @@ -73,6 +99,7 @@ const getOperationSpec: msRest.OperationSpec = { 200: { bodyMapper: Mappers.TagsResult }, + 204: {}, default: { bodyMapper: Mappers.ErrorResponse } diff --git a/sdk/consumption/arm-consumption/src/operations/usageDetails.ts b/sdk/consumption/arm-consumption/src/operations/usageDetails.ts index a35d44831b51..30030ca62a14 100644 --- a/sdk/consumption/arm-consumption/src/operations/usageDetails.ts +++ b/sdk/consumption/arm-consumption/src/operations/usageDetails.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -27,835 +26,125 @@ 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, 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 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. - * @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; - } - - /** - * 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 -}; + /** + * 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 + */ + listNext(nextPageLink: string, options?: Models.UsageDetailsListNextOptionalParams): 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: Models.UsageDetailsListNextOptionalParams, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: Models.UsageDetailsListNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} -const listByManagementGroupOperationSpec: msRest.OperationSpec = { +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Consumption/usageDetails", + path: "{scope}/providers/Microsoft.Consumption/usageDetails", urlParameters: [ - Parameters.managementGroupId + Parameters.scope ], queryParameters: [ Parameters.expand, @@ -863,7 +152,7 @@ const listByManagementGroupOperationSpec: msRest.OperationSpec = { Parameters.skiptoken, Parameters.top, Parameters.apiVersion, - Parameters.apply + Parameters.metric ], headerParameters: [ Parameters.acceptLanguage @@ -879,12 +168,12 @@ const listByManagementGroupOperationSpec: msRest.OperationSpec = { serializer }; -const listForBillingPeriodByManagementGroupOperationSpec: msRest.OperationSpec = { +const listNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/usageDetails", + baseUrl: "https://management.azure.com", + path: "{nextLink}", urlParameters: [ - Parameters.managementGroupId, - Parameters.billingPeriodName + Parameters.nextPageLink ], queryParameters: [ Parameters.expand, @@ -892,217 +181,7 @@ const listForBillingPeriodByManagementGroupOperationSpec: msRest.OperationSpec = Parameters.skiptoken, Parameters.top, Parameters.apiVersion, - Parameters.apply - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.UsageDetailsListResult - }, - 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.UsageDetailsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - 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 + Parameters.metric ], headerParameters: [ Parameters.acceptLanguage 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