From 3062eeaad4eba123b581f58d3b77b5910cf039f8 Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Mon, 24 Feb 2020 20:37:28 +0000 Subject: [PATCH] Generated from 497f37d011e45d90e7a5f190b1326ec89e2719c8 Merge pull request #6 from Khushboo-Baheti/master merge --- sdk/billing/arm-billing/LICENSE.txt | 2 +- sdk/billing/arm-billing/README.md | 24 +- sdk/billing/arm-billing/package.json | 24 +- sdk/billing/arm-billing/rollup.config.js | 22 +- .../src/billingManagementClient.ts | 46 +- .../src/billingManagementClientContext.ts | 4 +- ...ingPeriodsMappers.ts => addressMappers.ts} | 18 +- .../src/models/agreementsMappers.ts | 44 + .../src/models/availableBalancesMappers.ts | 43 + .../src/models/billingAccountsMappers.ts | 47 + .../src/models/billingPermissionsMappers.ts | 14 + .../src/models/billingProfilesMappers.ts | 47 + .../billingPropertyOperationsMappers.ts | 43 + .../models/billingRoleAssignmentsMappers.ts | 45 + .../models/billingRoleDefinitionsMappers.ts | 44 + .../src/models/billingSubscriptionsMappers.ts | 49 + .../src/models/customersMappers.ts | 44 + .../src/models/departmentsMappers.ts | 44 + .../src/models/enrollmentAccountsMappers.ts | 44 +- sdk/billing/arm-billing/src/models/index.ts | 5174 ++++++++++++++++- .../src/models/instructionsMappers.ts | 44 + .../src/models/invoiceSectionsMappers.ts | 47 + .../arm-billing/src/models/invoicesMappers.ts | 46 +- sdk/billing/arm-billing/src/models/mappers.ts | 3549 ++++++++++- .../src/models/operationsMappers.ts | 13 +- .../arm-billing/src/models/parameters.ts | 158 +- .../src/models/partnerTransfersMappers.ts | 17 + .../src/models/paymentMethodsMappers.ts | 44 + .../arm-billing/src/models/policiesMappers.ts | 43 + .../src/models/priceSheetMappers.ts | 15 + .../arm-billing/src/models/productsMappers.ts | 50 + .../src/models/recipientTransfersMappers.ts | 21 + .../src/models/transactionsMappers.ts | 44 + .../src/models/transfersMappers.ts | 17 + .../arm-billing/src/operations/address.ts | 85 + .../arm-billing/src/operations/agreements.ts | 139 + .../src/operations/availableBalances.ts | 86 + .../src/operations/billingAccounts.ts | 291 + .../src/operations/billingPeriods.ts | 187 - .../src/operations/billingPermissions.ts | 254 + .../src/operations/billingProfiles.ts | 276 + .../operations/billingPropertyOperations.ts | 77 + .../src/operations/billingRoleAssignments.ts | 765 +++ .../src/operations/billingRoleDefinitions.ts | 381 ++ .../src/operations/billingSubscriptions.ts | 627 ++ .../arm-billing/src/operations/customers.ts | 296 + .../arm-billing/src/operations/departments.ts | 141 + .../src/operations/enrollmentAccounts.ts | 119 +- .../arm-billing/src/operations/index.ts | 23 +- .../src/operations/instructions.ts | 268 + .../src/operations/invoiceSections.ts | 352 ++ .../arm-billing/src/operations/invoices.ts | 273 +- .../src/operations/partnerTransfers.ts | 332 ++ .../src/operations/paymentMethods.ts | 235 + .../arm-billing/src/operations/policies.ts | 277 + .../arm-billing/src/operations/priceSheet.ts | 151 + .../arm-billing/src/operations/products.ts | 610 ++ .../src/operations/recipientTransfers.ts | 336 ++ .../src/operations/transactions.ts | 597 ++ .../arm-billing/src/operations/transfers.ts | 332 ++ sdk/billing/arm-billing/tsconfig.json | 2 +- 61 files changed, 16593 insertions(+), 849 deletions(-) rename sdk/billing/arm-billing/src/models/{billingPeriodsMappers.ts => addressMappers.ts} (64%) 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/departmentsMappers.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/partnerTransfersMappers.ts create mode 100644 sdk/billing/arm-billing/src/models/paymentMethodsMappers.ts create mode 100644 sdk/billing/arm-billing/src/models/policiesMappers.ts create mode 100644 sdk/billing/arm-billing/src/models/priceSheetMappers.ts create mode 100644 sdk/billing/arm-billing/src/models/productsMappers.ts create mode 100644 sdk/billing/arm-billing/src/models/recipientTransfersMappers.ts create mode 100644 sdk/billing/arm-billing/src/models/transactionsMappers.ts create mode 100644 sdk/billing/arm-billing/src/models/transfersMappers.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 delete mode 100644 sdk/billing/arm-billing/src/operations/billingPeriods.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/departments.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/partnerTransfers.ts create mode 100644 sdk/billing/arm-billing/src/operations/paymentMethods.ts create mode 100644 sdk/billing/arm-billing/src/operations/policies.ts create mode 100644 sdk/billing/arm-billing/src/operations/priceSheet.ts create mode 100644 sdk/billing/arm-billing/src/operations/products.ts create mode 100644 sdk/billing/arm-billing/src/operations/recipientTransfers.ts create mode 100644 sdk/billing/arm-billing/src/operations/transactions.ts create mode 100644 sdk/billing/arm-billing/src/operations/transfers.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 4c2a277cba40..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" ], @@ -52,5 +54,5 @@ "prepack": "npm install && npm run build" }, "sideEffects": false, - "authPublish": true + "autoPublish": true } 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..5f1795224c36 100644 --- a/sdk/billing/arm-billing/src/billingManagementClient.ts +++ b/sdk/billing/arm-billing/src/billingManagementClient.ts @@ -17,10 +17,31 @@ import { BillingManagementClientContext } from "./billingManagementClientContext class BillingManagementClient extends BillingManagementClientContext { // Operation groups + billingAccounts: operations.BillingAccounts; + paymentMethods: operations.PaymentMethods; + 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; + transactions: operations.Transactions; + departments: operations.Departments; enrollmentAccounts: operations.EnrollmentAccounts; - billingPeriods: operations.BillingPeriods; invoices: operations.Invoices; + priceSheet: operations.PriceSheet; + policies: operations.Policies; + billingProperty: operations.BillingPropertyOperations; + transfers: operations.Transfers; + partnerTransfers: operations.PartnerTransfers; + recipientTransfers: operations.RecipientTransfers; operations: operations.Operations; + billingRoleDefinitions: operations.BillingRoleDefinitions; + billingRoleAssignments: operations.BillingRoleAssignments; + agreements: operations.Agreements; /** * Initializes a new instance of the BillingManagementClient class. @@ -30,10 +51,31 @@ class BillingManagementClient extends BillingManagementClientContext { */ constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.BillingManagementClientOptions) { super(credentials, subscriptionId, options); + this.billingAccounts = new operations.BillingAccounts(this); + this.paymentMethods = new operations.PaymentMethods(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.transactions = new operations.Transactions(this); + this.departments = new operations.Departments(this); this.enrollmentAccounts = new operations.EnrollmentAccounts(this); - this.billingPeriods = new operations.BillingPeriods(this); this.invoices = new operations.Invoices(this); + this.priceSheet = new operations.PriceSheet(this); + this.policies = new operations.Policies(this); + this.billingProperty = new operations.BillingPropertyOperations(this); + this.transfers = new operations.Transfers(this); + this.partnerTransfers = new operations.PartnerTransfers(this); + this.recipientTransfers = new operations.RecipientTransfers(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); } } diff --git a/sdk/billing/arm-billing/src/billingManagementClientContext.ts b/sdk/billing/arm-billing/src/billingManagementClientContext.ts index 3501b4ba6e55..3823172ffefa 100644 --- a/sdk/billing/arm-billing/src/billingManagementClientContext.ts +++ b/sdk/billing/arm-billing/src/billingManagementClientContext.ts @@ -13,7 +13,7 @@ import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-billing"; -const packageVersion = "0.1.0"; +const packageVersion = "2.2.0"; export class BillingManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; @@ -44,7 +44,7 @@ export class BillingManagementClientContext extends msRestAzure.AzureServiceClie super(credentials, options); - this.apiVersion = '2018-03-01-preview'; + this.apiVersion = '2019-10-01-preview'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; diff --git a/sdk/billing/arm-billing/src/models/billingPeriodsMappers.ts b/sdk/billing/arm-billing/src/models/addressMappers.ts similarity index 64% rename from sdk/billing/arm-billing/src/models/billingPeriodsMappers.ts rename to sdk/billing/arm-billing/src/models/addressMappers.ts index b06ea885b372..e91750221510 100644 --- a/sdk/billing/arm-billing/src/models/billingPeriodsMappers.ts +++ b/sdk/billing/arm-billing/src/models/addressMappers.ts @@ -1,22 +1,14 @@ /* * 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, - BaseResource, - ErrorResponse, + AddressDetails, ErrorDetails, - EnrollmentAccount, - Invoice, - DownloadUrl + 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..854a0f601a40 --- /dev/null +++ b/sdk/billing/arm-billing/src/models/agreementsMappers.ts @@ -0,0 +1,44 @@ +/* + * 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, + BillingPermissionsProperties, + BillingProfile, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscription, + Customer, + CustomerPolicy, + Department, + Document, + Enrollment, + EnrollmentAccount, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + Instruction, + Invoice, + InvoiceSection, + Participants, + PaymentMethod, + 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..b1364c7b1a1f --- /dev/null +++ b/sdk/billing/arm-billing/src/models/availableBalancesMappers.ts @@ -0,0 +1,43 @@ +/* + * 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, + BillingPermissionsProperties, + BillingProfile, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscription, + Customer, + CustomerPolicy, + Department, + Document, + Enrollment, + EnrollmentAccount, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + Instruction, + Invoice, + InvoiceSection, + Participants, + PaymentMethod, + 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..db645e0ffca5 --- /dev/null +++ b/sdk/billing/arm-billing/src/models/billingAccountsMappers.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, + BillingAccountListResult, + BillingAccountUpdateRequest, + BillingPermissionsProperties, + BillingProfile, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscription, + Customer, + CustomerPolicy, + Department, + Document, + Enrollment, + EnrollmentAccount, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + Instruction, + Invoice, + InvoiceSection, + InvoiceSectionListWithCreateSubPermissionResult, + InvoiceSectionWithCreateSubPermission, + Participants, + PaymentMethod, + 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..f45d9f9be4f2 --- /dev/null +++ b/sdk/billing/arm-billing/src/models/billingProfilesMappers.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, + BillingPermissionsProperties, + BillingProfile, + BillingProfileCreationRequest, + BillingProfileListResult, + BillingProfilesCreateHeaders, + BillingProfilesUpdateHeaders, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscription, + Customer, + CustomerPolicy, + Department, + Document, + Enrollment, + EnrollmentAccount, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + Instruction, + Invoice, + InvoiceSection, + Participants, + PaymentMethod, + 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..b1364c7b1a1f --- /dev/null +++ b/sdk/billing/arm-billing/src/models/billingPropertyOperationsMappers.ts @@ -0,0 +1,43 @@ +/* + * 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, + BillingPermissionsProperties, + BillingProfile, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscription, + Customer, + CustomerPolicy, + Department, + Document, + Enrollment, + EnrollmentAccount, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + Instruction, + Invoice, + InvoiceSection, + Participants, + PaymentMethod, + 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..427c720d5273 --- /dev/null +++ b/sdk/billing/arm-billing/src/models/billingRoleAssignmentsMappers.ts @@ -0,0 +1,45 @@ +/* + * 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, + BillingPermissionsProperties, + BillingProfile, + BillingProperty, + BillingRoleAssignment, + BillingRoleAssignmentListResult, + BillingRoleAssignmentPayload, + BillingRoleDefinition, + BillingSubscription, + Customer, + CustomerPolicy, + Department, + Document, + Enrollment, + EnrollmentAccount, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + Instruction, + Invoice, + InvoiceSection, + Participants, + PaymentMethod, + 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..55e02cb23dd4 --- /dev/null +++ b/sdk/billing/arm-billing/src/models/billingRoleDefinitionsMappers.ts @@ -0,0 +1,44 @@ +/* + * 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, + BillingPermissionsProperties, + BillingProfile, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingRoleDefinitionListResult, + BillingSubscription, + Customer, + CustomerPolicy, + Department, + Document, + Enrollment, + EnrollmentAccount, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + Instruction, + Invoice, + InvoiceSection, + Participants, + PaymentMethod, + 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..70830c96370a --- /dev/null +++ b/sdk/billing/arm-billing/src/models/billingSubscriptionsMappers.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, + BillingPermissionsProperties, + BillingProfile, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscription, + BillingSubscriptionsListResult, + BillingSubscriptionsTransferHeaders, + Customer, + CustomerPolicy, + Department, + Document, + Enrollment, + EnrollmentAccount, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + Instruction, + Invoice, + InvoiceSection, + Participants, + PaymentMethod, + PaymentProperties, + Policy, + Product, + Reseller, + Resource, + Transaction, + TransferBillingSubscriptionRequestProperties, + TransferBillingSubscriptionResult, + 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..2c79b50ab11f --- /dev/null +++ b/sdk/billing/arm-billing/src/models/customersMappers.ts @@ -0,0 +1,44 @@ +/* + * 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, + BillingPermissionsProperties, + BillingProfile, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscription, + Customer, + CustomerListResult, + CustomerPolicy, + Department, + Document, + Enrollment, + EnrollmentAccount, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + Instruction, + Invoice, + InvoiceSection, + Participants, + PaymentMethod, + PaymentProperties, + Policy, + Product, + Reseller, + Resource, + Transaction +} from "../models/mappers"; diff --git a/sdk/billing/arm-billing/src/models/departmentsMappers.ts b/sdk/billing/arm-billing/src/models/departmentsMappers.ts new file mode 100644 index 000000000000..feb59eedd36d --- /dev/null +++ b/sdk/billing/arm-billing/src/models/departmentsMappers.ts @@ -0,0 +1,44 @@ +/* + * 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, + BillingPermissionsProperties, + BillingProfile, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscription, + Customer, + CustomerPolicy, + Department, + DepartmentListResult, + Document, + Enrollment, + EnrollmentAccount, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + Instruction, + Invoice, + InvoiceSection, + Participants, + PaymentMethod, + 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..368a94c8fe80 100644 --- a/sdk/billing/arm-billing/src/models/enrollmentAccountsMappers.ts +++ b/sdk/billing/arm-billing/src/models/enrollmentAccountsMappers.ts @@ -1,22 +1,44 @@ /* * 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, + BillingAccount, + BillingPermissionsProperties, + BillingProfile, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscription, + Customer, + CustomerPolicy, + Department, + Document, + Enrollment, + EnrollmentAccount, + EnrollmentAccountListResult, + EnrollmentPolicies, ErrorDetails, - BillingPeriod, + ErrorResponse, + Instruction, Invoice, - DownloadUrl + InvoiceSection, + Participants, + PaymentMethod, + 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..0b95b6b6577e 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,4935 @@ import * as msRest from "@azure/ms-rest-js"; export { BaseResource, CloudError }; +/** + * Details about 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 about a reseller. + */ +export interface Reseller { + /** + * The reseller id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly resellerId?: string; + /** + * A description 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 { + /** + * The name of the customer. + */ + displayName?: string; + /** + * Information about the product. + */ + enabledAzurePlans?: AzurePlan[]; /** - * @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 resellers which are allowed to provide service to this customer. */ - readonly principalName?: string; + resellers?: Reseller[]; } /** - * @interface - * An interface representing BillingPeriod. - * A billing period resource. - * - * @extends Resource + * Request parameters to initiate transfer. + */ +export interface InitiateTransferRequest { + /** + * Email Id of recipient for transfer. + */ + recipientEmailId?: string; + /** + * Optional reseller Id for transfer. + */ + resellerId?: string; +} + +/** + * Address details. */ -export interface BillingPeriod extends Resource { +export interface AddressDetails { + /** + * First Name. + */ + firstName?: string; + /** + * Last Name. + */ + lastName?: string; + /** + * Company Name. + */ + companyName?: string; + /** + * Address Line1. + */ + addressLine1?: string; + /** + * Address Line2. + */ + addressLine2?: string; + /** + * Address Line3. + */ + addressLine3?: string; + /** + * Address City. + */ + city?: string; /** - * @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.** + * Address Region. */ - readonly billingPeriodStartDate?: Date; + region?: 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.** + * Country code uses ISO2, 2-digit format. */ - readonly billingPeriodEndDate?: Date; + country?: 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.** + * Address Postal Code. */ - readonly invoiceIds?: string[]; + postalCode?: 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.** + * list of suggested addresses. */ - readonly url?: string; + suggestedAddresses?: AddressDetails[]; + /** + * Validation error message. + */ + validationMessage?: string; } /** - * @interface - * An interface representing ErrorDetails. - * The details of the error. - * + * Details of the product to be transferred. */ -export interface ErrorDetails { +export interface ProductDetails { /** - * @member {string} [code] Error code. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Type of the product to be transferred. Possible values include: 'AzureSubscription', + * 'AzureReservation' */ - readonly code?: string; + productType?: ProductType; /** - * @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.** + * Id of product to be transferred. */ - readonly message?: string; + productId?: string; +} + +/** + * Request parameters to accept transfer. + */ +export interface AcceptTransferRequest { /** - * @member {string} [target] The target of the particular error. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Request parameters to accept transfer. */ - readonly target?: string; + productDetails?: ProductDetails[]; } /** - * @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. - * + * Error details for transfer execution. + */ +export interface ErrorModel { + /** + * Error code. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly errorCode?: string; + /** + * Error message. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly errorMessage?: string; +} + +/** + * Detailed transfer status. + */ +export interface DetailedTransferStatus { + /** + * Type of product being transferred. Possible values include: 'AzureSubscription', + * 'AzureReservation' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly productType?: ProductType; + /** + * Id of product being transferred. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly productId?: string; + /** + * Transfer status. Possible values include: 'NotStarted', 'InProgress', 'Completed', 'Failed' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly transferStatus?: ProductTransferStatus; + /** + * Error details for transfer execution. + */ + errorDetails?: ErrorModel; +} + +/** + * Details of the transfer. + */ +export interface TransferDetails { + /** + * Transfer creation time. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly creationTime?: Date; + /** + * Transfer expiration time. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly expirationTime?: Date; + /** + * Target invoice section Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceSectionId?: string; + /** + * Target billing account Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingAccountId?: string; + /** + * Reseller Id for transfer. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly resellerId?: string; + /** + * Reseller name for transfer. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly resellerName?: string; + /** + * Customer type of the initiator. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly initiatorCustomerType?: string; + /** + * Target billing profile Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileId?: string; + /** + * Overall transfer status. Possible values include: 'Pending', 'InProgress', 'Completed', + * 'CompletedWithErrors', 'Failed', 'Canceled', 'Declined' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly transferStatus?: TransferStatus; + /** + * Email Id of recipient of transfer. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly recipientEmailId?: string; + /** + * Email Id of initiator of transfer. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly initiatorEmailId?: string; + /** + * Email Id who user canceled the transfer. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly canceledBy?: string; + /** + * Transfer last modification time. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly lastModifiedTime?: Date; + /** + * Detailed transfer status. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly detailedTransferStatus?: DetailedTransferStatus[]; +} + +/** + * Details of the transfer. + */ +export interface RecipientTransferDetails { + /** + * Transfer creation time. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly creationTime?: Date; + /** + * Transfer expiration time. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly expirationTime?: Date; + /** + * Type of subscriptions that can be transferred. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly allowedProductType?: EligibleProductType[]; + /** + * Overall transfer status. Possible values include: 'Pending', 'InProgress', 'Completed', + * 'CompletedWithErrors', 'Failed', 'Canceled', 'Declined' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly transferStatus?: TransferStatus; + /** + * Email Id of recipient of transfer. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly recipientEmailId?: string; + /** + * Email Id of initiator of transfer. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly initiatorEmailId?: string; + /** + * Reseller Id for transfer. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly resellerId?: string; + /** + * Reseller name for transfer. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly resellerName?: string; + /** + * Customer type of the initiator. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly initiatorCustomerType?: string; + /** + * Email Id who user canceled the transfer. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly canceledBy?: string; + /** + * Transfer last modification time. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly lastModifiedTime?: Date; + /** + * Detailed transfer status. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly detailedTransferStatus?: DetailedTransferStatus[]; +} + +/** + * The properties of the product to initiate a transfer. + */ +export interface TransferProductRequestProperties { + /** + * The destination invoice section id. + */ + destinationInvoiceSectionId?: string; + /** + * The destination billing profile id. + */ + destinationBillingProfileId?: string; +} + +/** + * Request parameters to transfer billing subscription. + */ +export interface TransferBillingSubscriptionResult { + /** + * The destination billing subscription id. + */ + billingSubscriptionName?: string; +} + +/** + * Request parameters to transfer billing subscription. + */ +export interface TransferBillingSubscriptionRequestProperties { + /** + * The destination invoice section id. + */ + destinationInvoiceSectionId?: string; + /** + * The destination billing profile id. + */ + destinationBillingProfileId?: string; +} + +/** + * Request parameters to transfer billing subscription. + */ +export interface TransferBillingSubscriptionRequest { + /** + * The destination invoice section id. + */ + destinationInvoiceSectionId?: string; + /** + * The destination billing profile id. + */ + destinationBillingProfileId?: string; +} + +/** + * Error details of the transfer eligibility validation + */ +export interface ValidateSubscriptionTransferEligibilityError { + /** + * Error code for the product transfer validation. Possible values include: 'InvalidSource', + * 'SubscriptionNotActive', 'InsufficientPermissionOnSource', + * 'InsufficientPermissionOnDestination', 'DestinationBillingProfilePastDue', + * 'SubscriptionTypeNotSupported', 'CrossBillingAccountNotAllowed', + * 'NotAvailableForDestinationMarket' + */ + code?: SubscriptionTransferValidationErrorCode; + /** + * The error message. + */ + message?: string; + /** + * Detailed error message explaining the error. + */ + details?: string; +} + +/** + * Result of the transfer eligibility validation. + */ +export interface ValidateSubscriptionTransferEligibilityResult { + /** + * Specifies whether the transfer is eligible or not. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly isTransferEligible?: boolean; + /** + * Validation error details. + */ + errorDetails?: ValidateSubscriptionTransferEligibilityError; +} + +/** + * Summary of cancel product operation + */ +export interface UpdateAutoRenewOperation { + /** + * The end date of this asset + */ + endDate?: Date; +} + +/** + * An InvoiceSection resource. + */ +export interface InvoiceSection extends Resource { + /** + * The name of the InvoiceSection. + */ + displayName?: string; +} + +/** + * A billing profile resource. + */ +export interface BillingProfile extends Resource { + /** + * The billing profile name. + */ + displayName?: string; + /** + * Purchase order number. + */ + poNumber?: string; + /** + * Billing address. + */ + address?: AddressDetails; + /** + * If the billing profile is opted in to receive invoices via email. + */ + invoiceEmailOptIn?: boolean; + /** + * Invoice day. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceDay?: number; + /** + * The currency associated with the billing profile. + * **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. + */ + invoiceSections?: InvoiceSection[]; + /** + * The status of the billing profile. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly status?: any; + /** + * Reason for the specified billing profile status. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly statusReasonCode?: any; + /** + * The billing profile spending limit. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly spendingLimit?: any; +} + +/** + * The attributes associated with legacy enrollment + */ +export interface EnrollmentPolicies { + /** + * The accountOwnerViewCharges flag for Enrollment + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly accountOwnerViewCharges?: boolean; + /** + * The departmentAdminViewCharges flag for Enrollment + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly departmentAdminViewCharges?: boolean; + /** + * The marketplaces flag for Enrollment + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly marketplacesEnabled?: boolean; + /** + * The reserved instances flag for Enrollment + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly reservedInstancesEnabled?: boolean; +} + +/** + * Current entity level details + */ +export interface Enrollment { + /** + * Enrollment Start Date + */ + startDate?: Date; + /** + * Enrollment End Date + */ + endDate?: Date; + /** + * The currency associated with enrollment + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly currency?: string; + /** + * The channel for Enrollment + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly channel?: string; + /** + * The attributes associated with legacy enrollment. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly policies?: EnrollmentPolicies; + /** + * The language for Enrollment + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly language?: string; + /** + * The countryCode for Enrollment + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly countryCode?: string; + /** + * Enrollment status + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly status?: string; + /** + * Enrollment billing cycle + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingCycle?: string; +} + +/** + * An account resource. + */ +export interface EnrollmentAccount extends Resource { + /** + * The account name. + */ + accountName?: string; + /** + * The cost center name. + */ + costCenter?: string; + /** + * The account owner + */ + accountOwner?: string; + /** + * The status for account. + */ + status?: string; + /** + * Account Start Date + */ + startDate?: Date; + /** + * Account End Date + */ + endDate?: Date; + /** + * Associated department. By default this is not populated, unless it's specified in $expand. + */ + department?: Department; +} + +/** + * A department resource. + */ +export interface Department extends Resource { + /** + * The name for department. + */ + departmentName?: string; + /** + * The cost center name. + */ + costCenter?: string; + /** + * The status for department. + */ + status?: string; + /** + * Associated enrollment accounts. By default this is not populated, unless it's specified in + * $expand. + */ + enrollmentAccounts?: EnrollmentAccount[]; +} + +/** + * A billing account resource. + */ +export interface BillingAccount extends Resource { + /** + * The billing account name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly displayName?: string; + /** + * The address associated with billing account. + */ + address?: 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 customerType?: CustomerType; + /** + * 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 billing profiles associated to the billing account. By default this is not populated, + * unless it's specified in $expand. + */ + billingProfiles?: BillingProfile[]; + /** + * 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[]; + /** + * Organization id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly organizationId?: string; +} + +/** + * Result of listing billing accounts. + */ +export interface BillingAccountListResult { + /** + * The list of billing accounts. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly value?: BillingAccount[]; + /** + * The link (url) to the next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * The request properties of the billing account that can be updated. + */ +export interface BillingAccountUpdateRequest { + /** + * The billing account name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly displayName?: string; + /** + * The address associated with billing account. + */ + address?: 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 customerType?: CustomerType; + /** + * 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 billing profiles associated to the billing account. By default this is not populated, + * unless it's specified in $expand. + */ + billingProfiles?: BillingProfile[]; + /** + * 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[]; + /** + * Organization id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly organizationId?: string; +} + +/** + * A billing property resource. + */ +export interface BillingProperty extends Resource { + /** + * Billing tenant Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingTenantId?: string; + /** + * Billing account Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingAccountId?: string; + /** + * Billing account display name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingAccountDisplayName?: string; + /** + * Billing profile Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileId?: string; + /** + * Billing profile display name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileDisplayName?: string; + /** + * The status of the billing profile. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileStatus?: any; + /** + * Reason for the specified billing profile status. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileStatusReasonCode?: any; + /** + * The billing profile spending limit. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileSpendingLimit?: any; + /** + * Cost center name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly costCenter?: string; + /** + * Invoice Section Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceSectionId?: string; + /** + * Invoice Section display name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceSectionDisplayName?: string; + /** + * Product Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly productId?: string; + /** + * Product name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly productName?: string; + /** + * SKU Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly skuId?: string; + /** + * SKU description. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly skuDescription?: string; +} + +/** + * Result of listing departments. + */ +export interface DepartmentListResult { + /** + * The list of departments. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly value?: Department[]; + /** + * 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; +} + +/** + * Result of listing enrollment accounts. + */ +export interface EnrollmentAccountListResult { + /** + * The list of enrollment accounts. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly value?: EnrollmentAccount[]; + /** + * 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; +} + +/** + * A instruction resource. + */ +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; +} + +/** + * Result of listing billing profiles. + */ +export interface BillingProfileListResult { + /** + * The list of billing profiles. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly value?: BillingProfile[]; + /** + * The link (url) to the next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * The request parameters for creating a new billing profile. + */ +export interface BillingProfileCreationRequest { + /** + * The billing profile name. + */ + displayName?: string; + /** + * Purchase order number. + */ + poNumber?: string; + /** + * Billing address. + */ + address?: AddressDetails; + /** + * If the billing profile is opted in to receive invoices via email. + */ + invoiceEmailOptIn?: boolean; + /** + * Enabled azure plans for this billing profile. + */ + enabledAzurePlans?: AzurePlan[]; +} + +/** + * The properties of an InvoiceSection. + */ +export interface InvoiceSectionCreationRequest { + /** + * The name of the InvoiceSection. + */ + displayName?: string; +} + +/** + * Result of listing invoice sections. + */ +export interface InvoiceSectionListResult { + /** + * The list of invoice sections. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly value?: InvoiceSection[]; + /** + * 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; +} + +/** + * Invoice section properties with create subscription permission. + */ +export interface InvoiceSectionWithCreateSubPermission { + /** + * Invoice Section Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceSectionId?: string; + /** + * Invoice Section display name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceSectionDisplayName?: string; + /** + * Billing profile Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileId?: string; + /** + * Billing profile display name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileDisplayName?: string; + /** + * The status of the billing profile. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileStatus?: any; + /** + * Reason for the specified billing profile status. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileStatusReasonCode?: any; + /** + * The billing profile spending limit. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileSpendingLimit?: any; + /** + * 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 at which this 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 the invoice download. + */ +export interface Document { + /** + * Document type. 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 properties of the 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 of the payment. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly date?: Date; + /** + * The payment method family. 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 resource. + */ +export interface Invoice extends Resource { + /** + * The due date for invoice. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly dueDate?: Date; + /** + * The date when invoice was created. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceDate?: Date; + /** + * Invoice status. Possible values include: 'Due', 'OverDue', 'Paid' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly status?: InvoiceStatus; + /** + * Amount due. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly amountDue?: Amount; + /** + * Amount billed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billedAmount?: Amount; + /** + * The start date of the billing period. + * **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. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoicePeriodEndDate?: Date; + /** + * Invoice type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceType?: any; + /** + * The billing profile id this invoice belongs to. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileId?: string; + /** + * The billing profile display name this invoice belongs to. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileDisplayName?: string; + /** + * The purchase identifier 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 including invoice and tax documents. + * **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 subscription id this invoice belongs to. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly subscriptionId?: string; +} + +/** + * A product resource. + */ +export interface Product extends Resource { + /** + * 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 of purchase. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly purchaseDate?: Date; + /** + * The product type id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly productTypeId?: string; + /** + * The type of product. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly productType?: string; + /** + * Product status. Possible values include: 'Active', 'Inactive', 'PastDue', 'Expiring', + * 'Expired', 'Disabled', 'Cancelled', 'AutoRenew' + */ + status?: ProductStatusType; + /** + * end date. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly endDate?: Date; + /** + * Billing frequency. Possible values include: 'OneTime', 'Monthly', 'UsageBased' + */ + billingFrequency?: BillingFrequency; + /** + * 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 purchased product quantity. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly quantity?: number; + /** + * Sku Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly skuId?: string; + /** + * Sku description. + * **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; + /** + * Availability Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly availabilityId?: string; + /** + * Parent Product Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly parentProductId?: string; + /** + * Invoice section id to which this product belongs. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceSectionId?: string; + /** + * Invoice section display name to which this product belongs. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceSectionDisplayName?: string; + /** + * Billing Profile id to which this product belongs. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileId?: string; + /** + * Billing Profile display name to which this product belongs. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileDisplayName?: string; + /** + * Customer id to which this product belongs. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly customerId?: string; + /** + * Display name of customer to which this product belongs. + * **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 isTransferEligible?: boolean; + /** + * Validation error details. + */ + errorDetails?: ValidateProductTransferEligibilityError; +} + +/** + * A billing Subscription resource. + */ +export interface BillingSubscription extends Resource { + /** + * display name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly displayName?: string; + /** + * Subscription Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly subscriptionId?: string; + /** + * Subscription billing status. Possible values include: 'Active', 'Inactive', 'Abandoned', + * 'Deleted', 'Warning' + */ + subscriptionBillingStatus?: BillingSubscriptionStatusType; + /** + * Last month charges. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly lastMonthCharges?: Amount; + /** + * Month to date charges. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly monthToDateCharges?: Amount; + /** + * Billing Profile id to which this product belongs. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileId?: string; + /** + * Billing Profile display name to which this product belongs. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileDisplayName?: string; + /** + * Customer id to which this product belongs. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly customerId?: string; + /** + * Display name of customer to which this product belongs. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly customerDisplayName?: string; + /** + * Invoice section id to which this product belongs. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceSectionId?: string; + /** + * Invoice section display name to which this product belongs. + * **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. + */ + skuId?: string; + /** + * The sku description. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly skuDescription?: string; +} + +/** + * The rating context. + */ +export interface EnrollmentAccountContext { + /** + * The cost center name. + */ + costCenter?: string; + /** + * Account Start Date + */ + startDate?: Date; + /** + * Account End Date + */ + endDate?: Date; + /** + * The enrollment account id. + */ + enrollmentAccountName?: string; +} + +/** + * A reservation transaction resource. + */ +export interface Transaction extends Resource { + /** + * The kind of transaction. Choices are all and reservation. Possible values include: 'all', + * 'reservation' + */ + kind?: TransactionTypeKind; + /** + * The date of reservation transaction. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly date?: Date; + /** + * Invoice number or 'pending' if not invoiced. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoice?: string; + /** + * The reservation order id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly orderId?: string; + /** + * The reservation order name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly orderName?: string; + /** + * The product family. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly productFamily?: string; + /** + * The product type id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly productTypeId?: string; + /** + * The type of product. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly productType?: string; + /** + * Product description. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly productDescription?: string; + /** + * Transaction types. Possible values include: 'Purchase', 'Usage Charge' + */ + transactionType?: ReservationType; + /** + * Last charge associated with the purchase. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly transactionAmount?: Amount; + /** + * Purchase quantity. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly quantity?: number; + /** + * Invoice section id to which this product belongs. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceSectionId?: string; + /** + * Invoice section display name to which this product belongs. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceSectionDisplayName?: string; + /** + * Billing Profile id to which this product belongs. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileId?: string; + /** + * Billing Profile display name to which this product belongs. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileDisplayName?: string; + /** + * Customer id to which this product belongs. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly customerId?: string; + /** + * Display name of customer to which this product belongs. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly customerDisplayName?: string; + /** + * The subscription id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly subscriptionId?: string; + /** + * The subscription name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly subscriptionName?: 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; +} + +/** + * The Policy. + */ +export interface Policy extends Resource { + /** + * The marketplace purchases are free, allowed or not allowed. Possible values include: + * 'AllAllowed', 'OnlyFreeAllowed', 'NotAllowed' + */ + marketplacePurchases?: MarketplacePurchasesPolicy; + /** + * The reservation purchases allowed or not. Possible values include: 'Allowed', 'NotAllowed' + */ + reservationPurchases?: ReservationPurchasesPolicy; + /** + * Who can view charges. Possible values include: 'Allowed', 'NotAllowed' + */ + viewCharges?: ViewChargesPolicy; +} + +/** + * The Customer's Policy. + */ +export interface CustomerPolicy extends Resource { + /** + * Customer can view retail prices. Possible values include: 'Allowed', 'NotAllowed' + */ + viewCharges?: ViewCharges; +} + +/** + * Latest available balance on Monetary Credit PI. + */ +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; +} + +/** + * A payment method resource. + */ +export interface PaymentMethod extends Resource { + /** + * Payment method type. Possible values include: 'Credits', 'ChequeWire' + */ + paymentMethodType?: PaymentMethodType; + /** + * Details about the payment method. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly details?: string; + /** + * Expiration month and year. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly expiration?: string; + /** + * The currency associated with the payment method. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly currency?: string; +} + +/** + * Request parameters to update auto renew for support product. + */ +export interface UpdateAutoRenewRequest { + /** + * Request parameters to update auto renew policy a product. Possible values include: 'true', + * 'false' + */ + autoRenew?: UpdateAutoRenew; +} + +/** + * 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: Invoice, etc. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly resource?: string; + /** + * Operation type: Read, write, delete, etc. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly operation?: string; +} + +/** + * 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 payload use to update role assignment on a scope + */ +export interface BillingRoleAssignmentPayload { + /** + * The user's principal id that the role gets assigned to + */ + principalId?: string; + /** + * The role definition id + */ + billingRoleDefinitionId?: string; +} + +/** + * a role assignment + */ +export interface BillingRoleAssignment extends Resource { + /** + * the date the role assignment is created + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly createdOn?: string; + /** + * the creator's tenant Id + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly createdByPrincipalTenantId?: string; + /** + * the creator's principal Id + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly createdByPrincipalId?: string; + /** + * the name of the role assignment + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingRoleAssignmentName?: string; + /** + * The user's principal id that the role gets assigned to + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalId?: string; + /** + * The role definition id + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly roleDefinitionName?: string; + /** + * The scope the role get assigned to + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly scope?: string; +} + +/** + * Result of get list of role assignments + */ +export interface BillingRoleAssignmentListResult { + /** + * The list role assignments + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly value?: BillingRoleAssignment[]; +} + +/** + * 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 do + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly actions?: string[]; + /** + * The set of actions the caller is not allowed to do + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly notActions?: string[]; +} + +/** + * Result of get role definition for a role. + */ +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; +} + +/** + * list the role definitions. + */ +export interface BillingRoleDefinitionListResult { + /** + * The list of role definitions. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly value?: BillingRoleDefinition[]; +} + +/** + * Result of list billingPermissions a caller has on a billing account. + */ +export interface BillingPermissionsListResult { + /** + * The list of billingPermissions a caller has on a billing account. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly value?: BillingPermissionsProperties[]; +} + +/** + * Details about the participant or signer. + */ +export interface Participants { + /** + * The signing status + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly status?: string; + /** + * The date when 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 or signer. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly email?: string; +} + +/** + * An agreement resource. + */ +export interface Agreement extends Resource { + /** + * The link to the agreement. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly agreementLink?: string; + /** + * Effective date. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly effectiveDate?: Date; + /** + * Expiration date. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly expirationDate?: Date; + /** + * Participants or signer of the agreement. + */ + participants?: Participants[]; + /** + * The agreement status + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly status?: string; +} + +/** + * Result of listing agreements. + */ +export interface AgreementListResult { + /** + * The list of agreements. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly value?: Agreement[]; + /** + * The link (url) to the next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * The properties of the validation result. + */ +export interface ValidationResultProperties { + /** + * Result Level. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly level?: string; + /** + * Result Code. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly code?: string; + /** + * The validation message. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly message?: string; +} + +/** + * Transfer validation response. + */ +export interface ValidateTransferResponse { + /** + * The status of validation + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly status?: string; + /** + * The product id for which this result applies. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly productId?: string; + /** + * Array of validation results. + */ + results?: ValidationResultProperties[]; +} + +/** + * Result of transfer validation. + */ +export interface ValidateTransferListResponse { + /** + * The list of transfer validation results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly value?: ValidateTransferResponse[]; +} + +/** + * Optional Parameters. + */ +export interface BillingAccountsListOptionalParams extends msRest.RequestOptionsBase { + /** + * May be used to expand the address, invoiceSections and billingProfiles. + */ + expand?: string; +} + +/** + * Optional Parameters. + */ +export interface BillingAccountsGetOptionalParams extends msRest.RequestOptionsBase { + /** + * May be used to expand the address, invoiceSections and billingProfiles. + */ + expand?: string; +} + +/** + * Optional Parameters. + */ +export interface BillingProfilesListByBillingAccountOptionalParams extends msRest.RequestOptionsBase { + /** + * May be used to expand the invoiceSections. + */ + expand?: string; +} + +/** + * Optional Parameters. + */ +export interface BillingProfilesGetOptionalParams extends msRest.RequestOptionsBase { + /** + * May be used to expand the invoiceSections. + */ + expand?: string; +} + +/** + * Optional Parameters. + */ +export interface CustomersListByBillingProfileOptionalParams extends msRest.RequestOptionsBase { + /** + * May be used to filter the list of customers. + */ + 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; +} + +/** + * Optional Parameters. + */ +export interface CustomersListByBillingAccountOptionalParams extends msRest.RequestOptionsBase { + /** + * May be used to filter the list of customers. + */ + 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; +} + +/** + * Optional Parameters. + */ +export interface CustomersGetOptionalParams extends msRest.RequestOptionsBase { + /** + * May be used to expand enabledAzurePlans, resellers. + */ + expand?: string; +} + +/** + * Optional Parameters. + */ +export interface InvoiceSectionsCreateOptionalParams extends msRest.RequestOptionsBase { + /** + * The name of the InvoiceSection. + */ + displayName?: string; +} + +/** + * Optional Parameters. + */ +export interface InvoiceSectionsUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * The name of the InvoiceSection. + */ + displayName?: string; +} + +/** + * Optional Parameters. + */ +export interface InvoiceSectionsBeginCreateOptionalParams extends msRest.RequestOptionsBase { + /** + * The name of the InvoiceSection. + */ + displayName?: string; +} + +/** + * Optional Parameters. + */ +export interface InvoiceSectionsBeginUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * The name of the InvoiceSection. + */ + displayName?: string; +} + +/** + * Optional Parameters. + */ +export interface ProductsListByCustomerOptionalParams 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 is separated by a colon (:). + */ + filter?: 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 is 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 is separated by a colon (:). + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface ProductsUpdateAutoRenewByInvoiceSectionOptionalParams extends msRest.RequestOptionsBase { + /** + * Request parameters to update auto renew policy a product. Possible values include: 'true', + * 'false' + */ + autoRenew?: UpdateAutoRenew; +} + +/** + * Optional Parameters. + */ +export interface TransactionsListByCustomerOptionalParams extends msRest.RequestOptionsBase { + /** + * May be used to filter by transaction kind. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', + * and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair + * string where key and value is separated by a colon (:). + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface TransactionsListByBillingAccountOptionalParams extends msRest.RequestOptionsBase { + /** + * May be used to filter by transaction kind. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', + * and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair + * string where key and value is separated by a colon (:). + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface TransactionsListByBillingProfileOptionalParams extends msRest.RequestOptionsBase { + /** + * May be used to filter by transaction kind. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', + * and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair + * string where key and value is separated by a colon (:). + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface TransactionsListByInvoiceSectionOptionalParams extends msRest.RequestOptionsBase { + /** + * May be used to filter by transaction kind. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', + * and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair + * string where key and value is separated by a colon (:). + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface DepartmentsListByBillingAccountNameOptionalParams extends msRest.RequestOptionsBase { + /** + * May be used to expand the enrollmentAccounts. + */ + expand?: string; + /** + * The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support + * 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value is separated + * by a colon (:). + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface DepartmentsGetOptionalParams extends msRest.RequestOptionsBase { + /** + * May be used to expand the enrollmentAccounts. + */ + expand?: string; + /** + * The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support + * 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value is separated + * by a colon (:). + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface EnrollmentAccountsListByBillingAccountNameOptionalParams extends msRest.RequestOptionsBase { + /** + * May be used to expand the department. + */ + expand?: string; + /** + * The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support + * 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value is separated + * by a colon (:). + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface EnrollmentAccountsGetByEnrollmentAccountIdOptionalParams extends msRest.RequestOptionsBase { + /** + * May be used to expand the Department. + */ + expand?: string; + /** + * The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support + * 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value is separated + * by a colon (:). + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface PoliciesUpdateCustomerOptionalParams extends msRest.RequestOptionsBase { + /** + * Customer can view retail prices. Possible values include: 'Allowed', 'NotAllowed' + */ + viewCharges?: ViewCharges; +} + +/** + * Optional Parameters. + */ +export interface RecipientTransfersAcceptOptionalParams extends msRest.RequestOptionsBase { + /** + * Request parameters to accept transfer. + */ + productDetails?: ProductDetails[]; +} + +/** + * Optional Parameters. + */ +export interface RecipientTransfersValidateOptionalParams extends msRest.RequestOptionsBase { + /** + * Request parameters to accept transfer. + */ + productDetails?: ProductDetails[]; +} + +/** + * 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; +} + +/** + * An interface representing BillingManagementClientOptions. + */ +export interface BillingManagementClientOptions extends AzureServiceClientOptions { + baseUri?: string; +} + +/** + * Defines headers for Create operation. + */ +export interface BillingProfilesCreateHeaders { + /** + * Location URI to poll for result + */ + location: string; + /** + * Recommends the retryable time after receiving this. + */ + retryAfter: number; +} + +/** + * Defines headers for Update operation. + */ +export interface BillingProfilesUpdateHeaders { + /** + * 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 Create operation. + */ +export interface InvoiceSectionsCreateHeaders { + /** + * Location URI to poll for result + */ + location: string; + /** + * Recommends the retryable time after receiving this. + */ + retryAfter: number; +} + +/** + * Defines headers for Update operation. + */ +export interface InvoiceSectionsUpdateHeaders { + /** + * 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 Download operation. + */ +export interface PriceSheetDownloadHeaders { + /** + * 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; + /** + * The operation entity Id GUID. + */ + oDataEntityId: string; +} + +/** + * Defines headers for DownloadByBillingProfile operation. + */ +export interface PriceSheetDownloadByBillingProfileHeaders { + /** + * 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; + /** + * The operation entity Id GUID. + */ + oDataEntityId: string; +} + +/** + * Defines headers for Transfer operation. + */ +export interface BillingSubscriptionsTransferHeaders { + /** + * Location URI to poll for result. + */ + location: string; + /** + * Recommends the retryable time after receiving this. + */ + retryAfter: number; +} + +/** + * Defines headers for Transfer operation. + */ +export interface ProductsTransferHeaders { + /** + * Location URI to poll for result + */ + location: string; + /** + * Recommends the retryable time after receiving this. + */ + retryAfter: number; +} + +/** + * @interface + * Result of listing 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 + * Result of listing payment methods. + * @extends Array + */ +export interface PaymentMethodsListResult 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 instructions. + * @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 + * Result of listing 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 + * Result of listing 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 + * Result of listing products. It contains a list of available products 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 + * Result of listing reservation 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 + * Result of listing 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 + * Result of listing details of the transfer initiated by caller. + * @extends Array + */ +export interface TransferDetailsListResult 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 details of the transfer received by caller. + * @extends Array + */ +export interface RecipientTransferDetailsListResult 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 listing billing operations. It contains a list of 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; +} + +/** + * Defines values for AddressValidationStatus. + * Possible values include: 'Valid', 'Invalid' + * @readonly + * @enum {string} + */ +export type AddressValidationStatus = 'Valid' | 'Invalid'; + +/** + * Defines values for ProductType. + * Possible values include: 'AzureSubscription', 'AzureReservation' + * @readonly + * @enum {string} + */ +export type ProductType = 'AzureSubscription' | 'AzureReservation'; + +/** + * Defines values for TransferStatus. + * Possible values include: 'Pending', 'InProgress', 'Completed', 'CompletedWithErrors', 'Failed', + * 'Canceled', 'Declined' + * @readonly + * @enum {string} + */ +export type TransferStatus = 'Pending' | 'InProgress' | 'Completed' | 'CompletedWithErrors' | 'Failed' | 'Canceled' | 'Declined'; + +/** + * Defines values for ProductTransferStatus. + * Possible values include: 'NotStarted', 'InProgress', 'Completed', 'Failed' + * @readonly + * @enum {string} + */ +export type ProductTransferStatus = 'NotStarted' | 'InProgress' | 'Completed' | 'Failed'; + +/** + * Defines values for EligibleProductType. + * Possible values include: 'DevTestAzureSubscription', 'StandardAzureSubscription', + * 'AzureReservation' + * @readonly + * @enum {string} + */ +export type EligibleProductType = 'DevTestAzureSubscription' | 'StandardAzureSubscription' | 'AzureReservation'; + +/** + * 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 CustomerType. + * Possible values include: 'Enterprise', 'Individual', 'Partner' + * @readonly + * @enum {string} + */ +export type CustomerType = 'Enterprise' | 'Individual' | 'Partner'; + +/** + * Defines values for AccountType. + * Possible values include: 'Enterprise', 'Individual', 'Partner' + * @readonly + * @enum {string} + */ +export type AccountType = 'Enterprise' | 'Individual' | 'Partner'; + +/** + * Defines values for InvoiceStatus. + * Possible values include: 'Due', 'OverDue', 'Paid' + * @readonly + * @enum {string} + */ +export type InvoiceStatus = 'Due' | 'OverDue' | 'Paid'; + +/** + * Defines values for DocumentType. + * Possible values include: 'Invoice', 'VoidNote', 'TaxReceipt', 'CreditNote' + * @readonly + * @enum {string} + */ +export type DocumentType = 'Invoice' | 'VoidNote' | 'TaxReceipt' | 'CreditNote'; + +/** + * Defines values for PaymentMethodFamily. + * Possible values include: 'Credits', 'CheckWire', 'CreditCard', 'None' + * @readonly + * @enum {string} + */ +export type PaymentMethodFamily = 'Credits' | 'CheckWire' | 'CreditCard' | 'None'; + +/** + * 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 PaymentMethodType. + * Possible values include: 'Credits', 'ChequeWire' + * @readonly + * @enum {string} + */ +export type PaymentMethodType = 'Credits' | 'ChequeWire'; + +/** + * Defines values for UpdateAutoRenew. + * Possible values include: 'true', 'false' + * @readonly + * @enum {string} + */ +export type UpdateAutoRenew = 'true' | 'false'; + +/** + * 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 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 listByBillingAccount operation. + */ +export type PaymentMethodsListByBillingAccountResponse = PaymentMethodsListResult & { + /** + * 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: PaymentMethodsListResult; + }; +}; + +/** + * Contains response data for the listByBillingProfile operation. + */ +export type PaymentMethodsListByBillingProfileResponse = PaymentMethodsListResult & { + /** + * 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: PaymentMethodsListResult; + }; +}; + +/** + * Contains response data for the listByBillingAccountNext operation. + */ +export type PaymentMethodsListByBillingAccountNextResponse = PaymentMethodsListResult & { + /** + * 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: PaymentMethodsListResult; + }; +}; + +/** + * Contains response data for the listByBillingProfileNext operation. + */ +export type PaymentMethodsListByBillingProfileNextResponse = PaymentMethodsListResult & { + /** + * 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: PaymentMethodsListResult; + }; +}; + +/** + * 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 getByBillingProfile operation. + */ +export type AvailableBalancesGetByBillingProfileResponse = 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 create operation. + */ +export type BillingProfilesCreateResponse = BillingProfile & BillingProfilesCreateHeaders & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: BillingProfilesCreateHeaders; + + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingProfile; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type BillingProfilesUpdateResponse = BillingProfile & BillingProfilesUpdateHeaders & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: BillingProfilesUpdateHeaders; + + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingProfile; + }; +}; + +/** + * 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 create operation. + */ +export type InvoiceSectionsCreateResponse = InvoiceSection & InvoiceSectionsCreateHeaders & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: InvoiceSectionsCreateHeaders; + + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: InvoiceSection; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type InvoiceSectionsUpdateResponse = InvoiceSection & InvoiceSectionsUpdateHeaders & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: InvoiceSectionsUpdateHeaders; + + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: InvoiceSection; + }; +}; + +/** + * 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 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 getByCustomer operation. + */ +export type BillingSubscriptionsGetByCustomerResponse = 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 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 transfer operation. + */ +export type BillingSubscriptionsTransferResponse = TransferBillingSubscriptionResult & BillingSubscriptionsTransferHeaders & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: BillingSubscriptionsTransferHeaders; + + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: TransferBillingSubscriptionResult; + }; +}; + +/** + * Contains response data for the validateTransfer operation. + */ +export type BillingSubscriptionsValidateTransferResponse = 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 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 getByCustomer operation. + */ +export type ProductsGetByCustomerResponse = 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 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 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 transfer operation. + */ +export type ProductsTransferResponse = Product & ProductsTransferHeaders & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: ProductsTransferHeaders; + + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Product; + }; +}; + +/** + * Contains response data for the validateTransfer operation. + */ +export type ProductsValidateTransferResponse = 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 updateAutoRenewByInvoiceSection operation. + */ +export type ProductsUpdateAutoRenewByInvoiceSectionResponse = UpdateAutoRenewOperation & { + /** + * 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: UpdateAutoRenewOperation; + }; +}; + +/** + * 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 listByCustomer operation. + */ +export type TransactionsListByCustomerResponse = 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 listByBillingAccount operation. + */ +export type TransactionsListByBillingAccountResponse = 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 listByBillingProfile operation. + */ +export type TransactionsListByBillingProfileResponse = 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 listByInvoiceSection operation. + */ +export type TransactionsListByInvoiceSectionResponse = 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 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 get operation. + */ +export type TransactionsGetResponse = Transaction & { + /** + * 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: Transaction; + }; +}; + +/** + * Contains response data for the listByCustomerNext operation. + */ +export type TransactionsListByCustomerNextResponse = 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 listByBillingAccountNext operation. + */ +export type TransactionsListByBillingAccountNextResponse = 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 listByBillingAccountName operation. + */ +export type DepartmentsListByBillingAccountNameResponse = DepartmentListResult & { + /** + * 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: DepartmentListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type DepartmentsGetResponse = Department & { + /** + * 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: Department; + }; +}; + +/** + * Contains response data for the listByBillingAccountName operation. + */ +export type EnrollmentAccountsListByBillingAccountNameResponse = EnrollmentAccountListResult & { + /** + * 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: EnrollmentAccountListResult; + }; +}; + +/** + * Contains response data for the getByEnrollmentAccountId operation. + */ +export type EnrollmentAccountsGetByEnrollmentAccountIdResponse = EnrollmentAccount & { + /** + * 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: EnrollmentAccount; + }; +}; + +/** + * 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 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 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 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 download operation. + */ +export type PriceSheetDownloadResponse = DownloadUrl & PriceSheetDownloadHeaders & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: PriceSheetDownloadHeaders; + + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: DownloadUrl; + }; +}; + +/** + * Contains response data for the downloadByBillingProfile operation. + */ +export type PriceSheetDownloadByBillingProfileResponse = DownloadUrl & PriceSheetDownloadByBillingProfileHeaders & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: PriceSheetDownloadByBillingProfileHeaders; + + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: DownloadUrl; + }; +}; + +/** + * 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 initiate operation. + */ +export type TransfersInitiateResponse = TransferDetails & { + /** + * 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: TransferDetails; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type TransfersGetResponse = TransferDetails & { + /** + * 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: TransferDetails; + }; +}; + +/** + * Contains response data for the cancel operation. + */ +export type TransfersCancelResponse = TransferDetails & { + /** + * 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: TransferDetails; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type TransfersListResponse = TransferDetailsListResult & { + /** + * 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: TransferDetailsListResult; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type TransfersListNextResponse = TransferDetailsListResult & { + /** + * 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: TransferDetailsListResult; + }; +}; + +/** + * Contains response data for the initiate operation. + */ +export type PartnerTransfersInitiateResponse = TransferDetails & { + /** + * 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: TransferDetails; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type PartnerTransfersGetResponse = TransferDetails & { + /** + * 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: TransferDetails; + }; +}; + +/** + * Contains response data for the cancel operation. + */ +export type PartnerTransfersCancelResponse = TransferDetails & { + /** + * 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: TransferDetails; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type PartnerTransfersListResponse = TransferDetailsListResult & { + /** + * 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: TransferDetailsListResult; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type PartnerTransfersListNextResponse = TransferDetailsListResult & { + /** + * 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: TransferDetailsListResult; + }; +}; + +/** + * Contains response data for the accept operation. + */ +export type RecipientTransfersAcceptResponse = RecipientTransferDetails & { + /** + * 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: RecipientTransferDetails; + }; +}; + +/** + * Contains response data for the validate operation. + */ +export type RecipientTransfersValidateResponse = ValidateTransferListResponse & { + /** + * 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: ValidateTransferListResponse; + }; +}; + +/** + * Contains response data for the decline operation. + */ +export type RecipientTransfersDeclineResponse = RecipientTransferDetails & { + /** + * 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: RecipientTransferDetails; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type RecipientTransfersGetResponse = RecipientTransferDetails & { + /** + * 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: RecipientTransferDetails; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type RecipientTransfersListResponse = RecipientTransferDetailsListResult & { + /** + * 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: RecipientTransferDetailsListResult; + }; +}; + +/** + * Contains response data for the listNext operation. */ -export interface ErrorResponse { +export type RecipientTransfersListNextResponse = RecipientTransferDetailsListResult & { /** - * @member {ErrorDetails} [error] The details of the error. + * The underlying HTTP response. */ - error?: ErrorDetails; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: RecipientTransferDetailsListResult; + }; +}; /** - * @interface - * An interface representing Invoice. - * An invoice resource can be used download a PDF version of an invoice. - * - * @extends Resource + * Contains response data for the list 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 OperationsListResponse = OperationListResult & { /** - * @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: OperationListResult; + }; +}; /** - * @interface - * An interface representing OperationDisplay. - * The object that represents the operation. - * + * Contains response data for the listNext 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 OperationsListNextResponse = OperationListResult & { /** - * @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: OperationListResult; + }; +}; /** - * @interface - * An interface representing Operation. - * A Billing REST API operation. - * + * Contains response data for the getByBillingAccount 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 BillingRoleDefinitionsGetByBillingAccountResponse = BillingRoleDefinition & { /** - * @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: BillingRoleDefinition; + }; +}; /** - * @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 BillingRoleDefinitionsGetByInvoiceSectionResponse = BillingRoleDefinition & { /** - * @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: BillingRoleDefinition; + }; +}; /** - * @interface - * An interface representing InvoicesListOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * Contains response data for the getByBillingProfile 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; - /** - * @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 BillingRoleDefinitionsGetByBillingProfileResponse = BillingRoleDefinition & { /** - * @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: BillingRoleDefinition; + }; +}; /** - * @interface - * An interface representing BillingManagementClientOptions. - * @extends AzureServiceClientOptions + * Contains response data for the listByBillingAccount operation. */ -export interface BillingManagementClientOptions extends AzureServiceClientOptions { +export type BillingRoleDefinitionsListByBillingAccountResponse = BillingRoleDefinitionListResult & { /** - * @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: BillingRoleDefinitionListResult; + }; +}; /** - * @interface - * An interface representing the EnrollmentAccountListResult. - * Result of listing enrollment accounts. - * - * @extends Array + * Contains response data for the listByInvoiceSection operation. */ -export interface EnrollmentAccountListResult extends Array { +export type BillingRoleDefinitionsListByInvoiceSectionResponse = BillingRoleDefinitionListResult & { /** - * @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: BillingRoleDefinitionListResult; + }; +}; /** - * @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 listByBillingProfile operation. */ -export interface BillingPeriodsListResult extends Array { +export type BillingRoleDefinitionsListByBillingProfileResponse = BillingRoleDefinitionListResult & { /** - * @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: BillingRoleDefinitionListResult; + }; +}; /** - * @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 getByBillingAccount operation. */ -export interface InvoicesListResult extends Array { +export type BillingRoleAssignmentsGetByBillingAccountResponse = 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 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 deleteByBillingAccount operation. */ -export interface OperationListResult extends Array { +export type BillingRoleAssignmentsDeleteByBillingAccountResponse = BillingRoleAssignment & { /** - * @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: BillingRoleAssignment; + }; +}; /** - * Contains response data for the list operation. + * Contains response data for the getByInvoiceSection operation. */ -export type EnrollmentAccountsListResponse = EnrollmentAccountListResult & { +export type BillingRoleAssignmentsGetByInvoiceSectionResponse = BillingRoleAssignment & { /** * The underlying HTTP response. */ @@ -396,17 +4948,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: BillingRoleAssignment; }; }; /** - * Contains response data for the get operation. + * Contains response data for the deleteByInvoiceSection operation. */ -export type EnrollmentAccountsGetResponse = EnrollmentAccount & { +export type BillingRoleAssignmentsDeleteByInvoiceSectionResponse = BillingRoleAssignment & { /** * The underlying HTTP response. */ @@ -415,17 +4968,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: BillingRoleAssignment; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the getByBillingProfile operation. */ -export type EnrollmentAccountsListNextResponse = EnrollmentAccountListResult & { +export type BillingRoleAssignmentsGetByBillingProfileResponse = BillingRoleAssignment & { /** * The underlying HTTP response. */ @@ -434,17 +4988,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: BillingRoleAssignment; }; }; /** - * Contains response data for the list operation. + * Contains response data for the deleteByBillingProfile operation. */ -export type BillingPeriodsListResponse = BillingPeriodsListResult & { +export type BillingRoleAssignmentsDeleteByBillingProfileResponse = BillingRoleAssignment & { /** * The underlying HTTP response. */ @@ -453,17 +5008,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: BillingRoleAssignment; }; }; /** - * Contains response data for the get operation. + * Contains response data for the listByBillingAccount operation. */ -export type BillingPeriodsGetResponse = BillingPeriod & { +export type BillingRoleAssignmentsListByBillingAccountResponse = BillingRoleAssignmentListResult & { /** * The underlying HTTP response. */ @@ -472,17 +5028,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: BillingRoleAssignmentListResult; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the addByBillingAccount operation. */ -export type BillingPeriodsListNextResponse = BillingPeriodsListResult & { +export type BillingRoleAssignmentsAddByBillingAccountResponse = BillingRoleAssignmentListResult & { /** * The underlying HTTP response. */ @@ -491,17 +5048,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: BillingRoleAssignmentListResult; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listByInvoiceSection operation. */ -export type InvoicesListResponse = InvoicesListResult & { +export type BillingRoleAssignmentsListByInvoiceSectionResponse = BillingRoleAssignmentListResult & { /** * The underlying HTTP response. */ @@ -510,17 +5068,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: BillingRoleAssignmentListResult; }; }; /** - * Contains response data for the get operation. + * Contains response data for the addByInvoiceSection operation. */ -export type InvoicesGetResponse = Invoice & { +export type BillingRoleAssignmentsAddByInvoiceSectionResponse = BillingRoleAssignmentListResult & { /** * The underlying HTTP response. */ @@ -529,17 +5088,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: BillingRoleAssignmentListResult; }; }; /** - * Contains response data for the getLatest operation. + * Contains response data for the listByBillingProfile operation. */ -export type InvoicesGetLatestResponse = Invoice & { +export type BillingRoleAssignmentsListByBillingProfileResponse = BillingRoleAssignmentListResult & { /** * The underlying HTTP response. */ @@ -548,17 +5108,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: BillingRoleAssignmentListResult; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the addByBillingProfile operation. */ -export type InvoicesListNextResponse = InvoicesListResult & { +export type BillingRoleAssignmentsAddByBillingProfileResponse = BillingRoleAssignmentListResult & { /** * The underlying HTTP response. */ @@ -567,17 +5128,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: BillingRoleAssignmentListResult; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listByBillingAccount operation. */ -export type OperationsListResponse = OperationListResult & { +export type AgreementsListByBillingAccountResponse = AgreementListResult & { /** * The underlying HTTP response. */ @@ -586,17 +5148,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: AgreementListResult; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the get operation. */ -export type OperationsListNextResponse = OperationListResult & { +export type AgreementsGetResponse = Agreement & { /** * The underlying HTTP response. */ @@ -605,9 +5168,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: Agreement; }; }; 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..2e51d5ee6a41 --- /dev/null +++ b/sdk/billing/arm-billing/src/models/instructionsMappers.ts @@ -0,0 +1,44 @@ +/* + * 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, + BillingPermissionsProperties, + BillingProfile, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscription, + Customer, + CustomerPolicy, + Department, + Document, + Enrollment, + EnrollmentAccount, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + Instruction, + InstructionListResult, + Invoice, + InvoiceSection, + Participants, + PaymentMethod, + 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..a9c5abce3146 --- /dev/null +++ b/sdk/billing/arm-billing/src/models/invoiceSectionsMappers.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, + BillingPermissionsProperties, + BillingProfile, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscription, + Customer, + CustomerPolicy, + Department, + Document, + Enrollment, + EnrollmentAccount, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + Instruction, + Invoice, + InvoiceSection, + InvoiceSectionCreationRequest, + InvoiceSectionListResult, + InvoiceSectionsCreateHeaders, + InvoiceSectionsUpdateHeaders, + Participants, + PaymentMethod, + 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..76ee55335ab2 100644 --- a/sdk/billing/arm-billing/src/models/invoicesMappers.ts +++ b/sdk/billing/arm-billing/src/models/invoicesMappers.ts @@ -1,22 +1,44 @@ /* * 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, - DownloadUrl, - ErrorResponse, - ErrorDetails, + BillingAccount, + BillingPermissionsProperties, + BillingProfile, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscription, + Customer, + CustomerPolicy, + Department, + Document, + Enrollment, EnrollmentAccount, - BillingPeriod + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + Instruction, + Invoice, + InvoiceListResult, + InvoiceSection, + Participants, + PaymentMethod, + 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..913dd3bd158d 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,29 +12,3209 @@ 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: { name: "Composite", - className: "Resource", + className: "Resource", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const Customer: msRest.CompositeMapper = { + serializedName: "Customer", + type: { + name: "Composite", + className: "Customer", + modelProperties: { + ...Resource.type.modelProperties, + 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 InitiateTransferRequest: msRest.CompositeMapper = { + serializedName: "InitiateTransferRequest", + type: { + name: "Composite", + className: "InitiateTransferRequest", + modelProperties: { + recipientEmailId: { + serializedName: "properties.recipientEmailId", + type: { + name: "String" + } + }, + resellerId: { + serializedName: "properties.resellerId", + type: { + name: "String" + } + } + } + } +}; + +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: { + serializedName: "addressLine1", + type: { + name: "String" + } + }, + addressLine2: { + serializedName: "addressLine2", + type: { + name: "String" + } + }, + addressLine3: { + serializedName: "addressLine3", + type: { + name: "String" + } + }, + city: { + serializedName: "city", + type: { + name: "String" + } + }, + region: { + serializedName: "region", + type: { + name: "String" + } + }, + country: { + serializedName: "country", + type: { + name: "String" + } + }, + postalCode: { + serializedName: "postalCode", + 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 ProductDetails: msRest.CompositeMapper = { + serializedName: "ProductDetails", + type: { + name: "Composite", + className: "ProductDetails", + modelProperties: { + productType: { + serializedName: "productType", + type: { + name: "String" + } + }, + productId: { + serializedName: "productId", + type: { + name: "String" + } + } + } + } +}; + +export const AcceptTransferRequest: msRest.CompositeMapper = { + serializedName: "AcceptTransferRequest", + type: { + name: "Composite", + className: "AcceptTransferRequest", + modelProperties: { + productDetails: { + serializedName: "properties.productDetails", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ProductDetails" + } + } + } + } + } + } +}; + +export const ErrorModel: msRest.CompositeMapper = { + serializedName: "Error", + type: { + name: "Composite", + className: "ErrorModel", + modelProperties: { + errorCode: { + readOnly: true, + serializedName: "errorCode", + type: { + name: "String" + } + }, + errorMessage: { + readOnly: true, + serializedName: "errorMessage", + type: { + name: "String" + } + } + } + } +}; + +export const DetailedTransferStatus: msRest.CompositeMapper = { + serializedName: "DetailedTransferStatus", + type: { + name: "Composite", + className: "DetailedTransferStatus", + modelProperties: { + productType: { + readOnly: true, + serializedName: "productType", + type: { + name: "String" + } + }, + productId: { + readOnly: true, + serializedName: "productId", + type: { + name: "String" + } + }, + transferStatus: { + readOnly: true, + serializedName: "transferStatus", + type: { + name: "String" + } + }, + errorDetails: { + serializedName: "errorDetails", + type: { + name: "Composite", + className: "ErrorModel" + } + } + } + } +}; + +export const TransferDetails: msRest.CompositeMapper = { + serializedName: "TransferDetails", + type: { + name: "Composite", + className: "TransferDetails", + modelProperties: { + creationTime: { + readOnly: true, + serializedName: "properties.creationTime", + type: { + name: "DateTime" + } + }, + expirationTime: { + readOnly: true, + serializedName: "properties.expirationTime", + type: { + name: "DateTime" + } + }, + invoiceSectionId: { + readOnly: true, + serializedName: "properties.invoiceSectionId", + type: { + name: "String" + } + }, + billingAccountId: { + readOnly: true, + serializedName: "properties.billingAccountId", + type: { + name: "String" + } + }, + resellerId: { + readOnly: true, + serializedName: "properties.resellerId", + type: { + name: "String" + } + }, + resellerName: { + readOnly: true, + serializedName: "properties.resellerName", + type: { + name: "String" + } + }, + initiatorCustomerType: { + readOnly: true, + serializedName: "properties.initiatorCustomerType", + type: { + name: "String" + } + }, + billingProfileId: { + readOnly: true, + serializedName: "properties.billingProfileId", + type: { + name: "String" + } + }, + transferStatus: { + readOnly: true, + serializedName: "properties.transferStatus", + type: { + name: "String" + } + }, + recipientEmailId: { + readOnly: true, + serializedName: "properties.recipientEmailId", + type: { + name: "String" + } + }, + initiatorEmailId: { + readOnly: true, + serializedName: "properties.initiatorEmailId", + type: { + name: "String" + } + }, + canceledBy: { + readOnly: true, + serializedName: "properties.canceledBy", + type: { + name: "String" + } + }, + lastModifiedTime: { + readOnly: true, + serializedName: "properties.lastModifiedTime", + type: { + name: "DateTime" + } + }, + detailedTransferStatus: { + readOnly: true, + serializedName: "properties.detailedTransferStatus", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DetailedTransferStatus" + } + } + } + } + } + } +}; + +export const RecipientTransferDetails: msRest.CompositeMapper = { + serializedName: "RecipientTransferDetails", + type: { + name: "Composite", + className: "RecipientTransferDetails", + modelProperties: { + creationTime: { + readOnly: true, + serializedName: "properties.creationTime", + type: { + name: "DateTime" + } + }, + expirationTime: { + readOnly: true, + serializedName: "properties.expirationTime", + type: { + name: "DateTime" + } + }, + allowedProductType: { + readOnly: true, + serializedName: "properties.allowedProductType", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + transferStatus: { + readOnly: true, + serializedName: "properties.transferStatus", + type: { + name: "String" + } + }, + recipientEmailId: { + readOnly: true, + serializedName: "properties.recipientEmailId", + type: { + name: "String" + } + }, + initiatorEmailId: { + readOnly: true, + serializedName: "properties.initiatorEmailId", + type: { + name: "String" + } + }, + resellerId: { + readOnly: true, + serializedName: "properties.resellerId", + type: { + name: "String" + } + }, + resellerName: { + readOnly: true, + serializedName: "properties.resellerName", + type: { + name: "String" + } + }, + initiatorCustomerType: { + readOnly: true, + serializedName: "properties.initiatorCustomerType", + type: { + name: "String" + } + }, + canceledBy: { + readOnly: true, + serializedName: "properties.canceledBy", + type: { + name: "String" + } + }, + lastModifiedTime: { + readOnly: true, + serializedName: "properties.lastModifiedTime", + type: { + name: "DateTime" + } + }, + detailedTransferStatus: { + readOnly: true, + serializedName: "properties.detailedTransferStatus", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DetailedTransferStatus" + } + } + } + } + } + } +}; + +export const TransferProductRequestProperties: msRest.CompositeMapper = { + serializedName: "TransferProductRequestProperties", + type: { + name: "Composite", + className: "TransferProductRequestProperties", + modelProperties: { + destinationInvoiceSectionId: { + serializedName: "destinationInvoiceSectionId", + type: { + name: "String" + } + }, + destinationBillingProfileId: { + serializedName: "destinationBillingProfileId", + type: { + name: "String" + } + } + } + } +}; + +export const TransferBillingSubscriptionResult: msRest.CompositeMapper = { + serializedName: "TransferBillingSubscriptionResult", + type: { + name: "Composite", + className: "TransferBillingSubscriptionResult", + modelProperties: { + billingSubscriptionName: { + serializedName: "properties.billingSubscriptionName", + type: { + name: "String" + } + } + } + } +}; + +export const TransferBillingSubscriptionRequestProperties: msRest.CompositeMapper = { + serializedName: "TransferBillingSubscriptionRequestProperties", + type: { + name: "Composite", + className: "TransferBillingSubscriptionRequestProperties", + modelProperties: { + destinationInvoiceSectionId: { + serializedName: "destinationInvoiceSectionId", + type: { + name: "String" + } + }, + destinationBillingProfileId: { + serializedName: "destinationBillingProfileId", + type: { + name: "String" + } + } + } + } +}; + +export const TransferBillingSubscriptionRequest: msRest.CompositeMapper = { + serializedName: "TransferBillingSubscriptionRequest", + type: { + name: "Composite", + className: "TransferBillingSubscriptionRequest", + modelProperties: { + destinationInvoiceSectionId: { + serializedName: "properties.destinationInvoiceSectionId", + type: { + name: "String" + } + }, + destinationBillingProfileId: { + serializedName: "properties.destinationBillingProfileId", + 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: { + isTransferEligible: { + readOnly: true, + serializedName: "isTransferEligible", + type: { + name: "Boolean" + } + }, + errorDetails: { + serializedName: "errorDetails", + type: { + name: "Composite", + className: "ValidateSubscriptionTransferEligibilityError" + } + } + } + } +}; + +export const UpdateAutoRenewOperation: msRest.CompositeMapper = { + serializedName: "UpdateAutoRenewOperation", + type: { + name: "Composite", + className: "UpdateAutoRenewOperation", + modelProperties: { + endDate: { + serializedName: "properties.endDate", + type: { + name: "DateTime" + } + } + } + } +}; + +export const InvoiceSection: msRest.CompositeMapper = { + serializedName: "InvoiceSection", + type: { + name: "Composite", + className: "InvoiceSection", + modelProperties: { + ...Resource.type.modelProperties, + displayName: { + serializedName: "properties.displayName", + type: { + name: "String" + } + } + } + } +}; + +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" + } + }, + address: { + serializedName: "properties.address", + type: { + name: "Composite", + className: "AddressDetails" + } + }, + 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: "Sequence", + element: { + type: { + name: "Composite", + className: "InvoiceSection" + } + } + } + }, + status: { + readOnly: true, + serializedName: "properties.status", + type: { + name: "Object" + } + }, + statusReasonCode: { + readOnly: true, + serializedName: "properties.statusReasonCode", + type: { + name: "Object" + } + }, + spendingLimit: { + readOnly: true, + serializedName: "properties.spendingLimit", + type: { + name: "Object" + } + } + } + } +}; + +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: { + readOnly: true, + serializedName: "properties.displayName", + type: { + name: "String" + } + }, + address: { + serializedName: "properties.address", + type: { + name: "Composite", + className: "AddressDetails" + } + }, + agreementType: { + readOnly: true, + serializedName: "properties.agreementType", + type: { + name: "String" + } + }, + customerType: { + readOnly: true, + serializedName: "properties.customerType", + type: { + name: "String" + } + }, + accountType: { + readOnly: true, + serializedName: "properties.accountType", + type: { + name: "String" + } + }, + billingProfiles: { + serializedName: "properties.billingProfiles", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BillingProfile" + } + } + } + }, + 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" + } + } + } + }, + organizationId: { + readOnly: true, + serializedName: "properties.organizationId", + type: { + name: "String" + } + } + } + } +}; + +export const BillingAccountListResult: msRest.CompositeMapper = { + serializedName: "BillingAccountListResult", + type: { + name: "Composite", + className: "BillingAccountListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BillingAccount" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const BillingAccountUpdateRequest: msRest.CompositeMapper = { + serializedName: "BillingAccountUpdateRequest", + type: { + name: "Composite", + className: "BillingAccountUpdateRequest", + modelProperties: { + displayName: { + readOnly: true, + serializedName: "properties.displayName", + type: { + name: "String" + } + }, + address: { + serializedName: "properties.address", + type: { + name: "Composite", + className: "AddressDetails" + } + }, + agreementType: { + readOnly: true, + serializedName: "properties.agreementType", + type: { + name: "String" + } + }, + customerType: { + readOnly: true, + serializedName: "properties.customerType", + type: { + name: "String" + } + }, + accountType: { + readOnly: true, + serializedName: "properties.accountType", + type: { + name: "String" + } + }, + billingProfiles: { + serializedName: "properties.billingProfiles", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BillingProfile" + } + } + } + }, + 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" + } + } + } + }, + organizationId: { + readOnly: true, + serializedName: "properties.organizationId", + type: { + name: "String" + } + } + } + } +}; + +export const BillingProperty: msRest.CompositeMapper = { + serializedName: "BillingProperty", + type: { + name: "Composite", + className: "BillingProperty", + modelProperties: { + ...Resource.type.modelProperties, + 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: "Object" + } + }, + billingProfileStatusReasonCode: { + readOnly: true, + serializedName: "properties.billingProfileStatusReasonCode", + type: { + name: "Object" + } + }, + billingProfileSpendingLimit: { + readOnly: true, + serializedName: "properties.billingProfileSpendingLimit", + type: { + name: "Object" + } + }, + costCenter: { + readOnly: true, + serializedName: "properties.costCenter", + type: { + name: "String" + } + }, + invoiceSectionId: { + readOnly: true, + serializedName: "properties.invoiceSectionId", + type: { + name: "String" + } + }, + invoiceSectionDisplayName: { + readOnly: true, + serializedName: "properties.invoiceSectionDisplayName", + type: { + name: "String" + } + }, + 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 DepartmentListResult: msRest.CompositeMapper = { + serializedName: "DepartmentListResult", + type: { + name: "Composite", + className: "DepartmentListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Department" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const EnrollmentAccountListResult: msRest.CompositeMapper = { + serializedName: "EnrollmentAccountListResult", + type: { + name: "Composite", + className: "EnrollmentAccountListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EnrollmentAccount" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + 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 BillingProfileListResult: msRest.CompositeMapper = { + serializedName: "BillingProfileListResult", + type: { + name: "Composite", + className: "BillingProfileListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BillingProfile" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +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" + } + }, + address: { + serializedName: "address", + 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 InvoiceSectionListResult: msRest.CompositeMapper = { + serializedName: "InvoiceSectionListResult", + type: { + name: "Composite", + className: "InvoiceSectionListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "InvoiceSection" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + 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" + } + }, + billingProfileId: { + readOnly: true, + serializedName: "billingProfileId", + type: { + name: "String" + } + }, + billingProfileDisplayName: { + readOnly: true, + serializedName: "billingProfileDisplayName", + type: { + name: "String" + } + }, + billingProfileStatus: { + readOnly: true, + serializedName: "billingProfileStatus", + type: { + name: "Object" + } + }, + billingProfileStatusReasonCode: { + readOnly: true, + serializedName: "billingProfileStatusReasonCode", + type: { + name: "Object" + } + }, + billingProfileSpendingLimit: { + readOnly: true, + serializedName: "billingProfileSpendingLimit", + type: { + name: "Object" + } + }, + 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" + } + } + } + } +}; + +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" + } + }, + billedAmount: { + readOnly: true, + serializedName: "properties.billedAmount", + 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: "Object" + } + }, + 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, + 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" + } + }, + parentProductId: { + readOnly: true, + serializedName: "properties.parentProductId", + 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: { + isTransferEligible: { + readOnly: true, + serializedName: "isTransferEligible", + 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" + } + }, + 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" + } + }, + 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" + } + }, + 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 PaymentMethod: msRest.CompositeMapper = { + serializedName: "PaymentMethod", + type: { + name: "Composite", + className: "PaymentMethod", + modelProperties: { + ...Resource.type.modelProperties, + paymentMethodType: { + serializedName: "properties.paymentMethodType", + type: { + name: "String" + } + }, + details: { + readOnly: true, + serializedName: "properties.details", + type: { + name: "String" + } + }, + expiration: { + readOnly: true, + serializedName: "properties.expiration", + type: { + name: "String" + } + }, + currency: { + readOnly: true, + serializedName: "properties.currency", + type: { + name: "String" + } + } + } + } +}; + +export const UpdateAutoRenewRequest: msRest.CompositeMapper = { + serializedName: "UpdateAutoRenewRequest", + type: { + name: "Composite", + className: "UpdateAutoRenewRequest", + modelProperties: { + autoRenew: { + serializedName: "autoRenew", + type: { + name: "String" + } + } + } + } +}; + +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 BillingRoleAssignmentPayload: msRest.CompositeMapper = { + serializedName: "BillingRoleAssignmentPayload", + type: { + name: "Composite", + className: "BillingRoleAssignmentPayload", + modelProperties: { + principalId: { + serializedName: "principalId", + type: { + name: "String" + } + }, + billingRoleDefinitionId: { + serializedName: "billingRoleDefinitionId", + type: { + name: "String" + } + } + } + } +}; + +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" + } + }, + billingRoleAssignmentName: { + readOnly: true, + serializedName: "properties.name", + type: { + name: "String" + } + }, + principalId: { + readOnly: true, + serializedName: "properties.principalId", + type: { + name: "String" + } + }, + roleDefinitionName: { + readOnly: true, + serializedName: "properties.roleDefinitionName", + type: { + name: "String" + } + }, + scope: { + readOnly: true, + serializedName: "properties.scope", + type: { + name: "String" + } + } + } + } +}; + +export const BillingRoleAssignmentListResult: msRest.CompositeMapper = { + serializedName: "BillingRoleAssignmentListResult", + type: { + name: "Composite", + className: "BillingRoleAssignmentListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BillingRoleAssignment" + } + } + } + } + } + } +}; + +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 BillingRoleDefinitionListResult: msRest.CompositeMapper = { + serializedName: "BillingRoleDefinitionListResult", + type: { + name: "Composite", + className: "BillingRoleDefinitionListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BillingRoleDefinition" + } + } + } + } + } + } +}; + +export const BillingPermissionsListResult: msRest.CompositeMapper = { + serializedName: "BillingPermissionsListResult", + type: { + name: "Composite", + className: "BillingPermissionsListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BillingPermissionsProperties" + } + } + } + } + } + } +}; + +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" + } + }, + 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 AgreementListResult: msRest.CompositeMapper = { + serializedName: "AgreementListResult", + type: { + name: "Composite", + className: "AgreementListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Agreement" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ValidationResultProperties: msRest.CompositeMapper = { + serializedName: "ValidationResultProperties", + type: { + name: "Composite", + className: "ValidationResultProperties", + modelProperties: { + level: { + readOnly: true, + serializedName: "level", + type: { + name: "String" + } + }, + code: { + readOnly: true, + serializedName: "code", + type: { + name: "String" + } + }, + message: { + readOnly: true, + serializedName: "message", + type: { + name: "String" + } + } + } + } +}; + +export const ValidateTransferResponse: msRest.CompositeMapper = { + serializedName: "ValidateTransferResponse", + type: { + name: "Composite", + className: "ValidateTransferResponse", + modelProperties: { + status: { + readOnly: true, + serializedName: "properties.status", + type: { + name: "String" + } + }, + productId: { + readOnly: true, + serializedName: "properties.productId", + type: { + name: "String" + } + }, + results: { + serializedName: "properties.results", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ValidationResultProperties" + } + } + } + } + } + } +}; + +export const ValidateTransferListResponse: msRest.CompositeMapper = { + serializedName: "ValidateTransferListResponse", + type: { + name: "Composite", + className: "ValidateTransferListResponse", + modelProperties: { + value: { + readOnly: true, + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ValidateTransferResponse" + } + } + } + } + } + } +}; + +export const BillingProfilesCreateHeaders: msRest.CompositeMapper = { + serializedName: "billingprofiles-create-headers", + type: { + name: "Composite", + className: "BillingProfilesCreateHeaders", modelProperties: { - id: { - readOnly: true, - serializedName: "id", + location: { + serializedName: "location", type: { name: "String" } }, - name: { - readOnly: true, - serializedName: "name", + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number" + } + } + } + } +}; + +export const BillingProfilesUpdateHeaders: msRest.CompositeMapper = { + serializedName: "billingprofiles-update-headers", + type: { + name: "Composite", + className: "BillingProfilesUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", type: { name: "String" } }, - type: { - readOnly: true, - serializedName: "type", + retryAfter: { + serializedName: "retry-after", type: { name: "String" } @@ -45,77 +3223,98 @@ export const Resource: msRest.CompositeMapper = { } }; -export const EnrollmentAccount: msRest.CompositeMapper = { - serializedName: "EnrollmentAccount", +export const InvoiceSectionsCreateHeaders: msRest.CompositeMapper = { + serializedName: "invoicesections-create-headers", type: { name: "Composite", - className: "EnrollmentAccount", + className: "InvoiceSectionsCreateHeaders", modelProperties: { - ...Resource.type.modelProperties, - principalName: { - readOnly: true, - serializedName: "properties.principalName", + location: { + serializedName: "location", type: { name: "String" } + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number" + } } } } }; -export const BillingPeriod: msRest.CompositeMapper = { - serializedName: "BillingPeriod", +export const InvoiceSectionsUpdateHeaders: msRest.CompositeMapper = { + serializedName: "invoicesections-update-headers", type: { name: "Composite", - className: "BillingPeriod", + className: "InvoiceSectionsUpdateHeaders", modelProperties: { - ...Resource.type.modelProperties, - billingPeriodStartDate: { - readOnly: true, - serializedName: "properties.billingPeriodStartDate", + location: { + serializedName: "location", type: { - name: "Date" + name: "String" } }, - billingPeriodEndDate: { - readOnly: true, - serializedName: "properties.billingPeriodEndDate", + retryAfter: { + serializedName: "retry-after", + type: { + name: "String" + } + } + } + } +}; + +export const PriceSheetDownloadHeaders: msRest.CompositeMapper = { + serializedName: "pricesheet-download-headers", + type: { + name: "Composite", + className: "PriceSheetDownloadHeaders", + modelProperties: { + location: { + serializedName: "location", type: { - name: "Date" + name: "String" } }, - invoiceIds: { - readOnly: true, - serializedName: "properties.invoiceIds", + retryAfter: { + serializedName: "retry-after", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" + } + }, + oDataEntityId: { + serializedName: "odata-entityid", + type: { + name: "String" } } } } }; -export const DownloadUrl: msRest.CompositeMapper = { - serializedName: "DownloadUrl", +export const PriceSheetDownloadByBillingProfileHeaders: msRest.CompositeMapper = { + serializedName: "pricesheet-downloadbybillingprofile-headers", type: { name: "Composite", - className: "DownloadUrl", + className: "PriceSheetDownloadByBillingProfileHeaders", modelProperties: { - expiryTime: { - readOnly: true, - serializedName: "expiryTime", + location: { + serializedName: "location", type: { - name: "DateTime" + name: "String" } }, - url: { - readOnly: true, - serializedName: "url", + retryAfter: { + serializedName: "retry-after", + type: { + name: "String" + } + }, + oDataEntityId: { + serializedName: "odata-entityid", type: { name: "String" } @@ -124,121 +3323,221 @@ export const DownloadUrl: msRest.CompositeMapper = { } }; -export const ErrorDetails: msRest.CompositeMapper = { - serializedName: "ErrorDetails", +export const BillingSubscriptionsTransferHeaders: msRest.CompositeMapper = { + serializedName: "billingsubscriptions-transfer-headers", type: { name: "Composite", - className: "ErrorDetails", + className: "BillingSubscriptionsTransferHeaders", modelProperties: { - code: { - readOnly: true, - serializedName: "code", + location: { + serializedName: "location", type: { name: "String" } }, - message: { - readOnly: true, - serializedName: "message", + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number" + } + } + } + } +}; + +export const ProductsTransferHeaders: msRest.CompositeMapper = { + serializedName: "products-transfer-headers", + type: { + name: "Composite", + className: "ProductsTransferHeaders", + modelProperties: { + location: { + serializedName: "location", type: { name: "String" } }, - target: { - readOnly: true, - serializedName: "target", + retryAfter: { + serializedName: "retry-after", type: { - name: "String" + name: "Number" } } } } }; -export const ErrorResponse: msRest.CompositeMapper = { - serializedName: "ErrorResponse", +export const InvoiceSectionListWithCreateSubPermissionResult: msRest.CompositeMapper = { + serializedName: "InvoiceSectionListWithCreateSubPermissionResult", type: { name: "Composite", - className: "ErrorResponse", + className: "InvoiceSectionListWithCreateSubPermissionResult", modelProperties: { - error: { - serializedName: "error", + value: { + serializedName: "", type: { - name: "Composite", - className: "ErrorDetails" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "InvoiceSectionWithCreateSubPermission" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" } } } } }; -export const Invoice: msRest.CompositeMapper = { - serializedName: "Invoice", +export const PaymentMethodsListResult: msRest.CompositeMapper = { + serializedName: "PaymentMethodsListResult", type: { name: "Composite", - className: "Invoice", + className: "PaymentMethodsListResult", modelProperties: { - ...Resource.type.modelProperties, - downloadUrl: { - serializedName: "properties.downloadUrl", + value: { + readOnly: true, + serializedName: "", type: { - name: "Composite", - className: "DownloadUrl" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PaymentMethod" + } + } } }, - invoicePeriodStartDate: { + nextLink: { readOnly: true, - serializedName: "properties.invoicePeriodStartDate", + serializedName: "nextLink", type: { - name: "Date" + name: "String" } - }, - invoicePeriodEndDate: { + } + } + } +}; + +export const InstructionListResult: msRest.CompositeMapper = { + serializedName: "InstructionListResult", + type: { + name: "Composite", + className: "InstructionListResult", + modelProperties: { + value: { readOnly: true, - serializedName: "properties.invoicePeriodEndDate", + serializedName: "", type: { - name: "Date" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Instruction" + } + } } }, - billingPeriodIds: { + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const CustomerListResult: msRest.CompositeMapper = { + serializedName: "CustomerListResult", + type: { + name: "Composite", + className: "CustomerListResult", + modelProperties: { + value: { readOnly: true, - serializedName: "properties.billingPeriodIds", + serializedName: "", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "Customer" } } } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } } } } }; -export const OperationDisplay: msRest.CompositeMapper = { - serializedName: "Operation_display", +export const BillingSubscriptionsListResult: msRest.CompositeMapper = { + serializedName: "BillingSubscriptionsListResult", type: { name: "Composite", - className: "OperationDisplay", + className: "BillingSubscriptionsListResult", modelProperties: { - provider: { + value: { readOnly: true, - serializedName: "provider", + serializedName: "", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BillingSubscription" + } + } } }, - resource: { + nextLink: { readOnly: true, - serializedName: "resource", + serializedName: "nextLink", type: { name: "String" } + } + } + } +}; + +export const ProductsListResult: msRest.CompositeMapper = { + serializedName: "ProductsListResult", + type: { + name: "Composite", + className: "ProductsListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Product" + } + } + } }, - operation: { + nextLink: { readOnly: true, - serializedName: "operation", + serializedName: "nextLink", type: { name: "String" } @@ -247,35 +3546,41 @@ export const OperationDisplay: msRest.CompositeMapper = { } }; -export const Operation: msRest.CompositeMapper = { - serializedName: "Operation", +export const TransactionListResult: msRest.CompositeMapper = { + serializedName: "TransactionListResult", type: { name: "Composite", - className: "Operation", + className: "TransactionListResult", modelProperties: { - name: { + value: { readOnly: true, - serializedName: "name", + serializedName: "", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Transaction" + } + } } }, - display: { - serializedName: "display", + nextLink: { + readOnly: true, + serializedName: "nextLink", type: { - name: "Composite", - className: "OperationDisplay" + name: "String" } } } } }; -export const EnrollmentAccountListResult: msRest.CompositeMapper = { - serializedName: "EnrollmentAccountListResult", +export const InvoiceListResult: msRest.CompositeMapper = { + serializedName: "InvoiceListResult", type: { name: "Composite", - className: "EnrollmentAccountListResult", + className: "InvoiceListResult", modelProperties: { value: { readOnly: true, @@ -285,7 +3590,7 @@ export const EnrollmentAccountListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "EnrollmentAccount" + className: "Invoice" } } } @@ -301,11 +3606,11 @@ export const EnrollmentAccountListResult: msRest.CompositeMapper = { } }; -export const BillingPeriodsListResult: msRest.CompositeMapper = { - serializedName: "BillingPeriodsListResult", +export const TransferDetailsListResult: msRest.CompositeMapper = { + serializedName: "TransferDetailsListResult", type: { name: "Composite", - className: "BillingPeriodsListResult", + className: "TransferDetailsListResult", modelProperties: { value: { readOnly: true, @@ -315,7 +3620,7 @@ export const BillingPeriodsListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "BillingPeriod" + className: "TransferDetails" } } } @@ -331,11 +3636,11 @@ export const BillingPeriodsListResult: msRest.CompositeMapper = { } }; -export const InvoicesListResult: msRest.CompositeMapper = { - serializedName: "InvoicesListResult", +export const RecipientTransferDetailsListResult: msRest.CompositeMapper = { + serializedName: "RecipientTransferDetailsListResult", type: { name: "Composite", - className: "InvoicesListResult", + className: "RecipientTransferDetailsListResult", modelProperties: { value: { readOnly: true, @@ -345,7 +3650,7 @@ export const InvoicesListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "Invoice" + className: "RecipientTransferDetails" } } } 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..00ef29d06bab 100644 --- a/sdk/billing/arm-billing/src/models/parameters.ts +++ b/sdk/billing/arm-billing/src/models/parameters.ts @@ -20,6 +20,16 @@ export const acceptLanguage: msRest.OperationParameter = { } } }; +export const agreementName: msRest.OperationURLParameter = { + parameterPath: "agreementName", + mapper: { + required: true, + serializedName: "agreementName", + type: { + name: "String" + } + } +}; export const apiVersion: msRest.OperationQueryParameter = { parameterPath: "apiVersion", mapper: { @@ -30,11 +40,81 @@ export const apiVersion: msRest.OperationQueryParameter = { } } }; -export const billingPeriodName: msRest.OperationURLParameter = { - parameterPath: "billingPeriodName", +export const billingAccountName: msRest.OperationURLParameter = { + parameterPath: "billingAccountName", + mapper: { + required: true, + serializedName: "billingAccountName", + type: { + name: "String" + } + } +}; +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 billingSubscriptionName: msRest.OperationURLParameter = { + parameterPath: "billingSubscriptionName", + mapper: { + required: true, + serializedName: "billingSubscriptionName", + type: { + name: "String" + } + } +}; +export const customerName: msRest.OperationURLParameter = { + parameterPath: "customerName", + mapper: { + required: true, + serializedName: "customerName", + type: { + name: "String" + } + } +}; +export const departmentName: msRest.OperationURLParameter = { + parameterPath: "departmentName", + mapper: { + required: true, + serializedName: "departmentName", + type: { + name: "String" + } + } +}; +export const enrollmentAccountName: msRest.OperationURLParameter = { + parameterPath: "enrollmentAccountName", mapper: { required: true, - serializedName: "billingPeriodName", + serializedName: "enrollmentAccountName", type: { name: "String" } @@ -64,6 +144,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,11 +164,11 @@ export const invoiceName: msRest.OperationURLParameter = { } } }; -export const name: msRest.OperationURLParameter = { - parameterPath: "name", +export const invoiceSectionName: msRest.OperationURLParameter = { + parameterPath: "invoiceSectionName", mapper: { required: true, - serializedName: "name", + serializedName: "invoiceSectionName", type: { name: "String" } @@ -95,6 +185,36 @@ 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 skiptoken: msRest.OperationQueryParameter = { parameterPath: [ "options", @@ -117,19 +237,23 @@ export const subscriptionId: msRest.OperationURLParameter = { } } }; -export const top: msRest.OperationQueryParameter = { - parameterPath: [ - "options", - "top" - ], +export const transactionName: msRest.OperationURLParameter = { + parameterPath: "transactionName", + mapper: { + required: true, + serializedName: "transactionName", + type: { + name: "String" + } + } +}; +export const transferName: msRest.OperationURLParameter = { + parameterPath: "transferName", mapper: { - serializedName: "$top", - constraints: { - InclusiveMaximum: 100, - InclusiveMinimum: 1 - }, + required: true, + serializedName: "transferName", type: { - name: "Number" + name: "String" } } }; diff --git a/sdk/billing/arm-billing/src/models/partnerTransfersMappers.ts b/sdk/billing/arm-billing/src/models/partnerTransfersMappers.ts new file mode 100644 index 000000000000..1c19df67c2a7 --- /dev/null +++ b/sdk/billing/arm-billing/src/models/partnerTransfersMappers.ts @@ -0,0 +1,17 @@ +/* + * 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 { + DetailedTransferStatus, + ErrorDetails, + ErrorModel, + ErrorResponse, + InitiateTransferRequest, + TransferDetails, + TransferDetailsListResult +} from "../models/mappers"; diff --git a/sdk/billing/arm-billing/src/models/paymentMethodsMappers.ts b/sdk/billing/arm-billing/src/models/paymentMethodsMappers.ts new file mode 100644 index 000000000000..7156d2567e9f --- /dev/null +++ b/sdk/billing/arm-billing/src/models/paymentMethodsMappers.ts @@ -0,0 +1,44 @@ +/* + * 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, + BillingPermissionsProperties, + BillingProfile, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscription, + Customer, + CustomerPolicy, + Department, + Document, + Enrollment, + EnrollmentAccount, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + Instruction, + Invoice, + InvoiceSection, + Participants, + PaymentMethod, + PaymentMethodsListResult, + PaymentProperties, + Policy, + Product, + Reseller, + Resource, + Transaction +} from "../models/mappers"; 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..b1364c7b1a1f --- /dev/null +++ b/sdk/billing/arm-billing/src/models/policiesMappers.ts @@ -0,0 +1,43 @@ +/* + * 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, + BillingPermissionsProperties, + BillingProfile, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscription, + Customer, + CustomerPolicy, + Department, + Document, + Enrollment, + EnrollmentAccount, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + Instruction, + Invoice, + InvoiceSection, + Participants, + PaymentMethod, + PaymentProperties, + Policy, + Product, + Reseller, + Resource, + Transaction +} from "../models/mappers"; diff --git a/sdk/billing/arm-billing/src/models/priceSheetMappers.ts b/sdk/billing/arm-billing/src/models/priceSheetMappers.ts new file mode 100644 index 000000000000..b65e9715197c --- /dev/null +++ b/sdk/billing/arm-billing/src/models/priceSheetMappers.ts @@ -0,0 +1,15 @@ +/* + * 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 { + DownloadUrl, + ErrorDetails, + ErrorResponse, + PriceSheetDownloadByBillingProfileHeaders, + PriceSheetDownloadHeaders +} 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..8ae29d5e88b1 --- /dev/null +++ b/sdk/billing/arm-billing/src/models/productsMappers.ts @@ -0,0 +1,50 @@ +/* + * 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, + BillingPermissionsProperties, + BillingProfile, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscription, + Customer, + CustomerPolicy, + Department, + Document, + Enrollment, + EnrollmentAccount, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + Instruction, + Invoice, + InvoiceSection, + Participants, + PaymentMethod, + PaymentProperties, + Policy, + Product, + ProductsListResult, + ProductsTransferHeaders, + Reseller, + Resource, + Transaction, + TransferProductRequestProperties, + UpdateAutoRenewOperation, + UpdateAutoRenewRequest, + ValidateProductTransferEligibilityError, + ValidateProductTransferEligibilityResult +} from "../models/mappers"; diff --git a/sdk/billing/arm-billing/src/models/recipientTransfersMappers.ts b/sdk/billing/arm-billing/src/models/recipientTransfersMappers.ts new file mode 100644 index 000000000000..59f43f2075b9 --- /dev/null +++ b/sdk/billing/arm-billing/src/models/recipientTransfersMappers.ts @@ -0,0 +1,21 @@ +/* + * 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 { + AcceptTransferRequest, + DetailedTransferStatus, + ErrorDetails, + ErrorModel, + ErrorResponse, + ProductDetails, + RecipientTransferDetails, + RecipientTransferDetailsListResult, + ValidateTransferListResponse, + ValidateTransferResponse, + ValidationResultProperties +} 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..639e6c8b22af --- /dev/null +++ b/sdk/billing/arm-billing/src/models/transactionsMappers.ts @@ -0,0 +1,44 @@ +/* + * 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, + BillingPermissionsProperties, + BillingProfile, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscription, + Customer, + CustomerPolicy, + Department, + Document, + Enrollment, + EnrollmentAccount, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + Instruction, + Invoice, + InvoiceSection, + Participants, + PaymentMethod, + PaymentProperties, + Policy, + Product, + Reseller, + Resource, + Transaction, + TransactionListResult +} from "../models/mappers"; diff --git a/sdk/billing/arm-billing/src/models/transfersMappers.ts b/sdk/billing/arm-billing/src/models/transfersMappers.ts new file mode 100644 index 000000000000..1c19df67c2a7 --- /dev/null +++ b/sdk/billing/arm-billing/src/models/transfersMappers.ts @@ -0,0 +1,17 @@ +/* + * 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 { + DetailedTransferStatus, + ErrorDetails, + ErrorModel, + ErrorResponse, + InitiateTransferRequest, + TransferDetails, + TransferDetailsListResult +} 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..3bfe873bfe5e --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/address.ts @@ -0,0 +1,85 @@ +/* + * 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 the 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.apiVersion + ], + 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..8d37fb8f1bbd --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/agreements.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/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 all agreements for a billing account. + * @param billingAccountName billing Account Id. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingAccount(billingAccountName: string, options?: Models.AgreementsListByBillingAccountOptionalParams): Promise; + /** + * @param billingAccountName billing Account Id. + * @param callback The callback + */ + listByBillingAccount(billingAccountName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @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; + } + + /** + * Get the agreement by name. + * @param billingAccountName billing Account Id. + * @param agreementName Agreement Id. + * @param [options] The optional parameters + * @returns Promise + */ + get(billingAccountName: string, agreementName: string, options?: Models.AgreementsGetOptionalParams): Promise; + /** + * @param billingAccountName billing Account Id. + * @param agreementName Agreement Id. + * @param callback The callback + */ + get(billingAccountName: string, agreementName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param agreementName Agreement Id. + * @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; + } +} + +// 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.apiVersion, + 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.apiVersion, + Parameters.expand + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Agreement + }, + 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..21dda0b0ebd5 --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/availableBalances.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/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 latest available credit balance for a given billingAccountName and billingProfileName. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param [options] The optional parameters + * @returns Promise + */ + getByBillingProfile(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param callback The callback + */ + getByBillingProfile(billingAccountName: string, billingProfileName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @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; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getByBillingProfileOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/availableBalance/default", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName + ], + queryParameters: [ + Parameters.apiVersion + ], + 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..c73150d45a79 --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/billingAccounts.ts @@ -0,0 +1,291 @@ +/* + * 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 all billing accounts for a user which he 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; + } + + /** + * Get the billing account by id. + * @param billingAccountName billing Account Id. + * @param [options] The optional parameters + * @returns Promise + */ + get(billingAccountName: string, options?: Models.BillingAccountsGetOptionalParams): Promise; + /** + * @param billingAccountName billing Account Id. + * @param callback The callback + */ + get(billingAccountName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @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; + } + + /** + * The operation to update a billing account. + * @param billingAccountName billing Account Id. + * @param parameters Request parameters supplied 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 all invoice sections with create subscription permission for a user. + * @param billingAccountName billing Account Id. + * @param [options] The optional parameters + * @returns + * Promise + */ + listInvoiceSectionsByCreateSubscriptionPermission(billingAccountName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param callback The callback + */ + listInvoiceSectionsByCreateSubscriptionPermission(billingAccountName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @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; + } + + /** + * The operation to update a billing account. + * @param billingAccountName billing Account Id. + * @param parameters Request parameters supplied 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 all invoice sections with create subscription permission for a user. + * @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.apiVersion, + 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.apiVersion, + 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.apiVersion + ], + 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.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.BillingAccountUpdateRequest, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.BillingAccount + }, + 202: {}, + 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 deleted file mode 100644 index 2dcc29cf78d9..000000000000 --- a/sdk/billing/arm-billing/src/operations/billingPeriods.ts +++ /dev/null @@ -1,187 +0,0 @@ -/* - * 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/billingPeriodsMappers"; -import * as Parameters from "../models/parameters"; -import { BillingManagementClientContext } from "../billingManagementClientContext"; - -/** Class representing a BillingPeriods. */ -export class BillingPeriods { - private readonly client: BillingManagementClientContext; - - /** - * Create a BillingPeriods. - * @param {BillingManagementClientContext} client Reference to the service client. - */ - constructor(client: BillingManagementClientContext) { - this.client = client; - } - - /** - * Lists the available billing periods for a subscription in reverse chronological order. 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 [options] The optional parameters - * @returns Promise - */ - list(options?: Models.BillingPeriodsListOptionalParams): Promise; - /** - * @param callback The callback - */ - list(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - list(options: Models.BillingPeriodsListOptionalParams, callback: msRest.ServiceCallback): void; - list(options?: Models.BillingPeriodsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options - }, - listOperationSpec, - callback) as Promise; - } - - /** - * Gets a named billing period. 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 billingPeriodName The name of a BillingPeriod resource. - * @param [options] The optional parameters - * @returns Promise - */ - get(billingPeriodName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param billingPeriodName The name of a BillingPeriod resource. - * @param callback The callback - */ - get(billingPeriodName: string, callback: msRest.ServiceCallback): void; - /** - * @param billingPeriodName The name of a BillingPeriod resource. - * @param options The optional parameters - * @param callback The callback - */ - get(billingPeriodName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(billingPeriodName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - billingPeriodName, - options - }, - getOperationSpec, - callback) as Promise; - } - - /** - * Lists the available billing periods for a subscription in reverse chronological order. 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 nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback - */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listNextOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingPeriods", - urlParameters: [ - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.skiptoken, - Parameters.top - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.BillingPeriodsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.billingPeriodName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.BillingPeriod - }, - 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.BillingPeriodsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; 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..6b7e9e4aa905 --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/billingPermissions.ts @@ -0,0 +1,254 @@ +/* + * 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 all billing permissions the caller has for a customer. + * @param billingAccountName billing Account Id. + * @param customerName Customer name. + * @param [options] The optional parameters + * @returns Promise + */ + listByCustomer(billingAccountName: string, customerName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param customerName Customer name. + * @param callback The callback + */ + listByCustomer(billingAccountName: string, customerName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param customerName Customer name. + * @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 all billing permissions for the caller under a billing account. + * @param billingAccountName billing Account Id. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingAccount(billingAccountName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param callback The callback + */ + listByBillingAccount(billingAccountName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @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 all billing permissions for the caller under invoice section. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param [options] The optional parameters + * @returns Promise + */ + listByInvoiceSections(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param callback The callback + */ + listByInvoiceSections(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @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 all billing permissions the caller has for a billing account. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param callback The callback + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @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; + } +} + +// 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.apiVersion + ], + 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.apiVersion + ], + 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.apiVersion + ], + 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.apiVersion + ], + 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..48ed830b95b9 --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/billingProfiles.ts @@ -0,0 +1,276 @@ +/* + * 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 all billing profiles for a user which that user has access to. + * @param billingAccountName billing Account Id. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingAccount(billingAccountName: string, options?: Models.BillingProfilesListByBillingAccountOptionalParams): Promise; + /** + * @param billingAccountName billing Account Id. + * @param callback The callback + */ + listByBillingAccount(billingAccountName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @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; + } + + /** + * Get the billing profile by id. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param [options] The optional parameters + * @returns Promise + */ + get(billingAccountName: string, billingProfileName: string, options?: Models.BillingProfilesGetOptionalParams): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param callback The callback + */ + get(billingAccountName: string, billingProfileName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @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; + } + + /** + * The operation to create a BillingProfile. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param parameters Request parameters supplied to the Create BillingProfile operation. + * @param [options] The optional parameters + * @returns Promise + */ + create(billingAccountName: string, billingProfileName: string, parameters: Models.BillingProfileCreationRequest, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreate(billingAccountName,billingProfileName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * The operation to update a billing profile. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param parameters Request parameters supplied to the update billing profile operation. + * @param [options] The optional parameters + * @returns Promise + */ + update(billingAccountName: string, billingProfileName: string, parameters: Models.BillingProfile, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(billingAccountName,billingProfileName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * The operation to create a BillingProfile. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param parameters Request parameters supplied to the Create BillingProfile operation. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreate(billingAccountName: string, billingProfileName: string, parameters: Models.BillingProfileCreationRequest, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + billingAccountName, + billingProfileName, + parameters, + options + }, + beginCreateOperationSpec, + options); + } + + /** + * The operation to update a billing profile. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param parameters Request parameters supplied to the update billing profile operation. + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdate(billingAccountName: string, billingProfileName: string, parameters: Models.BillingProfile, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + billingAccountName, + billingProfileName, + parameters, + options + }, + beginUpdateOperationSpec, + options); + } +} + +// 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.apiVersion, + 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.apiVersion, + Parameters.expand + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingProfile + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginCreateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.BillingProfileCreationRequest, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.BillingProfile, + headersMapper: Mappers.BillingProfilesCreateHeaders + }, + 202: { + headersMapper: Mappers.BillingProfilesCreateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.BillingProfile, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.BillingProfile, + headersMapper: Mappers.BillingProfilesUpdateHeaders + }, + 202: { + headersMapper: Mappers.BillingProfilesUpdateHeaders + }, + 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..4b066bc24fbf --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/billingPropertyOperations.ts @@ -0,0 +1,77 @@ +/* + * 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 billing property by subscription Id. + * @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; + } +} + +// 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.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + 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..09f775a86ae1 --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/billingRoleAssignments.ts @@ -0,0 +1,765 @@ +/* + * 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; + } + + /** + * Get the role assignment for the caller + * @param billingAccountName billing Account Id. + * @param billingRoleAssignmentName role assignment id. + * @param [options] The optional parameters + * @returns Promise + */ + getByBillingAccount(billingAccountName: string, billingRoleAssignmentName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingRoleAssignmentName role assignment id. + * @param callback The callback + */ + getByBillingAccount(billingAccountName: string, billingRoleAssignmentName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param billingRoleAssignmentName role assignment id. + * @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; + } + + /** + * Delete the role assignment on this billing account + * @param billingAccountName billing Account Id. + * @param billingRoleAssignmentName role assignment id. + * @param [options] The optional parameters + * @returns Promise + */ + deleteByBillingAccount(billingAccountName: string, billingRoleAssignmentName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingRoleAssignmentName role assignment id. + * @param callback The callback + */ + deleteByBillingAccount(billingAccountName: string, billingRoleAssignmentName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param billingRoleAssignmentName role assignment id. + * @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; + } + + /** + * Get the role assignment for the caller on the invoice Section + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param billingRoleAssignmentName role assignment id. + * @param [options] The optional parameters + * @returns Promise + */ + getByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, billingRoleAssignmentName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param billingRoleAssignmentName role assignment id. + * @param callback The callback + */ + getByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, billingRoleAssignmentName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param billingRoleAssignmentName role assignment id. + * @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; + } + + /** + * Delete the role assignment on the invoice Section + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param billingRoleAssignmentName role assignment id. + * @param [options] The optional parameters + * @returns Promise + */ + deleteByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, billingRoleAssignmentName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param billingRoleAssignmentName role assignment id. + * @param callback The callback + */ + deleteByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, billingRoleAssignmentName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param billingRoleAssignmentName role assignment id. + * @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; + } + + /** + * Get the role assignment for the caller on the Billing Profile + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param billingRoleAssignmentName role assignment id. + * @param [options] The optional parameters + * @returns Promise + */ + getByBillingProfile(billingAccountName: string, billingProfileName: string, billingRoleAssignmentName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param billingRoleAssignmentName role assignment id. + * @param callback The callback + */ + getByBillingProfile(billingAccountName: string, billingProfileName: string, billingRoleAssignmentName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param billingRoleAssignmentName role assignment id. + * @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; + } + + /** + * Delete the role assignment on this Billing Profile + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param billingRoleAssignmentName role assignment id. + * @param [options] The optional parameters + * @returns Promise + */ + deleteByBillingProfile(billingAccountName: string, billingProfileName: string, billingRoleAssignmentName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param billingRoleAssignmentName role assignment id. + * @param callback The callback + */ + deleteByBillingProfile(billingAccountName: string, billingProfileName: string, billingRoleAssignmentName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param billingRoleAssignmentName role assignment id. + * @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; + } + + /** + * Get the role assignments on the Billing Account + * @param billingAccountName billing Account Id. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingAccount(billingAccountName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param callback The callback + */ + listByBillingAccount(billingAccountName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @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; + } + + /** + * The operation to add a role assignment to a billing account. + * @param billingAccountName billing Account Id. + * @param parameters Parameters supplied to add a role assignment. + * @param [options] The optional parameters + * @returns Promise + */ + addByBillingAccount(billingAccountName: string, parameters: Models.BillingRoleAssignmentPayload, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param parameters Parameters supplied to add a role assignment. + * @param callback The callback + */ + addByBillingAccount(billingAccountName: string, parameters: Models.BillingRoleAssignmentPayload, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param parameters Parameters supplied to add a role assignment. + * @param options The optional parameters + * @param callback The callback + */ + addByBillingAccount(billingAccountName: string, parameters: Models.BillingRoleAssignmentPayload, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + addByBillingAccount(billingAccountName: string, parameters: Models.BillingRoleAssignmentPayload, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + parameters, + options + }, + addByBillingAccountOperationSpec, + callback) as Promise; + } + + /** + * Get the role assignments on the invoice Section + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param [options] The optional parameters + * @returns Promise + */ + listByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param callback The callback + */ + listByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @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; + } + + /** + * The operation to add a role assignment to a invoice Section. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param parameters Parameters supplied to add a role assignment. + * @param [options] The optional parameters + * @returns Promise + */ + addByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, parameters: Models.BillingRoleAssignmentPayload, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param parameters Parameters supplied to add a role assignment. + * @param callback The callback + */ + addByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, parameters: Models.BillingRoleAssignmentPayload, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param parameters Parameters supplied to add a role assignment. + * @param options The optional parameters + * @param callback The callback + */ + addByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, parameters: Models.BillingRoleAssignmentPayload, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + addByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, parameters: Models.BillingRoleAssignmentPayload, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + invoiceSectionName, + parameters, + options + }, + addByInvoiceSectionOperationSpec, + callback) as Promise; + } + + /** + * Get the role assignments on the Billing Profile + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param callback The callback + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @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; + } + + /** + * The operation to add a role assignment to a billing profile. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param parameters Parameters supplied to add a role assignment. + * @param [options] The optional parameters + * @returns Promise + */ + addByBillingProfile(billingAccountName: string, billingProfileName: string, parameters: Models.BillingRoleAssignmentPayload, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param parameters Parameters supplied to add a role assignment. + * @param callback The callback + */ + addByBillingProfile(billingAccountName: string, billingProfileName: string, parameters: Models.BillingRoleAssignmentPayload, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param parameters Parameters supplied to add a role assignment. + * @param options The optional parameters + * @param callback The callback + */ + addByBillingProfile(billingAccountName: string, billingProfileName: string, parameters: Models.BillingRoleAssignmentPayload, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + addByBillingProfile(billingAccountName: string, billingProfileName: string, parameters: Models.BillingRoleAssignmentPayload, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + parameters, + options + }, + addByBillingProfileOperationSpec, + 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.apiVersion + ], + 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.apiVersion + ], + 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.apiVersion + ], + 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.apiVersion + ], + 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.apiVersion + ], + 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.apiVersion + ], + 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.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingRoleAssignmentListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const addByBillingAccountOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/createBillingRoleAssignment", + urlParameters: [ + Parameters.billingAccountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.BillingRoleAssignmentPayload, + required: true + } + }, + responses: { + 201: { + 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.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingRoleAssignmentListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const addByInvoiceSectionOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/createBillingRoleAssignment", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName, + Parameters.invoiceSectionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.BillingRoleAssignmentPayload, + required: true + } + }, + responses: { + 201: { + 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.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingRoleAssignmentListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const addByBillingProfileOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/createBillingRoleAssignment", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.BillingRoleAssignmentPayload, + required: true + } + }, + responses: { + 201: { + 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..5e13e5998052 --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/billingRoleDefinitions.ts @@ -0,0 +1,381 @@ +/* + * 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 role definition for a role + * @param billingAccountName billing Account Id. + * @param billingRoleDefinitionName role definition id. + * @param [options] The optional parameters + * @returns Promise + */ + getByBillingAccount(billingAccountName: string, billingRoleDefinitionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingRoleDefinitionName role definition id. + * @param callback The callback + */ + getByBillingAccount(billingAccountName: string, billingRoleDefinitionName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param billingRoleDefinitionName role definition id. + * @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 role definition for a role + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param billingRoleDefinitionName role definition id. + * @param [options] The optional parameters + * @returns Promise + */ + getByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, billingRoleDefinitionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param billingRoleDefinitionName role definition id. + * @param callback The callback + */ + getByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, billingRoleDefinitionName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param billingRoleDefinitionName role definition id. + * @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 role definition for a role + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param billingRoleDefinitionName role definition id. + * @param [options] The optional parameters + * @returns Promise + */ + getByBillingProfile(billingAccountName: string, billingProfileName: string, billingRoleDefinitionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param billingRoleDefinitionName role definition id. + * @param callback The callback + */ + getByBillingProfile(billingAccountName: string, billingProfileName: string, billingRoleDefinitionName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param billingRoleDefinitionName role definition id. + * @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 definition for a billing account + * @param billingAccountName billing Account Id. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingAccount(billingAccountName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param callback The callback + */ + listByBillingAccount(billingAccountName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @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 definition for an invoice Section + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param [options] The optional parameters + * @returns Promise + */ + listByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param callback The callback + */ + listByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @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 definition for a Billing Profile + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param callback The callback + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @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; + } +} + +// 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.apiVersion + ], + 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.apiVersion + ], + 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.apiVersion + ], + 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.apiVersion + ], + 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.apiVersion + ], + 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.apiVersion + ], + 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..6b83dc8a4d83 --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/billingSubscriptions.ts @@ -0,0 +1,627 @@ +/* + * 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 billing subscription by customer id. + * @param billingAccountName billing Account Id. + * @param customerName Customer name. + * @param [options] The optional parameters + * @returns Promise + */ + listByCustomer(billingAccountName: string, customerName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param customerName Customer name. + * @param callback The callback + */ + listByCustomer(billingAccountName: string, customerName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param customerName Customer name. + * @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; + } + + /** + * Get a single billing subscription by id. + * @param billingAccountName billing Account Id. + * @param customerName Customer name. + * @param billingSubscriptionName Billing Subscription Id. + * @param [options] The optional parameters + * @returns Promise + */ + getByCustomer(billingAccountName: string, customerName: string, billingSubscriptionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param customerName Customer name. + * @param billingSubscriptionName Billing Subscription Id. + * @param callback The callback + */ + getByCustomer(billingAccountName: string, customerName: string, billingSubscriptionName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param customerName Customer name. + * @param billingSubscriptionName Billing Subscription Id. + * @param options The optional parameters + * @param callback The callback + */ + getByCustomer(billingAccountName: string, customerName: string, billingSubscriptionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getByCustomer(billingAccountName: string, customerName: string, billingSubscriptionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + customerName, + billingSubscriptionName, + options + }, + getByCustomerOperationSpec, + callback) as Promise; + } + + /** + * Lists billing subscriptions by billing account name. + * @param billingAccountName billing Account Id. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingAccount(billingAccountName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param callback The callback + */ + listByBillingAccount(billingAccountName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @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 billing subscriptions by billing profile name. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param callback The callback + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @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 billing subscription by invoice section name. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param [options] The optional parameters + * @returns Promise + */ + listByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param callback The callback + */ + listByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @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; + } + + /** + * Get a single billing subscription by name. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param billingSubscriptionName Billing Subscription Id. + * @param [options] The optional parameters + * @returns Promise + */ + get(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, billingSubscriptionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param billingSubscriptionName Billing Subscription Id. + * @param callback The callback + */ + get(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, billingSubscriptionName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param billingSubscriptionName Billing Subscription Id. + * @param options The optional parameters + * @param callback The callback + */ + get(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, billingSubscriptionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, billingSubscriptionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + invoiceSectionName, + billingSubscriptionName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Transfers the subscription from one invoice section to another within a billing account. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param billingSubscriptionName Billing Subscription Id. + * @param parameters Request parameters supplied to the Transfer Billing Subscription operation. + * @param [options] The optional parameters + * @returns Promise + */ + transfer(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, billingSubscriptionName: string, parameters: Models.TransferBillingSubscriptionRequestProperties, options?: msRest.RequestOptionsBase): Promise { + return this.beginTransfer(billingAccountName,billingProfileName,invoiceSectionName,billingSubscriptionName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Validates the transfer of billing subscriptions across invoice sections. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param billingSubscriptionName Billing Subscription Id. + * @param parameters Parameters supplied to the Transfer Billing Subscription operation. + * @param [options] The optional parameters + * @returns Promise + */ + validateTransfer(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, billingSubscriptionName: string, parameters: Models.TransferBillingSubscriptionRequestProperties, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param billingSubscriptionName Billing Subscription Id. + * @param parameters Parameters supplied to the Transfer Billing Subscription operation. + * @param callback The callback + */ + validateTransfer(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, billingSubscriptionName: string, parameters: Models.TransferBillingSubscriptionRequestProperties, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param billingSubscriptionName Billing Subscription Id. + * @param parameters Parameters supplied to the Transfer Billing Subscription operation. + * @param options The optional parameters + * @param callback The callback + */ + validateTransfer(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, billingSubscriptionName: string, parameters: Models.TransferBillingSubscriptionRequestProperties, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + validateTransfer(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, billingSubscriptionName: string, parameters: Models.TransferBillingSubscriptionRequestProperties, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + invoiceSectionName, + billingSubscriptionName, + parameters, + options + }, + validateTransferOperationSpec, + callback) as Promise; + } + + /** + * Transfers the subscription from one invoice section to another within a billing account. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param billingSubscriptionName Billing Subscription Id. + * @param parameters Request parameters supplied to the Transfer Billing Subscription operation. + * @param [options] The optional parameters + * @returns Promise + */ + beginTransfer(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, billingSubscriptionName: string, parameters: Models.TransferBillingSubscriptionRequestProperties, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + billingAccountName, + billingProfileName, + invoiceSectionName, + billingSubscriptionName, + parameters, + options + }, + beginTransferOperationSpec, + options); + } + + /** + * Lists billing subscription by customer id. + * @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 billing subscriptions by billing account name. + * @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 listByCustomerOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/billingSubscriptions", + urlParameters: [ + Parameters.billingAccountName, + Parameters.customerName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingSubscriptionsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getByCustomerOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/billingSubscriptions/{billingSubscriptionName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.customerName, + Parameters.billingSubscriptionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingSubscription + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingAccountOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions", + urlParameters: [ + Parameters.billingAccountName + ], + queryParameters: [ + Parameters.apiVersion + ], + 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.apiVersion + ], + 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.apiVersion + ], + 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}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingSubscriptions/{billingSubscriptionName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName, + Parameters.invoiceSectionName, + Parameters.billingSubscriptionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingSubscription + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const validateTransferOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingSubscriptions/{billingSubscriptionName}/validateTransferEligibility", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName, + Parameters.invoiceSectionName, + Parameters.billingSubscriptionName + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.TransferBillingSubscriptionRequestProperties, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ValidateSubscriptionTransferEligibilityResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginTransferOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingSubscriptions/{billingSubscriptionName}/transfer", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName, + Parameters.invoiceSectionName, + Parameters.billingSubscriptionName + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.TransferBillingSubscriptionRequestProperties, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.TransferBillingSubscriptionResult, + headersMapper: Mappers.BillingSubscriptionsTransferHeaders + }, + 202: { + headersMapper: Mappers.BillingSubscriptionsTransferHeaders + }, + 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.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 +}; 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..7ddf67265477 --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/customers.ts @@ -0,0 +1,296 @@ +/* + * 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 customers by billing profile which the current user can work with on-behalf of a partner. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, options?: Models.CustomersListByBillingProfileOptionalParams): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param callback The callback + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @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 customers which the current user can work with on-behalf of a partner. + * @param billingAccountName billing Account Id. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingAccount(billingAccountName: string, options?: Models.CustomersListByBillingAccountOptionalParams): Promise; + /** + * @param billingAccountName billing Account Id. + * @param callback The callback + */ + listByBillingAccount(billingAccountName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @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. + * @param billingAccountName billing Account Id. + * @param customerName Customer name. + * @param [options] The optional parameters + * @returns Promise + */ + get(billingAccountName: string, customerName: string, options?: Models.CustomersGetOptionalParams): Promise; + /** + * @param billingAccountName billing Account Id. + * @param customerName Customer name. + * @param callback The callback + */ + get(billingAccountName: string, customerName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param customerName Customer name. + * @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 customers by billing profile which the current user can work with on-behalf of a partner. + * @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 customers which the current user can work with on-behalf of a partner. + * @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.apiVersion, + Parameters.filter, + Parameters.skiptoken + ], + 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.apiVersion, + Parameters.filter, + Parameters.skiptoken + ], + 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.apiVersion, + 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/departments.ts b/sdk/billing/arm-billing/src/operations/departments.ts new file mode 100644 index 000000000000..219feb5bf84b --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/departments.ts @@ -0,0 +1,141 @@ +/* + * 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/departmentsMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a Departments. */ +export class Departments { + private readonly client: BillingManagementClientContext; + + /** + * Create a Departments. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * Lists all departments for a user which he has access to. + * @param billingAccountName billing Account Id. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingAccountName(billingAccountName: string, options?: Models.DepartmentsListByBillingAccountNameOptionalParams): Promise; + /** + * @param billingAccountName billing Account Id. + * @param callback The callback + */ + listByBillingAccountName(billingAccountName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingAccountName(billingAccountName: string, options: Models.DepartmentsListByBillingAccountNameOptionalParams, callback: msRest.ServiceCallback): void; + listByBillingAccountName(billingAccountName: string, options?: Models.DepartmentsListByBillingAccountNameOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + options + }, + listByBillingAccountNameOperationSpec, + callback) as Promise; + } + + /** + * Get the department by id. + * @param billingAccountName billing Account Id. + * @param departmentName Department Id. + * @param [options] The optional parameters + * @returns Promise + */ + get(billingAccountName: string, departmentName: string, options?: Models.DepartmentsGetOptionalParams): Promise; + /** + * @param billingAccountName billing Account Id. + * @param departmentName Department Id. + * @param callback The callback + */ + get(billingAccountName: string, departmentName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param departmentName Department Id. + * @param options The optional parameters + * @param callback The callback + */ + get(billingAccountName: string, departmentName: string, options: Models.DepartmentsGetOptionalParams, callback: msRest.ServiceCallback): void; + get(billingAccountName: string, departmentName: string, options?: Models.DepartmentsGetOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + departmentName, + options + }, + getOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByBillingAccountNameOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/departments", + urlParameters: [ + Parameters.billingAccountName + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.expand, + Parameters.filter + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DepartmentListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/departments/{departmentName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.departmentName + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.expand, + Parameters.filter + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Department + }, + 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..f9d096dde13f 100644 --- a/sdk/billing/arm-billing/src/operations/enrollmentAccounts.ts +++ b/sdk/billing/arm-billing/src/operations/enrollmentAccounts.ts @@ -27,93 +27,78 @@ export class EnrollmentAccounts { } /** - * Lists the enrollment accounts the caller has access to. + * Lists all Enrollment Accounts for a user which he has access to. + * @param billingAccountName billing Account Id. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - list(options?: msRest.RequestOptionsBase): Promise; + listByBillingAccountName(billingAccountName: string, options?: Models.EnrollmentAccountsListByBillingAccountNameOptionalParams): Promise; /** + * @param billingAccountName billing Account Id. * @param callback The callback */ - list(callback: msRest.ServiceCallback): void; + listByBillingAccountName(billingAccountName: string, callback: msRest.ServiceCallback): void; /** + * @param billingAccountName billing Account Id. * @param options The optional parameters * @param callback The callback */ - list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listByBillingAccountName(billingAccountName: string, options: Models.EnrollmentAccountsListByBillingAccountNameOptionalParams, callback: msRest.ServiceCallback): void; + listByBillingAccountName(billingAccountName: string, options?: Models.EnrollmentAccountsListByBillingAccountNameOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { + billingAccountName, options }, - listOperationSpec, - callback) as Promise; + listByBillingAccountNameOperationSpec, + callback) as Promise; } /** - * Gets a enrollment account by name. - * @param name Enrollment Account name. + * Get the enrollment account by id. + * @param billingAccountName billing Account Id. + * @param enrollmentAccountName Enrollment Account Id. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - get(name: string, options?: msRest.RequestOptionsBase): Promise; + getByEnrollmentAccountId(billingAccountName: string, enrollmentAccountName: string, options?: Models.EnrollmentAccountsGetByEnrollmentAccountIdOptionalParams): Promise; /** - * @param name Enrollment Account name. + * @param billingAccountName billing Account Id. + * @param enrollmentAccountName Enrollment Account Id. * @param callback The callback */ - get(name: string, callback: msRest.ServiceCallback): void; + getByEnrollmentAccountId(billingAccountName: string, enrollmentAccountName: string, callback: msRest.ServiceCallback): void; /** - * @param name Enrollment Account name. + * @param billingAccountName billing Account Id. + * @param enrollmentAccountName Enrollment Account Id. * @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 { + getByEnrollmentAccountId(billingAccountName: string, enrollmentAccountName: string, options: Models.EnrollmentAccountsGetByEnrollmentAccountIdOptionalParams, callback: msRest.ServiceCallback): void; + getByEnrollmentAccountId(billingAccountName: string, enrollmentAccountName: string, options?: Models.EnrollmentAccountsGetByEnrollmentAccountIdOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { - name, + billingAccountName, + enrollmentAccountName, options }, - getOperationSpec, - callback) as Promise; - } - - /** - * Lists the enrollment accounts the caller 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; + getByEnrollmentAccountIdOperationSpec, + callback) as Promise; } } // Operation Specifications const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { +const listByBillingAccountNameOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "providers/Microsoft.Billing/enrollmentAccounts", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/enrollmentAccounts", + urlParameters: [ + Parameters.billingAccountName + ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion, + Parameters.expand, + Parameters.filter ], headerParameters: [ Parameters.acceptLanguage @@ -129,14 +114,17 @@ const listOperationSpec: msRest.OperationSpec = { serializer }; -const getOperationSpec: msRest.OperationSpec = { +const getByEnrollmentAccountIdOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "providers/Microsoft.Billing/enrollmentAccounts/{name}", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/enrollmentAccounts/{enrollmentAccountName}", urlParameters: [ - Parameters.name + Parameters.billingAccountName, + Parameters.enrollmentAccountName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion, + Parameters.expand, + Parameters.filter ], headerParameters: [ Parameters.acceptLanguage @@ -151,24 +139,3 @@ const getOperationSpec: msRest.OperationSpec = { }, serializer }; - -const listNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.EnrollmentAccountListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; diff --git a/sdk/billing/arm-billing/src/operations/index.ts b/sdk/billing/arm-billing/src/operations/index.ts index cfc488e846ba..aed65b21cdfa 100644 --- a/sdk/billing/arm-billing/src/operations/index.ts +++ b/sdk/billing/arm-billing/src/operations/index.ts @@ -8,7 +8,28 @@ * regenerated. */ +export * from "./billingAccounts"; +export * from "./paymentMethods"; +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 "./transactions"; +export * from "./departments"; export * from "./enrollmentAccounts"; -export * from "./billingPeriods"; export * from "./invoices"; +export * from "./priceSheet"; +export * from "./policies"; +export * from "./billingPropertyOperations"; +export * from "./transfers"; +export * from "./partnerTransfers"; +export * from "./recipientTransfers"; export * from "./operations"; +export * from "./billingRoleDefinitions"; +export * from "./billingRoleAssignments"; +export * from "./agreements"; 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..8828ba3dca07 --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/instructions.ts @@ -0,0 +1,268 @@ +/* + * 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 billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param callback The callback + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @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. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param instructionName Instruction Name. + * @param [options] The optional parameters + * @returns Promise + */ + get(billingAccountName: string, billingProfileName: string, instructionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param instructionName Instruction Name. + * @param callback The callback + */ + get(billingAccountName: string, billingProfileName: string, instructionName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @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; + } + + /** + * The operation to create or update a instruction. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @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 billing Account Id. + * @param billingProfileName Billing Profile Id. + * @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 billing Account Id. + * @param billingProfileName Billing Profile Id. + * @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.apiVersion + ], + 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.apiVersion + ], + 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.apiVersion + ], + 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..c394eaf9d24d --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/invoiceSections.ts @@ -0,0 +1,352 @@ +/* + * 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 all invoice sections for a user which he has access to. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param callback The callback + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @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 InvoiceSection by id. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param [options] The optional parameters + * @returns Promise + */ + get(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param callback The callback + */ + get(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @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; + } + + /** + * The operation to create an invoice section. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param [options] The optional parameters + * @returns Promise + */ + create(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, options?: Models.InvoiceSectionsCreateOptionalParams): Promise { + return this.beginCreate(billingAccountName,billingProfileName,invoiceSectionName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * The operation to update a InvoiceSection. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param [options] The optional parameters + * @returns Promise + */ + update(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, options?: Models.InvoiceSectionsUpdateOptionalParams): Promise { + return this.beginUpdate(billingAccountName,billingProfileName,invoiceSectionName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Elevates the caller's access to match their billing profile access. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param [options] The optional parameters + * @returns Promise + */ + elevateToBillingProfile(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param callback The callback + */ + elevateToBillingProfile(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param options The optional parameters + * @param callback The callback + */ + elevateToBillingProfile(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + elevateToBillingProfile(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + invoiceSectionName, + options + }, + elevateToBillingProfileOperationSpec, + callback); + } + + /** + * The operation to create an invoice section. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreate(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, options?: Models.InvoiceSectionsBeginCreateOptionalParams): Promise { + return this.client.sendLRORequest( + { + billingAccountName, + billingProfileName, + invoiceSectionName, + options + }, + beginCreateOperationSpec, + options); + } + + /** + * The operation to update a InvoiceSection. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdate(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, options?: Models.InvoiceSectionsBeginUpdateOptionalParams): Promise { + return this.client.sendLRORequest( + { + billingAccountName, + billingProfileName, + invoiceSectionName, + options + }, + beginUpdateOperationSpec, + options); + } +} + +// 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.apiVersion + ], + 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.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.InvoiceSection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const elevateToBillingProfileOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/elevate", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName, + Parameters.invoiceSectionName + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginCreateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName, + Parameters.invoiceSectionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + displayName: [ + "options", + "displayName" + ] + }, + mapper: { + ...Mappers.InvoiceSectionCreationRequest, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.InvoiceSection, + headersMapper: Mappers.InvoiceSectionsCreateHeaders + }, + 202: { + headersMapper: Mappers.InvoiceSectionsCreateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName, + Parameters.invoiceSectionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + displayName: [ + "options", + "displayName" + ] + }, + mapper: { + ...Mappers.InvoiceSection, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.InvoiceSection, + headersMapper: Mappers.InvoiceSectionsUpdateHeaders + }, + 202: { + headersMapper: Mappers.InvoiceSectionsUpdateHeaders + }, + 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..555592773520 100644 --- a/sdk/billing/arm-billing/src/operations/invoices.ts +++ b/sdk/billing/arm-billing/src/operations/invoices.ts @@ -27,57 +27,110 @@ 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. + * List of invoices for a billing account. + * @param billingAccountName billing Account Id. + * @param periodStartDate Invoice period start date. + * @param periodEndDate Invoice period end date. * @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 billing Account Id. + * @param periodStartDate Invoice period start date. + * @param periodEndDate Invoice period end date. * @param callback The callback */ - list(callback: msRest.ServiceCallback): void; + listByBillingAccount(billingAccountName: string, periodStartDate: string, periodEndDate: string, callback: msRest.ServiceCallback): void; /** + * @param billingAccountName billing Account Id. + * @param periodStartDate Invoice period start date. + * @param periodEndDate Invoice period end date. * @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. + * List of invoices for a billing profile. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param periodStartDate Invoice period start date. + * @param periodEndDate Invoice period end date. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, periodStartDate: string, periodEndDate: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param periodStartDate Invoice period start date. + * @param periodEndDate Invoice period end date. + * @param callback The callback + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, periodStartDate: string, periodEndDate: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param periodStartDate Invoice period start date. + * @param periodEndDate Invoice period end date. + * @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; + } + + /** + * Get the invoice by name. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceName Invoice Id. * @param [options] The optional parameters * @returns Promise */ - get(invoiceName: string, options?: msRest.RequestOptionsBase): Promise; + get(billingAccountName: string, billingProfileName: string, invoiceName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param invoiceName The name of an invoice resource. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceName Invoice Id. * @param callback The callback */ - get(invoiceName: string, callback: msRest.ServiceCallback): void; + get(billingAccountName: string, billingProfileName: string, invoiceName: string, callback: msRest.ServiceCallback): void; /** - * @param invoiceName The name of an invoice resource. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceName Invoice Id. * @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, billingProfileName: string, invoiceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(billingAccountName: string, billingProfileName: string, invoiceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { + billingAccountName, + billingProfileName, invoiceName, options }, @@ -86,86 +139,155 @@ 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. + * Lists invoices by billing subscriptions name. + * @param billingAccountName billing Account Id. + * @param billingSubscriptionName Billing Subscription Id. + * @param periodStartDate Invoice period start date. + * @param periodEndDate Invoice period end date. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingSubscription(billingAccountName: string, billingSubscriptionName: string, periodStartDate: string, periodEndDate: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingSubscriptionName Billing Subscription Id. + * @param periodStartDate Invoice period start date. + * @param periodEndDate Invoice period end date. + * @param callback The callback + */ + listByBillingSubscription(billingAccountName: string, billingSubscriptionName: string, periodStartDate: string, periodEndDate: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param billingSubscriptionName Billing Subscription Id. + * @param periodStartDate Invoice period start date. + * @param periodEndDate Invoice period end date. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingSubscription(billingAccountName: string, billingSubscriptionName: string, periodStartDate: string, periodEndDate: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingSubscription(billingAccountName: string, billingSubscriptionName: string, periodStartDate: string, periodEndDate: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingSubscriptionName, + periodStartDate, + periodEndDate, + options + }, + listByBillingSubscriptionOperationSpec, + callback) as Promise; + } + + /** + * Gets the invoice by name. + * @param billingAccountName billing Account Id. + * @param billingSubscriptionName Billing Subscription Id. + * @param invoiceName Invoice Id. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - getLatest(options?: msRest.RequestOptionsBase): Promise; + getById(billingAccountName: string, billingSubscriptionName: string, invoiceName: string, options?: msRest.RequestOptionsBase): Promise; /** + * @param billingAccountName billing Account Id. + * @param billingSubscriptionName Billing Subscription Id. + * @param invoiceName Invoice Id. * @param callback The callback */ - getLatest(callback: msRest.ServiceCallback): void; + getById(billingAccountName: string, billingSubscriptionName: string, invoiceName: string, callback: msRest.ServiceCallback): void; /** + * @param billingAccountName billing Account Id. + * @param billingSubscriptionName Billing Subscription Id. + * @param invoiceName Invoice Id. * @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 { + getById(billingAccountName: string, billingSubscriptionName: string, invoiceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getById(billingAccountName: string, billingSubscriptionName: string, invoiceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { + billingAccountName, + billingSubscriptionName, + invoiceName, options }, - getLatestOperationSpec, - callback) as Promise; + getByIdOperationSpec, + callback) 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. + * Lists invoices by billing subscriptions name. * @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; + listByBillingSubscriptionNext(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; + 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 */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + 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 }, - listNextOperationSpec, - callback) as Promise; + listByBillingSubscriptionNextOperationSpec, + callback) as Promise; } } // Operation Specifications const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { +const listByBillingAccountOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices", + urlParameters: [ + Parameters.billingAccountName + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.periodStartDate, + Parameters.periodEndDate + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.InvoiceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingProfileOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Billing/invoices", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoices", urlParameters: [ - Parameters.subscriptionId + Parameters.billingAccountName, + Parameters.billingProfileName ], queryParameters: [ Parameters.apiVersion, - Parameters.expand, - Parameters.filter, - Parameters.skiptoken, - Parameters.top + Parameters.periodStartDate, + Parameters.periodEndDate ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { - bodyMapper: Mappers.InvoicesListResult + bodyMapper: Mappers.InvoiceListResult }, default: { bodyMapper: Mappers.ErrorResponse @@ -176,9 +298,10 @@ const listOperationSpec: msRest.OperationSpec = { const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Billing/invoices/{invoiceName}", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoices/{invoiceName}", urlParameters: [ - Parameters.subscriptionId, + Parameters.billingAccountName, + Parameters.billingProfileName, Parameters.invoiceName ], queryParameters: [ @@ -198,11 +321,39 @@ const getOperationSpec: msRest.OperationSpec = { serializer }; -const getLatestOperationSpec: msRest.OperationSpec = { +const listByBillingSubscriptionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/{billingSubscriptionName}/invoices", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingSubscriptionName + ], + queryParameters: [ + Parameters.periodStartDate, + Parameters.periodEndDate, + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.InvoiceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getByIdOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Billing/invoices/latest", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/{billingSubscriptionName}/invoices/{invoiceName}", urlParameters: [ - Parameters.subscriptionId + Parameters.billingAccountName, + Parameters.billingSubscriptionName, + Parameters.invoiceName ], queryParameters: [ Parameters.apiVersion @@ -221,7 +372,7 @@ const getLatestOperationSpec: msRest.OperationSpec = { serializer }; -const listNextOperationSpec: msRest.OperationSpec = { +const listByBillingSubscriptionNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", @@ -233,7 +384,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/partnerTransfers.ts b/sdk/billing/arm-billing/src/operations/partnerTransfers.ts new file mode 100644 index 000000000000..5a391412280d --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/partnerTransfers.ts @@ -0,0 +1,332 @@ +/* + * 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/partnerTransfersMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a PartnerTransfers. */ +export class PartnerTransfers { + private readonly client: BillingManagementClientContext; + + /** + * Create a PartnerTransfers. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * Initiates the request to transfer the legacy subscriptions or RIs. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param customerName Customer name. + * @param parameters Parameters supplied to initiate the transfer. + * @param [options] The optional parameters + * @returns Promise + */ + initiate(billingAccountName: string, billingProfileName: string, customerName: string, parameters: Models.InitiateTransferRequest, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param customerName Customer name. + * @param parameters Parameters supplied to initiate the transfer. + * @param callback The callback + */ + initiate(billingAccountName: string, billingProfileName: string, customerName: string, parameters: Models.InitiateTransferRequest, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param customerName Customer name. + * @param parameters Parameters supplied to initiate the transfer. + * @param options The optional parameters + * @param callback The callback + */ + initiate(billingAccountName: string, billingProfileName: string, customerName: string, parameters: Models.InitiateTransferRequest, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + initiate(billingAccountName: string, billingProfileName: string, customerName: string, parameters: Models.InitiateTransferRequest, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + customerName, + parameters, + options + }, + initiateOperationSpec, + callback) as Promise; + } + + /** + * Gets the transfer details for given transfer Id. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param customerName Customer name. + * @param transferName Transfer Name. + * @param [options] The optional parameters + * @returns Promise + */ + get(billingAccountName: string, billingProfileName: string, customerName: string, transferName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param customerName Customer name. + * @param transferName Transfer Name. + * @param callback The callback + */ + get(billingAccountName: string, billingProfileName: string, customerName: string, transferName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param customerName Customer name. + * @param transferName Transfer Name. + * @param options The optional parameters + * @param callback The callback + */ + get(billingAccountName: string, billingProfileName: string, customerName: string, transferName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(billingAccountName: string, billingProfileName: string, customerName: string, transferName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + customerName, + transferName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Cancels the transfer for given transfer Id. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param customerName Customer name. + * @param transferName Transfer Name. + * @param [options] The optional parameters + * @returns Promise + */ + cancel(billingAccountName: string, billingProfileName: string, customerName: string, transferName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param customerName Customer name. + * @param transferName Transfer Name. + * @param callback The callback + */ + cancel(billingAccountName: string, billingProfileName: string, customerName: string, transferName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param customerName Customer name. + * @param transferName Transfer Name. + * @param options The optional parameters + * @param callback The callback + */ + cancel(billingAccountName: string, billingProfileName: string, customerName: string, transferName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + cancel(billingAccountName: string, billingProfileName: string, customerName: string, transferName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + customerName, + transferName, + options + }, + cancelOperationSpec, + callback) as Promise; + } + + /** + * Lists all transfer's details initiated from given invoice section. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param customerName Customer name. + * @param [options] The optional parameters + * @returns Promise + */ + list(billingAccountName: string, billingProfileName: string, customerName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param customerName Customer name. + * @param callback The callback + */ + list(billingAccountName: string, billingProfileName: string, customerName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param customerName Customer name. + * @param options The optional parameters + * @param callback The callback + */ + list(billingAccountName: string, billingProfileName: string, customerName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(billingAccountName: string, billingProfileName: string, customerName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + customerName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Lists all transfer's details initiated from given invoice section. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const initiateOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/customers/{customerName}/initiateTransfer", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName, + Parameters.customerName + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.InitiateTransferRequest, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.TransferDetails + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/customers/{customerName}/transfers/{transferName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName, + Parameters.customerName, + Parameters.transferName + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.TransferDetails + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const cancelOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/customers/{customerName}/transfers/{transferName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName, + Parameters.customerName, + Parameters.transferName + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.TransferDetails + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/customers/{customerName}/transfers", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName, + Parameters.customerName + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.TransferDetailsListResult + }, + 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.TransferDetailsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/billing/arm-billing/src/operations/paymentMethods.ts b/sdk/billing/arm-billing/src/operations/paymentMethods.ts new file mode 100644 index 000000000000..49e96fb8438b --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/paymentMethods.ts @@ -0,0 +1,235 @@ +/* + * 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/paymentMethodsMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a PaymentMethods. */ +export class PaymentMethods { + private readonly client: BillingManagementClientContext; + + /** + * Create a PaymentMethods. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * Lists the Payment Methods by billing account Id. + * @param billingAccountName billing Account Id. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingAccount(billingAccountName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param callback The callback + */ + listByBillingAccount(billingAccountName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @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 Payment Methods by billing profile Id. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param callback The callback + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @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 Payment Methods by billing account Id. + * @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 Payment Methods 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 listByBillingAccountOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/paymentMethods", + urlParameters: [ + Parameters.billingAccountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PaymentMethodsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingProfileOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/paymentMethods", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PaymentMethodsListResult + }, + 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.PaymentMethodsListResult + }, + 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.PaymentMethodsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; 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..0f684d9da4c9 --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/policies.ts @@ -0,0 +1,277 @@ +/* + * 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; + } + + /** + * The policy for a given billing account name and billing profile name. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param [options] The optional parameters + * @returns Promise + */ + getByBillingProfile(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param callback The callback + */ + getByBillingProfile(billingAccountName: string, billingProfileName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @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; + } + + /** + * The operation to update a policy. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param parameters Parameters supplied to the update policy operation. + * @param [options] The optional parameters + * @returns Promise + */ + update(billingAccountName: string, billingProfileName: string, parameters: Models.Policy, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param parameters Parameters supplied to the update policy operation. + * @param callback The callback + */ + update(billingAccountName: string, billingProfileName: string, parameters: Models.Policy, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param parameters Parameters supplied to the update policy 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; + } + + /** + * The policy for a given billing account name and customer name. + * @param billingAccountName billing Account Id. + * @param customerName Customer name. + * @param [options] The optional parameters + * @returns Promise + */ + getByCustomer(billingAccountName: string, customerName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param customerName Customer name. + * @param callback The callback + */ + getByCustomer(billingAccountName: string, customerName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param customerName Customer name. + * @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; + } + + /** + * The operation to update a Customer policy. + * @param billingAccountName billing Account Id. + * @param customerName Customer name. + * @param [options] The optional parameters + * @returns Promise + */ + updateCustomer(billingAccountName: string, customerName: string, options?: Models.PoliciesUpdateCustomerOptionalParams): Promise; + /** + * @param billingAccountName billing Account Id. + * @param customerName Customer name. + * @param callback The callback + */ + updateCustomer(billingAccountName: string, customerName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param customerName Customer name. + * @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.apiVersion + ], + 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.apiVersion + ], + 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.apiVersion + ], + 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.apiVersion + ], + 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/priceSheet.ts b/sdk/billing/arm-billing/src/operations/priceSheet.ts new file mode 100644 index 000000000000..1ee0fb0c71bf --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/priceSheet.ts @@ -0,0 +1,151 @@ +/* + * 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/priceSheetMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a PriceSheet. */ +export class PriceSheet { + private readonly client: BillingManagementClientContext; + + /** + * Create a PriceSheet. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * Download price sheet for an invoice. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceName Invoice Id. + * @param [options] The optional parameters + * @returns Promise + */ + download(billingAccountName: string, billingProfileName: string, invoiceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDownload(billingAccountName,billingProfileName,invoiceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Download price sheet for a billing profile. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param [options] The optional parameters + * @returns Promise + */ + downloadByBillingProfile(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDownloadByBillingProfile(billingAccountName,billingProfileName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Download price sheet for an invoice. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceName Invoice Id. + * @param [options] The optional parameters + * @returns Promise + */ + beginDownload(billingAccountName: string, billingProfileName: string, invoiceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + billingAccountName, + billingProfileName, + invoiceName, + options + }, + beginDownloadOperationSpec, + options); + } + + /** + * Download price sheet for a billing profile. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param [options] The optional parameters + * @returns Promise + */ + beginDownloadByBillingProfile(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + billingAccountName, + billingProfileName, + options + }, + beginDownloadByBillingProfileOperationSpec, + options); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const beginDownloadOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoices/{invoiceName}/pricesheet/default/download", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName, + Parameters.invoiceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DownloadUrl, + headersMapper: Mappers.PriceSheetDownloadHeaders + }, + 202: { + headersMapper: Mappers.PriceSheetDownloadHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginDownloadByBillingProfileOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/pricesheet/default/download", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DownloadUrl, + headersMapper: Mappers.PriceSheetDownloadByBillingProfileHeaders + }, + 202: { + headersMapper: Mappers.PriceSheetDownloadByBillingProfileHeaders + }, + 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..396a9ba27051 --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/products.ts @@ -0,0 +1,610 @@ +/* + * 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 products by customer id. + * @param billingAccountName billing Account Id. + * @param customerName Customer name. + * @param [options] The optional parameters + * @returns Promise + */ + listByCustomer(billingAccountName: string, customerName: string, options?: Models.ProductsListByCustomerOptionalParams): Promise; + /** + * @param billingAccountName billing Account Id. + * @param customerName Customer name. + * @param callback The callback + */ + listByCustomer(billingAccountName: string, customerName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param customerName Customer name. + * @param options The optional parameters + * @param callback The callback + */ + listByCustomer(billingAccountName: string, customerName: string, options: Models.ProductsListByCustomerOptionalParams, callback: msRest.ServiceCallback): void; + listByCustomer(billingAccountName: string, customerName: string, options?: Models.ProductsListByCustomerOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + customerName, + options + }, + listByCustomerOperationSpec, + callback) as Promise; + } + + /** + * Get a customer's product by name. + * @param billingAccountName billing Account Id. + * @param customerName Customer name. + * @param productName Invoice Id. + * @param [options] The optional parameters + * @returns Promise + */ + getByCustomer(billingAccountName: string, customerName: string, productName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param customerName Customer name. + * @param productName Invoice Id. + * @param callback The callback + */ + getByCustomer(billingAccountName: string, customerName: string, productName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param customerName Customer name. + * @param productName Invoice Id. + * @param options The optional parameters + * @param callback The callback + */ + getByCustomer(billingAccountName: string, customerName: string, productName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getByCustomer(billingAccountName: string, customerName: string, productName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + customerName, + productName, + options + }, + getByCustomerOperationSpec, + callback) as Promise; + } + + /** + * Lists products by billing account name. + * @param billingAccountName billing Account Id. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingAccount(billingAccountName: string, options?: Models.ProductsListByBillingAccountOptionalParams): Promise; + /** + * @param billingAccountName billing Account Id. + * @param callback The callback + */ + listByBillingAccount(billingAccountName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @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 products by invoice section name. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param [options] The optional parameters + * @returns Promise + */ + listByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, options?: Models.ProductsListByInvoiceSectionOptionalParams): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param callback The callback + */ + listByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @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; + } + + /** + * Get a single product by name. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param productName Invoice Id. + * @param [options] The optional parameters + * @returns Promise + */ + get(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, productName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param productName Invoice Id. + * @param callback The callback + */ + get(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, productName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param productName Invoice Id. + * @param options The optional parameters + * @param callback The callback + */ + get(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, productName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, productName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + invoiceSectionName, + productName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * The operation to transfer a Product to another invoice section. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param productName Invoice Id. + * @param parameters Parameters supplied to the Transfer Product operation. + * @param [options] The optional parameters + * @returns Promise + */ + transfer(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, productName: string, parameters: Models.TransferProductRequestProperties, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param productName Invoice Id. + * @param parameters Parameters supplied to the Transfer Product operation. + * @param callback The callback + */ + transfer(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, productName: string, parameters: Models.TransferProductRequestProperties, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param productName Invoice Id. + * @param parameters Parameters supplied to the Transfer Product operation. + * @param options The optional parameters + * @param callback The callback + */ + transfer(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, productName: string, parameters: Models.TransferProductRequestProperties, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + transfer(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, productName: string, parameters: Models.TransferProductRequestProperties, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + invoiceSectionName, + productName, + parameters, + options + }, + transferOperationSpec, + callback) as Promise; + } + + /** + * Validates the transfer of products across invoice sections. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param productName Invoice Id. + * @param parameters Parameters supplied to the Transfer Products operation. + * @param [options] The optional parameters + * @returns Promise + */ + validateTransfer(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, productName: string, parameters: Models.TransferProductRequestProperties, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param productName Invoice Id. + * @param parameters Parameters supplied to the Transfer Products operation. + * @param callback The callback + */ + validateTransfer(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, productName: string, parameters: Models.TransferProductRequestProperties, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param productName Invoice Id. + * @param parameters Parameters supplied to the Transfer Products operation. + * @param options The optional parameters + * @param callback The callback + */ + validateTransfer(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, productName: string, parameters: Models.TransferProductRequestProperties, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + validateTransfer(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, productName: string, parameters: Models.TransferProductRequestProperties, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + invoiceSectionName, + productName, + parameters, + options + }, + validateTransferOperationSpec, + callback) as Promise; + } + + /** + * Cancel auto renew for product by product id and invoice section name + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param productName Invoice Id. + * @param [options] The optional parameters + * @returns Promise + */ + updateAutoRenewByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, productName: string, options?: Models.ProductsUpdateAutoRenewByInvoiceSectionOptionalParams): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param productName Invoice Id. + * @param callback The callback + */ + updateAutoRenewByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, productName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param productName Invoice Id. + * @param options The optional parameters + * @param callback The callback + */ + updateAutoRenewByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, productName: string, options: Models.ProductsUpdateAutoRenewByInvoiceSectionOptionalParams, callback: msRest.ServiceCallback): void; + updateAutoRenewByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, productName: string, options?: Models.ProductsUpdateAutoRenewByInvoiceSectionOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + invoiceSectionName, + productName, + options + }, + updateAutoRenewByInvoiceSectionOperationSpec, + callback) as Promise; + } + + /** + * Lists products by billing account name. + * @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 listByCustomerOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/products", + urlParameters: [ + Parameters.billingAccountName, + Parameters.customerName + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.filter + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ProductsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getByCustomerOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/products/{productName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.customerName, + Parameters.productName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Product + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingAccountOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/products", + urlParameters: [ + Parameters.billingAccountName + ], + queryParameters: [ + Parameters.apiVersion, + 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.apiVersion, + 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}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/products/{productName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName, + Parameters.invoiceSectionName, + Parameters.productName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Product + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const transferOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/products/{productName}/transfer", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName, + Parameters.invoiceSectionName, + Parameters.productName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.TransferProductRequestProperties, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Product, + headersMapper: Mappers.ProductsTransferHeaders + }, + 202: { + headersMapper: Mappers.ProductsTransferHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const validateTransferOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/products/{productName}/validateTransferEligibility", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName, + Parameters.invoiceSectionName, + Parameters.productName + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.TransferProductRequestProperties, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ValidateProductTransferEligibilityResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const updateAutoRenewByInvoiceSectionOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/products/{productName}/updateAutoRenew", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName, + Parameters.invoiceSectionName, + Parameters.productName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + autoRenew: [ + "options", + "autoRenew" + ] + }, + mapper: { + ...Mappers.UpdateAutoRenewRequest, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.UpdateAutoRenewOperation + }, + 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 +}; diff --git a/sdk/billing/arm-billing/src/operations/recipientTransfers.ts b/sdk/billing/arm-billing/src/operations/recipientTransfers.ts new file mode 100644 index 000000000000..1df76170e621 --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/recipientTransfers.ts @@ -0,0 +1,336 @@ +/* + * 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/recipientTransfersMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a RecipientTransfers. */ +export class RecipientTransfers { + private readonly client: BillingManagementClientContext; + + /** + * Create a RecipientTransfers. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * @summary Accepts the transfer with given transfer Id. + * @param transferName Transfer Name. + * @param [options] The optional parameters + * @returns Promise + */ + accept(transferName: string, options?: Models.RecipientTransfersAcceptOptionalParams): Promise; + /** + * @param transferName Transfer Name. + * @param callback The callback + */ + accept(transferName: string, callback: msRest.ServiceCallback): void; + /** + * @param transferName Transfer Name. + * @param options The optional parameters + * @param callback The callback + */ + accept(transferName: string, options: Models.RecipientTransfersAcceptOptionalParams, callback: msRest.ServiceCallback): void; + accept(transferName: string, options?: Models.RecipientTransfersAcceptOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + transferName, + options + }, + acceptOperationSpec, + callback) as Promise; + } + + /** + * @summary Validates if the products can be transferred in the context of the given transfer name. + * @param transferName Transfer Name. + * @param [options] The optional parameters + * @returns Promise + */ + validate(transferName: string, options?: Models.RecipientTransfersValidateOptionalParams): Promise; + /** + * @param transferName Transfer Name. + * @param callback The callback + */ + validate(transferName: string, callback: msRest.ServiceCallback): void; + /** + * @param transferName Transfer Name. + * @param options The optional parameters + * @param callback The callback + */ + validate(transferName: string, options: Models.RecipientTransfersValidateOptionalParams, callback: msRest.ServiceCallback): void; + validate(transferName: string, options?: Models.RecipientTransfersValidateOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + transferName, + options + }, + validateOperationSpec, + callback) as Promise; + } + + /** + * @summary Declines the transfer with given transfer Id. + * @param transferName Transfer Name. + * @param [options] The optional parameters + * @returns Promise + */ + decline(transferName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param transferName Transfer Name. + * @param callback The callback + */ + decline(transferName: string, callback: msRest.ServiceCallback): void; + /** + * @param transferName Transfer Name. + * @param options The optional parameters + * @param callback The callback + */ + decline(transferName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + decline(transferName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + transferName, + options + }, + declineOperationSpec, + callback) as Promise; + } + + /** + * @summary Gets the transfer with given transfer Id. + * @param transferName Transfer Name. + * @param [options] The optional parameters + * @returns Promise + */ + get(transferName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param transferName Transfer Name. + * @param callback The callback + */ + get(transferName: string, callback: msRest.ServiceCallback): void; + /** + * @param transferName Transfer Name. + * @param options The optional parameters + * @param callback The callback + */ + get(transferName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(transferName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + transferName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * @summary Lists the transfers received by caller. + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * @summary Lists the transfers received by caller. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const acceptOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "providers/Microsoft.Billing/transfers/{transferName}/acceptTransfer", + urlParameters: [ + Parameters.transferName + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + productDetails: [ + "options", + "productDetails" + ] + }, + mapper: { + ...Mappers.AcceptTransferRequest, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.RecipientTransferDetails + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const validateOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "providers/Microsoft.Billing/transfers/{transferName}/validateTransfer", + urlParameters: [ + Parameters.transferName + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + productDetails: [ + "options", + "productDetails" + ] + }, + mapper: { + ...Mappers.AcceptTransferRequest, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ValidateTransferListResponse + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const declineOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "providers/Microsoft.Billing/transfers/{transferName}/declineTransfer", + urlParameters: [ + Parameters.transferName + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RecipientTransferDetails + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/transfers/{transferName}", + urlParameters: [ + Parameters.transferName + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RecipientTransferDetails + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/transfers", + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RecipientTransferDetailsListResult + }, + 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.RecipientTransferDetailsListResult + }, + 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..57ada95a1465 --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/transactions.ts @@ -0,0 +1,597 @@ +/* + * 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 billed and unbilled transactions by customer id for given start date and end date. + * Transactions include purchases, refunds and Azure usage charges. Unbilled transactions are + * listed under pending invoice Id and do not include tax. Tax is added to the amount once an + * invoice is generated. + * @param billingAccountName billing Account Id. + * @param customerName Customer name. + * @param periodStartDate Start date + * @param periodEndDate End date + * @param [options] The optional parameters + * @returns Promise + */ + listByCustomer(billingAccountName: string, customerName: string, periodStartDate: string, periodEndDate: string, options?: Models.TransactionsListByCustomerOptionalParams): Promise; + /** + * @param billingAccountName billing Account Id. + * @param customerName Customer name. + * @param periodStartDate Start date + * @param periodEndDate End date + * @param callback The callback + */ + listByCustomer(billingAccountName: string, customerName: string, periodStartDate: string, periodEndDate: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param customerName Customer name. + * @param periodStartDate Start date + * @param periodEndDate End date + * @param options The optional parameters + * @param callback The callback + */ + listByCustomer(billingAccountName: string, customerName: string, periodStartDate: string, periodEndDate: string, options: Models.TransactionsListByCustomerOptionalParams, callback: msRest.ServiceCallback): void; + listByCustomer(billingAccountName: string, customerName: string, periodStartDate: string, periodEndDate: string, options?: Models.TransactionsListByCustomerOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + customerName, + periodStartDate, + periodEndDate, + options + }, + listByCustomerOperationSpec, + callback) as Promise; + } + + /** + * Lists the billed and unbilled transactions by billing account name for given start and end date. + * Transactions include purchases, refunds and Azure usage charges. Unbilled transactions are + * listed under pending invoice ID and do not include tax. Tax is added to the amount once an + * invoice is generated. + * @param billingAccountName billing Account Id. + * @param periodStartDate Start date + * @param periodEndDate End date + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingAccount(billingAccountName: string, periodStartDate: string, periodEndDate: string, options?: Models.TransactionsListByBillingAccountOptionalParams): Promise; + /** + * @param billingAccountName billing Account Id. + * @param periodStartDate Start date + * @param periodEndDate End date + * @param callback The callback + */ + listByBillingAccount(billingAccountName: string, periodStartDate: string, periodEndDate: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param periodStartDate Start date + * @param periodEndDate End date + * @param options The optional parameters + * @param callback The callback + */ + listByBillingAccount(billingAccountName: string, periodStartDate: string, periodEndDate: string, options: Models.TransactionsListByBillingAccountOptionalParams, callback: msRest.ServiceCallback): void; + listByBillingAccount(billingAccountName: string, periodStartDate: string, periodEndDate: string, options?: Models.TransactionsListByBillingAccountOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + periodStartDate, + periodEndDate, + options + }, + listByBillingAccountOperationSpec, + callback) as Promise; + } + + /** + * Lists the billed and unbilled transactions by billing profile name for given start date and end + * date. Transactions include purchases, refunds and Azure usage charges. Unbilled transactions are + * listed under pending invoice Id and do not include tax. Tax is added to the amount once an + * invoice is generated. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param periodStartDate Start date + * @param periodEndDate End date + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, periodStartDate: string, periodEndDate: string, options?: Models.TransactionsListByBillingProfileOptionalParams): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param periodStartDate Start date + * @param periodEndDate End date + * @param callback The callback + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, periodStartDate: string, periodEndDate: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param periodStartDate Start date + * @param periodEndDate End date + * @param options The optional parameters + * @param callback The callback + */ + listByBillingProfile(billingAccountName: string, billingProfileName: string, periodStartDate: string, periodEndDate: string, options: Models.TransactionsListByBillingProfileOptionalParams, callback: msRest.ServiceCallback): void; + listByBillingProfile(billingAccountName: string, billingProfileName: string, periodStartDate: string, periodEndDate: string, options?: Models.TransactionsListByBillingProfileOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + periodStartDate, + periodEndDate, + options + }, + listByBillingProfileOperationSpec, + callback) as Promise; + } + + /** + * Lists the billed and unbilled transactions by invoice section name for given start date and end + * date. Transactions include purchases, refunds and Azure usage charges. Unbilled transactions are + * listed under pending invoice Id and do not include tax. Tax is added to the amount once an + * invoice is generated. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param periodStartDate Start date + * @param periodEndDate End date + * @param [options] The optional parameters + * @returns Promise + */ + listByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, periodStartDate: string, periodEndDate: string, options?: Models.TransactionsListByInvoiceSectionOptionalParams): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param periodStartDate Start date + * @param periodEndDate End date + * @param callback The callback + */ + listByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, periodStartDate: string, periodEndDate: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param periodStartDate Start date + * @param periodEndDate End date + * @param options The optional parameters + * @param callback The callback + */ + listByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, periodStartDate: string, periodEndDate: string, options: Models.TransactionsListByInvoiceSectionOptionalParams, callback: msRest.ServiceCallback): void; + listByInvoiceSection(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, periodStartDate: string, periodEndDate: string, options?: Models.TransactionsListByInvoiceSectionOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + invoiceSectionName, + periodStartDate, + periodEndDate, + options + }, + listByInvoiceSectionOperationSpec, + callback) as Promise; + } + + /** + * Lists the transactions by invoice. Transactions include purchases, refunds and Azure usage + * charges. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceName Invoice Id. + * @param [options] The optional parameters + * @returns Promise + */ + listByInvoice(billingAccountName: string, billingProfileName: string, invoiceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceName Invoice Id. + * @param callback The callback + */ + listByInvoice(billingAccountName: string, billingProfileName: string, invoiceName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceName Invoice Id. + * @param options The optional parameters + * @param callback The callback + */ + listByInvoice(billingAccountName: string, billingProfileName: string, invoiceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByInvoice(billingAccountName: string, billingProfileName: string, invoiceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + invoiceName, + options + }, + listByInvoiceOperationSpec, + callback) as Promise; + } + + /** + * Get the transaction. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param transactionName Transaction name. + * @param periodStartDate Start date + * @param periodEndDate End date + * @param [options] The optional parameters + * @returns Promise + */ + get(billingAccountName: string, billingProfileName: string, transactionName: string, periodStartDate: string, periodEndDate: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param transactionName Transaction name. + * @param periodStartDate Start date + * @param periodEndDate End date + * @param callback The callback + */ + get(billingAccountName: string, billingProfileName: string, transactionName: string, periodStartDate: string, periodEndDate: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param transactionName Transaction name. + * @param periodStartDate Start date + * @param periodEndDate End date + * @param options The optional parameters + * @param callback The callback + */ + get(billingAccountName: string, billingProfileName: string, transactionName: string, periodStartDate: string, periodEndDate: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(billingAccountName: string, billingProfileName: string, transactionName: string, periodStartDate: string, periodEndDate: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + transactionName, + periodStartDate, + periodEndDate, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Lists the billed and unbilled transactions by customer id for given start date and end date. + * Transactions include purchases, refunds and Azure usage charges. Unbilled transactions are + * listed under pending invoice Id and do not include tax. Tax is added to the amount once an + * invoice is generated. + * @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 billed and unbilled transactions by billing account name for given start and end date. + * Transactions include purchases, refunds and Azure usage charges. Unbilled transactions are + * listed under pending invoice ID and do not include tax. Tax is added to the amount once an + * invoice is generated. + * @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 transactions by 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 listByCustomerOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/transactions", + urlParameters: [ + Parameters.billingAccountName, + Parameters.customerName + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.periodStartDate, + Parameters.periodEndDate, + Parameters.filter + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.TransactionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingAccountOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/transactions", + urlParameters: [ + Parameters.billingAccountName + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.periodStartDate, + Parameters.periodEndDate, + Parameters.filter + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.TransactionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingProfileOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/transactions", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.periodStartDate, + Parameters.periodEndDate, + Parameters.filter + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.TransactionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByInvoiceSectionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/transactions", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName, + Parameters.invoiceSectionName + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.periodStartDate, + Parameters.periodEndDate, + Parameters.filter + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.TransactionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByInvoiceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoices/{invoiceName}/transactions", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName, + Parameters.invoiceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.TransactionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/transactions/{transactionName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName, + Parameters.transactionName + ], + queryParameters: [ + Parameters.periodStartDate, + Parameters.periodEndDate, + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Transaction + }, + 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.TransactionListResult + }, + 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.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/src/operations/transfers.ts b/sdk/billing/arm-billing/src/operations/transfers.ts new file mode 100644 index 000000000000..8918dc6e9130 --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/transfers.ts @@ -0,0 +1,332 @@ +/* + * 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/transfersMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a Transfers. */ +export class Transfers { + private readonly client: BillingManagementClientContext; + + /** + * Create a Transfers. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * Initiates the request to transfer the legacy subscriptions or RIs. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param parameters Parameters supplied to initiate the transfer. + * @param [options] The optional parameters + * @returns Promise + */ + initiate(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, parameters: Models.InitiateTransferRequest, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param parameters Parameters supplied to initiate the transfer. + * @param callback The callback + */ + initiate(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, parameters: Models.InitiateTransferRequest, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param parameters Parameters supplied to initiate the transfer. + * @param options The optional parameters + * @param callback The callback + */ + initiate(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, parameters: Models.InitiateTransferRequest, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + initiate(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, parameters: Models.InitiateTransferRequest, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + invoiceSectionName, + parameters, + options + }, + initiateOperationSpec, + callback) as Promise; + } + + /** + * Gets the transfer details for given transfer Id. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param transferName Transfer Name. + * @param [options] The optional parameters + * @returns Promise + */ + get(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, transferName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param transferName Transfer Name. + * @param callback The callback + */ + get(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, transferName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param transferName Transfer Name. + * @param options The optional parameters + * @param callback The callback + */ + get(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, transferName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, transferName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + invoiceSectionName, + transferName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Cancels the transfer for given transfer Id. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param transferName Transfer Name. + * @param [options] The optional parameters + * @returns Promise + */ + cancel(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, transferName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param transferName Transfer Name. + * @param callback The callback + */ + cancel(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, transferName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param transferName Transfer Name. + * @param options The optional parameters + * @param callback The callback + */ + cancel(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, transferName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + cancel(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, transferName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + invoiceSectionName, + transferName, + options + }, + cancelOperationSpec, + callback) as Promise; + } + + /** + * Lists all transfer's details initiated from given invoice section. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param [options] The optional parameters + * @returns Promise + */ + list(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param callback The callback + */ + list(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceSectionName InvoiceSection Id. + * @param options The optional parameters + * @param callback The callback + */ + list(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(billingAccountName: string, billingProfileName: string, invoiceSectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + invoiceSectionName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Lists all transfer's details initiated from given invoice section. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const initiateOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/initiateTransfer", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName, + Parameters.invoiceSectionName + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.InitiateTransferRequest, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.TransferDetails + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/transfers/{transferName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName, + Parameters.invoiceSectionName, + Parameters.transferName + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.TransferDetails + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const cancelOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/transfers/{transferName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName, + Parameters.invoiceSectionName, + Parameters.transferName + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.TransferDetails + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/transfers", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName, + Parameters.invoiceSectionName + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.TransferDetailsListResult + }, + 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.TransferDetailsListResult + }, + 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