From d8e5bac9777028a2305792d566b83fdcde511fe0 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 16 Nov 2022 02:12:01 +0000 Subject: [PATCH] CodeGen from PR 21560 in Azure/azure-rest-api-specs Merge 77065c342f2b6f7259a289df35ea365eb41a27c1 into b1780623ffb2d4c719c2a62878930d317522290d --- sdk/consumption/arm-consumption/CHANGELOG.md | 65 +- sdk/consumption/arm-consumption/_meta.json | 10 +- sdk/consumption/arm-consumption/package.json | 14 +- .../review/arm-consumption.api.md | 1438 +----- .../src/consumptionManagementClient.ts | 78 +- .../arm-consumption/src/models/index.ts | 3627 +------------ .../arm-consumption/src/models/mappers.ts | 4484 +---------------- .../arm-consumption/src/models/parameters.ts | 278 +- .../src/operations/aggregatedCost.ts | 107 - .../src/operations/balances.ts | 107 - .../arm-consumption/src/operations/budgets.ts | 331 -- .../arm-consumption/src/operations/charges.ts | 82 - .../arm-consumption/src/operations/credits.ts | 69 - .../src/operations/eventsOperations.ts | 358 -- .../arm-consumption/src/operations/index.ts | 15 - .../src/operations/lotsOperations.ts | 321 -- .../src/operations/marketplaces.ts | 190 - .../src/operations/priceSheet.ts | 4 +- .../reservationRecommendationDetails.ts | 89 - .../operations/reservationRecommendations.ts | 166 - .../src/operations/reservationTransactions.ts | 311 -- .../src/operations/reservationsDetails.ts | 497 -- .../src/operations/reservationsSummaries.ts | 504 -- .../arm-consumption/src/operations/tags.ts | 70 - .../src/operations/usageDetails.ts | 218 - .../operationsInterfaces/aggregatedCost.ts | 40 - .../src/operationsInterfaces/balances.ts | 40 - .../src/operationsInterfaces/budgets.ts | 117 - .../src/operationsInterfaces/charges.ts | 37 - .../src/operationsInterfaces/credits.ts | 24 - .../operationsInterfaces/eventsOperations.ts | 45 - .../src/operationsInterfaces/index.ts | 15 - .../operationsInterfaces/lotsOperations.ts | 43 - .../src/operationsInterfaces/marketplaces.ts | 35 - .../reservationRecommendationDetails.ts | 41 - .../reservationRecommendations.ts | 32 - .../reservationTransactions.ts | 40 - .../reservationsDetails.ts | 59 - .../reservationsSummaries.ts | 60 - .../src/operationsInterfaces/tags.ts | 27 - .../src/operationsInterfaces/usageDetails.ts | 43 - .../arm-consumption/test/sampleTest.ts | 43 + sdk/consumption/arm-consumption/tsconfig.json | 10 +- 43 files changed, 436 insertions(+), 13748 deletions(-) delete mode 100644 sdk/consumption/arm-consumption/src/operations/aggregatedCost.ts delete mode 100644 sdk/consumption/arm-consumption/src/operations/balances.ts delete mode 100644 sdk/consumption/arm-consumption/src/operations/budgets.ts delete mode 100644 sdk/consumption/arm-consumption/src/operations/charges.ts delete mode 100644 sdk/consumption/arm-consumption/src/operations/credits.ts delete mode 100644 sdk/consumption/arm-consumption/src/operations/eventsOperations.ts delete mode 100644 sdk/consumption/arm-consumption/src/operations/lotsOperations.ts delete mode 100644 sdk/consumption/arm-consumption/src/operations/marketplaces.ts delete mode 100644 sdk/consumption/arm-consumption/src/operations/reservationRecommendationDetails.ts delete mode 100644 sdk/consumption/arm-consumption/src/operations/reservationRecommendations.ts delete mode 100644 sdk/consumption/arm-consumption/src/operations/reservationTransactions.ts delete mode 100644 sdk/consumption/arm-consumption/src/operations/reservationsDetails.ts delete mode 100644 sdk/consumption/arm-consumption/src/operations/reservationsSummaries.ts delete mode 100644 sdk/consumption/arm-consumption/src/operations/tags.ts delete mode 100644 sdk/consumption/arm-consumption/src/operations/usageDetails.ts delete mode 100644 sdk/consumption/arm-consumption/src/operationsInterfaces/aggregatedCost.ts delete mode 100644 sdk/consumption/arm-consumption/src/operationsInterfaces/balances.ts delete mode 100644 sdk/consumption/arm-consumption/src/operationsInterfaces/budgets.ts delete mode 100644 sdk/consumption/arm-consumption/src/operationsInterfaces/charges.ts delete mode 100644 sdk/consumption/arm-consumption/src/operationsInterfaces/credits.ts delete mode 100644 sdk/consumption/arm-consumption/src/operationsInterfaces/eventsOperations.ts delete mode 100644 sdk/consumption/arm-consumption/src/operationsInterfaces/lotsOperations.ts delete mode 100644 sdk/consumption/arm-consumption/src/operationsInterfaces/marketplaces.ts delete mode 100644 sdk/consumption/arm-consumption/src/operationsInterfaces/reservationRecommendationDetails.ts delete mode 100644 sdk/consumption/arm-consumption/src/operationsInterfaces/reservationRecommendations.ts delete mode 100644 sdk/consumption/arm-consumption/src/operationsInterfaces/reservationTransactions.ts delete mode 100644 sdk/consumption/arm-consumption/src/operationsInterfaces/reservationsDetails.ts delete mode 100644 sdk/consumption/arm-consumption/src/operationsInterfaces/reservationsSummaries.ts delete mode 100644 sdk/consumption/arm-consumption/src/operationsInterfaces/tags.ts delete mode 100644 sdk/consumption/arm-consumption/src/operationsInterfaces/usageDetails.ts create mode 100644 sdk/consumption/arm-consumption/test/sampleTest.ts diff --git a/sdk/consumption/arm-consumption/CHANGELOG.md b/sdk/consumption/arm-consumption/CHANGELOG.md index 43a5baa7ac8c..91982320d36b 100644 --- a/sdk/consumption/arm-consumption/CHANGELOG.md +++ b/sdk/consumption/arm-consumption/CHANGELOG.md @@ -1,15 +1,60 @@ # Release History + +## 10.0.0 (2022-11-16) + +**Breaking Changes** -## 9.1.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + - Removed operation group AggregatedCost + - Removed operation group Balances + - Removed operation group Budgets + - Removed operation group Charges + - Removed operation group Credits + - Removed operation group EventsOperations + - Removed operation group LotsOperations + - Removed operation group Marketplaces + - Removed operation group ReservationRecommendationDetails + - Removed operation group ReservationRecommendations + - Removed operation group ReservationsDetails + - Removed operation group ReservationsSummaries + - Removed operation group ReservationTransactions + - Removed operation group Tags + - Removed operation group UsageDetails + - Class ConsumptionManagementClient no longer has parameter aggregatedCost + - Class ConsumptionManagementClient no longer has parameter balances + - Class ConsumptionManagementClient no longer has parameter budgets + - Class ConsumptionManagementClient no longer has parameter charges + - Class ConsumptionManagementClient no longer has parameter credits + - Class ConsumptionManagementClient no longer has parameter eventsOperations + - Class ConsumptionManagementClient no longer has parameter lotsOperations + - Class ConsumptionManagementClient no longer has parameter marketplaces + - Class ConsumptionManagementClient no longer has parameter reservationRecommendationDetails + - Class ConsumptionManagementClient no longer has parameter reservationRecommendations + - Class ConsumptionManagementClient no longer has parameter reservationsDetails + - Class ConsumptionManagementClient no longer has parameter reservationsSummaries + - Class ConsumptionManagementClient no longer has parameter reservationTransactions + - Class ConsumptionManagementClient no longer has parameter tags + - Class ConsumptionManagementClient no longer has parameter usageDetails + - Removed Enum KnownBillingFrequency + - Removed Enum KnownBudgetOperatorType + - Removed Enum KnownCategoryType + - Removed Enum KnownChargeSummaryKind + - Removed Enum KnownCultureCode + - Removed Enum KnownDatagrain + - Removed Enum KnownEventType + - Removed Enum KnownLookBackPeriod + - Removed Enum KnownLotSource + - Removed Enum KnownMetrictype + - Removed Enum KnownOperatorType + - Removed Enum KnownPricingModelType + - Removed Enum KnownReservationRecommendationKind + - Removed Enum KnownScope + - Removed Enum KnownStatus + - Removed Enum KnownTerm + - Removed Enum KnownThresholdType + - Removed Enum KnownTimeGrainType + - Removed Enum KnownUsageDetailsKind + + ## 9.1.0 (2022-09-05) **Features** diff --git a/sdk/consumption/arm-consumption/_meta.json b/sdk/consumption/arm-consumption/_meta.json index 90307a6f115e..3e4b045af7e9 100644 --- a/sdk/consumption/arm-consumption/_meta.json +++ b/sdk/consumption/arm-consumption/_meta.json @@ -1,8 +1,8 @@ { - "commit": "d600759c3516b61a7c353bc8682bccbab85a6f65", - "readme": "specification\\consumption\\resource-manager\\readme.md", - "autorest_command": "autorest --version=3.8.4 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\consumption\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.1.20220727.1 --generate-sample=true", + "commit": "b6b8fb75cac9498db5aa546da335ec72939d62c3", + "readme": "specification/consumption/resource-manager/readme.md", + "autorest_command": "autorest --version=3.8.4 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/consumption/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.2", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.4.2", - "use": "@autorest/typescript@6.0.0-rc.1.20220727.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.5.1", + "use": "@autorest/typescript@6.0.0-rc.2" } \ No newline at end of file diff --git a/sdk/consumption/arm-consumption/package.json b/sdk/consumption/arm-consumption/package.json index 1d8609aea758..27f0801dc2af 100644 --- a/sdk/consumption/arm-consumption/package.json +++ b/sdk/consumption/arm-consumption/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for ConsumptionManagementClient.", - "version": "9.1.1", + "version": "10.0.0", "engines": { "node": ">=14.0.0" }, @@ -107,13 +107,5 @@ } ] }, - "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-consumption?view=azure-node-preview" - } -} + "autoPublish": true +} \ No newline at end of file diff --git a/sdk/consumption/arm-consumption/review/arm-consumption.api.md b/sdk/consumption/arm-consumption/review/arm-consumption.api.md index 44af54fc4496..143f09a38afd 100644 --- a/sdk/consumption/arm-consumption/review/arm-consumption.api.md +++ b/sdk/consumption/arm-consumption/review/arm-consumption.api.md @@ -8,261 +8,19 @@ import * as coreAuth from '@azure/core-auth'; import * as coreClient from '@azure/core-client'; import { PagedAsyncIterableIterator } from '@azure/core-paging'; -// @public -export interface AggregatedCost { - getByManagementGroup(managementGroupId: string, options?: AggregatedCostGetByManagementGroupOptionalParams): Promise; - getForBillingPeriodByManagementGroup(managementGroupId: string, billingPeriodName: string, options?: AggregatedCostGetForBillingPeriodByManagementGroupOptionalParams): Promise; -} - -// @public -export interface AggregatedCostGetByManagementGroupOptionalParams extends coreClient.OperationOptions { - filter?: string; -} - -// @public -export type AggregatedCostGetByManagementGroupResponse = ManagementGroupAggregatedCostResult; - -// @public -export interface AggregatedCostGetForBillingPeriodByManagementGroupOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AggregatedCostGetForBillingPeriodByManagementGroupResponse = ManagementGroupAggregatedCostResult; - -// @public -export interface Amount { - readonly currency?: string; - readonly value?: number; -} - -// @public -export interface AmountWithExchangeRate extends Amount { - readonly exchangeRate?: number; - readonly exchangeRateMonth?: number; -} - -// @public -export interface Balance extends Resource { - readonly adjustmentDetails?: BalancePropertiesAdjustmentDetailsItem[]; - readonly adjustments?: number; - readonly azureMarketplaceServiceCharges?: number; - readonly beginningBalance?: number; - billingFrequency?: BillingFrequency; - readonly chargesBilledSeparately?: number; - readonly currency?: string; - readonly endingBalance?: number; - readonly newPurchases?: number; - readonly newPurchasesDetails?: BalancePropertiesNewPurchasesDetailsItem[]; - readonly priceHidden?: boolean; - readonly serviceOverage?: number; - readonly totalOverage?: number; - readonly totalUsage?: number; - readonly utilized?: number; -} - -// @public (undocumented) -export interface BalancePropertiesAdjustmentDetailsItem { - readonly name?: string; - readonly value?: number; -} - -// @public (undocumented) -export interface BalancePropertiesNewPurchasesDetailsItem { - readonly name?: string; - readonly value?: number; -} - -// @public -export interface Balances { - getByBillingAccount(billingAccountId: string, options?: BalancesGetByBillingAccountOptionalParams): Promise; - getForBillingPeriodByBillingAccount(billingAccountId: string, billingPeriodName: string, options?: BalancesGetForBillingPeriodByBillingAccountOptionalParams): Promise; -} - -// @public -export interface BalancesGetByBillingAccountOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type BalancesGetByBillingAccountResponse = Balance; - -// @public -export interface BalancesGetForBillingPeriodByBillingAccountOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type BalancesGetForBillingPeriodByBillingAccountResponse = Balance; - -// @public -export type BillingFrequency = string; - -// @public -export interface Budget extends ProxyResource { - amount?: number; - category?: CategoryType; - readonly currentSpend?: CurrentSpend; - filter?: BudgetFilter; - readonly forecastSpend?: ForecastSpend; - notifications?: { - [propertyName: string]: Notification_2; - }; - timeGrain?: TimeGrainType; - timePeriod?: BudgetTimePeriod; -} - -// @public -export interface BudgetComparisonExpression { - name: string; - operator: BudgetOperatorType; - values: string[]; -} - -// @public -export interface BudgetFilter { - and?: BudgetFilterProperties[]; - dimensions?: BudgetComparisonExpression; - not?: BudgetFilterProperties; - tags?: BudgetComparisonExpression; -} - -// @public -export interface BudgetFilterProperties { - dimensions?: BudgetComparisonExpression; - tags?: BudgetComparisonExpression; -} - -// @public -export type BudgetOperatorType = string; - -// @public -export interface Budgets { - createOrUpdate(scope: string, budgetName: string, parameters: Budget, options?: BudgetsCreateOrUpdateOptionalParams): Promise; - delete(scope: string, budgetName: string, options?: BudgetsDeleteOptionalParams): Promise; - get(scope: string, budgetName: string, options?: BudgetsGetOptionalParams): Promise; - list(scope: string, options?: BudgetsListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface BudgetsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type BudgetsCreateOrUpdateResponse = Budget; - -// @public -export interface BudgetsDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface BudgetsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type BudgetsGetResponse = Budget; - -// @public -export interface BudgetsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type BudgetsListNextResponse = BudgetsListResult; - -// @public -export interface BudgetsListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type BudgetsListResponse = BudgetsListResult; - -// @public -export interface BudgetsListResult { - readonly nextLink?: string; - readonly value?: Budget[]; -} - -// @public -export interface BudgetTimePeriod { - endDate?: Date; - startDate: Date; -} - -// @public -export type CategoryType = string; - -// @public -export interface Charges { - list(scope: string, options?: ChargesListOptionalParams): Promise; -} - -// @public -export interface ChargesListOptionalParams extends coreClient.OperationOptions { - apply?: string; - endDate?: string; - filter?: string; - startDate?: string; -} - -// @public -export type ChargesListResponse = ChargesListResult; - -// @public -export interface ChargesListResult { - readonly value?: ChargeSummaryUnion[]; -} - -// @public -export interface ChargeSummary extends ProxyResource { - kind: ChargeSummaryKind; -} - -// @public -export type ChargeSummaryKind = string; - -// @public (undocumented) -export type ChargeSummaryUnion = ChargeSummary | LegacyChargeSummary | ModernChargeSummary; - // @public (undocumented) export class ConsumptionManagementClient extends coreClient.ServiceClient { // (undocumented) $host: string; constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: ConsumptionManagementClientOptionalParams); // (undocumented) - aggregatedCost: AggregatedCost; - // (undocumented) apiVersion: string; // (undocumented) - balances: Balances; - // (undocumented) - budgets: Budgets; - // (undocumented) - charges: Charges; - // (undocumented) - credits: Credits; - // (undocumented) - eventsOperations: EventsOperations; - // (undocumented) - lotsOperations: LotsOperations; - // (undocumented) - marketplaces: Marketplaces; - // (undocumented) operations: Operations; // (undocumented) priceSheet: PriceSheet; // (undocumented) - reservationRecommendationDetails: ReservationRecommendationDetails; - // (undocumented) - reservationRecommendations: ReservationRecommendations; - // (undocumented) - reservationsDetails: ReservationsDetails; - // (undocumented) - reservationsSummaries: ReservationsSummaries; - // (undocumented) - reservationTransactions: ReservationTransactions; - // (undocumented) subscriptionId: string; - // (undocumented) - tags: Tags; - // (undocumented) - usageDetails: UsageDetails; } // @public @@ -272,49 +30,6 @@ export interface ConsumptionManagementClientOptionalParams extends coreClient.Se endpoint?: string; } -// @public -export interface CreditBalanceSummary { - readonly currentBalance?: Amount; - readonly estimatedBalance?: Amount; - readonly estimatedBalanceInBillingCurrency?: AmountWithExchangeRate; -} - -// @public -export interface Credits { - get(billingAccountId: string, billingProfileId: string, options?: CreditsGetOptionalParams): Promise; -} - -// @public -export interface CreditsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type CreditsGetResponse = CreditSummary; - -// @public -export interface CreditSummary extends Resource { - readonly balanceSummary?: CreditBalanceSummary; - readonly billingCurrency?: string; - readonly creditCurrency?: string; - readonly eTag?: string; - readonly expiredCredit?: Amount; - readonly pendingCreditAdjustments?: Amount; - readonly pendingEligibleCharges?: Amount; - readonly reseller?: Reseller; -} - -// @public -export type CultureCode = string; - -// @public -export interface CurrentSpend { - readonly amount?: number; - readonly unit?: string; -} - -// @public -export type Datagrain = string; - // @public export interface DownloadProperties { readonly downloadUrl?: string; @@ -328,689 +43,22 @@ export interface ErrorDetails { } // @public -export interface ErrorResponse { - error?: ErrorDetails; -} - -// @public -export interface Events { - readonly nextLink?: string; - readonly value?: EventSummary[]; -} - -// @public -export interface EventsListByBillingAccountNextOptionalParams extends coreClient.OperationOptions { - filter?: string; -} - -// @public -export type EventsListByBillingAccountNextResponse = Events; - -// @public -export interface EventsListByBillingAccountOptionalParams extends coreClient.OperationOptions { - filter?: string; -} - -// @public -export type EventsListByBillingAccountResponse = Events; - -// @public -export interface EventsListByBillingProfileNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type EventsListByBillingProfileNextResponse = Events; - -// @public -export interface EventsListByBillingProfileOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type EventsListByBillingProfileResponse = Events; - -// @public -export interface EventsOperations { - listByBillingAccount(billingAccountId: string, options?: EventsListByBillingAccountOptionalParams): PagedAsyncIterableIterator; - listByBillingProfile(billingAccountId: string, billingProfileId: string, startDate: string, endDate: string, options?: EventsListByBillingProfileOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface EventSummary extends ProxyResource { - readonly adjustments?: Amount; - readonly adjustmentsInBillingCurrency?: AmountWithExchangeRate; - readonly billingCurrency?: string; - readonly billingProfileDisplayName?: string; - readonly billingProfileId?: string; - readonly canceledCredit?: Amount; - readonly charges?: Amount; - readonly chargesInBillingCurrency?: AmountWithExchangeRate; - readonly closedBalance?: Amount; - readonly closedBalanceInBillingCurrency?: AmountWithExchangeRate; - readonly creditCurrency?: string; - readonly creditExpired?: Amount; - readonly creditExpiredInBillingCurrency?: AmountWithExchangeRate; - readonly description?: string; - readonly eTagPropertiesETag?: string; - eventType?: EventType; - readonly invoiceNumber?: string; - readonly lotId?: string; - readonly lotSource?: string; - readonly newCredit?: Amount; - readonly newCreditInBillingCurrency?: AmountWithExchangeRate; - readonly reseller?: Reseller; - readonly transactionDate?: Date; -} - -// @public -export type EventType = string; - -// @public -export interface ForecastSpend { - readonly amount?: number; - readonly unit?: string; -} - -// @public -export interface HighCasedErrorDetails { - readonly code?: string; - readonly message?: string; -} - -// @public -export interface HighCasedErrorResponse { - error?: HighCasedErrorDetails; -} - -// @public -export enum KnownBillingFrequency { - Month = "Month", - Quarter = "Quarter", - Year = "Year" -} - -// @public -export enum KnownBudgetOperatorType { - In = "In" -} - -// @public -export enum KnownCategoryType { - Cost = "Cost" -} - -// @public -export enum KnownChargeSummaryKind { - Legacy = "legacy", - Modern = "modern" -} - -// @public -export enum KnownCultureCode { - CsCz = "cs-cz", - DaDk = "da-dk", - DeDe = "de-de", - EnGb = "en-gb", - EnUs = "en-us", - EsEs = "es-es", - FrFr = "fr-fr", - HuHu = "hu-hu", - ItIt = "it-it", - JaJp = "ja-jp", - KoKr = "ko-kr", - NbNo = "nb-no", - NlNl = "nl-nl", - PlPl = "pl-pl", - PtBr = "pt-br", - PtPt = "pt-pt", - RuRu = "ru-ru", - SvSe = "sv-se", - TrTr = "tr-tr", - ZhCn = "zh-cn", - ZhTw = "zh-tw" -} - -// @public -export enum KnownDatagrain { - DailyGrain = "daily", - MonthlyGrain = "monthly" -} - -// @public -export enum KnownEventType { - NewCredit = "NewCredit", - PendingAdjustments = "PendingAdjustments", - PendingCharges = "PendingCharges", - PendingExpiredCredit = "PendingExpiredCredit", - PendingNewCredit = "PendingNewCredit", - SettledCharges = "SettledCharges", - UnKnown = "UnKnown" -} - -// @public -export enum KnownLookBackPeriod { - Last07Days = "Last7Days", - Last30Days = "Last30Days", - Last60Days = "Last60Days" -} - -// @public -export enum KnownLotSource { - ConsumptionCommitment = "ConsumptionCommitment", - PromotionalCredit = "PromotionalCredit", - PurchasedCredit = "PurchasedCredit" -} - -// @public -export enum KnownMetrictype { - ActualCostMetricType = "actualcost", - AmortizedCostMetricType = "amortizedcost", - UsageMetricType = "usage" -} - -// @public -export enum KnownOperatorType { - EqualTo = "EqualTo", - GreaterThan = "GreaterThan", - GreaterThanOrEqualTo = "GreaterThanOrEqualTo" -} - -// @public -export enum KnownPricingModelType { - OnDemand = "On Demand", - Reservation = "Reservation", - Spot = "Spot" -} - -// @public -export enum KnownReservationRecommendationKind { - Legacy = "legacy", - Modern = "modern" -} - -// @public -export enum KnownScope { - Shared = "Shared", - Single = "Single" -} - -// @public -export enum KnownStatus { - Active = "Active", - Canceled = "Canceled", - Complete = "Complete", - Expired = "Expired", - Inactive = "Inactive", - None = "None" -} - -// @public -export enum KnownTerm { - P1Y = "P1Y", - P3Y = "P3Y" -} - -// @public -export enum KnownThresholdType { - Actual = "Actual", - Forecasted = "Forecasted" -} - -// @public -export enum KnownTimeGrainType { - Annually = "Annually", - BillingAnnual = "BillingAnnual", - BillingMonth = "BillingMonth", - BillingQuarter = "BillingQuarter", - Monthly = "Monthly", - Quarterly = "Quarterly" -} - -// @public -export enum KnownUsageDetailsKind { - Legacy = "legacy", - Modern = "modern" -} - -// @public -export interface LegacyChargeSummary extends ChargeSummary { - readonly azureCharges?: number; - readonly billingPeriodId?: string; - readonly chargesBilledSeparately?: number; - readonly currency?: string; - kind: "legacy"; - readonly marketplaceCharges?: number; - readonly usageEnd?: string; - readonly usageStart?: string; -} - -// @public -export interface LegacyReservationRecommendation extends ReservationRecommendation { - readonly costWithNoReservedInstances?: number; - readonly firstUsageDate?: Date; - readonly instanceFlexibilityGroup?: string; - readonly instanceFlexibilityRatio?: number; - kind: "legacy"; - readonly lookBackPeriod?: string; - readonly meterId?: string; - readonly netSavings?: number; - readonly normalizedSize?: string; - readonly recommendedQuantity?: number; - readonly recommendedQuantityNormalized?: number; - readonly resourceType?: string; - scope: string; - readonly skuProperties?: SkuProperty[]; - readonly term?: string; - readonly totalCostWithReservedInstances?: number; -} - -// @public -export interface LegacyReservationRecommendationProperties { - readonly costWithNoReservedInstances?: number; - readonly firstUsageDate?: Date; - readonly instanceFlexibilityGroup?: string; - readonly instanceFlexibilityRatio?: number; - readonly lookBackPeriod?: string; - readonly meterId?: string; - readonly netSavings?: number; - readonly normalizedSize?: string; - readonly recommendedQuantity?: number; - readonly recommendedQuantityNormalized?: number; - readonly resourceType?: string; - scope: "Single" | "Shared"; - readonly skuProperties?: SkuProperty[]; - readonly term?: string; - readonly totalCostWithReservedInstances?: number; -} - -// @public (undocumented) -export type LegacyReservationRecommendationPropertiesUnion = LegacyReservationRecommendationProperties | LegacySingleScopeReservationRecommendationProperties | LegacySharedScopeReservationRecommendationProperties; - -// @public -export interface LegacyReservationTransaction extends ReservationTransaction { -} - -// @public -export interface LegacySharedScopeReservationRecommendationProperties extends LegacyReservationRecommendationProperties { - scope: "Shared"; -} - -// @public -export interface LegacySingleScopeReservationRecommendationProperties extends LegacyReservationRecommendationProperties { - scope: "Single"; - readonly subscriptionId?: string; -} - -// @public -export interface LegacyUsageDetail extends UsageDetail { - readonly accountName?: string; - readonly accountOwnerId?: string; - readonly additionalInfo?: string; - readonly billingAccountId?: string; - readonly billingAccountName?: string; - readonly billingCurrency?: string; - readonly billingPeriodEndDate?: Date; - readonly billingPeriodStartDate?: Date; - readonly billingProfileId?: string; - readonly billingProfileName?: string; - readonly chargeType?: string; - readonly consumedService?: string; - readonly cost?: number; - readonly costCenter?: string; - readonly date?: Date; - readonly effectivePrice?: number; - readonly frequency?: string; - readonly invoiceSection?: string; - readonly isAzureCreditEligible?: boolean; - kind: "legacy"; - readonly meterDetails?: MeterDetailsResponse; - readonly meterId?: string; - readonly offerId?: string; - readonly partNumber?: string; - readonly payGPrice?: number; - readonly planName?: string; - readonly pricingModel?: PricingModelType; - readonly product?: string; - readonly productOrderId?: string; - readonly productOrderName?: string; - readonly publisherName?: string; - readonly publisherType?: string; - readonly quantity?: number; - readonly reservationId?: string; - readonly reservationName?: string; - readonly resourceGroup?: string; - readonly resourceId?: string; - readonly resourceLocation?: string; - readonly resourceName?: string; - readonly serviceInfo1?: string; - readonly serviceInfo2?: string; - readonly subscriptionId?: string; - readonly subscriptionName?: string; - readonly term?: string; - readonly unitPrice?: number; -} - -// @public -export type LookBackPeriod = string; - -// @public -export interface Lots { - readonly nextLink?: string; - readonly value?: LotSummary[]; -} - -// @public -export interface LotsListByBillingAccountNextOptionalParams extends coreClient.OperationOptions { - filter?: string; -} - -// @public -export type LotsListByBillingAccountNextResponse = Lots; - -// @public -export interface LotsListByBillingAccountOptionalParams extends coreClient.OperationOptions { - filter?: string; -} - -// @public -export type LotsListByBillingAccountResponse = Lots; - -// @public -export interface LotsListByBillingProfileNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type LotsListByBillingProfileNextResponse = Lots; - -// @public -export interface LotsListByBillingProfileOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type LotsListByBillingProfileResponse = Lots; - -// @public -export interface LotsOperations { - listByBillingAccount(billingAccountId: string, options?: LotsListByBillingAccountOptionalParams): PagedAsyncIterableIterator; - listByBillingProfile(billingAccountId: string, billingProfileId: string, options?: LotsListByBillingProfileOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export type LotSource = string; - -// @public -export interface LotSummary extends ProxyResource { - readonly billingCurrency?: string; - readonly closedBalance?: Amount; - readonly closedBalanceInBillingCurrency?: AmountWithExchangeRate; - readonly creditCurrency?: string; - readonly eTagPropertiesETag?: string; - readonly expirationDate?: Date; - readonly originalAmount?: Amount; - readonly originalAmountInBillingCurrency?: AmountWithExchangeRate; - readonly poNumber?: string; - readonly purchasedDate?: Date; - readonly reseller?: Reseller; - readonly source?: LotSource; - readonly startDate?: Date; - readonly status?: Status; -} - -// @public -export interface ManagementGroupAggregatedCostResult extends Resource { - readonly azureCharges?: number; - readonly billingPeriodId?: string; - readonly chargesBilledSeparately?: number; - children?: ManagementGroupAggregatedCostResult[]; - readonly currency?: string; - excludedSubscriptions?: string[]; - includedSubscriptions?: string[]; - readonly marketplaceCharges?: number; - readonly usageEnd?: Date; - readonly usageStart?: Date; -} - -// @public -export interface Marketplace extends Resource { - readonly accountName?: string; - readonly additionalInfo?: string; - readonly additionalProperties?: string; - readonly billingPeriodId?: string; - readonly consumedQuantity?: number; - readonly consumedService?: string; - readonly costCenter?: string; - readonly currency?: string; - readonly departmentName?: string; - readonly instanceId?: string; - readonly instanceName?: string; - readonly isEstimated?: boolean; - readonly isRecurringCharge?: boolean; - readonly meterId?: string; - readonly offerName?: string; - readonly orderNumber?: string; - readonly planName?: string; - readonly pretaxCost?: number; - readonly publisherName?: string; - readonly resourceGroup?: string; - readonly resourceRate?: number; - readonly subscriptionGuid?: string; - readonly subscriptionName?: string; - readonly unitOfMeasure?: string; - readonly usageEnd?: Date; - readonly usageStart?: Date; -} - -// @public -export interface Marketplaces { - list(scope: string, options?: MarketplacesListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface MarketplacesListNextOptionalParams extends coreClient.OperationOptions { - filter?: string; - skiptoken?: string; - top?: number; -} - -// @public -export type MarketplacesListNextResponse = MarketplacesListResult; - -// @public -export interface MarketplacesListOptionalParams extends coreClient.OperationOptions { - filter?: string; - skiptoken?: string; - top?: number; -} - -// @public -export type MarketplacesListResponse = MarketplacesListResult; - -// @public -export interface MarketplacesListResult { - readonly nextLink?: string; - readonly value?: Marketplace[]; -} - -// @public -export interface MeterDetails { - readonly meterCategory?: string; - readonly meterLocation?: string; - readonly meterName?: string; - readonly meterSubCategory?: string; - readonly pretaxStandardRate?: number; - readonly serviceName?: string; - readonly serviceTier?: string; - readonly totalIncludedQuantity?: number; - readonly unit?: string; -} - -// @public -export interface MeterDetailsResponse { - readonly meterCategory?: string; - readonly meterName?: string; - readonly meterSubCategory?: string; - readonly serviceFamily?: string; - readonly unitOfMeasure?: string; -} - -// @public -export type Metrictype = string; - -// @public -export interface ModernChargeSummary extends ChargeSummary { - readonly azureCharges?: Amount; - readonly billingAccountId?: string; - readonly billingPeriodId?: string; - readonly billingProfileId?: string; - readonly chargesBilledSeparately?: Amount; - readonly customerId?: string; - readonly invoiceSectionId?: string; - readonly isInvoiced?: boolean; - kind: "modern"; - readonly marketplaceCharges?: Amount; - readonly usageEnd?: string; - readonly usageStart?: string; -} - -// @public -export interface ModernReservationRecommendation extends ReservationRecommendation { - readonly costWithNoReservedInstances?: Amount; - readonly firstUsageDate?: Date; - readonly instanceFlexibilityGroup?: string; - readonly instanceFlexibilityRatio?: number; - kind: "modern"; - readonly locationPropertiesLocation?: string; - readonly lookBackPeriod?: number; - readonly meterId?: string; - readonly netSavings?: Amount; - readonly normalizedSize?: string; - readonly recommendedQuantity?: number; - readonly recommendedQuantityNormalized?: number; - readonly scope?: string; - readonly skuName?: string; - readonly skuProperties?: SkuProperty[]; - readonly term?: string; - readonly totalCostWithReservedInstances?: Amount; -} - -// @public -export interface ModernReservationTransaction extends ReservationTransactionResource { - readonly amount?: number; - readonly armSkuName?: string; - readonly billingFrequency?: string; - readonly billingProfileId?: string; - readonly billingProfileName?: string; - readonly currency?: string; - readonly description?: string; - readonly eventDate?: Date; - readonly eventType?: string; - readonly invoice?: string; - readonly invoiceId?: string; - readonly invoiceSectionId?: string; - readonly invoiceSectionName?: string; - readonly purchasingSubscriptionGuid?: string; - readonly purchasingSubscriptionName?: string; - readonly quantity?: number; - readonly region?: string; - readonly reservationOrderId?: string; - readonly reservationOrderName?: string; - readonly term?: string; -} - -// @public -export interface ModernReservationTransactionsListResult { - readonly nextLink?: string; - readonly value?: ModernReservationTransaction[]; +export interface ErrorResponse { + error?: ErrorDetails; } // @public -export interface ModernUsageDetail extends UsageDetail { - readonly additionalInfo?: string; - readonly benefitId?: string; - readonly benefitName?: string; - readonly billingAccountId?: string; - readonly billingAccountName?: string; - readonly billingCurrencyCode?: string; - readonly billingPeriodEndDate?: Date; - readonly billingPeriodStartDate?: Date; - readonly billingProfileId?: string; - readonly billingProfileName?: string; - readonly chargeType?: string; - readonly consumedService?: string; - readonly costAllocationRuleName?: string; - readonly costCenter?: string; - readonly costInBillingCurrency?: number; - readonly costInPricingCurrency?: number; - readonly costInUSD?: number; - readonly customerName?: string; - readonly customerTenantId?: string; - readonly date?: Date; - readonly effectivePrice?: number; - readonly exchangeRate?: string; - readonly exchangeRateDate?: Date; - readonly exchangeRatePricingToBilling?: number; - readonly frequency?: string; - readonly instanceName?: string; - readonly invoiceId?: string; - readonly invoiceSectionId?: string; - readonly invoiceSectionName?: string; - readonly isAzureCreditEligible?: boolean; - kind: "modern"; - readonly marketPrice?: number; +export interface MeterDetails { readonly meterCategory?: string; - readonly meterId?: string; + readonly meterLocation?: string; readonly meterName?: string; - readonly meterRegion?: string; readonly meterSubCategory?: string; - readonly partnerEarnedCreditApplied?: string; - readonly partnerEarnedCreditRate?: number; - readonly partnerName?: string; - readonly partnerTenantId?: string; - readonly paygCostInBillingCurrency?: number; - readonly paygCostInUSD?: number; - readonly payGPrice?: number; - readonly previousInvoiceId?: string; - readonly pricingCurrencyCode?: string; - readonly pricingModel?: PricingModelType; - readonly product?: string; - readonly productIdentifier?: string; - readonly productOrderId?: string; - readonly productOrderName?: string; - readonly provider?: string; - readonly publisherId?: string; - readonly publisherName?: string; - readonly publisherType?: string; - readonly quantity?: number; - readonly resellerMpnId?: string; - readonly resellerName?: string; - readonly reservationId?: string; - readonly reservationName?: string; - readonly resourceGroup?: string; - readonly resourceLocation?: string; - readonly resourceLocationNormalized?: string; - readonly serviceFamily?: string; - readonly serviceInfo1?: string; - readonly serviceInfo2?: string; - readonly servicePeriodEndDate?: Date; - readonly servicePeriodStartDate?: Date; - readonly subscriptionGuid?: string; - readonly subscriptionName?: string; - readonly term?: string; - readonly unitOfMeasure?: string; - readonly unitPrice?: number; -} - -// @public -interface Notification_2 { - contactEmails: string[]; - contactGroups?: string[]; - contactRoles?: string[]; - enabled: boolean; - locale?: CultureCode; - operator: OperatorType; - threshold: number; - thresholdType?: ThresholdType; + readonly pretaxStandardRate?: number; + readonly serviceName?: string; + readonly serviceTier?: string; + readonly totalIncludedQuantity?: number; + readonly unit?: string; } -export { Notification_2 as Notification } // @public export interface Operation { @@ -1052,9 +100,6 @@ export interface OperationsListOptionalParams extends coreClient.OperationOption // @public export type OperationsListResponse = OperationListResult; -// @public -export type OperatorType = string; - // @public export interface PriceSheet { get(options?: PriceSheetGetOptionalParams): Promise; @@ -1101,373 +146,6 @@ export interface PriceSheetResult extends Resource { readonly pricesheets?: PriceSheetProperties[]; } -// @public -export type PricingModelType = string; - -// @public -export interface ProxyResource { - eTag?: string; - readonly id?: string; - readonly name?: string; - readonly type?: string; -} - -// @public -export interface Reseller { - readonly resellerDescription?: string; - readonly resellerId?: string; -} - -// @public -export interface ReservationDetail extends Resource { - readonly instanceFlexibilityGroup?: string; - readonly instanceFlexibilityRatio?: string; - readonly instanceId?: string; - readonly kind?: string; - readonly reservationId?: string; - readonly reservationOrderId?: string; - readonly reservedHours?: number; - readonly skuName?: string; - readonly totalReservedQuantity?: number; - readonly usageDate?: Date; - readonly usedHours?: number; -} - -// @public -export interface ReservationDetailsListResult { - readonly nextLink?: string; - readonly value?: ReservationDetail[]; -} - -// @public -export interface ReservationRecommendation extends Resource, ResourceAttributes { - kind: ReservationRecommendationKind; -} - -// @public -export interface ReservationRecommendationDetails { - get(scope: string, region: string, term: Term, lookBackPeriod: LookBackPeriod, product: string, options?: ReservationRecommendationDetailsGetOptionalParams): Promise; -} - -// @public -export interface ReservationRecommendationDetailsCalculatedSavingsProperties { - readonly onDemandCost?: number; - readonly overageCost?: number; - readonly quantity?: number; - readonly reservationCost?: number; - reservedUnitCount?: number; - readonly savings?: number; - readonly totalReservationCost?: number; -} - -// @public -export interface ReservationRecommendationDetailsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ReservationRecommendationDetailsGetResponse = ReservationRecommendationDetailsModel; - -// @public -export interface ReservationRecommendationDetailsModel extends Resource { - readonly currency?: string; - location?: string; - readonly resource?: ReservationRecommendationDetailsResourceProperties; - readonly resourceGroup?: string; - readonly savings?: ReservationRecommendationDetailsSavingsProperties; - readonly scope?: string; - sku?: string; - readonly usage?: ReservationRecommendationDetailsUsageProperties; -} - -// @public -export interface ReservationRecommendationDetailsResourceProperties { - readonly appliedScopes?: string[]; - readonly onDemandRate?: number; - readonly product?: string; - readonly region?: string; - readonly reservationRate?: number; - readonly resourceType?: string; -} - -// @public -export interface ReservationRecommendationDetailsSavingsProperties { - calculatedSavings?: ReservationRecommendationDetailsCalculatedSavingsProperties[]; - readonly lookBackPeriod?: number; - readonly recommendedQuantity?: number; - readonly reservationOrderTerm?: string; - readonly savingsType?: string; - readonly unitOfMeasure?: string; -} - -// @public -export interface ReservationRecommendationDetailsUsageProperties { - readonly firstConsumptionDate?: string; - readonly lastConsumptionDate?: string; - readonly lookBackUnitType?: string; - readonly usageData?: number[]; - readonly usageGrain?: string; -} - -// @public -export type ReservationRecommendationKind = string; - -// @public -export interface ReservationRecommendations { - list(scope: string, options?: ReservationRecommendationsListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface ReservationRecommendationsListNextOptionalParams extends coreClient.OperationOptions { - filter?: string; -} - -// @public -export type ReservationRecommendationsListNextResponse = ReservationRecommendationsListResult; - -// @public -export interface ReservationRecommendationsListOptionalParams extends coreClient.OperationOptions { - filter?: string; -} - -// @public -export type ReservationRecommendationsListResponse = ReservationRecommendationsListResult; - -// @public -export interface ReservationRecommendationsListResult { - readonly nextLink?: string; - readonly previousLink?: string; - readonly value?: ReservationRecommendationUnion[]; -} - -// @public (undocumented) -export type ReservationRecommendationUnion = ReservationRecommendation | LegacyReservationRecommendation | ModernReservationRecommendation; - -// @public -export interface ReservationsDetails { - list(scope: string, options?: ReservationsDetailsListOptionalParams): PagedAsyncIterableIterator; - listByReservationOrder(reservationOrderId: string, filter: string, options?: ReservationsDetailsListByReservationOrderOptionalParams): PagedAsyncIterableIterator; - listByReservationOrderAndReservation(reservationOrderId: string, reservationId: string, filter: string, options?: ReservationsDetailsListByReservationOrderAndReservationOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface ReservationsDetailsListByReservationOrderAndReservationNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ReservationsDetailsListByReservationOrderAndReservationNextResponse = ReservationDetailsListResult; - -// @public -export interface ReservationsDetailsListByReservationOrderAndReservationOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ReservationsDetailsListByReservationOrderAndReservationResponse = ReservationDetailsListResult; - -// @public -export interface ReservationsDetailsListByReservationOrderNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ReservationsDetailsListByReservationOrderNextResponse = ReservationDetailsListResult; - -// @public -export interface ReservationsDetailsListByReservationOrderOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ReservationsDetailsListByReservationOrderResponse = ReservationDetailsListResult; - -// @public -export interface ReservationsDetailsListNextOptionalParams extends coreClient.OperationOptions { - endDate?: string; - filter?: string; - reservationId?: string; - reservationOrderId?: string; - startDate?: string; -} - -// @public -export type ReservationsDetailsListNextResponse = ReservationDetailsListResult; - -// @public -export interface ReservationsDetailsListOptionalParams extends coreClient.OperationOptions { - endDate?: string; - filter?: string; - reservationId?: string; - reservationOrderId?: string; - startDate?: string; -} - -// @public -export type ReservationsDetailsListResponse = ReservationDetailsListResult; - -// @public -export interface ReservationsSummaries { - list(scope: string, grain: Datagrain, options?: ReservationsSummariesListOptionalParams): PagedAsyncIterableIterator; - listByReservationOrder(reservationOrderId: string, grain: Datagrain, options?: ReservationsSummariesListByReservationOrderOptionalParams): PagedAsyncIterableIterator; - listByReservationOrderAndReservation(reservationOrderId: string, reservationId: string, grain: Datagrain, options?: ReservationsSummariesListByReservationOrderAndReservationOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface ReservationsSummariesListByReservationOrderAndReservationNextOptionalParams extends coreClient.OperationOptions { - filter?: string; -} - -// @public -export type ReservationsSummariesListByReservationOrderAndReservationNextResponse = ReservationSummariesListResult; - -// @public -export interface ReservationsSummariesListByReservationOrderAndReservationOptionalParams extends coreClient.OperationOptions { - filter?: string; -} - -// @public -export type ReservationsSummariesListByReservationOrderAndReservationResponse = ReservationSummariesListResult; - -// @public -export interface ReservationsSummariesListByReservationOrderNextOptionalParams extends coreClient.OperationOptions { - filter?: string; -} - -// @public -export type ReservationsSummariesListByReservationOrderNextResponse = ReservationSummariesListResult; - -// @public -export interface ReservationsSummariesListByReservationOrderOptionalParams extends coreClient.OperationOptions { - filter?: string; -} - -// @public -export type ReservationsSummariesListByReservationOrderResponse = ReservationSummariesListResult; - -// @public -export interface ReservationsSummariesListNextOptionalParams extends coreClient.OperationOptions { - endDate?: string; - filter?: string; - reservationId?: string; - reservationOrderId?: string; - startDate?: string; -} - -// @public -export type ReservationsSummariesListNextResponse = ReservationSummariesListResult; - -// @public -export interface ReservationsSummariesListOptionalParams extends coreClient.OperationOptions { - endDate?: string; - filter?: string; - reservationId?: string; - reservationOrderId?: string; - startDate?: string; -} - -// @public -export type ReservationsSummariesListResponse = ReservationSummariesListResult; - -// @public -export interface ReservationSummariesListResult { - readonly nextLink?: string; - readonly value?: ReservationSummary[]; -} - -// @public -export interface ReservationSummary extends Resource { - readonly avgUtilizationPercentage?: number; - readonly kind?: string; - readonly maxUtilizationPercentage?: number; - readonly minUtilizationPercentage?: number; - readonly purchasedQuantity?: number; - readonly remainingQuantity?: number; - readonly reservationId?: string; - readonly reservationOrderId?: string; - readonly reservedHours?: number; - readonly skuName?: string; - readonly totalReservedQuantity?: number; - readonly usageDate?: Date; - readonly usedHours?: number; - readonly usedQuantity?: number; - readonly utilizedPercentage?: number; -} - -// @public -export interface ReservationTransaction extends ReservationTransactionResource { - readonly accountName?: string; - readonly accountOwnerEmail?: string; - readonly amount?: number; - readonly armSkuName?: string; - readonly billingFrequency?: string; - readonly billingMonth?: number; - readonly costCenter?: string; - readonly currency?: string; - readonly currentEnrollment?: string; - readonly departmentName?: string; - readonly description?: string; - readonly eventDate?: Date; - readonly eventType?: string; - readonly monetaryCommitment?: number; - readonly overage?: number; - readonly purchasingEnrollment?: string; - readonly purchasingSubscriptionGuid?: string; - readonly purchasingSubscriptionName?: string; - readonly quantity?: number; - readonly region?: string; - readonly reservationOrderId?: string; - readonly reservationOrderName?: string; - readonly term?: string; -} - -// @public -export interface ReservationTransactionResource { - readonly id?: string; - readonly name?: string; - readonly tags?: string[]; - readonly type?: string; -} - -// @public -export interface ReservationTransactions { - list(billingAccountId: string, options?: ReservationTransactionsListOptionalParams): PagedAsyncIterableIterator; - listByBillingProfile(billingAccountId: string, billingProfileId: string, options?: ReservationTransactionsListByBillingProfileOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface ReservationTransactionsListByBillingProfileNextOptionalParams extends coreClient.OperationOptions { - filter?: string; -} - -// @public -export type ReservationTransactionsListByBillingProfileNextResponse = ModernReservationTransactionsListResult; - -// @public -export interface ReservationTransactionsListByBillingProfileOptionalParams extends coreClient.OperationOptions { - filter?: string; -} - -// @public -export type ReservationTransactionsListByBillingProfileResponse = ModernReservationTransactionsListResult; - -// @public -export interface ReservationTransactionsListNextOptionalParams extends coreClient.OperationOptions { - filter?: string; -} - -// @public -export type ReservationTransactionsListNextResponse = ReservationTransactionsListResult; - -// @public -export interface ReservationTransactionsListOptionalParams extends coreClient.OperationOptions { - filter?: string; -} - -// @public -export type ReservationTransactionsListResponse = ReservationTransactionsListResult; - -// @public -export interface ReservationTransactionsListResult { - readonly nextLink?: string; - readonly value?: ReservationTransaction[]; -} - // @public export interface Resource { readonly etag?: string; @@ -1479,104 +157,6 @@ export interface Resource { readonly type?: string; } -// @public -export interface ResourceAttributes { - readonly location?: string; - readonly sku?: string; -} - -// @public -export type Scope = string; - -// @public -export interface SkuProperty { - readonly name?: string; - readonly value?: string; -} - -// @public -export type Status = string; - -// @public -export interface Tag { - key?: string; - value?: string[]; -} - -// @public -export interface Tags { - get(scope: string, options?: TagsGetOptionalParams): Promise; -} - -// @public -export interface TagsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type TagsGetResponse = TagsResult; - -// @public -export interface TagsResult extends ProxyResource { - readonly nextLink?: string; - readonly previousLink?: string; - tags?: Tag[]; -} - -// @public -export type Term = string; - -// @public -export type ThresholdType = string; - -// @public -export type TimeGrainType = string; - -// @public -export interface UsageDetail extends Resource { - kind: UsageDetailsKind; -} - -// @public -export interface UsageDetails { - list(scope: string, options?: UsageDetailsListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export type UsageDetailsKind = string; - -// @public -export interface UsageDetailsListNextOptionalParams extends coreClient.OperationOptions { - expand?: string; - filter?: string; - metric?: Metrictype; - skiptoken?: string; - top?: number; -} - -// @public -export type UsageDetailsListNextResponse = UsageDetailsListResult; - -// @public -export interface UsageDetailsListOptionalParams extends coreClient.OperationOptions { - expand?: string; - filter?: string; - metric?: Metrictype; - skiptoken?: string; - top?: number; -} - -// @public -export type UsageDetailsListResponse = UsageDetailsListResult; - -// @public -export interface UsageDetailsListResult { - readonly nextLink?: string; - readonly value?: UsageDetailUnion[]; -} - -// @public (undocumented) -export type UsageDetailUnion = UsageDetail | LegacyUsageDetail | ModernUsageDetail; - // (No @packageDocumentation comment for this package) ``` diff --git a/sdk/consumption/arm-consumption/src/consumptionManagementClient.ts b/sdk/consumption/arm-consumption/src/consumptionManagementClient.ts index 96b9166c4775..f3294a422fb8 100644 --- a/sdk/consumption/arm-consumption/src/consumptionManagementClient.ts +++ b/sdk/consumption/arm-consumption/src/consumptionManagementClient.ts @@ -14,50 +14,14 @@ import { SendRequest } from "@azure/core-rest-pipeline"; import * as coreAuth from "@azure/core-auth"; -import { - UsageDetailsImpl, - MarketplacesImpl, - BudgetsImpl, - TagsImpl, - ChargesImpl, - BalancesImpl, - ReservationsSummariesImpl, - ReservationsDetailsImpl, - ReservationRecommendationsImpl, - ReservationRecommendationDetailsImpl, - ReservationTransactionsImpl, - PriceSheetImpl, - OperationsImpl, - AggregatedCostImpl, - EventsOperationsImpl, - LotsOperationsImpl, - CreditsImpl -} from "./operations"; -import { - UsageDetails, - Marketplaces, - Budgets, - Tags, - Charges, - Balances, - ReservationsSummaries, - ReservationsDetails, - ReservationRecommendations, - ReservationRecommendationDetails, - ReservationTransactions, - PriceSheet, - Operations, - AggregatedCost, - EventsOperations, - LotsOperations, - Credits -} from "./operationsInterfaces"; +import { PriceSheetImpl, OperationsImpl } from "./operations"; +import { PriceSheet, Operations } from "./operationsInterfaces"; import { ConsumptionManagementClientOptionalParams } from "./models"; export class ConsumptionManagementClient extends coreClient.ServiceClient { $host: string; - apiVersion: string; subscriptionId: string; + apiVersion: string; /** * Initializes a new instance of the ConsumptionManagementClient class. @@ -86,7 +50,7 @@ export class ConsumptionManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-consumption/9.1.1`; + const packageDetails = `azsdk-js-arm-consumption/10.0.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -140,26 +104,9 @@ export class ConsumptionManagementClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2021-10-01"; - this.usageDetails = new UsageDetailsImpl(this); - this.marketplaces = new MarketplacesImpl(this); - this.budgets = new BudgetsImpl(this); - this.tags = new TagsImpl(this); - this.charges = new ChargesImpl(this); - this.balances = new BalancesImpl(this); - this.reservationsSummaries = new ReservationsSummariesImpl(this); - this.reservationsDetails = new ReservationsDetailsImpl(this); - this.reservationRecommendations = new ReservationRecommendationsImpl(this); - this.reservationRecommendationDetails = new ReservationRecommendationDetailsImpl( - this - ); - this.reservationTransactions = new ReservationTransactionsImpl(this); + this.apiVersion = options.apiVersion || "2022-06-01"; this.priceSheet = new PriceSheetImpl(this); this.operations = new OperationsImpl(this); - this.aggregatedCost = new AggregatedCostImpl(this); - this.eventsOperations = new EventsOperationsImpl(this); - this.lotsOperations = new LotsOperationsImpl(this); - this.credits = new CreditsImpl(this); this.addCustomApiVersionPolicy(options.apiVersion); } @@ -191,21 +138,6 @@ export class ConsumptionManagementClient extends coreClient.ServiceClient { this.pipeline.addPolicy(apiVersionPolicy); } - usageDetails: UsageDetails; - marketplaces: Marketplaces; - budgets: Budgets; - tags: Tags; - charges: Charges; - balances: Balances; - reservationsSummaries: ReservationsSummaries; - reservationsDetails: ReservationsDetails; - reservationRecommendations: ReservationRecommendations; - reservationRecommendationDetails: ReservationRecommendationDetails; - reservationTransactions: ReservationTransactions; priceSheet: PriceSheet; operations: Operations; - aggregatedCost: AggregatedCost; - eventsOperations: EventsOperations; - lotsOperations: LotsOperations; - credits: Credits; } diff --git a/sdk/consumption/arm-consumption/src/models/index.ts b/sdk/consumption/arm-consumption/src/models/index.ts index 7b6de1c5aa5b..168e4e7709e6 100644 --- a/sdk/consumption/arm-consumption/src/models/index.ts +++ b/sdk/consumption/arm-consumption/src/models/index.ts @@ -8,3565 +8,257 @@ import * as coreClient from "@azure/core-client"; -export type LegacyReservationRecommendationPropertiesUnion = - | LegacyReservationRecommendationProperties - | LegacySingleScopeReservationRecommendationProperties - | LegacySharedScopeReservationRecommendationProperties; -export type UsageDetailUnion = - | UsageDetail - | LegacyUsageDetail - | ModernUsageDetail; -export type ReservationRecommendationUnion = - | ReservationRecommendation - | LegacyReservationRecommendation - | ModernReservationRecommendation; -export type ChargeSummaryUnion = - | ChargeSummary - | LegacyChargeSummary - | ModernChargeSummary; - -/** Result of listing usage details. It contains a list of available usage details in reverse chronological order by billing period. */ -export interface UsageDetailsListResult { - /** - * The list of usage details. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: UsageDetailUnion[]; - /** - * 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 Resource model definition. */ -export interface Resource { +/** The properties of the price sheet. */ +export interface PriceSheetProperties { /** - * The full qualified ARM ID of an event. + * 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 id?: string; + readonly billingPeriodId?: string; /** - * The ID that uniquely identifies an event. + * The meter id (GUID) * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; + readonly meterId?: string; /** - * Resource type. + * 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 type?: string; + readonly meterDetails?: MeterDetails; /** - * The etag for the resource. + * Unit of measure * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly etag?: string; + readonly unitOfMeasure?: string; /** - * Resource tags. + * Included quality for an offer * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly tags?: { [propertyName: string]: 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 ErrorResponse { - /** The details of the error. */ - error?: ErrorDetails; -} - -/** The details of the error. */ -export interface ErrorDetails { + readonly includedQuantity?: number; /** - * Error code. + * Part Number * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly code?: string; + readonly partNumber?: string; /** - * Error message indicating why the operation failed. + * Unit Price * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly message?: string; -} - -/** Result of listing marketplaces. It contains a list of available marketplaces in reverse chronological order by billing period. */ -export interface MarketplacesListResult { + readonly unitPrice?: number; /** - * The list of marketplaces. + * Currency Code * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: Marketplace[]; + readonly currencyCode?: string; /** - * The link (url) to the next page of results. + * Offer Id * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; + readonly offerId?: string; } -/** Result of listing budgets. It contains a list of available budgets in the scope provided. */ -export interface BudgetsListResult { +/** The properties of the meter detail. */ +export interface MeterDetails { /** - * The list of budgets. + * 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 value?: Budget[]; + readonly meterName?: string; /** - * The link (url) to the next page of results. + * 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 nextLink?: string; -} - -/** The start and end date for a budget. */ -export interface BudgetTimePeriod { - /** The start date for the budget. */ - startDate: Date; - /** The end date for the budget. If not provided, we default this to 10 years from the start date. */ - endDate?: Date; -} - -/** May be used to filter budgets by resource group, resource, or meter. */ -export interface BudgetFilter { - /** The logical "AND" expression. Must have at least 2 items. */ - and?: BudgetFilterProperties[]; - /** The logical "NOT" expression. */ - not?: BudgetFilterProperties; - /** Has comparison expression for a dimension */ - dimensions?: BudgetComparisonExpression; - /** Has comparison expression for a tag */ - tags?: BudgetComparisonExpression; -} - -/** The Dimensions or Tags to filter a budget by. */ -export interface BudgetFilterProperties { - /** Has comparison expression for a dimension */ - dimensions?: BudgetComparisonExpression; - /** Has comparison expression for a tag */ - tags?: BudgetComparisonExpression; -} - -/** The comparison expression to be used in the budgets. */ -export interface BudgetComparisonExpression { - /** The name of the column to use in comparison. */ - name: string; - /** The operator to use for comparison. */ - operator: BudgetOperatorType; - /** Array of values to use for comparison */ - values: string[]; -} - -/** The current amount of cost which is being tracked for a budget. */ -export interface CurrentSpend { + readonly meterCategory?: string; /** - * The total amount of cost which is being tracked by the budget. + * 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 amount?: number; + readonly meterSubCategory?: string; /** - * The unit of measure for the budget amount. + * 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; -} - -/** The notification associated with a budget. */ -export interface Notification { - /** The notification is enabled or not. */ - enabled: boolean; - /** The comparison operator. */ - 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 */ - thresholdType?: ThresholdType; - /** Language in which the recipient will receive the notification */ - locale?: CultureCode; -} - -/** The forecasted cost which is being tracked for a budget. */ -export interface ForecastSpend { /** - * 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. + * 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 amount?: number; + readonly meterLocation?: string; /** - * The unit of measure for the budget amount. + * The total included quantity associated with the offer. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly unit?: string; -} - -/** The Resource model definition. */ -export interface ProxyResource { + readonly totalIncludedQuantity?: number; /** - * Resource Id. + * The pretax listing price. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly id?: string; + readonly pretaxStandardRate?: number; /** - * Resource name. + * The name of the service. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; + readonly serviceName?: string; /** - * Resource type. + * The service tier. * 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; -} - -/** The tag resource. */ -export interface Tag { - /** Tag key. */ - key?: string; - /** Tag values. */ - value?: string[]; + readonly serviceTier?: string; } -/** Result of listing charge summary. */ -export interface ChargesListResult { +/** The Resource model definition. */ +export interface Resource { /** - * The list of charge summary + * The full qualified ARM ID of an event. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: ChargeSummaryUnion[]; -} - -export interface BalancePropertiesNewPurchasesDetailsItem { + readonly id?: string; /** - * the name of new purchase. + * The ID that uniquely identifies an event. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly name?: string; /** - * the value of new purchase. + * Resource type. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: number; -} - -export interface BalancePropertiesAdjustmentDetailsItem { + readonly type?: string; /** - * the name of new adjustment. + * The etag for the resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; + readonly etag?: string; /** - * the value of new adjustment. + * Resource tags. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: number; + readonly tags?: { [propertyName: string]: string }; } -/** Result of listing reservation summaries. */ -export interface ReservationSummariesListResult { - /** - * The list of reservation summaries. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: ReservationSummary[]; - /** - * 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; +/** + * 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; } -/** Result of listing reservation details. */ -export interface ReservationDetailsListResult { +/** The details of the error. */ +export interface ErrorDetails { /** - * The list of reservation details. + * Error code. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: ReservationDetail[]; + readonly code?: string; /** - * The link (url) to the next page of results. + * Error message indicating why the operation failed. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; + readonly message?: string; } -/** Result of listing reservation recommendations. */ -export interface ReservationRecommendationsListResult { +/** Result of listing consumption operations. It contains a list of operations and a URL link to get the next set of results. */ +export interface OperationListResult { /** - * The list of reservation recommendations. + * List of consumption operations supported by the Microsoft.Consumption resource provider. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: ReservationRecommendationUnion[]; + readonly value?: Operation[]; /** - * The link (url) to the next page of results. + * 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. */ 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; } -/** The Resource model definition. */ -export interface ResourceAttributes { +/** A Consumption REST API operation. */ +export interface Operation { /** - * Resource location + * Operation Id. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly location?: string; + readonly id?: string; /** - * Resource sku + * Operation name: {provider}/{resource}/{operation}. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly sku?: string; + readonly name?: string; + /** The object that represents the operation. */ + display?: OperationDisplay; } -/** Details of the resource. */ -export interface ReservationRecommendationDetailsResourceProperties { - /** - * List of subscriptions for which the reservation is applied. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly appliedScopes?: string[]; - /** - * On demand rate of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly onDemandRate?: number; +/** The object that represents the operation. */ +export interface OperationDisplay { /** - * Azure product ex: Standard_E8s_v3 etc. + * Service provider: Microsoft.Consumption. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly product?: string; + readonly provider?: string; /** - * Azure resource region ex:EastUS, WestUS etc. + * 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 region?: string; + readonly resource?: string; /** - * Reservation rate of the resource. + * Operation type: Read, write, delete, etc. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly reservationRate?: number; + readonly operation?: string; /** - * The azure resource type. + * Description of the operation. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly resourceType?: string; + readonly description?: string; } -/** Details of the estimated savings. */ -export interface ReservationRecommendationDetailsSavingsProperties { - /** List of calculated savings. */ - calculatedSavings?: ReservationRecommendationDetailsCalculatedSavingsProperties[]; - /** - * 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. - */ - readonly lookBackPeriod?: number; - /** - * Number of recommended units of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly recommendedQuantity?: number; - /** - * Term period of the reservation, ex: P1Y or P3Y. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly reservationOrderTerm?: string; +/** The properties of the price sheet download. */ +export interface DownloadProperties { /** - * Type of savings, ex: instance. + * The link (url) to download the pricesheet. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly savingsType?: string; + readonly downloadUrl?: string; /** - * Measurement unit ex: hour etc. + * Download link validity. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly unitOfMeasure?: string; + readonly validTill?: string; } -/** Details of estimated savings. */ -export interface ReservationRecommendationDetailsCalculatedSavingsProperties { - /** - * The cost without reservation. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly onDemandCost?: number; - /** - * The difference between total reservation cost and reservation cost. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly overageCost?: number; - /** - * The quantity for calculated savings. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly quantity?: number; +/** An pricesheet resource. */ +export interface PriceSheetResult extends Resource { /** - * The exact cost of the estimated usage using reservation. + * Price sheet * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly reservationCost?: number; + readonly pricesheets?: PriceSheetProperties[]; /** - * The cost of the suggested quantity. + * 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 totalReservationCost?: number; - /** The number of reserved units used to calculate savings. Always 1 for virtual machines. */ - reservedUnitCount?: number; + readonly nextLink?: string; /** - * The amount saved by purchasing the recommended quantity of reservation. + * Pricesheet download details. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly savings?: number; + readonly download?: MeterDetails; } -/** Details about historical usage data that has been used for computing the recommendation. */ -export interface ReservationRecommendationDetailsUsageProperties { - /** - * 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. - */ - readonly firstConsumptionDate?: string; - /** - * 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. - */ - readonly lastConsumptionDate?: string; - /** - * 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. - */ - readonly lookBackUnitType?: string; - /** - * 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. - */ - readonly usageData?: number[]; - /** - * 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. - */ - readonly usageGrain?: 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; -} - -/** 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; -} - -/** Result of listing reservation recommendations. */ -export interface ReservationTransactionsListResult { - /** - * The list of reservation recommendations. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: ReservationTransaction[]; - /** - * 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 Resource model definition. */ -export interface ReservationTransactionResource { - /** - * Resource Id. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * Resource name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * Resource type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** - * Resource tags. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly tags?: string[]; -} - -/** Result of listing reservation recommendations. */ -export interface ModernReservationTransactionsListResult { - /** - * The list of reservation recommendations. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: ModernReservationTransaction[]; - /** - * 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 properties of the price sheet. */ -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; -} - -/** The properties of the meter detail. */ -export interface MeterDetails { - /** - * 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; - /** - * 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; - /** - * 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; - /** - * 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; - /** - * 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; - /** - * 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; - /** - * The pretax listing price. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly pretaxStandardRate?: number; - /** - * The name of the service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly serviceName?: string; - /** - * The service tier. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly serviceTier?: string; -} - -/** Result of listing consumption operations. It contains a list of operations and a URL link to get the next set of results. */ -export interface OperationListResult { - /** - * List of consumption operations supported by the Microsoft.Consumption resource provider. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: Operation[]; - /** - * 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. - */ - readonly nextLink?: 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; -} - -/** 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; -} - -/** Result of listing event summary. */ -export interface Events { - /** - * The list of event summary. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: EventSummary[]; - /** - * 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 amount plus currency . */ -export interface Amount { - /** - * Amount currency. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly currency?: string; - /** - * Amount. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: number; -} - -/** The reseller properties. */ -export interface Reseller { - /** - * The reseller property ID. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resellerId?: string; - /** - * The reseller property description. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resellerDescription?: string; -} - -/** Result of listing lot summary. */ -export interface Lots { - /** - * The list of lot summary. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: LotSummary[]; - /** - * 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; -} - -/** 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; - /** - * Estimated balance in billing currency. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly estimatedBalanceInBillingCurrency?: AmountWithExchangeRate; -} - -/** The properties of the meter detail. */ -export interface MeterDetailsResponse { - /** - * 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; - /** - * 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; - /** - * 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; - /** - * 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 unitOfMeasure?: string; - /** - * The service family. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly serviceFamily?: string; -} - -/** The properties of the reservation recommendation. */ -export interface LegacyReservationRecommendationProperties { - /** Polymorphic discriminator, which specifies the different types this object can be */ - scope: "Single" | "Shared"; - /** - * 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. - */ - readonly lookBackPeriod?: string; - /** - * The instance Flexibility Ratio. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - 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; - /** - * The azure resource type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceType?: 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?: number; - /** - * 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?: number; - /** - * Total estimated savings with reserved instances. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly netSavings?: number; - /** - * The usage date for looking back. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly firstUsageDate?: Date; - /** - * List of sku properties - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly skuProperties?: SkuProperty[]; -} - -/** The Sku property */ -export interface SkuProperty { - /** - * The name of sku property. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * The value of sku property. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: string; -} - -/** The properties of the price sheet download. */ -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; -} - -/** An usage detail resource. */ -export interface UsageDetail extends Resource { - /** Specifies the kind of usage details. */ - kind: UsageDetailsKind; -} - -/** A marketplace resource. */ -export interface Marketplace extends Resource { - /** - * 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 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. - */ - readonly usageStart?: Date; - /** - * 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. - */ - readonly usageEnd?: Date; - /** - * The marketplace resource rate. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceRate?: number; - /** - * The type of offer. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly offerName?: string; - /** - * The name of resource group. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceGroup?: string; - /** - * Additional information. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly additionalInfo?: string; - /** - * The order number. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly orderNumber?: string; - /** - * 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 instanceName?: string; - /** - * 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 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; - /** - * 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; - /** - * The amount of cost before tax. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly pretaxCost?: number; - /** - * The estimated usage is subject to change. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly isEstimated?: boolean; - /** - * The meter id (GUID). - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly meterId?: string; - /** - * Subscription guid. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly subscriptionGuid?: string; - /** - * Subscription name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - 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; -} - -/** A balance resource. */ -export interface Balance extends Resource { - /** - * 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 beginning balance for the billing period. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly beginningBalance?: number; - /** - * 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 endingBalance?: number; - /** - * Total new purchase amount. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly newPurchases?: number; - /** - * Total adjustment amount. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly adjustments?: number; - /** - * Total Commitment usage. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly utilized?: number; - /** - * Overage for Azure services. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly serviceOverage?: number; - /** - * Charges Billed separately. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly chargesBilledSeparately?: number; - /** - * serviceOverage + chargesBilledSeparately. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly totalOverage?: number; - /** - * Azure service commitment + total Overage. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly totalUsage?: number; - /** - * Total charges for Azure Marketplace. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly azureMarketplaceServiceCharges?: number; - /** The billing frequency. */ - billingFrequency?: BillingFrequency; - /** - * Price is hidden or not. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly priceHidden?: boolean; - /** - * List of new purchases. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly newPurchasesDetails?: BalancePropertiesNewPurchasesDetailsItem[]; - /** - * List of Adjustments (Promo credit, SIE credit etc.). - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly adjustmentDetails?: BalancePropertiesAdjustmentDetailsItem[]; -} - -/** reservation summary resource. */ -export interface ReservationSummary extends Resource { - /** - * 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 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 reservationId?: 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 skuName?: string; - /** - * 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 reservedHours?: number; - /** - * 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 usageDate?: Date; - /** - * Total used hours by the reservation - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly usedHours?: number; - /** - * 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 minUtilizationPercentage?: number; - /** - * 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 avgUtilizationPercentage?: number; - /** - * 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 maxUtilizationPercentage?: number; - /** - * The reservation kind. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly kind?: string; - /** - * This is the purchased quantity for the reservationId. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly purchasedQuantity?: number; - /** - * This is the remaining quantity for the reservationId. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly remainingQuantity?: number; - /** - * 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; - /** - * This is the used quantity for the reservationId. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - 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; -} - -/** reservation detail resource. */ -export interface ReservationDetail extends Resource { - /** - * 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 instance Flexibility Ratio. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly instanceFlexibilityRatio?: string; - /** - * The instance Flexibility Group. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly instanceFlexibilityGroup?: string; - /** - * 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 reservationId?: 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 skuName?: string; - /** - * 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. - */ - readonly reservedHours?: number; - /** - * The date on which consumption occurred. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly usageDate?: Date; - /** - * This is the total hours used by the instance. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly usedHours?: number; - /** - * This identifier is the name of the resource or the fully qualified Resource ID. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly instanceId?: string; - /** - * 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; - /** - * The reservation kind. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly kind?: string; -} - -/** A reservation recommendation resource. */ -export interface ReservationRecommendation - extends Resource, - ResourceAttributes { - /** Specifies the kind of reservation recommendation. */ - kind: ReservationRecommendationKind; -} - -/** Reservation recommendation details. */ -export interface ReservationRecommendationDetailsModel extends Resource { - /** Resource Location. */ - location?: string; - /** Resource sku */ - sku?: string; - /** - * 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. - */ - readonly currency?: string; - /** - * Resource specific properties. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resource?: ReservationRecommendationDetailsResourceProperties; - /** - * Resource Group. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceGroup?: string; - /** - * Savings information for the recommendation. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly savings?: ReservationRecommendationDetailsSavingsProperties; - /** - * Scope of the reservation, ex: Single or Shared. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly scope?: string; - /** - * Historical usage details used to calculate the estimated savings. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly usage?: ReservationRecommendationDetailsUsageProperties; -} - -/** An pricesheet resource. */ -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[]; - /** - * 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; -} - -/** A management group aggregated cost resource. */ -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[]; -} - -/** 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 credit currency. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly creditCurrency?: string; - /** - * The billing currency. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly billingCurrency?: string; - /** - * Credit's reseller. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly reseller?: Reseller; - /** - * The eTag for the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly eTag?: string; -} - -/** A budget resource. */ -export interface Budget extends ProxyResource { - /** The category of the budget, whether the budget tracks cost or usage. */ - category?: CategoryType; - /** The total amount of cost to track with the budget */ - 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 */ - 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; -} - -/** A resource listing all tags. */ -export interface TagsResult extends ProxyResource { - /** A list of Tag. */ - 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; -} - -/** A charge summary resource. */ -export interface ChargeSummary extends ProxyResource { - /** Specifies the kind of charge summary. */ - kind: ChargeSummaryKind; -} - -/** An event summary resource. */ -export interface EventSummary extends ProxyResource { - /** - * The date of the event. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly transactionDate?: Date; - /** - * The description of the event. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly description?: string; - /** - * The amount of new credit or commitment for NewCredit or SettleCharges event. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly newCredit?: Amount; - /** - * The amount of balance adjustment. The property is not available for ConsumptionCommitment lots. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly adjustments?: Amount; - /** - * The amount of expired credit or commitment for NewCredit or SettleCharges event. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly creditExpired?: Amount; - /** - * The amount of charges for events of type SettleCharges and PendingEligibleCharges. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly charges?: Amount; - /** - * The balance after the event. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly closedBalance?: Amount; - /** Identifies the type of the event. */ - eventType?: EventType; - /** - * The number which uniquely identifies the invoice on which the event was billed. This will be empty for unbilled events. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly invoiceNumber?: string; - /** - * The ID that uniquely identifies the billing profile for which the event happened. The property is only available for billing account of type MicrosoftCustomerAgreement. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly billingProfileId?: string; - /** - * The display name of the billing profile for which the event happened. The property is only available for billing account of type MicrosoftCustomerAgreement. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly billingProfileDisplayName?: string; - /** - * The ID that uniquely identifies the lot for which the event happened. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly lotId?: string; - /** - * Identifies the source of the lot for which the event happened. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly lotSource?: string; - /** - * Amount of canceled credit. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly canceledCredit?: Amount; - /** - * The credit currency of the event. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly creditCurrency?: string; - /** - * The billing currency of the event. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly billingCurrency?: string; - /** - * The reseller of the event. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly reseller?: Reseller; - /** - * The amount of expired credit or commitment for NewCredit or SettleCharges event in billing currency. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly creditExpiredInBillingCurrency?: AmountWithExchangeRate; - /** - * The amount of new credit or commitment for NewCredit or SettleCharges event in billing currency. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly newCreditInBillingCurrency?: AmountWithExchangeRate; - /** - * The amount of balance adjustment in billing currency. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly adjustmentsInBillingCurrency?: AmountWithExchangeRate; - /** - * The amount of charges for events of type SettleCharges and PendingEligibleCharges in billing currency. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly chargesInBillingCurrency?: AmountWithExchangeRate; - /** - * The balance in billing currency after the event. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly closedBalanceInBillingCurrency?: AmountWithExchangeRate; - /** - * The eTag for the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly eTagPropertiesETag?: string; -} - -/** A lot summary resource. */ -export interface LotSummary extends ProxyResource { - /** - * The original amount of a lot. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly originalAmount?: Amount; - /** - * The balance as of the last invoice. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly closedBalance?: Amount; - /** - * The source of the lot. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly source?: LotSource; - /** - * The date when the lot became effective. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly startDate?: Date; - /** - * The expiration date of a lot. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly expirationDate?: Date; - /** - * The po number of the invoice on which the lot was added. This property is not available for ConsumptionCommitment lots. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly poNumber?: string; - /** - * The date when the lot was added. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly purchasedDate?: Date; - /** - * The status of the lot. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly status?: Status; - /** - * The currency of the lot. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly creditCurrency?: string; - /** - * The billing currency of the lot. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly billingCurrency?: string; - /** - * The original amount of a lot in billing currency. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly originalAmountInBillingCurrency?: AmountWithExchangeRate; - /** - * The balance as of the last invoice in billing currency. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly closedBalanceInBillingCurrency?: AmountWithExchangeRate; - /** - * The reseller of the lot. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly reseller?: Reseller; - /** - * The eTag for the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly eTagPropertiesETag?: string; -} - -/** Reservation transaction resource. */ -export interface ReservationTransaction extends ReservationTransactionResource { - /** - * The date of the transaction - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly eventDate?: Date; - /** - * 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 description of the transaction. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - 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; - /** - * The billing month(yyyyMMdd), on which the event initiated. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly billingMonth?: number; - /** - * The monetary commitment amount at the enrollment scope. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly monetaryCommitment?: number; - /** - * The overage amount at the enrollment scope. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly overage?: number; -} - -/** Modern Reservation transaction resource. */ -export interface ModernReservationTransaction - extends ReservationTransactionResource { - /** - * The charge of the transaction. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly amount?: number; - /** - * 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; - /** - * 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; - /** - * 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; -} - -/** The amount with exchange rate. */ -export interface AmountWithExchangeRate extends Amount { - /** - * The exchange rate. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly exchangeRate?: number; - /** - * The exchange rate month. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly exchangeRateMonth?: number; -} - -/** The properties of the legacy reservation recommendation for single scope. */ -export interface LegacySingleScopeReservationRecommendationProperties - extends LegacyReservationRecommendationProperties { - /** Polymorphic discriminator, which specifies the different types this object can be */ - scope: "Single"; - /** - * Subscription id associated with single scoped recommendation. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly subscriptionId?: string; -} - -/** The properties of the legacy reservation recommendation for shared scope. */ -export interface LegacySharedScopeReservationRecommendationProperties - extends LegacyReservationRecommendationProperties { - /** Polymorphic discriminator, which specifies the different types this object can be */ - scope: "Shared"; -} - -/** Legacy usage detail. */ -export interface LegacyUsageDetail extends UsageDetail { - /** Polymorphic discriminator, which specifies the different types this object can be */ - kind: "legacy"; - /** - * Billing Account identifier. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly billingAccountId?: string; - /** - * Billing Account Name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly billingAccountName?: string; - /** - * The billing period start date. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly billingPeriodStartDate?: Date; - /** - * The billing period end date. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly billingPeriodEndDate?: Date; - /** - * Billing Profile identifier. - * 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; - /** - * Account Owner Id. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly accountOwnerId?: string; - /** - * Account Name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly accountName?: string; - /** - * Subscription guid. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly subscriptionId?: string; - /** - * Subscription name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly subscriptionName?: string; - /** - * Date for the usage record. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly date?: Date; - /** - * 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 product?: string; - /** - * 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 partNumber?: string; - /** - * 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 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?: MeterDetailsResponse; - /** - * The usage quantity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly quantity?: number; - /** - * Effective Price that's charged for the usage. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly effectivePrice?: number; - /** - * The amount of cost before tax. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly cost?: number; - /** - * 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 unitPrice?: number; - /** - * Billing Currency. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly billingCurrency?: string; - /** - * Resource Location. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceLocation?: string; - /** - * 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 consumedService?: string; - /** - * 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 resourceId?: string; - /** - * Resource Name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceName?: string; - /** - * Service-specific metadata. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly serviceInfo1?: string; - /** - * Legacy field with optional service-specific metadata. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly serviceInfo2?: string; - /** - * 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 additionalInfo?: string; - /** - * Invoice Section Name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly invoiceSection?: 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; - /** - * Resource Group Name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceGroup?: string; - /** - * 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 reservationId?: string; - /** - * 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 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; - /** - * 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; - /** - * 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; - /** - * 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 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; - /** - * Retail price for the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly payGPrice?: number; - /** - * Identifier that indicates how the meter is priced. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly pricingModel?: PricingModelType; -} - -/** Modern usage detail. */ -export interface ModernUsageDetail extends UsageDetail { - /** Polymorphic discriminator, which specifies the different types this object can be */ - kind: "modern"; - /** - * Billing Account identifier. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly billingAccountId?: string; - /** - * Effective Price that's charged for the usage. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly effectivePrice?: number; - /** - * Identifier that indicates how the meter is priced - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly pricingModel?: PricingModelType; - /** - * Name of the Billing Account. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly billingAccountName?: string; - /** - * Billing Period Start Date as in the invoice. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly billingPeriodStartDate?: Date; - /** - * Billing Period End Date as in the invoice. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly billingPeriodEndDate?: Date; - /** - * 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 billingProfileId?: string; - /** - * 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 billingProfileName?: string; - /** - * Unique Microsoft generated identifier for the Azure Subscription. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly subscriptionGuid?: string; - /** - * Name of the Azure Subscription. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly subscriptionName?: string; - /** - * Date for the usage record. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly date?: Date; - /** - * Name of the product that has accrued charges by consumption or purchase as listed in the invoice. Not available for Marketplace. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly product?: string; - /** - * 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 meterId?: string; - /** - * 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 meterName?: string; - /** - * 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 meterRegion?: string; - /** - * Identifies the top-level service for the usage. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly meterCategory?: string; - /** - * 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 meterSubCategory?: string; - /** - * 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 serviceFamily?: string; - /** - * 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 quantity?: number; - /** - * 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 unitOfMeasure?: string; - /** - * Instance Name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly instanceName?: string; - /** - * 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 costInUSD?: number; - /** - * 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 unitPrice?: number; - /** - * The currency defining the billed cost. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly billingCurrencyCode?: string; - /** - * Name of the resource location. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceLocation?: string; - /** - * 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 consumedService?: string; - /** - * Service-specific metadata. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly serviceInfo1?: string; - /** - * Legacy field with optional service-specific metadata. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly serviceInfo2?: string; - /** - * 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 additionalInfo?: string; - /** - * 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 invoiceSectionId?: string; - /** - * 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 invoiceSectionName?: 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; - /** - * 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 resourceGroup?: string; - /** - * 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 reservationId?: string; - /** - * 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 reservationName?: string; - /** - * 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 productOrderId?: string; - /** - * 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; - /** - * 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 isAzureCreditEligible?: boolean; - /** - * 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 term?: string; - /** - * 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 publisherName?: string; - /** - * 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 publisherType?: string; - /** - * 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 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; - /** - * 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 costInBillingCurrency?: number; - /** - * 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 costInPricingCurrency?: number; - /** - * 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 exchangeRate?: string; - /** - * 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 exchangeRateDate?: Date; - /** - * 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; - /** - * 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 previousInvoiceId?: string; - /** - * Pricing Billing Currency. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly pricingCurrencyCode?: string; - /** - * 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 productIdentifier?: string; - /** - * Resource Location Normalized. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceLocationNormalized?: string; - /** - * 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. - */ - readonly servicePeriodStartDate?: Date; - /** - * 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. - */ - readonly servicePeriodEndDate?: Date; - /** - * Identifier of the customer's AAD tenant. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly customerTenantId?: string; - /** - * Name of the customer's AAD tenant. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly customerName?: string; - /** - * Identifier for the partner's AAD tenant. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly partnerTenantId?: string; - /** - * Name of the partner' AAD tenant. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly partnerName?: string; - /** - * MPNId for the reseller associated with the subscription. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resellerMpnId?: string; - /** - * Reseller Name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resellerName?: string; - /** - * Publisher Id. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly publisherId?: string; - /** - * Market Price that's charged for the usage. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly marketPrice?: number; - /** - * Exchange Rate from pricing currency to billing currency. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly exchangeRatePricingToBilling?: number; - /** - * The amount of PayG cost before tax in billing currency. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly paygCostInBillingCurrency?: number; - /** - * The amount of PayG cost before tax in US Dollar currency. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly paygCostInUSD?: number; - /** - * Rate of discount applied if there is a partner earned credit (PEC) based on partner admin link access. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly partnerEarnedCreditRate?: number; - /** - * Flag to indicate if partner earned credit has been applied or not. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly partnerEarnedCreditApplied?: string; - /** - * Retail price for the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly payGPrice?: number; - /** - * Unique identifier for the applicable benefit. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly benefitId?: string; - /** - * Name of the applicable benefit. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly benefitName?: string; - /** - * Identifier for Product Category or Line Of Business, Ex - Azure, Microsoft 365, AWS e.t.c - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provider?: string; - /** - * Name for Cost Allocation Rule. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly costAllocationRuleName?: string; -} - -/** Legacy reservation recommendation. */ -export interface LegacyReservationRecommendation - extends ReservationRecommendation { - /** Polymorphic discriminator, which specifies the different types this object can be */ - kind: "legacy"; - /** - * 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. - */ - readonly lookBackPeriod?: string; - /** - * The instance Flexibility Ratio. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - 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; - /** - * The azure resource type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceType?: 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?: number; - /** - * 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?: number; - /** - * Total estimated savings with reserved instances. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly netSavings?: number; - /** - * 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. */ - scope: string; - /** - * List of sku properties - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly skuProperties?: SkuProperty[]; -} - -/** Modern reservation recommendation. */ -export interface ModernReservationRecommendation - extends ReservationRecommendation { - /** Polymorphic discriminator, which specifies the different types this object can be */ - kind: "modern"; - /** - * Resource Location. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly locationPropertiesLocation?: string; - /** - * 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. - */ - readonly lookBackPeriod?: number; - /** - * The instance Flexibility Ratio. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - 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; -} - -/** Legacy charge summary. */ -export interface LegacyChargeSummary extends ChargeSummary { - /** Polymorphic discriminator, which specifies the different types this object can be */ - kind: "legacy"; - /** - * 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 extends ChargeSummary { - /** Polymorphic discriminator, which specifies the different types this object can be */ - kind: "modern"; - /** - * 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; -} - -/** Legacy Reservation transaction resource. */ -export interface LegacyReservationTransaction extends ReservationTransaction {} - -/** Known values of {@link Metrictype} that the service accepts. */ -export enum KnownMetrictype { - /** Actual cost data. */ - ActualCostMetricType = "actualcost", - /** Amortized cost data. */ - AmortizedCostMetricType = "amortizedcost", - /** Usage data. */ - UsageMetricType = "usage" -} - -/** - * Defines values for Metrictype. \ - * {@link KnownMetrictype} can be used interchangeably with Metrictype, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **actualcost**: Actual cost data. \ - * **amortizedcost**: Amortized cost data. \ - * **usage**: Usage data. - */ -export type Metrictype = string; - -/** Known values of {@link UsageDetailsKind} that the service accepts. */ -export enum KnownUsageDetailsKind { - /** Legacy */ - Legacy = "legacy", - /** Modern */ - Modern = "modern" -} - -/** - * Defines values for UsageDetailsKind. \ - * {@link KnownUsageDetailsKind} can be used interchangeably with UsageDetailsKind, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **legacy** \ - * **modern** - */ -export type UsageDetailsKind = string; - -/** Known values of {@link CategoryType} that the service accepts. */ -export enum KnownCategoryType { - /** Cost */ - Cost = "Cost" -} - -/** - * Defines values for CategoryType. \ - * {@link KnownCategoryType} can be used interchangeably with CategoryType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Cost** - */ -export type CategoryType = string; - -/** Known values of {@link TimeGrainType} that the service accepts. */ -export enum KnownTimeGrainType { - /** Monthly */ - Monthly = "Monthly", - /** Quarterly */ - Quarterly = "Quarterly", - /** Annually */ - Annually = "Annually", - /** BillingMonth */ - BillingMonth = "BillingMonth", - /** BillingQuarter */ - BillingQuarter = "BillingQuarter", - /** BillingAnnual */ - BillingAnnual = "BillingAnnual" -} - -/** - * Defines values for TimeGrainType. \ - * {@link KnownTimeGrainType} can be used interchangeably with TimeGrainType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Monthly** \ - * **Quarterly** \ - * **Annually** \ - * **BillingMonth** \ - * **BillingQuarter** \ - * **BillingAnnual** - */ -export type TimeGrainType = string; - -/** Known values of {@link BudgetOperatorType} that the service accepts. */ -export enum KnownBudgetOperatorType { - /** In */ - In = "In" -} - -/** - * Defines values for BudgetOperatorType. \ - * {@link KnownBudgetOperatorType} can be used interchangeably with BudgetOperatorType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **In** - */ -export type BudgetOperatorType = string; - -/** Known values of {@link OperatorType} that the service accepts. */ -export enum KnownOperatorType { - /** EqualTo */ - EqualTo = "EqualTo", - /** GreaterThan */ - GreaterThan = "GreaterThan", - /** GreaterThanOrEqualTo */ - GreaterThanOrEqualTo = "GreaterThanOrEqualTo" -} - -/** - * Defines values for OperatorType. \ - * {@link KnownOperatorType} can be used interchangeably with OperatorType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **EqualTo** \ - * **GreaterThan** \ - * **GreaterThanOrEqualTo** - */ -export type OperatorType = string; - -/** Known values of {@link ThresholdType} that the service accepts. */ -export enum KnownThresholdType { - /** Actual */ - Actual = "Actual", - /** Forecasted */ - Forecasted = "Forecasted" -} - -/** - * Defines values for ThresholdType. \ - * {@link KnownThresholdType} can be used interchangeably with ThresholdType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Actual** \ - * **Forecasted** - */ -export type ThresholdType = string; - -/** Known values of {@link CultureCode} that the service accepts. */ -export enum KnownCultureCode { - /** EnUs */ - EnUs = "en-us", - /** JaJp */ - JaJp = "ja-jp", - /** ZhCn */ - ZhCn = "zh-cn", - /** DeDe */ - DeDe = "de-de", - /** EsEs */ - EsEs = "es-es", - /** FrFr */ - FrFr = "fr-fr", - /** ItIt */ - ItIt = "it-it", - /** KoKr */ - KoKr = "ko-kr", - /** PtBr */ - PtBr = "pt-br", - /** RuRu */ - RuRu = "ru-ru", - /** ZhTw */ - ZhTw = "zh-tw", - /** CsCz */ - CsCz = "cs-cz", - /** PlPl */ - PlPl = "pl-pl", - /** TrTr */ - TrTr = "tr-tr", - /** DaDk */ - DaDk = "da-dk", - /** EnGb */ - EnGb = "en-gb", - /** HuHu */ - HuHu = "hu-hu", - /** NbNo */ - NbNo = "nb-no", - /** NlNl */ - NlNl = "nl-nl", - /** PtPt */ - PtPt = "pt-pt", - /** SvSe */ - SvSe = "sv-se" -} - -/** - * Defines values for CultureCode. \ - * {@link KnownCultureCode} can be used interchangeably with CultureCode, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **en-us** \ - * **ja-jp** \ - * **zh-cn** \ - * **de-de** \ - * **es-es** \ - * **fr-fr** \ - * **it-it** \ - * **ko-kr** \ - * **pt-br** \ - * **ru-ru** \ - * **zh-tw** \ - * **cs-cz** \ - * **pl-pl** \ - * **tr-tr** \ - * **da-dk** \ - * **en-gb** \ - * **hu-hu** \ - * **nb-no** \ - * **nl-nl** \ - * **pt-pt** \ - * **sv-se** - */ -export type CultureCode = string; - -/** Known values of {@link ChargeSummaryKind} that the service accepts. */ -export enum KnownChargeSummaryKind { - /** Legacy */ - Legacy = "legacy", - /** Modern */ - Modern = "modern" -} - -/** - * Defines values for ChargeSummaryKind. \ - * {@link KnownChargeSummaryKind} can be used interchangeably with ChargeSummaryKind, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **legacy** \ - * **modern** - */ -export type ChargeSummaryKind = string; - -/** Known values of {@link BillingFrequency} that the service accepts. */ -export enum KnownBillingFrequency { - /** Month */ - Month = "Month", - /** Quarter */ - Quarter = "Quarter", - /** Year */ - Year = "Year" -} - -/** - * Defines values for BillingFrequency. \ - * {@link KnownBillingFrequency} can be used interchangeably with BillingFrequency, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Month** \ - * **Quarter** \ - * **Year** - */ -export type BillingFrequency = string; - -/** Known values of {@link Datagrain} that the service accepts. */ -export enum KnownDatagrain { - /** Daily grain of data */ - DailyGrain = "daily", - /** Monthly grain of data */ - MonthlyGrain = "monthly" -} - -/** - * Defines values for Datagrain. \ - * {@link KnownDatagrain} can be used interchangeably with Datagrain, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **daily**: Daily grain of data \ - * **monthly**: Monthly grain of data - */ -export type Datagrain = string; - -/** Known values of {@link ReservationRecommendationKind} that the service accepts. */ -export enum KnownReservationRecommendationKind { - /** Legacy */ - Legacy = "legacy", - /** Modern */ - Modern = "modern" -} - -/** - * Defines values for ReservationRecommendationKind. \ - * {@link KnownReservationRecommendationKind} can be used interchangeably with ReservationRecommendationKind, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **legacy** \ - * **modern** - */ -export type ReservationRecommendationKind = string; - -/** Known values of {@link Term} that the service accepts. */ -export enum KnownTerm { - /** 1 year reservation term */ - P1Y = "P1Y", - /** 3 year reservation term */ - P3Y = "P3Y" -} - -/** - * Defines values for Term. \ - * {@link KnownTerm} can be used interchangeably with Term, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **P1Y**: 1 year reservation term \ - * **P3Y**: 3 year reservation term - */ -export type Term = string; - -/** Known values of {@link LookBackPeriod} that the service accepts. */ -export enum KnownLookBackPeriod { - /** Use 7 days of data for recommendations */ - Last07Days = "Last7Days", - /** Use 30 days of data for recommendations */ - Last30Days = "Last30Days", - /** Use 60 days of data for recommendations */ - Last60Days = "Last60Days" -} - -/** - * Defines values for LookBackPeriod. \ - * {@link KnownLookBackPeriod} can be used interchangeably with LookBackPeriod, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Last7Days**: Use 7 days of data for recommendations \ - * **Last30Days**: Use 30 days of data for recommendations \ - * **Last60Days**: Use 60 days of data for recommendations - */ -export type LookBackPeriod = string; - -/** Known values of {@link EventType} that the service accepts. */ -export enum KnownEventType { - /** SettledCharges */ - SettledCharges = "SettledCharges", - /** PendingCharges */ - PendingCharges = "PendingCharges", - /** PendingAdjustments */ - PendingAdjustments = "PendingAdjustments", - /** PendingNewCredit */ - PendingNewCredit = "PendingNewCredit", - /** PendingExpiredCredit */ - PendingExpiredCredit = "PendingExpiredCredit", - /** UnKnown */ - UnKnown = "UnKnown", - /** NewCredit */ - NewCredit = "NewCredit" -} - -/** - * Defines values for EventType. \ - * {@link KnownEventType} can be used interchangeably with EventType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **SettledCharges** \ - * **PendingCharges** \ - * **PendingAdjustments** \ - * **PendingNewCredit** \ - * **PendingExpiredCredit** \ - * **UnKnown** \ - * **NewCredit** - */ -export type EventType = string; - -/** Known values of {@link LotSource} that the service accepts. */ -export enum KnownLotSource { - /** PurchasedCredit */ - PurchasedCredit = "PurchasedCredit", - /** PromotionalCredit */ - PromotionalCredit = "PromotionalCredit", - /** ConsumptionCommitment */ - ConsumptionCommitment = "ConsumptionCommitment" -} - -/** - * Defines values for LotSource. \ - * {@link KnownLotSource} can be used interchangeably with LotSource, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **PurchasedCredit** \ - * **PromotionalCredit** \ - * **ConsumptionCommitment** - */ -export type LotSource = string; - -/** Known values of {@link Status} that the service accepts. */ -export enum KnownStatus { - /** None */ - None = "None", - /** Active */ - Active = "Active", - /** Inactive */ - Inactive = "Inactive", - /** Expired */ - Expired = "Expired", - /** Complete */ - Complete = "Complete", - /** Canceled */ - Canceled = "Canceled" -} - -/** - * Defines values for Status. \ - * {@link KnownStatus} can be used interchangeably with Status, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **None** \ - * **Active** \ - * **Inactive** \ - * **Expired** \ - * **Complete** \ - * **Canceled** - */ -export type Status = string; - -/** Known values of {@link PricingModelType} that the service accepts. */ -export enum KnownPricingModelType { - /** OnDemand */ - OnDemand = "On Demand", - /** Reservation */ - Reservation = "Reservation", - /** Spot */ - Spot = "Spot" -} - -/** - * Defines values for PricingModelType. \ - * {@link KnownPricingModelType} can be used interchangeably with PricingModelType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **On Demand** \ - * **Reservation** \ - * **Spot** - */ -export type PricingModelType = string; - -/** Known values of {@link Scope} that the service accepts. */ -export enum KnownScope { - /** Single */ - Single = "Single", - /** Shared */ - Shared = "Shared" -} - -/** - * Defines values for Scope. \ - * {@link KnownScope} can be used interchangeably with Scope, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Single** \ - * **Shared** - */ -export type Scope = string; - -/** Optional parameters. */ -export interface UsageDetailsListOptionalParams - extends coreClient.OperationOptions { - /** 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. */ - metric?: Metrictype; -} - -/** Contains response data for the list operation. */ -export type UsageDetailsListResponse = UsageDetailsListResult; - -/** Optional parameters. */ -export interface UsageDetailsListNextOptionalParams - extends coreClient.OperationOptions { - /** 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. */ - metric?: Metrictype; -} - -/** Contains response data for the listNext operation. */ -export type UsageDetailsListNextResponse = UsageDetailsListResult; - -/** Optional parameters. */ -export interface MarketplacesListOptionalParams - extends coreClient.OperationOptions { - /** 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; - /** 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 marketplaces. */ - top?: number; -} - -/** Contains response data for the list operation. */ -export type MarketplacesListResponse = MarketplacesListResult; - -/** Optional parameters. */ -export interface MarketplacesListNextOptionalParams - extends coreClient.OperationOptions { - /** 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; - /** 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 marketplaces. */ - top?: number; -} - -/** Contains response data for the listNext operation. */ -export type MarketplacesListNextResponse = MarketplacesListResult; - -/** Optional parameters. */ -export interface BudgetsListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type BudgetsListResponse = BudgetsListResult; - -/** Optional parameters. */ -export interface BudgetsGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type BudgetsGetResponse = Budget; - -/** Optional parameters. */ -export interface BudgetsCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type BudgetsCreateOrUpdateResponse = Budget; - -/** Optional parameters. */ -export interface BudgetsDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface BudgetsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type BudgetsListNextResponse = BudgetsListResult; - -/** Optional parameters. */ -export interface TagsGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type TagsGetResponse = TagsResult; - -/** Optional parameters. */ -export interface ChargesListOptionalParams extends coreClient.OperationOptions { - /** 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; - /** Start date */ - startDate?: string; - /** End date */ - endDate?: string; - /** May be used to group charges for billingAccount scope by properties/billingProfileId, properties/invoiceSectionId, properties/customerId (specific for Partner Led), or for billingProfile scope by properties/invoiceSectionId. */ - apply?: string; -} - -/** Contains response data for the list operation. */ -export type ChargesListResponse = ChargesListResult; - -/** Optional parameters. */ -export interface BalancesGetByBillingAccountOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getByBillingAccount operation. */ -export type BalancesGetByBillingAccountResponse = Balance; - -/** Optional parameters. */ -export interface BalancesGetForBillingPeriodByBillingAccountOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getForBillingPeriodByBillingAccount operation. */ -export type BalancesGetForBillingPeriodByBillingAccountResponse = Balance; - -/** Optional parameters. */ -export interface ReservationsSummariesListByReservationOrderOptionalParams - extends coreClient.OperationOptions { - /** 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 listByReservationOrder operation. */ -export type ReservationsSummariesListByReservationOrderResponse = ReservationSummariesListResult; - -/** Optional parameters. */ -export interface ReservationsSummariesListByReservationOrderAndReservationOptionalParams - extends coreClient.OperationOptions { - /** 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 listByReservationOrderAndReservation operation. */ -export type ReservationsSummariesListByReservationOrderAndReservationResponse = ReservationSummariesListResult; - -/** Optional parameters. */ -export interface ReservationsSummariesListOptionalParams - extends coreClient.OperationOptions { - /** 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; - /** Start date. Only applicable when querying with billing profile */ - startDate?: string; - /** End date. Only applicable when querying with billing profile */ - endDate?: 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 list operation. */ -export type ReservationsSummariesListResponse = ReservationSummariesListResult; - -/** Optional parameters. */ -export interface ReservationsSummariesListByReservationOrderNextOptionalParams - extends coreClient.OperationOptions { - /** 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 listByReservationOrderNext operation. */ -export type ReservationsSummariesListByReservationOrderNextResponse = ReservationSummariesListResult; - -/** Optional parameters. */ -export interface ReservationsSummariesListByReservationOrderAndReservationNextOptionalParams - extends coreClient.OperationOptions { - /** 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 listByReservationOrderAndReservationNext operation. */ -export type ReservationsSummariesListByReservationOrderAndReservationNextResponse = ReservationSummariesListResult; - -/** Optional parameters. */ -export interface ReservationsSummariesListNextOptionalParams - extends coreClient.OperationOptions { - /** 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; - /** Start date. Only applicable when querying with billing profile */ - startDate?: string; - /** End date. Only applicable when querying with billing profile */ - endDate?: 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 listNext operation. */ -export type ReservationsSummariesListNextResponse = ReservationSummariesListResult; - -/** Optional parameters. */ -export interface ReservationsDetailsListByReservationOrderOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByReservationOrder operation. */ -export type ReservationsDetailsListByReservationOrderResponse = ReservationDetailsListResult; - -/** Optional parameters. */ -export interface ReservationsDetailsListByReservationOrderAndReservationOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByReservationOrderAndReservation operation. */ -export type ReservationsDetailsListByReservationOrderAndReservationResponse = ReservationDetailsListResult; - -/** Optional parameters. */ -export interface ReservationsDetailsListOptionalParams - extends coreClient.OperationOptions { - /** 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; - /** Start date. Only applicable when querying with billing profile */ - startDate?: string; - /** End date. Only applicable when querying with billing profile */ - endDate?: 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 list operation. */ -export type ReservationsDetailsListResponse = ReservationDetailsListResult; - -/** Optional parameters. */ -export interface ReservationsDetailsListByReservationOrderNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByReservationOrderNext operation. */ -export type ReservationsDetailsListByReservationOrderNextResponse = ReservationDetailsListResult; - -/** Optional parameters. */ -export interface ReservationsDetailsListByReservationOrderAndReservationNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByReservationOrderAndReservationNext operation. */ -export type ReservationsDetailsListByReservationOrderAndReservationNextResponse = ReservationDetailsListResult; - -/** Optional parameters. */ -export interface ReservationsDetailsListNextOptionalParams - extends coreClient.OperationOptions { - /** 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; - /** Start date. Only applicable when querying with billing profile */ - startDate?: string; - /** End date. Only applicable when querying with billing profile */ - endDate?: 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 listNext operation. */ -export type ReservationsDetailsListNextResponse = ReservationDetailsListResult; - -/** Optional parameters. */ -export interface ReservationRecommendationsListOptionalParams - extends coreClient.OperationOptions { - /** 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'. */ - filter?: string; -} - -/** Contains response data for the list operation. */ -export type ReservationRecommendationsListResponse = ReservationRecommendationsListResult; - -/** Optional parameters. */ -export interface ReservationRecommendationsListNextOptionalParams - extends coreClient.OperationOptions { - /** 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'. */ - filter?: string; -} - -/** Contains response data for the listNext operation. */ -export type ReservationRecommendationsListNextResponse = ReservationRecommendationsListResult; - -/** Optional parameters. */ -export interface ReservationRecommendationDetailsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ReservationRecommendationDetailsGetResponse = ReservationRecommendationDetailsModel; - -/** Optional parameters. */ -export interface ReservationTransactionsListOptionalParams - extends coreClient.OperationOptions { - /** Filter reservation transactions by date range. The properties/EventDate for start date and end date. The filter supports 'le' and 'ge' */ - filter?: string; -} - -/** Contains response data for the list operation. */ -export type ReservationTransactionsListResponse = ReservationTransactionsListResult; - -/** Optional parameters. */ -export interface ReservationTransactionsListByBillingProfileOptionalParams - extends coreClient.OperationOptions { - /** Filter reservation transactions by date range. The properties/EventDate for start date and end date. The filter supports 'le' and 'ge' */ - filter?: string; -} - -/** Contains response data for the listByBillingProfile operation. */ -export type ReservationTransactionsListByBillingProfileResponse = ModernReservationTransactionsListResult; - -/** Optional parameters. */ -export interface ReservationTransactionsListNextOptionalParams - extends coreClient.OperationOptions { - /** Filter reservation transactions by date range. The properties/EventDate for start date and end date. The filter supports 'le' and 'ge' */ - filter?: string; -} - -/** Contains response data for the listNext operation. */ -export type ReservationTransactionsListNextResponse = ReservationTransactionsListResult; - -/** Optional parameters. */ -export interface ReservationTransactionsListByBillingProfileNextOptionalParams - extends coreClient.OperationOptions { - /** Filter reservation transactions by date range. The properties/EventDate for start date and end date. The filter supports 'le' and 'ge' */ - filter?: string; -} - -/** Contains response data for the listByBillingProfileNext operation. */ -export type ReservationTransactionsListByBillingProfileNextResponse = ModernReservationTransactionsListResult; - -/** Optional parameters. */ -export interface PriceSheetGetOptionalParams - extends coreClient.OperationOptions { - /** May be used to expand the properties/meterDetails within a price sheet. By default, these fields are not included when returning price sheet. */ - expand?: string; - /** 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 PriceSheetGetOptionalParams + extends coreClient.OperationOptions { + /** May be used to expand the properties/meterDetails within a price sheet. By default, these fields are not included when returning price sheet. */ + expand?: string; + /** 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 get operation. */ @@ -3600,97 +292,6 @@ export interface OperationsListNextOptionalParams /** Contains response data for the listNext operation. */ export type OperationsListNextResponse = OperationListResult; -/** Optional parameters. */ -export interface AggregatedCostGetByManagementGroupOptionalParams - extends coreClient.OperationOptions { - /** 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; -} - -/** Contains response data for the getByManagementGroup operation. */ -export type AggregatedCostGetByManagementGroupResponse = ManagementGroupAggregatedCostResult; - -/** Optional parameters. */ -export interface AggregatedCostGetForBillingPeriodByManagementGroupOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getForBillingPeriodByManagementGroup operation. */ -export type AggregatedCostGetForBillingPeriodByManagementGroupResponse = ManagementGroupAggregatedCostResult; - -/** Optional parameters. */ -export interface EventsListByBillingProfileOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByBillingProfile operation. */ -export type EventsListByBillingProfileResponse = Events; - -/** Optional parameters. */ -export interface EventsListByBillingAccountOptionalParams - extends coreClient.OperationOptions { - /** May be used to filter the events by lotId, lotSource etc. 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; -} - -/** Contains response data for the listByBillingAccount operation. */ -export type EventsListByBillingAccountResponse = Events; - -/** Optional parameters. */ -export interface EventsListByBillingProfileNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByBillingProfileNext operation. */ -export type EventsListByBillingProfileNextResponse = Events; - -/** Optional parameters. */ -export interface EventsListByBillingAccountNextOptionalParams - extends coreClient.OperationOptions { - /** May be used to filter the events by lotId, lotSource etc. 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; -} - -/** Contains response data for the listByBillingAccountNext operation. */ -export type EventsListByBillingAccountNextResponse = Events; - -/** Optional parameters. */ -export interface LotsListByBillingProfileOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByBillingProfile operation. */ -export type LotsListByBillingProfileResponse = Lots; - -/** Optional parameters. */ -export interface LotsListByBillingAccountOptionalParams - extends coreClient.OperationOptions { - /** May be used to filter the lots by Status, Source etc. 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; -} - -/** Contains response data for the listByBillingAccount operation. */ -export type LotsListByBillingAccountResponse = Lots; - -/** Optional parameters. */ -export interface LotsListByBillingProfileNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByBillingProfileNext operation. */ -export type LotsListByBillingProfileNextResponse = Lots; - -/** Optional parameters. */ -export interface LotsListByBillingAccountNextOptionalParams - extends coreClient.OperationOptions { - /** May be used to filter the lots by Status, Source etc. 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; -} - -/** Contains response data for the listByBillingAccountNext operation. */ -export type LotsListByBillingAccountNextResponse = Lots; - -/** Optional parameters. */ -export interface CreditsGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type CreditsGetResponse = CreditSummary; - /** Optional parameters. */ export interface ConsumptionManagementClientOptionalParams extends coreClient.ServiceClientOptions { diff --git a/sdk/consumption/arm-consumption/src/models/mappers.ts b/sdk/consumption/arm-consumption/src/models/mappers.ts index bd98dc2dad1b..df385596041e 100644 --- a/sdk/consumption/arm-consumption/src/models/mappers.ts +++ b/sdk/consumption/arm-consumption/src/models/mappers.ts @@ -8,26 +8,141 @@ import * as coreClient from "@azure/core-client"; -export const UsageDetailsListResult: coreClient.CompositeMapper = { +export const PriceSheetProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "UsageDetailsListResult", + className: "PriceSheetProperties", modelProperties: { - value: { - serializedName: "value", + billingPeriodId: { + serializedName: "billingPeriodId", readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "UsageDetail" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", + meterId: { + serializedName: "meterId", + readOnly: true, + type: { + name: "Uuid" + } + }, + meterDetails: { + serializedName: "meterDetails", + type: { + name: "Composite", + className: "MeterDetails" + } + }, + unitOfMeasure: { + serializedName: "unitOfMeasure", + readOnly: true, + type: { + name: "String" + } + }, + includedQuantity: { + serializedName: "includedQuantity", + readOnly: true, + type: { + name: "Number" + } + }, + partNumber: { + serializedName: "partNumber", + readOnly: true, + type: { + name: "String" + } + }, + unitPrice: { + serializedName: "unitPrice", + readOnly: true, + type: { + name: "Number" + } + }, + currencyCode: { + serializedName: "currencyCode", + readOnly: true, + type: { + name: "String" + } + }, + offerId: { + serializedName: "offerId", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const MeterDetails: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MeterDetails", + modelProperties: { + meterName: { + serializedName: "meterName", + readOnly: true, + type: { + name: "String" + } + }, + meterCategory: { + serializedName: "meterCategory", + readOnly: true, + type: { + name: "String" + } + }, + meterSubCategory: { + serializedName: "meterSubCategory", + readOnly: true, + type: { + name: "String" + } + }, + unit: { + serializedName: "unit", + readOnly: true, + type: { + name: "String" + } + }, + meterLocation: { + serializedName: "meterLocation", + readOnly: true, + type: { + name: "String" + } + }, + totalIncludedQuantity: { + serializedName: "totalIncludedQuantity", + readOnly: true, + type: { + name: "Number" + } + }, + pretaxStandardRate: { + serializedName: "pretaxStandardRate", + readOnly: true, + type: { + name: "Number" + } + }, + serviceName: { + serializedName: "serviceName", + readOnly: true, + type: { + name: "String" + } + }, + serviceTier: { + serializedName: "serviceTier", readOnly: true, type: { name: "String" @@ -121,10 +236,10 @@ export const ErrorDetails: coreClient.CompositeMapper = { } }; -export const MarketplacesListResult: coreClient.CompositeMapper = { +export const OperationListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MarketplacesListResult", + className: "OperationListResult", modelProperties: { value: { serializedName: "value", @@ -134,7 +249,7 @@ export const MarketplacesListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "Marketplace" + className: "Operation" } } } @@ -150,4356 +265,129 @@ export const MarketplacesListResult: coreClient.CompositeMapper = { } }; -export const BudgetsListResult: coreClient.CompositeMapper = { +export const Operation: coreClient.CompositeMapper = { type: { name: "Composite", - className: "BudgetsListResult", + className: "Operation", modelProperties: { - value: { - serializedName: "value", + id: { + serializedName: "id", readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Budget" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", + name: { + serializedName: "name", readOnly: true, type: { name: "String" } - } - } - } -}; - -export const BudgetTimePeriod: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BudgetTimePeriod", - modelProperties: { - startDate: { - serializedName: "startDate", - required: true, - type: { - name: "DateTime" - } }, - endDate: { - serializedName: "endDate", + display: { + serializedName: "display", type: { - name: "DateTime" + name: "Composite", + className: "OperationDisplay" } } } } }; -export const BudgetFilter: coreClient.CompositeMapper = { +export const OperationDisplay: coreClient.CompositeMapper = { type: { name: "Composite", - className: "BudgetFilter", + className: "OperationDisplay", modelProperties: { - and: { - serializedName: "and", + provider: { + serializedName: "provider", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "BudgetFilterProperties" - } - } + name: "String" } }, - not: { - serializedName: "not", + resource: { + serializedName: "resource", + readOnly: true, type: { - name: "Composite", - className: "BudgetFilterProperties" + name: "String" } }, - dimensions: { - serializedName: "dimensions", + operation: { + serializedName: "operation", + readOnly: true, type: { - name: "Composite", - className: "BudgetComparisonExpression" + name: "String" } }, - tags: { - serializedName: "tags", + description: { + serializedName: "description", + readOnly: true, type: { - name: "Composite", - className: "BudgetComparisonExpression" + name: "String" } } } } }; -export const BudgetFilterProperties: coreClient.CompositeMapper = { +export const DownloadProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "BudgetFilterProperties", + className: "DownloadProperties", modelProperties: { - dimensions: { - serializedName: "dimensions", + downloadUrl: { + serializedName: "downloadUrl", + readOnly: true, type: { - name: "Composite", - className: "BudgetComparisonExpression" + name: "String" } }, - tags: { - serializedName: "tags", + validTill: { + serializedName: "validTill", + readOnly: true, type: { - name: "Composite", - className: "BudgetComparisonExpression" + name: "String" } } } } }; -export const BudgetComparisonExpression: coreClient.CompositeMapper = { +export const PriceSheetResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "BudgetComparisonExpression", + className: "PriceSheetResult", modelProperties: { - name: { - serializedName: "name", - required: true, - type: { - name: "String" - } - }, - operator: { - serializedName: "operator", - required: true, - type: { - name: "String" - } - }, - values: { - serializedName: "values", - required: true, + ...Resource.type.modelProperties, + pricesheets: { + serializedName: "properties.pricesheets", + readOnly: true, type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "PriceSheetProperties" } } } - } - } - } -}; - -export const CurrentSpend: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CurrentSpend", - modelProperties: { - amount: { - serializedName: "amount", + }, + nextLink: { + serializedName: "properties.nextLink", readOnly: true, type: { - name: "Number" + name: "String" } }, - unit: { - serializedName: "unit", - readOnly: true, + download: { + serializedName: "properties.download", type: { - name: "String" + name: "Composite", + className: "MeterDetails" } } } } }; - -export const Notification: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Notification", - modelProperties: { - enabled: { - serializedName: "enabled", - required: true, - type: { - name: "Boolean" - } - }, - operator: { - serializedName: "operator", - required: true, - type: { - name: "String" - } - }, - threshold: { - serializedName: "threshold", - required: true, - type: { - name: "Number" - } - }, - contactEmails: { - constraints: { - MaxItems: 50 - }, - serializedName: "contactEmails", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - contactRoles: { - serializedName: "contactRoles", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - contactGroups: { - constraints: { - MaxItems: 50 - }, - serializedName: "contactGroups", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - thresholdType: { - defaultValue: "Actual", - serializedName: "thresholdType", - type: { - name: "String" - } - }, - locale: { - serializedName: "locale", - type: { - name: "String" - } - } - } - } -}; - -export const ForecastSpend: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ForecastSpend", - modelProperties: { - amount: { - serializedName: "amount", - readOnly: true, - type: { - name: "Number" - } - }, - unit: { - serializedName: "unit", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const ProxyResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ProxyResource", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String" - } - }, - eTag: { - serializedName: "eTag", - type: { - name: "String" - } - } - } - } -}; - -export const Tag: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Tag", - modelProperties: { - key: { - serializedName: "key", - type: { - name: "String" - } - }, - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const ChargesListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ChargesListResult", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ChargeSummary" - } - } - } - } - } - } -}; - -export const BalancePropertiesNewPurchasesDetailsItem: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BalancePropertiesNewPurchasesDetailsItem", - modelProperties: { - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - value: { - serializedName: "value", - readOnly: true, - type: { - name: "Number" - } - } - } - } -}; - -export const BalancePropertiesAdjustmentDetailsItem: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BalancePropertiesAdjustmentDetailsItem", - modelProperties: { - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - value: { - serializedName: "value", - readOnly: true, - type: { - name: "Number" - } - } - } - } -}; - -export const ReservationSummariesListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ReservationSummariesListResult", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ReservationSummary" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const ReservationDetailsListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ReservationDetailsListResult", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ReservationDetail" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const ReservationRecommendationsListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ReservationRecommendationsListResult", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ReservationRecommendation" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String" - } - }, - previousLink: { - serializedName: "previousLink", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const ResourceAttributes: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ResourceAttributes", - modelProperties: { - location: { - serializedName: "location", - readOnly: true, - type: { - name: "String" - } - }, - sku: { - serializedName: "sku", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const ReservationRecommendationDetailsResourceProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ReservationRecommendationDetailsResourceProperties", - modelProperties: { - appliedScopes: { - serializedName: "appliedScopes", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - onDemandRate: { - serializedName: "onDemandRate", - readOnly: true, - type: { - name: "Number" - } - }, - product: { - serializedName: "product", - readOnly: true, - type: { - name: "String" - } - }, - region: { - serializedName: "region", - readOnly: true, - type: { - name: "String" - } - }, - reservationRate: { - serializedName: "reservationRate", - readOnly: true, - type: { - name: "Number" - } - }, - resourceType: { - serializedName: "resourceType", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const ReservationRecommendationDetailsSavingsProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ReservationRecommendationDetailsSavingsProperties", - modelProperties: { - calculatedSavings: { - serializedName: "calculatedSavings", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: - "ReservationRecommendationDetailsCalculatedSavingsProperties" - } - } - } - }, - lookBackPeriod: { - serializedName: "lookBackPeriod", - readOnly: true, - type: { - name: "Number" - } - }, - recommendedQuantity: { - serializedName: "recommendedQuantity", - readOnly: true, - type: { - name: "Number" - } - }, - reservationOrderTerm: { - serializedName: "reservationOrderTerm", - readOnly: true, - type: { - name: "String" - } - }, - savingsType: { - serializedName: "savingsType", - readOnly: true, - type: { - name: "String" - } - }, - unitOfMeasure: { - serializedName: "unitOfMeasure", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const ReservationRecommendationDetailsCalculatedSavingsProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ReservationRecommendationDetailsCalculatedSavingsProperties", - modelProperties: { - onDemandCost: { - serializedName: "onDemandCost", - readOnly: true, - type: { - name: "Number" - } - }, - overageCost: { - serializedName: "overageCost", - readOnly: true, - type: { - name: "Number" - } - }, - quantity: { - serializedName: "quantity", - readOnly: true, - type: { - name: "Number" - } - }, - reservationCost: { - serializedName: "reservationCost", - readOnly: true, - type: { - name: "Number" - } - }, - totalReservationCost: { - serializedName: "totalReservationCost", - readOnly: true, - type: { - name: "Number" - } - }, - reservedUnitCount: { - serializedName: "reservedUnitCount", - type: { - name: "Number" - } - }, - savings: { - serializedName: "savings", - readOnly: true, - type: { - name: "Number" - } - } - } - } -}; - -export const ReservationRecommendationDetailsUsageProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ReservationRecommendationDetailsUsageProperties", - modelProperties: { - firstConsumptionDate: { - serializedName: "firstConsumptionDate", - readOnly: true, - type: { - name: "String" - } - }, - lastConsumptionDate: { - serializedName: "lastConsumptionDate", - readOnly: true, - type: { - name: "String" - } - }, - lookBackUnitType: { - serializedName: "lookBackUnitType", - readOnly: true, - type: { - name: "String" - } - }, - usageData: { - serializedName: "usageData", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Number" - } - } - } - }, - usageGrain: { - serializedName: "usageGrain", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const HighCasedErrorResponse: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "HighCasedErrorResponse", - modelProperties: { - error: { - serializedName: "error", - type: { - name: "Composite", - className: "HighCasedErrorDetails" - } - } - } - } -}; - -export const HighCasedErrorDetails: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "HighCasedErrorDetails", - modelProperties: { - code: { - serializedName: "code", - readOnly: true, - type: { - name: "String" - } - }, - message: { - serializedName: "message", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const ReservationTransactionsListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ReservationTransactionsListResult", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ReservationTransaction" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const ReservationTransactionResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ReservationTransactionResource", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String" - } - }, - tags: { - serializedName: "tags", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const ModernReservationTransactionsListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ModernReservationTransactionsListResult", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ModernReservationTransaction" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const PriceSheetProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PriceSheetProperties", - modelProperties: { - billingPeriodId: { - serializedName: "billingPeriodId", - readOnly: true, - type: { - name: "String" - } - }, - meterId: { - serializedName: "meterId", - readOnly: true, - type: { - name: "Uuid" - } - }, - meterDetails: { - serializedName: "meterDetails", - type: { - name: "Composite", - className: "MeterDetails" - } - }, - unitOfMeasure: { - serializedName: "unitOfMeasure", - readOnly: true, - type: { - name: "String" - } - }, - includedQuantity: { - serializedName: "includedQuantity", - readOnly: true, - type: { - name: "Number" - } - }, - partNumber: { - serializedName: "partNumber", - readOnly: true, - type: { - name: "String" - } - }, - unitPrice: { - serializedName: "unitPrice", - readOnly: true, - type: { - name: "Number" - } - }, - currencyCode: { - serializedName: "currencyCode", - readOnly: true, - type: { - name: "String" - } - }, - offerId: { - serializedName: "offerId", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const MeterDetails: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MeterDetails", - modelProperties: { - meterName: { - serializedName: "meterName", - readOnly: true, - type: { - name: "String" - } - }, - meterCategory: { - serializedName: "meterCategory", - readOnly: true, - type: { - name: "String" - } - }, - meterSubCategory: { - serializedName: "meterSubCategory", - readOnly: true, - type: { - name: "String" - } - }, - unit: { - serializedName: "unit", - readOnly: true, - type: { - name: "String" - } - }, - meterLocation: { - serializedName: "meterLocation", - readOnly: true, - type: { - name: "String" - } - }, - totalIncludedQuantity: { - serializedName: "totalIncludedQuantity", - readOnly: true, - type: { - name: "Number" - } - }, - pretaxStandardRate: { - serializedName: "pretaxStandardRate", - readOnly: true, - type: { - name: "Number" - } - }, - serviceName: { - serializedName: "serviceName", - readOnly: true, - type: { - name: "String" - } - }, - serviceTier: { - serializedName: "serviceTier", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const OperationListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OperationListResult", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Operation" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const Operation: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Operation", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - display: { - serializedName: "display", - type: { - name: "Composite", - className: "OperationDisplay" - } - } - } - } -}; - -export const OperationDisplay: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OperationDisplay", - modelProperties: { - provider: { - serializedName: "provider", - readOnly: true, - type: { - name: "String" - } - }, - resource: { - serializedName: "resource", - readOnly: true, - type: { - name: "String" - } - }, - operation: { - serializedName: "operation", - readOnly: true, - type: { - name: "String" - } - }, - description: { - serializedName: "description", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const Events: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Events", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EventSummary" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const Amount: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Amount", - modelProperties: { - currency: { - serializedName: "currency", - readOnly: true, - type: { - name: "String" - } - }, - value: { - serializedName: "value", - readOnly: true, - type: { - name: "Number" - } - } - } - } -}; - -export const Reseller: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Reseller", - modelProperties: { - resellerId: { - serializedName: "resellerId", - readOnly: true, - type: { - name: "String" - } - }, - resellerDescription: { - serializedName: "resellerDescription", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const Lots: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Lots", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "LotSummary" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const CreditBalanceSummary: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CreditBalanceSummary", - modelProperties: { - estimatedBalance: { - serializedName: "estimatedBalance", - type: { - name: "Composite", - className: "Amount" - } - }, - currentBalance: { - serializedName: "currentBalance", - type: { - name: "Composite", - className: "Amount" - } - }, - estimatedBalanceInBillingCurrency: { - serializedName: "estimatedBalanceInBillingCurrency", - type: { - name: "Composite", - className: "AmountWithExchangeRate" - } - } - } - } -}; - -export const MeterDetailsResponse: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MeterDetailsResponse", - modelProperties: { - meterName: { - serializedName: "meterName", - readOnly: true, - type: { - name: "String" - } - }, - meterCategory: { - serializedName: "meterCategory", - readOnly: true, - type: { - name: "String" - } - }, - meterSubCategory: { - serializedName: "meterSubCategory", - readOnly: true, - type: { - name: "String" - } - }, - unitOfMeasure: { - serializedName: "unitOfMeasure", - readOnly: true, - type: { - name: "String" - } - }, - serviceFamily: { - serializedName: "serviceFamily", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const LegacyReservationRecommendationProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "LegacyReservationRecommendationProperties", - uberParent: "LegacyReservationRecommendationProperties", - polymorphicDiscriminator: { - serializedName: "scope", - clientName: "scope" - }, - modelProperties: { - lookBackPeriod: { - serializedName: "lookBackPeriod", - readOnly: true, - type: { - name: "String" - } - }, - instanceFlexibilityRatio: { - serializedName: "instanceFlexibilityRatio", - readOnly: true, - type: { - name: "Number" - } - }, - instanceFlexibilityGroup: { - serializedName: "instanceFlexibilityGroup", - readOnly: true, - type: { - name: "String" - } - }, - normalizedSize: { - serializedName: "normalizedSize", - readOnly: true, - type: { - name: "String" - } - }, - recommendedQuantityNormalized: { - serializedName: "recommendedQuantityNormalized", - readOnly: true, - type: { - name: "Number" - } - }, - meterId: { - serializedName: "meterId", - readOnly: true, - type: { - name: "Uuid" - } - }, - resourceType: { - serializedName: "resourceType", - readOnly: true, - type: { - name: "String" - } - }, - term: { - serializedName: "term", - readOnly: true, - type: { - name: "String" - } - }, - costWithNoReservedInstances: { - serializedName: "costWithNoReservedInstances", - readOnly: true, - type: { - name: "Number" - } - }, - recommendedQuantity: { - serializedName: "recommendedQuantity", - readOnly: true, - type: { - name: "Number" - } - }, - totalCostWithReservedInstances: { - serializedName: "totalCostWithReservedInstances", - readOnly: true, - type: { - name: "Number" - } - }, - netSavings: { - serializedName: "netSavings", - readOnly: true, - type: { - name: "Number" - } - }, - firstUsageDate: { - serializedName: "firstUsageDate", - readOnly: true, - type: { - name: "DateTime" - } - }, - scope: { - serializedName: "scope", - required: true, - type: { - name: "String" - } - }, - skuProperties: { - serializedName: "skuProperties", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SkuProperty" - } - } - } - } - } - } -}; - -export const SkuProperty: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SkuProperty", - modelProperties: { - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - value: { - serializedName: "value", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const DownloadProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DownloadProperties", - modelProperties: { - downloadUrl: { - serializedName: "downloadUrl", - readOnly: true, - type: { - name: "String" - } - }, - validTill: { - serializedName: "validTill", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const UsageDetail: coreClient.CompositeMapper = { - serializedName: "UsageDetail", - type: { - name: "Composite", - className: "UsageDetail", - uberParent: "Resource", - polymorphicDiscriminator: { - serializedName: "kind", - clientName: "kind" - }, - modelProperties: { - ...Resource.type.modelProperties, - kind: { - serializedName: "kind", - required: true, - type: { - name: "String" - } - } - } - } -}; - -export const Marketplace: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Marketplace", - modelProperties: { - ...Resource.type.modelProperties, - billingPeriodId: { - serializedName: "properties.billingPeriodId", - readOnly: true, - type: { - name: "String" - } - }, - usageStart: { - serializedName: "properties.usageStart", - readOnly: true, - type: { - name: "DateTime" - } - }, - usageEnd: { - serializedName: "properties.usageEnd", - readOnly: true, - type: { - name: "DateTime" - } - }, - resourceRate: { - serializedName: "properties.resourceRate", - readOnly: true, - type: { - name: "Number" - } - }, - offerName: { - serializedName: "properties.offerName", - readOnly: true, - type: { - name: "String" - } - }, - resourceGroup: { - serializedName: "properties.resourceGroup", - readOnly: true, - type: { - name: "String" - } - }, - additionalInfo: { - serializedName: "properties.additionalInfo", - readOnly: true, - type: { - name: "String" - } - }, - orderNumber: { - serializedName: "properties.orderNumber", - readOnly: true, - type: { - name: "String" - } - }, - instanceName: { - serializedName: "properties.instanceName", - readOnly: true, - type: { - name: "String" - } - }, - instanceId: { - serializedName: "properties.instanceId", - readOnly: true, - type: { - name: "String" - } - }, - currency: { - serializedName: "properties.currency", - readOnly: true, - type: { - name: "String" - } - }, - consumedQuantity: { - serializedName: "properties.consumedQuantity", - readOnly: true, - type: { - name: "Number" - } - }, - unitOfMeasure: { - serializedName: "properties.unitOfMeasure", - readOnly: true, - type: { - name: "String" - } - }, - pretaxCost: { - serializedName: "properties.pretaxCost", - readOnly: true, - type: { - name: "Number" - } - }, - isEstimated: { - serializedName: "properties.isEstimated", - readOnly: true, - type: { - name: "Boolean" - } - }, - meterId: { - serializedName: "properties.meterId", - readOnly: true, - type: { - name: "Uuid" - } - }, - subscriptionGuid: { - serializedName: "properties.subscriptionGuid", - readOnly: true, - type: { - name: "Uuid" - } - }, - subscriptionName: { - serializedName: "properties.subscriptionName", - readOnly: true, - type: { - name: "String" - } - }, - accountName: { - serializedName: "properties.accountName", - readOnly: true, - type: { - name: "String" - } - }, - departmentName: { - serializedName: "properties.departmentName", - readOnly: true, - type: { - name: "String" - } - }, - consumedService: { - serializedName: "properties.consumedService", - readOnly: true, - type: { - name: "String" - } - }, - costCenter: { - serializedName: "properties.costCenter", - readOnly: true, - type: { - name: "String" - } - }, - additionalProperties: { - serializedName: "properties.additionalProperties", - readOnly: true, - type: { - name: "String" - } - }, - publisherName: { - serializedName: "properties.publisherName", - readOnly: true, - type: { - name: "String" - } - }, - planName: { - serializedName: "properties.planName", - readOnly: true, - type: { - name: "String" - } - }, - isRecurringCharge: { - serializedName: "properties.isRecurringCharge", - readOnly: true, - type: { - name: "Boolean" - } - } - } - } -}; - -export const Balance: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Balance", - modelProperties: { - ...Resource.type.modelProperties, - currency: { - serializedName: "properties.currency", - readOnly: true, - type: { - name: "String" - } - }, - beginningBalance: { - serializedName: "properties.beginningBalance", - readOnly: true, - type: { - name: "Number" - } - }, - endingBalance: { - serializedName: "properties.endingBalance", - readOnly: true, - type: { - name: "Number" - } - }, - newPurchases: { - serializedName: "properties.newPurchases", - readOnly: true, - type: { - name: "Number" - } - }, - adjustments: { - serializedName: "properties.adjustments", - readOnly: true, - type: { - name: "Number" - } - }, - utilized: { - serializedName: "properties.utilized", - readOnly: true, - type: { - name: "Number" - } - }, - serviceOverage: { - serializedName: "properties.serviceOverage", - readOnly: true, - type: { - name: "Number" - } - }, - chargesBilledSeparately: { - serializedName: "properties.chargesBilledSeparately", - readOnly: true, - type: { - name: "Number" - } - }, - totalOverage: { - serializedName: "properties.totalOverage", - readOnly: true, - type: { - name: "Number" - } - }, - totalUsage: { - serializedName: "properties.totalUsage", - readOnly: true, - type: { - name: "Number" - } - }, - azureMarketplaceServiceCharges: { - serializedName: "properties.azureMarketplaceServiceCharges", - readOnly: true, - type: { - name: "Number" - } - }, - billingFrequency: { - serializedName: "properties.billingFrequency", - type: { - name: "String" - } - }, - priceHidden: { - serializedName: "properties.priceHidden", - readOnly: true, - type: { - name: "Boolean" - } - }, - newPurchasesDetails: { - serializedName: "properties.newPurchasesDetails", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "BalancePropertiesNewPurchasesDetailsItem" - } - } - } - }, - adjustmentDetails: { - serializedName: "properties.adjustmentDetails", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "BalancePropertiesAdjustmentDetailsItem" - } - } - } - } - } - } -}; - -export const ReservationSummary: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ReservationSummary", - modelProperties: { - ...Resource.type.modelProperties, - reservationOrderId: { - serializedName: "properties.reservationOrderId", - readOnly: true, - type: { - name: "String" - } - }, - reservationId: { - serializedName: "properties.reservationId", - readOnly: true, - type: { - name: "String" - } - }, - skuName: { - serializedName: "properties.skuName", - readOnly: true, - type: { - name: "String" - } - }, - reservedHours: { - serializedName: "properties.reservedHours", - readOnly: true, - type: { - name: "Number" - } - }, - usageDate: { - serializedName: "properties.usageDate", - readOnly: true, - type: { - name: "DateTime" - } - }, - usedHours: { - serializedName: "properties.usedHours", - readOnly: true, - type: { - name: "Number" - } - }, - minUtilizationPercentage: { - serializedName: "properties.minUtilizationPercentage", - readOnly: true, - type: { - name: "Number" - } - }, - avgUtilizationPercentage: { - serializedName: "properties.avgUtilizationPercentage", - readOnly: true, - type: { - name: "Number" - } - }, - maxUtilizationPercentage: { - serializedName: "properties.maxUtilizationPercentage", - readOnly: true, - type: { - name: "Number" - } - }, - kind: { - serializedName: "properties.kind", - readOnly: true, - type: { - name: "String" - } - }, - purchasedQuantity: { - serializedName: "properties.purchasedQuantity", - readOnly: true, - type: { - name: "Number" - } - }, - remainingQuantity: { - serializedName: "properties.remainingQuantity", - readOnly: true, - type: { - name: "Number" - } - }, - totalReservedQuantity: { - serializedName: "properties.totalReservedQuantity", - readOnly: true, - type: { - name: "Number" - } - }, - usedQuantity: { - serializedName: "properties.usedQuantity", - readOnly: true, - type: { - name: "Number" - } - }, - utilizedPercentage: { - serializedName: "properties.utilizedPercentage", - readOnly: true, - type: { - name: "Number" - } - } - } - } -}; - -export const ReservationDetail: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ReservationDetail", - modelProperties: { - ...Resource.type.modelProperties, - reservationOrderId: { - serializedName: "properties.reservationOrderId", - readOnly: true, - type: { - name: "String" - } - }, - instanceFlexibilityRatio: { - serializedName: "properties.instanceFlexibilityRatio", - readOnly: true, - type: { - name: "String" - } - }, - instanceFlexibilityGroup: { - serializedName: "properties.instanceFlexibilityGroup", - readOnly: true, - type: { - name: "String" - } - }, - reservationId: { - serializedName: "properties.reservationId", - readOnly: true, - type: { - name: "String" - } - }, - skuName: { - serializedName: "properties.skuName", - readOnly: true, - type: { - name: "String" - } - }, - reservedHours: { - serializedName: "properties.reservedHours", - readOnly: true, - type: { - name: "Number" - } - }, - usageDate: { - serializedName: "properties.usageDate", - readOnly: true, - type: { - name: "DateTime" - } - }, - usedHours: { - serializedName: "properties.usedHours", - readOnly: true, - type: { - name: "Number" - } - }, - instanceId: { - serializedName: "properties.instanceId", - readOnly: true, - type: { - name: "String" - } - }, - totalReservedQuantity: { - serializedName: "properties.totalReservedQuantity", - readOnly: true, - type: { - name: "Number" - } - }, - kind: { - serializedName: "properties.kind", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const ReservationRecommendation: coreClient.CompositeMapper = { - serializedName: "ReservationRecommendation", - type: { - name: "Composite", - className: "ReservationRecommendation", - uberParent: "Resource", - polymorphicDiscriminator: { - serializedName: "kind", - clientName: "kind" - }, - modelProperties: { - ...Resource.type.modelProperties, - ...ResourceAttributes.type.modelProperties, - kind: { - serializedName: "kind", - required: true, - type: { - name: "String" - } - } - } - } -}; - -export const ReservationRecommendationDetailsModel: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ReservationRecommendationDetailsModel", - modelProperties: { - ...Resource.type.modelProperties, - location: { - serializedName: "location", - type: { - name: "String" - } - }, - sku: { - serializedName: "sku", - type: { - name: "String" - } - }, - currency: { - serializedName: "properties.currency", - readOnly: true, - type: { - name: "String" - } - }, - resource: { - serializedName: "properties.resource", - type: { - name: "Composite", - className: "ReservationRecommendationDetailsResourceProperties" - } - }, - resourceGroup: { - serializedName: "properties.resourceGroup", - readOnly: true, - type: { - name: "String" - } - }, - savings: { - serializedName: "properties.savings", - type: { - name: "Composite", - className: "ReservationRecommendationDetailsSavingsProperties" - } - }, - scope: { - serializedName: "properties.scope", - readOnly: true, - type: { - name: "String" - } - }, - usage: { - serializedName: "properties.usage", - type: { - name: "Composite", - className: "ReservationRecommendationDetailsUsageProperties" - } - } - } - } -}; - -export const PriceSheetResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PriceSheetResult", - modelProperties: { - ...Resource.type.modelProperties, - pricesheets: { - serializedName: "properties.pricesheets", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PriceSheetProperties" - } - } - } - }, - nextLink: { - serializedName: "properties.nextLink", - readOnly: true, - type: { - name: "String" - } - }, - download: { - serializedName: "properties.download", - type: { - name: "Composite", - className: "MeterDetails" - } - } - } - } -}; - -export const ManagementGroupAggregatedCostResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagementGroupAggregatedCostResult", - modelProperties: { - ...Resource.type.modelProperties, - billingPeriodId: { - serializedName: "properties.billingPeriodId", - readOnly: true, - type: { - name: "String" - } - }, - usageStart: { - serializedName: "properties.usageStart", - readOnly: true, - type: { - name: "DateTime" - } - }, - usageEnd: { - serializedName: "properties.usageEnd", - readOnly: true, - type: { - name: "DateTime" - } - }, - azureCharges: { - serializedName: "properties.azureCharges", - readOnly: true, - type: { - name: "Number" - } - }, - marketplaceCharges: { - serializedName: "properties.marketplaceCharges", - readOnly: true, - type: { - name: "Number" - } - }, - chargesBilledSeparately: { - serializedName: "properties.chargesBilledSeparately", - readOnly: true, - type: { - name: "Number" - } - }, - currency: { - serializedName: "properties.currency", - readOnly: true, - 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", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const CreditSummary: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CreditSummary", - modelProperties: { - ...Resource.type.modelProperties, - balanceSummary: { - serializedName: "properties.balanceSummary", - type: { - name: "Composite", - className: "CreditBalanceSummary" - } - }, - pendingCreditAdjustments: { - serializedName: "properties.pendingCreditAdjustments", - type: { - name: "Composite", - className: "Amount" - } - }, - expiredCredit: { - serializedName: "properties.expiredCredit", - type: { - name: "Composite", - className: "Amount" - } - }, - pendingEligibleCharges: { - serializedName: "properties.pendingEligibleCharges", - type: { - name: "Composite", - className: "Amount" - } - }, - creditCurrency: { - serializedName: "properties.creditCurrency", - readOnly: true, - type: { - name: "String" - } - }, - billingCurrency: { - serializedName: "properties.billingCurrency", - readOnly: true, - type: { - name: "String" - } - }, - reseller: { - serializedName: "properties.reseller", - type: { - name: "Composite", - className: "Reseller" - } - }, - eTag: { - serializedName: "properties.eTag", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const Budget: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Budget", - modelProperties: { - ...ProxyResource.type.modelProperties, - category: { - serializedName: "properties.category", - type: { - name: "String" - } - }, - amount: { - serializedName: "properties.amount", - type: { - name: "Number" - } - }, - timeGrain: { - serializedName: "properties.timeGrain", - type: { - name: "String" - } - }, - timePeriod: { - serializedName: "properties.timePeriod", - type: { - name: "Composite", - className: "BudgetTimePeriod" - } - }, - filter: { - serializedName: "properties.filter", - type: { - name: "Composite", - className: "BudgetFilter" - } - }, - currentSpend: { - serializedName: "properties.currentSpend", - type: { - name: "Composite", - className: "CurrentSpend" - } - }, - notifications: { - serializedName: "properties.notifications", - type: { - name: "Dictionary", - value: { type: { name: "Composite", className: "Notification" } } - } - }, - forecastSpend: { - serializedName: "properties.forecastSpend", - type: { - name: "Composite", - className: "ForecastSpend" - } - } - } - } -}; - -export const TagsResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "TagsResult", - modelProperties: { - ...ProxyResource.type.modelProperties, - tags: { - serializedName: "properties.tags", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Tag" - } - } - } - }, - nextLink: { - serializedName: "properties.nextLink", - readOnly: true, - type: { - name: "String" - } - }, - previousLink: { - serializedName: "properties.previousLink", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const ChargeSummary: coreClient.CompositeMapper = { - serializedName: "ChargeSummary", - type: { - name: "Composite", - className: "ChargeSummary", - uberParent: "ProxyResource", - polymorphicDiscriminator: { - serializedName: "kind", - clientName: "kind" - }, - modelProperties: { - ...ProxyResource.type.modelProperties, - kind: { - serializedName: "kind", - required: true, - type: { - name: "String" - } - } - } - } -}; - -export const EventSummary: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "EventSummary", - modelProperties: { - ...ProxyResource.type.modelProperties, - transactionDate: { - serializedName: "properties.transactionDate", - readOnly: true, - type: { - name: "DateTime" - } - }, - description: { - serializedName: "properties.description", - readOnly: true, - type: { - name: "String" - } - }, - newCredit: { - serializedName: "properties.newCredit", - type: { - name: "Composite", - className: "Amount" - } - }, - adjustments: { - serializedName: "properties.adjustments", - type: { - name: "Composite", - className: "Amount" - } - }, - creditExpired: { - serializedName: "properties.creditExpired", - type: { - name: "Composite", - className: "Amount" - } - }, - charges: { - serializedName: "properties.charges", - type: { - name: "Composite", - className: "Amount" - } - }, - closedBalance: { - serializedName: "properties.closedBalance", - type: { - name: "Composite", - className: "Amount" - } - }, - eventType: { - serializedName: "properties.eventType", - type: { - name: "String" - } - }, - invoiceNumber: { - serializedName: "properties.invoiceNumber", - readOnly: true, - type: { - name: "String" - } - }, - billingProfileId: { - serializedName: "properties.billingProfileId", - readOnly: true, - type: { - name: "String" - } - }, - billingProfileDisplayName: { - serializedName: "properties.billingProfileDisplayName", - readOnly: true, - type: { - name: "String" - } - }, - lotId: { - serializedName: "properties.lotId", - readOnly: true, - type: { - name: "String" - } - }, - lotSource: { - serializedName: "properties.lotSource", - readOnly: true, - type: { - name: "String" - } - }, - canceledCredit: { - serializedName: "properties.canceledCredit", - type: { - name: "Composite", - className: "Amount" - } - }, - creditCurrency: { - serializedName: "properties.creditCurrency", - readOnly: true, - type: { - name: "String" - } - }, - billingCurrency: { - serializedName: "properties.billingCurrency", - readOnly: true, - type: { - name: "String" - } - }, - reseller: { - serializedName: "properties.reseller", - type: { - name: "Composite", - className: "Reseller" - } - }, - creditExpiredInBillingCurrency: { - serializedName: "properties.creditExpiredInBillingCurrency", - type: { - name: "Composite", - className: "AmountWithExchangeRate" - } - }, - newCreditInBillingCurrency: { - serializedName: "properties.newCreditInBillingCurrency", - type: { - name: "Composite", - className: "AmountWithExchangeRate" - } - }, - adjustmentsInBillingCurrency: { - serializedName: "properties.adjustmentsInBillingCurrency", - type: { - name: "Composite", - className: "AmountWithExchangeRate" - } - }, - chargesInBillingCurrency: { - serializedName: "properties.chargesInBillingCurrency", - type: { - name: "Composite", - className: "AmountWithExchangeRate" - } - }, - closedBalanceInBillingCurrency: { - serializedName: "properties.closedBalanceInBillingCurrency", - type: { - name: "Composite", - className: "AmountWithExchangeRate" - } - }, - eTagPropertiesETag: { - serializedName: "properties.eTag", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const LotSummary: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "LotSummary", - modelProperties: { - ...ProxyResource.type.modelProperties, - originalAmount: { - serializedName: "properties.originalAmount", - type: { - name: "Composite", - className: "Amount" - } - }, - closedBalance: { - serializedName: "properties.closedBalance", - type: { - name: "Composite", - className: "Amount" - } - }, - source: { - serializedName: "properties.source", - readOnly: true, - type: { - name: "String" - } - }, - startDate: { - serializedName: "properties.startDate", - readOnly: true, - type: { - name: "DateTime" - } - }, - expirationDate: { - serializedName: "properties.expirationDate", - readOnly: true, - type: { - name: "DateTime" - } - }, - poNumber: { - serializedName: "properties.poNumber", - readOnly: true, - type: { - name: "String" - } - }, - purchasedDate: { - serializedName: "properties.purchasedDate", - readOnly: true, - type: { - name: "DateTime" - } - }, - status: { - serializedName: "properties.status", - readOnly: true, - type: { - name: "String" - } - }, - creditCurrency: { - serializedName: "properties.creditCurrency", - readOnly: true, - type: { - name: "String" - } - }, - billingCurrency: { - serializedName: "properties.billingCurrency", - readOnly: true, - type: { - name: "String" - } - }, - originalAmountInBillingCurrency: { - serializedName: "properties.originalAmountInBillingCurrency", - type: { - name: "Composite", - className: "AmountWithExchangeRate" - } - }, - closedBalanceInBillingCurrency: { - serializedName: "properties.closedBalanceInBillingCurrency", - type: { - name: "Composite", - className: "AmountWithExchangeRate" - } - }, - reseller: { - serializedName: "properties.reseller", - type: { - name: "Composite", - className: "Reseller" - } - }, - eTagPropertiesETag: { - serializedName: "properties.eTag", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const ReservationTransaction: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ReservationTransaction", - modelProperties: { - ...ReservationTransactionResource.type.modelProperties, - eventDate: { - serializedName: "properties.eventDate", - readOnly: true, - type: { - name: "DateTime" - } - }, - reservationOrderId: { - serializedName: "properties.reservationOrderId", - readOnly: true, - type: { - name: "String" - } - }, - description: { - serializedName: "properties.description", - readOnly: true, - type: { - name: "String" - } - }, - eventType: { - serializedName: "properties.eventType", - readOnly: true, - type: { - name: "String" - } - }, - quantity: { - serializedName: "properties.quantity", - readOnly: true, - type: { - name: "Number" - } - }, - amount: { - serializedName: "properties.amount", - readOnly: true, - type: { - name: "Number" - } - }, - currency: { - serializedName: "properties.currency", - readOnly: true, - type: { - name: "String" - } - }, - reservationOrderName: { - serializedName: "properties.reservationOrderName", - readOnly: true, - type: { - name: "String" - } - }, - purchasingEnrollment: { - serializedName: "properties.purchasingEnrollment", - readOnly: true, - type: { - name: "String" - } - }, - purchasingSubscriptionGuid: { - serializedName: "properties.purchasingSubscriptionGuid", - readOnly: true, - type: { - name: "Uuid" - } - }, - purchasingSubscriptionName: { - serializedName: "properties.purchasingSubscriptionName", - readOnly: true, - type: { - name: "String" - } - }, - armSkuName: { - serializedName: "properties.armSkuName", - readOnly: true, - type: { - name: "String" - } - }, - term: { - serializedName: "properties.term", - readOnly: true, - type: { - name: "String" - } - }, - region: { - serializedName: "properties.region", - readOnly: true, - type: { - name: "String" - } - }, - accountName: { - serializedName: "properties.accountName", - readOnly: true, - type: { - name: "String" - } - }, - accountOwnerEmail: { - serializedName: "properties.accountOwnerEmail", - readOnly: true, - type: { - name: "String" - } - }, - departmentName: { - serializedName: "properties.departmentName", - readOnly: true, - type: { - name: "String" - } - }, - costCenter: { - serializedName: "properties.costCenter", - readOnly: true, - type: { - name: "String" - } - }, - currentEnrollment: { - serializedName: "properties.currentEnrollment", - readOnly: true, - type: { - name: "String" - } - }, - billingFrequency: { - serializedName: "properties.billingFrequency", - readOnly: true, - type: { - name: "String" - } - }, - billingMonth: { - serializedName: "properties.billingMonth", - readOnly: true, - type: { - name: "Number" - } - }, - monetaryCommitment: { - serializedName: "properties.monetaryCommitment", - readOnly: true, - type: { - name: "Number" - } - }, - overage: { - serializedName: "properties.overage", - readOnly: true, - type: { - name: "Number" - } - } - } - } -}; - -export const ModernReservationTransaction: coreClient.CompositeMapper = { - serializedName: "Modern", - type: { - name: "Composite", - className: "ModernReservationTransaction", - modelProperties: { - ...ReservationTransactionResource.type.modelProperties, - amount: { - serializedName: "properties.amount", - readOnly: true, - type: { - name: "Number" - } - }, - armSkuName: { - serializedName: "properties.armSkuName", - readOnly: true, - type: { - name: "String" - } - }, - billingFrequency: { - serializedName: "properties.billingFrequency", - readOnly: true, - type: { - name: "String" - } - }, - billingProfileId: { - serializedName: "properties.billingProfileId", - readOnly: true, - type: { - name: "String" - } - }, - billingProfileName: { - serializedName: "properties.billingProfileName", - readOnly: true, - type: { - name: "String" - } - }, - currency: { - serializedName: "properties.currency", - readOnly: true, - type: { - name: "String" - } - }, - description: { - serializedName: "properties.description", - readOnly: true, - type: { - name: "String" - } - }, - eventDate: { - serializedName: "properties.eventDate", - readOnly: true, - type: { - name: "DateTime" - } - }, - eventType: { - serializedName: "properties.eventType", - readOnly: true, - type: { - name: "String" - } - }, - invoice: { - serializedName: "properties.invoice", - readOnly: true, - type: { - name: "String" - } - }, - invoiceId: { - serializedName: "properties.invoiceId", - readOnly: true, - type: { - name: "String" - } - }, - invoiceSectionId: { - serializedName: "properties.invoiceSectionId", - readOnly: true, - type: { - name: "String" - } - }, - invoiceSectionName: { - serializedName: "properties.invoiceSectionName", - readOnly: true, - type: { - name: "String" - } - }, - purchasingSubscriptionGuid: { - serializedName: "properties.purchasingSubscriptionGuid", - readOnly: true, - type: { - name: "Uuid" - } - }, - purchasingSubscriptionName: { - serializedName: "properties.purchasingSubscriptionName", - readOnly: true, - type: { - name: "String" - } - }, - quantity: { - serializedName: "properties.quantity", - readOnly: true, - type: { - name: "Number" - } - }, - region: { - serializedName: "properties.region", - readOnly: true, - type: { - name: "String" - } - }, - reservationOrderId: { - serializedName: "properties.reservationOrderId", - readOnly: true, - type: { - name: "String" - } - }, - reservationOrderName: { - serializedName: "properties.reservationOrderName", - readOnly: true, - type: { - name: "String" - } - }, - term: { - serializedName: "properties.term", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const AmountWithExchangeRate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AmountWithExchangeRate", - modelProperties: { - ...Amount.type.modelProperties, - exchangeRate: { - serializedName: "exchangeRate", - readOnly: true, - type: { - name: "Number" - } - }, - exchangeRateMonth: { - serializedName: "exchangeRateMonth", - readOnly: true, - type: { - name: "Number" - } - } - } - } -}; - -export const LegacySingleScopeReservationRecommendationProperties: coreClient.CompositeMapper = { - serializedName: "Single", - type: { - name: "Composite", - className: "LegacySingleScopeReservationRecommendationProperties", - uberParent: "LegacyReservationRecommendationProperties", - polymorphicDiscriminator: - LegacyReservationRecommendationProperties.type.polymorphicDiscriminator, - modelProperties: { - ...LegacyReservationRecommendationProperties.type.modelProperties, - subscriptionId: { - serializedName: "subscriptionId", - readOnly: true, - type: { - name: "Uuid" - } - } - } - } -}; - -export const LegacySharedScopeReservationRecommendationProperties: coreClient.CompositeMapper = { - serializedName: "Shared", - type: { - name: "Composite", - className: "LegacySharedScopeReservationRecommendationProperties", - uberParent: "LegacyReservationRecommendationProperties", - polymorphicDiscriminator: - LegacyReservationRecommendationProperties.type.polymorphicDiscriminator, - modelProperties: { - ...LegacyReservationRecommendationProperties.type.modelProperties - } - } -}; - -export const LegacyUsageDetail: coreClient.CompositeMapper = { - serializedName: "legacy", - type: { - name: "Composite", - className: "LegacyUsageDetail", - uberParent: "UsageDetail", - polymorphicDiscriminator: UsageDetail.type.polymorphicDiscriminator, - modelProperties: { - ...UsageDetail.type.modelProperties, - billingAccountId: { - serializedName: "properties.billingAccountId", - readOnly: true, - type: { - name: "String" - } - }, - billingAccountName: { - serializedName: "properties.billingAccountName", - readOnly: true, - type: { - name: "String" - } - }, - billingPeriodStartDate: { - serializedName: "properties.billingPeriodStartDate", - readOnly: true, - type: { - name: "DateTime" - } - }, - billingPeriodEndDate: { - serializedName: "properties.billingPeriodEndDate", - readOnly: true, - type: { - name: "DateTime" - } - }, - billingProfileId: { - serializedName: "properties.billingProfileId", - readOnly: true, - type: { - name: "String" - } - }, - billingProfileName: { - serializedName: "properties.billingProfileName", - readOnly: true, - type: { - name: "String" - } - }, - accountOwnerId: { - serializedName: "properties.accountOwnerId", - readOnly: true, - type: { - name: "String" - } - }, - accountName: { - serializedName: "properties.accountName", - readOnly: true, - type: { - name: "String" - } - }, - subscriptionId: { - serializedName: "properties.subscriptionId", - readOnly: true, - type: { - name: "String" - } - }, - subscriptionName: { - serializedName: "properties.subscriptionName", - readOnly: true, - type: { - name: "String" - } - }, - date: { - serializedName: "properties.date", - readOnly: true, - type: { - name: "DateTime" - } - }, - product: { - serializedName: "properties.product", - readOnly: true, - type: { - name: "String" - } - }, - partNumber: { - serializedName: "properties.partNumber", - readOnly: true, - type: { - name: "String" - } - }, - meterId: { - serializedName: "properties.meterId", - readOnly: true, - type: { - name: "Uuid" - } - }, - meterDetails: { - serializedName: "properties.meterDetails", - type: { - name: "Composite", - className: "MeterDetailsResponse" - } - }, - quantity: { - serializedName: "properties.quantity", - readOnly: true, - type: { - name: "Number" - } - }, - effectivePrice: { - serializedName: "properties.effectivePrice", - readOnly: true, - type: { - name: "Number" - } - }, - cost: { - serializedName: "properties.cost", - readOnly: true, - type: { - name: "Number" - } - }, - unitPrice: { - serializedName: "properties.unitPrice", - readOnly: true, - type: { - name: "Number" - } - }, - billingCurrency: { - serializedName: "properties.billingCurrency", - readOnly: true, - type: { - name: "String" - } - }, - resourceLocation: { - serializedName: "properties.resourceLocation", - readOnly: true, - type: { - name: "String" - } - }, - consumedService: { - serializedName: "properties.consumedService", - readOnly: true, - type: { - name: "String" - } - }, - resourceId: { - serializedName: "properties.resourceId", - readOnly: true, - type: { - name: "String" - } - }, - resourceName: { - serializedName: "properties.resourceName", - readOnly: true, - type: { - name: "String" - } - }, - serviceInfo1: { - serializedName: "properties.serviceInfo1", - readOnly: true, - type: { - name: "String" - } - }, - serviceInfo2: { - serializedName: "properties.serviceInfo2", - readOnly: true, - type: { - name: "String" - } - }, - additionalInfo: { - serializedName: "properties.additionalInfo", - readOnly: true, - type: { - name: "String" - } - }, - invoiceSection: { - serializedName: "properties.invoiceSection", - readOnly: true, - type: { - name: "String" - } - }, - costCenter: { - serializedName: "properties.costCenter", - readOnly: true, - type: { - name: "String" - } - }, - resourceGroup: { - serializedName: "properties.resourceGroup", - readOnly: true, - type: { - name: "String" - } - }, - reservationId: { - serializedName: "properties.reservationId", - readOnly: true, - type: { - name: "String" - } - }, - reservationName: { - serializedName: "properties.reservationName", - readOnly: true, - type: { - name: "String" - } - }, - productOrderId: { - serializedName: "properties.productOrderId", - readOnly: true, - type: { - name: "String" - } - }, - productOrderName: { - serializedName: "properties.productOrderName", - readOnly: true, - type: { - name: "String" - } - }, - offerId: { - serializedName: "properties.offerId", - readOnly: true, - type: { - name: "String" - } - }, - isAzureCreditEligible: { - serializedName: "properties.isAzureCreditEligible", - readOnly: true, - type: { - name: "Boolean" - } - }, - term: { - serializedName: "properties.term", - readOnly: true, - type: { - name: "String" - } - }, - publisherName: { - serializedName: "properties.publisherName", - readOnly: true, - type: { - name: "String" - } - }, - publisherType: { - serializedName: "properties.publisherType", - readOnly: true, - type: { - name: "String" - } - }, - planName: { - serializedName: "properties.planName", - readOnly: true, - type: { - name: "String" - } - }, - chargeType: { - serializedName: "properties.chargeType", - readOnly: true, - type: { - name: "String" - } - }, - frequency: { - serializedName: "properties.frequency", - readOnly: true, - type: { - name: "String" - } - }, - payGPrice: { - serializedName: "properties.payGPrice", - readOnly: true, - type: { - name: "Number" - } - }, - pricingModel: { - serializedName: "properties.pricingModel", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const ModernUsageDetail: coreClient.CompositeMapper = { - serializedName: "modern", - type: { - name: "Composite", - className: "ModernUsageDetail", - uberParent: "UsageDetail", - polymorphicDiscriminator: UsageDetail.type.polymorphicDiscriminator, - modelProperties: { - ...UsageDetail.type.modelProperties, - billingAccountId: { - serializedName: "properties.billingAccountId", - readOnly: true, - type: { - name: "String" - } - }, - effectivePrice: { - serializedName: "properties.effectivePrice", - readOnly: true, - type: { - name: "Number" - } - }, - pricingModel: { - serializedName: "properties.pricingModel", - readOnly: true, - type: { - name: "String" - } - }, - billingAccountName: { - serializedName: "properties.billingAccountName", - readOnly: true, - type: { - name: "String" - } - }, - billingPeriodStartDate: { - serializedName: "properties.billingPeriodStartDate", - readOnly: true, - type: { - name: "DateTime" - } - }, - billingPeriodEndDate: { - serializedName: "properties.billingPeriodEndDate", - readOnly: true, - type: { - name: "DateTime" - } - }, - billingProfileId: { - serializedName: "properties.billingProfileId", - readOnly: true, - type: { - name: "String" - } - }, - billingProfileName: { - serializedName: "properties.billingProfileName", - readOnly: true, - type: { - name: "String" - } - }, - subscriptionGuid: { - serializedName: "properties.subscriptionGuid", - readOnly: true, - type: { - name: "String" - } - }, - subscriptionName: { - serializedName: "properties.subscriptionName", - readOnly: true, - type: { - name: "String" - } - }, - date: { - serializedName: "properties.date", - readOnly: true, - type: { - name: "DateTime" - } - }, - product: { - serializedName: "properties.product", - readOnly: true, - type: { - name: "String" - } - }, - meterId: { - serializedName: "properties.meterId", - readOnly: true, - type: { - name: "Uuid" - } - }, - meterName: { - serializedName: "properties.meterName", - readOnly: true, - type: { - name: "String" - } - }, - meterRegion: { - serializedName: "properties.meterRegion", - readOnly: true, - type: { - name: "String" - } - }, - meterCategory: { - serializedName: "properties.meterCategory", - readOnly: true, - type: { - name: "String" - } - }, - meterSubCategory: { - serializedName: "properties.meterSubCategory", - readOnly: true, - type: { - name: "String" - } - }, - serviceFamily: { - serializedName: "properties.serviceFamily", - readOnly: true, - type: { - name: "String" - } - }, - quantity: { - serializedName: "properties.quantity", - readOnly: true, - type: { - name: "Number" - } - }, - unitOfMeasure: { - serializedName: "properties.unitOfMeasure", - readOnly: true, - type: { - name: "String" - } - }, - instanceName: { - serializedName: "properties.instanceName", - readOnly: true, - type: { - name: "String" - } - }, - costInUSD: { - serializedName: "properties.costInUSD", - readOnly: true, - type: { - name: "Number" - } - }, - unitPrice: { - serializedName: "properties.unitPrice", - readOnly: true, - type: { - name: "Number" - } - }, - billingCurrencyCode: { - serializedName: "properties.billingCurrencyCode", - readOnly: true, - type: { - name: "String" - } - }, - resourceLocation: { - serializedName: "properties.resourceLocation", - readOnly: true, - type: { - name: "String" - } - }, - consumedService: { - serializedName: "properties.consumedService", - readOnly: true, - type: { - name: "String" - } - }, - serviceInfo1: { - serializedName: "properties.serviceInfo1", - readOnly: true, - type: { - name: "String" - } - }, - serviceInfo2: { - serializedName: "properties.serviceInfo2", - readOnly: true, - type: { - name: "String" - } - }, - additionalInfo: { - serializedName: "properties.additionalInfo", - readOnly: true, - type: { - name: "String" - } - }, - invoiceSectionId: { - serializedName: "properties.invoiceSectionId", - readOnly: true, - type: { - name: "String" - } - }, - invoiceSectionName: { - serializedName: "properties.invoiceSectionName", - readOnly: true, - type: { - name: "String" - } - }, - costCenter: { - serializedName: "properties.costCenter", - readOnly: true, - type: { - name: "String" - } - }, - resourceGroup: { - serializedName: "properties.resourceGroup", - readOnly: true, - type: { - name: "String" - } - }, - reservationId: { - serializedName: "properties.reservationId", - readOnly: true, - type: { - name: "String" - } - }, - reservationName: { - serializedName: "properties.reservationName", - readOnly: true, - type: { - name: "String" - } - }, - productOrderId: { - serializedName: "properties.productOrderId", - readOnly: true, - type: { - name: "String" - } - }, - productOrderName: { - serializedName: "properties.productOrderName", - readOnly: true, - type: { - name: "String" - } - }, - isAzureCreditEligible: { - serializedName: "properties.isAzureCreditEligible", - readOnly: true, - type: { - name: "Boolean" - } - }, - term: { - serializedName: "properties.term", - readOnly: true, - type: { - name: "String" - } - }, - publisherName: { - serializedName: "properties.publisherName", - readOnly: true, - type: { - name: "String" - } - }, - publisherType: { - serializedName: "properties.publisherType", - readOnly: true, - type: { - name: "String" - } - }, - chargeType: { - serializedName: "properties.chargeType", - readOnly: true, - type: { - name: "String" - } - }, - frequency: { - serializedName: "properties.frequency", - readOnly: true, - type: { - name: "String" - } - }, - costInBillingCurrency: { - serializedName: "properties.costInBillingCurrency", - readOnly: true, - type: { - name: "Number" - } - }, - costInPricingCurrency: { - serializedName: "properties.costInPricingCurrency", - readOnly: true, - type: { - name: "Number" - } - }, - exchangeRate: { - serializedName: "properties.exchangeRate", - readOnly: true, - type: { - name: "String" - } - }, - exchangeRateDate: { - serializedName: "properties.exchangeRateDate", - readOnly: true, - type: { - name: "DateTime" - } - }, - invoiceId: { - serializedName: "properties.invoiceId", - readOnly: true, - type: { - name: "String" - } - }, - previousInvoiceId: { - serializedName: "properties.previousInvoiceId", - readOnly: true, - type: { - name: "String" - } - }, - pricingCurrencyCode: { - serializedName: "properties.pricingCurrencyCode", - readOnly: true, - type: { - name: "String" - } - }, - productIdentifier: { - serializedName: "properties.productIdentifier", - readOnly: true, - type: { - name: "String" - } - }, - resourceLocationNormalized: { - serializedName: "properties.resourceLocationNormalized", - readOnly: true, - type: { - name: "String" - } - }, - servicePeriodStartDate: { - serializedName: "properties.servicePeriodStartDate", - readOnly: true, - type: { - name: "DateTime" - } - }, - servicePeriodEndDate: { - serializedName: "properties.servicePeriodEndDate", - readOnly: true, - type: { - name: "DateTime" - } - }, - customerTenantId: { - serializedName: "properties.customerTenantId", - readOnly: true, - type: { - name: "String" - } - }, - customerName: { - serializedName: "properties.customerName", - readOnly: true, - type: { - name: "String" - } - }, - partnerTenantId: { - serializedName: "properties.partnerTenantId", - readOnly: true, - type: { - name: "String" - } - }, - partnerName: { - serializedName: "properties.partnerName", - readOnly: true, - type: { - name: "String" - } - }, - resellerMpnId: { - serializedName: "properties.resellerMpnId", - readOnly: true, - type: { - name: "String" - } - }, - resellerName: { - serializedName: "properties.resellerName", - readOnly: true, - type: { - name: "String" - } - }, - publisherId: { - serializedName: "properties.publisherId", - readOnly: true, - type: { - name: "String" - } - }, - marketPrice: { - serializedName: "properties.marketPrice", - readOnly: true, - type: { - name: "Number" - } - }, - exchangeRatePricingToBilling: { - serializedName: "properties.exchangeRatePricingToBilling", - readOnly: true, - type: { - name: "Number" - } - }, - paygCostInBillingCurrency: { - serializedName: "properties.paygCostInBillingCurrency", - readOnly: true, - type: { - name: "Number" - } - }, - paygCostInUSD: { - serializedName: "properties.paygCostInUSD", - readOnly: true, - type: { - name: "Number" - } - }, - partnerEarnedCreditRate: { - serializedName: "properties.partnerEarnedCreditRate", - readOnly: true, - type: { - name: "Number" - } - }, - partnerEarnedCreditApplied: { - serializedName: "properties.partnerEarnedCreditApplied", - readOnly: true, - type: { - name: "String" - } - }, - payGPrice: { - serializedName: "properties.payGPrice", - readOnly: true, - type: { - name: "Number" - } - }, - benefitId: { - serializedName: "properties.benefitId", - readOnly: true, - type: { - name: "String" - } - }, - benefitName: { - serializedName: "properties.benefitName", - readOnly: true, - type: { - name: "String" - } - }, - provider: { - serializedName: "properties.provider", - readOnly: true, - type: { - name: "String" - } - }, - costAllocationRuleName: { - serializedName: "properties.costAllocationRuleName", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const LegacyReservationRecommendation: coreClient.CompositeMapper = { - serializedName: "legacy", - type: { - name: "Composite", - className: "LegacyReservationRecommendation", - uberParent: "ReservationRecommendation", - polymorphicDiscriminator: - ReservationRecommendation.type.polymorphicDiscriminator, - modelProperties: { - ...ReservationRecommendation.type.modelProperties, - lookBackPeriod: { - serializedName: "properties.lookBackPeriod", - readOnly: true, - type: { - name: "String" - } - }, - instanceFlexibilityRatio: { - serializedName: "properties.instanceFlexibilityRatio", - readOnly: true, - type: { - name: "Number" - } - }, - instanceFlexibilityGroup: { - serializedName: "properties.instanceFlexibilityGroup", - readOnly: true, - type: { - name: "String" - } - }, - normalizedSize: { - serializedName: "properties.normalizedSize", - readOnly: true, - type: { - name: "String" - } - }, - recommendedQuantityNormalized: { - serializedName: "properties.recommendedQuantityNormalized", - readOnly: true, - type: { - name: "Number" - } - }, - meterId: { - serializedName: "properties.meterId", - readOnly: true, - type: { - name: "Uuid" - } - }, - resourceType: { - serializedName: "properties.resourceType", - readOnly: true, - type: { - name: "String" - } - }, - term: { - serializedName: "properties.term", - readOnly: true, - type: { - name: "String" - } - }, - costWithNoReservedInstances: { - serializedName: "properties.costWithNoReservedInstances", - readOnly: true, - type: { - name: "Number" - } - }, - recommendedQuantity: { - serializedName: "properties.recommendedQuantity", - readOnly: true, - type: { - name: "Number" - } - }, - totalCostWithReservedInstances: { - serializedName: "properties.totalCostWithReservedInstances", - readOnly: true, - type: { - name: "Number" - } - }, - netSavings: { - serializedName: "properties.netSavings", - readOnly: true, - type: { - name: "Number" - } - }, - firstUsageDate: { - serializedName: "properties.firstUsageDate", - readOnly: true, - type: { - name: "DateTime" - } - }, - scope: { - serializedName: "properties.scope", - required: true, - type: { - name: "String" - } - }, - skuProperties: { - serializedName: "properties.skuProperties", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SkuProperty" - } - } - } - } - } - } -}; - -export const ModernReservationRecommendation: coreClient.CompositeMapper = { - serializedName: "modern", - type: { - name: "Composite", - className: "ModernReservationRecommendation", - uberParent: "ReservationRecommendation", - polymorphicDiscriminator: - ReservationRecommendation.type.polymorphicDiscriminator, - modelProperties: { - ...ReservationRecommendation.type.modelProperties, - locationPropertiesLocation: { - serializedName: "properties.location", - readOnly: true, - type: { - name: "String" - } - }, - lookBackPeriod: { - serializedName: "properties.lookBackPeriod", - readOnly: true, - type: { - name: "Number" - } - }, - instanceFlexibilityRatio: { - serializedName: "properties.instanceFlexibilityRatio", - readOnly: true, - type: { - name: "Number" - } - }, - instanceFlexibilityGroup: { - serializedName: "properties.instanceFlexibilityGroup", - readOnly: true, - type: { - name: "String" - } - }, - normalizedSize: { - serializedName: "properties.normalizedSize", - readOnly: true, - type: { - name: "String" - } - }, - recommendedQuantityNormalized: { - serializedName: "properties.recommendedQuantityNormalized", - readOnly: true, - type: { - name: "Number" - } - }, - meterId: { - serializedName: "properties.meterId", - readOnly: true, - type: { - name: "Uuid" - } - }, - term: { - serializedName: "properties.term", - readOnly: true, - type: { - name: "String" - } - }, - costWithNoReservedInstances: { - serializedName: "properties.costWithNoReservedInstances", - type: { - name: "Composite", - className: "Amount" - } - }, - recommendedQuantity: { - serializedName: "properties.recommendedQuantity", - readOnly: true, - type: { - name: "Number" - } - }, - totalCostWithReservedInstances: { - serializedName: "properties.totalCostWithReservedInstances", - type: { - name: "Composite", - className: "Amount" - } - }, - netSavings: { - serializedName: "properties.netSavings", - type: { - name: "Composite", - className: "Amount" - } - }, - firstUsageDate: { - serializedName: "properties.firstUsageDate", - readOnly: true, - type: { - name: "DateTime" - } - }, - scope: { - serializedName: "properties.scope", - readOnly: true, - type: { - name: "String" - } - }, - skuProperties: { - serializedName: "properties.skuProperties", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SkuProperty" - } - } - } - }, - skuName: { - serializedName: "properties.skuName", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const LegacyChargeSummary: coreClient.CompositeMapper = { - serializedName: "legacy", - type: { - name: "Composite", - className: "LegacyChargeSummary", - uberParent: "ChargeSummary", - polymorphicDiscriminator: ChargeSummary.type.polymorphicDiscriminator, - modelProperties: { - ...ChargeSummary.type.modelProperties, - billingPeriodId: { - serializedName: "properties.billingPeriodId", - readOnly: true, - type: { - name: "String" - } - }, - usageStart: { - serializedName: "properties.usageStart", - readOnly: true, - type: { - name: "String" - } - }, - usageEnd: { - serializedName: "properties.usageEnd", - readOnly: true, - type: { - name: "String" - } - }, - azureCharges: { - serializedName: "properties.azureCharges", - readOnly: true, - type: { - name: "Number" - } - }, - chargesBilledSeparately: { - serializedName: "properties.chargesBilledSeparately", - readOnly: true, - type: { - name: "Number" - } - }, - marketplaceCharges: { - serializedName: "properties.marketplaceCharges", - readOnly: true, - type: { - name: "Number" - } - }, - currency: { - serializedName: "properties.currency", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const ModernChargeSummary: coreClient.CompositeMapper = { - serializedName: "modern", - type: { - name: "Composite", - className: "ModernChargeSummary", - uberParent: "ChargeSummary", - polymorphicDiscriminator: ChargeSummary.type.polymorphicDiscriminator, - modelProperties: { - ...ChargeSummary.type.modelProperties, - billingPeriodId: { - serializedName: "properties.billingPeriodId", - readOnly: true, - type: { - name: "String" - } - }, - usageStart: { - serializedName: "properties.usageStart", - readOnly: true, - type: { - name: "String" - } - }, - usageEnd: { - serializedName: "properties.usageEnd", - readOnly: true, - type: { - name: "String" - } - }, - azureCharges: { - serializedName: "properties.azureCharges", - type: { - name: "Composite", - className: "Amount" - } - }, - chargesBilledSeparately: { - serializedName: "properties.chargesBilledSeparately", - type: { - name: "Composite", - className: "Amount" - } - }, - marketplaceCharges: { - serializedName: "properties.marketplaceCharges", - type: { - name: "Composite", - className: "Amount" - } - }, - billingAccountId: { - serializedName: "properties.billingAccountId", - readOnly: true, - type: { - name: "String" - } - }, - billingProfileId: { - serializedName: "properties.billingProfileId", - readOnly: true, - type: { - name: "String" - } - }, - invoiceSectionId: { - serializedName: "properties.invoiceSectionId", - readOnly: true, - type: { - name: "String" - } - }, - customerId: { - serializedName: "properties.customerId", - readOnly: true, - type: { - name: "String" - } - }, - isInvoiced: { - serializedName: "properties.isInvoiced", - readOnly: true, - type: { - name: "Boolean" - } - } - } - } -}; - -export const LegacyReservationTransaction: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "LegacyReservationTransaction", - modelProperties: { - ...ReservationTransaction.type.modelProperties - } - } -}; - -export let discriminators = { - LegacyReservationRecommendationProperties: LegacyReservationRecommendationProperties, - "Resource.UsageDetail": UsageDetail, - "Resource.ReservationRecommendation": ReservationRecommendation, - "ProxyResource.ChargeSummary": ChargeSummary, - "LegacyReservationRecommendationProperties.Single": LegacySingleScopeReservationRecommendationProperties, - "LegacyReservationRecommendationProperties.Shared": LegacySharedScopeReservationRecommendationProperties, - "UsageDetail.legacy": LegacyUsageDetail, - "UsageDetail.modern": ModernUsageDetail, - "ReservationRecommendation.legacy": LegacyReservationRecommendation, - "ReservationRecommendation.modern": ModernReservationRecommendation, - "ChargeSummary.legacy": LegacyChargeSummary, - "ChargeSummary.modern": ModernChargeSummary -}; diff --git a/sdk/consumption/arm-consumption/src/models/parameters.ts b/sdk/consumption/arm-consumption/src/models/parameters.ts index d3cccb1067c2..cfb1bfdb2cb6 100644 --- a/sdk/consumption/arm-consumption/src/models/parameters.ts +++ b/sdk/consumption/arm-consumption/src/models/parameters.ts @@ -11,7 +11,6 @@ import { OperationURLParameter, OperationQueryParameter } from "@azure/core-client"; -import { Budget as BudgetMapper } from "../models/mappers"; export const accept: OperationParameter = { parameterPath: "accept", @@ -37,18 +36,6 @@ export const $host: OperationURLParameter = { skipEncoding: true }; -export const scope: OperationURLParameter = { - parameterPath: "scope", - mapper: { - serializedName: "scope", - required: true, - type: { - name: "String" - } - }, - skipEncoding: true -}; - export const expand: OperationQueryParameter = { parameterPath: ["options", "expand"], mapper: { @@ -59,16 +46,6 @@ export const expand: OperationQueryParameter = { } }; -export const filter: OperationQueryParameter = { - parameterPath: ["options", "filter"], - mapper: { - serializedName: "$filter", - type: { - name: "String" - } - } -}; - export const skiptoken: OperationQueryParameter = { parameterPath: ["options", "skiptoken"], mapper: { @@ -93,44 +70,10 @@ export const top: OperationQueryParameter = { } }; -export const apiVersion: OperationQueryParameter = { - parameterPath: "apiVersion", - mapper: { - defaultValue: "2021-10-01", - isConstant: true, - serializedName: "api-version", - type: { - name: "String" - } - } -}; - -export const metric: OperationQueryParameter = { - parameterPath: ["options", "metric"], - mapper: { - serializedName: "metric", - type: { - name: "String" - } - } -}; - -export const nextLink: OperationURLParameter = { - parameterPath: "nextLink", - mapper: { - serializedName: "nextLink", - required: true, - type: { - name: "String" - } - }, - skipEncoding: true -}; - -export const budgetName: OperationURLParameter = { - parameterPath: "budgetName", +export const subscriptionId: OperationURLParameter = { + parameterPath: "subscriptionId", mapper: { - serializedName: "budgetName", + serializedName: "subscriptionId", required: true, type: { name: "String" @@ -138,58 +81,12 @@ export const budgetName: OperationURLParameter = { } }; -export const contentType: OperationParameter = { - parameterPath: ["options", "contentType"], +export const apiVersion: OperationQueryParameter = { + parameterPath: "apiVersion", mapper: { - defaultValue: "application/json", + defaultValue: "2022-06-01", isConstant: true, - serializedName: "Content-Type", - type: { - name: "String" - } - } -}; - -export const parameters: OperationParameter = { - parameterPath: "parameters", - mapper: BudgetMapper -}; - -export const startDate: OperationQueryParameter = { - parameterPath: ["options", "startDate"], - mapper: { - serializedName: "startDate", - type: { - name: "String" - } - } -}; - -export const endDate: OperationQueryParameter = { - parameterPath: ["options", "endDate"], - mapper: { - serializedName: "endDate", - type: { - name: "String" - } - } -}; - -export const apply: OperationQueryParameter = { - parameterPath: ["options", "apply"], - mapper: { - serializedName: "$apply", - type: { - name: "String" - } - } -}; - -export const billingAccountId: OperationURLParameter = { - parameterPath: "billingAccountId", - mapper: { - serializedName: "billingAccountId", - required: true, + serializedName: "api-version", type: { name: "String" } @@ -207,165 +104,14 @@ export const billingPeriodName: OperationURLParameter = { } }; -export const reservationOrderId: OperationURLParameter = { - parameterPath: "reservationOrderId", - mapper: { - serializedName: "reservationOrderId", - required: true, - type: { - name: "String" - } - } -}; - -export const grain: OperationQueryParameter = { - parameterPath: "grain", - mapper: { - serializedName: "grain", - required: true, - type: { - name: "String" - } - } -}; - -export const reservationId: OperationURLParameter = { - parameterPath: "reservationId", - mapper: { - serializedName: "reservationId", - required: true, - type: { - name: "String" - } - } -}; - -export const reservationId1: OperationQueryParameter = { - parameterPath: ["options", "reservationId"], - mapper: { - serializedName: "reservationId", - type: { - name: "String" - } - } -}; - -export const reservationOrderId1: OperationQueryParameter = { - parameterPath: ["options", "reservationOrderId"], - mapper: { - serializedName: "reservationOrderId", - type: { - name: "String" - } - } -}; - -export const filter1: OperationQueryParameter = { - parameterPath: "filter", - mapper: { - serializedName: "$filter", - required: true, - type: { - name: "String" - } - } -}; - -export const region: OperationQueryParameter = { - parameterPath: "region", - mapper: { - serializedName: "region", - required: true, - type: { - name: "String" - } - } -}; - -export const term: OperationQueryParameter = { - parameterPath: "term", - mapper: { - serializedName: "term", - required: true, - type: { - name: "String" - } - } -}; - -export const lookBackPeriod: OperationQueryParameter = { - parameterPath: "lookBackPeriod", - mapper: { - serializedName: "lookBackPeriod", - required: true, - type: { - name: "String" - } - } -}; - -export const product: OperationQueryParameter = { - parameterPath: "product", - mapper: { - serializedName: "product", - required: true, - type: { - name: "String" - } - } -}; - -export const billingProfileId: OperationURLParameter = { - parameterPath: "billingProfileId", - mapper: { - serializedName: "billingProfileId", - required: true, - type: { - name: "String" - } - } -}; - -export const subscriptionId: OperationURLParameter = { - parameterPath: "subscriptionId", - mapper: { - serializedName: "subscriptionId", - required: true, - type: { - name: "String" - } - } -}; - -export const managementGroupId: OperationURLParameter = { - parameterPath: "managementGroupId", - mapper: { - serializedName: "managementGroupId", - required: true, - type: { - name: "String" - } - } -}; - -export const startDate1: OperationQueryParameter = { - parameterPath: "startDate", - mapper: { - serializedName: "startDate", - required: true, - type: { - name: "String" - } - } -}; - -export const endDate1: OperationQueryParameter = { - parameterPath: "endDate", +export const nextLink: OperationURLParameter = { + parameterPath: "nextLink", mapper: { - serializedName: "endDate", + serializedName: "nextLink", required: true, type: { name: "String" } - } + }, + skipEncoding: true }; diff --git a/sdk/consumption/arm-consumption/src/operations/aggregatedCost.ts b/sdk/consumption/arm-consumption/src/operations/aggregatedCost.ts deleted file mode 100644 index 6860727b8e7f..000000000000 --- a/sdk/consumption/arm-consumption/src/operations/aggregatedCost.ts +++ /dev/null @@ -1,107 +0,0 @@ -/* - * 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 { AggregatedCost } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ConsumptionManagementClient } from "../consumptionManagementClient"; -import { - AggregatedCostGetByManagementGroupOptionalParams, - AggregatedCostGetByManagementGroupResponse, - AggregatedCostGetForBillingPeriodByManagementGroupOptionalParams, - AggregatedCostGetForBillingPeriodByManagementGroupResponse -} from "../models"; - -/** Class containing AggregatedCost operations. */ -export class AggregatedCostImpl implements AggregatedCost { - private readonly client: ConsumptionManagementClient; - - /** - * Initialize a new instance of the class AggregatedCost class. - * @param client Reference to the service client - */ - constructor(client: ConsumptionManagementClient) { - this.client = client; - } - - /** - * Provides the aggregate cost of a management group and all child management groups by current billing - * period. - * @param managementGroupId Azure Management Group ID. - * @param options The options parameters. - */ - getByManagementGroup( - managementGroupId: string, - options?: AggregatedCostGetByManagementGroupOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { managementGroupId, options }, - getByManagementGroupOperationSpec - ); - } - - /** - * Provides the aggregate cost of a management group and all child management groups by specified - * billing period - * @param managementGroupId Azure Management Group ID. - * @param billingPeriodName Billing Period Name. - * @param options The options parameters. - */ - getForBillingPeriodByManagementGroup( - managementGroupId: string, - billingPeriodName: string, - options?: AggregatedCostGetForBillingPeriodByManagementGroupOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { managementGroupId, billingPeriodName, options }, - getForBillingPeriodByManagementGroupOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getByManagementGroupOperationSpec: coreClient.OperationSpec = { - path: - "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Consumption/aggregatedcost", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ManagementGroupAggregatedCostResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.filter, Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.managementGroupId], - headerParameters: [Parameters.accept], - serializer -}; -const getForBillingPeriodByManagementGroupOperationSpec: coreClient.OperationSpec = { - path: - "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/aggregatedCost", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ManagementGroupAggregatedCostResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.billingPeriodName, - Parameters.managementGroupId - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/consumption/arm-consumption/src/operations/balances.ts b/sdk/consumption/arm-consumption/src/operations/balances.ts deleted file mode 100644 index ec5c3fcf9868..000000000000 --- a/sdk/consumption/arm-consumption/src/operations/balances.ts +++ /dev/null @@ -1,107 +0,0 @@ -/* - * 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 { Balances } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ConsumptionManagementClient } from "../consumptionManagementClient"; -import { - BalancesGetByBillingAccountOptionalParams, - BalancesGetByBillingAccountResponse, - BalancesGetForBillingPeriodByBillingAccountOptionalParams, - BalancesGetForBillingPeriodByBillingAccountResponse -} from "../models"; - -/** Class containing Balances operations. */ -export class BalancesImpl implements Balances { - private readonly client: ConsumptionManagementClient; - - /** - * Initialize a new instance of the class Balances class. - * @param client Reference to the service client - */ - constructor(client: ConsumptionManagementClient) { - this.client = client; - } - - /** - * Gets the balances for a scope by billingAccountId. Balances are available via this API only for May - * 1, 2014 or later. - * @param billingAccountId BillingAccount ID - * @param options The options parameters. - */ - getByBillingAccount( - billingAccountId: string, - options?: BalancesGetByBillingAccountOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { billingAccountId, options }, - getByBillingAccountOperationSpec - ); - } - - /** - * Gets the balances for a scope by billing period and billingAccountId. Balances are available via - * this API only for May 1, 2014 or later. - * @param billingAccountId BillingAccount ID - * @param billingPeriodName Billing Period Name. - * @param options The options parameters. - */ - getForBillingPeriodByBillingAccount( - billingAccountId: string, - billingPeriodName: string, - options?: BalancesGetForBillingPeriodByBillingAccountOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { billingAccountId, billingPeriodName, options }, - getForBillingPeriodByBillingAccountOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getByBillingAccountOperationSpec: coreClient.OperationSpec = { - path: - "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/balances", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.Balance - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.billingAccountId], - headerParameters: [Parameters.accept], - serializer -}; -const getForBillingPeriodByBillingAccountOperationSpec: coreClient.OperationSpec = { - path: - "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/balances", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.Balance - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.billingAccountId, - Parameters.billingPeriodName - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/consumption/arm-consumption/src/operations/budgets.ts b/sdk/consumption/arm-consumption/src/operations/budgets.ts deleted file mode 100644 index 3144474a981c..000000000000 --- a/sdk/consumption/arm-consumption/src/operations/budgets.ts +++ /dev/null @@ -1,331 +0,0 @@ -/* - * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { Budgets } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ConsumptionManagementClient } from "../consumptionManagementClient"; -import { - Budget, - BudgetsListNextOptionalParams, - BudgetsListOptionalParams, - BudgetsListResponse, - BudgetsGetOptionalParams, - BudgetsGetResponse, - BudgetsCreateOrUpdateOptionalParams, - BudgetsCreateOrUpdateResponse, - BudgetsDeleteOptionalParams, - BudgetsListNextResponse -} from "../models"; - -/// -/** Class containing Budgets operations. */ -export class BudgetsImpl implements Budgets { - private readonly client: ConsumptionManagementClient; - - /** - * Initialize a new instance of the class Budgets class. - * @param client Reference to the service client - */ - constructor(client: ConsumptionManagementClient) { - this.client = client; - } - - /** - * 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 options parameters. - */ - public list( - scope: string, - options?: BudgetsListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(scope, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: () => { - return this.listPagingPage(scope, options); - } - }; - } - - private async *listPagingPage( - scope: string, - options?: BudgetsListOptionalParams - ): AsyncIterableIterator { - let result = await this._list(scope, options); - yield result.value || []; - let continuationToken = result.nextLink; - while (continuationToken) { - result = await this._listNext(scope, continuationToken, options); - continuationToken = result.nextLink; - yield result.value || []; - } - } - - private async *listPagingAll( - scope: string, - options?: BudgetsListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(scope, options)) { - yield* page; - } - } - - /** - * 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 options parameters. - */ - private _list( - scope: string, - options?: BudgetsListOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { scope, options }, - listOperationSpec - ); - } - - /** - * 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 options parameters. - */ - get( - scope: string, - budgetName: string, - options?: BudgetsGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { scope, budgetName, options }, - getOperationSpec - ); - } - - /** - * 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 options parameters. - */ - createOrUpdate( - scope: string, - budgetName: string, - parameters: Budget, - options?: BudgetsCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { scope, budgetName, parameters, options }, - createOrUpdateOperationSpec - ); - } - - /** - * 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 options parameters. - */ - delete( - scope: string, - budgetName: string, - options?: BudgetsDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { scope, budgetName, options }, - deleteOperationSpec - ); - } - - /** - * ListNext - * @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 nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - scope: string, - nextLink: string, - options?: BudgetsListNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { scope, nextLink, options }, - listNextOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/{scope}/providers/Microsoft.Consumption/budgets", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.BudgetsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.scope], - headerParameters: [Parameters.accept], - serializer -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.Budget - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.scope, Parameters.budgetName], - headerParameters: [Parameters.accept], - serializer -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.Budget - }, - 201: { - bodyMapper: Mappers.Budget - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.scope, Parameters.budgetName], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}", - httpMethod: "DELETE", - responses: { - 200: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.scope, Parameters.budgetName], - headerParameters: [Parameters.accept], - serializer -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.BudgetsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.scope, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/consumption/arm-consumption/src/operations/charges.ts b/sdk/consumption/arm-consumption/src/operations/charges.ts deleted file mode 100644 index 2f817da55bcd..000000000000 --- a/sdk/consumption/arm-consumption/src/operations/charges.ts +++ /dev/null @@ -1,82 +0,0 @@ -/* - * 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 { Charges } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ConsumptionManagementClient } from "../consumptionManagementClient"; -import { ChargesListOptionalParams, ChargesListResponse } from "../models"; - -/** Class containing Charges operations. */ -export class ChargesImpl implements Charges { - private readonly client: ConsumptionManagementClient; - - /** - * Initialize a new instance of the class Charges class. - * @param client Reference to the service client - */ - constructor(client: ConsumptionManagementClient) { - this.client = client; - } - - /** - * 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 options parameters. - */ - list( - scope: string, - options?: ChargesListOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { scope, options }, - listOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/{scope}/providers/Microsoft.Consumption/charges", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ChargesListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.apiVersion, - Parameters.startDate, - Parameters.endDate, - Parameters.apply - ], - urlParameters: [Parameters.$host, Parameters.scope], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/consumption/arm-consumption/src/operations/credits.ts b/sdk/consumption/arm-consumption/src/operations/credits.ts deleted file mode 100644 index 921fe9fcfa95..000000000000 --- a/sdk/consumption/arm-consumption/src/operations/credits.ts +++ /dev/null @@ -1,69 +0,0 @@ -/* - * 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 { Credits } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ConsumptionManagementClient } from "../consumptionManagementClient"; -import { CreditsGetOptionalParams, CreditsGetResponse } from "../models"; - -/** Class containing Credits operations. */ -export class CreditsImpl implements Credits { - private readonly client: ConsumptionManagementClient; - - /** - * Initialize a new instance of the class Credits class. - * @param client Reference to the service client - */ - constructor(client: ConsumptionManagementClient) { - this.client = client; - } - - /** - * The credit summary by billingAccountId and billingProfileId. - * @param billingAccountId BillingAccount ID - * @param billingProfileId Azure Billing Profile ID. - * @param options The options parameters. - */ - get( - billingAccountId: string, - billingProfileId: string, - options?: CreditsGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { billingAccountId, billingProfileId, options }, - getOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: - "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.Consumption/credits/balanceSummary", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.CreditSummary - }, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.billingAccountId, - Parameters.billingProfileId - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/consumption/arm-consumption/src/operations/eventsOperations.ts b/sdk/consumption/arm-consumption/src/operations/eventsOperations.ts deleted file mode 100644 index 06a65db0db31..000000000000 --- a/sdk/consumption/arm-consumption/src/operations/eventsOperations.ts +++ /dev/null @@ -1,358 +0,0 @@ -/* - * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { EventsOperations } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ConsumptionManagementClient } from "../consumptionManagementClient"; -import { - EventSummary, - EventsListByBillingProfileNextOptionalParams, - EventsListByBillingProfileOptionalParams, - EventsListByBillingAccountNextOptionalParams, - EventsListByBillingAccountOptionalParams, - EventsListByBillingProfileResponse, - EventsListByBillingAccountResponse, - EventsListByBillingProfileNextResponse, - EventsListByBillingAccountNextResponse -} from "../models"; - -/// -/** Class containing EventsOperations operations. */ -export class EventsOperationsImpl implements EventsOperations { - private readonly client: ConsumptionManagementClient; - - /** - * Initialize a new instance of the class EventsOperations class. - * @param client Reference to the service client - */ - constructor(client: ConsumptionManagementClient) { - this.client = client; - } - - /** - * Lists the events that decrements Azure credits or Microsoft Azure consumption commitment for a - * billing account or a billing profile for a 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 options parameters. - */ - public listByBillingProfile( - billingAccountId: string, - billingProfileId: string, - startDate: string, - endDate: string, - options?: EventsListByBillingProfileOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByBillingProfilePagingAll( - billingAccountId, - billingProfileId, - startDate, - endDate, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: () => { - return this.listByBillingProfilePagingPage( - billingAccountId, - billingProfileId, - startDate, - endDate, - options - ); - } - }; - } - - private async *listByBillingProfilePagingPage( - billingAccountId: string, - billingProfileId: string, - startDate: string, - endDate: string, - options?: EventsListByBillingProfileOptionalParams - ): AsyncIterableIterator { - let result = await this._listByBillingProfile( - billingAccountId, - billingProfileId, - startDate, - endDate, - options - ); - yield result.value || []; - let continuationToken = result.nextLink; - while (continuationToken) { - result = await this._listByBillingProfileNext( - billingAccountId, - billingProfileId, - startDate, - endDate, - continuationToken, - options - ); - continuationToken = result.nextLink; - yield result.value || []; - } - } - - private async *listByBillingProfilePagingAll( - billingAccountId: string, - billingProfileId: string, - startDate: string, - endDate: string, - options?: EventsListByBillingProfileOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByBillingProfilePagingPage( - billingAccountId, - billingProfileId, - startDate, - endDate, - options - )) { - yield* page; - } - } - - /** - * Lists the events that decrements Azure credits or Microsoft Azure consumption commitment for a - * billing account or a billing profile for a given start and end date. - * @param billingAccountId BillingAccount ID - * @param options The options parameters. - */ - public listByBillingAccount( - billingAccountId: string, - options?: EventsListByBillingAccountOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByBillingAccountPagingAll(billingAccountId, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: () => { - return this.listByBillingAccountPagingPage(billingAccountId, options); - } - }; - } - - private async *listByBillingAccountPagingPage( - billingAccountId: string, - options?: EventsListByBillingAccountOptionalParams - ): AsyncIterableIterator { - let result = await this._listByBillingAccount(billingAccountId, options); - yield result.value || []; - let continuationToken = result.nextLink; - while (continuationToken) { - result = await this._listByBillingAccountNext( - billingAccountId, - continuationToken, - options - ); - continuationToken = result.nextLink; - yield result.value || []; - } - } - - private async *listByBillingAccountPagingAll( - billingAccountId: string, - options?: EventsListByBillingAccountOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByBillingAccountPagingPage( - billingAccountId, - options - )) { - yield* page; - } - } - - /** - * Lists the events that decrements Azure credits or Microsoft Azure consumption commitment for a - * billing account or a billing profile for a 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 options parameters. - */ - private _listByBillingProfile( - billingAccountId: string, - billingProfileId: string, - startDate: string, - endDate: string, - options?: EventsListByBillingProfileOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { billingAccountId, billingProfileId, startDate, endDate, options }, - listByBillingProfileOperationSpec - ); - } - - /** - * Lists the events that decrements Azure credits or Microsoft Azure consumption commitment for a - * billing account or a billing profile for a given start and end date. - * @param billingAccountId BillingAccount ID - * @param options The options parameters. - */ - private _listByBillingAccount( - billingAccountId: string, - options?: EventsListByBillingAccountOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { billingAccountId, options }, - listByBillingAccountOperationSpec - ); - } - - /** - * ListByBillingProfileNext - * @param billingAccountId BillingAccount ID - * @param billingProfileId Azure Billing Profile ID. - * @param startDate Start date - * @param endDate End date - * @param nextLink The nextLink from the previous successful call to the ListByBillingProfile method. - * @param options The options parameters. - */ - private _listByBillingProfileNext( - billingAccountId: string, - billingProfileId: string, - startDate: string, - endDate: string, - nextLink: string, - options?: EventsListByBillingProfileNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - billingAccountId, - billingProfileId, - startDate, - endDate, - nextLink, - options - }, - listByBillingProfileNextOperationSpec - ); - } - - /** - * ListByBillingAccountNext - * @param billingAccountId BillingAccount ID - * @param nextLink The nextLink from the previous successful call to the ListByBillingAccount method. - * @param options The options parameters. - */ - private _listByBillingAccountNext( - billingAccountId: string, - nextLink: string, - options?: EventsListByBillingAccountNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { billingAccountId, nextLink, options }, - listByBillingAccountNextOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByBillingProfileOperationSpec: coreClient.OperationSpec = { - path: - "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.Consumption/events", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.Events - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.startDate1, - Parameters.endDate1 - ], - urlParameters: [ - Parameters.$host, - Parameters.billingAccountId, - Parameters.billingProfileId - ], - headerParameters: [Parameters.accept], - serializer -}; -const listByBillingAccountOperationSpec: coreClient.OperationSpec = { - path: - "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/events", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.Events - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.filter, Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.billingAccountId], - headerParameters: [Parameters.accept], - serializer -}; -const listByBillingProfileNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.Events - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.startDate1, - Parameters.endDate1 - ], - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.billingAccountId, - Parameters.billingProfileId - ], - headerParameters: [Parameters.accept], - serializer -}; -const listByBillingAccountNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.Events - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.filter, Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.billingAccountId - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/consumption/arm-consumption/src/operations/index.ts b/sdk/consumption/arm-consumption/src/operations/index.ts index b751ef901317..e0a7f3815338 100644 --- a/sdk/consumption/arm-consumption/src/operations/index.ts +++ b/sdk/consumption/arm-consumption/src/operations/index.ts @@ -6,20 +6,5 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -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 "./reservationRecommendationDetails"; -export * from "./reservationTransactions"; export * from "./priceSheet"; export * from "./operations"; -export * from "./aggregatedCost"; -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 deleted file mode 100644 index cedd214243ff..000000000000 --- a/sdk/consumption/arm-consumption/src/operations/lotsOperations.ts +++ /dev/null @@ -1,321 +0,0 @@ -/* - * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { LotsOperations } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ConsumptionManagementClient } from "../consumptionManagementClient"; -import { - LotSummary, - LotsListByBillingProfileNextOptionalParams, - LotsListByBillingProfileOptionalParams, - LotsListByBillingAccountNextOptionalParams, - LotsListByBillingAccountOptionalParams, - LotsListByBillingProfileResponse, - LotsListByBillingAccountResponse, - LotsListByBillingProfileNextResponse, - LotsListByBillingAccountNextResponse -} from "../models"; - -/// -/** Class containing LotsOperations operations. */ -export class LotsOperationsImpl implements LotsOperations { - private readonly client: ConsumptionManagementClient; - - /** - * Initialize a new instance of the class LotsOperations class. - * @param client Reference to the service client - */ - constructor(client: ConsumptionManagementClient) { - this.client = client; - } - - /** - * Lists all Azure credits and Microsoft Azure consumption commitments for a billing account or a - * billing profile. Microsoft Azure consumption commitments are only supported for the billing account - * scope. - * @param billingAccountId BillingAccount ID - * @param billingProfileId Azure Billing Profile ID. - * @param options The options parameters. - */ - public listByBillingProfile( - billingAccountId: string, - billingProfileId: string, - options?: LotsListByBillingProfileOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByBillingProfilePagingAll( - billingAccountId, - billingProfileId, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: () => { - return this.listByBillingProfilePagingPage( - billingAccountId, - billingProfileId, - options - ); - } - }; - } - - private async *listByBillingProfilePagingPage( - billingAccountId: string, - billingProfileId: string, - options?: LotsListByBillingProfileOptionalParams - ): AsyncIterableIterator { - let result = await this._listByBillingProfile( - billingAccountId, - billingProfileId, - options - ); - yield result.value || []; - let continuationToken = result.nextLink; - while (continuationToken) { - result = await this._listByBillingProfileNext( - billingAccountId, - billingProfileId, - continuationToken, - options - ); - continuationToken = result.nextLink; - yield result.value || []; - } - } - - private async *listByBillingProfilePagingAll( - billingAccountId: string, - billingProfileId: string, - options?: LotsListByBillingProfileOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByBillingProfilePagingPage( - billingAccountId, - billingProfileId, - options - )) { - yield* page; - } - } - - /** - * Lists all Azure credits and Microsoft Azure consumption commitments for a billing account or a - * billing profile. Microsoft Azure consumption commitments are only supported for the billing account - * scope. - * @param billingAccountId BillingAccount ID - * @param options The options parameters. - */ - public listByBillingAccount( - billingAccountId: string, - options?: LotsListByBillingAccountOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByBillingAccountPagingAll(billingAccountId, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: () => { - return this.listByBillingAccountPagingPage(billingAccountId, options); - } - }; - } - - private async *listByBillingAccountPagingPage( - billingAccountId: string, - options?: LotsListByBillingAccountOptionalParams - ): AsyncIterableIterator { - let result = await this._listByBillingAccount(billingAccountId, options); - yield result.value || []; - let continuationToken = result.nextLink; - while (continuationToken) { - result = await this._listByBillingAccountNext( - billingAccountId, - continuationToken, - options - ); - continuationToken = result.nextLink; - yield result.value || []; - } - } - - private async *listByBillingAccountPagingAll( - billingAccountId: string, - options?: LotsListByBillingAccountOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByBillingAccountPagingPage( - billingAccountId, - options - )) { - yield* page; - } - } - - /** - * Lists all Azure credits and Microsoft Azure consumption commitments for a billing account or a - * billing profile. Microsoft Azure consumption commitments are only supported for the billing account - * scope. - * @param billingAccountId BillingAccount ID - * @param billingProfileId Azure Billing Profile ID. - * @param options The options parameters. - */ - private _listByBillingProfile( - billingAccountId: string, - billingProfileId: string, - options?: LotsListByBillingProfileOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { billingAccountId, billingProfileId, options }, - listByBillingProfileOperationSpec - ); - } - - /** - * Lists all Azure credits and Microsoft Azure consumption commitments for a billing account or a - * billing profile. Microsoft Azure consumption commitments are only supported for the billing account - * scope. - * @param billingAccountId BillingAccount ID - * @param options The options parameters. - */ - private _listByBillingAccount( - billingAccountId: string, - options?: LotsListByBillingAccountOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { billingAccountId, options }, - listByBillingAccountOperationSpec - ); - } - - /** - * ListByBillingProfileNext - * @param billingAccountId BillingAccount ID - * @param billingProfileId Azure Billing Profile ID. - * @param nextLink The nextLink from the previous successful call to the ListByBillingProfile method. - * @param options The options parameters. - */ - private _listByBillingProfileNext( - billingAccountId: string, - billingProfileId: string, - nextLink: string, - options?: LotsListByBillingProfileNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { billingAccountId, billingProfileId, nextLink, options }, - listByBillingProfileNextOperationSpec - ); - } - - /** - * ListByBillingAccountNext - * @param billingAccountId BillingAccount ID - * @param nextLink The nextLink from the previous successful call to the ListByBillingAccount method. - * @param options The options parameters. - */ - private _listByBillingAccountNext( - billingAccountId: string, - nextLink: string, - options?: LotsListByBillingAccountNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { billingAccountId, nextLink, options }, - listByBillingAccountNextOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByBillingProfileOperationSpec: coreClient.OperationSpec = { - path: - "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.Consumption/lots", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.Lots - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.billingAccountId, - Parameters.billingProfileId - ], - headerParameters: [Parameters.accept], - serializer -}; -const listByBillingAccountOperationSpec: coreClient.OperationSpec = { - path: - "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/lots", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.Lots - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.filter, Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.billingAccountId], - headerParameters: [Parameters.accept], - serializer -}; -const listByBillingProfileNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.Lots - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.billingAccountId, - Parameters.billingProfileId - ], - headerParameters: [Parameters.accept], - serializer -}; -const listByBillingAccountNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.Lots - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.filter, Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.billingAccountId - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/consumption/arm-consumption/src/operations/marketplaces.ts b/sdk/consumption/arm-consumption/src/operations/marketplaces.ts deleted file mode 100644 index 45219696eb9b..000000000000 --- a/sdk/consumption/arm-consumption/src/operations/marketplaces.ts +++ /dev/null @@ -1,190 +0,0 @@ -/* - * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { Marketplaces } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ConsumptionManagementClient } from "../consumptionManagementClient"; -import { - Marketplace, - MarketplacesListNextOptionalParams, - MarketplacesListOptionalParams, - MarketplacesListResponse, - MarketplacesListNextResponse -} from "../models"; - -/// -/** Class containing Marketplaces operations. */ -export class MarketplacesImpl implements Marketplaces { - private readonly client: ConsumptionManagementClient; - - /** - * Initialize a new instance of the class Marketplaces class. - * @param client Reference to the service client - */ - constructor(client: ConsumptionManagementClient) { - this.client = client; - } - - /** - * 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 options parameters. - */ - public list( - scope: string, - options?: MarketplacesListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(scope, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: () => { - return this.listPagingPage(scope, options); - } - }; - } - - private async *listPagingPage( - scope: string, - options?: MarketplacesListOptionalParams - ): AsyncIterableIterator { - let result = await this._list(scope, options); - yield result.value || []; - let continuationToken = result.nextLink; - while (continuationToken) { - result = await this._listNext(scope, continuationToken, options); - continuationToken = result.nextLink; - yield result.value || []; - } - } - - private async *listPagingAll( - scope: string, - options?: MarketplacesListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(scope, options)) { - yield* page; - } - } - - /** - * 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 options parameters. - */ - private _list( - scope: string, - options?: MarketplacesListOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { scope, options }, - listOperationSpec - ); - } - - /** - * ListNext - * @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 nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - scope: string, - nextLink: string, - options?: MarketplacesListNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { scope, nextLink, options }, - listNextOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/{scope}/providers/Microsoft.Consumption/marketplaces", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.MarketplacesListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.skiptoken, - Parameters.top, - Parameters.apiVersion - ], - urlParameters: [Parameters.$host, Parameters.scope], - headerParameters: [Parameters.accept], - serializer -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.MarketplacesListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.skiptoken, - Parameters.top, - Parameters.apiVersion - ], - urlParameters: [Parameters.$host, Parameters.scope, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/consumption/arm-consumption/src/operations/priceSheet.ts b/sdk/consumption/arm-consumption/src/operations/priceSheet.ts index baf8229c556b..82ad6a9cdbe4 100644 --- a/sdk/consumption/arm-consumption/src/operations/priceSheet.ts +++ b/sdk/consumption/arm-consumption/src/operations/priceSheet.ts @@ -100,8 +100,8 @@ const getByBillingPeriodOperationSpec: coreClient.OperationSpec = { ], urlParameters: [ Parameters.$host, - Parameters.billingPeriodName, - Parameters.subscriptionId + Parameters.subscriptionId, + Parameters.billingPeriodName ], headerParameters: [Parameters.accept], serializer diff --git a/sdk/consumption/arm-consumption/src/operations/reservationRecommendationDetails.ts b/sdk/consumption/arm-consumption/src/operations/reservationRecommendationDetails.ts deleted file mode 100644 index c3bf7a979b7b..000000000000 --- a/sdk/consumption/arm-consumption/src/operations/reservationRecommendationDetails.ts +++ /dev/null @@ -1,89 +0,0 @@ -/* - * 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 { ReservationRecommendationDetails } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ConsumptionManagementClient } from "../consumptionManagementClient"; -import { - Term, - LookBackPeriod, - ReservationRecommendationDetailsGetOptionalParams, - ReservationRecommendationDetailsGetResponse -} from "../models"; - -/** Class containing ReservationRecommendationDetails operations. */ -export class ReservationRecommendationDetailsImpl - implements ReservationRecommendationDetails { - private readonly client: ConsumptionManagementClient; - - /** - * Initialize a new instance of the class ReservationRecommendationDetails class. - * @param client Reference to the service client - */ - constructor(client: ConsumptionManagementClient) { - 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 region Used to select the region the recommendation should be generated for. - * @param term Specify length of reservation recommendation term. - * @param lookBackPeriod Filter the time period on which reservation recommendation results are based. - * @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 options parameters. - */ - get( - scope: string, - region: string, - term: Term, - lookBackPeriod: LookBackPeriod, - product: string, - options?: ReservationRecommendationDetailsGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { scope, region, term, lookBackPeriod, product, options }, - getOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: - "/{scope}/providers/Microsoft.Consumption/reservationRecommendationDetails", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReservationRecommendationDetailsModel - }, - 204: {}, - default: { - bodyMapper: Mappers.HighCasedErrorResponse - } - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.region, - Parameters.term, - Parameters.lookBackPeriod, - Parameters.product - ], - urlParameters: [Parameters.$host, Parameters.scope], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/consumption/arm-consumption/src/operations/reservationRecommendations.ts b/sdk/consumption/arm-consumption/src/operations/reservationRecommendations.ts deleted file mode 100644 index 91e81411e61b..000000000000 --- a/sdk/consumption/arm-consumption/src/operations/reservationRecommendations.ts +++ /dev/null @@ -1,166 +0,0 @@ -/* - * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { ReservationRecommendations } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ConsumptionManagementClient } from "../consumptionManagementClient"; -import { - ReservationRecommendationUnion, - ReservationRecommendationsListNextOptionalParams, - ReservationRecommendationsListOptionalParams, - ReservationRecommendationsListResponse, - ReservationRecommendationsListNextResponse -} from "../models"; - -/// -/** Class containing ReservationRecommendations operations. */ -export class ReservationRecommendationsImpl - implements ReservationRecommendations { - private readonly client: ConsumptionManagementClient; - - /** - * Initialize a new instance of the class ReservationRecommendations class. - * @param client Reference to the service client - */ - constructor(client: ConsumptionManagementClient) { - this.client = client; - } - - /** - * 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 options parameters. - */ - public list( - scope: string, - options?: ReservationRecommendationsListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(scope, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: () => { - return this.listPagingPage(scope, options); - } - }; - } - - private async *listPagingPage( - scope: string, - options?: ReservationRecommendationsListOptionalParams - ): AsyncIterableIterator { - let result = await this._list(scope, options); - yield result.value || []; - let continuationToken = result.nextLink; - while (continuationToken) { - result = await this._listNext(scope, continuationToken, options); - continuationToken = result.nextLink; - yield result.value || []; - } - } - - private async *listPagingAll( - scope: string, - options?: ReservationRecommendationsListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(scope, options)) { - yield* page; - } - } - - /** - * 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 options parameters. - */ - private _list( - scope: string, - options?: ReservationRecommendationsListOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { scope, options }, - listOperationSpec - ); - } - - /** - * ListNext - * @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 nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - scope: string, - nextLink: string, - options?: ReservationRecommendationsListNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { scope, nextLink, options }, - listNextOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/{scope}/providers/Microsoft.Consumption/reservationRecommendations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReservationRecommendationsListResult - }, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.filter, Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.scope], - headerParameters: [Parameters.accept], - serializer -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReservationRecommendationsListResult - }, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.filter, Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.scope, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/consumption/arm-consumption/src/operations/reservationTransactions.ts b/sdk/consumption/arm-consumption/src/operations/reservationTransactions.ts deleted file mode 100644 index 1331e4507515..000000000000 --- a/sdk/consumption/arm-consumption/src/operations/reservationTransactions.ts +++ /dev/null @@ -1,311 +0,0 @@ -/* - * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { ReservationTransactions } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ConsumptionManagementClient } from "../consumptionManagementClient"; -import { - ReservationTransaction, - ReservationTransactionsListNextOptionalParams, - ReservationTransactionsListOptionalParams, - ModernReservationTransaction, - ReservationTransactionsListByBillingProfileNextOptionalParams, - ReservationTransactionsListByBillingProfileOptionalParams, - ReservationTransactionsListResponse, - ReservationTransactionsListByBillingProfileResponse, - ReservationTransactionsListNextResponse, - ReservationTransactionsListByBillingProfileNextResponse -} from "../models"; - -/// -/** Class containing ReservationTransactions operations. */ -export class ReservationTransactionsImpl implements ReservationTransactions { - private readonly client: ConsumptionManagementClient; - - /** - * Initialize a new instance of the class ReservationTransactions class. - * @param client Reference to the service client - */ - constructor(client: ConsumptionManagementClient) { - this.client = client; - } - - /** - * List of transactions for reserved instances on billing account scope - * @param billingAccountId BillingAccount ID - * @param options The options parameters. - */ - public list( - billingAccountId: string, - options?: ReservationTransactionsListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(billingAccountId, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: () => { - return this.listPagingPage(billingAccountId, options); - } - }; - } - - private async *listPagingPage( - billingAccountId: string, - options?: ReservationTransactionsListOptionalParams - ): AsyncIterableIterator { - let result = await this._list(billingAccountId, options); - yield result.value || []; - let continuationToken = result.nextLink; - while (continuationToken) { - result = await this._listNext( - billingAccountId, - continuationToken, - options - ); - continuationToken = result.nextLink; - yield result.value || []; - } - } - - private async *listPagingAll( - billingAccountId: string, - options?: ReservationTransactionsListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(billingAccountId, options)) { - yield* page; - } - } - - /** - * List of transactions for reserved instances on billing account scope - * @param billingAccountId BillingAccount ID - * @param billingProfileId Azure Billing Profile ID. - * @param options The options parameters. - */ - public listByBillingProfile( - billingAccountId: string, - billingProfileId: string, - options?: ReservationTransactionsListByBillingProfileOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByBillingProfilePagingAll( - billingAccountId, - billingProfileId, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: () => { - return this.listByBillingProfilePagingPage( - billingAccountId, - billingProfileId, - options - ); - } - }; - } - - private async *listByBillingProfilePagingPage( - billingAccountId: string, - billingProfileId: string, - options?: ReservationTransactionsListByBillingProfileOptionalParams - ): AsyncIterableIterator { - let result = await this._listByBillingProfile( - billingAccountId, - billingProfileId, - options - ); - yield result.value || []; - let continuationToken = result.nextLink; - while (continuationToken) { - result = await this._listByBillingProfileNext( - billingAccountId, - billingProfileId, - continuationToken, - options - ); - continuationToken = result.nextLink; - yield result.value || []; - } - } - - private async *listByBillingProfilePagingAll( - billingAccountId: string, - billingProfileId: string, - options?: ReservationTransactionsListByBillingProfileOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByBillingProfilePagingPage( - billingAccountId, - billingProfileId, - options - )) { - yield* page; - } - } - - /** - * List of transactions for reserved instances on billing account scope - * @param billingAccountId BillingAccount ID - * @param options The options parameters. - */ - private _list( - billingAccountId: string, - options?: ReservationTransactionsListOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { billingAccountId, options }, - listOperationSpec - ); - } - - /** - * List of transactions for reserved instances on billing account scope - * @param billingAccountId BillingAccount ID - * @param billingProfileId Azure Billing Profile ID. - * @param options The options parameters. - */ - private _listByBillingProfile( - billingAccountId: string, - billingProfileId: string, - options?: ReservationTransactionsListByBillingProfileOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { billingAccountId, billingProfileId, options }, - listByBillingProfileOperationSpec - ); - } - - /** - * ListNext - * @param billingAccountId BillingAccount ID - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - billingAccountId: string, - nextLink: string, - options?: ReservationTransactionsListNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { billingAccountId, nextLink, options }, - listNextOperationSpec - ); - } - - /** - * ListByBillingProfileNext - * @param billingAccountId BillingAccount ID - * @param billingProfileId Azure Billing Profile ID. - * @param nextLink The nextLink from the previous successful call to the ListByBillingProfile method. - * @param options The options parameters. - */ - private _listByBillingProfileNext( - billingAccountId: string, - billingProfileId: string, - nextLink: string, - options?: ReservationTransactionsListByBillingProfileNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { billingAccountId, billingProfileId, nextLink, options }, - listByBillingProfileNextOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: - "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/reservationTransactions", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReservationTransactionsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.filter, Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.billingAccountId], - headerParameters: [Parameters.accept], - serializer -}; -const listByBillingProfileOperationSpec: coreClient.OperationSpec = { - path: - "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.Consumption/reservationTransactions", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ModernReservationTransactionsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.filter, Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.billingAccountId, - Parameters.billingProfileId - ], - headerParameters: [Parameters.accept], - serializer -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReservationTransactionsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.filter, Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.billingAccountId - ], - headerParameters: [Parameters.accept], - serializer -}; -const listByBillingProfileNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ModernReservationTransactionsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.filter, Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.billingAccountId, - Parameters.billingProfileId - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/consumption/arm-consumption/src/operations/reservationsDetails.ts b/sdk/consumption/arm-consumption/src/operations/reservationsDetails.ts deleted file mode 100644 index 559f5c455263..000000000000 --- a/sdk/consumption/arm-consumption/src/operations/reservationsDetails.ts +++ /dev/null @@ -1,497 +0,0 @@ -/* - * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { ReservationsDetails } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ConsumptionManagementClient } from "../consumptionManagementClient"; -import { - ReservationDetail, - ReservationsDetailsListByReservationOrderNextOptionalParams, - ReservationsDetailsListByReservationOrderOptionalParams, - ReservationsDetailsListByReservationOrderAndReservationNextOptionalParams, - ReservationsDetailsListByReservationOrderAndReservationOptionalParams, - ReservationsDetailsListNextOptionalParams, - ReservationsDetailsListOptionalParams, - ReservationsDetailsListByReservationOrderResponse, - ReservationsDetailsListByReservationOrderAndReservationResponse, - ReservationsDetailsListResponse, - ReservationsDetailsListByReservationOrderNextResponse, - ReservationsDetailsListByReservationOrderAndReservationNextResponse, - ReservationsDetailsListNextResponse -} from "../models"; - -/// -/** Class containing ReservationsDetails operations. */ -export class ReservationsDetailsImpl implements ReservationsDetails { - private readonly client: ConsumptionManagementClient; - - /** - * Initialize a new instance of the class ReservationsDetails class. - * @param client Reference to the service client - */ - constructor(client: ConsumptionManagementClient) { - this.client = client; - } - - /** - * Lists the reservations details for provided date range. - * @param reservationOrderId Order Id of the reservation - * @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 options parameters. - */ - public listByReservationOrder( - reservationOrderId: string, - filter: string, - options?: ReservationsDetailsListByReservationOrderOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByReservationOrderPagingAll( - reservationOrderId, - filter, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: () => { - return this.listByReservationOrderPagingPage( - reservationOrderId, - filter, - options - ); - } - }; - } - - private async *listByReservationOrderPagingPage( - reservationOrderId: string, - filter: string, - options?: ReservationsDetailsListByReservationOrderOptionalParams - ): AsyncIterableIterator { - let result = await this._listByReservationOrder( - reservationOrderId, - filter, - options - ); - yield result.value || []; - let continuationToken = result.nextLink; - while (continuationToken) { - result = await this._listByReservationOrderNext( - reservationOrderId, - filter, - continuationToken, - options - ); - continuationToken = result.nextLink; - yield result.value || []; - } - } - - private async *listByReservationOrderPagingAll( - reservationOrderId: string, - filter: string, - options?: ReservationsDetailsListByReservationOrderOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByReservationOrderPagingPage( - reservationOrderId, - filter, - options - )) { - yield* page; - } - } - - /** - * Lists the reservations details for provided date range. - * @param reservationOrderId Order Id of the reservation - * @param reservationId Id of the reservation - * @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 options parameters. - */ - public listByReservationOrderAndReservation( - reservationOrderId: string, - reservationId: string, - filter: string, - options?: ReservationsDetailsListByReservationOrderAndReservationOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByReservationOrderAndReservationPagingAll( - reservationOrderId, - reservationId, - filter, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: () => { - return this.listByReservationOrderAndReservationPagingPage( - reservationOrderId, - reservationId, - filter, - options - ); - } - }; - } - - private async *listByReservationOrderAndReservationPagingPage( - reservationOrderId: string, - reservationId: string, - filter: string, - options?: ReservationsDetailsListByReservationOrderAndReservationOptionalParams - ): AsyncIterableIterator { - let result = await this._listByReservationOrderAndReservation( - reservationOrderId, - reservationId, - filter, - options - ); - yield result.value || []; - let continuationToken = result.nextLink; - while (continuationToken) { - result = await this._listByReservationOrderAndReservationNext( - reservationOrderId, - reservationId, - filter, - continuationToken, - options - ); - continuationToken = result.nextLink; - yield result.value || []; - } - } - - private async *listByReservationOrderAndReservationPagingAll( - reservationOrderId: string, - reservationId: string, - filter: string, - options?: ReservationsDetailsListByReservationOrderAndReservationOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByReservationOrderAndReservationPagingPage( - reservationOrderId, - reservationId, - filter, - options - )) { - yield* page; - } - } - - /** - * 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 options parameters. - */ - public list( - scope: string, - options?: ReservationsDetailsListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(scope, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: () => { - return this.listPagingPage(scope, options); - } - }; - } - - private async *listPagingPage( - scope: string, - options?: ReservationsDetailsListOptionalParams - ): AsyncIterableIterator { - let result = await this._list(scope, options); - yield result.value || []; - let continuationToken = result.nextLink; - while (continuationToken) { - result = await this._listNext(scope, continuationToken, options); - continuationToken = result.nextLink; - yield result.value || []; - } - } - - private async *listPagingAll( - scope: string, - options?: ReservationsDetailsListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(scope, options)) { - yield* page; - } - } - - /** - * Lists the reservations details for provided date range. - * @param reservationOrderId Order Id of the reservation - * @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 options parameters. - */ - private _listByReservationOrder( - reservationOrderId: string, - filter: string, - options?: ReservationsDetailsListByReservationOrderOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { reservationOrderId, filter, options }, - listByReservationOrderOperationSpec - ); - } - - /** - * Lists the reservations details for provided date range. - * @param reservationOrderId Order Id of the reservation - * @param reservationId Id of the reservation - * @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 options parameters. - */ - private _listByReservationOrderAndReservation( - reservationOrderId: string, - reservationId: string, - filter: string, - options?: ReservationsDetailsListByReservationOrderAndReservationOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { reservationOrderId, reservationId, filter, options }, - listByReservationOrderAndReservationOperationSpec - ); - } - - /** - * 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 options parameters. - */ - private _list( - scope: string, - options?: ReservationsDetailsListOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { scope, options }, - listOperationSpec - ); - } - - /** - * ListByReservationOrderNext - * @param reservationOrderId Order Id of the reservation - * @param filter Filter reservation details by date range. The properties/UsageDate for start date and - * end date. The filter supports 'le' and 'ge' - * @param nextLink The nextLink from the previous successful call to the ListByReservationOrder method. - * @param options The options parameters. - */ - private _listByReservationOrderNext( - reservationOrderId: string, - filter: string, - nextLink: string, - options?: ReservationsDetailsListByReservationOrderNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { reservationOrderId, filter, nextLink, options }, - listByReservationOrderNextOperationSpec - ); - } - - /** - * ListByReservationOrderAndReservationNext - * @param reservationOrderId Order Id of the reservation - * @param reservationId Id of the reservation - * @param filter Filter reservation details by date range. The properties/UsageDate for start date and - * end date. The filter supports 'le' and 'ge' - * @param nextLink The nextLink from the previous successful call to the - * ListByReservationOrderAndReservation method. - * @param options The options parameters. - */ - private _listByReservationOrderAndReservationNext( - reservationOrderId: string, - reservationId: string, - filter: string, - nextLink: string, - options?: ReservationsDetailsListByReservationOrderAndReservationNextOptionalParams - ): Promise< - ReservationsDetailsListByReservationOrderAndReservationNextResponse - > { - return this.client.sendOperationRequest( - { reservationOrderId, reservationId, filter, nextLink, options }, - listByReservationOrderAndReservationNextOperationSpec - ); - } - - /** - * ListNext - * @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 nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - scope: string, - nextLink: string, - options?: ReservationsDetailsListNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { scope, nextLink, options }, - listNextOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByReservationOrderOperationSpec: coreClient.OperationSpec = { - path: - "/providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/providers/Microsoft.Consumption/reservationDetails", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReservationDetailsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion, Parameters.filter1], - urlParameters: [Parameters.$host, Parameters.reservationOrderId], - headerParameters: [Parameters.accept], - serializer -}; -const listByReservationOrderAndReservationOperationSpec: coreClient.OperationSpec = { - path: - "/providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/reservations/{reservationId}/providers/Microsoft.Consumption/reservationDetails", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReservationDetailsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion, Parameters.filter1], - urlParameters: [ - Parameters.$host, - Parameters.reservationOrderId, - Parameters.reservationId - ], - headerParameters: [Parameters.accept], - serializer -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/{scope}/providers/Microsoft.Consumption/reservationDetails", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReservationDetailsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.apiVersion, - Parameters.startDate, - Parameters.endDate, - Parameters.reservationId1, - Parameters.reservationOrderId1 - ], - urlParameters: [Parameters.$host, Parameters.scope], - headerParameters: [Parameters.accept], - serializer -}; -const listByReservationOrderNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReservationDetailsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion, Parameters.filter1], - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.reservationOrderId - ], - headerParameters: [Parameters.accept], - serializer -}; -const listByReservationOrderAndReservationNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReservationDetailsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion, Parameters.filter1], - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.reservationOrderId, - Parameters.reservationId - ], - headerParameters: [Parameters.accept], - serializer -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReservationDetailsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.apiVersion, - Parameters.startDate, - Parameters.endDate, - Parameters.reservationId1, - Parameters.reservationOrderId1 - ], - urlParameters: [Parameters.$host, Parameters.scope, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/consumption/arm-consumption/src/operations/reservationsSummaries.ts b/sdk/consumption/arm-consumption/src/operations/reservationsSummaries.ts deleted file mode 100644 index 8fc6c0110bb8..000000000000 --- a/sdk/consumption/arm-consumption/src/operations/reservationsSummaries.ts +++ /dev/null @@ -1,504 +0,0 @@ -/* - * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { ReservationsSummaries } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ConsumptionManagementClient } from "../consumptionManagementClient"; -import { - ReservationSummary, - Datagrain, - ReservationsSummariesListByReservationOrderNextOptionalParams, - ReservationsSummariesListByReservationOrderOptionalParams, - ReservationsSummariesListByReservationOrderAndReservationNextOptionalParams, - ReservationsSummariesListByReservationOrderAndReservationOptionalParams, - ReservationsSummariesListNextOptionalParams, - ReservationsSummariesListOptionalParams, - ReservationsSummariesListByReservationOrderResponse, - ReservationsSummariesListByReservationOrderAndReservationResponse, - ReservationsSummariesListResponse, - ReservationsSummariesListByReservationOrderNextResponse, - ReservationsSummariesListByReservationOrderAndReservationNextResponse, - ReservationsSummariesListNextResponse -} from "../models"; - -/// -/** Class containing ReservationsSummaries operations. */ -export class ReservationsSummariesImpl implements ReservationsSummaries { - private readonly client: ConsumptionManagementClient; - - /** - * Initialize a new instance of the class ReservationsSummaries class. - * @param client Reference to the service client - */ - constructor(client: ConsumptionManagementClient) { - this.client = client; - } - - /** - * Lists the reservations summaries for daily or monthly grain. - * @param reservationOrderId Order Id of the reservation - * @param grain Can be daily or monthly - * @param options The options parameters. - */ - public listByReservationOrder( - reservationOrderId: string, - grain: Datagrain, - options?: ReservationsSummariesListByReservationOrderOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByReservationOrderPagingAll( - reservationOrderId, - grain, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: () => { - return this.listByReservationOrderPagingPage( - reservationOrderId, - grain, - options - ); - } - }; - } - - private async *listByReservationOrderPagingPage( - reservationOrderId: string, - grain: Datagrain, - options?: ReservationsSummariesListByReservationOrderOptionalParams - ): AsyncIterableIterator { - let result = await this._listByReservationOrder( - reservationOrderId, - grain, - options - ); - yield result.value || []; - let continuationToken = result.nextLink; - while (continuationToken) { - result = await this._listByReservationOrderNext( - reservationOrderId, - grain, - continuationToken, - options - ); - continuationToken = result.nextLink; - yield result.value || []; - } - } - - private async *listByReservationOrderPagingAll( - reservationOrderId: string, - grain: Datagrain, - options?: ReservationsSummariesListByReservationOrderOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByReservationOrderPagingPage( - reservationOrderId, - grain, - options - )) { - yield* page; - } - } - - /** - * Lists the reservations summaries for daily or monthly grain. - * @param reservationOrderId Order Id of the reservation - * @param reservationId Id of the reservation - * @param grain Can be daily or monthly - * @param options The options parameters. - */ - public listByReservationOrderAndReservation( - reservationOrderId: string, - reservationId: string, - grain: Datagrain, - options?: ReservationsSummariesListByReservationOrderAndReservationOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByReservationOrderAndReservationPagingAll( - reservationOrderId, - reservationId, - grain, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: () => { - return this.listByReservationOrderAndReservationPagingPage( - reservationOrderId, - reservationId, - grain, - options - ); - } - }; - } - - private async *listByReservationOrderAndReservationPagingPage( - reservationOrderId: string, - reservationId: string, - grain: Datagrain, - options?: ReservationsSummariesListByReservationOrderAndReservationOptionalParams - ): AsyncIterableIterator { - let result = await this._listByReservationOrderAndReservation( - reservationOrderId, - reservationId, - grain, - options - ); - yield result.value || []; - let continuationToken = result.nextLink; - while (continuationToken) { - result = await this._listByReservationOrderAndReservationNext( - reservationOrderId, - reservationId, - grain, - continuationToken, - options - ); - continuationToken = result.nextLink; - yield result.value || []; - } - } - - private async *listByReservationOrderAndReservationPagingAll( - reservationOrderId: string, - reservationId: string, - grain: Datagrain, - options?: ReservationsSummariesListByReservationOrderAndReservationOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByReservationOrderAndReservationPagingPage( - reservationOrderId, - reservationId, - grain, - options - )) { - yield* page; - } - } - - /** - * 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 - * @param options The options parameters. - */ - public list( - scope: string, - grain: Datagrain, - options?: ReservationsSummariesListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(scope, grain, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: () => { - return this.listPagingPage(scope, grain, options); - } - }; - } - - private async *listPagingPage( - scope: string, - grain: Datagrain, - options?: ReservationsSummariesListOptionalParams - ): AsyncIterableIterator { - let result = await this._list(scope, grain, options); - yield result.value || []; - let continuationToken = result.nextLink; - while (continuationToken) { - result = await this._listNext(scope, grain, continuationToken, options); - continuationToken = result.nextLink; - yield result.value || []; - } - } - - private async *listPagingAll( - scope: string, - grain: Datagrain, - options?: ReservationsSummariesListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(scope, grain, options)) { - yield* page; - } - } - - /** - * Lists the reservations summaries for daily or monthly grain. - * @param reservationOrderId Order Id of the reservation - * @param grain Can be daily or monthly - * @param options The options parameters. - */ - private _listByReservationOrder( - reservationOrderId: string, - grain: Datagrain, - options?: ReservationsSummariesListByReservationOrderOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { reservationOrderId, grain, options }, - listByReservationOrderOperationSpec - ); - } - - /** - * Lists the reservations summaries for daily or monthly grain. - * @param reservationOrderId Order Id of the reservation - * @param reservationId Id of the reservation - * @param grain Can be daily or monthly - * @param options The options parameters. - */ - private _listByReservationOrderAndReservation( - reservationOrderId: string, - reservationId: string, - grain: Datagrain, - options?: ReservationsSummariesListByReservationOrderAndReservationOptionalParams - ): Promise< - ReservationsSummariesListByReservationOrderAndReservationResponse - > { - return this.client.sendOperationRequest( - { reservationOrderId, reservationId, grain, options }, - listByReservationOrderAndReservationOperationSpec - ); - } - - /** - * 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 - * @param options The options parameters. - */ - private _list( - scope: string, - grain: Datagrain, - options?: ReservationsSummariesListOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { scope, grain, options }, - listOperationSpec - ); - } - - /** - * ListByReservationOrderNext - * @param reservationOrderId Order Id of the reservation - * @param grain Can be daily or monthly - * @param nextLink The nextLink from the previous successful call to the ListByReservationOrder method. - * @param options The options parameters. - */ - private _listByReservationOrderNext( - reservationOrderId: string, - grain: Datagrain, - nextLink: string, - options?: ReservationsSummariesListByReservationOrderNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { reservationOrderId, grain, nextLink, options }, - listByReservationOrderNextOperationSpec - ); - } - - /** - * ListByReservationOrderAndReservationNext - * @param reservationOrderId Order Id of the reservation - * @param reservationId Id of the reservation - * @param grain Can be daily or monthly - * @param nextLink The nextLink from the previous successful call to the - * ListByReservationOrderAndReservation method. - * @param options The options parameters. - */ - private _listByReservationOrderAndReservationNext( - reservationOrderId: string, - reservationId: string, - grain: Datagrain, - nextLink: string, - options?: ReservationsSummariesListByReservationOrderAndReservationNextOptionalParams - ): Promise< - ReservationsSummariesListByReservationOrderAndReservationNextResponse - > { - return this.client.sendOperationRequest( - { reservationOrderId, reservationId, grain, nextLink, options }, - listByReservationOrderAndReservationNextOperationSpec - ); - } - - /** - * ListNext - * @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 - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - scope: string, - grain: Datagrain, - nextLink: string, - options?: ReservationsSummariesListNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { scope, grain, nextLink, options }, - listNextOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByReservationOrderOperationSpec: coreClient.OperationSpec = { - path: - "/providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/providers/Microsoft.Consumption/reservationSummaries", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReservationSummariesListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.filter, Parameters.apiVersion, Parameters.grain], - urlParameters: [Parameters.$host, Parameters.reservationOrderId], - headerParameters: [Parameters.accept], - serializer -}; -const listByReservationOrderAndReservationOperationSpec: coreClient.OperationSpec = { - path: - "/providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/reservations/{reservationId}/providers/Microsoft.Consumption/reservationSummaries", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReservationSummariesListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.filter, Parameters.apiVersion, Parameters.grain], - urlParameters: [ - Parameters.$host, - Parameters.reservationOrderId, - Parameters.reservationId - ], - headerParameters: [Parameters.accept], - serializer -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/{scope}/providers/Microsoft.Consumption/reservationSummaries", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReservationSummariesListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.apiVersion, - Parameters.startDate, - Parameters.endDate, - Parameters.grain, - Parameters.reservationId1, - Parameters.reservationOrderId1 - ], - urlParameters: [Parameters.$host, Parameters.scope], - headerParameters: [Parameters.accept], - serializer -}; -const listByReservationOrderNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReservationSummariesListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.filter, Parameters.apiVersion, Parameters.grain], - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.reservationOrderId - ], - headerParameters: [Parameters.accept], - serializer -}; -const listByReservationOrderAndReservationNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReservationSummariesListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.filter, Parameters.apiVersion, Parameters.grain], - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.reservationOrderId, - Parameters.reservationId - ], - headerParameters: [Parameters.accept], - serializer -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReservationSummariesListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.apiVersion, - Parameters.startDate, - Parameters.endDate, - Parameters.grain, - Parameters.reservationId1, - Parameters.reservationOrderId1 - ], - urlParameters: [Parameters.$host, Parameters.scope, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/consumption/arm-consumption/src/operations/tags.ts b/sdk/consumption/arm-consumption/src/operations/tags.ts deleted file mode 100644 index 51406a682b0d..000000000000 --- a/sdk/consumption/arm-consumption/src/operations/tags.ts +++ /dev/null @@ -1,70 +0,0 @@ -/* - * 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 { Tags } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ConsumptionManagementClient } from "../consumptionManagementClient"; -import { TagsGetOptionalParams, TagsGetResponse } from "../models"; - -/** Class containing Tags operations. */ -export class TagsImpl implements Tags { - private readonly client: ConsumptionManagementClient; - - /** - * Initialize a new instance of the class Tags class. - * @param client Reference to the service client - */ - constructor(client: ConsumptionManagementClient) { - this.client = client; - } - - /** - * 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 options parameters. - */ - get( - scope: string, - options?: TagsGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { scope, options }, - getOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: "/{scope}/providers/Microsoft.Consumption/tags", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagsResult - }, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.scope], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/consumption/arm-consumption/src/operations/usageDetails.ts b/sdk/consumption/arm-consumption/src/operations/usageDetails.ts deleted file mode 100644 index dcde2c7c829d..000000000000 --- a/sdk/consumption/arm-consumption/src/operations/usageDetails.ts +++ /dev/null @@ -1,218 +0,0 @@ -/* - * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { UsageDetails } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ConsumptionManagementClient } from "../consumptionManagementClient"; -import { - UsageDetailUnion, - UsageDetailsListNextOptionalParams, - UsageDetailsListOptionalParams, - UsageDetailsListResponse, - UsageDetailsListNextResponse -} from "../models"; - -/// -/** Class containing UsageDetails operations. */ -export class UsageDetailsImpl implements UsageDetails { - private readonly client: ConsumptionManagementClient; - - /** - * Initialize a new instance of the class UsageDetails class. - * @param client Reference to the service client - */ - constructor(client: ConsumptionManagementClient) { - this.client = client; - } - - /** - * 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 options parameters. - */ - public list( - scope: string, - options?: UsageDetailsListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(scope, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: () => { - return this.listPagingPage(scope, options); - } - }; - } - - private async *listPagingPage( - scope: string, - options?: UsageDetailsListOptionalParams - ): AsyncIterableIterator { - let result = await this._list(scope, options); - yield result.value || []; - let continuationToken = result.nextLink; - while (continuationToken) { - result = await this._listNext(scope, continuationToken, options); - continuationToken = result.nextLink; - yield result.value || []; - } - } - - private async *listPagingAll( - scope: string, - options?: UsageDetailsListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(scope, options)) { - yield* page; - } - } - - /** - * 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 options parameters. - */ - private _list( - scope: string, - options?: UsageDetailsListOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { scope, options }, - listOperationSpec - ); - } - - /** - * ListNext - * @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 nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - scope: string, - nextLink: string, - options?: UsageDetailsListNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { scope, nextLink, options }, - listNextOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/{scope}/providers/Microsoft.Consumption/usageDetails", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.UsageDetailsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.expand, - Parameters.filter, - Parameters.skiptoken, - Parameters.top, - Parameters.apiVersion, - Parameters.metric - ], - urlParameters: [Parameters.$host, Parameters.scope], - headerParameters: [Parameters.accept], - serializer -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.UsageDetailsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.expand, - Parameters.filter, - Parameters.skiptoken, - Parameters.top, - Parameters.apiVersion, - Parameters.metric - ], - urlParameters: [Parameters.$host, Parameters.scope, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/consumption/arm-consumption/src/operationsInterfaces/aggregatedCost.ts b/sdk/consumption/arm-consumption/src/operationsInterfaces/aggregatedCost.ts deleted file mode 100644 index 5cd517b364c0..000000000000 --- a/sdk/consumption/arm-consumption/src/operationsInterfaces/aggregatedCost.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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 { - AggregatedCostGetByManagementGroupOptionalParams, - AggregatedCostGetByManagementGroupResponse, - AggregatedCostGetForBillingPeriodByManagementGroupOptionalParams, - AggregatedCostGetForBillingPeriodByManagementGroupResponse -} from "../models"; - -/** Interface representing a AggregatedCost. */ -export interface AggregatedCost { - /** - * Provides the aggregate cost of a management group and all child management groups by current billing - * period. - * @param managementGroupId Azure Management Group ID. - * @param options The options parameters. - */ - getByManagementGroup( - managementGroupId: string, - options?: AggregatedCostGetByManagementGroupOptionalParams - ): Promise; - /** - * Provides the aggregate cost of a management group and all child management groups by specified - * billing period - * @param managementGroupId Azure Management Group ID. - * @param billingPeriodName Billing Period Name. - * @param options The options parameters. - */ - getForBillingPeriodByManagementGroup( - managementGroupId: string, - billingPeriodName: string, - options?: AggregatedCostGetForBillingPeriodByManagementGroupOptionalParams - ): Promise; -} diff --git a/sdk/consumption/arm-consumption/src/operationsInterfaces/balances.ts b/sdk/consumption/arm-consumption/src/operationsInterfaces/balances.ts deleted file mode 100644 index b6d7cf515aeb..000000000000 --- a/sdk/consumption/arm-consumption/src/operationsInterfaces/balances.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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 { - BalancesGetByBillingAccountOptionalParams, - BalancesGetByBillingAccountResponse, - BalancesGetForBillingPeriodByBillingAccountOptionalParams, - BalancesGetForBillingPeriodByBillingAccountResponse -} from "../models"; - -/** Interface representing a Balances. */ -export interface Balances { - /** - * Gets the balances for a scope by billingAccountId. Balances are available via this API only for May - * 1, 2014 or later. - * @param billingAccountId BillingAccount ID - * @param options The options parameters. - */ - getByBillingAccount( - billingAccountId: string, - options?: BalancesGetByBillingAccountOptionalParams - ): Promise; - /** - * Gets the balances for a scope by billing period and billingAccountId. Balances are available via - * this API only for May 1, 2014 or later. - * @param billingAccountId BillingAccount ID - * @param billingPeriodName Billing Period Name. - * @param options The options parameters. - */ - getForBillingPeriodByBillingAccount( - billingAccountId: string, - billingPeriodName: string, - options?: BalancesGetForBillingPeriodByBillingAccountOptionalParams - ): Promise; -} diff --git a/sdk/consumption/arm-consumption/src/operationsInterfaces/budgets.ts b/sdk/consumption/arm-consumption/src/operationsInterfaces/budgets.ts deleted file mode 100644 index ef12d70ae33e..000000000000 --- a/sdk/consumption/arm-consumption/src/operationsInterfaces/budgets.ts +++ /dev/null @@ -1,117 +0,0 @@ -/* - * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - Budget, - BudgetsListOptionalParams, - BudgetsGetOptionalParams, - BudgetsGetResponse, - BudgetsCreateOrUpdateOptionalParams, - BudgetsCreateOrUpdateResponse, - BudgetsDeleteOptionalParams -} from "../models"; - -/// -/** Interface representing a Budgets. */ -export interface Budgets { - /** - * 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 options parameters. - */ - list( - scope: string, - options?: BudgetsListOptionalParams - ): PagedAsyncIterableIterator; - /** - * 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 options parameters. - */ - get( - scope: string, - budgetName: string, - options?: BudgetsGetOptionalParams - ): Promise; - /** - * 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 options parameters. - */ - createOrUpdate( - scope: string, - budgetName: string, - parameters: Budget, - options?: BudgetsCreateOrUpdateOptionalParams - ): Promise; - /** - * 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 options parameters. - */ - delete( - scope: string, - budgetName: string, - options?: BudgetsDeleteOptionalParams - ): Promise; -} diff --git a/sdk/consumption/arm-consumption/src/operationsInterfaces/charges.ts b/sdk/consumption/arm-consumption/src/operationsInterfaces/charges.ts deleted file mode 100644 index 074f8c6d24ee..000000000000 --- a/sdk/consumption/arm-consumption/src/operationsInterfaces/charges.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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 { ChargesListOptionalParams, ChargesListResponse } from "../models"; - -/** Interface representing a Charges. */ -export interface Charges { - /** - * 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 options parameters. - */ - list( - scope: string, - options?: ChargesListOptionalParams - ): Promise; -} diff --git a/sdk/consumption/arm-consumption/src/operationsInterfaces/credits.ts b/sdk/consumption/arm-consumption/src/operationsInterfaces/credits.ts deleted file mode 100644 index 4a074f54853d..000000000000 --- a/sdk/consumption/arm-consumption/src/operationsInterfaces/credits.ts +++ /dev/null @@ -1,24 +0,0 @@ -/* - * 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 { CreditsGetOptionalParams, CreditsGetResponse } from "../models"; - -/** Interface representing a Credits. */ -export interface Credits { - /** - * The credit summary by billingAccountId and billingProfileId. - * @param billingAccountId BillingAccount ID - * @param billingProfileId Azure Billing Profile ID. - * @param options The options parameters. - */ - get( - billingAccountId: string, - billingProfileId: string, - options?: CreditsGetOptionalParams - ): Promise; -} diff --git a/sdk/consumption/arm-consumption/src/operationsInterfaces/eventsOperations.ts b/sdk/consumption/arm-consumption/src/operationsInterfaces/eventsOperations.ts deleted file mode 100644 index 82b66c5d5513..000000000000 --- a/sdk/consumption/arm-consumption/src/operationsInterfaces/eventsOperations.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - EventSummary, - EventsListByBillingProfileOptionalParams, - EventsListByBillingAccountOptionalParams -} from "../models"; - -/// -/** Interface representing a EventsOperations. */ -export interface EventsOperations { - /** - * Lists the events that decrements Azure credits or Microsoft Azure consumption commitment for a - * billing account or a billing profile for a 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 options parameters. - */ - listByBillingProfile( - billingAccountId: string, - billingProfileId: string, - startDate: string, - endDate: string, - options?: EventsListByBillingProfileOptionalParams - ): PagedAsyncIterableIterator; - /** - * Lists the events that decrements Azure credits or Microsoft Azure consumption commitment for a - * billing account or a billing profile for a given start and end date. - * @param billingAccountId BillingAccount ID - * @param options The options parameters. - */ - listByBillingAccount( - billingAccountId: string, - options?: EventsListByBillingAccountOptionalParams - ): PagedAsyncIterableIterator; -} diff --git a/sdk/consumption/arm-consumption/src/operationsInterfaces/index.ts b/sdk/consumption/arm-consumption/src/operationsInterfaces/index.ts index b751ef901317..e0a7f3815338 100644 --- a/sdk/consumption/arm-consumption/src/operationsInterfaces/index.ts +++ b/sdk/consumption/arm-consumption/src/operationsInterfaces/index.ts @@ -6,20 +6,5 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -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 "./reservationRecommendationDetails"; -export * from "./reservationTransactions"; export * from "./priceSheet"; export * from "./operations"; -export * from "./aggregatedCost"; -export * from "./eventsOperations"; -export * from "./lotsOperations"; -export * from "./credits"; diff --git a/sdk/consumption/arm-consumption/src/operationsInterfaces/lotsOperations.ts b/sdk/consumption/arm-consumption/src/operationsInterfaces/lotsOperations.ts deleted file mode 100644 index cee7524cb172..000000000000 --- a/sdk/consumption/arm-consumption/src/operationsInterfaces/lotsOperations.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - LotSummary, - LotsListByBillingProfileOptionalParams, - LotsListByBillingAccountOptionalParams -} from "../models"; - -/// -/** Interface representing a LotsOperations. */ -export interface LotsOperations { - /** - * Lists all Azure credits and Microsoft Azure consumption commitments for a billing account or a - * billing profile. Microsoft Azure consumption commitments are only supported for the billing account - * scope. - * @param billingAccountId BillingAccount ID - * @param billingProfileId Azure Billing Profile ID. - * @param options The options parameters. - */ - listByBillingProfile( - billingAccountId: string, - billingProfileId: string, - options?: LotsListByBillingProfileOptionalParams - ): PagedAsyncIterableIterator; - /** - * Lists all Azure credits and Microsoft Azure consumption commitments for a billing account or a - * billing profile. Microsoft Azure consumption commitments are only supported for the billing account - * scope. - * @param billingAccountId BillingAccount ID - * @param options The options parameters. - */ - listByBillingAccount( - billingAccountId: string, - options?: LotsListByBillingAccountOptionalParams - ): PagedAsyncIterableIterator; -} diff --git a/sdk/consumption/arm-consumption/src/operationsInterfaces/marketplaces.ts b/sdk/consumption/arm-consumption/src/operationsInterfaces/marketplaces.ts deleted file mode 100644 index 5998f4baed58..000000000000 --- a/sdk/consumption/arm-consumption/src/operationsInterfaces/marketplaces.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { Marketplace, MarketplacesListOptionalParams } from "../models"; - -/// -/** Interface representing a Marketplaces. */ -export interface Marketplaces { - /** - * 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 options parameters. - */ - list( - scope: string, - options?: MarketplacesListOptionalParams - ): PagedAsyncIterableIterator; -} diff --git a/sdk/consumption/arm-consumption/src/operationsInterfaces/reservationRecommendationDetails.ts b/sdk/consumption/arm-consumption/src/operationsInterfaces/reservationRecommendationDetails.ts deleted file mode 100644 index 563830545ff9..000000000000 --- a/sdk/consumption/arm-consumption/src/operationsInterfaces/reservationRecommendationDetails.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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 { - Term, - LookBackPeriod, - ReservationRecommendationDetailsGetOptionalParams, - ReservationRecommendationDetailsGetResponse -} from "../models"; - -/** Interface representing a ReservationRecommendationDetails. */ -export interface ReservationRecommendationDetails { - /** - * 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 region Used to select the region the recommendation should be generated for. - * @param term Specify length of reservation recommendation term. - * @param lookBackPeriod Filter the time period on which reservation recommendation results are based. - * @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 options parameters. - */ - get( - scope: string, - region: string, - term: Term, - lookBackPeriod: LookBackPeriod, - product: string, - options?: ReservationRecommendationDetailsGetOptionalParams - ): Promise; -} diff --git a/sdk/consumption/arm-consumption/src/operationsInterfaces/reservationRecommendations.ts b/sdk/consumption/arm-consumption/src/operationsInterfaces/reservationRecommendations.ts deleted file mode 100644 index e4df3b2a4d35..000000000000 --- a/sdk/consumption/arm-consumption/src/operationsInterfaces/reservationRecommendations.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - ReservationRecommendationUnion, - ReservationRecommendationsListOptionalParams -} from "../models"; - -/// -/** Interface representing a ReservationRecommendations. */ -export interface ReservationRecommendations { - /** - * 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 options parameters. - */ - list( - scope: string, - options?: ReservationRecommendationsListOptionalParams - ): PagedAsyncIterableIterator; -} diff --git a/sdk/consumption/arm-consumption/src/operationsInterfaces/reservationTransactions.ts b/sdk/consumption/arm-consumption/src/operationsInterfaces/reservationTransactions.ts deleted file mode 100644 index bc3dd77c5727..000000000000 --- a/sdk/consumption/arm-consumption/src/operationsInterfaces/reservationTransactions.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - ReservationTransaction, - ReservationTransactionsListOptionalParams, - ModernReservationTransaction, - ReservationTransactionsListByBillingProfileOptionalParams -} from "../models"; - -/// -/** Interface representing a ReservationTransactions. */ -export interface ReservationTransactions { - /** - * List of transactions for reserved instances on billing account scope - * @param billingAccountId BillingAccount ID - * @param options The options parameters. - */ - list( - billingAccountId: string, - options?: ReservationTransactionsListOptionalParams - ): PagedAsyncIterableIterator; - /** - * List of transactions for reserved instances on billing account scope - * @param billingAccountId BillingAccount ID - * @param billingProfileId Azure Billing Profile ID. - * @param options The options parameters. - */ - listByBillingProfile( - billingAccountId: string, - billingProfileId: string, - options?: ReservationTransactionsListByBillingProfileOptionalParams - ): PagedAsyncIterableIterator; -} diff --git a/sdk/consumption/arm-consumption/src/operationsInterfaces/reservationsDetails.ts b/sdk/consumption/arm-consumption/src/operationsInterfaces/reservationsDetails.ts deleted file mode 100644 index 771aedbfc513..000000000000 --- a/sdk/consumption/arm-consumption/src/operationsInterfaces/reservationsDetails.ts +++ /dev/null @@ -1,59 +0,0 @@ -/* - * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - ReservationDetail, - ReservationsDetailsListByReservationOrderOptionalParams, - ReservationsDetailsListByReservationOrderAndReservationOptionalParams, - ReservationsDetailsListOptionalParams -} from "../models"; - -/// -/** Interface representing a ReservationsDetails. */ -export interface ReservationsDetails { - /** - * Lists the reservations details for provided date range. - * @param reservationOrderId Order Id of the reservation - * @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 options parameters. - */ - listByReservationOrder( - reservationOrderId: string, - filter: string, - options?: ReservationsDetailsListByReservationOrderOptionalParams - ): PagedAsyncIterableIterator; - /** - * Lists the reservations details for provided date range. - * @param reservationOrderId Order Id of the reservation - * @param reservationId Id of the reservation - * @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 options parameters. - */ - listByReservationOrderAndReservation( - reservationOrderId: string, - reservationId: string, - filter: string, - options?: ReservationsDetailsListByReservationOrderAndReservationOptionalParams - ): PagedAsyncIterableIterator; - /** - * 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 options parameters. - */ - list( - scope: string, - options?: ReservationsDetailsListOptionalParams - ): PagedAsyncIterableIterator; -} diff --git a/sdk/consumption/arm-consumption/src/operationsInterfaces/reservationsSummaries.ts b/sdk/consumption/arm-consumption/src/operationsInterfaces/reservationsSummaries.ts deleted file mode 100644 index 935d9eeaef13..000000000000 --- a/sdk/consumption/arm-consumption/src/operationsInterfaces/reservationsSummaries.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* - * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - ReservationSummary, - Datagrain, - ReservationsSummariesListByReservationOrderOptionalParams, - ReservationsSummariesListByReservationOrderAndReservationOptionalParams, - ReservationsSummariesListOptionalParams -} from "../models"; - -/// -/** Interface representing a ReservationsSummaries. */ -export interface ReservationsSummaries { - /** - * Lists the reservations summaries for daily or monthly grain. - * @param reservationOrderId Order Id of the reservation - * @param grain Can be daily or monthly - * @param options The options parameters. - */ - listByReservationOrder( - reservationOrderId: string, - grain: Datagrain, - options?: ReservationsSummariesListByReservationOrderOptionalParams - ): PagedAsyncIterableIterator; - /** - * Lists the reservations summaries for daily or monthly grain. - * @param reservationOrderId Order Id of the reservation - * @param reservationId Id of the reservation - * @param grain Can be daily or monthly - * @param options The options parameters. - */ - listByReservationOrderAndReservation( - reservationOrderId: string, - reservationId: string, - grain: Datagrain, - options?: ReservationsSummariesListByReservationOrderAndReservationOptionalParams - ): PagedAsyncIterableIterator; - /** - * 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 - * @param options The options parameters. - */ - list( - scope: string, - grain: Datagrain, - options?: ReservationsSummariesListOptionalParams - ): PagedAsyncIterableIterator; -} diff --git a/sdk/consumption/arm-consumption/src/operationsInterfaces/tags.ts b/sdk/consumption/arm-consumption/src/operationsInterfaces/tags.ts deleted file mode 100644 index 55499202f7c2..000000000000 --- a/sdk/consumption/arm-consumption/src/operationsInterfaces/tags.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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 { TagsGetOptionalParams, TagsGetResponse } from "../models"; - -/** Interface representing a Tags. */ -export interface Tags { - /** - * 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 options parameters. - */ - get(scope: string, options?: TagsGetOptionalParams): Promise; -} diff --git a/sdk/consumption/arm-consumption/src/operationsInterfaces/usageDetails.ts b/sdk/consumption/arm-consumption/src/operationsInterfaces/usageDetails.ts deleted file mode 100644 index b705a0dfe826..000000000000 --- a/sdk/consumption/arm-consumption/src/operationsInterfaces/usageDetails.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { UsageDetailUnion, UsageDetailsListOptionalParams } from "../models"; - -/// -/** Interface representing a UsageDetails. */ -export interface UsageDetails { - /** - * 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 options parameters. - */ - list( - scope: string, - options?: UsageDetailsListOptionalParams - ): PagedAsyncIterableIterator; -} diff --git a/sdk/consumption/arm-consumption/test/sampleTest.ts b/sdk/consumption/arm-consumption/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /dev/null +++ b/sdk/consumption/arm-consumption/test/sampleTest.ts @@ -0,0 +1,43 @@ +/* + * 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 { + Recorder, + RecorderStartOptions, + env +} from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { Context } from "mocha"; + +const replaceableVariables: Record = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function(this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/consumption/arm-consumption/tsconfig.json b/sdk/consumption/arm-consumption/tsconfig.json index 6e8ad365181f..3e6ae96443f3 100644 --- a/sdk/consumption/arm-consumption/tsconfig.json +++ b/sdk/consumption/arm-consumption/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-consumption": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"