From d0beee6833741cae04dceba03cad25778dfa4a7e Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Thu, 30 Jul 2020 04:14:24 +0000 Subject: [PATCH] Update from master --- sdk/billing/arm-billing/LICENSE.txt | 2 +- sdk/billing/arm-billing/README.md | 24 +- sdk/billing/arm-billing/package.json | 22 +- sdk/billing/arm-billing/rollup.config.js | 22 +- .../src/billingManagementClient.ts | 47 +- .../src/billingManagementClientContext.ts | 14 +- .../arm-billing/src/models/addressMappers.ts | 14 + .../src/models/agreementsMappers.ts | 48 + .../src/models/availableBalancesMappers.ts | 47 + .../src/models/billingAccountsMappers.ts | 51 + .../src/models/billingPeriodsMappers.ts | 48 +- .../src/models/billingPermissionsMappers.ts | 14 + .../src/models/billingProfilesMappers.ts | 49 + .../billingPropertyOperationsMappers.ts | 47 + .../models/billingRoleAssignmentsMappers.ts | 48 + .../models/billingRoleDefinitionsMappers.ts | 48 + .../src/models/billingSubscriptionsMappers.ts | 52 + .../src/models/customersMappers.ts | 48 + .../src/models/enrollmentAccountsMappers.ts | 48 +- sdk/billing/arm-billing/src/models/index.ts | 4779 +++++++++++++++-- .../src/models/instructionsMappers.ts | 48 + .../src/models/invoiceSectionsMappers.ts | 49 + .../arm-billing/src/models/invoicesMappers.ts | 51 +- sdk/billing/arm-billing/src/models/mappers.ts | 3207 ++++++++++- .../src/models/operationsMappers.ts | 13 +- .../arm-billing/src/models/parameters.ts | 148 +- .../arm-billing/src/models/policiesMappers.ts | 47 + .../arm-billing/src/models/productsMappers.ts | 52 + .../src/models/transactionsMappers.ts | 48 + .../arm-billing/src/operations/address.ts | 86 + .../arm-billing/src/operations/agreements.ts | 188 + .../src/operations/availableBalances.ts | 88 + .../src/operations/billingAccounts.ts | 348 ++ .../src/operations/billingPeriods.ts | 4 +- .../src/operations/billingPermissions.ts | 450 ++ .../src/operations/billingProfiles.ts | 263 + .../operations/billingPropertyOperations.ts | 139 + .../src/operations/billingRoleAssignments.ts | 729 +++ .../src/operations/billingRoleDefinitions.ts | 537 ++ .../src/operations/billingSubscriptions.ts | 720 +++ .../arm-billing/src/operations/customers.ts | 301 ++ .../src/operations/enrollmentAccounts.ts | 12 +- .../arm-billing/src/operations/index.ts | 20 +- .../src/operations/instructions.ts | 270 + .../src/operations/invoiceSections.ts | 275 + .../arm-billing/src/operations/invoices.ts | 551 +- .../arm-billing/src/operations/operations.ts | 6 +- .../arm-billing/src/operations/policies.ts | 281 + .../arm-billing/src/operations/products.ts | 740 +++ .../src/operations/transactions.ts | 137 + sdk/billing/arm-billing/tsconfig.json | 2 +- 51 files changed, 14703 insertions(+), 579 deletions(-) create mode 100644 sdk/billing/arm-billing/src/models/addressMappers.ts create mode 100644 sdk/billing/arm-billing/src/models/agreementsMappers.ts create mode 100644 sdk/billing/arm-billing/src/models/availableBalancesMappers.ts create mode 100644 sdk/billing/arm-billing/src/models/billingAccountsMappers.ts create mode 100644 sdk/billing/arm-billing/src/models/billingPermissionsMappers.ts create mode 100644 sdk/billing/arm-billing/src/models/billingProfilesMappers.ts create mode 100644 sdk/billing/arm-billing/src/models/billingPropertyOperationsMappers.ts create mode 100644 sdk/billing/arm-billing/src/models/billingRoleAssignmentsMappers.ts create mode 100644 sdk/billing/arm-billing/src/models/billingRoleDefinitionsMappers.ts create mode 100644 sdk/billing/arm-billing/src/models/billingSubscriptionsMappers.ts create mode 100644 sdk/billing/arm-billing/src/models/customersMappers.ts create mode 100644 sdk/billing/arm-billing/src/models/instructionsMappers.ts create mode 100644 sdk/billing/arm-billing/src/models/invoiceSectionsMappers.ts create mode 100644 sdk/billing/arm-billing/src/models/policiesMappers.ts create mode 100644 sdk/billing/arm-billing/src/models/productsMappers.ts create mode 100644 sdk/billing/arm-billing/src/models/transactionsMappers.ts create mode 100644 sdk/billing/arm-billing/src/operations/address.ts create mode 100644 sdk/billing/arm-billing/src/operations/agreements.ts create mode 100644 sdk/billing/arm-billing/src/operations/availableBalances.ts create mode 100644 sdk/billing/arm-billing/src/operations/billingAccounts.ts create mode 100644 sdk/billing/arm-billing/src/operations/billingPermissions.ts create mode 100644 sdk/billing/arm-billing/src/operations/billingProfiles.ts create mode 100644 sdk/billing/arm-billing/src/operations/billingPropertyOperations.ts create mode 100644 sdk/billing/arm-billing/src/operations/billingRoleAssignments.ts create mode 100644 sdk/billing/arm-billing/src/operations/billingRoleDefinitions.ts create mode 100644 sdk/billing/arm-billing/src/operations/billingSubscriptions.ts create mode 100644 sdk/billing/arm-billing/src/operations/customers.ts create mode 100644 sdk/billing/arm-billing/src/operations/instructions.ts create mode 100644 sdk/billing/arm-billing/src/operations/invoiceSections.ts create mode 100644 sdk/billing/arm-billing/src/operations/policies.ts create mode 100644 sdk/billing/arm-billing/src/operations/products.ts create mode 100644 sdk/billing/arm-billing/src/operations/transactions.ts diff --git a/sdk/billing/arm-billing/LICENSE.txt b/sdk/billing/arm-billing/LICENSE.txt index a70e8cf66038..ea8fb1516028 100644 --- a/sdk/billing/arm-billing/LICENSE.txt +++ b/sdk/billing/arm-billing/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2018 Microsoft +Copyright (c) 2020 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/billing/arm-billing/README.md b/sdk/billing/arm-billing/README.md index 38fe7bad160c..062da389b04a 100644 --- a/sdk/billing/arm-billing/README.md +++ b/sdk/billing/arm-billing/README.md @@ -9,23 +9,24 @@ This package contains an isomorphic SDK for BillingManagementClient. ### How to Install -``` +```bash npm install @azure/arm-billing ``` ### How to use -#### nodejs - Authentication, client creation and list enrollmentAccounts as an example written in TypeScript. +#### nodejs - Authentication, client creation and list billingAccounts as an example written in TypeScript. ##### Install @azure/ms-rest-nodeauth -``` -npm install @azure/ms-rest-nodeauth +- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. +```bash +npm install @azure/ms-rest-nodeauth@"^3.0.0" ``` ##### Sample code -```ts +```typescript import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; @@ -34,7 +35,8 @@ const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; msRestNodeAuth.interactiveLogin().then((creds) => { const client = new BillingManagementClient(creds, subscriptionId); - client.enrollmentAccounts.list().then((result) => { + const expand = "testexpand"; + client.billingAccounts.list(expand).then((result) => { console.log("The result is:"); console.log(result); }); @@ -43,11 +45,11 @@ msRestNodeAuth.interactiveLogin().then((creds) => { }); ``` -#### browser - Authentication, client creation and list enrollmentAccounts as an example written in JavaScript. +#### browser - Authentication, client creation and list billingAccounts as an example written in JavaScript. ##### Install @azure/ms-rest-browserauth -``` +```bash npm install @azure/ms-rest-browserauth ``` @@ -77,7 +79,8 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to authManager.login(); } const client = new Azure.ArmBilling.BillingManagementClient(res.creds, subscriptionId); - client.enrollmentAccounts.list().then((result) => { + const expand = "testexpand"; + client.billingAccounts.list(expand).then((result) => { console.log("The result is:"); console.log(result); }).catch((err) => { @@ -95,5 +98,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fbilling%2Farm-billing%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/billing/arm-billing/README.png) diff --git a/sdk/billing/arm-billing/package.json b/sdk/billing/arm-billing/package.json index 4dcc11b79fcb..6544bd1f668e 100644 --- a/sdk/billing/arm-billing/package.json +++ b/sdk/billing/arm-billing/package.json @@ -4,9 +4,9 @@ "description": "BillingManagementClient Library with typescript type definitions for node.js and browser.", "version": "2.2.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.1.0", - "@azure/ms-rest-js": "^1.1.0", - "tslib": "^1.9.3" + "@azure/ms-rest-azure-js": "^2.0.1", + "@azure/ms-rest-js": "^2.0.4", + "tslib": "^1.10.0" }, "keywords": [ "node", @@ -20,18 +20,19 @@ "module": "./esm/billingManagementClient.js", "types": "./esm/billingManagementClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", - "rollup": "^0.66.2", - "rollup-plugin-node-resolve": "^3.4.0", - "uglify-js": "^3.4.9" + "typescript": "^3.5.3", + "rollup": "^1.18.0", + "rollup-plugin-node-resolve": "^5.2.0", + "rollup-plugin-sourcemaps": "^0.4.2", + "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/azure/azure-sdk-for-js/tree/master/sdk/billing/arm-billing", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/billing/arm-billing", "repository": { "type": "git", - "url": "https://github.com/azure/azure-sdk-for-js.git" + "url": "https://github.com/Azure/azure-sdk-for-js.git" }, "bugs": { - "url": "https://github.com/azure/azure-sdk-for-js/issues" + "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, "files": [ "dist/**/*.js", @@ -43,6 +44,7 @@ "esm/**/*.d.ts", "esm/**/*.d.ts.map", "src/**/*.ts", + "README.md", "rollup.config.js", "tsconfig.json" ], diff --git a/sdk/billing/arm-billing/rollup.config.js b/sdk/billing/arm-billing/rollup.config.js index ae6725122752..e81d3ff3f6d5 100644 --- a/sdk/billing/arm-billing/rollup.config.js +++ b/sdk/billing/arm-billing/rollup.config.js @@ -1,10 +1,16 @@ +import rollup from "rollup"; import nodeResolve from "rollup-plugin-node-resolve"; +import sourcemaps from "rollup-plugin-sourcemaps"; + /** - * @type {import('rollup').RollupFileOptions} + * @type {rollup.RollupFileOptions} */ const config = { - input: './esm/billingManagementClient.js', - external: ["@azure/ms-rest-js", "@azure/ms-rest-azure-js"], + input: "./esm/billingManagementClient.js", + external: [ + "@azure/ms-rest-js", + "@azure/ms-rest-azure-js" + ], output: { file: "./dist/arm-billing.js", format: "umd", @@ -16,16 +22,16 @@ const config = { }, banner: `/* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */` }, plugins: [ - nodeResolve({ module: true }) + nodeResolve({ mainFields: ['module', 'main'] }), + sourcemaps() ] }; + export default config; diff --git a/sdk/billing/arm-billing/src/billingManagementClient.ts b/sdk/billing/arm-billing/src/billingManagementClient.ts index 171fe7188b39..b094c66e309e 100644 --- a/sdk/billing/arm-billing/src/billingManagementClient.ts +++ b/sdk/billing/arm-billing/src/billingManagementClient.ts @@ -17,23 +17,56 @@ import { BillingManagementClientContext } from "./billingManagementClientContext class BillingManagementClient extends BillingManagementClientContext { // Operation groups - enrollmentAccounts: operations.EnrollmentAccounts; - billingPeriods: operations.BillingPeriods; + billingAccounts: operations.BillingAccounts; + address: operations.Address; + availableBalances: operations.AvailableBalances; + instructions: operations.Instructions; + billingProfiles: operations.BillingProfiles; + customers: operations.Customers; + invoiceSections: operations.InvoiceSections; + billingPermissions: operations.BillingPermissions; + billingSubscriptions: operations.BillingSubscriptions; + products: operations.Products; invoices: operations.Invoices; + transactions: operations.Transactions; + policies: operations.Policies; + billingProperty: operations.BillingPropertyOperations; operations: operations.Operations; + billingRoleDefinitions: operations.BillingRoleDefinitions; + billingRoleAssignments: operations.BillingRoleAssignments; + agreements: operations.Agreements; + enrollmentAccounts: operations.EnrollmentAccounts; + billingPeriods: operations.BillingPeriods; /** * Initializes a new instance of the BillingManagementClient class. * @param credentials Credentials needed for the client to connect to Azure. - * @param subscriptionId Azure Subscription ID. + * @param subscriptionId The ID that uniquely identifies an Azure subscription. + * @param subscriptionId1 Azure Subscription ID. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.BillingManagementClientOptions) { - super(credentials, subscriptionId, options); - this.enrollmentAccounts = new operations.EnrollmentAccounts(this); - this.billingPeriods = new operations.BillingPeriods(this); + constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, subscriptionId1: string, options?: Models.BillingManagementClientOptions) { + super(credentials, subscriptionId, subscriptionId1, options); + this.billingAccounts = new operations.BillingAccounts(this); + this.address = new operations.Address(this); + this.availableBalances = new operations.AvailableBalances(this); + this.instructions = new operations.Instructions(this); + this.billingProfiles = new operations.BillingProfiles(this); + this.customers = new operations.Customers(this); + this.invoiceSections = new operations.InvoiceSections(this); + this.billingPermissions = new operations.BillingPermissions(this); + this.billingSubscriptions = new operations.BillingSubscriptions(this); + this.products = new operations.Products(this); this.invoices = new operations.Invoices(this); + this.transactions = new operations.Transactions(this); + this.policies = new operations.Policies(this); + this.billingProperty = new operations.BillingPropertyOperations(this); this.operations = new operations.Operations(this); + this.billingRoleDefinitions = new operations.BillingRoleDefinitions(this); + this.billingRoleAssignments = new operations.BillingRoleAssignments(this); + this.agreements = new operations.Agreements(this); + this.enrollmentAccounts = new operations.EnrollmentAccounts(this); + this.billingPeriods = new operations.BillingPeriods(this); } } diff --git a/sdk/billing/arm-billing/src/billingManagementClientContext.ts b/sdk/billing/arm-billing/src/billingManagementClientContext.ts index 3501b4ba6e55..a9d057d07d7a 100644 --- a/sdk/billing/arm-billing/src/billingManagementClientContext.ts +++ b/sdk/billing/arm-billing/src/billingManagementClientContext.ts @@ -13,26 +13,30 @@ import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-billing"; -const packageVersion = "0.1.0"; +const packageVersion = "2.2.0"; export class BillingManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; - apiVersion?: string; subscriptionId: string; + subscriptionId1: string; /** * Initializes a new instance of the BillingManagementClient class. * @param credentials Credentials needed for the client to connect to Azure. - * @param subscriptionId Azure Subscription ID. + * @param subscriptionId The ID that uniquely identifies an Azure subscription. + * @param subscriptionId1 Azure Subscription ID. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.BillingManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, subscriptionId1: string, options?: Models.BillingManagementClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } if (subscriptionId == undefined) { throw new Error('\'subscriptionId\' cannot be null.'); } + if (subscriptionId1 == undefined) { + throw new Error('\'subscriptionId1\' cannot be null.'); + } if (!options) { options = {}; @@ -44,13 +48,13 @@ export class BillingManagementClientContext extends msRestAzure.AzureServiceClie super(credentials, options); - this.apiVersion = '2018-03-01-preview'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; this.requestContentType = "application/json; charset=utf-8"; this.credentials = credentials; this.subscriptionId = subscriptionId; + this.subscriptionId1 = subscriptionId1; if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) { this.acceptLanguage = options.acceptLanguage; diff --git a/sdk/billing/arm-billing/src/models/addressMappers.ts b/sdk/billing/arm-billing/src/models/addressMappers.ts new file mode 100644 index 000000000000..e91750221510 --- /dev/null +++ b/sdk/billing/arm-billing/src/models/addressMappers.ts @@ -0,0 +1,14 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AddressDetails, + ErrorDetails, + ErrorResponse, + ValidateAddressResponse +} from "../models/mappers"; diff --git a/sdk/billing/arm-billing/src/models/agreementsMappers.ts b/sdk/billing/arm-billing/src/models/agreementsMappers.ts new file mode 100644 index 000000000000..710121a4573d --- /dev/null +++ b/sdk/billing/arm-billing/src/models/agreementsMappers.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AddressDetails, + Agreement, + AgreementListResult, + Amount, + AvailableBalance, + AzurePlan, + BaseResource, + BillingAccount, + BillingPeriod, + BillingPermissionsProperties, + BillingProfile, + BillingProfilesOnExpand, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscription, + Customer, + CustomerPolicy, + Department, + Document, + Enrollment, + EnrollmentAccount, + EnrollmentAccountSummary, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + IndirectRelationshipInfo, + Instruction, + Invoice, + InvoiceSection, + InvoiceSectionsOnExpand, + Participants, + PaymentProperties, + Policy, + Product, + Reseller, + Resource, + Transaction +} from "../models/mappers"; diff --git a/sdk/billing/arm-billing/src/models/availableBalancesMappers.ts b/sdk/billing/arm-billing/src/models/availableBalancesMappers.ts new file mode 100644 index 000000000000..ae44ccd1c588 --- /dev/null +++ b/sdk/billing/arm-billing/src/models/availableBalancesMappers.ts @@ -0,0 +1,47 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AddressDetails, + Agreement, + Amount, + AvailableBalance, + AzurePlan, + BaseResource, + BillingAccount, + BillingPeriod, + BillingPermissionsProperties, + BillingProfile, + BillingProfilesOnExpand, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscription, + Customer, + CustomerPolicy, + Department, + Document, + Enrollment, + EnrollmentAccount, + EnrollmentAccountSummary, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + IndirectRelationshipInfo, + Instruction, + Invoice, + InvoiceSection, + InvoiceSectionsOnExpand, + Participants, + PaymentProperties, + Policy, + Product, + Reseller, + Resource, + Transaction +} from "../models/mappers"; diff --git a/sdk/billing/arm-billing/src/models/billingAccountsMappers.ts b/sdk/billing/arm-billing/src/models/billingAccountsMappers.ts new file mode 100644 index 000000000000..a36dcc189b65 --- /dev/null +++ b/sdk/billing/arm-billing/src/models/billingAccountsMappers.ts @@ -0,0 +1,51 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AddressDetails, + Agreement, + Amount, + AvailableBalance, + AzurePlan, + BaseResource, + BillingAccount, + BillingAccountListResult, + BillingAccountUpdateRequest, + BillingPeriod, + BillingPermissionsProperties, + BillingProfile, + BillingProfilesOnExpand, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscription, + Customer, + CustomerPolicy, + Department, + Document, + Enrollment, + EnrollmentAccount, + EnrollmentAccountSummary, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + IndirectRelationshipInfo, + Instruction, + Invoice, + InvoiceSection, + InvoiceSectionListWithCreateSubPermissionResult, + InvoiceSectionsOnExpand, + InvoiceSectionWithCreateSubPermission, + Participants, + PaymentProperties, + Policy, + Product, + Reseller, + Resource, + Transaction +} from "../models/mappers"; diff --git a/sdk/billing/arm-billing/src/models/billingPeriodsMappers.ts b/sdk/billing/arm-billing/src/models/billingPeriodsMappers.ts index b06ea885b372..89325ebb4512 100644 --- a/sdk/billing/arm-billing/src/models/billingPeriodsMappers.ts +++ b/sdk/billing/arm-billing/src/models/billingPeriodsMappers.ts @@ -1,22 +1,48 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - BillingPeriodsListResult, - BillingPeriod, - Resource, + AddressDetails, + Agreement, + Amount, + AvailableBalance, + AzurePlan, BaseResource, - ErrorResponse, - ErrorDetails, + BillingAccount, + BillingPeriod, + BillingPeriodsListResult, + BillingPermissionsProperties, + BillingProfile, + BillingProfilesOnExpand, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscription, + Customer, + CustomerPolicy, + Department, + Document, + Enrollment, EnrollmentAccount, + EnrollmentAccountSummary, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + IndirectRelationshipInfo, + Instruction, Invoice, - DownloadUrl + InvoiceSection, + InvoiceSectionsOnExpand, + Participants, + PaymentProperties, + Policy, + Product, + Reseller, + Resource, + Transaction } from "../models/mappers"; - diff --git a/sdk/billing/arm-billing/src/models/billingPermissionsMappers.ts b/sdk/billing/arm-billing/src/models/billingPermissionsMappers.ts new file mode 100644 index 000000000000..f94d59342197 --- /dev/null +++ b/sdk/billing/arm-billing/src/models/billingPermissionsMappers.ts @@ -0,0 +1,14 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + BillingPermissionsListResult, + BillingPermissionsProperties, + ErrorDetails, + ErrorResponse +} from "../models/mappers"; diff --git a/sdk/billing/arm-billing/src/models/billingProfilesMappers.ts b/sdk/billing/arm-billing/src/models/billingProfilesMappers.ts new file mode 100644 index 000000000000..33d9008cb3a7 --- /dev/null +++ b/sdk/billing/arm-billing/src/models/billingProfilesMappers.ts @@ -0,0 +1,49 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AddressDetails, + Agreement, + Amount, + AvailableBalance, + AzurePlan, + BaseResource, + BillingAccount, + BillingPeriod, + BillingPermissionsProperties, + BillingProfile, + BillingProfileListResult, + BillingProfilesCreateOrUpdateHeaders, + BillingProfilesOnExpand, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscription, + Customer, + CustomerPolicy, + Department, + Document, + Enrollment, + EnrollmentAccount, + EnrollmentAccountSummary, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + IndirectRelationshipInfo, + Instruction, + Invoice, + InvoiceSection, + InvoiceSectionsOnExpand, + Participants, + PaymentProperties, + Policy, + Product, + Reseller, + Resource, + Transaction +} from "../models/mappers"; diff --git a/sdk/billing/arm-billing/src/models/billingPropertyOperationsMappers.ts b/sdk/billing/arm-billing/src/models/billingPropertyOperationsMappers.ts new file mode 100644 index 000000000000..ae44ccd1c588 --- /dev/null +++ b/sdk/billing/arm-billing/src/models/billingPropertyOperationsMappers.ts @@ -0,0 +1,47 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AddressDetails, + Agreement, + Amount, + AvailableBalance, + AzurePlan, + BaseResource, + BillingAccount, + BillingPeriod, + BillingPermissionsProperties, + BillingProfile, + BillingProfilesOnExpand, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscription, + Customer, + CustomerPolicy, + Department, + Document, + Enrollment, + EnrollmentAccount, + EnrollmentAccountSummary, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + IndirectRelationshipInfo, + Instruction, + Invoice, + InvoiceSection, + InvoiceSectionsOnExpand, + Participants, + PaymentProperties, + Policy, + Product, + Reseller, + Resource, + Transaction +} from "../models/mappers"; diff --git a/sdk/billing/arm-billing/src/models/billingRoleAssignmentsMappers.ts b/sdk/billing/arm-billing/src/models/billingRoleAssignmentsMappers.ts new file mode 100644 index 000000000000..df4669ff751d --- /dev/null +++ b/sdk/billing/arm-billing/src/models/billingRoleAssignmentsMappers.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AddressDetails, + Agreement, + Amount, + AvailableBalance, + AzurePlan, + BaseResource, + BillingAccount, + BillingPeriod, + BillingPermissionsProperties, + BillingProfile, + BillingProfilesOnExpand, + BillingProperty, + BillingRoleAssignment, + BillingRoleAssignmentListResult, + BillingRoleDefinition, + BillingSubscription, + Customer, + CustomerPolicy, + Department, + Document, + Enrollment, + EnrollmentAccount, + EnrollmentAccountSummary, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + IndirectRelationshipInfo, + Instruction, + Invoice, + InvoiceSection, + InvoiceSectionsOnExpand, + Participants, + PaymentProperties, + Policy, + Product, + Reseller, + Resource, + Transaction +} from "../models/mappers"; diff --git a/sdk/billing/arm-billing/src/models/billingRoleDefinitionsMappers.ts b/sdk/billing/arm-billing/src/models/billingRoleDefinitionsMappers.ts new file mode 100644 index 000000000000..13a8c8083423 --- /dev/null +++ b/sdk/billing/arm-billing/src/models/billingRoleDefinitionsMappers.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AddressDetails, + Agreement, + Amount, + AvailableBalance, + AzurePlan, + BaseResource, + BillingAccount, + BillingPeriod, + BillingPermissionsProperties, + BillingProfile, + BillingProfilesOnExpand, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingRoleDefinitionListResult, + BillingSubscription, + Customer, + CustomerPolicy, + Department, + Document, + Enrollment, + EnrollmentAccount, + EnrollmentAccountSummary, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + IndirectRelationshipInfo, + Instruction, + Invoice, + InvoiceSection, + InvoiceSectionsOnExpand, + Participants, + PaymentProperties, + Policy, + Product, + Reseller, + Resource, + Transaction +} from "../models/mappers"; diff --git a/sdk/billing/arm-billing/src/models/billingSubscriptionsMappers.ts b/sdk/billing/arm-billing/src/models/billingSubscriptionsMappers.ts new file mode 100644 index 000000000000..3b4596fef69e --- /dev/null +++ b/sdk/billing/arm-billing/src/models/billingSubscriptionsMappers.ts @@ -0,0 +1,52 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AddressDetails, + Agreement, + Amount, + AvailableBalance, + AzurePlan, + BaseResource, + BillingAccount, + BillingPeriod, + BillingPermissionsProperties, + BillingProfile, + BillingProfilesOnExpand, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscription, + BillingSubscriptionsListResult, + BillingSubscriptionsMoveHeaders, + Customer, + CustomerPolicy, + Department, + Document, + Enrollment, + EnrollmentAccount, + EnrollmentAccountSummary, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + IndirectRelationshipInfo, + Instruction, + Invoice, + InvoiceSection, + InvoiceSectionsOnExpand, + Participants, + PaymentProperties, + Policy, + Product, + Reseller, + Resource, + Transaction, + TransferBillingSubscriptionRequestProperties, + ValidateSubscriptionTransferEligibilityError, + ValidateSubscriptionTransferEligibilityResult +} from "../models/mappers"; diff --git a/sdk/billing/arm-billing/src/models/customersMappers.ts b/sdk/billing/arm-billing/src/models/customersMappers.ts new file mode 100644 index 000000000000..cbec0d82206d --- /dev/null +++ b/sdk/billing/arm-billing/src/models/customersMappers.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AddressDetails, + Agreement, + Amount, + AvailableBalance, + AzurePlan, + BaseResource, + BillingAccount, + BillingPeriod, + BillingPermissionsProperties, + BillingProfile, + BillingProfilesOnExpand, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscription, + Customer, + CustomerListResult, + CustomerPolicy, + Department, + Document, + Enrollment, + EnrollmentAccount, + EnrollmentAccountSummary, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + IndirectRelationshipInfo, + Instruction, + Invoice, + InvoiceSection, + InvoiceSectionsOnExpand, + Participants, + PaymentProperties, + Policy, + Product, + Reseller, + Resource, + Transaction +} from "../models/mappers"; diff --git a/sdk/billing/arm-billing/src/models/enrollmentAccountsMappers.ts b/sdk/billing/arm-billing/src/models/enrollmentAccountsMappers.ts index c6eb15ea27c6..7b0ba2a150ae 100644 --- a/sdk/billing/arm-billing/src/models/enrollmentAccountsMappers.ts +++ b/sdk/billing/arm-billing/src/models/enrollmentAccountsMappers.ts @@ -1,22 +1,48 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - EnrollmentAccountListResult, - EnrollmentAccount, - Resource, + AddressDetails, + Agreement, + Amount, + AvailableBalance, + AzurePlan, BaseResource, - ErrorResponse, - ErrorDetails, + BillingAccount, BillingPeriod, + BillingPermissionsProperties, + BillingProfile, + BillingProfilesOnExpand, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscription, + Customer, + CustomerPolicy, + Department, + Document, + Enrollment, + EnrollmentAccount, + EnrollmentAccountListResult, + EnrollmentAccountSummary, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + IndirectRelationshipInfo, + Instruction, Invoice, - DownloadUrl + InvoiceSection, + InvoiceSectionsOnExpand, + Participants, + PaymentProperties, + Policy, + Product, + Reseller, + Resource, + Transaction } from "../models/mappers"; - diff --git a/sdk/billing/arm-billing/src/models/index.ts b/sdk/billing/arm-billing/src/models/index.ts index 43c00d84b805..7cc262e63b69 100644 --- a/sdk/billing/arm-billing/src/models/index.ts +++ b/sdk/billing/arm-billing/src/models/index.ts @@ -1,11 +1,9 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js"; @@ -13,381 +11,4550 @@ import * as msRest from "@azure/ms-rest-js"; export { BaseResource, CloudError }; +/** + * Details of the Azure plan. + */ +export interface AzurePlan { + /** + * The sku id. + */ + skuId?: string; + /** + * The sku description. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly skuDescription?: string; +} + +/** + * Details of the reseller. + */ +export interface Reseller { + /** + * The MPN ID of the reseller. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly resellerId?: string; + /** + * The name of the reseller. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly description?: string; +} /** - * @interface - * An interface representing Resource. * The Resource model definition. - * - * @extends BaseResource */ export interface Resource extends BaseResource { /** - * @member {string} [id] Resource Id. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * @member {string} [name] Resource name. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** - * @member {string} [type] Resource type. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: string; } /** - * @interface - * An interface representing EnrollmentAccount. - * An enrollment account resource. - * - * @extends Resource + * A partner's customer. */ -export interface EnrollmentAccount extends Resource { +export interface Customer extends Resource { /** - * @member {string} [principalName] The account owner's principal name. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The ID of the billing profile for the invoice section. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly principalName?: string; + readonly billingProfileId?: string; + /** + * The name of the billing profile for the invoice section. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileDisplayName?: string; + /** + * The name of the customer. + */ + displayName?: string; + /** + * Azure plans enabled for the customer. + */ + enabledAzurePlans?: AzurePlan[]; + /** + * The list of resellers for which an Azure plan is enabled for the customer. + */ + resellers?: Reseller[]; } /** - * @interface - * An interface representing BillingPeriod. - * A billing period resource. - * - * @extends Resource + * Address details. */ -export interface BillingPeriod extends Resource { +export interface AddressDetails { /** - * @member {Date} [billingPeriodStartDate] The start of the date range - * covered by the billing period. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * First name. */ - readonly billingPeriodStartDate?: Date; + firstName?: string; /** - * @member {Date} [billingPeriodEndDate] The end of the date range covered by - * the billing period. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Last name. */ - readonly billingPeriodEndDate?: Date; + lastName?: string; /** - * @member {string[]} [invoiceIds] Array of invoice ids that associated with. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Company name. */ - readonly invoiceIds?: string[]; + companyName?: string; + /** + * Address line 1. + */ + addressLine1: string; + /** + * Address line 2. + */ + addressLine2?: string; + /** + * Address line 3. + */ + addressLine3?: string; + /** + * Address city. + */ + city?: string; + /** + * Address district. + */ + district?: string; + /** + * Address region. + */ + region?: string; + /** + * Country code uses ISO2, 2-digit format. + */ + country: string; + /** + * Postal code. + */ + postalCode?: string; + /** + * Email address. + */ + email?: string; + /** + * Phone number. + */ + phoneNumber?: string; } /** - * @interface - * An interface representing DownloadUrl. - * A secure URL that can be used to download a PDF invoice until the URL - * expires. - * + * Result of the address validation */ -export interface DownloadUrl { +export interface ValidateAddressResponse { /** - * @member {Date} [expiryTime] The time in UTC at which this download URL - * will expire. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * status of the address validation. Possible values include: 'Valid', 'Invalid' */ - readonly expiryTime?: Date; + status?: AddressValidationStatus; /** - * @member {string} [url] The URL to the PDF file. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The list of suggested addresses. */ - readonly url?: string; + suggestedAddresses?: AddressDetails[]; + /** + * Validation error message. + */ + validationMessage?: string; } /** - * @interface - * An interface representing ErrorDetails. - * The details of the error. - * + * The properties of the product to initiate a transfer. */ -export interface ErrorDetails { +export interface TransferProductRequestProperties { /** - * @member {string} [code] Error code. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The destination invoice section id. */ - readonly code?: string; + destinationInvoiceSectionId?: string; +} + +/** + * Request parameters to transfer billing subscription. + */ +export interface TransferBillingSubscriptionRequestProperties { /** - * @member {string} [message] Error message indicating why the operation - * failed. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The destination invoice section id. */ - readonly message?: string; + destinationInvoiceSectionId: string; +} + +/** + * Error details of the transfer eligibility validation + */ +export interface ValidateSubscriptionTransferEligibilityError { /** - * @member {string} [target] The target of the particular error. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Error code for the product transfer validation. Possible values include: 'InvalidSource', + * 'SubscriptionNotActive', 'InsufficientPermissionOnSource', + * 'InsufficientPermissionOnDestination', 'DestinationBillingProfilePastDue', + * 'SubscriptionTypeNotSupported', 'CrossBillingAccountNotAllowed', + * 'NotAvailableForDestinationMarket' */ - readonly target?: string; + code?: SubscriptionTransferValidationErrorCode; + /** + * The error message. + */ + message?: string; + /** + * Detailed error message explaining the error. + */ + details?: string; } /** - * @interface - * An interface representing ErrorResponse. - * Error response indicates that the service is not able to process the - * incoming request. The reason is provided in the error message. - * + * Result of the transfer eligibility validation. */ -export interface ErrorResponse { +export interface ValidateSubscriptionTransferEligibilityResult { /** - * @member {ErrorDetails} [error] The details of the error. + * Specifies whether the subscription is eligible to be transferred. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - error?: ErrorDetails; + readonly isMoveEligible?: boolean; + /** + * Validation error details. + */ + errorDetails?: ValidateSubscriptionTransferEligibilityError; +} + +/** + * The billing profile details of the partner of the customer for an indirect motion. + */ +export interface IndirectRelationshipInfo { + /** + * The billing account name of the partner or the customer for an indirect motion. + */ + billingAccountName?: string; + /** + * The billing profile name of the partner or the customer for an indirect motion. + */ + billingProfileName?: string; + /** + * The display name of the partner or customer for an indirect motion. + */ + displayName?: string; +} + +/** + * An invoice section. + */ +export interface InvoiceSection extends Resource { + /** + * The name of the invoice section. + */ + displayName?: string; + /** + * Dictionary of metadata associated with the invoice section. + */ + labels?: { [propertyName: string]: string }; + /** + * Identifies the state of an invoice section. Possible values include: 'Active', 'Restricted' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly state?: InvoiceSectionState; + /** + * The system generated unique identifier for an invoice section. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly systemId?: string; + /** + * Identifies the cloud environments that are associated with an invoice section. This is a + * system managed optional field and gets updated as the invoice section gets associated with + * accounts in various clouds. Possible values include: 'USGov', 'USNat', 'USSec' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly targetCloud?: TargetCloud; +} + +/** + * The invoice sections associated to the billing profile. By default this is not populated, unless + * it's specified in $expand. + */ +export interface InvoiceSectionsOnExpand { + /** + * Indicates whether there are more invoice sections than the ones listed in this collection. The + * collection lists a maximum of 50 invoice sections. To get all invoice sections, use the list + * invoice sections API. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly hasMoreResults?: boolean; + /** + * The invoice sections associated to the billing profile. + */ + value?: InvoiceSection[]; +} + +/** + * A billing profile. + */ +export interface BillingProfile extends Resource { + /** + * The name of the billing profile. + */ + displayName?: string; + /** + * The purchase order name that will appear on the invoices generated for the billing profile. + */ + poNumber?: string; + /** + * Identifies which services and purchases are paid by a billing profile. Possible values + * include: 'Direct', 'IndirectCustomer', 'IndirectPartner', 'CSPPartner' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingRelationshipType?: BillingRelationshipType; + /** + * Billing address. + */ + billTo?: AddressDetails; + /** + * Identifies the billing profile that is linked to another billing profile in indirect purchase + * motion. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly indirectRelationshipInfo?: IndirectRelationshipInfo; + /** + * Flag controlling whether the invoices for the billing profile are sent through email. + */ + invoiceEmailOptIn?: boolean; + /** + * The day of the month when the invoice for the billing profile is generated. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceDay?: number; + /** + * The currency in which the charges for the billing profile are billed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly currency?: string; + /** + * Information about the enabled azure plans. + */ + enabledAzurePlans?: AzurePlan[]; + /** + * The invoice sections associated to the billing profile. By default this is not populated, + * unless it's specified in $expand. + */ + invoiceSections?: InvoiceSectionsOnExpand; + /** + * Indicates whether user has read access to the billing profile. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly hasReadAccess?: boolean; + /** + * The system generated unique identifier for a billing profile. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly systemId?: string; + /** + * The status of the billing profile. Possible values include: 'Active', 'Disabled', 'Warned' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly status?: BillingProfileStatus; + /** + * Reason for the specified billing profile status. Possible values include: 'PastDue', + * 'SpendingLimitReached', 'SpendingLimitExpired' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly statusReasonCode?: StatusReasonCode; + /** + * The billing profile spending limit. Possible values include: 'Off', 'On' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly spendingLimit?: SpendingLimit; + /** + * Identifies the cloud environments that are associated with a billing profile. This is a system + * managed optional field and gets updated as the billing profile gets associated with accounts + * in various clouds. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly targetClouds?: TargetCloud[]; +} + +/** + * The billing profiles associated with the billing account. By default this is not populated, + * unless it's specified in $expand. + */ +export interface BillingProfilesOnExpand { + /** + * Indicates whether there are more billing profiles than the ones listed in this collection. The + * collection lists a maximum of 50 billing profiles. To get all billing profiles, use the list + * billing profiles API. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly hasMoreResults?: boolean; + /** + * The billing profiles associated with the billing account. + */ + value?: BillingProfile[]; +} + +/** + * The policies for Enterprise Agreement enrollments. + */ +export interface EnrollmentPolicies { + /** + * The policy that controls whether Account Owners can view charges. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly accountOwnerViewCharges?: boolean; + /** + * The policy that controls whether Department Administrators can view charges. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly departmentAdminViewCharges?: boolean; + /** + * The policy that controls whether Azure marketplace purchases are allowed in the enrollment. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly marketplacesEnabled?: boolean; + /** + * The policy that controls whether Azure reservation purchases are allowed in the enrollment. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly reservedInstancesEnabled?: boolean; +} + +/** + * The properties of an enrollment. + */ +export interface Enrollment { + /** + * The start date of the enrollment. + */ + startDate?: Date; + /** + * The end date of the enrollment. + */ + endDate?: Date; + /** + * The billing currency for the enrollment. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly currency?: string; + /** + * The channel type of the enrollment. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly channel?: string; + /** + * The policies for Enterprise Agreement enrollments. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly policies?: EnrollmentPolicies; + /** + * The language for the enrollment. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly language?: string; + /** + * The country code of the enrollment. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly countryCode?: string; + /** + * The current status of the enrollment. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly status?: string; + /** + * The billing cycle for the enrollment. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingCycle?: string; +} + +/** + * An enrollment account. + */ +export interface EnrollmentAccount extends Resource { + /** + * The name of the enrollment account. + */ + accountName?: string; + /** + * The cost center associated with the enrollment account. + */ + costCenter?: string; + /** + * The owner of the enrollment account. + */ + accountOwner?: string; + /** + * The status of the enrollment account. + */ + status?: string; + /** + * The start date of the enrollment account. + */ + startDate?: Date; + /** + * The end date of the enrollment account. + */ + endDate?: Date; + /** + * Associated department. By default this is not populated, unless it's specified in $expand. + */ + department?: Department; +} + +/** + * A department. + */ +export interface Department extends Resource { + /** + * The name of the department. + */ + departmentName?: string; + /** + * The cost center associated with the department. + */ + costCenter?: string; + /** + * The status of the department. + */ + status?: string; + /** + * Associated enrollment accounts. By default this is not populated, unless it's specified in + * $expand. + */ + enrollmentAccounts?: EnrollmentAccount[]; +} + +/** + * A billing account. + */ +export interface BillingAccount extends Resource { + /** + * The billing account name. + */ + displayName?: string; + /** + * The address of the individual or organization that is responsible for the billing account. + */ + soldTo?: AddressDetails; + /** + * The type of agreement. Possible values include: 'MicrosoftCustomerAgreement', + * 'EnterpriseAgreement', 'MicrosoftOnlineServicesProgram', 'MicrosoftPartnerAgreement' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly agreementType?: AgreementType; + /** + * The type of customer. Possible values include: 'Enterprise', 'Individual', 'Partner' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly accountType?: AccountType; + /** + * The current status of the billing account. Possible values include: 'Active', 'Deleted', + * 'Disabled', 'Expired', 'Transferred', 'Extended', 'Terminated' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly accountStatus?: AccountStatus; + /** + * The billing profiles associated with the billing account. By default this is not populated, + * unless it's specified in $expand. + */ + billingProfiles?: BillingProfilesOnExpand; + /** + * The details about the associated legacy enrollment. 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 enrollmentDetails?: Enrollment; + /** + * The departments associated to the enrollment. + */ + departments?: Department[]; + /** + * The accounts associated to the enrollment. + */ + enrollmentAccounts?: EnrollmentAccount[]; + /** + * Indicates whether user has read access to the billing account. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly hasReadAccess?: boolean; } /** - * @interface - * An interface representing Invoice. - * An invoice resource can be used download a PDF version of an invoice. - * - * @extends Resource + * The request properties of the billing account that can be updated. + */ +export interface BillingAccountUpdateRequest { + /** + * The billing account name. + */ + displayName?: string; + /** + * The address of the individual or organization that is responsible for the billing account. + */ + soldTo?: AddressDetails; + /** + * The type of agreement. Possible values include: 'MicrosoftCustomerAgreement', + * 'EnterpriseAgreement', 'MicrosoftOnlineServicesProgram', 'MicrosoftPartnerAgreement' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly agreementType?: AgreementType; + /** + * The type of customer. Possible values include: 'Enterprise', 'Individual', 'Partner' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly accountType?: AccountType; + /** + * The current status of the billing account. Possible values include: 'Active', 'Deleted', + * 'Disabled', 'Expired', 'Transferred', 'Extended', 'Terminated' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly accountStatus?: AccountStatus; + /** + * The billing profiles associated with the billing account. By default this is not populated, + * unless it's specified in $expand. + */ + billingProfiles?: BillingProfilesOnExpand; + /** + * The details about the associated legacy enrollment. 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 enrollmentDetails?: Enrollment; + /** + * The departments associated to the enrollment. + */ + departments?: Department[]; + /** + * The accounts associated to the enrollment. + */ + enrollmentAccounts?: EnrollmentAccount[]; + /** + * Indicates whether user has read access to the billing account. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly hasReadAccess?: boolean; +} + +/** + * A billing property. + */ +export interface BillingProperty extends Resource { + /** + * The email address on which the account admin gets all Azure notifications. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly accountAdminNotificationEmailAddress?: string; + /** + * The Azure AD tenant ID of the billing account for the subscription. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingTenantId?: string; + /** + * The ID of the billing account to which the subscription is billed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingAccountId?: string; + /** + * The name of the billing account to which the subscription is billed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingAccountDisplayName?: string; + /** + * The ID of the billing profile to which the subscription is billed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileId?: string; + /** + * The name of the billing profile to which the subscription is billed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileDisplayName?: string; + /** + * The status of the billing profile. Possible values include: 'Active', 'Disabled', 'Warned' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileStatus?: BillingProfileStatus; + /** + * Reason for the specified billing profile status. Possible values include: 'PastDue', + * 'SpendingLimitReached', 'SpendingLimitExpired' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileStatusReasonCode?: BillingProfileStatusReasonCode; + /** + * The billing profile spending limit. Possible values include: 'Off', 'On' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileSpendingLimit?: BillingProfileSpendingLimit; + /** + * The cost center applied to the subscription. + */ + costCenter?: string; + /** + * The ID of the invoice section to which the subscription is billed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceSectionId?: string; + /** + * The name of the invoice section to which the subscription is billed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceSectionDisplayName?: string; + /** + * Indicates whether user is the account admin. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly isAccountAdmin?: boolean; + /** + * The product ID of the Azure plan. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly productId?: string; + /** + * The product name of the Azure plan. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly productName?: string; + /** + * The sku ID of the Azure plan for the subscription. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly skuId?: string; + /** + * The sku description of the Azure plan for the subscription. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly skuDescription?: string; +} + +/** + * An instruction. + */ +export interface Instruction extends Resource { + /** + * The amount budgeted for this billing instruction. + */ + amount: number; + /** + * The date this billing instruction goes into effect. + */ + startDate: Date; + /** + * The date this billing instruction is no longer in effect. + */ + endDate: Date; + /** + * The date this billing instruction was created. + */ + creationDate?: Date; +} + +/** + * The request parameters for creating a new billing profile. + */ +export interface BillingProfileCreationRequest { + /** + * The name of the billing profile. + */ + displayName?: string; + /** + * The purchase order name that will appear on the invoices generated for the billing profile. + */ + poNumber?: string; + /** + * The address of the individual or organization that is responsible for the billing profile. + */ + billTo?: AddressDetails; + /** + * Flag controlling whether the invoices for the billing profile are sent through email. + */ + invoiceEmailOptIn?: boolean; + /** + * Enabled azure plans for the billing profile. + */ + enabledAzurePlans?: AzurePlan[]; +} + +/** + * The properties of the invoice section. + */ +export interface InvoiceSectionCreationRequest { + /** + * The name of the invoice section. + */ + displayName?: string; +} + +/** + * Invoice section properties with create subscription permission. + */ +export interface InvoiceSectionWithCreateSubPermission { + /** + * The ID of the invoice section. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceSectionId?: string; + /** + * The name of the invoice section. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceSectionDisplayName?: string; + /** + * The system generated unique identifier for an invoice section. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceSectionSystemId?: string; + /** + * The ID of the billing profile for the invoice section. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileId?: string; + /** + * The name of the billing profile for the invoice section. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileDisplayName?: string; + /** + * The status of the billing profile. Possible values include: 'Active', 'Disabled', 'Warned' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileStatus?: BillingProfileStatus; + /** + * Reason for the specified billing profile status. Possible values include: 'PastDue', + * 'SpendingLimitReached', 'SpendingLimitExpired' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileStatusReasonCode?: StatusReasonCodeForBillingProfile; + /** + * The billing profile spending limit. Possible values include: 'Off', 'On' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileSpendingLimit?: SpendingLimitForBillingProfile; + /** + * The system generated unique identifier for a billing profile. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileSystemId?: string; + /** + * Enabled azure plans for the associated billing profile. + */ + enabledAzurePlans?: AzurePlan[]; +} + +/** + * A secure URL that can be used to download a an entity until the URL expires. + */ +export interface DownloadUrl { + /** + * The time in UTC when the download URL will expire. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly expiryTime?: Date; + /** + * The URL to the PDF file. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly url?: string; +} + +/** + * The details of the error. + */ +export interface ErrorDetails { + /** + * Error code. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly code?: string; + /** + * Error message indicating why the operation failed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly message?: string; + /** + * The target of the particular error. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly target?: string; +} + +/** + * Error response indicates that the service is not able to process the incoming request. The + * reason is provided in the error message. + */ +export interface ErrorResponse { + /** + * The details of the error. + */ + error?: ErrorDetails; +} + +/** + * The amount. + */ +export interface Amount { + /** + * The currency for the amount value. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly currency?: string; + /** + * Amount value. + */ + value?: number; +} + +/** + * The properties of a document. + */ +export interface Document { + /** + * The type of the document. Possible values include: 'Invoice', 'VoidNote', 'TaxReceipt', + * 'CreditNote' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly kind?: DocumentType; + /** + * Document URL. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly url?: string; + /** + * The source of the document. ENF for Brazil and DRS for rest of the world. Possible values + * include: 'DRS', 'ENF' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly source?: DocumentSource; +} + +/** + * The properties of a payment. + */ +export interface PaymentProperties { + /** + * The type of payment. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly paymentType?: string; + /** + * The paid amount. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly amount?: Amount; + /** + * The date when the payment was made. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly date?: Date; + /** + * The family of payment method. Possible values include: 'Credits', 'CheckWire', 'CreditCard', + * 'None' + */ + paymentMethodFamily?: PaymentMethodFamily; + /** + * The type of payment method. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly paymentMethodType?: string; +} + +/** + * An invoice. + */ +export interface Invoice extends Resource { + /** + * The due date for the invoice. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly dueDate?: Date; + /** + * The date when the invoice was generated. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceDate?: Date; + /** + * The current status of the invoice. Possible values include: 'Due', 'OverDue', 'Paid' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly status?: InvoiceStatus; + /** + * The amount due as of now. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly amountDue?: Amount; + /** + * The amount of Azure prepayment applied to the charges. This field is applicable to billing + * accounts with agreement type Microsoft Customer Agreement. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly azurePrepaymentApplied?: Amount; + /** + * The total charges for the invoice billing period. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billedAmount?: Amount; + /** + * The total refund for returns and cancellations during the invoice billing period. This field + * is applicable to billing accounts with agreement type Microsoft Customer Agreement. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly creditAmount?: Amount; + /** + * The amount of free Azure credits applied to the charges. This field is applicable to billing + * accounts with agreement type Microsoft Customer Agreement. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly freeAzureCreditApplied?: Amount; + /** + * The pre-tax amount due. This field is applicable to billing accounts with agreement type + * Microsoft Customer Agreement. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly subTotal?: Amount; + /** + * The amount of tax charged for the billing period. This field is applicable to billing accounts + * with agreement type Microsoft Customer Agreement. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly taxAmount?: Amount; + /** + * The amount due when the invoice was generated. This field is applicable to billing accounts + * with agreement type Microsoft Customer Agreement. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly totalAmount?: Amount; + /** + * The start date of the billing period for which the invoice is generated. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoicePeriodStartDate?: Date; + /** + * The end date of the billing period for which the invoice is generated. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoicePeriodEndDate?: Date; + /** + * Invoice type. Possible values include: 'AzureService', 'AzureMarketplace', 'AzureSupport' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceType?: InvoiceType; + /** + * Specifies if the invoice is generated as part of monthly invoicing cycle or not. This field is + * applicable to billing accounts with agreement type Microsoft Customer Agreement. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly isMonthlyInvoice?: boolean; + /** + * The ID of the billing profile for which the invoice is generated. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileId?: string; + /** + * The name of the billing profile for which the invoice is generated. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileDisplayName?: string; + /** + * An optional purchase order number for the invoice. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly purchaseOrderNumber?: string; + /** + * List of documents available to download such as invoice and tax receipt. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly documents?: Document[]; + /** + * List of payments. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly payments?: PaymentProperties[]; + /** + * The ID of the subscription for which the invoice is generated. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly subscriptionId?: string; +} + +/** + * A product. + */ +export interface Product extends Resource { + /** + * Indicates whether auto renewal is turned on or off for a product. Possible values include: + * 'Off', 'On' + */ + autoRenew?: AutoRenew; + /** + * The display name of the product. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly displayName?: string; + /** + * The date when the product was purchased. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly purchaseDate?: Date; + /** + * The ID of the type of product. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly productTypeId?: string; + /** + * The description of the type of product. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly productType?: string; + /** + * The current status of the product. Possible values include: 'Active', 'Inactive', 'PastDue', + * 'Expiring', 'Expired', 'Disabled', 'Cancelled', 'AutoRenew' + */ + status?: ProductStatusType; + /** + * The date when the product will be renewed or canceled. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly endDate?: Date; + /** + * The frequency at which the product will be billed. Possible values include: 'OneTime', + * 'Monthly', 'UsageBased' + */ + billingFrequency?: BillingFrequency; + /** + * The last month charges. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly lastCharge?: Amount; + /** + * The date of the last charge. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly lastChargeDate?: Date; + /** + * The quantity purchased for the product. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly quantity?: number; + /** + * The sku ID of the product. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly skuId?: string; + /** + * The sku description of the product. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly skuDescription?: string; + /** + * The id of the tenant in which the product is used. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly tenantId?: string; + /** + * The availability of the product. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly availabilityId?: string; + /** + * The ID of the invoice section to which the product is billed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceSectionId?: string; + /** + * The name of the invoice section to which the product is billed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceSectionDisplayName?: string; + /** + * The ID of the billing profile to which the product is billed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileId?: string; + /** + * The name of the billing profile to which the product is billed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileDisplayName?: string; + /** + * The ID of the customer for whom the product was purchased. The field is applicable only for + * Microsoft Partner Agreement billing account. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly customerId?: string; + /** + * The name of the customer for whom the product was purchased. The field is applicable only for + * Microsoft Partner Agreement billing account. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly customerDisplayName?: string; + /** + * Reseller for this product. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly reseller?: Reseller; +} + +/** + * Error details of the product transfer eligibility validation. + */ +export interface ValidateProductTransferEligibilityError { + /** + * Error code for the product transfer validation. Possible values include: 'InvalidSource', + * 'ProductNotActive', 'InsufficientPermissionOnSource', 'InsufficientPermissionOnDestination', + * 'DestinationBillingProfilePastDue', 'ProductTypeNotSupported', + * 'CrossBillingAccountNotAllowed', 'NotAvailableForDestinationMarket', + * 'OneTimePurchaseProductTransferNotAllowed' + */ + code?: ProductTransferValidationErrorCode; + /** + * The error message. + */ + message?: string; + /** + * Detailed error message explaining the error. + */ + details?: string; +} + +/** + * Result of the product transfer eligibility validation. + */ +export interface ValidateProductTransferEligibilityResult { + /** + * Specifies whether the transfer is eligible or not. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly isMoveEligible?: boolean; + /** + * Validation error details. + */ + errorDetails?: ValidateProductTransferEligibilityError; +} + +/** + * A billing subscription. + */ +export interface BillingSubscription extends Resource { + /** + * The name of the subscription. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly displayName?: string; + /** + * The ID of the subscription. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly subscriptionId?: string; + /** + * The current billing status of the subscription. Possible values include: 'Active', 'Inactive', + * 'Abandoned', 'Deleted', 'Warning' + */ + subscriptionBillingStatus?: BillingSubscriptionStatusType; + /** + * The last month charges. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly lastMonthCharges?: Amount; + /** + * The current month to date charges. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly monthToDateCharges?: Amount; + /** + * The ID of the billing profile to which the subscription is billed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileId?: string; + /** + * The name of the billing profile to which the subscription is billed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileDisplayName?: string; + /** + * The cost center applied to the subscription. + */ + costCenter?: string; + /** + * The ID of the customer for whom the subscription was created. The field is applicable only for + * Microsoft Partner Agreement billing account. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly customerId?: string; + /** + * The name of the customer for whom the subscription was created. The field is applicable only + * for Microsoft Partner Agreement billing account. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly customerDisplayName?: string; + /** + * The ID of the invoice section to which the subscription is billed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceSectionId?: string; + /** + * The name of the invoice section to which the subscription is billed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceSectionDisplayName?: string; + /** + * Reseller for this subscription. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly reseller?: Reseller; + /** + * The sku ID of the Azure plan for the subscription. + */ + skuId?: string; + /** + * The sku description of the Azure plan for the subscription. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly skuDescription?: string; +} + +/** + * The enrollment account context + */ +export interface EnrollmentAccountContext { + /** + * The cost center associated with the enrollment account. + */ + costCenter?: string; + /** + * The start date of the enrollment account. + */ + startDate?: Date; + /** + * The end date of the enrollment account. + */ + endDate?: Date; + /** + * The ID of the enrollment account. + */ + enrollmentAccountName?: string; +} + +/** + * A transaction. + */ +export interface Transaction extends Resource { + /** + * The kind of transaction. Options are all or reservation. Possible values include: 'all', + * 'reservation' + */ + kind?: TransactionTypeKind; + /** + * The date of transaction. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly date?: Date; + /** + * Invoice on which the transaction was billed or 'pending' if the transaction is not billed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoice?: string; + /** + * The ID of the invoice on which the transaction was billed. This field is only applicable for + * transactions which are billed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceId?: string; + /** + * The order ID of the reservation. The field is only applicable for transaction of kind + * reservation. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly orderId?: string; + /** + * The name of the reservation order. The field is only applicable for transactions of kind + * reservation. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly orderName?: string; + /** + * The family of the product for which the transaction took place. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly productFamily?: string; + /** + * The ID of the product type for which the transaction took place. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly productTypeId?: string; + /** + * The type of the product for which the transaction took place. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly productType?: string; + /** + * The description of the product for which the transaction took place. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly productDescription?: string; + /** + * The type of transaction. Possible values include: 'Purchase', 'Usage Charge' + */ + transactionType?: ReservationType; + /** + * The charge associated with the transaction. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly transactionAmount?: Amount; + /** + * The quantity purchased in the transaction. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly quantity?: number; + /** + * The ID of the invoice section which will be billed for the transaction. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceSectionId?: string; + /** + * The name of the invoice section which will be billed for the transaction. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceSectionDisplayName?: string; + /** + * The ID of the billing profile which will be billed for the transaction. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileId?: string; + /** + * The name of the billing profile which will be billed for the transaction. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileDisplayName?: string; + /** + * The ID of the customer for which the transaction took place. The field is applicable only for + * Microsoft Partner Agreement billing account. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly customerId?: string; + /** + * The name of the customer for which the transaction took place. The field is applicable only + * for Microsoft Partner Agreement billing account. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly customerDisplayName?: string; + /** + * The ID of the subscription that was used for the transaction. The field is only applicable for + * transaction of kind reservation. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly subscriptionId?: string; + /** + * The name of the subscription that was used for the transaction. The field is only applicable + * for transaction of kind reservation. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly subscriptionName?: string; + /** + * The type of azure plan of the subscription that was used for the transaction. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly azurePlan?: string; + /** + * The amount of any Azure credits automatically applied to this transaction. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly azureCreditApplied?: Amount; + /** + * The ISO 4217 code for the currency in which this transaction is billed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingCurrency?: string; + /** + * The percentage discount, if any, applied to this transaction. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly discount?: number; + /** + * The price of the product after applying any discounts. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly effectivePrice?: Amount; + /** + * The exchange rate used to convert charged amount to billing currency, if applicable. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly exchangeRate?: number; + /** + * The retail price of the product. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly marketPrice?: Amount; + /** + * The ISO 4217 code for the currency in which the product is priced. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly pricingCurrency?: string; + /** + * The date of the purchase of the product, or the start date of the month in which usage + * started. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly servicePeriodStartDate?: Date; + /** + * The end date of the product term, or the end date of the month in which usage ended. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly servicePeriodEndDate?: Date; + /** + * The pre-tax charged amount for the transaction. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly subTotal?: Amount; + /** + * The tax amount applied to the transaction. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly tax?: Amount; + /** + * The unit of measure used to bill for the product. For example, compute services are billed per + * hour. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly unitOfMeasure?: string; + /** + * The number of units used for a given product. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly units?: number; + /** + * The description for the unit of measure for a given product. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly unitType?: string; +} + +/** + * A policy. + */ +export interface Policy extends Resource { + /** + * The policy that controls whether Azure marketplace purchases are allowed for a billing + * profile. Possible values include: 'AllAllowed', 'OnlyFreeAllowed', 'NotAllowed' + */ + marketplacePurchases?: MarketplacePurchasesPolicy; + /** + * The policy that controls whether Azure reservation purchases are allowed for a billing + * profile. Possible values include: 'Allowed', 'NotAllowed' + */ + reservationPurchases?: ReservationPurchasesPolicy; + /** + * The policy that controls whether users with Azure RBAC access to a subscription can view its + * charges. Possible values include: 'Allowed', 'NotAllowed' + */ + viewCharges?: ViewChargesPolicy; +} + +/** + * The customer's Policy. + */ +export interface CustomerPolicy extends Resource { + /** + * The policy that controls whether the users in customer's organization can view charges at + * pay-as-you-go prices. Possible values include: 'Allowed', 'NotAllowed' + */ + viewCharges?: ViewCharges; +} + +/** + * The latest Azure credit balance. This is the balance available for pay now. + */ +export interface AvailableBalance extends Resource { + /** + * Balance amount. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly amount?: Amount; +} + +/** + * The object that represents the operation. + */ +export interface OperationDisplay { + /** + * Service provider: Microsoft.Billing. + * **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 such as invoice and billing subscription. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly resource?: string; + /** + * Operation type such as read, write and delete. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly operation?: string; +} + +/** + * A Billing REST API operation. + */ +export interface Operation { + /** + * Operation name: {provider}/{resource}/{operation}. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The object that represents the operation. + */ + display?: OperationDisplay; +} + +/** + * The role assignment + */ +export interface BillingRoleAssignment extends Resource { + /** + * The date the role assignment was created. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly createdOn?: string; + /** + * The tenant Id of the user who created the role assignment. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly createdByPrincipalTenantId?: string; + /** + * The principal Id of the user who created the role assignment. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly createdByPrincipalId?: string; + /** + * The email address of the user who created the role assignment. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly createdByUserEmailAddress?: string; + /** + * The principal id of the user to whom the role was assigned. + */ + principalId?: string; + /** + * The principal tenant id of the user to whom the role was assigned. + */ + principalTenantId?: string; + /** + * The ID of the role definition. + */ + roleDefinitionId?: string; + /** + * The scope at which the role was assigned. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly scope?: string; + /** + * The authentication type. + */ + userAuthenticationType?: string; + /** + * The email address of the user. + */ + userEmailAddress?: string; +} + +/** + * The set of allowed action and not allowed actions a caller has on a billing account + */ +export interface BillingPermissionsProperties { + /** + * The set of actions that the caller is allowed to perform. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly actions?: string[]; + /** + * The set of actions that the caller is not allowed to perform. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly notActions?: string[]; +} + +/** + * The properties of a role definition. + */ +export interface BillingRoleDefinition extends Resource { + /** + * The role description + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly description?: string; + /** + * The billingPermissions the role has + */ + permissions?: BillingPermissionsProperties[]; + /** + * The name of the role + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly roleName?: string; +} + +/** + * The details about a participant. + */ +export interface Participants { + /** + * The acceptance status of the participant. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly status?: string; + /** + * The date when the status got changed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly statusDate?: Date; + /** + * The email address of the participant. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly email?: string; +} + +/** + * An agreement. + */ +export interface Agreement extends Resource { + /** + * The URL to download the agreement. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly agreementLink?: string; + /** + * The category of the agreement signed by a customer. Possible values include: + * 'MicrosoftCustomerAgreement', 'AffiliatePurchaseTerms', 'Other' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly category?: Category; + /** + * The mode of acceptance for an agreement. Possible values include: 'ClickToAccept', + * 'ESignEmbedded', 'ESignOffline' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly acceptanceMode?: AcceptanceMode; + /** + * The date from which the agreement is effective. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly effectiveDate?: Date; + /** + * The date when the agreement expires. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly expirationDate?: Date; + /** + * The list of participants that participates in acceptance of an agreement. + */ + participants?: Participants[]; + /** + * The current status of the agreement. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly status?: string; +} + +/** + * An enrollment account resource. + */ +export interface EnrollmentAccountSummary extends Resource { + /** + * The account owner's principal name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalName?: string; +} + +/** + * A billing period resource. + */ +export interface BillingPeriod extends Resource { + /** + * The start of the date range covered by the billing period. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingPeriodStartDate?: Date; + /** + * The end of the date range covered by the billing period. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingPeriodEndDate?: Date; + /** + * Array of invoice ids that associated with. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceIds?: string[]; +} + +/** + * Optional Parameters. + */ +export interface BillingAccountsListOptionalParams extends msRest.RequestOptionsBase { + /** + * May be used to expand the soldTo, invoice sections and billing profiles. + */ + expand?: string; +} + +/** + * Optional Parameters. + */ +export interface BillingAccountsGetOptionalParams extends msRest.RequestOptionsBase { + /** + * May be used to expand the soldTo, invoice sections and billing profiles. + */ + expand?: string; +} + +/** + * Optional Parameters. + */ +export interface BillingProfilesListByBillingAccountOptionalParams extends msRest.RequestOptionsBase { + /** + * May be used to expand the invoice sections. + */ + expand?: string; +} + +/** + * Optional Parameters. + */ +export interface BillingProfilesGetOptionalParams extends msRest.RequestOptionsBase { + /** + * May be used to expand the invoice sections. + */ + expand?: string; +} + +/** + * Optional Parameters. + */ +export interface CustomersListByBillingProfileOptionalParams extends msRest.RequestOptionsBase { + /** + * Used for searching customers by their name. Any customer with name containing the search text + * will be included in the response + */ + search?: string; + /** + * May be used to filter the list of customers. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface CustomersListByBillingAccountOptionalParams extends msRest.RequestOptionsBase { + /** + * Used for searching customers by their name. Any customer with name containing the search text + * will be included in the response + */ + search?: string; + /** + * May be used to filter the list of customers. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface CustomersGetOptionalParams extends msRest.RequestOptionsBase { + /** + * May be used to expand enabledAzurePlans and resellers + */ + expand?: string; +} + +/** + * Optional Parameters. + */ +export interface ProductsListByBillingAccountOptionalParams extends msRest.RequestOptionsBase { + /** + * May be used to filter by product type. 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 are separated by a colon (:). + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface ProductsListByBillingProfileOptionalParams extends msRest.RequestOptionsBase { + /** + * May be used to filter by product type. 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 are separated by a colon (:). + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface ProductsListByInvoiceSectionOptionalParams extends msRest.RequestOptionsBase { + /** + * May be used to filter by product type. 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 are separated by a colon (:). + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface ProductsMoveOptionalParams extends msRest.RequestOptionsBase { + /** + * The destination invoice section id. + */ + destinationInvoiceSectionId?: string; +} + +/** + * Optional Parameters. + */ +export interface ProductsValidateMoveOptionalParams extends msRest.RequestOptionsBase { + /** + * The destination invoice section id. + */ + destinationInvoiceSectionId?: string; +} + +/** + * Optional Parameters. + */ +export interface PoliciesUpdateCustomerOptionalParams extends msRest.RequestOptionsBase { + /** + * The policy that controls whether the users in customer's organization can view charges at + * pay-as-you-go prices. Possible values include: 'Allowed', 'NotAllowed' + */ + viewCharges?: ViewCharges; +} + +/** + * Optional Parameters. + */ +export interface BillingPropertyUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * The cost center applied to the subscription. + */ + costCenter?: string; +} + +/** + * Optional Parameters. + */ +export interface AgreementsListByBillingAccountOptionalParams extends msRest.RequestOptionsBase { + /** + * May be used to expand the participants. + */ + expand?: string; +} + +/** + * Optional Parameters. + */ +export interface AgreementsGetOptionalParams extends msRest.RequestOptionsBase { + /** + * May be used to expand the participants. + */ + expand?: string; +} + +/** + * Optional Parameters. + */ +export interface BillingPeriodsListOptionalParams extends msRest.RequestOptionsBase { + /** + * May be used to filter billing periods by billingPeriodEndDate. 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 billing periods. + */ + top?: number; +} + +/** + * An interface representing BillingManagementClientOptions. + */ +export interface BillingManagementClientOptions extends AzureServiceClientOptions { + baseUri?: string; +} + +/** + * Defines headers for CreateOrUpdate operation. + */ +export interface BillingProfilesCreateOrUpdateHeaders { + /** + * Location URI to poll for result + */ + location: string; + /** + * Recommended time to wait before making another request to check the status of the operation. + * The time is specified in seconds. + */ + retryAfter: number; +} + +/** + * Defines headers for CreateOrUpdate operation. + */ +export interface InvoiceSectionsCreateOrUpdateHeaders { + /** + * Location URI to poll for result + */ + location: string; + /** + * Recommended time to wait before making another request to check the status of the operation. + * The time is specified in seconds. + */ + retryAfter: number; +} + +/** + * Defines headers for DownloadInvoice operation. + */ +export interface InvoicesDownloadInvoiceHeaders { + /** + * GET this URL to retrieve the status of the asynchronous operation. + */ + location: string; + /** + * The amount of delay to use while the status of the operation is checked. The value is + * expressed in seconds. + */ + retryAfter: string; +} + +/** + * Defines headers for DownloadBillingSubscriptionInvoice operation. + */ +export interface InvoicesDownloadBillingSubscriptionInvoiceHeaders { + /** + * GET this URL to retrieve the status of the asynchronous operation. + */ + location: string; + /** + * The amount of delay to use while the status of the operation is checked. The value is + * expressed in seconds. + */ + retryAfter: string; +} + +/** + * Defines headers for Move operation. + */ +export interface BillingSubscriptionsMoveHeaders { + /** + * Location URI to poll for result. + */ + location: string; + /** + * Recommended time to wait before making another request to check the status of the operation. + * The time is specified in seconds. + */ + retryAfter: number; +} + +/** + * Defines headers for Move operation. + */ +export interface ProductsMoveHeaders { + /** + * Location URI to poll for result + */ + location: string; + /** + * Recommended time to wait before making another request to check the status of the operation. + * The time is specified in seconds. + */ + retryAfter: number; +} + +/** + * @interface + * The list of billing accounts. + * @extends Array + */ +export interface BillingAccountListResult extends Array { + /** + * The link (url) to the next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * The list of invoice section properties with create subscription permission. + * @extends Array + */ +export interface InvoiceSectionListWithCreateSubPermissionResult extends Array { + /** + * The link (url) to the next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * The list of billing instructions used during invoice generation. + * @extends Array + */ +export interface InstructionListResult extends Array { + /** + * The link (url) to the next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * The list of billing profiles. + * @extends Array + */ +export interface BillingProfileListResult extends Array { + /** + * The link (url) to the next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * The list of customers. + * @extends Array + */ +export interface CustomerListResult extends Array { + /** + * The link (url) to the next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * The list of invoice sections. + * @extends Array + */ +export interface InvoiceSectionListResult extends Array { + /** + * The link (url) to the next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * Result of list billingPermissions a caller has on a billing account. + * @extends Array + */ +export interface BillingPermissionsListResult extends Array { + /** + * The link (url) to the next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * The list of billing subscriptions. + * @extends Array + */ +export interface BillingSubscriptionsListResult extends Array { + /** + * The link (url) to the next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * The list of products. It contains a list of available product summaries in reverse chronological + * order by purchase date. + * @extends Array + */ +export interface ProductsListResult extends Array { + /** + * The link (url) to the next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * The list of invoices. + * @extends Array + */ +export interface InvoiceListResult extends Array { + /** + * The link (url) to the next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * The list of transactions. + * @extends Array + */ +export interface TransactionListResult extends Array { + /** + * The link (url) to the next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * The list of billing operations and a URL link to get the next set of results. + * @extends Array + */ +export interface OperationListResult extends Array { + /** + * 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; +} + +/** + * @interface + * The list of role definitions. + * @extends Array + */ +export interface BillingRoleDefinitionListResult extends Array { + /** + * The link (url) to the next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * The list of role assignments. + * @extends Array + */ +export interface BillingRoleAssignmentListResult extends Array { + /** + * The link (url) to the next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * Result of listing agreements. + * @extends Array + */ +export interface AgreementListResult extends Array { + /** + * The link (url) to the next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * Result of listing enrollment accounts. + * @extends Array + */ +export interface EnrollmentAccountListResult extends Array { + /** + * The link (url) to the next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * Result of listing billing periods. It contains a list of available billing periods in reverse + * chronological order. + * @extends Array + */ +export interface BillingPeriodsListResult extends Array { + /** + * The link (url) to the next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * Defines values for AddressValidationStatus. + * Possible values include: 'Valid', 'Invalid' + * @readonly + * @enum {string} + */ +export type AddressValidationStatus = 'Valid' | 'Invalid'; + +/** + * Defines values for SubscriptionTransferValidationErrorCode. + * Possible values include: 'InvalidSource', 'SubscriptionNotActive', + * 'InsufficientPermissionOnSource', 'InsufficientPermissionOnDestination', + * 'DestinationBillingProfilePastDue', 'SubscriptionTypeNotSupported', + * 'CrossBillingAccountNotAllowed', 'NotAvailableForDestinationMarket' + * @readonly + * @enum {string} + */ +export type SubscriptionTransferValidationErrorCode = 'InvalidSource' | 'SubscriptionNotActive' | 'InsufficientPermissionOnSource' | 'InsufficientPermissionOnDestination' | 'DestinationBillingProfilePastDue' | 'SubscriptionTypeNotSupported' | 'CrossBillingAccountNotAllowed' | 'NotAvailableForDestinationMarket'; + +/** + * Defines values for AgreementType. + * Possible values include: 'MicrosoftCustomerAgreement', 'EnterpriseAgreement', + * 'MicrosoftOnlineServicesProgram', 'MicrosoftPartnerAgreement' + * @readonly + * @enum {string} + */ +export type AgreementType = 'MicrosoftCustomerAgreement' | 'EnterpriseAgreement' | 'MicrosoftOnlineServicesProgram' | 'MicrosoftPartnerAgreement'; + +/** + * Defines values for AccountType. + * Possible values include: 'Enterprise', 'Individual', 'Partner' + * @readonly + * @enum {string} + */ +export type AccountType = 'Enterprise' | 'Individual' | 'Partner'; + +/** + * Defines values for AccountStatus. + * Possible values include: 'Active', 'Deleted', 'Disabled', 'Expired', 'Transferred', 'Extended', + * 'Terminated' + * @readonly + * @enum {string} + */ +export type AccountStatus = 'Active' | 'Deleted' | 'Disabled' | 'Expired' | 'Transferred' | 'Extended' | 'Terminated'; + +/** + * Defines values for BillingRelationshipType. + * Possible values include: 'Direct', 'IndirectCustomer', 'IndirectPartner', 'CSPPartner' + * @readonly + * @enum {string} + */ +export type BillingRelationshipType = 'Direct' | 'IndirectCustomer' | 'IndirectPartner' | 'CSPPartner'; + +/** + * Defines values for InvoiceSectionState. + * Possible values include: 'Active', 'Restricted' + * @readonly + * @enum {string} + */ +export type InvoiceSectionState = 'Active' | 'Restricted'; + +/** + * Defines values for TargetCloud. + * Possible values include: 'USGov', 'USNat', 'USSec' + * @readonly + * @enum {string} + */ +export type TargetCloud = 'USGov' | 'USNat' | 'USSec'; + +/** + * Defines values for BillingProfileStatus. + * Possible values include: 'Active', 'Disabled', 'Warned' + * @readonly + * @enum {string} + */ +export type BillingProfileStatus = 'Active' | 'Disabled' | 'Warned'; + +/** + * Defines values for StatusReasonCode. + * Possible values include: 'PastDue', 'SpendingLimitReached', 'SpendingLimitExpired' + * @readonly + * @enum {string} + */ +export type StatusReasonCode = 'PastDue' | 'SpendingLimitReached' | 'SpendingLimitExpired'; + +/** + * Defines values for SpendingLimit. + * Possible values include: 'Off', 'On' + * @readonly + * @enum {string} + */ +export type SpendingLimit = 'Off' | 'On'; + +/** + * Defines values for BillingProfileStatusReasonCode. + * Possible values include: 'PastDue', 'SpendingLimitReached', 'SpendingLimitExpired' + * @readonly + * @enum {string} + */ +export type BillingProfileStatusReasonCode = 'PastDue' | 'SpendingLimitReached' | 'SpendingLimitExpired'; + +/** + * Defines values for BillingProfileSpendingLimit. + * Possible values include: 'Off', 'On' + * @readonly + * @enum {string} + */ +export type BillingProfileSpendingLimit = 'Off' | 'On'; + +/** + * Defines values for StatusReasonCodeForBillingProfile. + * Possible values include: 'PastDue', 'SpendingLimitReached', 'SpendingLimitExpired' + * @readonly + * @enum {string} + */ +export type StatusReasonCodeForBillingProfile = 'PastDue' | 'SpendingLimitReached' | 'SpendingLimitExpired'; + +/** + * Defines values for SpendingLimitForBillingProfile. + * Possible values include: 'Off', 'On' + * @readonly + * @enum {string} + */ +export type SpendingLimitForBillingProfile = 'Off' | 'On'; + +/** + * Defines values for InvoiceStatus. + * Possible values include: 'Due', 'OverDue', 'Paid' + * @readonly + * @enum {string} + */ +export type InvoiceStatus = 'Due' | 'OverDue' | 'Paid'; + +/** + * Defines values for InvoiceType. + * Possible values include: 'AzureService', 'AzureMarketplace', 'AzureSupport' + * @readonly + * @enum {string} + */ +export type InvoiceType = 'AzureService' | 'AzureMarketplace' | 'AzureSupport'; + +/** + * Defines values for DocumentType. + * Possible values include: 'Invoice', 'VoidNote', 'TaxReceipt', 'CreditNote' + * @readonly + * @enum {string} + */ +export type DocumentType = 'Invoice' | 'VoidNote' | 'TaxReceipt' | 'CreditNote'; + +/** + * Defines values for DocumentSource. + * Possible values include: 'DRS', 'ENF' + * @readonly + * @enum {string} + */ +export type DocumentSource = 'DRS' | 'ENF'; + +/** + * Defines values for PaymentMethodFamily. + * Possible values include: 'Credits', 'CheckWire', 'CreditCard', 'None' + * @readonly + * @enum {string} + */ +export type PaymentMethodFamily = 'Credits' | 'CheckWire' | 'CreditCard' | 'None'; + +/** + * Defines values for AutoRenew. + * Possible values include: 'Off', 'On' + * @readonly + * @enum {string} + */ +export type AutoRenew = 'Off' | 'On'; + +/** + * Defines values for ProductStatusType. + * Possible values include: 'Active', 'Inactive', 'PastDue', 'Expiring', 'Expired', 'Disabled', + * 'Cancelled', 'AutoRenew' + * @readonly + * @enum {string} + */ +export type ProductStatusType = 'Active' | 'Inactive' | 'PastDue' | 'Expiring' | 'Expired' | 'Disabled' | 'Cancelled' | 'AutoRenew'; + +/** + * Defines values for BillingFrequency. + * Possible values include: 'OneTime', 'Monthly', 'UsageBased' + * @readonly + * @enum {string} + */ +export type BillingFrequency = 'OneTime' | 'Monthly' | 'UsageBased'; + +/** + * Defines values for ProductTransferValidationErrorCode. + * Possible values include: 'InvalidSource', 'ProductNotActive', 'InsufficientPermissionOnSource', + * 'InsufficientPermissionOnDestination', 'DestinationBillingProfilePastDue', + * 'ProductTypeNotSupported', 'CrossBillingAccountNotAllowed', 'NotAvailableForDestinationMarket', + * 'OneTimePurchaseProductTransferNotAllowed' + * @readonly + * @enum {string} + */ +export type ProductTransferValidationErrorCode = 'InvalidSource' | 'ProductNotActive' | 'InsufficientPermissionOnSource' | 'InsufficientPermissionOnDestination' | 'DestinationBillingProfilePastDue' | 'ProductTypeNotSupported' | 'CrossBillingAccountNotAllowed' | 'NotAvailableForDestinationMarket' | 'OneTimePurchaseProductTransferNotAllowed'; + +/** + * Defines values for BillingSubscriptionStatusType. + * Possible values include: 'Active', 'Inactive', 'Abandoned', 'Deleted', 'Warning' + * @readonly + * @enum {string} + */ +export type BillingSubscriptionStatusType = 'Active' | 'Inactive' | 'Abandoned' | 'Deleted' | 'Warning'; + +/** + * Defines values for TransactionTypeKind. + * Possible values include: 'all', 'reservation' + * @readonly + * @enum {string} + */ +export type TransactionTypeKind = 'all' | 'reservation'; + +/** + * Defines values for ReservationType. + * Possible values include: 'Purchase', 'Usage Charge' + * @readonly + * @enum {string} + */ +export type ReservationType = 'Purchase' | 'Usage Charge'; + +/** + * Defines values for MarketplacePurchasesPolicy. + * Possible values include: 'AllAllowed', 'OnlyFreeAllowed', 'NotAllowed' + * @readonly + * @enum {string} + */ +export type MarketplacePurchasesPolicy = 'AllAllowed' | 'OnlyFreeAllowed' | 'NotAllowed'; + +/** + * Defines values for ReservationPurchasesPolicy. + * Possible values include: 'Allowed', 'NotAllowed' + * @readonly + * @enum {string} + */ +export type ReservationPurchasesPolicy = 'Allowed' | 'NotAllowed'; + +/** + * Defines values for ViewChargesPolicy. + * Possible values include: 'Allowed', 'NotAllowed' + * @readonly + * @enum {string} + */ +export type ViewChargesPolicy = 'Allowed' | 'NotAllowed'; + +/** + * Defines values for ViewCharges. + * Possible values include: 'Allowed', 'NotAllowed' + * @readonly + * @enum {string} + */ +export type ViewCharges = 'Allowed' | 'NotAllowed'; + +/** + * Defines values for Category. + * Possible values include: 'MicrosoftCustomerAgreement', 'AffiliatePurchaseTerms', 'Other' + * @readonly + * @enum {string} + */ +export type Category = 'MicrosoftCustomerAgreement' | 'AffiliatePurchaseTerms' | 'Other'; + +/** + * Defines values for AcceptanceMode. + * Possible values include: 'ClickToAccept', 'ESignEmbedded', 'ESignOffline' + * @readonly + * @enum {string} + */ +export type AcceptanceMode = 'ClickToAccept' | 'ESignEmbedded' | 'ESignOffline'; + +/** + * Contains response data for the list operation. + */ +export type BillingAccountsListResponse = BillingAccountListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingAccountListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type BillingAccountsGetResponse = BillingAccount & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingAccount; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type BillingAccountsUpdateResponse = BillingAccount & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingAccount; + }; +}; + +/** + * Contains response data for the listInvoiceSectionsByCreateSubscriptionPermission operation. + */ +export type BillingAccountsListInvoiceSectionsByCreateSubscriptionPermissionResponse = InvoiceSectionListWithCreateSubPermissionResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: InvoiceSectionListWithCreateSubPermissionResult; + }; +}; + +/** + * Contains response data for the beginUpdate operation. + */ +export type BillingAccountsBeginUpdateResponse = BillingAccount & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingAccount; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type BillingAccountsListNextResponse = BillingAccountListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingAccountListResult; + }; +}; + +/** + * Contains response data for the listInvoiceSectionsByCreateSubscriptionPermissionNext operation. + */ +export type BillingAccountsListInvoiceSectionsByCreateSubscriptionPermissionNextResponse = InvoiceSectionListWithCreateSubPermissionResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: InvoiceSectionListWithCreateSubPermissionResult; + }; +}; + +/** + * Contains response data for the validate operation. + */ +export type AddressValidateResponse = ValidateAddressResponse & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ValidateAddressResponse; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type AvailableBalancesGetResponse = AvailableBalance & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: AvailableBalance; + }; +}; + +/** + * Contains response data for the listByBillingProfile operation. + */ +export type InstructionsListByBillingProfileResponse = InstructionListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: InstructionListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type InstructionsGetResponse = Instruction & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Instruction; + }; +}; + +/** + * Contains response data for the put operation. + */ +export type InstructionsPutResponse = Instruction & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Instruction; + }; +}; + +/** + * Contains response data for the listByBillingProfileNext operation. + */ +export type InstructionsListByBillingProfileNextResponse = InstructionListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: InstructionListResult; + }; +}; + +/** + * Contains response data for the listByBillingAccount operation. + */ +export type BillingProfilesListByBillingAccountResponse = BillingProfileListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingProfileListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type BillingProfilesGetResponse = BillingProfile & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingProfile; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type BillingProfilesCreateOrUpdateResponse = BillingProfile & BillingProfilesCreateOrUpdateHeaders & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: BillingProfilesCreateOrUpdateHeaders; + + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingProfile; + }; +}; + +/** + * Contains response data for the listByBillingAccountNext operation. + */ +export type BillingProfilesListByBillingAccountNextResponse = BillingProfileListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingProfileListResult; + }; +}; + +/** + * Contains response data for the listByBillingProfile operation. + */ +export type CustomersListByBillingProfileResponse = CustomerListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: CustomerListResult; + }; +}; + +/** + * Contains response data for the listByBillingAccount operation. + */ +export type CustomersListByBillingAccountResponse = CustomerListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: CustomerListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type CustomersGetResponse = Customer & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Customer; + }; +}; + +/** + * Contains response data for the listByBillingProfileNext operation. + */ +export type CustomersListByBillingProfileNextResponse = CustomerListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: CustomerListResult; + }; +}; + +/** + * Contains response data for the listByBillingAccountNext operation. + */ +export type CustomersListByBillingAccountNextResponse = CustomerListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: CustomerListResult; + }; +}; + +/** + * Contains response data for the listByBillingProfile operation. + */ +export type InvoiceSectionsListByBillingProfileResponse = InvoiceSectionListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: InvoiceSectionListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type InvoiceSectionsGetResponse = InvoiceSection & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: InvoiceSection; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type InvoiceSectionsCreateOrUpdateResponse = InvoiceSection & InvoiceSectionsCreateOrUpdateHeaders & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: InvoiceSectionsCreateOrUpdateHeaders; + + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: InvoiceSection; + }; +}; + +/** + * Contains response data for the listByBillingProfileNext operation. + */ +export type InvoiceSectionsListByBillingProfileNextResponse = InvoiceSectionListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: InvoiceSectionListResult; + }; +}; + +/** + * Contains response data for the listByCustomer operation. + */ +export type BillingPermissionsListByCustomerResponse = BillingPermissionsListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingPermissionsListResult; + }; +}; + +/** + * Contains response data for the listByBillingAccount operation. + */ +export type BillingPermissionsListByBillingAccountResponse = BillingPermissionsListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingPermissionsListResult; + }; +}; + +/** + * Contains response data for the listByInvoiceSections operation. + */ +export type BillingPermissionsListByInvoiceSectionsResponse = BillingPermissionsListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingPermissionsListResult; + }; +}; + +/** + * Contains response data for the listByBillingProfile operation. + */ +export type BillingPermissionsListByBillingProfileResponse = BillingPermissionsListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingPermissionsListResult; + }; +}; + +/** + * Contains response data for the listByCustomerNext operation. + */ +export type BillingPermissionsListByCustomerNextResponse = BillingPermissionsListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingPermissionsListResult; + }; +}; + +/** + * Contains response data for the listByBillingAccountNext operation. + */ +export type BillingPermissionsListByBillingAccountNextResponse = BillingPermissionsListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingPermissionsListResult; + }; +}; + +/** + * Contains response data for the listByInvoiceSectionsNext operation. + */ +export type BillingPermissionsListByInvoiceSectionsNextResponse = BillingPermissionsListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingPermissionsListResult; + }; +}; + +/** + * Contains response data for the listByBillingProfileNext operation. + */ +export type BillingPermissionsListByBillingProfileNextResponse = BillingPermissionsListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingPermissionsListResult; + }; +}; + +/** + * Contains response data for the listByCustomer operation. + */ +export type BillingSubscriptionsListByCustomerResponse = BillingSubscriptionsListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingSubscriptionsListResult; + }; +}; + +/** + * Contains response data for the listByBillingAccount operation. + */ +export type BillingSubscriptionsListByBillingAccountResponse = BillingSubscriptionsListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingSubscriptionsListResult; + }; +}; + +/** + * Contains response data for the listByBillingProfile operation. + */ +export type BillingSubscriptionsListByBillingProfileResponse = BillingSubscriptionsListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingSubscriptionsListResult; + }; +}; + +/** + * Contains response data for the listByInvoiceSection operation. + */ +export type BillingSubscriptionsListByInvoiceSectionResponse = BillingSubscriptionsListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingSubscriptionsListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type BillingSubscriptionsGetResponse = BillingSubscription & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingSubscription; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type BillingSubscriptionsUpdateResponse = BillingSubscription & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingSubscription; + }; +}; + +/** + * Contains response data for the move operation. + */ +export type BillingSubscriptionsMoveResponse = BillingSubscription & BillingSubscriptionsMoveHeaders & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: BillingSubscriptionsMoveHeaders; + + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingSubscription; + }; +}; + +/** + * Contains response data for the validateMove operation. + */ +export type BillingSubscriptionsValidateMoveResponse = ValidateSubscriptionTransferEligibilityResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ValidateSubscriptionTransferEligibilityResult; + }; +}; + +/** + * Contains response data for the listByCustomerNext operation. + */ +export type BillingSubscriptionsListByCustomerNextResponse = BillingSubscriptionsListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingSubscriptionsListResult; + }; +}; + +/** + * Contains response data for the listByBillingAccountNext operation. + */ +export type BillingSubscriptionsListByBillingAccountNextResponse = BillingSubscriptionsListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingSubscriptionsListResult; + }; +}; + +/** + * Contains response data for the listByBillingProfileNext operation. + */ +export type BillingSubscriptionsListByBillingProfileNextResponse = BillingSubscriptionsListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingSubscriptionsListResult; + }; +}; + +/** + * Contains response data for the listByInvoiceSectionNext operation. + */ +export type BillingSubscriptionsListByInvoiceSectionNextResponse = BillingSubscriptionsListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingSubscriptionsListResult; + }; +}; + +/** + * Contains response data for the listByCustomer operation. + */ +export type ProductsListByCustomerResponse = ProductsListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ProductsListResult; + }; +}; + +/** + * Contains response data for the listByBillingAccount operation. + */ +export type ProductsListByBillingAccountResponse = ProductsListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ProductsListResult; + }; +}; + +/** + * Contains response data for the listByBillingProfile operation. + */ +export type ProductsListByBillingProfileResponse = ProductsListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ProductsListResult; + }; +}; + +/** + * Contains response data for the listByInvoiceSection operation. + */ +export type ProductsListByInvoiceSectionResponse = ProductsListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ProductsListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ProductsGetResponse = Product & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Product; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type ProductsUpdateResponse = Product & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Product; + }; +}; + +/** + * Contains response data for the move operation. + */ +export type ProductsMoveResponse = Product & ProductsMoveHeaders & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: ProductsMoveHeaders; + + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Product; + }; +}; + +/** + * Contains response data for the validateMove operation. + */ +export type ProductsValidateMoveResponse = ValidateProductTransferEligibilityResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ValidateProductTransferEligibilityResult; + }; +}; + +/** + * Contains response data for the listByCustomerNext operation. + */ +export type ProductsListByCustomerNextResponse = ProductsListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ProductsListResult; + }; +}; + +/** + * Contains response data for the listByBillingAccountNext operation. + */ +export type ProductsListByBillingAccountNextResponse = ProductsListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ProductsListResult; + }; +}; + +/** + * Contains response data for the listByBillingProfileNext operation. + */ +export type ProductsListByBillingProfileNextResponse = ProductsListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ProductsListResult; + }; +}; + +/** + * Contains response data for the listByInvoiceSectionNext operation. + */ +export type ProductsListByInvoiceSectionNextResponse = ProductsListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ProductsListResult; + }; +}; + +/** + * Contains response data for the listByBillingAccount operation. + */ +export type InvoicesListByBillingAccountResponse = InvoiceListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: InvoiceListResult; + }; +}; + +/** + * Contains response data for the listByBillingProfile operation. + */ +export type InvoicesListByBillingProfileResponse = InvoiceListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: InvoiceListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type InvoicesGetResponse = Invoice & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Invoice; + }; +}; + +/** + * Contains response data for the getById operation. + */ +export type InvoicesGetByIdResponse = Invoice & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Invoice; + }; +}; + +/** + * Contains response data for the downloadInvoice operation. + */ +export type InvoicesDownloadInvoiceResponse = DownloadUrl & InvoicesDownloadInvoiceHeaders & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: InvoicesDownloadInvoiceHeaders; + + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: DownloadUrl; + }; +}; + +/** + * Contains response data for the listByBillingSubscription operation. + */ +export type InvoicesListByBillingSubscriptionResponse = InvoiceListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: InvoiceListResult; + }; +}; + +/** + * Contains response data for the getBySubscriptionAndInvoiceId operation. + */ +export type InvoicesGetBySubscriptionAndInvoiceIdResponse = Invoice & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Invoice; + }; +}; + +/** + * Contains response data for the downloadBillingSubscriptionInvoice operation. + */ +export type InvoicesDownloadBillingSubscriptionInvoiceResponse = DownloadUrl & InvoicesDownloadBillingSubscriptionInvoiceHeaders & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: InvoicesDownloadBillingSubscriptionInvoiceHeaders; + + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: DownloadUrl; + }; +}; + +/** + * Contains response data for the listByBillingAccountNext operation. + */ +export type InvoicesListByBillingAccountNextResponse = InvoiceListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: InvoiceListResult; + }; +}; + +/** + * Contains response data for the listByBillingProfileNext operation. + */ +export type InvoicesListByBillingProfileNextResponse = InvoiceListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: InvoiceListResult; + }; +}; + +/** + * Contains response data for the listByBillingSubscriptionNext operation. + */ +export type InvoicesListByBillingSubscriptionNextResponse = InvoiceListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: InvoiceListResult; + }; +}; + +/** + * Contains response data for the listByInvoice operation. + */ +export type TransactionsListByInvoiceResponse = TransactionListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: TransactionListResult; + }; +}; + +/** + * Contains response data for the listByInvoiceNext operation. + */ +export type TransactionsListByInvoiceNextResponse = TransactionListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: TransactionListResult; + }; +}; + +/** + * Contains response data for the getByBillingProfile operation. + */ +export type PoliciesGetByBillingProfileResponse = Policy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Policy; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type PoliciesUpdateResponse = Policy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Policy; + }; +}; + +/** + * Contains response data for the getByCustomer operation. + */ +export type PoliciesGetByCustomerResponse = CustomerPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: CustomerPolicy; + }; +}; + +/** + * Contains response data for the updateCustomer operation. + */ +export type PoliciesUpdateCustomerResponse = CustomerPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: CustomerPolicy; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type BillingPropertyGetResponse = BillingProperty & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingProperty; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type BillingPropertyUpdateResponse = BillingProperty & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingProperty; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type OperationsListResponse = OperationListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationListResult; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type OperationsListNextResponse = OperationListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationListResult; + }; +}; + +/** + * Contains response data for the getByBillingAccount operation. + */ +export type BillingRoleDefinitionsGetByBillingAccountResponse = BillingRoleDefinition & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingRoleDefinition; + }; +}; + +/** + * Contains response data for the getByInvoiceSection operation. + */ +export type BillingRoleDefinitionsGetByInvoiceSectionResponse = BillingRoleDefinition & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingRoleDefinition; + }; +}; + +/** + * Contains response data for the getByBillingProfile operation. + */ +export type BillingRoleDefinitionsGetByBillingProfileResponse = BillingRoleDefinition & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingRoleDefinition; + }; +}; + +/** + * Contains response data for the listByBillingAccount operation. + */ +export type BillingRoleDefinitionsListByBillingAccountResponse = BillingRoleDefinitionListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingRoleDefinitionListResult; + }; +}; + +/** + * Contains response data for the listByInvoiceSection operation. + */ +export type BillingRoleDefinitionsListByInvoiceSectionResponse = BillingRoleDefinitionListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingRoleDefinitionListResult; + }; +}; + +/** + * Contains response data for the listByBillingProfile operation. + */ +export type BillingRoleDefinitionsListByBillingProfileResponse = BillingRoleDefinitionListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingRoleDefinitionListResult; + }; +}; + +/** + * Contains response data for the listByBillingAccountNext operation. + */ +export type BillingRoleDefinitionsListByBillingAccountNextResponse = BillingRoleDefinitionListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingRoleDefinitionListResult; + }; +}; + +/** + * Contains response data for the listByInvoiceSectionNext operation. + */ +export type BillingRoleDefinitionsListByInvoiceSectionNextResponse = BillingRoleDefinitionListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingRoleDefinitionListResult; + }; +}; + +/** + * Contains response data for the listByBillingProfileNext operation. */ -export interface Invoice extends Resource { - /** - * @member {DownloadUrl} [downloadUrl] A secure link to download the PDF - * version of an invoice. The link will cease to work after its expiry time - * is reached. - */ - downloadUrl?: DownloadUrl; - /** - * @member {Date} [invoicePeriodStartDate] The start of the date range - * covered by the invoice. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly invoicePeriodStartDate?: Date; - /** - * @member {Date} [invoicePeriodEndDate] The end of the date range covered by - * the invoice. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly invoicePeriodEndDate?: Date; +export type BillingRoleDefinitionsListByBillingProfileNextResponse = BillingRoleDefinitionListResult & { /** - * @member {string[]} [billingPeriodIds] Array of billing perdiod ids that - * the invoice is attributed to. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The underlying HTTP response. */ - readonly billingPeriodIds?: string[]; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingRoleDefinitionListResult; + }; +}; /** - * @interface - * An interface representing OperationDisplay. - * The object that represents the operation. - * + * Contains response data for the getByBillingAccount operation. */ -export interface OperationDisplay { - /** - * @member {string} [provider] Service provider: Microsoft.Billing. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly provider?: string; - /** - * @member {string} [resource] Resource on which the operation is performed: - * Invoice, etc. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly resource?: string; +export type BillingRoleAssignmentsGetByBillingAccountResponse = BillingRoleAssignment & { /** - * @member {string} [operation] Operation type: Read, write, delete, etc. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The underlying HTTP response. */ - readonly operation?: string; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingRoleAssignment; + }; +}; /** - * @interface - * An interface representing Operation. - * A Billing REST API operation. - * + * Contains response data for the deleteByBillingAccount operation. */ -export interface Operation { - /** - * @member {string} [name] Operation name: {provider}/{resource}/{operation}. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly name?: string; +export type BillingRoleAssignmentsDeleteByBillingAccountResponse = BillingRoleAssignment & { /** - * @member {OperationDisplay} [display] The object that represents the - * operation. + * The underlying HTTP response. */ - display?: OperationDisplay; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingRoleAssignment; + }; +}; /** - * @interface - * An interface representing BillingPeriodsListOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * Contains response data for the getByInvoiceSection operation. */ -export interface BillingPeriodsListOptionalParams extends msRest.RequestOptionsBase { - /** - * @member {string} [filter] May be used to filter billing periods by - * billingPeriodEndDate. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', - * and 'and'. It does not currently support 'ne', 'or', or 'not'. - */ - filter?: string; - /** - * @member {string} [skiptoken] Skiptoken is only used if a previous - * operation returned a partial result. If a previous response contains a - * nextLink element, the value of the nextLink element will include a - * skiptoken parameter that specifies a starting point to use for subsequent - * calls. - */ - skiptoken?: string; +export type BillingRoleAssignmentsGetByInvoiceSectionResponse = BillingRoleAssignment & { /** - * @member {number} [top] May be used to limit the number of results to the - * most recent N billing periods. + * The underlying HTTP response. */ - top?: number; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingRoleAssignment; + }; +}; /** - * @interface - * An interface representing InvoicesListOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * Contains response data for the deleteByInvoiceSection operation. */ -export interface InvoicesListOptionalParams extends msRest.RequestOptionsBase { - /** - * @member {string} [expand] May be used to expand the downloadUrl property - * within a list of invoices. This enables download links to be generated for - * multiple invoices at once. By default, downloadURLs are not included when - * listing invoices. - */ - expand?: string; - /** - * @member {string} [filter] May be used to filter invoices by - * invoicePeriodEndDate. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', - * and 'and'. It does not currently support 'ne', 'or', or 'not'. - */ - filter?: string; +export type BillingRoleAssignmentsDeleteByInvoiceSectionResponse = BillingRoleAssignment & { /** - * @member {string} [skiptoken] Skiptoken is only used if a previous - * operation returned a partial result. If a previous response contains a - * nextLink element, the value of the nextLink element will include a - * skiptoken parameter that specifies a starting point to use for subsequent - * calls. - */ - skiptoken?: string; - /** - * @member {number} [top] May be used to limit the number of results to the - * most recent N invoices. + * The underlying HTTP response. */ - top?: number; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingRoleAssignment; + }; +}; /** - * @interface - * An interface representing BillingManagementClientOptions. - * @extends AzureServiceClientOptions + * Contains response data for the getByBillingProfile operation. */ -export interface BillingManagementClientOptions extends AzureServiceClientOptions { +export type BillingRoleAssignmentsGetByBillingProfileResponse = BillingRoleAssignment & { /** - * @member {string} [baseUri] + * The underlying HTTP response. */ - baseUri?: string; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingRoleAssignment; + }; +}; /** - * @interface - * An interface representing the EnrollmentAccountListResult. - * Result of listing enrollment accounts. - * - * @extends Array + * Contains response data for the deleteByBillingProfile operation. */ -export interface EnrollmentAccountListResult extends Array { +export type BillingRoleAssignmentsDeleteByBillingProfileResponse = BillingRoleAssignment & { /** - * @member {string} [nextLink] The link (url) to the next page of results. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The underlying HTTP response. */ - readonly nextLink?: string; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingRoleAssignment; + }; +}; /** - * @interface - * An interface representing the BillingPeriodsListResult. - * Result of listing billing periods. It contains a list of available billing - * periods in reverse chronological order. - * - * @extends Array + * Contains response data for the listByBillingAccount operation. */ -export interface BillingPeriodsListResult extends Array { +export type BillingRoleAssignmentsListByBillingAccountResponse = BillingRoleAssignmentListResult & { /** - * @member {string} [nextLink] The link (url) to the next page of results. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The underlying HTTP response. */ - readonly nextLink?: string; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingRoleAssignmentListResult; + }; +}; /** - * @interface - * An interface representing the InvoicesListResult. - * Result of listing invoices. It contains a list of available invoices in - * reverse chronological order. - * - * @extends Array + * Contains response data for the listByInvoiceSection operation. */ -export interface InvoicesListResult extends Array { +export type BillingRoleAssignmentsListByInvoiceSectionResponse = BillingRoleAssignmentListResult & { /** - * @member {string} [nextLink] The link (url) to the next page of results. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The underlying HTTP response. */ - readonly nextLink?: string; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingRoleAssignmentListResult; + }; +}; /** - * @interface - * An interface representing the OperationListResult. - * Result listing billing operations. It contains a list of operations and a - * URL link to get the next set of results. - * - * @extends Array + * Contains response data for the listByBillingProfile operation. */ -export interface OperationListResult extends Array { +export type BillingRoleAssignmentsListByBillingProfileResponse = BillingRoleAssignmentListResult & { /** - * @member {string} [nextLink] URL to get the next set of operation list - * results if there are any. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The underlying HTTP response. */ - readonly nextLink?: string; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingRoleAssignmentListResult; + }; +}; /** - * Contains response data for the list operation. + * Contains response data for the listByBillingAccountNext operation. */ -export type EnrollmentAccountsListResponse = EnrollmentAccountListResult & { +export type BillingRoleAssignmentsListByBillingAccountNextResponse = BillingRoleAssignmentListResult & { /** * The underlying HTTP response. */ @@ -396,17 +4563,18 @@ export type EnrollmentAccountsListResponse = EnrollmentAccountListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: EnrollmentAccountListResult; + parsedBody: BillingRoleAssignmentListResult; }; }; /** - * Contains response data for the get operation. + * Contains response data for the listByInvoiceSectionNext operation. */ -export type EnrollmentAccountsGetResponse = EnrollmentAccount & { +export type BillingRoleAssignmentsListByInvoiceSectionNextResponse = BillingRoleAssignmentListResult & { /** * The underlying HTTP response. */ @@ -415,17 +4583,18 @@ export type EnrollmentAccountsGetResponse = EnrollmentAccount & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: EnrollmentAccount; + parsedBody: BillingRoleAssignmentListResult; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the listByBillingProfileNext operation. */ -export type EnrollmentAccountsListNextResponse = EnrollmentAccountListResult & { +export type BillingRoleAssignmentsListByBillingProfileNextResponse = BillingRoleAssignmentListResult & { /** * The underlying HTTP response. */ @@ -434,17 +4603,18 @@ export type EnrollmentAccountsListNextResponse = EnrollmentAccountListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: EnrollmentAccountListResult; + parsedBody: BillingRoleAssignmentListResult; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listByBillingAccount operation. */ -export type BillingPeriodsListResponse = BillingPeriodsListResult & { +export type AgreementsListByBillingAccountResponse = AgreementListResult & { /** * The underlying HTTP response. */ @@ -453,17 +4623,18 @@ export type BillingPeriodsListResponse = BillingPeriodsListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: BillingPeriodsListResult; + parsedBody: AgreementListResult; }; }; /** * Contains response data for the get operation. */ -export type BillingPeriodsGetResponse = BillingPeriod & { +export type AgreementsGetResponse = Agreement & { /** * The underlying HTTP response. */ @@ -472,17 +4643,18 @@ export type BillingPeriodsGetResponse = BillingPeriod & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: BillingPeriod; + parsedBody: Agreement; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the listByBillingAccountNext operation. */ -export type BillingPeriodsListNextResponse = BillingPeriodsListResult & { +export type AgreementsListByBillingAccountNextResponse = AgreementListResult & { /** * The underlying HTTP response. */ @@ -491,17 +4663,18 @@ export type BillingPeriodsListNextResponse = BillingPeriodsListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: BillingPeriodsListResult; + parsedBody: AgreementListResult; }; }; /** * Contains response data for the list operation. */ -export type InvoicesListResponse = InvoicesListResult & { +export type EnrollmentAccountsListResponse = EnrollmentAccountListResult & { /** * The underlying HTTP response. */ @@ -510,17 +4683,18 @@ export type InvoicesListResponse = InvoicesListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: InvoicesListResult; + parsedBody: EnrollmentAccountListResult; }; }; /** * Contains response data for the get operation. */ -export type InvoicesGetResponse = Invoice & { +export type EnrollmentAccountsGetResponse = EnrollmentAccountSummary & { /** * The underlying HTTP response. */ @@ -529,17 +4703,18 @@ export type InvoicesGetResponse = Invoice & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: Invoice; + parsedBody: EnrollmentAccountSummary; }; }; /** - * Contains response data for the getLatest operation. + * Contains response data for the listNext operation. */ -export type InvoicesGetLatestResponse = Invoice & { +export type EnrollmentAccountsListNextResponse = EnrollmentAccountListResult & { /** * The underlying HTTP response. */ @@ -548,17 +4723,18 @@ export type InvoicesGetLatestResponse = Invoice & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: Invoice; + parsedBody: EnrollmentAccountListResult; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the list operation. */ -export type InvoicesListNextResponse = InvoicesListResult & { +export type BillingPeriodsListResponse = BillingPeriodsListResult & { /** * The underlying HTTP response. */ @@ -567,17 +4743,18 @@ export type InvoicesListNextResponse = InvoicesListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: InvoicesListResult; + parsedBody: BillingPeriodsListResult; }; }; /** - * Contains response data for the list operation. + * Contains response data for the get operation. */ -export type OperationsListResponse = OperationListResult & { +export type BillingPeriodsGetResponse = BillingPeriod & { /** * The underlying HTTP response. */ @@ -586,17 +4763,18 @@ export type OperationsListResponse = OperationListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: OperationListResult; + parsedBody: BillingPeriod; }; }; /** * Contains response data for the listNext operation. */ -export type OperationsListNextResponse = OperationListResult & { +export type BillingPeriodsListNextResponse = BillingPeriodsListResult & { /** * The underlying HTTP response. */ @@ -605,9 +4783,10 @@ export type OperationsListNextResponse = OperationListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: OperationListResult; + parsedBody: BillingPeriodsListResult; }; }; diff --git a/sdk/billing/arm-billing/src/models/instructionsMappers.ts b/sdk/billing/arm-billing/src/models/instructionsMappers.ts new file mode 100644 index 000000000000..b2398eda6653 --- /dev/null +++ b/sdk/billing/arm-billing/src/models/instructionsMappers.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AddressDetails, + Agreement, + Amount, + AvailableBalance, + AzurePlan, + BaseResource, + BillingAccount, + BillingPeriod, + BillingPermissionsProperties, + BillingProfile, + BillingProfilesOnExpand, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscription, + Customer, + CustomerPolicy, + Department, + Document, + Enrollment, + EnrollmentAccount, + EnrollmentAccountSummary, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + IndirectRelationshipInfo, + Instruction, + InstructionListResult, + Invoice, + InvoiceSection, + InvoiceSectionsOnExpand, + Participants, + PaymentProperties, + Policy, + Product, + Reseller, + Resource, + Transaction +} from "../models/mappers"; diff --git a/sdk/billing/arm-billing/src/models/invoiceSectionsMappers.ts b/sdk/billing/arm-billing/src/models/invoiceSectionsMappers.ts new file mode 100644 index 000000000000..50fbf21f9769 --- /dev/null +++ b/sdk/billing/arm-billing/src/models/invoiceSectionsMappers.ts @@ -0,0 +1,49 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AddressDetails, + Agreement, + Amount, + AvailableBalance, + AzurePlan, + BaseResource, + BillingAccount, + BillingPeriod, + BillingPermissionsProperties, + BillingProfile, + BillingProfilesOnExpand, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscription, + Customer, + CustomerPolicy, + Department, + Document, + Enrollment, + EnrollmentAccount, + EnrollmentAccountSummary, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + IndirectRelationshipInfo, + Instruction, + Invoice, + InvoiceSection, + InvoiceSectionListResult, + InvoiceSectionsCreateOrUpdateHeaders, + InvoiceSectionsOnExpand, + Participants, + PaymentProperties, + Policy, + Product, + Reseller, + Resource, + Transaction +} from "../models/mappers"; diff --git a/sdk/billing/arm-billing/src/models/invoicesMappers.ts b/sdk/billing/arm-billing/src/models/invoicesMappers.ts index 00efc9fad1ef..7c84d0f7abc4 100644 --- a/sdk/billing/arm-billing/src/models/invoicesMappers.ts +++ b/sdk/billing/arm-billing/src/models/invoicesMappers.ts @@ -1,22 +1,51 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - InvoicesListResult, - Invoice, - Resource, + AddressDetails, + Agreement, + Amount, + AvailableBalance, + AzurePlan, BaseResource, + BillingAccount, + BillingPeriod, + BillingPermissionsProperties, + BillingProfile, + BillingProfilesOnExpand, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscription, + Customer, + CustomerPolicy, + Department, + Document, DownloadUrl, - ErrorResponse, - ErrorDetails, + Enrollment, EnrollmentAccount, - BillingPeriod + EnrollmentAccountSummary, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + IndirectRelationshipInfo, + Instruction, + Invoice, + InvoiceListResult, + InvoicesDownloadBillingSubscriptionInvoiceHeaders, + InvoicesDownloadInvoiceHeaders, + InvoiceSection, + InvoiceSectionsOnExpand, + Participants, + PaymentProperties, + Policy, + Product, + Reseller, + Resource, + Transaction } from "../models/mappers"; - diff --git a/sdk/billing/arm-billing/src/models/mappers.ts b/sdk/billing/arm-billing/src/models/mappers.ts index 7a43d33d35f4..d46887e45126 100644 --- a/sdk/billing/arm-billing/src/models/mappers.ts +++ b/sdk/billing/arm-billing/src/models/mappers.ts @@ -1,11 +1,9 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import { CloudErrorMapper, BaseResourceMapper } from "@azure/ms-rest-azure-js"; @@ -14,6 +12,53 @@ import * as msRest from "@azure/ms-rest-js"; export const CloudError = CloudErrorMapper; export const BaseResource = BaseResourceMapper; +export const AzurePlan: msRest.CompositeMapper = { + serializedName: "AzurePlan", + type: { + name: "Composite", + className: "AzurePlan", + modelProperties: { + skuId: { + serializedName: "skuId", + type: { + name: "String" + } + }, + skuDescription: { + readOnly: true, + serializedName: "skuDescription", + type: { + name: "String" + } + } + } + } +}; + +export const Reseller: msRest.CompositeMapper = { + serializedName: "Reseller", + type: { + name: "Composite", + className: "Reseller", + modelProperties: { + resellerId: { + readOnly: true, + serializedName: "resellerId", + type: { + name: "String" + } + }, + description: { + readOnly: true, + serializedName: "description", + type: { + name: "String" + } + } + } + } +}; + export const Resource: msRest.CompositeMapper = { serializedName: "Resource", type: { @@ -34,9 +79,2861 @@ export const Resource: msRest.CompositeMapper = { name: "String" } }, - type: { + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const Customer: msRest.CompositeMapper = { + serializedName: "Customer", + type: { + name: "Composite", + className: "Customer", + modelProperties: { + ...Resource.type.modelProperties, + billingProfileId: { + readOnly: true, + serializedName: "properties.billingProfileId", + type: { + name: "String" + } + }, + billingProfileDisplayName: { + readOnly: true, + serializedName: "properties.billingProfileDisplayName", + type: { + name: "String" + } + }, + displayName: { + serializedName: "properties.displayName", + type: { + name: "String" + } + }, + enabledAzurePlans: { + serializedName: "properties.enabledAzurePlans", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AzurePlan" + } + } + } + }, + resellers: { + serializedName: "properties.resellers", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Reseller" + } + } + } + } + } + } +}; + +export const AddressDetails: msRest.CompositeMapper = { + serializedName: "AddressDetails", + type: { + name: "Composite", + className: "AddressDetails", + modelProperties: { + firstName: { + serializedName: "firstName", + type: { + name: "String" + } + }, + lastName: { + serializedName: "lastName", + type: { + name: "String" + } + }, + companyName: { + serializedName: "companyName", + type: { + name: "String" + } + }, + addressLine1: { + required: true, + serializedName: "addressLine1", + type: { + name: "String" + } + }, + addressLine2: { + serializedName: "addressLine2", + type: { + name: "String" + } + }, + addressLine3: { + serializedName: "addressLine3", + type: { + name: "String" + } + }, + city: { + serializedName: "city", + type: { + name: "String" + } + }, + district: { + serializedName: "district", + type: { + name: "String" + } + }, + region: { + serializedName: "region", + type: { + name: "String" + } + }, + country: { + required: true, + serializedName: "country", + type: { + name: "String" + } + }, + postalCode: { + serializedName: "postalCode", + type: { + name: "String" + } + }, + email: { + serializedName: "email", + type: { + name: "String" + } + }, + phoneNumber: { + serializedName: "phoneNumber", + type: { + name: "String" + } + } + } + } +}; + +export const ValidateAddressResponse: msRest.CompositeMapper = { + serializedName: "ValidateAddressResponse", + type: { + name: "Composite", + className: "ValidateAddressResponse", + modelProperties: { + status: { + serializedName: "status", + type: { + name: "String" + } + }, + suggestedAddresses: { + serializedName: "suggestedAddresses", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AddressDetails" + } + } + } + }, + validationMessage: { + serializedName: "validationMessage", + type: { + name: "String" + } + } + } + } +}; + +export const TransferProductRequestProperties: msRest.CompositeMapper = { + serializedName: "TransferProductRequestProperties", + type: { + name: "Composite", + className: "TransferProductRequestProperties", + modelProperties: { + destinationInvoiceSectionId: { + serializedName: "destinationInvoiceSectionId", + type: { + name: "String" + } + } + } + } +}; + +export const TransferBillingSubscriptionRequestProperties: msRest.CompositeMapper = { + serializedName: "TransferBillingSubscriptionRequestProperties", + type: { + name: "Composite", + className: "TransferBillingSubscriptionRequestProperties", + modelProperties: { + destinationInvoiceSectionId: { + required: true, + serializedName: "destinationInvoiceSectionId", + type: { + name: "String" + } + } + } + } +}; + +export const ValidateSubscriptionTransferEligibilityError: msRest.CompositeMapper = { + serializedName: "ValidateSubscriptionTransferEligibilityError", + type: { + name: "Composite", + className: "ValidateSubscriptionTransferEligibilityError", + modelProperties: { + code: { + serializedName: "code", + type: { + name: "String" + } + }, + message: { + serializedName: "message", + type: { + name: "String" + } + }, + details: { + serializedName: "details", + type: { + name: "String" + } + } + } + } +}; + +export const ValidateSubscriptionTransferEligibilityResult: msRest.CompositeMapper = { + serializedName: "ValidateSubscriptionTransferEligibilityResult", + type: { + name: "Composite", + className: "ValidateSubscriptionTransferEligibilityResult", + modelProperties: { + isMoveEligible: { + readOnly: true, + serializedName: "isMoveEligible", + type: { + name: "Boolean" + } + }, + errorDetails: { + serializedName: "errorDetails", + type: { + name: "Composite", + className: "ValidateSubscriptionTransferEligibilityError" + } + } + } + } +}; + +export const IndirectRelationshipInfo: msRest.CompositeMapper = { + serializedName: "IndirectRelationshipInfo", + type: { + name: "Composite", + className: "IndirectRelationshipInfo", + modelProperties: { + billingAccountName: { + serializedName: "billingAccountName", + type: { + name: "String" + } + }, + billingProfileName: { + serializedName: "billingProfileName", + type: { + name: "String" + } + }, + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + } + } + } +}; + +export const InvoiceSection: msRest.CompositeMapper = { + serializedName: "InvoiceSection", + type: { + name: "Composite", + className: "InvoiceSection", + modelProperties: { + ...Resource.type.modelProperties, + displayName: { + serializedName: "properties.displayName", + type: { + name: "String" + } + }, + labels: { + serializedName: "properties.labels", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + state: { + readOnly: true, + serializedName: "properties.state", + type: { + name: "String" + } + }, + systemId: { + readOnly: true, + serializedName: "properties.systemId", + type: { + name: "String" + } + }, + targetCloud: { + readOnly: true, + serializedName: "properties.targetCloud", + type: { + name: "String" + } + } + } + } +}; + +export const InvoiceSectionsOnExpand: msRest.CompositeMapper = { + serializedName: "InvoiceSectionsOnExpand", + type: { + name: "Composite", + className: "InvoiceSectionsOnExpand", + modelProperties: { + hasMoreResults: { + readOnly: true, + serializedName: "hasMoreResults", + type: { + name: "Boolean" + } + }, + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "InvoiceSection" + } + } + } + } + } + } +}; + +export const BillingProfile: msRest.CompositeMapper = { + serializedName: "BillingProfile", + type: { + name: "Composite", + className: "BillingProfile", + modelProperties: { + ...Resource.type.modelProperties, + displayName: { + serializedName: "properties.displayName", + type: { + name: "String" + } + }, + poNumber: { + serializedName: "properties.poNumber", + type: { + name: "String" + } + }, + billingRelationshipType: { + readOnly: true, + serializedName: "properties.billingRelationshipType", + type: { + name: "String" + } + }, + billTo: { + serializedName: "properties.billTo", + type: { + name: "Composite", + className: "AddressDetails" + } + }, + indirectRelationshipInfo: { + readOnly: true, + serializedName: "properties.indirectRelationshipInfo", + type: { + name: "Composite", + className: "IndirectRelationshipInfo" + } + }, + invoiceEmailOptIn: { + serializedName: "properties.invoiceEmailOptIn", + type: { + name: "Boolean" + } + }, + invoiceDay: { + readOnly: true, + serializedName: "properties.invoiceDay", + type: { + name: "Number" + } + }, + currency: { + readOnly: true, + serializedName: "properties.currency", + type: { + name: "String" + } + }, + enabledAzurePlans: { + serializedName: "properties.enabledAzurePlans", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AzurePlan" + } + } + } + }, + invoiceSections: { + serializedName: "properties.invoiceSections", + type: { + name: "Composite", + className: "InvoiceSectionsOnExpand" + } + }, + hasReadAccess: { + readOnly: true, + serializedName: "properties.hasReadAccess", + type: { + name: "Boolean" + } + }, + systemId: { + readOnly: true, + serializedName: "properties.systemId", + type: { + name: "String" + } + }, + status: { + readOnly: true, + serializedName: "properties.status", + type: { + name: "String" + } + }, + statusReasonCode: { + readOnly: true, + serializedName: "properties.statusReasonCode", + type: { + name: "String" + } + }, + spendingLimit: { + readOnly: true, + serializedName: "properties.spendingLimit", + type: { + name: "String" + } + }, + targetClouds: { + readOnly: true, + serializedName: "properties.targetClouds", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const BillingProfilesOnExpand: msRest.CompositeMapper = { + serializedName: "BillingProfilesOnExpand", + type: { + name: "Composite", + className: "BillingProfilesOnExpand", + modelProperties: { + hasMoreResults: { + readOnly: true, + serializedName: "hasMoreResults", + type: { + name: "Boolean" + } + }, + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BillingProfile" + } + } + } + } + } + } +}; + +export const EnrollmentPolicies: msRest.CompositeMapper = { + serializedName: "EnrollmentPolicies", + type: { + name: "Composite", + className: "EnrollmentPolicies", + modelProperties: { + accountOwnerViewCharges: { + readOnly: true, + serializedName: "accountOwnerViewCharges", + type: { + name: "Boolean" + } + }, + departmentAdminViewCharges: { + readOnly: true, + serializedName: "departmentAdminViewCharges", + type: { + name: "Boolean" + } + }, + marketplacesEnabled: { + readOnly: true, + serializedName: "marketplacesEnabled", + type: { + name: "Boolean" + } + }, + reservedInstancesEnabled: { + readOnly: true, + serializedName: "reservedInstancesEnabled", + type: { + name: "Boolean" + } + } + } + } +}; + +export const Enrollment: msRest.CompositeMapper = { + serializedName: "Enrollment", + type: { + name: "Composite", + className: "Enrollment", + modelProperties: { + startDate: { + serializedName: "startDate", + type: { + name: "DateTime" + } + }, + endDate: { + serializedName: "endDate", + type: { + name: "DateTime" + } + }, + currency: { + readOnly: true, + serializedName: "currency", + type: { + name: "String" + } + }, + channel: { + readOnly: true, + serializedName: "channel", + type: { + name: "String" + } + }, + policies: { + readOnly: true, + serializedName: "policies", + type: { + name: "Composite", + className: "EnrollmentPolicies" + } + }, + language: { + readOnly: true, + serializedName: "language", + type: { + name: "String" + } + }, + countryCode: { + readOnly: true, + serializedName: "countryCode", + type: { + name: "String" + } + }, + status: { + readOnly: true, + serializedName: "status", + type: { + name: "String" + } + }, + billingCycle: { + readOnly: true, + serializedName: "billingCycle", + type: { + name: "String" + } + } + } + } +}; + +export const EnrollmentAccount: msRest.CompositeMapper = { + serializedName: "EnrollmentAccount", + type: { + name: "Composite", + className: "EnrollmentAccount", + modelProperties: { + ...Resource.type.modelProperties, + accountName: { + serializedName: "properties.accountName", + type: { + name: "String" + } + }, + costCenter: { + serializedName: "properties.costCenter", + type: { + name: "String" + } + }, + accountOwner: { + serializedName: "properties.accountOwner", + type: { + name: "String" + } + }, + status: { + serializedName: "properties.status", + type: { + name: "String" + } + }, + startDate: { + serializedName: "properties.startDate", + type: { + name: "DateTime" + } + }, + endDate: { + serializedName: "properties.endDate", + type: { + name: "DateTime" + } + }, + department: { + serializedName: "properties.department", + type: { + name: "Composite", + className: "Department" + } + } + } + } +}; + +export const Department: msRest.CompositeMapper = { + serializedName: "Department", + type: { + name: "Composite", + className: "Department", + modelProperties: { + ...Resource.type.modelProperties, + departmentName: { + serializedName: "properties.departmentName", + type: { + name: "String" + } + }, + costCenter: { + serializedName: "properties.costCenter", + type: { + name: "String" + } + }, + status: { + serializedName: "properties.status", + type: { + name: "String" + } + }, + enrollmentAccounts: { + serializedName: "properties.enrollmentAccounts", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EnrollmentAccount" + } + } + } + } + } + } +}; + +export const BillingAccount: msRest.CompositeMapper = { + serializedName: "BillingAccount", + type: { + name: "Composite", + className: "BillingAccount", + modelProperties: { + ...Resource.type.modelProperties, + displayName: { + serializedName: "properties.displayName", + type: { + name: "String" + } + }, + soldTo: { + serializedName: "properties.soldTo", + type: { + name: "Composite", + className: "AddressDetails" + } + }, + agreementType: { + readOnly: true, + serializedName: "properties.agreementType", + type: { + name: "String" + } + }, + accountType: { + readOnly: true, + serializedName: "properties.accountType", + type: { + name: "String" + } + }, + accountStatus: { + readOnly: true, + serializedName: "properties.accountStatus", + type: { + name: "String" + } + }, + billingProfiles: { + serializedName: "properties.billingProfiles", + type: { + name: "Composite", + className: "BillingProfilesOnExpand" + } + }, + enrollmentDetails: { + readOnly: true, + serializedName: "properties.enrollmentDetails", + type: { + name: "Composite", + className: "Enrollment" + } + }, + departments: { + serializedName: "properties.departments", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Department" + } + } + } + }, + enrollmentAccounts: { + serializedName: "properties.enrollmentAccounts", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EnrollmentAccount" + } + } + } + }, + hasReadAccess: { + readOnly: true, + serializedName: "properties.hasReadAccess", + type: { + name: "Boolean" + } + } + } + } +}; + +export const BillingAccountUpdateRequest: msRest.CompositeMapper = { + serializedName: "BillingAccountUpdateRequest", + type: { + name: "Composite", + className: "BillingAccountUpdateRequest", + modelProperties: { + displayName: { + serializedName: "properties.displayName", + type: { + name: "String" + } + }, + soldTo: { + serializedName: "properties.soldTo", + type: { + name: "Composite", + className: "AddressDetails" + } + }, + agreementType: { + readOnly: true, + serializedName: "properties.agreementType", + type: { + name: "String" + } + }, + accountType: { + readOnly: true, + serializedName: "properties.accountType", + type: { + name: "String" + } + }, + accountStatus: { + readOnly: true, + serializedName: "properties.accountStatus", + type: { + name: "String" + } + }, + billingProfiles: { + serializedName: "properties.billingProfiles", + type: { + name: "Composite", + className: "BillingProfilesOnExpand" + } + }, + enrollmentDetails: { + readOnly: true, + serializedName: "properties.enrollmentDetails", + type: { + name: "Composite", + className: "Enrollment" + } + }, + departments: { + serializedName: "properties.departments", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Department" + } + } + } + }, + enrollmentAccounts: { + serializedName: "properties.enrollmentAccounts", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EnrollmentAccount" + } + } + } + }, + hasReadAccess: { + readOnly: true, + serializedName: "properties.hasReadAccess", + type: { + name: "Boolean" + } + } + } + } +}; + +export const BillingProperty: msRest.CompositeMapper = { + serializedName: "BillingProperty", + type: { + name: "Composite", + className: "BillingProperty", + modelProperties: { + ...Resource.type.modelProperties, + accountAdminNotificationEmailAddress: { + readOnly: true, + serializedName: "properties.accountAdminNotificationEmailAddress", + type: { + name: "String" + } + }, + billingTenantId: { + readOnly: true, + serializedName: "properties.billingTenantId", + type: { + name: "String" + } + }, + billingAccountId: { + readOnly: true, + serializedName: "properties.billingAccountId", + type: { + name: "String" + } + }, + billingAccountDisplayName: { + readOnly: true, + serializedName: "properties.billingAccountDisplayName", + type: { + name: "String" + } + }, + billingProfileId: { + readOnly: true, + serializedName: "properties.billingProfileId", + type: { + name: "String" + } + }, + billingProfileDisplayName: { + readOnly: true, + serializedName: "properties.billingProfileDisplayName", + type: { + name: "String" + } + }, + billingProfileStatus: { + readOnly: true, + serializedName: "properties.billingProfileStatus", + type: { + name: "String" + } + }, + billingProfileStatusReasonCode: { + readOnly: true, + serializedName: "properties.billingProfileStatusReasonCode", + type: { + name: "String" + } + }, + billingProfileSpendingLimit: { + readOnly: true, + serializedName: "properties.billingProfileSpendingLimit", + type: { + name: "String" + } + }, + costCenter: { + serializedName: "properties.costCenter", + type: { + name: "String" + } + }, + invoiceSectionId: { + readOnly: true, + serializedName: "properties.invoiceSectionId", + type: { + name: "String" + } + }, + invoiceSectionDisplayName: { + readOnly: true, + serializedName: "properties.invoiceSectionDisplayName", + type: { + name: "String" + } + }, + isAccountAdmin: { + readOnly: true, + serializedName: "properties.isAccountAdmin", + type: { + name: "Boolean" + } + }, + productId: { + readOnly: true, + serializedName: "properties.productId", + type: { + name: "String" + } + }, + productName: { + readOnly: true, + serializedName: "properties.productName", + type: { + name: "String" + } + }, + skuId: { + readOnly: true, + serializedName: "properties.skuId", + type: { + name: "String" + } + }, + skuDescription: { + readOnly: true, + serializedName: "properties.skuDescription", + type: { + name: "String" + } + } + } + } +}; + +export const Instruction: msRest.CompositeMapper = { + serializedName: "Instruction", + type: { + name: "Composite", + className: "Instruction", + modelProperties: { + ...Resource.type.modelProperties, + amount: { + required: true, + serializedName: "properties.amount", + type: { + name: "Number" + } + }, + startDate: { + required: true, + serializedName: "properties.startDate", + type: { + name: "DateTime" + } + }, + endDate: { + required: true, + serializedName: "properties.endDate", + type: { + name: "DateTime" + } + }, + creationDate: { + serializedName: "properties.creationDate", + type: { + name: "DateTime" + } + } + } + } +}; + +export const BillingProfileCreationRequest: msRest.CompositeMapper = { + serializedName: "BillingProfileCreationRequest", + type: { + name: "Composite", + className: "BillingProfileCreationRequest", + modelProperties: { + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + poNumber: { + serializedName: "poNumber", + type: { + name: "String" + } + }, + billTo: { + serializedName: "billTo", + type: { + name: "Composite", + className: "AddressDetails" + } + }, + invoiceEmailOptIn: { + serializedName: "invoiceEmailOptIn", + type: { + name: "Boolean" + } + }, + enabledAzurePlans: { + serializedName: "enabledAzurePlans", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AzurePlan" + } + } + } + } + } + } +}; + +export const InvoiceSectionCreationRequest: msRest.CompositeMapper = { + serializedName: "InvoiceSectionCreationRequest", + type: { + name: "Composite", + className: "InvoiceSectionCreationRequest", + modelProperties: { + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + } + } + } +}; + +export const InvoiceSectionWithCreateSubPermission: msRest.CompositeMapper = { + serializedName: "InvoiceSectionWithCreateSubPermission", + type: { + name: "Composite", + className: "InvoiceSectionWithCreateSubPermission", + modelProperties: { + invoiceSectionId: { + readOnly: true, + serializedName: "invoiceSectionId", + type: { + name: "String" + } + }, + invoiceSectionDisplayName: { + readOnly: true, + serializedName: "invoiceSectionDisplayName", + type: { + name: "String" + } + }, + invoiceSectionSystemId: { + readOnly: true, + serializedName: "invoiceSectionSystemId", + type: { + name: "String" + } + }, + billingProfileId: { + readOnly: true, + serializedName: "billingProfileId", + type: { + name: "String" + } + }, + billingProfileDisplayName: { + readOnly: true, + serializedName: "billingProfileDisplayName", + type: { + name: "String" + } + }, + billingProfileStatus: { + readOnly: true, + serializedName: "billingProfileStatus", + type: { + name: "String" + } + }, + billingProfileStatusReasonCode: { + readOnly: true, + serializedName: "billingProfileStatusReasonCode", + type: { + name: "String" + } + }, + billingProfileSpendingLimit: { + readOnly: true, + serializedName: "billingProfileSpendingLimit", + type: { + name: "String" + } + }, + billingProfileSystemId: { + readOnly: true, + serializedName: "billingProfileSystemId", + type: { + name: "String" + } + }, + enabledAzurePlans: { + serializedName: "enabledAzurePlans", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AzurePlan" + } + } + } + } + } + } +}; + +export const DownloadUrl: msRest.CompositeMapper = { + serializedName: "DownloadUrl", + type: { + name: "Composite", + className: "DownloadUrl", + modelProperties: { + expiryTime: { + readOnly: true, + serializedName: "expiryTime", + type: { + name: "DateTime" + } + }, + url: { + readOnly: true, + serializedName: "url", + type: { + name: "String" + } + } + } + } +}; + +export const ErrorDetails: msRest.CompositeMapper = { + serializedName: "ErrorDetails", + type: { + name: "Composite", + className: "ErrorDetails", + modelProperties: { + code: { + readOnly: true, + serializedName: "code", + type: { + name: "String" + } + }, + message: { + readOnly: true, + serializedName: "message", + type: { + name: "String" + } + }, + target: { + readOnly: true, + serializedName: "target", + type: { + name: "String" + } + } + } + } +}; + +export const ErrorResponse: msRest.CompositeMapper = { + serializedName: "ErrorResponse", + type: { + name: "Composite", + className: "ErrorResponse", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorDetails" + } + } + } + } +}; + +export const Amount: msRest.CompositeMapper = { + serializedName: "Amount", + type: { + name: "Composite", + className: "Amount", + modelProperties: { + currency: { + readOnly: true, + serializedName: "currency", + type: { + name: "String" + } + }, + value: { + serializedName: "value", + type: { + name: "Number" + } + } + } + } +}; + +export const Document: msRest.CompositeMapper = { + serializedName: "Document", + type: { + name: "Composite", + className: "Document", + modelProperties: { + kind: { + readOnly: true, + serializedName: "kind", + type: { + name: "String" + } + }, + url: { + readOnly: true, + serializedName: "url", + type: { + name: "String" + } + }, + source: { + readOnly: true, + serializedName: "source", + type: { + name: "String" + } + } + } + } +}; + +export const PaymentProperties: msRest.CompositeMapper = { + serializedName: "PaymentProperties", + type: { + name: "Composite", + className: "PaymentProperties", + modelProperties: { + paymentType: { + readOnly: true, + serializedName: "paymentType", + type: { + name: "String" + } + }, + amount: { + readOnly: true, + serializedName: "amount", + type: { + name: "Composite", + className: "Amount" + } + }, + date: { + readOnly: true, + serializedName: "date", + type: { + name: "DateTime" + } + }, + paymentMethodFamily: { + serializedName: "paymentMethodFamily", + type: { + name: "String" + } + }, + paymentMethodType: { + readOnly: true, + serializedName: "paymentMethodType", + type: { + name: "String" + } + } + } + } +}; + +export const Invoice: msRest.CompositeMapper = { + serializedName: "Invoice", + type: { + name: "Composite", + className: "Invoice", + modelProperties: { + ...Resource.type.modelProperties, + dueDate: { + readOnly: true, + serializedName: "properties.dueDate", + type: { + name: "DateTime" + } + }, + invoiceDate: { + readOnly: true, + serializedName: "properties.invoiceDate", + type: { + name: "DateTime" + } + }, + status: { + readOnly: true, + serializedName: "properties.status", + type: { + name: "String" + } + }, + amountDue: { + readOnly: true, + serializedName: "properties.amountDue", + type: { + name: "Composite", + className: "Amount" + } + }, + azurePrepaymentApplied: { + readOnly: true, + serializedName: "properties.azurePrepaymentApplied", + type: { + name: "Composite", + className: "Amount" + } + }, + billedAmount: { + readOnly: true, + serializedName: "properties.billedAmount", + type: { + name: "Composite", + className: "Amount" + } + }, + creditAmount: { + readOnly: true, + serializedName: "properties.creditAmount", + type: { + name: "Composite", + className: "Amount" + } + }, + freeAzureCreditApplied: { + readOnly: true, + serializedName: "properties.freeAzureCreditApplied", + type: { + name: "Composite", + className: "Amount" + } + }, + subTotal: { + readOnly: true, + serializedName: "properties.subTotal", + type: { + name: "Composite", + className: "Amount" + } + }, + taxAmount: { + readOnly: true, + serializedName: "properties.taxAmount", + type: { + name: "Composite", + className: "Amount" + } + }, + totalAmount: { + readOnly: true, + serializedName: "properties.totalAmount", + type: { + name: "Composite", + className: "Amount" + } + }, + invoicePeriodStartDate: { + readOnly: true, + serializedName: "properties.invoicePeriodStartDate", + type: { + name: "DateTime" + } + }, + invoicePeriodEndDate: { + readOnly: true, + serializedName: "properties.invoicePeriodEndDate", + type: { + name: "DateTime" + } + }, + invoiceType: { + readOnly: true, + serializedName: "properties.invoiceType", + type: { + name: "String" + } + }, + isMonthlyInvoice: { + readOnly: true, + serializedName: "properties.isMonthlyInvoice", + type: { + name: "Boolean" + } + }, + billingProfileId: { + readOnly: true, + serializedName: "properties.billingProfileId", + type: { + name: "String" + } + }, + billingProfileDisplayName: { + readOnly: true, + serializedName: "properties.billingProfileDisplayName", + type: { + name: "String" + } + }, + purchaseOrderNumber: { + readOnly: true, + serializedName: "properties.purchaseOrderNumber", + type: { + name: "String" + } + }, + documents: { + readOnly: true, + serializedName: "properties.documents", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Document" + } + } + } + }, + payments: { + readOnly: true, + serializedName: "properties.payments", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PaymentProperties" + } + } + } + }, + subscriptionId: { + readOnly: true, + serializedName: "properties.subscriptionId", + type: { + name: "String" + } + } + } + } +}; + +export const Product: msRest.CompositeMapper = { + serializedName: "Product", + type: { + name: "Composite", + className: "Product", + modelProperties: { + ...Resource.type.modelProperties, + autoRenew: { + serializedName: "properties.autoRenew", + type: { + name: "String" + } + }, + displayName: { + readOnly: true, + serializedName: "properties.displayName", + type: { + name: "String" + } + }, + purchaseDate: { + readOnly: true, + serializedName: "properties.purchaseDate", + type: { + name: "DateTime" + } + }, + productTypeId: { + readOnly: true, + serializedName: "properties.productTypeId", + type: { + name: "String" + } + }, + productType: { + readOnly: true, + serializedName: "properties.productType", + type: { + name: "String" + } + }, + status: { + serializedName: "properties.status", + type: { + name: "String" + } + }, + endDate: { + readOnly: true, + serializedName: "properties.endDate", + type: { + name: "DateTime" + } + }, + billingFrequency: { + serializedName: "properties.billingFrequency", + type: { + name: "String" + } + }, + lastCharge: { + readOnly: true, + serializedName: "properties.lastCharge", + type: { + name: "Composite", + className: "Amount" + } + }, + lastChargeDate: { + readOnly: true, + serializedName: "properties.lastChargeDate", + type: { + name: "DateTime" + } + }, + quantity: { + readOnly: true, + serializedName: "properties.quantity", + type: { + name: "Number" + } + }, + skuId: { + readOnly: true, + serializedName: "properties.skuId", + type: { + name: "String" + } + }, + skuDescription: { + readOnly: true, + serializedName: "properties.skuDescription", + type: { + name: "String" + } + }, + tenantId: { + readOnly: true, + serializedName: "properties.tenantId", + type: { + name: "String" + } + }, + availabilityId: { + readOnly: true, + serializedName: "properties.availabilityId", + type: { + name: "String" + } + }, + invoiceSectionId: { + readOnly: true, + serializedName: "properties.invoiceSectionId", + type: { + name: "String" + } + }, + invoiceSectionDisplayName: { + readOnly: true, + serializedName: "properties.invoiceSectionDisplayName", + type: { + name: "String" + } + }, + billingProfileId: { + readOnly: true, + serializedName: "properties.billingProfileId", + type: { + name: "String" + } + }, + billingProfileDisplayName: { + readOnly: true, + serializedName: "properties.billingProfileDisplayName", + type: { + name: "String" + } + }, + customerId: { + readOnly: true, + serializedName: "properties.customerId", + type: { + name: "String" + } + }, + customerDisplayName: { + readOnly: true, + serializedName: "properties.customerDisplayName", + type: { + name: "String" + } + }, + reseller: { + readOnly: true, + serializedName: "properties.reseller", + type: { + name: "Composite", + className: "Reseller" + } + } + } + } +}; + +export const ValidateProductTransferEligibilityError: msRest.CompositeMapper = { + serializedName: "ValidateProductTransferEligibilityError", + type: { + name: "Composite", + className: "ValidateProductTransferEligibilityError", + modelProperties: { + code: { + serializedName: "code", + type: { + name: "String" + } + }, + message: { + serializedName: "message", + type: { + name: "String" + } + }, + details: { + serializedName: "details", + type: { + name: "String" + } + } + } + } +}; + +export const ValidateProductTransferEligibilityResult: msRest.CompositeMapper = { + serializedName: "ValidateProductTransferEligibilityResult", + type: { + name: "Composite", + className: "ValidateProductTransferEligibilityResult", + modelProperties: { + isMoveEligible: { + readOnly: true, + serializedName: "isMoveEligible", + type: { + name: "Boolean" + } + }, + errorDetails: { + serializedName: "errorDetails", + type: { + name: "Composite", + className: "ValidateProductTransferEligibilityError" + } + } + } + } +}; + +export const BillingSubscription: msRest.CompositeMapper = { + serializedName: "BillingSubscription", + type: { + name: "Composite", + className: "BillingSubscription", + modelProperties: { + ...Resource.type.modelProperties, + displayName: { + readOnly: true, + serializedName: "properties.displayName", + type: { + name: "String" + } + }, + subscriptionId: { + readOnly: true, + serializedName: "properties.subscriptionId", + type: { + name: "Uuid" + } + }, + subscriptionBillingStatus: { + serializedName: "properties.subscriptionBillingStatus", + type: { + name: "String" + } + }, + lastMonthCharges: { + readOnly: true, + serializedName: "properties.lastMonthCharges", + type: { + name: "Composite", + className: "Amount" + } + }, + monthToDateCharges: { + readOnly: true, + serializedName: "properties.monthToDateCharges", + type: { + name: "Composite", + className: "Amount" + } + }, + billingProfileId: { + readOnly: true, + serializedName: "properties.billingProfileId", + type: { + name: "String" + } + }, + billingProfileDisplayName: { + readOnly: true, + serializedName: "properties.billingProfileDisplayName", + type: { + name: "String" + } + }, + costCenter: { + serializedName: "properties.costCenter", + type: { + name: "String" + } + }, + customerId: { + readOnly: true, + serializedName: "properties.customerId", + type: { + name: "String" + } + }, + customerDisplayName: { + readOnly: true, + serializedName: "properties.customerDisplayName", + type: { + name: "String" + } + }, + invoiceSectionId: { + readOnly: true, + serializedName: "properties.invoiceSectionId", + type: { + name: "String" + } + }, + invoiceSectionDisplayName: { + readOnly: true, + serializedName: "properties.invoiceSectionDisplayName", + type: { + name: "String" + } + }, + reseller: { + readOnly: true, + serializedName: "properties.reseller", + type: { + name: "Composite", + className: "Reseller" + } + }, + skuId: { + serializedName: "properties.skuId", + type: { + name: "String" + } + }, + skuDescription: { + readOnly: true, + serializedName: "properties.skuDescription", + type: { + name: "String" + } + } + } + } +}; + +export const EnrollmentAccountContext: msRest.CompositeMapper = { + serializedName: "EnrollmentAccountContext", + type: { + name: "Composite", + className: "EnrollmentAccountContext", + modelProperties: { + costCenter: { + serializedName: "costCenter", + type: { + name: "String" + } + }, + startDate: { + serializedName: "startDate", + type: { + name: "DateTime" + } + }, + endDate: { + serializedName: "endDate", + type: { + name: "DateTime" + } + }, + enrollmentAccountName: { + serializedName: "enrollmentAccountName", + type: { + name: "String" + } + } + } + } +}; + +export const Transaction: msRest.CompositeMapper = { + serializedName: "Transaction", + type: { + name: "Composite", + className: "Transaction", + modelProperties: { + ...Resource.type.modelProperties, + kind: { + serializedName: "properties.kind", + type: { + name: "String" + } + }, + date: { + readOnly: true, + serializedName: "properties.date", + type: { + name: "DateTime" + } + }, + invoice: { + readOnly: true, + serializedName: "properties.invoice", + type: { + name: "String" + } + }, + invoiceId: { + readOnly: true, + serializedName: "properties.invoiceId", + type: { + name: "String" + } + }, + orderId: { + readOnly: true, + serializedName: "properties.orderId", + type: { + name: "String" + } + }, + orderName: { + readOnly: true, + serializedName: "properties.orderName", + type: { + name: "String" + } + }, + productFamily: { + readOnly: true, + serializedName: "properties.productFamily", + type: { + name: "String" + } + }, + productTypeId: { + readOnly: true, + serializedName: "properties.productTypeId", + type: { + name: "String" + } + }, + productType: { + readOnly: true, + serializedName: "properties.productType", + type: { + name: "String" + } + }, + productDescription: { + readOnly: true, + serializedName: "properties.productDescription", + type: { + name: "String" + } + }, + transactionType: { + serializedName: "properties.transactionType", + type: { + name: "String" + } + }, + transactionAmount: { + readOnly: true, + serializedName: "properties.transactionAmount", + type: { + name: "Composite", + className: "Amount" + } + }, + quantity: { + readOnly: true, + serializedName: "properties.quantity", + type: { + name: "Number" + } + }, + invoiceSectionId: { + readOnly: true, + serializedName: "properties.invoiceSectionId", + type: { + name: "String" + } + }, + invoiceSectionDisplayName: { + readOnly: true, + serializedName: "properties.invoiceSectionDisplayName", + type: { + name: "String" + } + }, + billingProfileId: { + readOnly: true, + serializedName: "properties.billingProfileId", + type: { + name: "String" + } + }, + billingProfileDisplayName: { + readOnly: true, + serializedName: "properties.billingProfileDisplayName", + type: { + name: "String" + } + }, + customerId: { + readOnly: true, + serializedName: "properties.customerId", + type: { + name: "String" + } + }, + customerDisplayName: { + readOnly: true, + serializedName: "properties.customerDisplayName", + type: { + name: "String" + } + }, + subscriptionId: { + readOnly: true, + serializedName: "properties.subscriptionId", + type: { + name: "String" + } + }, + subscriptionName: { + readOnly: true, + serializedName: "properties.subscriptionName", + type: { + name: "String" + } + }, + azurePlan: { + readOnly: true, + serializedName: "properties.azurePlan", + type: { + name: "String" + } + }, + azureCreditApplied: { + readOnly: true, + serializedName: "properties.azureCreditApplied", + type: { + name: "Composite", + className: "Amount" + } + }, + billingCurrency: { + readOnly: true, + serializedName: "properties.billingCurrency", + type: { + name: "String" + } + }, + discount: { + readOnly: true, + serializedName: "properties.discount", + type: { + name: "Number" + } + }, + effectivePrice: { + readOnly: true, + serializedName: "properties.effectivePrice", + type: { + name: "Composite", + className: "Amount" + } + }, + exchangeRate: { + readOnly: true, + serializedName: "properties.exchangeRate", + type: { + name: "Number" + } + }, + marketPrice: { + readOnly: true, + serializedName: "properties.marketPrice", + type: { + name: "Composite", + className: "Amount" + } + }, + pricingCurrency: { + readOnly: true, + serializedName: "properties.pricingCurrency", + type: { + name: "String" + } + }, + servicePeriodStartDate: { + readOnly: true, + serializedName: "properties.servicePeriodStartDate", + type: { + name: "DateTime" + } + }, + servicePeriodEndDate: { + readOnly: true, + serializedName: "properties.servicePeriodEndDate", + type: { + name: "DateTime" + } + }, + subTotal: { + readOnly: true, + serializedName: "properties.subTotal", + type: { + name: "Composite", + className: "Amount" + } + }, + tax: { + readOnly: true, + serializedName: "properties.tax", + type: { + name: "Composite", + className: "Amount" + } + }, + unitOfMeasure: { + readOnly: true, + serializedName: "properties.unitOfMeasure", + type: { + name: "String" + } + }, + units: { + readOnly: true, + serializedName: "properties.units", + type: { + name: "Number" + } + }, + unitType: { + readOnly: true, + serializedName: "properties.unitType", + type: { + name: "String" + } + } + } + } +}; + +export const Policy: msRest.CompositeMapper = { + serializedName: "Policy", + type: { + name: "Composite", + className: "Policy", + modelProperties: { + ...Resource.type.modelProperties, + marketplacePurchases: { + serializedName: "properties.marketplacePurchases", + type: { + name: "String" + } + }, + reservationPurchases: { + serializedName: "properties.reservationPurchases", + type: { + name: "String" + } + }, + viewCharges: { + serializedName: "properties.viewCharges", + type: { + name: "String" + } + } + } + } +}; + +export const CustomerPolicy: msRest.CompositeMapper = { + serializedName: "CustomerPolicy", + type: { + name: "Composite", + className: "CustomerPolicy", + modelProperties: { + ...Resource.type.modelProperties, + viewCharges: { + serializedName: "properties.viewCharges", + type: { + name: "String" + } + } + } + } +}; + +export const AvailableBalance: msRest.CompositeMapper = { + serializedName: "AvailableBalance", + type: { + name: "Composite", + className: "AvailableBalance", + modelProperties: { + ...Resource.type.modelProperties, + amount: { + readOnly: true, + serializedName: "properties.amount", + type: { + name: "Composite", + className: "Amount" + } + } + } + } +}; + +export const OperationDisplay: msRest.CompositeMapper = { + serializedName: "Operation_display", + type: { + name: "Composite", + className: "OperationDisplay", + modelProperties: { + provider: { + readOnly: true, + serializedName: "provider", + type: { + name: "String" + } + }, + resource: { + readOnly: true, + serializedName: "resource", + type: { + name: "String" + } + }, + operation: { + readOnly: true, + serializedName: "operation", + type: { + name: "String" + } + } + } + } +}; + +export const Operation: msRest.CompositeMapper = { + serializedName: "Operation", + type: { + name: "Composite", + className: "Operation", + modelProperties: { + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + display: { + serializedName: "display", + type: { + name: "Composite", + className: "OperationDisplay" + } + } + } + } +}; + +export const BillingRoleAssignment: msRest.CompositeMapper = { + serializedName: "BillingRoleAssignment", + type: { + name: "Composite", + className: "BillingRoleAssignment", + modelProperties: { + ...Resource.type.modelProperties, + createdOn: { + readOnly: true, + serializedName: "properties.createdOn", + type: { + name: "String" + } + }, + createdByPrincipalTenantId: { + readOnly: true, + serializedName: "properties.createdByPrincipalTenantId", + type: { + name: "String" + } + }, + createdByPrincipalId: { + readOnly: true, + serializedName: "properties.createdByPrincipalId", + type: { + name: "String" + } + }, + createdByUserEmailAddress: { + readOnly: true, + serializedName: "properties.createdByUserEmailAddress", + type: { + name: "String" + } + }, + principalId: { + serializedName: "properties.principalId", + type: { + name: "String" + } + }, + principalTenantId: { + serializedName: "properties.principalTenantId", + type: { + name: "String" + } + }, + roleDefinitionId: { + serializedName: "properties.roleDefinitionId", + type: { + name: "String" + } + }, + scope: { + readOnly: true, + serializedName: "properties.scope", + type: { + name: "String" + } + }, + userAuthenticationType: { + serializedName: "properties.userAuthenticationType", + type: { + name: "String" + } + }, + userEmailAddress: { + serializedName: "properties.userEmailAddress", + type: { + name: "String" + } + } + } + } +}; + +export const BillingPermissionsProperties: msRest.CompositeMapper = { + serializedName: "BillingPermissionsProperties", + type: { + name: "Composite", + className: "BillingPermissionsProperties", + modelProperties: { + actions: { + readOnly: true, + serializedName: "actions", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + notActions: { + readOnly: true, + serializedName: "notActions", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const BillingRoleDefinition: msRest.CompositeMapper = { + serializedName: "BillingRoleDefinition", + type: { + name: "Composite", + className: "BillingRoleDefinition", + modelProperties: { + ...Resource.type.modelProperties, + description: { + readOnly: true, + serializedName: "properties.description", + type: { + name: "String" + } + }, + permissions: { + serializedName: "properties.permissions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BillingPermissionsProperties" + } + } + } + }, + roleName: { + readOnly: true, + serializedName: "properties.roleName", + type: { + name: "String" + } + } + } + } +}; + +export const Participants: msRest.CompositeMapper = { + serializedName: "Participants", + type: { + name: "Composite", + className: "Participants", + modelProperties: { + status: { + readOnly: true, + serializedName: "status", + type: { + name: "String" + } + }, + statusDate: { + readOnly: true, + serializedName: "statusDate", + type: { + name: "DateTime" + } + }, + email: { + readOnly: true, + serializedName: "email", + type: { + name: "String" + } + } + } + } +}; + +export const Agreement: msRest.CompositeMapper = { + serializedName: "Agreement", + type: { + name: "Composite", + className: "Agreement", + modelProperties: { + ...Resource.type.modelProperties, + agreementLink: { + readOnly: true, + serializedName: "properties.agreementLink", + type: { + name: "String" + } + }, + category: { + readOnly: true, + serializedName: "properties.category", + type: { + name: "String" + } + }, + acceptanceMode: { + readOnly: true, + serializedName: "properties.acceptanceMode", + type: { + name: "String" + } + }, + effectiveDate: { + readOnly: true, + serializedName: "properties.effectiveDate", + type: { + name: "DateTime" + } + }, + expirationDate: { + readOnly: true, + serializedName: "properties.expirationDate", + type: { + name: "DateTime" + } + }, + participants: { + serializedName: "properties.participants", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Participants" + } + } + } + }, + status: { + readOnly: true, + serializedName: "properties.status", + type: { + name: "String" + } + } + } + } +}; + +export const EnrollmentAccountSummary: msRest.CompositeMapper = { + serializedName: "EnrollmentAccountSummary", + type: { + name: "Composite", + className: "EnrollmentAccountSummary", + modelProperties: { + ...Resource.type.modelProperties, + principalName: { + readOnly: true, + serializedName: "properties.principalName", + type: { + name: "String" + } + } + } + } +}; + +export const BillingPeriod: msRest.CompositeMapper = { + serializedName: "BillingPeriod", + type: { + name: "Composite", + className: "BillingPeriod", + modelProperties: { + ...Resource.type.modelProperties, + billingPeriodStartDate: { + readOnly: true, + serializedName: "properties.billingPeriodStartDate", + type: { + name: "Date" + } + }, + billingPeriodEndDate: { + readOnly: true, + serializedName: "properties.billingPeriodEndDate", + type: { + name: "Date" + } + }, + invoiceIds: { + readOnly: true, + serializedName: "properties.invoiceIds", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const BillingProfilesCreateOrUpdateHeaders: msRest.CompositeMapper = { + serializedName: "billingprofiles-createorupdate-headers", + type: { + name: "Composite", + className: "BillingProfilesCreateOrUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number" + } + } + } + } +}; + +export const InvoiceSectionsCreateOrUpdateHeaders: msRest.CompositeMapper = { + serializedName: "invoicesections-createorupdate-headers", + type: { + name: "Composite", + className: "InvoiceSectionsCreateOrUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number" + } + } + } + } +}; + +export const InvoicesDownloadInvoiceHeaders: msRest.CompositeMapper = { + serializedName: "invoices-downloadinvoice-headers", + type: { + name: "Composite", + className: "InvoicesDownloadInvoiceHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "String" + } + } + } + } +}; + +export const InvoicesDownloadBillingSubscriptionInvoiceHeaders: msRest.CompositeMapper = { + serializedName: "invoices-downloadbillingsubscriptioninvoice-headers", + type: { + name: "Composite", + className: "InvoicesDownloadBillingSubscriptionInvoiceHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "String" + } + } + } + } +}; + +export const BillingSubscriptionsMoveHeaders: msRest.CompositeMapper = { + serializedName: "billingsubscriptions-move-headers", + type: { + name: "Composite", + className: "BillingSubscriptionsMoveHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number" + } + } + } + } +}; + +export const ProductsMoveHeaders: msRest.CompositeMapper = { + serializedName: "products-move-headers", + type: { + name: "Composite", + className: "ProductsMoveHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number" + } + } + } + } +}; + +export const BillingAccountListResult: msRest.CompositeMapper = { + serializedName: "BillingAccountListResult", + type: { + name: "Composite", + className: "BillingAccountListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BillingAccount" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const InvoiceSectionListWithCreateSubPermissionResult: msRest.CompositeMapper = { + serializedName: "InvoiceSectionListWithCreateSubPermissionResult", + type: { + name: "Composite", + className: "InvoiceSectionListWithCreateSubPermissionResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "InvoiceSectionWithCreateSubPermission" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const InstructionListResult: msRest.CompositeMapper = { + serializedName: "InstructionListResult", + type: { + name: "Composite", + className: "InstructionListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Instruction" + } + } + } + }, + nextLink: { readOnly: true, - serializedName: "type", + serializedName: "nextLink", type: { name: "String" } @@ -45,16 +2942,28 @@ export const Resource: msRest.CompositeMapper = { } }; -export const EnrollmentAccount: msRest.CompositeMapper = { - serializedName: "EnrollmentAccount", +export const BillingProfileListResult: msRest.CompositeMapper = { + serializedName: "BillingProfileListResult", type: { name: "Composite", - className: "EnrollmentAccount", + className: "BillingProfileListResult", modelProperties: { - ...Resource.type.modelProperties, - principalName: { + value: { readOnly: true, - serializedName: "properties.principalName", + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BillingProfile" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", type: { name: "String" } @@ -63,59 +2972,88 @@ export const EnrollmentAccount: msRest.CompositeMapper = { } }; -export const BillingPeriod: msRest.CompositeMapper = { - serializedName: "BillingPeriod", +export const CustomerListResult: msRest.CompositeMapper = { + serializedName: "CustomerListResult", type: { name: "Composite", - className: "BillingPeriod", + className: "CustomerListResult", modelProperties: { - ...Resource.type.modelProperties, - billingPeriodStartDate: { + value: { readOnly: true, - serializedName: "properties.billingPeriodStartDate", + serializedName: "", type: { - name: "Date" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Customer" + } + } } }, - billingPeriodEndDate: { + nextLink: { readOnly: true, - serializedName: "properties.billingPeriodEndDate", + serializedName: "nextLink", type: { - name: "Date" + name: "String" } - }, - invoiceIds: { + } + } + } +}; + +export const InvoiceSectionListResult: msRest.CompositeMapper = { + serializedName: "InvoiceSectionListResult", + type: { + name: "Composite", + className: "InvoiceSectionListResult", + modelProperties: { + value: { readOnly: true, - serializedName: "properties.invoiceIds", + serializedName: "", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "InvoiceSection" } } } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } } } } }; -export const DownloadUrl: msRest.CompositeMapper = { - serializedName: "DownloadUrl", +export const BillingPermissionsListResult: msRest.CompositeMapper = { + serializedName: "BillingPermissionsListResult", type: { name: "Composite", - className: "DownloadUrl", + className: "BillingPermissionsListResult", modelProperties: { - expiryTime: { + value: { readOnly: true, - serializedName: "expiryTime", + serializedName: "", type: { - name: "DateTime" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BillingPermissionsProperties" + } + } } }, - url: { + nextLink: { readOnly: true, - serializedName: "url", + serializedName: "nextLink", type: { name: "String" } @@ -124,29 +3062,28 @@ export const DownloadUrl: msRest.CompositeMapper = { } }; -export const ErrorDetails: msRest.CompositeMapper = { - serializedName: "ErrorDetails", +export const BillingSubscriptionsListResult: msRest.CompositeMapper = { + serializedName: "BillingSubscriptionsListResult", type: { name: "Composite", - className: "ErrorDetails", + className: "BillingSubscriptionsListResult", modelProperties: { - code: { - readOnly: true, - serializedName: "code", - type: { - name: "String" - } - }, - message: { + value: { readOnly: true, - serializedName: "message", + serializedName: "", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BillingSubscription" + } + } } }, - target: { + nextLink: { readOnly: true, - serializedName: "target", + serializedName: "nextLink", type: { name: "String" } @@ -155,90 +3092,118 @@ export const ErrorDetails: msRest.CompositeMapper = { } }; -export const ErrorResponse: msRest.CompositeMapper = { - serializedName: "ErrorResponse", +export const ProductsListResult: msRest.CompositeMapper = { + serializedName: "ProductsListResult", type: { name: "Composite", - className: "ErrorResponse", + className: "ProductsListResult", modelProperties: { - error: { - serializedName: "error", + value: { + readOnly: true, + serializedName: "", type: { - name: "Composite", - className: "ErrorDetails" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Product" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" } } } } }; -export const Invoice: msRest.CompositeMapper = { - serializedName: "Invoice", +export const InvoiceListResult: msRest.CompositeMapper = { + serializedName: "InvoiceListResult", type: { name: "Composite", - className: "Invoice", + className: "InvoiceListResult", modelProperties: { - ...Resource.type.modelProperties, - downloadUrl: { - serializedName: "properties.downloadUrl", - type: { - name: "Composite", - className: "DownloadUrl" - } - }, - invoicePeriodStartDate: { + value: { readOnly: true, - serializedName: "properties.invoicePeriodStartDate", + serializedName: "", type: { - name: "Date" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Invoice" + } + } } }, - invoicePeriodEndDate: { + nextLink: { readOnly: true, - serializedName: "properties.invoicePeriodEndDate", + serializedName: "nextLink", type: { - name: "Date" + name: "String" } - }, - billingPeriodIds: { + } + } + } +}; + +export const TransactionListResult: msRest.CompositeMapper = { + serializedName: "TransactionListResult", + type: { + name: "Composite", + className: "TransactionListResult", + modelProperties: { + value: { readOnly: true, - serializedName: "properties.billingPeriodIds", + serializedName: "", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "Transaction" } } } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } } } } }; -export const OperationDisplay: msRest.CompositeMapper = { - serializedName: "Operation_display", +export const OperationListResult: msRest.CompositeMapper = { + serializedName: "OperationListResult", type: { name: "Composite", - className: "OperationDisplay", + className: "OperationListResult", modelProperties: { - provider: { - readOnly: true, - serializedName: "provider", - type: { - name: "String" - } - }, - resource: { + value: { readOnly: true, - serializedName: "resource", + serializedName: "", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Operation" + } + } } }, - operation: { + nextLink: { readOnly: true, - serializedName: "operation", + serializedName: "nextLink", type: { name: "String" } @@ -247,35 +3212,41 @@ export const OperationDisplay: msRest.CompositeMapper = { } }; -export const Operation: msRest.CompositeMapper = { - serializedName: "Operation", +export const BillingRoleDefinitionListResult: msRest.CompositeMapper = { + serializedName: "BillingRoleDefinitionListResult", type: { name: "Composite", - className: "Operation", + className: "BillingRoleDefinitionListResult", modelProperties: { - name: { + value: { readOnly: true, - serializedName: "name", + serializedName: "", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BillingRoleDefinition" + } + } } }, - display: { - serializedName: "display", + nextLink: { + readOnly: true, + serializedName: "nextLink", type: { - name: "Composite", - className: "OperationDisplay" + name: "String" } } } } }; -export const EnrollmentAccountListResult: msRest.CompositeMapper = { - serializedName: "EnrollmentAccountListResult", +export const BillingRoleAssignmentListResult: msRest.CompositeMapper = { + serializedName: "BillingRoleAssignmentListResult", type: { name: "Composite", - className: "EnrollmentAccountListResult", + className: "BillingRoleAssignmentListResult", modelProperties: { value: { readOnly: true, @@ -285,7 +3256,7 @@ export const EnrollmentAccountListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "EnrollmentAccount" + className: "BillingRoleAssignment" } } } @@ -301,11 +3272,11 @@ export const EnrollmentAccountListResult: msRest.CompositeMapper = { } }; -export const BillingPeriodsListResult: msRest.CompositeMapper = { - serializedName: "BillingPeriodsListResult", +export const AgreementListResult: msRest.CompositeMapper = { + serializedName: "AgreementListResult", type: { name: "Composite", - className: "BillingPeriodsListResult", + className: "AgreementListResult", modelProperties: { value: { readOnly: true, @@ -315,7 +3286,7 @@ export const BillingPeriodsListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "BillingPeriod" + className: "Agreement" } } } @@ -331,11 +3302,11 @@ export const BillingPeriodsListResult: msRest.CompositeMapper = { } }; -export const InvoicesListResult: msRest.CompositeMapper = { - serializedName: "InvoicesListResult", +export const EnrollmentAccountListResult: msRest.CompositeMapper = { + serializedName: "EnrollmentAccountListResult", type: { name: "Composite", - className: "InvoicesListResult", + className: "EnrollmentAccountListResult", modelProperties: { value: { readOnly: true, @@ -345,7 +3316,7 @@ export const InvoicesListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "Invoice" + className: "EnrollmentAccountSummary" } } } @@ -361,11 +3332,11 @@ export const InvoicesListResult: msRest.CompositeMapper = { } }; -export const OperationListResult: msRest.CompositeMapper = { - serializedName: "OperationListResult", +export const BillingPeriodsListResult: msRest.CompositeMapper = { + serializedName: "BillingPeriodsListResult", type: { name: "Composite", - className: "OperationListResult", + className: "BillingPeriodsListResult", modelProperties: { value: { readOnly: true, @@ -375,7 +3346,7 @@ export const OperationListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "Operation" + className: "BillingPeriod" } } } diff --git a/sdk/billing/arm-billing/src/models/operationsMappers.ts b/sdk/billing/arm-billing/src/models/operationsMappers.ts index 22478f5be09f..c22b051e72cc 100644 --- a/sdk/billing/arm-billing/src/models/operationsMappers.ts +++ b/sdk/billing/arm-billing/src/models/operationsMappers.ts @@ -1,18 +1,15 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - OperationListResult, + ErrorDetails, + ErrorResponse, Operation, OperationDisplay, - ErrorResponse, - ErrorDetails + OperationListResult } from "../models/mappers"; - diff --git a/sdk/billing/arm-billing/src/models/parameters.ts b/sdk/billing/arm-billing/src/models/parameters.ts index b8826d672899..66a2e083babb 100644 --- a/sdk/billing/arm-billing/src/models/parameters.ts +++ b/sdk/billing/arm-billing/src/models/parameters.ts @@ -20,11 +20,45 @@ export const acceptLanguage: msRest.OperationParameter = { } } }; -export const apiVersion: msRest.OperationQueryParameter = { +export const agreementName: msRest.OperationURLParameter = { + parameterPath: "agreementName", + mapper: { + required: true, + serializedName: "agreementName", + type: { + name: "String" + } + } +}; +export const apiVersion0: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + isConstant: true, + serializedName: "api-version", + defaultValue: '2020-05-01', + type: { + name: "String" + } + } +}; +export const apiVersion1: msRest.OperationQueryParameter = { parameterPath: "apiVersion", mapper: { required: true, + isConstant: true, serializedName: "api-version", + defaultValue: '2018-03-01-preview', + type: { + name: "String" + } + } +}; +export const billingAccountName: msRest.OperationURLParameter = { + parameterPath: "billingAccountName", + mapper: { + required: true, + serializedName: "billingAccountName", type: { name: "String" } @@ -40,6 +74,56 @@ export const billingPeriodName: msRest.OperationURLParameter = { } } }; +export const billingProfileName: msRest.OperationURLParameter = { + parameterPath: "billingProfileName", + mapper: { + required: true, + serializedName: "billingProfileName", + type: { + name: "String" + } + } +}; +export const billingRoleAssignmentName: msRest.OperationURLParameter = { + parameterPath: "billingRoleAssignmentName", + mapper: { + required: true, + serializedName: "billingRoleAssignmentName", + type: { + name: "String" + } + } +}; +export const billingRoleDefinitionName: msRest.OperationURLParameter = { + parameterPath: "billingRoleDefinitionName", + mapper: { + required: true, + serializedName: "billingRoleDefinitionName", + type: { + name: "String" + } + } +}; +export const customerName: msRest.OperationURLParameter = { + parameterPath: "customerName", + mapper: { + required: true, + serializedName: "customerName", + type: { + name: "String" + } + } +}; +export const downloadToken: msRest.OperationQueryParameter = { + parameterPath: "downloadToken", + mapper: { + required: true, + serializedName: "downloadToken", + type: { + name: "String" + } + } +}; export const expand: msRest.OperationQueryParameter = { parameterPath: [ "options", @@ -64,6 +148,16 @@ export const filter: msRest.OperationQueryParameter = { } } }; +export const instructionName: msRest.OperationURLParameter = { + parameterPath: "instructionName", + mapper: { + required: true, + serializedName: "instructionName", + type: { + name: "String" + } + } +}; export const invoiceName: msRest.OperationURLParameter = { parameterPath: "invoiceName", mapper: { @@ -74,6 +168,16 @@ export const invoiceName: msRest.OperationURLParameter = { } } }; +export const invoiceSectionName: msRest.OperationURLParameter = { + parameterPath: "invoiceSectionName", + mapper: { + required: true, + serializedName: "invoiceSectionName", + type: { + name: "String" + } + } +}; export const name: msRest.OperationURLParameter = { parameterPath: "name", mapper: { @@ -95,6 +199,48 @@ export const nextPageLink: msRest.OperationURLParameter = { }, skipEncoding: true }; +export const periodEndDate: msRest.OperationQueryParameter = { + parameterPath: "periodEndDate", + mapper: { + required: true, + serializedName: "periodEndDate", + type: { + name: "String" + } + } +}; +export const periodStartDate: msRest.OperationQueryParameter = { + parameterPath: "periodStartDate", + mapper: { + required: true, + serializedName: "periodStartDate", + type: { + name: "String" + } + } +}; +export const productName: msRest.OperationURLParameter = { + parameterPath: "productName", + mapper: { + required: true, + serializedName: "productName", + type: { + name: "String" + } + } +}; +export const search: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "search" + ], + mapper: { + serializedName: "$search", + type: { + name: "String" + } + } +}; export const skiptoken: msRest.OperationQueryParameter = { parameterPath: [ "options", diff --git a/sdk/billing/arm-billing/src/models/policiesMappers.ts b/sdk/billing/arm-billing/src/models/policiesMappers.ts new file mode 100644 index 000000000000..ae44ccd1c588 --- /dev/null +++ b/sdk/billing/arm-billing/src/models/policiesMappers.ts @@ -0,0 +1,47 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AddressDetails, + Agreement, + Amount, + AvailableBalance, + AzurePlan, + BaseResource, + BillingAccount, + BillingPeriod, + BillingPermissionsProperties, + BillingProfile, + BillingProfilesOnExpand, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscription, + Customer, + CustomerPolicy, + Department, + Document, + Enrollment, + EnrollmentAccount, + EnrollmentAccountSummary, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + IndirectRelationshipInfo, + Instruction, + Invoice, + InvoiceSection, + InvoiceSectionsOnExpand, + Participants, + PaymentProperties, + Policy, + Product, + Reseller, + Resource, + Transaction +} from "../models/mappers"; diff --git a/sdk/billing/arm-billing/src/models/productsMappers.ts b/sdk/billing/arm-billing/src/models/productsMappers.ts new file mode 100644 index 000000000000..fa04546d1cf7 --- /dev/null +++ b/sdk/billing/arm-billing/src/models/productsMappers.ts @@ -0,0 +1,52 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AddressDetails, + Agreement, + Amount, + AvailableBalance, + AzurePlan, + BaseResource, + BillingAccount, + BillingPeriod, + BillingPermissionsProperties, + BillingProfile, + BillingProfilesOnExpand, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscription, + Customer, + CustomerPolicy, + Department, + Document, + Enrollment, + EnrollmentAccount, + EnrollmentAccountSummary, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + IndirectRelationshipInfo, + Instruction, + Invoice, + InvoiceSection, + InvoiceSectionsOnExpand, + Participants, + PaymentProperties, + Policy, + Product, + ProductsListResult, + ProductsMoveHeaders, + Reseller, + Resource, + Transaction, + TransferProductRequestProperties, + ValidateProductTransferEligibilityError, + ValidateProductTransferEligibilityResult +} from "../models/mappers"; diff --git a/sdk/billing/arm-billing/src/models/transactionsMappers.ts b/sdk/billing/arm-billing/src/models/transactionsMappers.ts new file mode 100644 index 000000000000..05534d182bf2 --- /dev/null +++ b/sdk/billing/arm-billing/src/models/transactionsMappers.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AddressDetails, + Agreement, + Amount, + AvailableBalance, + AzurePlan, + BaseResource, + BillingAccount, + BillingPeriod, + BillingPermissionsProperties, + BillingProfile, + BillingProfilesOnExpand, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscription, + Customer, + CustomerPolicy, + Department, + Document, + Enrollment, + EnrollmentAccount, + EnrollmentAccountSummary, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + IndirectRelationshipInfo, + Instruction, + Invoice, + InvoiceSection, + InvoiceSectionsOnExpand, + Participants, + PaymentProperties, + Policy, + Product, + Reseller, + Resource, + Transaction, + TransactionListResult +} from "../models/mappers"; diff --git a/sdk/billing/arm-billing/src/operations/address.ts b/sdk/billing/arm-billing/src/operations/address.ts new file mode 100644 index 000000000000..9b9dd05d15b0 --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/address.ts @@ -0,0 +1,86 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/addressMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a Address. */ +export class Address { + private readonly client: BillingManagementClientContext; + + /** + * Create a Address. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * Validates an address. Use the operation to validate an address before using it as soldTo or a + * billTo address. + * @param address + * @param [options] The optional parameters + * @returns Promise + */ + validate(address: Models.AddressDetails, options?: msRest.RequestOptionsBase): Promise; + /** + * @param address + * @param callback The callback + */ + validate(address: Models.AddressDetails, callback: msRest.ServiceCallback): void; + /** + * @param address + * @param options The optional parameters + * @param callback The callback + */ + validate(address: Models.AddressDetails, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + validate(address: Models.AddressDetails, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + address, + options + }, + validateOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const validateOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "providers/Microsoft.Billing/validateAddress", + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "address", + mapper: { + ...Mappers.AddressDetails, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ValidateAddressResponse + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/billing/arm-billing/src/operations/agreements.ts b/sdk/billing/arm-billing/src/operations/agreements.ts new file mode 100644 index 000000000000..09431e913194 --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/agreements.ts @@ -0,0 +1,188 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/agreementsMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a Agreements. */ +export class Agreements { + private readonly client: BillingManagementClientContext; + + /** + * Create a Agreements. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * Lists the agreements for a billing account. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingAccount(billingAccountName: string, options?: Models.AgreementsListByBillingAccountOptionalParams): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param callback The callback + */ + listByBillingAccount(billingAccountName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingAccount(billingAccountName: string, options: Models.AgreementsListByBillingAccountOptionalParams, callback: msRest.ServiceCallback): void; + listByBillingAccount(billingAccountName: string, options?: Models.AgreementsListByBillingAccountOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + options + }, + listByBillingAccountOperationSpec, + callback) as Promise; + } + + /** + * Gets an agreement by ID. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param agreementName The ID that uniquely identifies an agreement. + * @param [options] The optional parameters + * @returns Promise + */ + get(billingAccountName: string, agreementName: string, options?: Models.AgreementsGetOptionalParams): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param agreementName The ID that uniquely identifies an agreement. + * @param callback The callback + */ + get(billingAccountName: string, agreementName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param agreementName The ID that uniquely identifies an agreement. + * @param options The optional parameters + * @param callback The callback + */ + get(billingAccountName: string, agreementName: string, options: Models.AgreementsGetOptionalParams, callback: msRest.ServiceCallback): void; + get(billingAccountName: string, agreementName: string, options?: Models.AgreementsGetOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + agreementName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Lists the agreements for a billing account. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByBillingAccountNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingAccountNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByBillingAccountNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByBillingAccountOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/agreements", + urlParameters: [ + Parameters.billingAccountName + ], + queryParameters: [ + Parameters.apiVersion0, + Parameters.expand + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AgreementListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/agreements/{agreementName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.agreementName + ], + queryParameters: [ + Parameters.apiVersion0, + Parameters.expand + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Agreement + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingAccountNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AgreementListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/billing/arm-billing/src/operations/availableBalances.ts b/sdk/billing/arm-billing/src/operations/availableBalances.ts new file mode 100644 index 000000000000..68f4e14e75b1 --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/availableBalances.ts @@ -0,0 +1,88 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/availableBalancesMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a AvailableBalances. */ +export class AvailableBalances { + private readonly client: BillingManagementClientContext; + + /** + * Create a AvailableBalances. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * The available credit balance for a billing profile. This is the balance that can be used for pay + * now to settle due or past due invoices. The operation is supported only for billing accounts + * with agreement type Microsoft Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param [options] The optional parameters + * @returns Promise + */ + get(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param callback The callback + */ + get(billingAccountName: string, billingProfileName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param options The optional parameters + * @param callback The callback + */ + get(billingAccountName: string, billingProfileName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + options + }, + getOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/availableBalance/default", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AvailableBalance + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/billing/arm-billing/src/operations/billingAccounts.ts b/sdk/billing/arm-billing/src/operations/billingAccounts.ts new file mode 100644 index 000000000000..367e7593f7b2 --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/billingAccounts.ts @@ -0,0 +1,348 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/billingAccountsMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a BillingAccounts. */ +export class BillingAccounts { + private readonly client: BillingManagementClientContext; + + /** + * Create a BillingAccounts. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * Lists the billing accounts that a user has access to. + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: Models.BillingAccountsListOptionalParams): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: Models.BillingAccountsListOptionalParams, callback: msRest.ServiceCallback): void; + list(options?: Models.BillingAccountsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Gets a billing account by its ID. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param [options] The optional parameters + * @returns Promise + */ + get(billingAccountName: string, options?: Models.BillingAccountsGetOptionalParams): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param callback The callback + */ + get(billingAccountName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param options The optional parameters + * @param callback The callback + */ + get(billingAccountName: string, options: Models.BillingAccountsGetOptionalParams, callback: msRest.ServiceCallback): void; + get(billingAccountName: string, options?: Models.BillingAccountsGetOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Updates the properties of a billing account. Currently, displayName and address can be updated. + * The operation is supported only for billing accounts with agreement type Microsoft Customer + * Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param parameters Request parameters that are provided to the update billing account operation. + * @param [options] The optional parameters + * @returns Promise + */ + update(billingAccountName: string, parameters: Models.BillingAccountUpdateRequest, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(billingAccountName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Lists the invoice sections for which the user has permission to create Azure subscriptions. The + * operation is supported only for billing accounts with agreement type Microsoft Customer + * Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param [options] The optional parameters + * @returns + * Promise + */ + listInvoiceSectionsByCreateSubscriptionPermission(billingAccountName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param callback The callback + */ + listInvoiceSectionsByCreateSubscriptionPermission(billingAccountName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param options The optional parameters + * @param callback The callback + */ + listInvoiceSectionsByCreateSubscriptionPermission(billingAccountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listInvoiceSectionsByCreateSubscriptionPermission(billingAccountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + options + }, + listInvoiceSectionsByCreateSubscriptionPermissionOperationSpec, + callback) as Promise; + } + + /** + * Updates the properties of a billing account. Currently, displayName and address can be updated. + * The operation is supported only for billing accounts with agreement type Microsoft Customer + * Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param parameters Request parameters that are provided to the update billing account operation. + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdate(billingAccountName: string, parameters: Models.BillingAccountUpdateRequest, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + billingAccountName, + parameters, + options + }, + beginUpdateOperationSpec, + options); + } + + /** + * Lists the billing accounts that a user has access to. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } + + /** + * Lists the invoice sections for which the user has permission to create Azure subscriptions. The + * operation is supported only for billing accounts with agreement type Microsoft Customer + * Agreement. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns + * Promise + */ + listInvoiceSectionsByCreateSubscriptionPermissionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listInvoiceSectionsByCreateSubscriptionPermissionNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listInvoiceSectionsByCreateSubscriptionPermissionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listInvoiceSectionsByCreateSubscriptionPermissionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listInvoiceSectionsByCreateSubscriptionPermissionNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts", + queryParameters: [ + Parameters.apiVersion0, + Parameters.expand + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingAccountListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}", + urlParameters: [ + Parameters.billingAccountName + ], + queryParameters: [ + Parameters.apiVersion0, + Parameters.expand + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingAccount + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listInvoiceSectionsByCreateSubscriptionPermissionOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/listInvoiceSectionsWithCreateSubscriptionPermission", + urlParameters: [ + Parameters.billingAccountName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.InvoiceSectionListWithCreateSubPermissionResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}", + urlParameters: [ + Parameters.billingAccountName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.BillingAccountUpdateRequest, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.BillingAccount + }, + 202: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingAccountListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listInvoiceSectionsByCreateSubscriptionPermissionNextOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.InvoiceSectionListWithCreateSubPermissionResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/billing/arm-billing/src/operations/billingPeriods.ts b/sdk/billing/arm-billing/src/operations/billingPeriods.ts index 2dcc29cf78d9..9d94d474ef38 100644 --- a/sdk/billing/arm-billing/src/operations/billingPeriods.ts +++ b/sdk/billing/arm-billing/src/operations/billingPeriods.ts @@ -122,7 +122,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion, + Parameters.apiVersion1, Parameters.filter, Parameters.skiptoken, Parameters.top @@ -149,7 +149,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.billingPeriodName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/billing/arm-billing/src/operations/billingPermissions.ts b/sdk/billing/arm-billing/src/operations/billingPermissions.ts new file mode 100644 index 000000000000..c3bb0d007312 --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/billingPermissions.ts @@ -0,0 +1,450 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/billingPermissionsMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a BillingPermissions. */ +export class BillingPermissions { + private readonly client: BillingManagementClientContext; + + /** + * Create a BillingPermissions. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * Lists the billing permissions the caller has for a customer. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param customerName The ID that uniquely identifies a customer. + * @param [options] The optional parameters + * @returns Promise + */ + listByCustomer(billingAccountName: string, customerName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param customerName The ID that uniquely identifies a customer. + * @param callback The callback + */ + listByCustomer(billingAccountName: string, customerName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param customerName The ID that uniquely identifies a customer. + * @param options The optional parameters + * @param callback The callback + */ + listByCustomer(billingAccountName: string, customerName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByCustomer(billingAccountName: string, customerName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + customerName, + options + }, + listByCustomerOperationSpec, + callback) as Promise; + } + + /** + * Lists the billing permissions the caller has on a billing account. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingAccount(billingAccountName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param callback The callback + */ + listByBillingAccount(billingAccountName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingAccount(billingAccountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingAccount(billingAccountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + options + }, + listByBillingAccountOperationSpec, + callback) as Promise; + } + + /** + * Lists the billing permissions the caller has on an invoice section. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param [options] The optional parameters + * @returns Promise + */ + listByInvoiceSections(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param callback The callback + */ + listByInvoiceSections(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param options The optional parameters + * @param callback The callback + */ + listByInvoiceSections(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByInvoiceSections(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + invoiceSectionName, + options + }, + listByInvoiceSectionsOperationSpec, + callback) as Promise; + } + + /** + * Lists the billing permissions the caller has on a billing profile. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param callback The callback + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingProfile(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + options + }, + listByBillingProfileOperationSpec, + callback) as Promise; + } + + /** + * Lists the billing permissions the caller has for a customer. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByCustomerNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByCustomerNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByCustomerNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByCustomerNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByCustomerNextOperationSpec, + callback) as Promise; + } + + /** + * Lists the billing permissions the caller has on a billing account. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByBillingAccountNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingAccountNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByBillingAccountNextOperationSpec, + callback) as Promise; + } + + /** + * Lists the billing permissions the caller has on an invoice section. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByInvoiceSectionsNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByInvoiceSectionsNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByInvoiceSectionsNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByInvoiceSectionsNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByInvoiceSectionsNextOperationSpec, + callback) as Promise; + } + + /** + * Lists the billing permissions the caller has on a billing profile. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingProfileNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByBillingProfileNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingProfileNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingProfileNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByBillingProfileNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByCustomerOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/billingPermissions", + urlParameters: [ + Parameters.billingAccountName, + Parameters.customerName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingPermissionsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingAccountOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingPermissions", + urlParameters: [ + Parameters.billingAccountName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingPermissionsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByInvoiceSectionsOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingPermissions", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName, + Parameters.invoiceSectionName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingPermissionsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingProfileOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/billingPermissions", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingPermissionsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByCustomerNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingPermissionsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingAccountNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingPermissionsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByInvoiceSectionsNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingPermissionsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingProfileNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingPermissionsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/billing/arm-billing/src/operations/billingProfiles.ts b/sdk/billing/arm-billing/src/operations/billingProfiles.ts new file mode 100644 index 000000000000..8d25a624f5c9 --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/billingProfiles.ts @@ -0,0 +1,263 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/billingProfilesMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a BillingProfiles. */ +export class BillingProfiles { + private readonly client: BillingManagementClientContext; + + /** + * Create a BillingProfiles. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * Lists the billing profiles that a user has access to. The operation is supported for billing + * accounts with agreement type Microsoft Customer Agreement or Microsoft Partner Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingAccount(billingAccountName: string, options?: Models.BillingProfilesListByBillingAccountOptionalParams): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param callback The callback + */ + listByBillingAccount(billingAccountName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingAccount(billingAccountName: string, options: Models.BillingProfilesListByBillingAccountOptionalParams, callback: msRest.ServiceCallback): void; + listByBillingAccount(billingAccountName: string, options?: Models.BillingProfilesListByBillingAccountOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + options + }, + listByBillingAccountOperationSpec, + callback) as Promise; + } + + /** + * Gets a billing profile by its ID. The operation is supported for billing accounts with agreement + * type Microsoft Customer Agreement or Microsoft Partner Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param [options] The optional parameters + * @returns Promise + */ + get(billingAccountName: string, billingProfileName: string, options?: Models.BillingProfilesGetOptionalParams): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param callback The callback + */ + get(billingAccountName: string, billingProfileName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param options The optional parameters + * @param callback The callback + */ + get(billingAccountName: string, billingProfileName: string, options: Models.BillingProfilesGetOptionalParams, callback: msRest.ServiceCallback): void; + get(billingAccountName: string, billingProfileName: string, options?: Models.BillingProfilesGetOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates a billing profile. The operation is supported for billing accounts with + * agreement type Microsoft Customer Agreement or Microsoft Partner Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param parameters The new or updated billing profile. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(billingAccountName: string, billingProfileName: string, parameters: Models.BillingProfile, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(billingAccountName,billingProfileName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Creates or updates a billing profile. The operation is supported for billing accounts with + * agreement type Microsoft Customer Agreement or Microsoft Partner Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param parameters The new or updated billing profile. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(billingAccountName: string, billingProfileName: string, parameters: Models.BillingProfile, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + billingAccountName, + billingProfileName, + parameters, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Lists the billing profiles that a user has access to. The operation is supported for billing + * accounts with agreement type Microsoft Customer Agreement or Microsoft Partner Agreement. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByBillingAccountNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingAccountNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByBillingAccountNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByBillingAccountOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles", + urlParameters: [ + Parameters.billingAccountName + ], + queryParameters: [ + Parameters.apiVersion0, + Parameters.expand + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingProfileListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName + ], + queryParameters: [ + Parameters.apiVersion0, + Parameters.expand + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingProfile + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.BillingProfile, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.BillingProfile, + headersMapper: Mappers.BillingProfilesCreateOrUpdateHeaders + }, + 202: { + headersMapper: Mappers.BillingProfilesCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse, + headersMapper: Mappers.BillingProfilesCreateOrUpdateHeaders + } + }, + serializer +}; + +const listByBillingAccountNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingProfileListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/billing/arm-billing/src/operations/billingPropertyOperations.ts b/sdk/billing/arm-billing/src/operations/billingPropertyOperations.ts new file mode 100644 index 000000000000..38d443dce27b --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/billingPropertyOperations.ts @@ -0,0 +1,139 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/billingPropertyOperationsMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a BillingPropertyOperations. */ +export class BillingPropertyOperations { + private readonly client: BillingManagementClientContext; + + /** + * Create a BillingPropertyOperations. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * Get the billing properties for a subscription. This operation is not supported for billing + * accounts with agreement type Enterprise Agreement. + * @param [options] The optional parameters + * @returns Promise + */ + get(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + get(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + get(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Updates the billing property of a subscription. Currently, cost center can be updated. The + * operation is supported only for billing accounts with agreement type Microsoft Customer + * Agreement. + * @param [options] The optional parameters + * @returns Promise + */ + update(options?: Models.BillingPropertyUpdateOptionalParams): Promise; + /** + * @param callback The callback + */ + update(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + update(options: Models.BillingPropertyUpdateOptionalParams, callback: msRest.ServiceCallback): void; + update(options?: Models.BillingPropertyUpdateOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + updateOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingProperty/default", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingProperty + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingProperty/default", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + costCenter: [ + "options", + "costCenter" + ] + }, + mapper: { + ...Mappers.BillingProperty, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.BillingProperty + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/billing/arm-billing/src/operations/billingRoleAssignments.ts b/sdk/billing/arm-billing/src/operations/billingRoleAssignments.ts new file mode 100644 index 000000000000..d81abf2b71fc --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/billingRoleAssignments.ts @@ -0,0 +1,729 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/billingRoleAssignmentsMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a BillingRoleAssignments. */ +export class BillingRoleAssignments { + private readonly client: BillingManagementClientContext; + + /** + * Create a BillingRoleAssignments. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * Gets a role assignment for the caller on a billing account. The operation is supported for + * billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer + * Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. + * @param [options] The optional parameters + * @returns Promise + */ + getByBillingAccount(billingAccountName: string, billingRoleAssignmentName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. + * @param callback The callback + */ + getByBillingAccount(billingAccountName: string, billingRoleAssignmentName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. + * @param options The optional parameters + * @param callback The callback + */ + getByBillingAccount(billingAccountName: string, billingRoleAssignmentName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getByBillingAccount(billingAccountName: string, billingRoleAssignmentName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingRoleAssignmentName, + options + }, + getByBillingAccountOperationSpec, + callback) as Promise; + } + + /** + * Deletes a role assignment for the caller on a billing account. The operation is supported for + * billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer + * Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. + * @param [options] The optional parameters + * @returns Promise + */ + deleteByBillingAccount(billingAccountName: string, billingRoleAssignmentName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. + * @param callback The callback + */ + deleteByBillingAccount(billingAccountName: string, billingRoleAssignmentName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. + * @param options The optional parameters + * @param callback The callback + */ + deleteByBillingAccount(billingAccountName: string, billingRoleAssignmentName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteByBillingAccount(billingAccountName: string, billingRoleAssignmentName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingRoleAssignmentName, + options + }, + deleteByBillingAccountOperationSpec, + callback) as Promise; + } + + /** + * Gets a role assignment for the caller on an invoice section. The operation is supported for + * billing accounts with agreement type Microsoft Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. + * @param [options] The optional parameters + * @returns Promise + */ + getByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, billingRoleAssignmentName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. + * @param callback The callback + */ + getByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, billingRoleAssignmentName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. + * @param options The optional parameters + * @param callback The callback + */ + getByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, billingRoleAssignmentName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, billingRoleAssignmentName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + invoiceSectionName, + billingRoleAssignmentName, + options + }, + getByInvoiceSectionOperationSpec, + callback) as Promise; + } + + /** + * Deletes a role assignment for the caller on an invoice section. The operation is supported for + * billing accounts with agreement type Microsoft Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. + * @param [options] The optional parameters + * @returns Promise + */ + deleteByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, billingRoleAssignmentName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. + * @param callback The callback + */ + deleteByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, billingRoleAssignmentName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. + * @param options The optional parameters + * @param callback The callback + */ + deleteByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, billingRoleAssignmentName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, billingRoleAssignmentName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + invoiceSectionName, + billingRoleAssignmentName, + options + }, + deleteByInvoiceSectionOperationSpec, + callback) as Promise; + } + + /** + * Gets a role assignment for the caller on a billing profile. The operation is supported for + * billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer + * Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. + * @param [options] The optional parameters + * @returns Promise + */ + getByBillingProfile(billingAccountName: string, billingProfileName: string, billingRoleAssignmentName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. + * @param callback The callback + */ + getByBillingProfile(billingAccountName: string, billingProfileName: string, billingRoleAssignmentName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. + * @param options The optional parameters + * @param callback The callback + */ + getByBillingProfile(billingAccountName: string, billingProfileName: string, billingRoleAssignmentName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getByBillingProfile(billingAccountName: string, billingProfileName: string, billingRoleAssignmentName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + billingRoleAssignmentName, + options + }, + getByBillingProfileOperationSpec, + callback) as Promise; + } + + /** + * Deletes a role assignment for the caller on a billing profile. The operation is supported for + * billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer + * Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. + * @param [options] The optional parameters + * @returns Promise + */ + deleteByBillingProfile(billingAccountName: string, billingProfileName: string, billingRoleAssignmentName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. + * @param callback The callback + */ + deleteByBillingProfile(billingAccountName: string, billingProfileName: string, billingRoleAssignmentName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param billingRoleAssignmentName The ID that uniquely identifies a role assignment. + * @param options The optional parameters + * @param callback The callback + */ + deleteByBillingProfile(billingAccountName: string, billingProfileName: string, billingRoleAssignmentName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteByBillingProfile(billingAccountName: string, billingProfileName: string, billingRoleAssignmentName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + billingRoleAssignmentName, + options + }, + deleteByBillingProfileOperationSpec, + callback) as Promise; + } + + /** + * Lists the role assignments for the caller on a billing account. The operation is supported for + * billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer + * Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingAccount(billingAccountName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param callback The callback + */ + listByBillingAccount(billingAccountName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingAccount(billingAccountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingAccount(billingAccountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + options + }, + listByBillingAccountOperationSpec, + callback) as Promise; + } + + /** + * Lists the role assignments for the caller on an invoice section. The operation is supported for + * billing accounts with agreement type Microsoft Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param [options] The optional parameters + * @returns Promise + */ + listByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param callback The callback + */ + listByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param options The optional parameters + * @param callback The callback + */ + listByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + invoiceSectionName, + options + }, + listByInvoiceSectionOperationSpec, + callback) as Promise; + } + + /** + * Lists the role assignments for the caller on a billing profile. The operation is supported for + * billing accounts with agreement type Microsoft Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param callback The callback + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingProfile(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + options + }, + listByBillingProfileOperationSpec, + callback) as Promise; + } + + /** + * Lists the role assignments for the caller on a billing account. The operation is supported for + * billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer + * Agreement. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByBillingAccountNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingAccountNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByBillingAccountNextOperationSpec, + callback) as Promise; + } + + /** + * Lists the role assignments for the caller on an invoice section. The operation is supported for + * billing accounts with agreement type Microsoft Customer Agreement. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByInvoiceSectionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByInvoiceSectionNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByInvoiceSectionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByInvoiceSectionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByInvoiceSectionNextOperationSpec, + callback) as Promise; + } + + /** + * Lists the role assignments for the caller on a billing profile. The operation is supported for + * billing accounts with agreement type Microsoft Customer Agreement. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingProfileNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByBillingProfileNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingProfileNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingProfileNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByBillingProfileNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getByBillingAccountOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingRoleAssignments/{billingRoleAssignmentName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingRoleAssignmentName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingRoleAssignment + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const deleteByBillingAccountOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingRoleAssignments/{billingRoleAssignmentName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingRoleAssignmentName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingRoleAssignment + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getByInvoiceSectionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingRoleAssignments/{billingRoleAssignmentName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName, + Parameters.invoiceSectionName, + Parameters.billingRoleAssignmentName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingRoleAssignment + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const deleteByInvoiceSectionOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingRoleAssignments/{billingRoleAssignmentName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName, + Parameters.invoiceSectionName, + Parameters.billingRoleAssignmentName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingRoleAssignment + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getByBillingProfileOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/billingRoleAssignments/{billingRoleAssignmentName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName, + Parameters.billingRoleAssignmentName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingRoleAssignment + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const deleteByBillingProfileOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/billingRoleAssignments/{billingRoleAssignmentName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName, + Parameters.billingRoleAssignmentName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingRoleAssignment + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingAccountOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingRoleAssignments", + urlParameters: [ + Parameters.billingAccountName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingRoleAssignmentListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByInvoiceSectionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingRoleAssignments", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName, + Parameters.invoiceSectionName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingRoleAssignmentListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingProfileOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/billingRoleAssignments", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingRoleAssignmentListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingAccountNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingRoleAssignmentListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByInvoiceSectionNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingRoleAssignmentListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingProfileNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingRoleAssignmentListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/billing/arm-billing/src/operations/billingRoleDefinitions.ts b/sdk/billing/arm-billing/src/operations/billingRoleDefinitions.ts new file mode 100644 index 000000000000..146cb9771397 --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/billingRoleDefinitions.ts @@ -0,0 +1,537 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/billingRoleDefinitionsMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a BillingRoleDefinitions. */ +export class BillingRoleDefinitions { + private readonly client: BillingManagementClientContext; + + /** + * Create a BillingRoleDefinitions. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * Gets the definition for a role on a billing account. The operation is supported for billing + * accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingRoleDefinitionName The ID that uniquely identifies a role definition. + * @param [options] The optional parameters + * @returns Promise + */ + getByBillingAccount(billingAccountName: string, billingRoleDefinitionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingRoleDefinitionName The ID that uniquely identifies a role definition. + * @param callback The callback + */ + getByBillingAccount(billingAccountName: string, billingRoleDefinitionName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingRoleDefinitionName The ID that uniquely identifies a role definition. + * @param options The optional parameters + * @param callback The callback + */ + getByBillingAccount(billingAccountName: string, billingRoleDefinitionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getByBillingAccount(billingAccountName: string, billingRoleDefinitionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingRoleDefinitionName, + options + }, + getByBillingAccountOperationSpec, + callback) as Promise; + } + + /** + * Gets the definition for a role on an invoice section. The operation is supported only for + * billing accounts with agreement type Microsoft Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param billingRoleDefinitionName The ID that uniquely identifies a role definition. + * @param [options] The optional parameters + * @returns Promise + */ + getByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, billingRoleDefinitionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param billingRoleDefinitionName The ID that uniquely identifies a role definition. + * @param callback The callback + */ + getByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, billingRoleDefinitionName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param billingRoleDefinitionName The ID that uniquely identifies a role definition. + * @param options The optional parameters + * @param callback The callback + */ + getByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, billingRoleDefinitionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, billingRoleDefinitionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + invoiceSectionName, + billingRoleDefinitionName, + options + }, + getByInvoiceSectionOperationSpec, + callback) as Promise; + } + + /** + * Gets the definition for a role on a billing profile. The operation is supported for billing + * accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param billingRoleDefinitionName The ID that uniquely identifies a role definition. + * @param [options] The optional parameters + * @returns Promise + */ + getByBillingProfile(billingAccountName: string, billingProfileName: string, billingRoleDefinitionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param billingRoleDefinitionName The ID that uniquely identifies a role definition. + * @param callback The callback + */ + getByBillingProfile(billingAccountName: string, billingProfileName: string, billingRoleDefinitionName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param billingRoleDefinitionName The ID that uniquely identifies a role definition. + * @param options The optional parameters + * @param callback The callback + */ + getByBillingProfile(billingAccountName: string, billingProfileName: string, billingRoleDefinitionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getByBillingProfile(billingAccountName: string, billingProfileName: string, billingRoleDefinitionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + billingRoleDefinitionName, + options + }, + getByBillingProfileOperationSpec, + callback) as Promise; + } + + /** + * Lists the role definitions for a billing account. The operation is supported for billing + * accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingAccount(billingAccountName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param callback The callback + */ + listByBillingAccount(billingAccountName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingAccount(billingAccountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingAccount(billingAccountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + options + }, + listByBillingAccountOperationSpec, + callback) as Promise; + } + + /** + * Lists the role definitions for an invoice section. The operation is supported for billing + * accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param [options] The optional parameters + * @returns Promise + */ + listByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param callback The callback + */ + listByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param options The optional parameters + * @param callback The callback + */ + listByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + invoiceSectionName, + options + }, + listByInvoiceSectionOperationSpec, + callback) as Promise; + } + + /** + * Lists the role definitions for a billing profile. The operation is supported for billing + * accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param callback The callback + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingProfile(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + options + }, + listByBillingProfileOperationSpec, + callback) as Promise; + } + + /** + * Lists the role definitions for a billing account. The operation is supported for billing + * accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByBillingAccountNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingAccountNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByBillingAccountNextOperationSpec, + callback) as Promise; + } + + /** + * Lists the role definitions for an invoice section. The operation is supported for billing + * accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByInvoiceSectionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByInvoiceSectionNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByInvoiceSectionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByInvoiceSectionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByInvoiceSectionNextOperationSpec, + callback) as Promise; + } + + /** + * Lists the role definitions for a billing profile. The operation is supported for billing + * accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingProfileNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByBillingProfileNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingProfileNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingProfileNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByBillingProfileNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getByBillingAccountOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingRoleDefinitions/{billingRoleDefinitionName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingRoleDefinitionName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingRoleDefinition + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getByInvoiceSectionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingRoleDefinitions/{billingRoleDefinitionName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName, + Parameters.invoiceSectionName, + Parameters.billingRoleDefinitionName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingRoleDefinition + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getByBillingProfileOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/billingRoleDefinitions/{billingRoleDefinitionName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName, + Parameters.billingRoleDefinitionName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingRoleDefinition + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingAccountOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingRoleDefinitions", + urlParameters: [ + Parameters.billingAccountName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingRoleDefinitionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByInvoiceSectionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingRoleDefinitions", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName, + Parameters.invoiceSectionName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingRoleDefinitionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingProfileOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/billingRoleDefinitions", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingRoleDefinitionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingAccountNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingRoleDefinitionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByInvoiceSectionNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingRoleDefinitionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingProfileNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingRoleDefinitionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/billing/arm-billing/src/operations/billingSubscriptions.ts b/sdk/billing/arm-billing/src/operations/billingSubscriptions.ts new file mode 100644 index 000000000000..8bfa5ee88e66 --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/billingSubscriptions.ts @@ -0,0 +1,720 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/billingSubscriptionsMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a BillingSubscriptions. */ +export class BillingSubscriptions { + private readonly client: BillingManagementClientContext; + + /** + * Create a BillingSubscriptions. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * Lists the subscriptions for a customer. The operation is supported only for billing accounts + * with agreement type Microsoft Partner Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param customerName The ID that uniquely identifies a customer. + * @param [options] The optional parameters + * @returns Promise + */ + listByCustomer(billingAccountName: string, customerName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param customerName The ID that uniquely identifies a customer. + * @param callback The callback + */ + listByCustomer(billingAccountName: string, customerName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param customerName The ID that uniquely identifies a customer. + * @param options The optional parameters + * @param callback The callback + */ + listByCustomer(billingAccountName: string, customerName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByCustomer(billingAccountName: string, customerName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + customerName, + options + }, + listByCustomerOperationSpec, + callback) as Promise; + } + + /** + * Lists the subscriptions for a billing account. The operation is supported for billing accounts + * with agreement type Microsoft Customer Agreement or Microsoft Partner Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingAccount(billingAccountName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param callback The callback + */ + listByBillingAccount(billingAccountName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingAccount(billingAccountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingAccount(billingAccountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + options + }, + listByBillingAccountOperationSpec, + callback) as Promise; + } + + /** + * Lists the subscriptions that are billed to a billing profile. The operation is supported for + * billing accounts with agreement type Microsoft Customer Agreement or Microsoft Partner + * Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param callback The callback + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingProfile(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + options + }, + listByBillingProfileOperationSpec, + callback) as Promise; + } + + /** + * Lists the subscriptions that are billed to an invoice section. The operation is supported only + * for billing accounts with agreement type Microsoft Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param [options] The optional parameters + * @returns Promise + */ + listByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param callback The callback + */ + listByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param options The optional parameters + * @param callback The callback + */ + listByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + invoiceSectionName, + options + }, + listByInvoiceSectionOperationSpec, + callback) as Promise; + } + + /** + * Gets a subscription by its ID. The operation is supported for billing accounts with agreement + * type Microsoft Customer Agreement and Microsoft Partner Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param [options] The optional parameters + * @returns Promise + */ + get(billingAccountName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param callback The callback + */ + get(billingAccountName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param options The optional parameters + * @param callback The callback + */ + get(billingAccountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(billingAccountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Updates the properties of a billing subscription. Currently, cost center can be updated. The + * operation is supported only for billing accounts with agreement type Microsoft Customer + * Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param parameters Request parameters that are provided to the update billing subscription + * operation. + * @param [options] The optional parameters + * @returns Promise + */ + update(billingAccountName: string, parameters: Models.BillingSubscription, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param parameters Request parameters that are provided to the update billing subscription + * operation. + * @param callback The callback + */ + update(billingAccountName: string, parameters: Models.BillingSubscription, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param parameters Request parameters that are provided to the update billing subscription + * operation. + * @param options The optional parameters + * @param callback The callback + */ + update(billingAccountName: string, parameters: Models.BillingSubscription, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(billingAccountName: string, parameters: Models.BillingSubscription, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + parameters, + options + }, + updateOperationSpec, + callback) as Promise; + } + + /** + * Moves a subscription's charges to a new invoice section. The new invoice section must belong to + * the same billing profile as the existing invoice section. This operation is supported for + * billing accounts with agreement type Microsoft Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param destinationInvoiceSectionId The destination invoice section id. + * @param [options] The optional parameters + * @returns Promise + */ + move(billingAccountName: string, destinationInvoiceSectionId: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginMove(billingAccountName,destinationInvoiceSectionId,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Validates if a subscription's charges can be moved to a new invoice section. This operation is + * supported for billing accounts with agreement type Microsoft Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param destinationInvoiceSectionId The destination invoice section id. + * @param [options] The optional parameters + * @returns Promise + */ + validateMove(billingAccountName: string, destinationInvoiceSectionId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param destinationInvoiceSectionId The destination invoice section id. + * @param callback The callback + */ + validateMove(billingAccountName: string, destinationInvoiceSectionId: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param destinationInvoiceSectionId The destination invoice section id. + * @param options The optional parameters + * @param callback The callback + */ + validateMove(billingAccountName: string, destinationInvoiceSectionId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + validateMove(billingAccountName: string, destinationInvoiceSectionId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + destinationInvoiceSectionId, + options + }, + validateMoveOperationSpec, + callback) as Promise; + } + + /** + * Moves a subscription's charges to a new invoice section. The new invoice section must belong to + * the same billing profile as the existing invoice section. This operation is supported for + * billing accounts with agreement type Microsoft Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param destinationInvoiceSectionId The destination invoice section id. + * @param [options] The optional parameters + * @returns Promise + */ + beginMove(billingAccountName: string, destinationInvoiceSectionId: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + billingAccountName, + destinationInvoiceSectionId, + options + }, + beginMoveOperationSpec, + options); + } + + /** + * Lists the subscriptions for a customer. The operation is supported only for billing accounts + * with agreement type Microsoft Partner Agreement. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByCustomerNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByCustomerNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByCustomerNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByCustomerNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByCustomerNextOperationSpec, + callback) as Promise; + } + + /** + * Lists the subscriptions for a billing account. The operation is supported for billing accounts + * with agreement type Microsoft Customer Agreement or Microsoft Partner Agreement. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByBillingAccountNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingAccountNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByBillingAccountNextOperationSpec, + callback) as Promise; + } + + /** + * Lists the subscriptions that are billed to a billing profile. The operation is supported for + * billing accounts with agreement type Microsoft Customer Agreement or Microsoft Partner + * Agreement. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingProfileNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByBillingProfileNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingProfileNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingProfileNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByBillingProfileNextOperationSpec, + callback) as Promise; + } + + /** + * Lists the subscriptions that are billed to an invoice section. The operation is supported only + * for billing accounts with agreement type Microsoft Customer Agreement. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByInvoiceSectionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByInvoiceSectionNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByInvoiceSectionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByInvoiceSectionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByInvoiceSectionNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByCustomerOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/billingSubscriptions", + urlParameters: [ + Parameters.billingAccountName, + Parameters.customerName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingSubscriptionsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingAccountOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions", + urlParameters: [ + Parameters.billingAccountName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingSubscriptionsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingProfileOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/billingSubscriptions", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingSubscriptionsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByInvoiceSectionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingSubscriptions", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName, + Parameters.invoiceSectionName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingSubscriptionsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/{subscriptionId}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingSubscription + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/{subscriptionId}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.BillingSubscription, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.BillingSubscription + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const validateMoveOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/{subscriptionId}/validateMoveEligibility", + urlParameters: [ + Parameters.billingAccountName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + destinationInvoiceSectionId: "destinationInvoiceSectionId" + }, + mapper: { + ...Mappers.TransferBillingSubscriptionRequestProperties, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ValidateSubscriptionTransferEligibilityResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginMoveOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/{subscriptionId}/move", + urlParameters: [ + Parameters.billingAccountName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + destinationInvoiceSectionId: "destinationInvoiceSectionId" + }, + mapper: { + ...Mappers.TransferBillingSubscriptionRequestProperties, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.BillingSubscription, + headersMapper: Mappers.BillingSubscriptionsMoveHeaders + }, + 202: { + headersMapper: Mappers.BillingSubscriptionsMoveHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse, + headersMapper: Mappers.BillingSubscriptionsMoveHeaders + } + }, + serializer +}; + +const listByCustomerNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingSubscriptionsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingAccountNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingSubscriptionsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingProfileNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingSubscriptionsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByInvoiceSectionNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingSubscriptionsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/billing/arm-billing/src/operations/customers.ts b/sdk/billing/arm-billing/src/operations/customers.ts new file mode 100644 index 000000000000..d2d99e8c1654 --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/customers.ts @@ -0,0 +1,301 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/customersMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a Customers. */ +export class Customers { + private readonly client: BillingManagementClientContext; + + /** + * Create a Customers. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * Lists the customers that are billed to a billing profile. The operation is supported only for + * billing accounts with agreement type Microsoft Partner Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, options?: Models.CustomersListByBillingProfileOptionalParams): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param callback The callback + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, options: Models.CustomersListByBillingProfileOptionalParams, callback: msRest.ServiceCallback): void; + listByBillingProfile(billingAccountName: string, billingProfileName: string, options?: Models.CustomersListByBillingProfileOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + options + }, + listByBillingProfileOperationSpec, + callback) as Promise; + } + + /** + * Lists the customers that are billed to a billing account. The operation is supported only for + * billing accounts with agreement type Microsoft Partner Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingAccount(billingAccountName: string, options?: Models.CustomersListByBillingAccountOptionalParams): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param callback The callback + */ + listByBillingAccount(billingAccountName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingAccount(billingAccountName: string, options: Models.CustomersListByBillingAccountOptionalParams, callback: msRest.ServiceCallback): void; + listByBillingAccount(billingAccountName: string, options?: Models.CustomersListByBillingAccountOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + options + }, + listByBillingAccountOperationSpec, + callback) as Promise; + } + + /** + * Gets a customer by its ID. The operation is supported only for billing accounts with agreement + * type Microsoft Partner Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param customerName The ID that uniquely identifies a customer. + * @param [options] The optional parameters + * @returns Promise + */ + get(billingAccountName: string, customerName: string, options?: Models.CustomersGetOptionalParams): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param customerName The ID that uniquely identifies a customer. + * @param callback The callback + */ + get(billingAccountName: string, customerName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param customerName The ID that uniquely identifies a customer. + * @param options The optional parameters + * @param callback The callback + */ + get(billingAccountName: string, customerName: string, options: Models.CustomersGetOptionalParams, callback: msRest.ServiceCallback): void; + get(billingAccountName: string, customerName: string, options?: Models.CustomersGetOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + customerName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Lists the customers that are billed to a billing profile. The operation is supported only for + * billing accounts with agreement type Microsoft Partner Agreement. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingProfileNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByBillingProfileNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingProfileNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingProfileNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByBillingProfileNextOperationSpec, + callback) as Promise; + } + + /** + * Lists the customers that are billed to a billing account. The operation is supported only for + * billing accounts with agreement type Microsoft Partner Agreement. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByBillingAccountNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingAccountNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByBillingAccountNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByBillingProfileOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/customers", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName + ], + queryParameters: [ + Parameters.apiVersion0, + Parameters.search, + Parameters.filter + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.CustomerListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingAccountOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers", + urlParameters: [ + Parameters.billingAccountName + ], + queryParameters: [ + Parameters.apiVersion0, + Parameters.search, + Parameters.filter + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.CustomerListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.customerName + ], + queryParameters: [ + Parameters.apiVersion0, + Parameters.expand + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Customer + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingProfileNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.CustomerListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingAccountNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.CustomerListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/billing/arm-billing/src/operations/enrollmentAccounts.ts b/sdk/billing/arm-billing/src/operations/enrollmentAccounts.ts index c3309045d357..aa1077f845c2 100644 --- a/sdk/billing/arm-billing/src/operations/enrollmentAccounts.ts +++ b/sdk/billing/arm-billing/src/operations/enrollmentAccounts.ts @@ -61,14 +61,14 @@ export class EnrollmentAccounts { * @param name Enrollment Account name. * @param callback The callback */ - get(name: string, callback: msRest.ServiceCallback): void; + get(name: string, callback: msRest.ServiceCallback): void; /** * @param name Enrollment Account name. * @param options The optional parameters * @param callback The callback */ - get(name: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(name: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get(name: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(name: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { name, @@ -113,7 +113,7 @@ const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "providers/Microsoft.Billing/enrollmentAccounts", queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage @@ -136,14 +136,14 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.name ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { - bodyMapper: Mappers.EnrollmentAccount + bodyMapper: Mappers.EnrollmentAccountSummary }, default: { bodyMapper: Mappers.ErrorResponse diff --git a/sdk/billing/arm-billing/src/operations/index.ts b/sdk/billing/arm-billing/src/operations/index.ts index cfc488e846ba..5ef3c67c4d81 100644 --- a/sdk/billing/arm-billing/src/operations/index.ts +++ b/sdk/billing/arm-billing/src/operations/index.ts @@ -8,7 +8,23 @@ * regenerated. */ -export * from "./enrollmentAccounts"; -export * from "./billingPeriods"; +export * from "./billingAccounts"; +export * from "./address"; +export * from "./availableBalances"; +export * from "./instructions"; +export * from "./billingProfiles"; +export * from "./customers"; +export * from "./invoiceSections"; +export * from "./billingPermissions"; +export * from "./billingSubscriptions"; +export * from "./products"; export * from "./invoices"; +export * from "./transactions"; +export * from "./policies"; +export * from "./billingPropertyOperations"; export * from "./operations"; +export * from "./billingRoleDefinitions"; +export * from "./billingRoleAssignments"; +export * from "./agreements"; +export * from "./enrollmentAccounts"; +export * from "./billingPeriods"; diff --git a/sdk/billing/arm-billing/src/operations/instructions.ts b/sdk/billing/arm-billing/src/operations/instructions.ts new file mode 100644 index 000000000000..91c029f8aad3 --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/instructions.ts @@ -0,0 +1,270 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/instructionsMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a Instructions. */ +export class Instructions { + private readonly client: BillingManagementClientContext; + + /** + * Create a Instructions. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * Lists the instructions by billing profile id. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param callback The callback + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingProfile(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + options + }, + listByBillingProfileOperationSpec, + callback) as Promise; + } + + /** + * Get the instruction by name. These are custom billing instructions and are only applicable for + * certain customers. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param instructionName Instruction Name. + * @param [options] The optional parameters + * @returns Promise + */ + get(billingAccountName: string, billingProfileName: string, instructionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param instructionName Instruction Name. + * @param callback The callback + */ + get(billingAccountName: string, billingProfileName: string, instructionName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param instructionName Instruction Name. + * @param options The optional parameters + * @param callback The callback + */ + get(billingAccountName: string, billingProfileName: string, instructionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(billingAccountName: string, billingProfileName: string, instructionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + instructionName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates an instruction. These are custom billing instructions and are only applicable + * for certain customers. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param instructionName Instruction Name. + * @param parameters The new instruction. + * @param [options] The optional parameters + * @returns Promise + */ + put(billingAccountName: string, billingProfileName: string, instructionName: string, parameters: Models.Instruction, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param instructionName Instruction Name. + * @param parameters The new instruction. + * @param callback The callback + */ + put(billingAccountName: string, billingProfileName: string, instructionName: string, parameters: Models.Instruction, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param instructionName Instruction Name. + * @param parameters The new instruction. + * @param options The optional parameters + * @param callback The callback + */ + put(billingAccountName: string, billingProfileName: string, instructionName: string, parameters: Models.Instruction, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + put(billingAccountName: string, billingProfileName: string, instructionName: string, parameters: Models.Instruction, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + instructionName, + parameters, + options + }, + putOperationSpec, + callback) as Promise; + } + + /** + * Lists the instructions by billing profile id. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingProfileNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByBillingProfileNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingProfileNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingProfileNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByBillingProfileNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByBillingProfileOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/instructions", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.InstructionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/instructions/{instructionName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName, + Parameters.instructionName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Instruction + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const putOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/instructions/{instructionName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName, + Parameters.instructionName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.Instruction, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Instruction + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingProfileNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.InstructionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/billing/arm-billing/src/operations/invoiceSections.ts b/sdk/billing/arm-billing/src/operations/invoiceSections.ts new file mode 100644 index 000000000000..40016fb1e056 --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/invoiceSections.ts @@ -0,0 +1,275 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/invoiceSectionsMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a InvoiceSections. */ +export class InvoiceSections { + private readonly client: BillingManagementClientContext; + + /** + * Create a InvoiceSections. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * Lists the invoice sections that a user has access to. The operation is supported only for + * billing accounts with agreement type Microsoft Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param callback The callback + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingProfile(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + options + }, + listByBillingProfileOperationSpec, + callback) as Promise; + } + + /** + * Gets an invoice section by its ID. The operation is supported only for billing accounts with + * agreement type Microsoft Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param [options] The optional parameters + * @returns Promise + */ + get(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param callback The callback + */ + get(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param options The optional parameters + * @param callback The callback + */ + get(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + invoiceSectionName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates an invoice section. The operation is supported only for billing accounts with + * agreement type Microsoft Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param parameters The new or updated invoice section. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, parameters: Models.InvoiceSection, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(billingAccountName,billingProfileName,invoiceSectionName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Creates or updates an invoice section. The operation is supported only for billing accounts with + * agreement type Microsoft Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param parameters The new or updated invoice section. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, parameters: Models.InvoiceSection, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + billingAccountName, + billingProfileName, + invoiceSectionName, + parameters, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Lists the invoice sections that a user has access to. The operation is supported only for + * billing accounts with agreement type Microsoft Customer Agreement. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingProfileNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByBillingProfileNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingProfileNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingProfileNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByBillingProfileNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByBillingProfileOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.InvoiceSectionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName, + Parameters.invoiceSectionName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.InvoiceSection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName, + Parameters.invoiceSectionName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.InvoiceSection, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.InvoiceSection, + headersMapper: Mappers.InvoiceSectionsCreateOrUpdateHeaders + }, + 202: { + headersMapper: Mappers.InvoiceSectionsCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse, + headersMapper: Mappers.InvoiceSectionsCreateOrUpdateHeaders + } + }, + serializer +}; + +const listByBillingProfileNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.InvoiceSectionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/billing/arm-billing/src/operations/invoices.ts b/sdk/billing/arm-billing/src/operations/invoices.ts index cdf4a4245a57..bd42443fb705 100644 --- a/sdk/billing/arm-billing/src/operations/invoices.ts +++ b/sdk/billing/arm-billing/src/operations/invoices.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; import * as Models from "../models"; import * as Mappers from "../models/invoicesMappers"; import * as Parameters from "../models/parameters"; @@ -27,57 +28,123 @@ export class Invoices { } /** - * Lists the available invoices for a subscription in reverse chronological order beginning with - * the most recent invoice. In preview, invoices are available via this API only for invoice - * periods which end December 1, 2016 or later. This is only supported for Azure Web-Direct - * subscriptions. Other subscription types which were not purchased directly through the Azure web - * portal are not supported through this preview API. + * Lists the invoices for a billing account for a given start date and end date. The operation is + * supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft + * Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param periodStartDate The start date to fetch the invoices. The date should be specified in + * MM-DD-YYYY format. + * @param periodEndDate The end date to fetch the invoices. The date should be specified in + * MM-DD-YYYY format. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - list(options?: Models.InvoicesListOptionalParams): Promise; + listByBillingAccount(billingAccountName: string, periodStartDate: string, periodEndDate: string, options?: msRest.RequestOptionsBase): Promise; /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param periodStartDate The start date to fetch the invoices. The date should be specified in + * MM-DD-YYYY format. + * @param periodEndDate The end date to fetch the invoices. The date should be specified in + * MM-DD-YYYY format. * @param callback The callback */ - list(callback: msRest.ServiceCallback): void; + listByBillingAccount(billingAccountName: string, periodStartDate: string, periodEndDate: string, callback: msRest.ServiceCallback): void; /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param periodStartDate The start date to fetch the invoices. The date should be specified in + * MM-DD-YYYY format. + * @param periodEndDate The end date to fetch the invoices. The date should be specified in + * MM-DD-YYYY format. * @param options The optional parameters * @param callback The callback */ - list(options: Models.InvoicesListOptionalParams, callback: msRest.ServiceCallback): void; - list(options?: Models.InvoicesListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listByBillingAccount(billingAccountName: string, periodStartDate: string, periodEndDate: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingAccount(billingAccountName: string, periodStartDate: string, periodEndDate: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { + billingAccountName, + periodStartDate, + periodEndDate, options }, - listOperationSpec, - callback) as Promise; + listByBillingAccountOperationSpec, + callback) as Promise; } /** - * Gets a named invoice resource. When getting a single invoice, the downloadUrl property is - * expanded automatically. This is only supported for Azure Web-Direct subscriptions. Other - * subscription types which were not purchased directly through the Azure web portal are not - * supported through this preview API. - * @param invoiceName The name of an invoice resource. + * Lists the invoices for a billing profile for a given start date and end date. The operation is + * supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft + * Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param periodStartDate The start date to fetch the invoices. The date should be specified in + * MM-DD-YYYY format. + * @param periodEndDate The end date to fetch the invoices. The date should be specified in + * MM-DD-YYYY format. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, periodStartDate: string, periodEndDate: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param periodStartDate The start date to fetch the invoices. The date should be specified in + * MM-DD-YYYY format. + * @param periodEndDate The end date to fetch the invoices. The date should be specified in + * MM-DD-YYYY format. + * @param callback The callback + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, periodStartDate: string, periodEndDate: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param periodStartDate The start date to fetch the invoices. The date should be specified in + * MM-DD-YYYY format. + * @param periodEndDate The end date to fetch the invoices. The date should be specified in + * MM-DD-YYYY format. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, periodStartDate: string, periodEndDate: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingProfile(billingAccountName: string, billingProfileName: string, periodStartDate: string, periodEndDate: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + periodStartDate, + periodEndDate, + options + }, + listByBillingProfileOperationSpec, + callback) as Promise; + } + + /** + * Gets an invoice by billing account name and ID. The operation is supported for billing accounts + * with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param invoiceName The ID that uniquely identifies an invoice. * @param [options] The optional parameters * @returns Promise */ - get(invoiceName: string, options?: msRest.RequestOptionsBase): Promise; + get(billingAccountName: string, invoiceName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param invoiceName The name of an invoice resource. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param invoiceName The ID that uniquely identifies an invoice. * @param callback The callback */ - get(invoiceName: string, callback: msRest.ServiceCallback): void; + get(billingAccountName: string, invoiceName: string, callback: msRest.ServiceCallback): void; /** - * @param invoiceName The name of an invoice resource. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param invoiceName The ID that uniquely identifies an invoice. * @param options The optional parameters * @param callback The callback */ - get(invoiceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(invoiceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get(billingAccountName: string, invoiceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(billingAccountName: string, invoiceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { + billingAccountName, invoiceName, options }, @@ -86,86 +153,293 @@ export class Invoices { } /** - * Gets the most recent invoice. When getting a single invoice, the downloadUrl property is - * expanded automatically. This is only supported for Azure Web-Direct subscriptions. Other - * subscription types which were not purchased directly through the Azure web portal are not - * supported through this preview API. + * Gets an invoice by ID. The operation is supported for billing accounts with agreement type + * Microsoft Partner Agreement or Microsoft Customer Agreement. + * @param invoiceName The ID that uniquely identifies an invoice. + * @param [options] The optional parameters + * @returns Promise + */ + getById(invoiceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param invoiceName The ID that uniquely identifies an invoice. + * @param callback The callback + */ + getById(invoiceName: string, callback: msRest.ServiceCallback): void; + /** + * @param invoiceName The ID that uniquely identifies an invoice. + * @param options The optional parameters + * @param callback The callback + */ + getById(invoiceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getById(invoiceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + invoiceName, + options + }, + getByIdOperationSpec, + callback) as Promise; + } + + /** + * Gets a URL to download an invoice. The operation is supported for billing accounts with + * agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param invoiceName The ID that uniquely identifies an invoice. + * @param downloadToken Download token with document source and document ID. + * @param [options] The optional parameters + * @returns Promise + */ + downloadInvoice(billingAccountName: string, invoiceName: string, downloadToken: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDownloadInvoice(billingAccountName,invoiceName,downloadToken,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Lists the invoices for a subscription. + * @param periodStartDate Invoice period start date. + * @param periodEndDate Invoice period end date. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingSubscription(periodStartDate: string, periodEndDate: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param periodStartDate Invoice period start date. + * @param periodEndDate Invoice period end date. + * @param callback The callback + */ + listByBillingSubscription(periodStartDate: string, periodEndDate: string, callback: msRest.ServiceCallback): void; + /** + * @param periodStartDate Invoice period start date. + * @param periodEndDate Invoice period end date. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingSubscription(periodStartDate: string, periodEndDate: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingSubscription(periodStartDate: string, periodEndDate: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + periodStartDate, + periodEndDate, + options + }, + listByBillingSubscriptionOperationSpec, + callback) as Promise; + } + + /** + * Gets an invoice by subscription ID and invoice ID. + * @param invoiceName The ID that uniquely identifies an invoice. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - getLatest(options?: msRest.RequestOptionsBase): Promise; + getBySubscriptionAndInvoiceId(invoiceName: string, options?: msRest.RequestOptionsBase): Promise; /** + * @param invoiceName The ID that uniquely identifies an invoice. * @param callback The callback */ - getLatest(callback: msRest.ServiceCallback): void; + getBySubscriptionAndInvoiceId(invoiceName: string, callback: msRest.ServiceCallback): void; /** + * @param invoiceName The ID that uniquely identifies an invoice. * @param options The optional parameters * @param callback The callback */ - getLatest(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getLatest(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + getBySubscriptionAndInvoiceId(invoiceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getBySubscriptionAndInvoiceId(invoiceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { + invoiceName, options }, - getLatestOperationSpec, - callback) as Promise; + getBySubscriptionAndInvoiceIdOperationSpec, + callback) as Promise; + } + + /** + * Gets a URL to download an invoice. + * @param invoiceName The ID that uniquely identifies an invoice. + * @param downloadToken Download token with document source and document ID. + * @param [options] The optional parameters + * @returns Promise + */ + downloadBillingSubscriptionInvoice(invoiceName: string, downloadToken: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDownloadBillingSubscriptionInvoice(invoiceName,downloadToken,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } /** - * Lists the available invoices for a subscription in reverse chronological order beginning with - * the most recent invoice. In preview, invoices are available via this API only for invoice - * periods which end December 1, 2016 or later. This is only supported for Azure Web-Direct - * subscriptions. Other subscription types which were not purchased directly through the Azure web - * portal are not supported through this preview API. + * Gets a URL to download an invoice. The operation is supported for billing accounts with + * agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param invoiceName The ID that uniquely identifies an invoice. + * @param downloadToken Download token with document source and document ID. + * @param [options] The optional parameters + * @returns Promise + */ + beginDownloadInvoice(billingAccountName: string, invoiceName: string, downloadToken: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + billingAccountName, + invoiceName, + downloadToken, + options + }, + beginDownloadInvoiceOperationSpec, + options); + } + + /** + * Gets a URL to download an invoice. + * @param invoiceName The ID that uniquely identifies an invoice. + * @param downloadToken Download token with document source and document ID. + * @param [options] The optional parameters + * @returns Promise + */ + beginDownloadBillingSubscriptionInvoice(invoiceName: string, downloadToken: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + invoiceName, + downloadToken, + options + }, + beginDownloadBillingSubscriptionInvoiceOperationSpec, + options); + } + + /** + * Lists the invoices for a billing account for a given start date and end date. The operation is + * supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft + * Customer Agreement. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listByBillingAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + listByBillingAccountNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listByBillingAccountNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, - listNextOperationSpec, - callback) as Promise; + listByBillingAccountNextOperationSpec, + callback) as Promise; + } + + /** + * Lists the invoices for a billing profile for a given start date and end date. The operation is + * supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft + * Customer Agreement. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingProfileNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByBillingProfileNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingProfileNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingProfileNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByBillingProfileNextOperationSpec, + callback) as Promise; + } + + /** + * Lists the invoices for a subscription. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingSubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByBillingSubscriptionNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingSubscriptionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingSubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByBillingSubscriptionNextOperationSpec, + callback) as Promise; } } // Operation Specifications const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { +const listByBillingAccountOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Billing/invoices", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices", urlParameters: [ - Parameters.subscriptionId + Parameters.billingAccountName ], queryParameters: [ - Parameters.apiVersion, - Parameters.expand, - Parameters.filter, - Parameters.skiptoken, - Parameters.top + Parameters.apiVersion0, + Parameters.periodStartDate, + Parameters.periodEndDate ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { - bodyMapper: Mappers.InvoicesListResult + bodyMapper: Mappers.InvoiceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingProfileOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoices", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName + ], + queryParameters: [ + Parameters.apiVersion0, + Parameters.periodStartDate, + Parameters.periodEndDate + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.InvoiceListResult }, default: { bodyMapper: Mappers.ErrorResponse @@ -176,13 +450,36 @@ const listOperationSpec: msRest.OperationSpec = { const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Billing/invoices/{invoiceName}", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.invoiceName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Invoice + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getByIdOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/default/invoices/{invoiceName}", urlParameters: [ - Parameters.subscriptionId, Parameters.invoiceName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -198,14 +495,40 @@ const getOperationSpec: msRest.OperationSpec = { serializer }; -const getLatestOperationSpec: msRest.OperationSpec = { +const listByBillingSubscriptionOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Billing/invoices/latest", + path: "providers/Microsoft.Billing/billingAccounts/default/billingSubscriptions/{subscriptionId}/invoices", urlParameters: [ Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.periodStartDate, + Parameters.periodEndDate, + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.InvoiceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getBySubscriptionAndInvoiceIdOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/default/billingSubscriptions/{subscriptionId}/invoices/{invoiceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.invoiceName + ], + queryParameters: [ + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -221,7 +544,109 @@ const getLatestOperationSpec: msRest.OperationSpec = { serializer }; -const listNextOperationSpec: msRest.OperationSpec = { +const beginDownloadInvoiceOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}/download", + urlParameters: [ + Parameters.billingAccountName, + Parameters.invoiceName + ], + queryParameters: [ + Parameters.apiVersion0, + Parameters.downloadToken + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DownloadUrl, + headersMapper: Mappers.InvoicesDownloadInvoiceHeaders + }, + 202: { + headersMapper: Mappers.InvoicesDownloadInvoiceHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse, + headersMapper: Mappers.InvoicesDownloadInvoiceHeaders + } + }, + serializer +}; + +const beginDownloadBillingSubscriptionInvoiceOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "providers/Microsoft.Billing/billingAccounts/default/billingSubscriptions/{subscriptionId}/invoices/{invoiceName}/download", + urlParameters: [ + Parameters.subscriptionId, + Parameters.invoiceName + ], + queryParameters: [ + Parameters.apiVersion0, + Parameters.downloadToken + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DownloadUrl, + headersMapper: Mappers.InvoicesDownloadBillingSubscriptionInvoiceHeaders + }, + 202: { + headersMapper: Mappers.InvoicesDownloadBillingSubscriptionInvoiceHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse, + headersMapper: Mappers.InvoicesDownloadBillingSubscriptionInvoiceHeaders + } + }, + serializer +}; + +const listByBillingAccountNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.InvoiceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingProfileNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.InvoiceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingSubscriptionNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", @@ -233,7 +658,7 @@ const listNextOperationSpec: msRest.OperationSpec = { ], responses: { 200: { - bodyMapper: Mappers.InvoicesListResult + bodyMapper: Mappers.InvoiceListResult }, default: { bodyMapper: Mappers.ErrorResponse diff --git a/sdk/billing/arm-billing/src/operations/operations.ts b/sdk/billing/arm-billing/src/operations/operations.ts index c146d47b7560..fdc8c21841a6 100644 --- a/sdk/billing/arm-billing/src/operations/operations.ts +++ b/sdk/billing/arm-billing/src/operations/operations.ts @@ -27,7 +27,7 @@ export class Operations { } /** - * Lists all of the available billing REST API operations. + * Lists the available billing REST API operations. * @param [options] The optional parameters * @returns Promise */ @@ -51,7 +51,7 @@ export class Operations { } /** - * Lists all of the available billing REST API operations. + * Lists the available billing REST API operations. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise @@ -85,7 +85,7 @@ const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "providers/Microsoft.Billing/operations", queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/billing/arm-billing/src/operations/policies.ts b/sdk/billing/arm-billing/src/operations/policies.ts new file mode 100644 index 000000000000..7099e7f4bb49 --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/policies.ts @@ -0,0 +1,281 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/policiesMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a Policies. */ +export class Policies { + private readonly client: BillingManagementClientContext; + + /** + * Create a Policies. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * Lists the policies for a billing profile. This operation is supported only for billing accounts + * with agreement type Microsoft Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param [options] The optional parameters + * @returns Promise + */ + getByBillingProfile(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param callback The callback + */ + getByBillingProfile(billingAccountName: string, billingProfileName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param options The optional parameters + * @param callback The callback + */ + getByBillingProfile(billingAccountName: string, billingProfileName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getByBillingProfile(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + options + }, + getByBillingProfileOperationSpec, + callback) as Promise; + } + + /** + * Updates the policies for a billing profile. This operation is supported only for billing + * accounts with agreement type Microsoft Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param parameters Request parameters that are provided to the update policies operation. + * @param [options] The optional parameters + * @returns Promise + */ + update(billingAccountName: string, billingProfileName: string, parameters: Models.Policy, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param parameters Request parameters that are provided to the update policies operation. + * @param callback The callback + */ + update(billingAccountName: string, billingProfileName: string, parameters: Models.Policy, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param parameters Request parameters that are provided to the update policies operation. + * @param options The optional parameters + * @param callback The callback + */ + update(billingAccountName: string, billingProfileName: string, parameters: Models.Policy, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(billingAccountName: string, billingProfileName: string, parameters: Models.Policy, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + parameters, + options + }, + updateOperationSpec, + callback) as Promise; + } + + /** + * Lists the policies for a customer. This operation is supported only for billing accounts with + * agreement type Microsoft Partner Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param customerName The ID that uniquely identifies a customer. + * @param [options] The optional parameters + * @returns Promise + */ + getByCustomer(billingAccountName: string, customerName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param customerName The ID that uniquely identifies a customer. + * @param callback The callback + */ + getByCustomer(billingAccountName: string, customerName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param customerName The ID that uniquely identifies a customer. + * @param options The optional parameters + * @param callback The callback + */ + getByCustomer(billingAccountName: string, customerName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getByCustomer(billingAccountName: string, customerName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + customerName, + options + }, + getByCustomerOperationSpec, + callback) as Promise; + } + + /** + * Updates the policies for a customer. This operation is supported only for billing accounts with + * agreement type Microsoft Partner Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param customerName The ID that uniquely identifies a customer. + * @param [options] The optional parameters + * @returns Promise + */ + updateCustomer(billingAccountName: string, customerName: string, options?: Models.PoliciesUpdateCustomerOptionalParams): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param customerName The ID that uniquely identifies a customer. + * @param callback The callback + */ + updateCustomer(billingAccountName: string, customerName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param customerName The ID that uniquely identifies a customer. + * @param options The optional parameters + * @param callback The callback + */ + updateCustomer(billingAccountName: string, customerName: string, options: Models.PoliciesUpdateCustomerOptionalParams, callback: msRest.ServiceCallback): void; + updateCustomer(billingAccountName: string, customerName: string, options?: Models.PoliciesUpdateCustomerOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + customerName, + options + }, + updateCustomerOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getByBillingProfileOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/policies/default", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Policy + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/policies/default", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.Policy, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Policy + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getByCustomerOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/policies/default", + urlParameters: [ + Parameters.billingAccountName, + Parameters.customerName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.CustomerPolicy + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const updateCustomerOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/policies/default", + urlParameters: [ + Parameters.billingAccountName, + Parameters.customerName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + viewCharges: [ + "options", + "viewCharges" + ] + }, + mapper: { + ...Mappers.CustomerPolicy, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.CustomerPolicy + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/billing/arm-billing/src/operations/products.ts b/sdk/billing/arm-billing/src/operations/products.ts new file mode 100644 index 000000000000..e493f2fc0e84 --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/products.ts @@ -0,0 +1,740 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/productsMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a Products. */ +export class Products { + private readonly client: BillingManagementClientContext; + + /** + * Create a Products. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * Lists the products for a customer. These don't include products billed based on usage.The + * operation is supported only for billing accounts with agreement type Microsoft Partner + * Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param customerName The ID that uniquely identifies a customer. + * @param [options] The optional parameters + * @returns Promise + */ + listByCustomer(billingAccountName: string, customerName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param customerName The ID that uniquely identifies a customer. + * @param callback The callback + */ + listByCustomer(billingAccountName: string, customerName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param customerName The ID that uniquely identifies a customer. + * @param options The optional parameters + * @param callback The callback + */ + listByCustomer(billingAccountName: string, customerName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByCustomer(billingAccountName: string, customerName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + customerName, + options + }, + listByCustomerOperationSpec, + callback) as Promise; + } + + /** + * Lists the products for a billing account. These don't include products billed based on usage. + * The operation is supported for billing accounts with agreement type Microsoft Customer Agreement + * or Microsoft Partner Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingAccount(billingAccountName: string, options?: Models.ProductsListByBillingAccountOptionalParams): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param callback The callback + */ + listByBillingAccount(billingAccountName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingAccount(billingAccountName: string, options: Models.ProductsListByBillingAccountOptionalParams, callback: msRest.ServiceCallback): void; + listByBillingAccount(billingAccountName: string, options?: Models.ProductsListByBillingAccountOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + options + }, + listByBillingAccountOperationSpec, + callback) as Promise; + } + + /** + * Lists the products for a billing profile. These don't include products billed based on usage. + * The operation is supported for billing accounts with agreement type Microsoft Customer Agreement + * or Microsoft Partner Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, options?: Models.ProductsListByBillingProfileOptionalParams): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param callback The callback + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, options: Models.ProductsListByBillingProfileOptionalParams, callback: msRest.ServiceCallback): void; + listByBillingProfile(billingAccountName: string, billingProfileName: string, options?: Models.ProductsListByBillingProfileOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + options + }, + listByBillingProfileOperationSpec, + callback) as Promise; + } + + /** + * Lists the products for an invoice section. These don't include products billed based on usage. + * The operation is supported only for billing accounts with agreement type Microsoft Customer + * Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param [options] The optional parameters + * @returns Promise + */ + listByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, options?: Models.ProductsListByInvoiceSectionOptionalParams): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param callback The callback + */ + listByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param billingProfileName The ID that uniquely identifies a billing profile. + * @param invoiceSectionName The ID that uniquely identifies an invoice section. + * @param options The optional parameters + * @param callback The callback + */ + listByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, options: Models.ProductsListByInvoiceSectionOptionalParams, callback: msRest.ServiceCallback): void; + listByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, options?: Models.ProductsListByInvoiceSectionOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + invoiceSectionName, + options + }, + listByInvoiceSectionOperationSpec, + callback) as Promise; + } + + /** + * Gets a product by ID. The operation is supported only for billing accounts with agreement type + * Microsoft Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param productName The ID that uniquely identifies a product. + * @param [options] The optional parameters + * @returns Promise + */ + get(billingAccountName: string, productName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param productName The ID that uniquely identifies a product. + * @param callback The callback + */ + get(billingAccountName: string, productName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param productName The ID that uniquely identifies a product. + * @param options The optional parameters + * @param callback The callback + */ + get(billingAccountName: string, productName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(billingAccountName: string, productName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + productName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Updates the properties of a Product. Currently, auto renew can be updated. The operation is + * supported only for billing accounts with agreement type Microsoft Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param productName The ID that uniquely identifies a product. + * @param parameters Request parameters that are provided to the update product operation. + * @param [options] The optional parameters + * @returns Promise + */ + update(billingAccountName: string, productName: string, parameters: Models.Product, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param productName The ID that uniquely identifies a product. + * @param parameters Request parameters that are provided to the update product operation. + * @param callback The callback + */ + update(billingAccountName: string, productName: string, parameters: Models.Product, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param productName The ID that uniquely identifies a product. + * @param parameters Request parameters that are provided to the update product operation. + * @param options The optional parameters + * @param callback The callback + */ + update(billingAccountName: string, productName: string, parameters: Models.Product, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(billingAccountName: string, productName: string, parameters: Models.Product, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + productName, + parameters, + options + }, + updateOperationSpec, + callback) as Promise; + } + + /** + * Moves a product's charges to a new invoice section. The new invoice section must belong to the + * same billing profile as the existing invoice section. This operation is supported only for + * products that are purchased with a recurring charge and for billing accounts with agreement type + * Microsoft Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param productName The ID that uniquely identifies a product. + * @param [options] The optional parameters + * @returns Promise + */ + move(billingAccountName: string, productName: string, options?: Models.ProductsMoveOptionalParams): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param productName The ID that uniquely identifies a product. + * @param callback The callback + */ + move(billingAccountName: string, productName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param productName The ID that uniquely identifies a product. + * @param options The optional parameters + * @param callback The callback + */ + move(billingAccountName: string, productName: string, options: Models.ProductsMoveOptionalParams, callback: msRest.ServiceCallback): void; + move(billingAccountName: string, productName: string, options?: Models.ProductsMoveOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + productName, + options + }, + moveOperationSpec, + callback) as Promise; + } + + /** + * Validates if a product's charges can be moved to a new invoice section. This operation is + * supported only for products that are purchased with a recurring charge and for billing accounts + * with agreement type Microsoft Customer Agreement. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param productName The ID that uniquely identifies a product. + * @param [options] The optional parameters + * @returns Promise + */ + validateMove(billingAccountName: string, productName: string, options?: Models.ProductsValidateMoveOptionalParams): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param productName The ID that uniquely identifies a product. + * @param callback The callback + */ + validateMove(billingAccountName: string, productName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param productName The ID that uniquely identifies a product. + * @param options The optional parameters + * @param callback The callback + */ + validateMove(billingAccountName: string, productName: string, options: Models.ProductsValidateMoveOptionalParams, callback: msRest.ServiceCallback): void; + validateMove(billingAccountName: string, productName: string, options?: Models.ProductsValidateMoveOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + productName, + options + }, + validateMoveOperationSpec, + callback) as Promise; + } + + /** + * Lists the products for a customer. These don't include products billed based on usage.The + * operation is supported only for billing accounts with agreement type Microsoft Partner + * Agreement. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByCustomerNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByCustomerNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByCustomerNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByCustomerNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByCustomerNextOperationSpec, + callback) as Promise; + } + + /** + * Lists the products for a billing account. These don't include products billed based on usage. + * The operation is supported for billing accounts with agreement type Microsoft Customer Agreement + * or Microsoft Partner Agreement. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByBillingAccountNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingAccountNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByBillingAccountNextOperationSpec, + callback) as Promise; + } + + /** + * Lists the products for a billing profile. These don't include products billed based on usage. + * The operation is supported for billing accounts with agreement type Microsoft Customer Agreement + * or Microsoft Partner Agreement. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingProfileNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByBillingProfileNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingProfileNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingProfileNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByBillingProfileNextOperationSpec, + callback) as Promise; + } + + /** + * Lists the products for an invoice section. These don't include products billed based on usage. + * The operation is supported only for billing accounts with agreement type Microsoft Customer + * Agreement. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByInvoiceSectionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByInvoiceSectionNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByInvoiceSectionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByInvoiceSectionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByInvoiceSectionNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByCustomerOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/products", + urlParameters: [ + Parameters.billingAccountName, + Parameters.customerName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ProductsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingAccountOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/products", + urlParameters: [ + Parameters.billingAccountName + ], + queryParameters: [ + Parameters.apiVersion0, + Parameters.filter + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ProductsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingProfileOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/products", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName + ], + queryParameters: [ + Parameters.apiVersion0, + Parameters.filter + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ProductsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByInvoiceSectionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/products", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName, + Parameters.invoiceSectionName + ], + queryParameters: [ + Parameters.apiVersion0, + Parameters.filter + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ProductsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/products/{productName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.productName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Product + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/products/{productName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.productName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.Product, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Product + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const moveOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/products/{productName}/move", + urlParameters: [ + Parameters.billingAccountName, + Parameters.productName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + destinationInvoiceSectionId: [ + "options", + "destinationInvoiceSectionId" + ] + }, + mapper: { + ...Mappers.TransferProductRequestProperties, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Product, + headersMapper: Mappers.ProductsMoveHeaders + }, + 202: { + headersMapper: Mappers.ProductsMoveHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse, + headersMapper: Mappers.ProductsMoveHeaders + } + }, + serializer +}; + +const validateMoveOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/products/{productName}/validateMoveEligibility", + urlParameters: [ + Parameters.billingAccountName, + Parameters.productName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + destinationInvoiceSectionId: [ + "options", + "destinationInvoiceSectionId" + ] + }, + mapper: { + ...Mappers.TransferProductRequestProperties, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ValidateProductTransferEligibilityResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByCustomerNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ProductsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingAccountNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ProductsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingProfileNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ProductsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByInvoiceSectionNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ProductsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/billing/arm-billing/src/operations/transactions.ts b/sdk/billing/arm-billing/src/operations/transactions.ts new file mode 100644 index 000000000000..e447f25ebe35 --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/transactions.ts @@ -0,0 +1,137 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/transactionsMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a Transactions. */ +export class Transactions { + private readonly client: BillingManagementClientContext; + + /** + * Create a Transactions. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * Lists the transactions for an invoice. Transactions include purchases, refunds and Azure usage + * charges. + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param invoiceName The ID that uniquely identifies an invoice. + * @param [options] The optional parameters + * @returns Promise + */ + listByInvoice(billingAccountName: string, invoiceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param invoiceName The ID that uniquely identifies an invoice. + * @param callback The callback + */ + listByInvoice(billingAccountName: string, invoiceName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName The ID that uniquely identifies a billing account. + * @param invoiceName The ID that uniquely identifies an invoice. + * @param options The optional parameters + * @param callback The callback + */ + listByInvoice(billingAccountName: string, invoiceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByInvoice(billingAccountName: string, invoiceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + invoiceName, + options + }, + listByInvoiceOperationSpec, + callback) as Promise; + } + + /** + * Lists the transactions for an invoice. Transactions include purchases, refunds and Azure usage + * charges. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByInvoiceNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByInvoiceNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByInvoiceNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByInvoiceNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByInvoiceNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByInvoiceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}/transactions", + urlParameters: [ + Parameters.billingAccountName, + Parameters.invoiceName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.TransactionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByInvoiceNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.TransactionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/billing/arm-billing/tsconfig.json b/sdk/billing/arm-billing/tsconfig.json index 87bbf5b5fa49..422b584abd5e 100644 --- a/sdk/billing/arm-billing/tsconfig.json +++ b/sdk/billing/arm-billing/tsconfig.json @@ -9,7 +9,7 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6"], + "lib": ["es6", "dom"], "declaration": true, "outDir": "./esm", "importHelpers": true