From af3c3dfba3fefdaeaaa1517f77ec0715699bfc43 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 21 May 2019 22:08:21 +0000 Subject: [PATCH] Generated from f30066455311383f4de879eaf46966f976c41ac7 resolved merge conflicts --- sdk/billing/arm-billing/LICENSE.txt | 2 +- sdk/billing/arm-billing/README.md | 21 +- sdk/billing/arm-billing/package.json | 10 +- sdk/billing/arm-billing/rollup.config.js | 22 +- .../src/billingManagementClient.ts | 40 +- .../src/billingManagementClientContext.ts | 4 +- .../src/models/agreementsMappers.ts | 40 + .../src/models/availableBalancesMappers.ts | 39 + .../src/models/billingAccountsMappers.ts | 40 + .../billingAccountsValidateAddressMappers.ts | 14 + .../src/models/billingPermissionsMappers.ts | 14 + .../src/models/billingProfilesMappers.ts | 41 + .../billingPropertyOperationsMappers.ts | 39 + .../models/billingRoleAssignmentsMappers.ts | 41 + .../models/billingRoleDefinitionsMappers.ts | 40 + .../src/models/billingSubscriptionsMappers.ts | 43 + .../src/models/departmentsMappers.ts | 40 + .../src/models/enrollmentAccountsMappers.ts | 42 +- sdk/billing/arm-billing/src/models/index.ts | 3767 +++++++++++++++-- .../src/models/invoiceSectionsMappers.ts | 43 + .../arm-billing/src/models/invoicesMappers.ts | 42 +- sdk/billing/arm-billing/src/models/mappers.ts | 2662 +++++++++++- .../src/models/operationsMappers.ts | 13 +- .../arm-billing/src/models/parameters.ts | 148 +- .../src/models/paymentMethodsMappers.ts | 40 + .../arm-billing/src/models/policiesMappers.ts | 39 + .../src/models/priceSheetMappers.ts | 14 + .../arm-billing/src/models/productsMappers.ts | 44 + .../src/models/recipientTransfersMappers.ts | 18 + .../src/models/transactionsMappers.ts | 40 + .../src/models/transfersMappers.ts | 17 + .../arm-billing/src/operations/agreements.ts | 139 + .../src/operations/availableBalances.ts | 86 + .../src/operations/billingAccounts.ts | 127 + .../billingAccountsValidateAddress.ts | 92 + .../src/operations/billingPermissions.ts | 193 + .../src/operations/billingProfiles.ts | 208 + .../operations/billingPropertyOperations.ts | 77 + .../src/operations/billingRoleAssignments.ts | 733 ++++ .../src/operations/billingRoleDefinitions.ts | 371 ++ .../src/operations/billingSubscriptions.ts | 375 ++ .../arm-billing/src/operations/departments.ts | 141 + .../src/operations/enrollmentAccounts.ts | 119 +- .../arm-billing/src/operations/index.ts | 20 +- .../src/operations/invoiceSections.ts | 431 ++ .../arm-billing/src/operations/invoices.ts | 193 +- .../src/operations/paymentMethods.ts | 235 + .../arm-billing/src/operations/policies.ts | 153 + .../arm-billing/src/operations/priceSheet.ts | 89 + .../arm-billing/src/operations/products.ts | 467 ++ .../src/operations/recipientTransfers.ts | 276 ++ .../src/operations/transactions.ts | 275 ++ .../arm-billing/src/operations/transfers.ts | 312 ++ 53 files changed, 11844 insertions(+), 687 deletions(-) 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/billingAccountsValidateAddressMappers.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/departmentsMappers.ts create mode 100644 sdk/billing/arm-billing/src/models/invoiceSectionsMappers.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/agreements.ts create mode 100644 sdk/billing/arm-billing/src/operations/availableBalances.ts create mode 100644 sdk/billing/arm-billing/src/operations/billingAccounts.ts create mode 100644 sdk/billing/arm-billing/src/operations/billingAccountsValidateAddress.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/departments.ts create mode 100644 sdk/billing/arm-billing/src/operations/invoiceSections.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..b73b4a1293c3 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) 2019 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/billing/arm-billing/README.md b/sdk/billing/arm-billing/README.md index e3c358bd1102..d0445dac16e3 100644 --- a/sdk/billing/arm-billing/README.md +++ b/sdk/billing/arm-billing/README.md @@ -9,23 +9,23 @@ 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 -``` +```bash npm install @azure/ms-rest-nodeauth ``` ##### 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 +34,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 +44,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 +78,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) => { @@ -94,6 +96,3 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to ## Related projects - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/billing/arm-billing/README.png) diff --git a/sdk/billing/arm-billing/package.json b/sdk/billing/arm-billing/package.json index 4c2a277cba40..5c5cc192dcb0 100644 --- a/sdk/billing/arm-billing/package.json +++ b/sdk/billing/arm-billing/package.json @@ -4,8 +4,8 @@ "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", + "@azure/ms-rest-azure-js": "^1.3.2", + "@azure/ms-rest-js": "^1.8.1", "tslib": "^1.9.3" }, "keywords": [ @@ -23,9 +23,10 @@ "typescript": "^3.1.1", "rollup": "^0.66.2", "rollup-plugin-node-resolve": "^3.4.0", + "rollup-plugin-sourcemaps": "^0.4.2", "uglify-js": "^3.4.9" }, - "homepage": "https://github.com/azure/azure-sdk-for-js/tree/master/sdk/billing/arm-billing", + "homepage": "https://github.com/azure/azure-sdk-for-js", "repository": { "type": "git", "url": "https://github.com/azure/azure-sdk-for-js.git" @@ -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..75249006e750 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({ module: true }), + sourcemaps() ] }; + export default config; diff --git a/sdk/billing/arm-billing/src/billingManagementClient.ts b/sdk/billing/arm-billing/src/billingManagementClient.ts index 171fe7188b39..f1f5fd077762 100644 --- a/sdk/billing/arm-billing/src/billingManagementClient.ts +++ b/sdk/billing/arm-billing/src/billingManagementClient.ts @@ -17,10 +17,28 @@ import { BillingManagementClientContext } from "./billingManagementClientContext class BillingManagementClient extends BillingManagementClientContext { // Operation groups + billingAccounts: operations.BillingAccounts; + paymentMethods: operations.PaymentMethods; + billingAccountsValidateAddress: operations.BillingAccountsValidateAddress; + availableBalances: operations.AvailableBalances; + billingProfiles: operations.BillingProfiles; + invoiceSections: operations.InvoiceSections; + departments: operations.Departments; enrollmentAccounts: operations.EnrollmentAccounts; - billingPeriods: operations.BillingPeriods; invoices: operations.Invoices; + priceSheet: operations.PriceSheet; + billingSubscriptions: operations.BillingSubscriptions; + products: operations.Products; + transactions: operations.Transactions; + policies: operations.Policies; + billingProperty: operations.BillingPropertyOperations; + transfers: operations.Transfers; + recipientTransfers: operations.RecipientTransfers; operations: operations.Operations; + billingPermissions: operations.BillingPermissions; + billingRoleDefinitions: operations.BillingRoleDefinitions; + billingRoleAssignments: operations.BillingRoleAssignments; + agreements: operations.Agreements; /** * Initializes a new instance of the BillingManagementClient class. @@ -30,10 +48,28 @@ 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.billingAccountsValidateAddress = new operations.BillingAccountsValidateAddress(this); + this.availableBalances = new operations.AvailableBalances(this); + this.billingProfiles = new operations.BillingProfiles(this); + this.invoiceSections = new operations.InvoiceSections(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.billingSubscriptions = new operations.BillingSubscriptions(this); + this.products = new operations.Products(this); + this.transactions = new operations.Transactions(this); + this.policies = new operations.Policies(this); + this.billingProperty = new operations.BillingPropertyOperations(this); + this.transfers = new operations.Transfers(this); + this.recipientTransfers = new operations.RecipientTransfers(this); this.operations = new operations.Operations(this); + this.billingPermissions = new operations.BillingPermissions(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..9be11d0cc4cc 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 = '2018-11-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/agreementsMappers.ts b/sdk/billing/arm-billing/src/models/agreementsMappers.ts new file mode 100644 index 000000000000..3034d29d066b --- /dev/null +++ b/sdk/billing/arm-billing/src/models/agreementsMappers.ts @@ -0,0 +1,40 @@ +/* + * 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 { + Address, + Agreement, + AgreementListResult, + Amount, + AvailableBalance, + BaseResource, + BillingAccount, + BillingPermissionsProperties, + BillingProfile, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscriptionSummary, + Department, + DownloadProperties, + EnabledAzureSKUs, + Enrollment, + EnrollmentAccount, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + InvoiceSection, + InvoiceSummary, + Participants, + PaymentMethod, + PaymentProperties, + Policy, + ProductSummary, + Resource, + TransactionsSummary +} 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..bfa4cb364291 --- /dev/null +++ b/sdk/billing/arm-billing/src/models/availableBalancesMappers.ts @@ -0,0 +1,39 @@ +/* + * 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 { + Address, + Agreement, + Amount, + AvailableBalance, + BaseResource, + BillingAccount, + BillingPermissionsProperties, + BillingProfile, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscriptionSummary, + Department, + DownloadProperties, + EnabledAzureSKUs, + Enrollment, + EnrollmentAccount, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + InvoiceSection, + InvoiceSummary, + Participants, + PaymentMethod, + PaymentProperties, + Policy, + ProductSummary, + Resource, + TransactionsSummary +} 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..35c680452ea5 --- /dev/null +++ b/sdk/billing/arm-billing/src/models/billingAccountsMappers.ts @@ -0,0 +1,40 @@ +/* + * 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 { + Address, + Agreement, + Amount, + AvailableBalance, + BaseResource, + BillingAccount, + BillingAccountListResult, + BillingPermissionsProperties, + BillingProfile, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscriptionSummary, + Department, + DownloadProperties, + EnabledAzureSKUs, + Enrollment, + EnrollmentAccount, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + InvoiceSection, + InvoiceSummary, + Participants, + PaymentMethod, + PaymentProperties, + Policy, + ProductSummary, + Resource, + TransactionsSummary +} from "../models/mappers"; diff --git a/sdk/billing/arm-billing/src/models/billingAccountsValidateAddressMappers.ts b/sdk/billing/arm-billing/src/models/billingAccountsValidateAddressMappers.ts new file mode 100644 index 000000000000..80e1795098b1 --- /dev/null +++ b/sdk/billing/arm-billing/src/models/billingAccountsValidateAddressMappers.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 { + Address, + ErrorDetails, + ErrorResponse, + ValidateAddressResponse +} 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..c3b8272db4a6 --- /dev/null +++ b/sdk/billing/arm-billing/src/models/billingProfilesMappers.ts @@ -0,0 +1,41 @@ +/* + * 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 { + Address, + Agreement, + Amount, + AvailableBalance, + BaseResource, + BillingAccount, + BillingPermissionsProperties, + BillingProfile, + BillingProfileListResult, + BillingProfilesUpdateHeaders, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscriptionSummary, + Department, + DownloadProperties, + EnabledAzureSKUs, + Enrollment, + EnrollmentAccount, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + InvoiceSection, + InvoiceSummary, + Participants, + PaymentMethod, + PaymentProperties, + Policy, + ProductSummary, + Resource, + TransactionsSummary +} 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..bfa4cb364291 --- /dev/null +++ b/sdk/billing/arm-billing/src/models/billingPropertyOperationsMappers.ts @@ -0,0 +1,39 @@ +/* + * 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 { + Address, + Agreement, + Amount, + AvailableBalance, + BaseResource, + BillingAccount, + BillingPermissionsProperties, + BillingProfile, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscriptionSummary, + Department, + DownloadProperties, + EnabledAzureSKUs, + Enrollment, + EnrollmentAccount, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + InvoiceSection, + InvoiceSummary, + Participants, + PaymentMethod, + PaymentProperties, + Policy, + ProductSummary, + Resource, + TransactionsSummary +} 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..31dc13e4bcfa --- /dev/null +++ b/sdk/billing/arm-billing/src/models/billingRoleAssignmentsMappers.ts @@ -0,0 +1,41 @@ +/* + * 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 { + Address, + Agreement, + Amount, + AvailableBalance, + BaseResource, + BillingAccount, + BillingPermissionsProperties, + BillingProfile, + BillingProperty, + BillingRoleAssignment, + BillingRoleAssignmentListResult, + BillingRoleAssignmentPayload, + BillingRoleDefinition, + BillingSubscriptionSummary, + Department, + DownloadProperties, + EnabledAzureSKUs, + Enrollment, + EnrollmentAccount, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + InvoiceSection, + InvoiceSummary, + Participants, + PaymentMethod, + PaymentProperties, + Policy, + ProductSummary, + Resource, + TransactionsSummary +} 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..3bc8fd7a90f6 --- /dev/null +++ b/sdk/billing/arm-billing/src/models/billingRoleDefinitionsMappers.ts @@ -0,0 +1,40 @@ +/* + * 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 { + Address, + Agreement, + Amount, + AvailableBalance, + BaseResource, + BillingAccount, + BillingPermissionsProperties, + BillingProfile, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingRoleDefinitionListResult, + BillingSubscriptionSummary, + Department, + DownloadProperties, + EnabledAzureSKUs, + Enrollment, + EnrollmentAccount, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + InvoiceSection, + InvoiceSummary, + Participants, + PaymentMethod, + PaymentProperties, + Policy, + ProductSummary, + Resource, + TransactionsSummary +} 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..fc2fb986faf7 --- /dev/null +++ b/sdk/billing/arm-billing/src/models/billingSubscriptionsMappers.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 { + Address, + Agreement, + Amount, + AvailableBalance, + BaseResource, + BillingAccount, + BillingPermissionsProperties, + BillingProfile, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscriptionsListResult, + BillingSubscriptionsTransferHeaders, + BillingSubscriptionSummary, + Department, + DownloadProperties, + EnabledAzureSKUs, + Enrollment, + EnrollmentAccount, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + InvoiceSection, + InvoiceSummary, + Participants, + PaymentMethod, + PaymentProperties, + Policy, + ProductSummary, + Resource, + TransactionsSummary, + TransferBillingSubscriptionRequestProperties, + TransferBillingSubscriptionResult +} 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..51a72944285b --- /dev/null +++ b/sdk/billing/arm-billing/src/models/departmentsMappers.ts @@ -0,0 +1,40 @@ +/* + * 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 { + Address, + Agreement, + Amount, + AvailableBalance, + BaseResource, + BillingAccount, + BillingPermissionsProperties, + BillingProfile, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscriptionSummary, + Department, + DepartmentListResult, + DownloadProperties, + EnabledAzureSKUs, + Enrollment, + EnrollmentAccount, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + InvoiceSection, + InvoiceSummary, + Participants, + PaymentMethod, + PaymentProperties, + Policy, + ProductSummary, + Resource, + TransactionsSummary +} 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..b61169842966 100644 --- a/sdk/billing/arm-billing/src/models/enrollmentAccountsMappers.ts +++ b/sdk/billing/arm-billing/src/models/enrollmentAccountsMappers.ts @@ -1,22 +1,40 @@ /* * 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, + Address, + Agreement, + Amount, + AvailableBalance, BaseResource, - ErrorResponse, + BillingAccount, + BillingPermissionsProperties, + BillingProfile, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscriptionSummary, + Department, + DownloadProperties, + EnabledAzureSKUs, + Enrollment, + EnrollmentAccount, + EnrollmentAccountListResult, + EnrollmentPolicies, ErrorDetails, - BillingPeriod, - Invoice, - DownloadUrl + ErrorResponse, + InvoiceSection, + InvoiceSummary, + Participants, + PaymentMethod, + PaymentProperties, + Policy, + ProductSummary, + Resource, + TransactionsSummary } 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..322167aa067a 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,3528 @@ import * as msRest from "@azure/ms-rest-js"; export { BaseResource, CloudError }; +/** + * Request parameters to initiate transfer. + */ +export interface InitiateTransferRequest { + /** + * Target Usage context for devTest subscriptions. + */ + billingProfileId?: string; + /** + * Email Id of recipient for transfer. + */ + recipientEmailId?: string; +} + +/** + * Address details. + */ +export interface Address { + /** + * 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; + /** + * Address Region. + */ + region?: string; + /** + * Country code uses ISO2, 2-digit format. + */ + country?: string; + /** + * Address Postal Code. + */ + postalCode?: string; +} + +/** + * Result of the address validation + */ +export interface ValidateAddressResponse { + /** + * status of the address validation. Possible values include: 'Valid', 'Invalid' + */ + status?: AddressValidationStatus; + /** + * list of suggested addresses. + */ + suggestedAddresses?: Address[]; + /** + * Validation error message. + */ + validationMessage?: string; +} + +/** + * Details of the product to be transferred. + */ +export interface ProductDetails { + /** + * Type of the product to be transferred. Possible values include: 'AzureSubscription', + * 'AzureReservation' + */ + productType?: ProductType; + /** + * Id of product to be transferred. + */ + productId?: string; +} + +/** + * Request parameters to accept transfer. + */ +export interface AcceptTransferRequest { + /** + * Request parameters to accept transfer. + */ + productDetails?: ProductDetails[]; +} + +/** + * 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; + /** + * 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; + /** + * 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 { + /** + * Destination invoice section id. + */ + destinationInvoiceSectionId?: 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; +} + +/** + * Request parameters to transfer billing subscription. + */ +export interface TransferBillingSubscriptionRequest { + /** + * The destination invoice section id. + */ + destinationInvoiceSectionId?: string; +} + +/** + * Summary of cancel product operation + */ +export interface UpdateAutoRenewOperationSummary { + /** + * The end date of this asset + */ + endDate?: Date; +} + +/** + * Details about the enabled azure sku. + */ +export interface EnabledAzureSKUs { + /** + * The sku id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly skuId?: string; + /** + * The sku description. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly skuDescription?: 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 billing profile resource. */ -export interface EnrollmentAccount extends Resource { +export interface BillingProfile extends Resource { + /** + * The billing profile name. + */ + displayName?: string; + /** + * Purchase order number. + */ + poNumber?: string; + /** + * Billing address. + */ + address?: Address; + /** + * If the billing profile is opted in to receive invoices via email. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceEmailOptIn?: boolean; + /** + * Is OMS bootstrapped billing profile. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly isClassic?: boolean; + /** + * Invoice day. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceDay?: number; /** - * @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 currency associated with the billing profile. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly principalName?: string; + readonly currency?: string; + /** + * Information about the product. + */ + enabledAzureSKUs?: EnabledAzureSKUs[]; + /** + * The invoice sections associated to the billing profile. + */ + invoiceSections?: InvoiceSection[]; } /** - * @interface - * An interface representing BillingPeriod. - * A billing period resource. - * - * @extends Resource + * The properties of an InvoiceSection. */ -export interface BillingPeriod extends Resource { +export interface InvoiceSectionProperties { + /** + * The name of the InvoiceSection. + */ + displayName?: 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.** + * The billing profiles associated to the billing account. */ - readonly billingPeriodStartDate?: Date; + billingProfiles?: BillingProfile[]; +} + +/** + * An InvoiceSection resource. + */ +export interface InvoiceSection extends Resource { /** - * @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.** + * The name of the InvoiceSection. */ - readonly billingPeriodEndDate?: Date; + displayName?: 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.** + * The billing profiles associated to the billing account. */ - readonly invoiceIds?: string[]; + billingProfiles?: BillingProfile[]; } /** - * @interface - * An interface representing DownloadUrl. - * A secure URL that can be used to download a PDF invoice until the URL - * expires. - * + * The attributes associated with legacy enrollment */ -export interface DownloadUrl { +export interface EnrollmentPolicies { /** - * @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.** + * The accountOwnerViewCharges flag for Enrollment + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly expiryTime?: Date; + readonly accountOwnerViewCharges?: boolean; /** - * @member {string} [url] The URL to the PDF file. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The departmentAdminViewCharges flag for Enrollment + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly url?: string; + 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; } /** - * @interface - * An interface representing ErrorDetails. - * The details of the error. - * + * Current entity level details */ -export interface ErrorDetails { +export interface Enrollment { /** - * @member {string} [code] Error code. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Enrollment Start Date */ - readonly code?: string; + startDate?: Date; /** - * @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.** + * Enrollment End Date */ - readonly message?: string; + endDate?: Date; /** - * @member {string} [target] The target of the particular error. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The currency associated with enrollment + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly target?: string; + 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[]; } /** - * @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. - * + * 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 billing account Type. Possible values include: 'Organization', 'Enrollment' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly accountType?: AccountType; + /** + * The address associated with billing account. + */ + address?: Address; + /** + * Company Name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly company?: string; + /** + * Country Name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly country?: string; + /** + * The invoice sections associated to the billing account. By default this is not populated, + * unless it's specified in $expand. + */ + invoiceSections?: InvoiceSection[]; + /** + * 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[]; + /** + * Specifies whether the user has read access on billing account. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly hasReadAccess?: boolean; +} + +/** + * 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; +} + +/** + * 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 name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingAccountName?: string; + /** + * Billing profile Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileId?: string; + /** + * Billing profile name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileName?: string; + /** + * 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 name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceSectionName?: 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; +} + +/** + * 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; +} + +/** + * 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; +} + +/** + * status of the Billing POST/PUT operation. + */ +export interface OperationStatus { + /** + * The operation Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * Status of the pending operation + */ + status?: string; + /** + * Status Detail of the pending operation + */ + statusDetail?: string; +} + +/** + * 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. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly value?: number; +} + +/** + * The properties of the invoice download. + */ +export interface DownloadProperties { + /** + * Document type. Possible values include: 'Invoice', 'VoidNote', 'Receipt', 'CreditNote' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly kind?: Kind; + /** + * 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; +} + +/** + * An invoice resource. + */ +export interface InvoiceSummary 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: 'PastDue', 'Due', 'Paid', 'Void' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly status?: Status; + /** + * 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; + /** + * 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 profile name this invoice belongs to. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileName?: 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 document urls available to download including invoice and tax documents. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly documentUrls?: DownloadProperties[]; + /** + * List of payments. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly payments?: PaymentProperties[]; +} + +/** + * Result of listing invoices. + */ +export interface InvoiceListResult { + /** + * The list of invoices. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly value?: InvoiceSummary[]; + /** + * 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 product summary resource. + */ +export interface ProductSummary 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; + /** + * 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 name to which this product belongs. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceSectionName?: 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 name to which this product belongs. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileName?: string; +} + +/** + * A billing Subscription summary resource. + */ +export interface BillingSubscriptionSummary 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 name to which this product belongs. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileName?: 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 name to which this product belongs. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceSectionName?: string; + /** + * 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 summary resource. + */ +export interface TransactionsSummary 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 name to which this product belongs. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceSectionName?: 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 name to which this product belongs. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileName?: 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 Policy. + */ +export interface Policy extends Resource { + /** + * The marketplacePurchasesAllowed flag. + */ + marketplacePurchasesAllowed?: boolean; + /** + * The reservationPurchasesAllowed flag. + */ + reservationPurchasesAllowed?: boolean; + /** + * The subscriptionOwnerCanViewCharges flag. + */ + subscriptionOwnerCanViewCharges?: boolean; +} + +/** + * 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 date. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly expiration?: Date; + /** + * 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 + * **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 billingRoleDefinitionName?: 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 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[]; +} + +/** + * 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 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[]; + /** + * 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[]; +} + +/** + * 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; +} + +/** + * Optional Parameters. + */ +export interface BillingAccountsListOptionalParams extends msRest.RequestOptionsBase { + /** + * May be used to expand the invoiceSections and billingProfiles. + */ + expand?: string; +} + +/** + * Optional Parameters. + */ +export interface BillingAccountsGetOptionalParams extends msRest.RequestOptionsBase { + /** + * May be used to expand the invoiceSections and billingProfiles. + */ + expand?: string; +} + +/** + * Optional Parameters. + */ +export interface BillingProfilesListByBillingAccountNameOptionalParams 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 InvoiceSectionsListByBillingAccountNameOptionalParams extends msRest.RequestOptionsBase { + /** + * May be used to expand the billingProfiles. + */ + expand?: string; +} + +/** + * Optional Parameters. + */ +export interface InvoiceSectionsListByCreateSubscriptionPermissionOptionalParams extends msRest.RequestOptionsBase { + /** + * May be used to expand the billingProfiles. + */ + expand?: string; +} + +/** + * Optional Parameters. + */ +export interface InvoiceSectionsGetOptionalParams extends msRest.RequestOptionsBase { + /** + * May be used to expand the billingProfiles. + */ + expand?: 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 BillingSubscriptionsTransferOptionalParams extends msRest.RequestOptionsBase { + /** + * The destination invoice section id. + */ + destinationInvoiceSectionId?: string; +} + +/** + * Optional Parameters. + */ +export interface BillingSubscriptionsBeginTransferOptionalParams extends msRest.RequestOptionsBase { + /** + * The destination invoice section id. + */ + destinationInvoiceSectionId?: string; +} + +/** + * Optional Parameters. + */ +export interface ProductsListByBillingAccountNameOptionalParams 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 ProductsListByInvoiceSectionNameOptionalParams 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 ProductsTransferOptionalParams extends msRest.RequestOptionsBase { + /** + * Destination invoice section id. + */ + destinationInvoiceSectionId?: string; +} + +/** + * Optional Parameters. + */ +export interface ProductsUpdateAutoRenewByBillingAccountNameOptionalParams extends msRest.RequestOptionsBase { + /** + * Request parameters to update auto renew policy a product. Possible values include: 'true', + * 'false' + */ + autoRenew?: UpdateAutoRenew; +} + +/** + * Optional Parameters. + */ +export interface ProductsUpdateAutoRenewByInvoiceSectionNameOptionalParams extends msRest.RequestOptionsBase { + /** + * Request parameters to update auto renew policy a product. Possible values include: 'true', + * 'false' + */ + autoRenew?: UpdateAutoRenew; +} + +/** + * Optional Parameters. + */ +export interface TransactionsListByBillingAccountNameOptionalParams 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 TransactionsListByBillingProfileNameOptionalParams 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 TransactionsListByInvoiceSectionNameOptionalParams 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 RecipientTransfersAcceptOptionalParams extends msRest.RequestOptionsBase { + /** + * Request parameters to accept transfer. + */ + productDetails?: ProductDetails[]; +} + +/** + * Optional Parameters. + */ +export interface AgreementsListByBillingAccountNameOptionalParams 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 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; + /** + * URI to poll for the operation status + */ + azureAsyncOperation: string; +} + +/** + * 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; + /** + * To get the progress of the operation, call GET operation on the URL in Azure-AsyncOperation + * header field. + */ + azureAsyncOperation: 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; + /** + * URI to poll for the operation status + */ + azureAsyncOperation: string; +} + +/** + * 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; + /** + * URI to poll for the operation status + */ + azureAsyncOperation: 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 billing subscriptions summary. + * @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 summary. 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 summary. + * @extends Array + */ +export interface TransactionsListResult 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 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 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 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'; + +/** + * Defines values for AccountType. + * Possible values include: 'Organization', 'Enrollment' + * @readonly + * @enum {string} + */ +export type AccountType = 'Organization' | 'Enrollment'; + +/** + * Defines values for Kind. + * Possible values include: 'Invoice', 'VoidNote', 'Receipt', 'CreditNote' + * @readonly + * @enum {string} + */ +export type Kind = 'Invoice' | 'VoidNote' | 'Receipt' | 'CreditNote'; + +/** + * Defines values for Status. + * Possible values include: 'PastDue', 'Due', 'Paid', 'Void' + * @readonly + * @enum {string} + */ +export type Status = 'PastDue' | 'Due' | 'Paid' | 'Void'; + +/** + * 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 listByBillingAccountName operation. + */ +export type PaymentMethodsListByBillingAccountNameResponse = 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 listByBillingProfileName operation. + */ +export type PaymentMethodsListByBillingProfileNameResponse = 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 listByBillingAccountNameNext operation. + */ +export type PaymentMethodsListByBillingAccountNameNextResponse = 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 listByBillingProfileNameNext operation. + */ +export type PaymentMethodsListByBillingProfileNameNextResponse = 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 post operation. + */ +export type BillingAccountsValidateAddressPostResponse = 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 listByBillingAccountName operation. + */ +export type BillingProfilesListByBillingAccountNameResponse = 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 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 listByBillingAccountName operation. + */ +export type InvoiceSectionsListByBillingAccountNameResponse = 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 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 listByBillingProfileName operation. + */ +export type InvoiceSectionsListByBillingProfileNameResponse = 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 listByCreateSubscriptionPermission operation. + */ +export type InvoiceSectionsListByCreateSubscriptionPermissionResponse = 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 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 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 listByBillingAccountName operation. + */ +export type InvoicesListByBillingAccountNameResponse = 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 = InvoiceSummary & { + /** + * 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: InvoiceSummary; + }; +}; + +/** + * 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 listByBillingAccountName operation. + */ +export type BillingSubscriptionsListByBillingAccountNameResponse = 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 listByBillingProfileName operation. + */ +export type BillingSubscriptionsListByBillingProfileNameResponse = 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 listByInvoiceSectionName operation. + */ +export type BillingSubscriptionsListByInvoiceSectionNameResponse = 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 = BillingSubscriptionSummary & { + /** + * 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: BillingSubscriptionSummary; + }; +}; + +/** + * 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 listByBillingAccountNameNext operation. + */ +export type BillingSubscriptionsListByBillingAccountNameNextResponse = 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 listByBillingAccountName operation. + */ +export type ProductsListByBillingAccountNameResponse = 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 listByInvoiceSectionName operation. + */ +export type ProductsListByInvoiceSectionNameResponse = 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 = ProductSummary & { + /** + * 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: ProductSummary; + }; +}; + +/** + * Contains response data for the transfer operation. + */ +export type ProductsTransferResponse = ProductSummary & 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: ProductSummary; + }; +}; + +/** + * Contains response data for the updateAutoRenewByBillingAccountName operation. + */ +export type ProductsUpdateAutoRenewByBillingAccountNameResponse = UpdateAutoRenewOperationSummary & { + /** + * 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: UpdateAutoRenewOperationSummary; + }; +}; + +/** + * Contains response data for the updateAutoRenewByInvoiceSectionName operation. + */ +export type ProductsUpdateAutoRenewByInvoiceSectionNameResponse = UpdateAutoRenewOperationSummary & { + /** + * 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: UpdateAutoRenewOperationSummary; + }; +}; + +/** + * Contains response data for the listByBillingAccountNameNext operation. + */ +export type ProductsListByBillingAccountNameNextResponse = 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 listByBillingAccountName operation. + */ +export type TransactionsListByBillingAccountNameResponse = TransactionsListResult & { + /** + * 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: TransactionsListResult; + }; +}; + +/** + * Contains response data for the listByBillingProfileName operation. + */ +export type TransactionsListByBillingProfileNameResponse = TransactionsListResult & { + /** + * 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: TransactionsListResult; + }; +}; + +/** + * Contains response data for the listByInvoiceSectionName operation. + */ +export type TransactionsListByInvoiceSectionNameResponse = TransactionsListResult & { + /** + * 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: TransactionsListResult; + }; +}; + +/** + * Contains response data for the listByBillingAccountNameNext operation. + */ +export type TransactionsListByBillingAccountNameNextResponse = TransactionsListResult & { + /** + * 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: TransactionsListResult; + }; +}; + +/** + * Contains response data for the getByBillingProfileName operation. + */ +export type PoliciesGetByBillingProfileNameResponse = 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 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 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 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 type RecipientTransfersListNextResponse = 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 list operation. + */ +export type OperationsListResponse = OperationListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationListResult; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type OperationsListNextResponse = OperationListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationListResult; + }; +}; + +/** + * Contains response data for the listByBillingAccount operation. */ -export interface ErrorResponse { +export type BillingPermissionsListByBillingAccountResponse = BillingPermissionsListResult & { /** - * @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: BillingPermissionsListResult; + }; +}; /** - * @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 listByInvoiceSections 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; +export type BillingPermissionsListByInvoiceSectionsResponse = BillingPermissionsListResult & { /** - * @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; - /** - * @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: BillingPermissionsListResult; + }; +}; /** - * @interface - * An interface representing OperationDisplay. - * The object that represents the operation. - * + * Contains response data for the listByBillingProfile operation. */ -export interface OperationDisplay { +export type BillingPermissionsListByBillingProfileResponse = BillingPermissionsListResult & { /** - * @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; - /** - * @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: BillingPermissionsListResult; + }; +}; /** - * @interface - * An interface representing Operation. - * A Billing REST API operation. - * + * Contains response data for the getByBillingAccountName operation. */ -export interface Operation { +export type BillingRoleDefinitionsGetByBillingAccountNameResponse = BillingRoleDefinition & { /** - * @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; - /** - * @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 getByInvoiceSectionName 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 BillingRoleDefinitionsGetByInvoiceSectionNameResponse = 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 getByBillingProfileName 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 BillingRoleDefinitionsGetByBillingProfileNameResponse = 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 listByBillingAccountName operation. */ -export interface BillingManagementClientOptions extends AzureServiceClientOptions { +export type BillingRoleDefinitionsListByBillingAccountNameResponse = 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 listByInvoiceSectionName operation. */ -export interface EnrollmentAccountListResult extends Array { +export type BillingRoleDefinitionsListByInvoiceSectionNameResponse = 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 listByBillingProfileName operation. */ -export interface BillingPeriodsListResult extends Array { +export type BillingRoleDefinitionsListByBillingProfileNameResponse = 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 deleteByBillingAccountName operation. */ -export interface OperationListResult extends Array { +export type BillingRoleAssignmentsDeleteByBillingAccountNameResponse = 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 getByInvoiceSectionName operation. */ -export type EnrollmentAccountsListResponse = EnrollmentAccountListResult & { +export type BillingRoleAssignmentsGetByInvoiceSectionNameResponse = BillingRoleAssignment & { /** * The underlying HTTP response. */ @@ -396,17 +3541,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 deleteByInvoiceSectionName operation. */ -export type EnrollmentAccountsGetResponse = EnrollmentAccount & { +export type BillingRoleAssignmentsDeleteByInvoiceSectionNameResponse = BillingRoleAssignment & { /** * The underlying HTTP response. */ @@ -415,17 +3561,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 getByBillingProfileName operation. */ -export type EnrollmentAccountsListNextResponse = EnrollmentAccountListResult & { +export type BillingRoleAssignmentsGetByBillingProfileNameResponse = BillingRoleAssignment & { /** * The underlying HTTP response. */ @@ -434,17 +3581,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 deleteByBillingProfileName operation. */ -export type BillingPeriodsListResponse = BillingPeriodsListResult & { +export type BillingRoleAssignmentsDeleteByBillingProfileNameResponse = BillingRoleAssignment & { /** * The underlying HTTP response. */ @@ -453,17 +3601,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 listByBillingAccountName operation. */ -export type BillingPeriodsGetResponse = BillingPeriod & { +export type BillingRoleAssignmentsListByBillingAccountNameResponse = BillingRoleAssignmentListResult & { /** * The underlying HTTP response. */ @@ -472,17 +3621,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 addByBillingAccountName operation. */ -export type BillingPeriodsListNextResponse = BillingPeriodsListResult & { +export type BillingRoleAssignmentsAddByBillingAccountNameResponse = BillingRoleAssignmentListResult & { /** * The underlying HTTP response. */ @@ -491,17 +3641,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 listByInvoiceSectionName operation. */ -export type InvoicesListResponse = InvoicesListResult & { +export type BillingRoleAssignmentsListByInvoiceSectionNameResponse = BillingRoleAssignmentListResult & { /** * The underlying HTTP response. */ @@ -510,17 +3661,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 addByInvoiceSectionName operation. */ -export type InvoicesGetResponse = Invoice & { +export type BillingRoleAssignmentsAddByInvoiceSectionNameResponse = BillingRoleAssignmentListResult & { /** * The underlying HTTP response. */ @@ -529,17 +3681,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 listByBillingProfileName operation. */ -export type InvoicesGetLatestResponse = Invoice & { +export type BillingRoleAssignmentsListByBillingProfileNameResponse = BillingRoleAssignmentListResult & { /** * The underlying HTTP response. */ @@ -548,17 +3701,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 addByBillingProfileName operation. */ -export type InvoicesListNextResponse = InvoicesListResult & { +export type BillingRoleAssignmentsAddByBillingProfileNameResponse = BillingRoleAssignmentListResult & { /** * The underlying HTTP response. */ @@ -567,17 +3721,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 listByBillingAccountName operation. */ -export type OperationsListResponse = OperationListResult & { +export type AgreementsListByBillingAccountNameResponse = AgreementListResult & { /** * The underlying HTTP response. */ @@ -586,17 +3741,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 +3761,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/invoiceSectionsMappers.ts b/sdk/billing/arm-billing/src/models/invoiceSectionsMappers.ts new file mode 100644 index 000000000000..2ac8780a0b8e --- /dev/null +++ b/sdk/billing/arm-billing/src/models/invoiceSectionsMappers.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 { + Address, + Agreement, + Amount, + AvailableBalance, + BaseResource, + BillingAccount, + BillingPermissionsProperties, + BillingProfile, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscriptionSummary, + Department, + DownloadProperties, + EnabledAzureSKUs, + Enrollment, + EnrollmentAccount, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + InvoiceSection, + InvoiceSectionListResult, + InvoiceSectionProperties, + InvoiceSectionsCreateHeaders, + InvoiceSectionsUpdateHeaders, + InvoiceSummary, + Participants, + PaymentMethod, + PaymentProperties, + Policy, + ProductSummary, + Resource, + TransactionsSummary +} 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..0b3b4eaf4658 100644 --- a/sdk/billing/arm-billing/src/models/invoicesMappers.ts +++ b/sdk/billing/arm-billing/src/models/invoicesMappers.ts @@ -1,22 +1,40 @@ /* * 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, + Address, + Agreement, + Amount, + AvailableBalance, BaseResource, - DownloadUrl, - ErrorResponse, - ErrorDetails, + BillingAccount, + BillingPermissionsProperties, + BillingProfile, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscriptionSummary, + Department, + DownloadProperties, + EnabledAzureSKUs, + Enrollment, EnrollmentAccount, - BillingPeriod + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + InvoiceListResult, + InvoiceSection, + InvoiceSummary, + Participants, + PaymentMethod, + PaymentProperties, + Policy, + ProductSummary, + Resource, + TransactionsSummary } 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..a0178cc6cb0c 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,2306 @@ import * as msRest from "@azure/ms-rest-js"; export const CloudError = CloudErrorMapper; export const BaseResource = BaseResourceMapper; +export const InitiateTransferRequest: msRest.CompositeMapper = { + serializedName: "InitiateTransferRequest", + type: { + name: "Composite", + className: "InitiateTransferRequest", + modelProperties: { + billingProfileId: { + serializedName: "properties.billingProfileId", + type: { + name: "String" + } + }, + recipientEmailId: { + serializedName: "properties.recipientEmailId", + type: { + name: "String" + } + } + } + } +}; + +export const Address: msRest.CompositeMapper = { + serializedName: "Address", + type: { + name: "Composite", + className: "Address", + 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: "Address" + } + } + } + }, + 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" + } + }, + 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" + } + }, + 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" + } + } + } + } +}; + +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" + } + } + } + } +}; + +export const TransferBillingSubscriptionRequest: msRest.CompositeMapper = { + serializedName: "TransferBillingSubscriptionRequest", + type: { + name: "Composite", + className: "TransferBillingSubscriptionRequest", + modelProperties: { + destinationInvoiceSectionId: { + serializedName: "properties.destinationInvoiceSectionId", + type: { + name: "String" + } + } + } + } +}; + +export const UpdateAutoRenewOperationSummary: msRest.CompositeMapper = { + serializedName: "UpdateAutoRenewOperationSummary", + type: { + name: "Composite", + className: "UpdateAutoRenewOperationSummary", + modelProperties: { + endDate: { + serializedName: "properties.endDate", + type: { + name: "DateTime" + } + } + } + } +}; + +export const EnabledAzureSKUs: msRest.CompositeMapper = { + serializedName: "EnabledAzureSKUs", + type: { + name: "Composite", + className: "EnabledAzureSKUs", + modelProperties: { + skuId: { + readOnly: true, + serializedName: "skuId", + type: { + name: "String" + } + }, + skuDescription: { + readOnly: true, + serializedName: "skuDescription", + 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 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: "Address" + } + }, + invoiceEmailOptIn: { + readOnly: true, + serializedName: "properties.invoiceEmailOptIn", + type: { + name: "Boolean" + } + }, + isClassic: { + readOnly: true, + serializedName: "properties.isClassic", + type: { + name: "Boolean" + } + }, + invoiceDay: { + readOnly: true, + serializedName: "properties.invoiceDay", + type: { + name: "Number" + } + }, + currency: { + readOnly: true, + serializedName: "properties.currency", + type: { + name: "String" + } + }, + enabledAzureSKUs: { + serializedName: "properties.enabledAzureSKUs", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EnabledAzureSKUs" + } + } + } + }, + invoiceSections: { + serializedName: "properties.invoiceSections", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "InvoiceSection" + } + } + } + } + } + } +}; + +export const InvoiceSectionProperties: msRest.CompositeMapper = { + serializedName: "InvoiceSectionProperties", + type: { + name: "Composite", + className: "InvoiceSectionProperties", + modelProperties: { + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + billingProfiles: { + serializedName: "billingProfiles", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BillingProfile" + } + } + } + } + } + } +}; + +export const InvoiceSection: msRest.CompositeMapper = { + serializedName: "InvoiceSection", + type: { + name: "Composite", + className: "InvoiceSection", + modelProperties: { + ...Resource.type.modelProperties, + displayName: { + serializedName: "properties.displayName", + type: { + name: "String" + } + }, + billingProfiles: { + serializedName: "properties.billingProfiles", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BillingProfile" + } + } + } + } + } + } +}; + +export const EnrollmentPolicies: msRest.CompositeMapper = { + serializedName: "EnrollmentPolicies", + type: { + name: "Composite", + className: "EnrollmentPolicies", + modelProperties: { + accountOwnerViewCharges: { + readOnly: true, + serializedName: "accountOwnerViewCharges", + type: { + name: "Boolean" + } + }, + departmentAdminViewCharges: { + readOnly: true, + serializedName: "departmentAdminViewCharges", + type: { + name: "Boolean" + } + }, + marketplacesEnabled: { + readOnly: true, + serializedName: "marketplacesEnabled", + type: { + name: "Boolean" + } + }, + reservedInstancesEnabled: { + readOnly: true, + serializedName: "reservedInstancesEnabled", + type: { + name: "Boolean" + } + } + } + } +}; + +export const Enrollment: msRest.CompositeMapper = { + serializedName: "Enrollment", + type: { + name: "Composite", + className: "Enrollment", + modelProperties: { + startDate: { + serializedName: "startDate", + type: { + name: "DateTime" + } + }, + endDate: { + serializedName: "endDate", + type: { + name: "DateTime" + } + }, + currency: { + readOnly: true, + serializedName: "currency", + type: { + name: "String" + } + }, + channel: { + readOnly: true, + serializedName: "channel", + type: { + name: "String" + } + }, + policies: { + readOnly: true, + serializedName: "policies", + type: { + name: "Composite", + className: "EnrollmentPolicies" + } + }, + language: { + readOnly: true, + serializedName: "language", + type: { + name: "String" + } + }, + countryCode: { + readOnly: true, + serializedName: "countryCode", + type: { + name: "String" + } + }, + status: { + readOnly: true, + serializedName: "status", + type: { + name: "String" + } + }, + billingCycle: { + readOnly: true, + serializedName: "billingCycle", + type: { + name: "String" + } + } + } + } +}; + +export const EnrollmentAccount: msRest.CompositeMapper = { + serializedName: "EnrollmentAccount", + type: { + name: "Composite", + className: "EnrollmentAccount", + modelProperties: { + ...Resource.type.modelProperties, + accountName: { + serializedName: "properties.accountName", + type: { + name: "String" + } + }, + costCenter: { + serializedName: "properties.costCenter", + type: { + name: "String" + } + }, + accountOwner: { + serializedName: "properties.accountOwner", + type: { + name: "String" + } + }, + status: { + serializedName: "properties.status", + type: { + name: "String" + } + }, + startDate: { + serializedName: "properties.startDate", + type: { + name: "DateTime" + } + }, + endDate: { + serializedName: "properties.endDate", + type: { + name: "DateTime" + } + }, + department: { + serializedName: "properties.department", + type: { + name: "Composite", + className: "Department" + } + } + } + } +}; + +export const Department: msRest.CompositeMapper = { + serializedName: "Department", + type: { + name: "Composite", + className: "Department", + modelProperties: { + ...Resource.type.modelProperties, + departmentName: { + serializedName: "properties.departmentName", + type: { + name: "String" + } + }, + costCenter: { + serializedName: "properties.costCenter", + type: { + name: "String" + } + }, + status: { + serializedName: "properties.status", + type: { + name: "String" + } + }, + enrollmentAccounts: { + serializedName: "properties.enrollmentAccounts", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EnrollmentAccount" + } + } + } + } + } + } +}; + +export const BillingAccount: msRest.CompositeMapper = { + serializedName: "BillingAccount", + type: { + name: "Composite", + className: "BillingAccount", + modelProperties: { + ...Resource.type.modelProperties, + displayName: { + readOnly: true, + serializedName: "properties.displayName", + type: { + name: "String" + } + }, + accountType: { + readOnly: true, + serializedName: "properties.accountType", + type: { + name: "String" + } + }, + address: { + serializedName: "properties.address", + type: { + name: "Composite", + className: "Address" + } + }, + company: { + readOnly: true, + serializedName: "properties.company", + type: { + name: "String" + } + }, + country: { + readOnly: true, + serializedName: "properties.country", + type: { + name: "String" + } + }, + invoiceSections: { + serializedName: "properties.invoiceSections", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "InvoiceSection" + } + } + } + }, + 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" + } + } + } + }, + hasReadAccess: { + readOnly: true, + serializedName: "properties.hasReadAccess", + type: { + name: "Boolean" + } + } + } + } +}; + +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 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" + } + }, + billingAccountName: { + readOnly: true, + serializedName: "properties.billingAccountName", + type: { + name: "String" + } + }, + billingProfileId: { + readOnly: true, + serializedName: "properties.billingProfileId", + type: { + name: "String" + } + }, + billingProfileName: { + readOnly: true, + serializedName: "properties.billingProfileName", + type: { + name: "String" + } + }, + costCenter: { + readOnly: true, + serializedName: "properties.costCenter", + type: { + name: "String" + } + }, + invoiceSectionId: { + readOnly: true, + serializedName: "properties.invoiceSectionId", + type: { + name: "String" + } + }, + invoiceSectionName: { + readOnly: true, + serializedName: "properties.invoiceSectionName", + 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 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 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 OperationStatus: msRest.CompositeMapper = { + serializedName: "OperationStatus", + type: { + name: "Composite", + className: "OperationStatus", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + }, + statusDetail: { + serializedName: "statusDetail", + type: { + name: "String" + } + } + } + } +}; + +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: { + readOnly: true, + serializedName: "value", + type: { + name: "Number" + } + } + } + } +}; + +export const DownloadProperties: msRest.CompositeMapper = { + serializedName: "DownloadProperties", + type: { + name: "Composite", + className: "DownloadProperties", + 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" + } + } + } + } +}; + +export const InvoiceSummary: msRest.CompositeMapper = { + serializedName: "InvoiceSummary", + type: { + name: "Composite", + className: "InvoiceSummary", + 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" + } + }, + billingProfileId: { + readOnly: true, + serializedName: "properties.billingProfileId", + type: { + name: "String" + } + }, + billingProfileName: { + readOnly: true, + serializedName: "properties.billingProfileName", + type: { + name: "String" + } + }, + purchaseOrderNumber: { + readOnly: true, + serializedName: "properties.purchaseOrderNumber", + type: { + name: "String" + } + }, + documentUrls: { + readOnly: true, + serializedName: "properties.documentUrls", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DownloadProperties" + } + } + } + }, + payments: { + readOnly: true, + serializedName: "properties.payments", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PaymentProperties" + } + } + } + } + } + } +}; + +export const InvoiceListResult: msRest.CompositeMapper = { + serializedName: "InvoiceListResult", + type: { + name: "Composite", + className: "InvoiceListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "InvoiceSummary" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ProductSummary: msRest.CompositeMapper = { + serializedName: "ProductSummary", + type: { + name: "Composite", + className: "ProductSummary", + 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" + } + }, + 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" + } + }, + invoiceSectionName: { + readOnly: true, + serializedName: "properties.invoiceSectionName", + type: { + name: "String" + } + }, + billingProfileId: { + readOnly: true, + serializedName: "properties.billingProfileId", + type: { + name: "String" + } + }, + billingProfileName: { + readOnly: true, + serializedName: "properties.billingProfileName", + type: { + name: "String" + } + } + } + } +}; + +export const BillingSubscriptionSummary: msRest.CompositeMapper = { + serializedName: "BillingSubscriptionSummary", + type: { + name: "Composite", + className: "BillingSubscriptionSummary", + 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" + } + }, + billingProfileName: { + readOnly: true, + serializedName: "properties.billingProfileName", + type: { + name: "String" + } + }, + invoiceSectionId: { + readOnly: true, + serializedName: "properties.invoiceSectionId", + type: { + name: "String" + } + }, + invoiceSectionName: { + readOnly: true, + serializedName: "properties.invoiceSectionName", + type: { + name: "String" + } + }, + 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 TransactionsSummary: msRest.CompositeMapper = { + serializedName: "TransactionsSummary", + type: { + name: "Composite", + className: "TransactionsSummary", + 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" + } + }, + invoiceSectionName: { + readOnly: true, + serializedName: "properties.invoiceSectionName", + type: { + name: "String" + } + }, + billingProfileId: { + readOnly: true, + serializedName: "properties.billingProfileId", + type: { + name: "String" + } + }, + billingProfileName: { + readOnly: true, + serializedName: "properties.billingProfileName", + type: { + name: "String" + } + }, + subscriptionId: { + readOnly: true, + serializedName: "properties.subscriptionId", + type: { + name: "String" + } + }, + subscriptionName: { + readOnly: true, + serializedName: "properties.subscriptionName", + type: { + name: "String" + } + } + } + } +}; + +export const Policy: msRest.CompositeMapper = { + serializedName: "Policy", + type: { + name: "Composite", + className: "Policy", + modelProperties: { + ...Resource.type.modelProperties, + marketplacePurchasesAllowed: { + serializedName: "properties.marketplacePurchasesAllowed", + type: { + name: "Boolean" + } + }, + reservationPurchasesAllowed: { + serializedName: "properties.reservationPurchasesAllowed", + type: { + name: "Boolean" + } + }, + subscriptionOwnerCanViewCharges: { + serializedName: "properties.subscriptionOwnerCanViewCharges", + type: { + name: "Boolean" + } + } + } + } +}; + +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: "DateTime" + } + }, + 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: { + readOnly: true, + serializedName: "principalId", + type: { + name: "String" + } + }, + billingRoleDefinitionName: { + readOnly: true, + serializedName: "billingRoleDefinitionName", + 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 BillingPermissionsListResult: msRest.CompositeMapper = { + serializedName: "BillingPermissionsListResult", + type: { + name: "Composite", + className: "BillingPermissionsListResult", modelProperties: { - id: { + value: { readOnly: true, - serializedName: "id", + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BillingPermissionsProperties" + } + } + } + } + } + } +}; + +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" } }, - name: { + value: { readOnly: true, - serializedName: "name", + serializedName: "properties.permissions.value", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BillingPermissionsProperties" + } + } } }, - type: { + roleName: { readOnly: true, - serializedName: "type", + serializedName: "properties.roleName", type: { name: "String" } @@ -45,16 +2320,52 @@ export const Resource: msRest.CompositeMapper = { } }; -export const EnrollmentAccount: msRest.CompositeMapper = { - serializedName: "EnrollmentAccount", +export const BillingRoleDefinitionListResult: msRest.CompositeMapper = { + serializedName: "BillingRoleDefinitionListResult", type: { name: "Composite", - className: "EnrollmentAccount", + className: "BillingRoleDefinitionListResult", modelProperties: { - ...Resource.type.modelProperties, - principalName: { + value: { + readOnly: true, + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BillingRoleDefinition" + } + } + } + } + } + } +}; + +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: "properties.principalName", + serializedName: "email", type: { name: "String" } @@ -63,59 +2374,79 @@ export const EnrollmentAccount: msRest.CompositeMapper = { } }; -export const BillingPeriod: msRest.CompositeMapper = { - serializedName: "BillingPeriod", +export const Agreement: msRest.CompositeMapper = { + serializedName: "Agreement", type: { name: "Composite", - className: "BillingPeriod", + className: "Agreement", modelProperties: { ...Resource.type.modelProperties, - billingPeriodStartDate: { + agreementLink: { readOnly: true, - serializedName: "properties.billingPeriodStartDate", + serializedName: "properties.agreementLink", type: { - name: "Date" + name: "String" } }, - billingPeriodEndDate: { + effectiveDate: { readOnly: true, - serializedName: "properties.billingPeriodEndDate", + serializedName: "properties.effectiveDate", type: { - name: "Date" + name: "DateTime" } }, - invoiceIds: { + expirationDate: { readOnly: true, - serializedName: "properties.invoiceIds", + serializedName: "properties.expirationDate", + type: { + name: "DateTime" + } + }, + participants: { + serializedName: "properties.participants", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "Participants" } } } + }, + status: { + readOnly: true, + serializedName: "properties.status", + type: { + name: "String" + } } } } }; -export const DownloadUrl: msRest.CompositeMapper = { - serializedName: "DownloadUrl", +export const AgreementListResult: msRest.CompositeMapper = { + serializedName: "AgreementListResult", type: { name: "Composite", - className: "DownloadUrl", + className: "AgreementListResult", modelProperties: { - expiryTime: { + value: { readOnly: true, - serializedName: "expiryTime", + serializedName: "value", type: { - name: "DateTime" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Agreement" + } + } } }, - url: { + nextLink: { readOnly: true, - serializedName: "url", + serializedName: "nextLink", type: { name: "String" } @@ -124,29 +2455,48 @@ export const DownloadUrl: msRest.CompositeMapper = { } }; -export const ErrorDetails: msRest.CompositeMapper = { - serializedName: "ErrorDetails", +export const BillingProfilesUpdateHeaders: msRest.CompositeMapper = { + serializedName: "billingprofiles-update-headers", type: { name: "Composite", - className: "ErrorDetails", + className: "BillingProfilesUpdateHeaders", modelProperties: { - code: { - readOnly: true, - serializedName: "code", + location: { + serializedName: "location", type: { name: "String" } }, - message: { - readOnly: true, - serializedName: "message", + retryAfter: { + serializedName: "retry-after", + type: { + name: "String" + } + } + } + } +}; + +export const InvoiceSectionsCreateHeaders: msRest.CompositeMapper = { + serializedName: "invoicesections-create-headers", + type: { + name: "Composite", + className: "InvoiceSectionsCreateHeaders", + modelProperties: { + location: { + serializedName: "location", type: { name: "String" } }, - target: { - readOnly: true, - serializedName: "target", + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number" + } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", type: { name: "String" } @@ -155,90 +2505,170 @@ export const ErrorDetails: msRest.CompositeMapper = { } }; -export const ErrorResponse: msRest.CompositeMapper = { - serializedName: "ErrorResponse", +export const InvoiceSectionsUpdateHeaders: msRest.CompositeMapper = { + serializedName: "invoicesections-update-headers", type: { name: "Composite", - className: "ErrorResponse", + className: "InvoiceSectionsUpdateHeaders", modelProperties: { - error: { - serializedName: "error", + location: { + serializedName: "location", type: { - name: "Composite", - className: "ErrorDetails" + name: "String" + } + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "String" } } } } }; -export const Invoice: msRest.CompositeMapper = { - serializedName: "Invoice", +export const PriceSheetDownloadHeaders: msRest.CompositeMapper = { + serializedName: "pricesheet-download-headers", type: { name: "Composite", - className: "Invoice", + className: "PriceSheetDownloadHeaders", modelProperties: { - ...Resource.type.modelProperties, - downloadUrl: { - serializedName: "properties.downloadUrl", + location: { + serializedName: "location", type: { - name: "Composite", - className: "DownloadUrl" + name: "String" } }, - invoicePeriodStartDate: { - readOnly: true, - serializedName: "properties.invoicePeriodStartDate", + retryAfter: { + serializedName: "retry-after", type: { - name: "Date" + name: "String" } }, - invoicePeriodEndDate: { - readOnly: true, - serializedName: "properties.invoicePeriodEndDate", + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + }, + oDataEntityId: { + serializedName: "odata-entityid", + type: { + name: "String" + } + } + } + } +}; + +export const BillingSubscriptionsTransferHeaders: msRest.CompositeMapper = { + serializedName: "billingsubscriptions-transfer-headers", + type: { + name: "Composite", + className: "BillingSubscriptionsTransferHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number" + } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const ProductsTransferHeaders: msRest.CompositeMapper = { + serializedName: "products-transfer-headers", + type: { + name: "Composite", + className: "ProductsTransferHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + retryAfter: { + serializedName: "retry-after", type: { - name: "Date" + name: "Number" } }, - billingPeriodIds: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const PaymentMethodsListResult: msRest.CompositeMapper = { + serializedName: "PaymentMethodsListResult", + type: { + name: "Composite", + className: "PaymentMethodsListResult", + modelProperties: { + value: { readOnly: true, - serializedName: "properties.billingPeriodIds", + serializedName: "", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "PaymentMethod" } } } + }, + 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: { - readOnly: true, - serializedName: "provider", - type: { - name: "String" - } - }, - resource: { + value: { readOnly: true, - serializedName: "resource", + serializedName: "", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BillingSubscriptionSummary" + } + } } }, - operation: { + nextLink: { readOnly: true, - serializedName: "operation", + serializedName: "nextLink", type: { name: "String" } @@ -247,35 +2677,41 @@ export const OperationDisplay: msRest.CompositeMapper = { } }; -export const Operation: msRest.CompositeMapper = { - serializedName: "Operation", +export const ProductsListResult: msRest.CompositeMapper = { + serializedName: "ProductsListResult", type: { name: "Composite", - className: "Operation", + className: "ProductsListResult", modelProperties: { - name: { + value: { readOnly: true, - serializedName: "name", + serializedName: "", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ProductSummary" + } + } } }, - display: { - serializedName: "display", + nextLink: { + readOnly: true, + serializedName: "nextLink", type: { - name: "Composite", - className: "OperationDisplay" + name: "String" } } } } }; -export const EnrollmentAccountListResult: msRest.CompositeMapper = { - serializedName: "EnrollmentAccountListResult", +export const TransactionsListResult: msRest.CompositeMapper = { + serializedName: "TransactionsListResult", type: { name: "Composite", - className: "EnrollmentAccountListResult", + className: "TransactionsListResult", modelProperties: { value: { readOnly: true, @@ -285,7 +2721,7 @@ export const EnrollmentAccountListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "EnrollmentAccount" + className: "TransactionsSummary" } } } @@ -301,11 +2737,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 +2751,7 @@ export const BillingPeriodsListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "BillingPeriod" + className: "TransferDetails" } } } @@ -331,11 +2767,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 +2781,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..3ee079a125b8 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 departmentName: msRest.OperationURLParameter = { + parameterPath: "departmentName", + mapper: { + required: true, + serializedName: "departmentName", + type: { + name: "String" + } + } +}; +export const endDate: msRest.OperationQueryParameter = { + parameterPath: "endDate", + mapper: { + required: true, + serializedName: "endDate", + type: { + name: "String" + } + } +}; +export const enrollmentAccountName: msRest.OperationURLParameter = { + parameterPath: "enrollmentAccountName", mapper: { required: true, - serializedName: "billingPeriodName", + serializedName: "enrollmentAccountName", type: { name: "String" } @@ -74,11 +154,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,13 +175,41 @@ export const nextPageLink: msRest.OperationURLParameter = { }, skipEncoding: true }; -export const skiptoken: msRest.OperationQueryParameter = { - parameterPath: [ - "options", - "skiptoken" - ], +export const periodEndDate: msRest.OperationQueryParameter = { + parameterPath: "periodEndDate", mapper: { - serializedName: "$skiptoken", + 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 startDate: msRest.OperationQueryParameter = { + parameterPath: "startDate", + mapper: { + required: true, + serializedName: "startDate", type: { name: "String" } @@ -117,19 +225,13 @@ export const subscriptionId: msRest.OperationURLParameter = { } } }; -export const top: msRest.OperationQueryParameter = { - parameterPath: [ - "options", - "top" - ], +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/paymentMethodsMappers.ts b/sdk/billing/arm-billing/src/models/paymentMethodsMappers.ts new file mode 100644 index 000000000000..33fb31547fed --- /dev/null +++ b/sdk/billing/arm-billing/src/models/paymentMethodsMappers.ts @@ -0,0 +1,40 @@ +/* + * 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 { + Address, + Agreement, + Amount, + AvailableBalance, + BaseResource, + BillingAccount, + BillingPermissionsProperties, + BillingProfile, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscriptionSummary, + Department, + DownloadProperties, + EnabledAzureSKUs, + Enrollment, + EnrollmentAccount, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + InvoiceSection, + InvoiceSummary, + Participants, + PaymentMethod, + PaymentMethodsListResult, + PaymentProperties, + Policy, + ProductSummary, + Resource, + TransactionsSummary +} 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..bfa4cb364291 --- /dev/null +++ b/sdk/billing/arm-billing/src/models/policiesMappers.ts @@ -0,0 +1,39 @@ +/* + * 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 { + Address, + Agreement, + Amount, + AvailableBalance, + BaseResource, + BillingAccount, + BillingPermissionsProperties, + BillingProfile, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscriptionSummary, + Department, + DownloadProperties, + EnabledAzureSKUs, + Enrollment, + EnrollmentAccount, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + InvoiceSection, + InvoiceSummary, + Participants, + PaymentMethod, + PaymentProperties, + Policy, + ProductSummary, + Resource, + TransactionsSummary +} 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..922d380ae8e7 --- /dev/null +++ b/sdk/billing/arm-billing/src/models/priceSheetMappers.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 { + DownloadUrl, + ErrorDetails, + ErrorResponse, + 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..8703ce781aab --- /dev/null +++ b/sdk/billing/arm-billing/src/models/productsMappers.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 { + Address, + Agreement, + Amount, + AvailableBalance, + BaseResource, + BillingAccount, + BillingPermissionsProperties, + BillingProfile, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscriptionSummary, + Department, + DownloadProperties, + EnabledAzureSKUs, + Enrollment, + EnrollmentAccount, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + InvoiceSection, + InvoiceSummary, + Participants, + PaymentMethod, + PaymentProperties, + Policy, + ProductsListResult, + ProductsTransferHeaders, + ProductSummary, + Resource, + TransactionsSummary, + TransferProductRequestProperties, + UpdateAutoRenewOperationSummary, + UpdateAutoRenewRequest +} 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..21b43bc2bf39 --- /dev/null +++ b/sdk/billing/arm-billing/src/models/recipientTransfersMappers.ts @@ -0,0 +1,18 @@ +/* + * 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 +} 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..a060e5a1fca0 --- /dev/null +++ b/sdk/billing/arm-billing/src/models/transactionsMappers.ts @@ -0,0 +1,40 @@ +/* + * 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 { + Address, + Agreement, + Amount, + AvailableBalance, + BaseResource, + BillingAccount, + BillingPermissionsProperties, + BillingProfile, + BillingProperty, + BillingRoleAssignment, + BillingRoleDefinition, + BillingSubscriptionSummary, + Department, + DownloadProperties, + EnabledAzureSKUs, + Enrollment, + EnrollmentAccount, + EnrollmentPolicies, + ErrorDetails, + ErrorResponse, + InvoiceSection, + InvoiceSummary, + Participants, + PaymentMethod, + PaymentProperties, + Policy, + ProductSummary, + Resource, + TransactionsListResult, + TransactionsSummary +} 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/agreements.ts b/sdk/billing/arm-billing/src/operations/agreements.ts new file mode 100644 index 000000000000..5720473ce9e3 --- /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 + */ + listByBillingAccountName(billingAccountName: string, options?: Models.AgreementsListByBillingAccountNameOptionalParams): 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.AgreementsListByBillingAccountNameOptionalParams, callback: msRest.ServiceCallback): void; + listByBillingAccountName(billingAccountName: string, options?: Models.AgreementsListByBillingAccountNameOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + options + }, + listByBillingAccountNameOperationSpec, + 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 listByBillingAccountNameOperationSpec: 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..014594f2eadd --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/billingAccounts.ts @@ -0,0 +1,127 @@ +/* + * 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/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; + } +} + +// 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 +}; diff --git a/sdk/billing/arm-billing/src/operations/billingAccountsValidateAddress.ts b/sdk/billing/arm-billing/src/operations/billingAccountsValidateAddress.ts new file mode 100644 index 000000000000..bcf4b5cc91ac --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/billingAccountsValidateAddress.ts @@ -0,0 +1,92 @@ +/* + * 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/billingAccountsValidateAddressMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a BillingAccountsValidateAddress. */ +export class BillingAccountsValidateAddress { + private readonly client: BillingManagementClientContext; + + /** + * Create a BillingAccountsValidateAddress. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * Validates the address. + * @param billingAccountName billing Account Id. + * @param address + * @param [options] The optional parameters + * @returns Promise + */ + post(billingAccountName: string, address: Models.Address, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param address + * @param callback The callback + */ + post(billingAccountName: string, address: Models.Address, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param address + * @param options The optional parameters + * @param callback The callback + */ + post(billingAccountName: string, address: Models.Address, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + post(billingAccountName: string, address: Models.Address, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + address, + options + }, + postOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const postOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/validateAddress", + urlParameters: [ + Parameters.billingAccountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "address", + mapper: { + ...Mappers.Address, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ValidateAddressResponse + }, + 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..7ba562488777 --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/billingPermissions.ts @@ -0,0 +1,193 @@ +/* + * 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 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 invoiceSectionName InvoiceSection Id. + * @param [options] The optional parameters + * @returns Promise + */ + listByInvoiceSections(billingAccountName: string, invoiceSectionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param callback The callback + */ + listByInvoiceSections(billingAccountName: string, invoiceSectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param options The optional parameters + * @param callback The callback + */ + listByInvoiceSections(billingAccountName: string, invoiceSectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByInvoiceSections(billingAccountName: string, invoiceSectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + invoiceSectionName, + options + }, + listByInvoiceSectionsOperationSpec, + callback) as Promise; + } + + /** + * Lists all billingPermissions for 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 listByBillingAccountOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/providers/Microsoft.Billing/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}/invoiceSections/{invoiceSectionName}/providers/Microsoft.Billing/billingPermissions", + urlParameters: [ + Parameters.billingAccountName, + 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}/providers/Microsoft.Billing/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..c8ef03529ba3 --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/billingProfiles.ts @@ -0,0 +1,208 @@ +/* + * 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 + */ + listByBillingAccountName(billingAccountName: string, options?: Models.BillingProfilesListByBillingAccountNameOptionalParams): 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.BillingProfilesListByBillingAccountNameOptionalParams, callback: msRest.ServiceCallback): void; + listByBillingAccountName(billingAccountName: string, options?: Models.BillingProfilesListByBillingAccountNameOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + options + }, + listByBillingAccountNameOperationSpec, + 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 update a billing profile. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param parameters 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 update a billing profile. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param parameters 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 listByBillingAccountNameOperationSpec: 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 beginUpdateOperationSpec: 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.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..7c8adf3a902a --- /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", + 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..7aa75e999d5c --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/billingRoleAssignments.ts @@ -0,0 +1,733 @@ +/* + * 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 + */ + deleteByBillingAccountName(billingAccountName: string, billingRoleAssignmentName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingRoleAssignmentName role assignment id. + * @param callback The callback + */ + deleteByBillingAccountName(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 + */ + deleteByBillingAccountName(billingAccountName: string, billingRoleAssignmentName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteByBillingAccountName(billingAccountName: string, billingRoleAssignmentName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingRoleAssignmentName, + options + }, + deleteByBillingAccountNameOperationSpec, + callback) as Promise; + } + + /** + * Get the role assignment for the caller on the invoice Section + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param billingRoleAssignmentName role assignment id. + * @param [options] The optional parameters + * @returns Promise + */ + getByInvoiceSectionName(billingAccountName: string, invoiceSectionName: string, billingRoleAssignmentName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param billingRoleAssignmentName role assignment id. + * @param callback The callback + */ + getByInvoiceSectionName(billingAccountName: string, invoiceSectionName: string, billingRoleAssignmentName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param billingRoleAssignmentName role assignment id. + * @param options The optional parameters + * @param callback The callback + */ + getByInvoiceSectionName(billingAccountName: string, invoiceSectionName: string, billingRoleAssignmentName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getByInvoiceSectionName(billingAccountName: string, invoiceSectionName: string, billingRoleAssignmentName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + invoiceSectionName, + billingRoleAssignmentName, + options + }, + getByInvoiceSectionNameOperationSpec, + callback) as Promise; + } + + /** + * Delete the role assignment on the invoice Section + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param billingRoleAssignmentName role assignment id. + * @param [options] The optional parameters + * @returns Promise + */ + deleteByInvoiceSectionName(billingAccountName: string, invoiceSectionName: string, billingRoleAssignmentName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param billingRoleAssignmentName role assignment id. + * @param callback The callback + */ + deleteByInvoiceSectionName(billingAccountName: string, invoiceSectionName: string, billingRoleAssignmentName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param billingRoleAssignmentName role assignment id. + * @param options The optional parameters + * @param callback The callback + */ + deleteByInvoiceSectionName(billingAccountName: string, invoiceSectionName: string, billingRoleAssignmentName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteByInvoiceSectionName(billingAccountName: string, invoiceSectionName: string, billingRoleAssignmentName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + invoiceSectionName, + billingRoleAssignmentName, + options + }, + deleteByInvoiceSectionNameOperationSpec, + 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 + */ + getByBillingProfileName(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 + */ + getByBillingProfileName(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 + */ + getByBillingProfileName(billingAccountName: string, billingProfileName: string, billingRoleAssignmentName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getByBillingProfileName(billingAccountName: string, billingProfileName: string, billingRoleAssignmentName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + billingRoleAssignmentName, + options + }, + getByBillingProfileNameOperationSpec, + 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 + */ + deleteByBillingProfileName(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 + */ + deleteByBillingProfileName(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 + */ + deleteByBillingProfileName(billingAccountName: string, billingProfileName: string, billingRoleAssignmentName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteByBillingProfileName(billingAccountName: string, billingProfileName: string, billingRoleAssignmentName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + billingRoleAssignmentName, + options + }, + deleteByBillingProfileNameOperationSpec, + callback) as Promise; + } + + /** + * Get the role assignments on the Billing Account + * @param billingAccountName billing Account Id. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingAccountName(billingAccountName: string, options?: msRest.RequestOptionsBase): 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: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingAccountName(billingAccountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + options + }, + listByBillingAccountNameOperationSpec, + callback) as Promise; + } + + /** + * The operation to add a role assignment to a billing account. + * @param billingAccountName billing Account Id. + * @param [options] The optional parameters + * @returns Promise + */ + addByBillingAccountName(billingAccountName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param callback The callback + */ + addByBillingAccountName(billingAccountName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param options The optional parameters + * @param callback The callback + */ + addByBillingAccountName(billingAccountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + addByBillingAccountName(billingAccountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + options + }, + addByBillingAccountNameOperationSpec, + callback) as Promise; + } + + /** + * Get the role assignments on the invoice Section + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param [options] The optional parameters + * @returns Promise + */ + listByInvoiceSectionName(billingAccountName: string, invoiceSectionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param callback The callback + */ + listByInvoiceSectionName(billingAccountName: string, invoiceSectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param options The optional parameters + * @param callback The callback + */ + listByInvoiceSectionName(billingAccountName: string, invoiceSectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByInvoiceSectionName(billingAccountName: string, invoiceSectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + invoiceSectionName, + options + }, + listByInvoiceSectionNameOperationSpec, + callback) as Promise; + } + + /** + * The operation to add a role assignment to a invoice Section. + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param [options] The optional parameters + * @returns Promise + */ + addByInvoiceSectionName(billingAccountName: string, invoiceSectionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param callback The callback + */ + addByInvoiceSectionName(billingAccountName: string, invoiceSectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param options The optional parameters + * @param callback The callback + */ + addByInvoiceSectionName(billingAccountName: string, invoiceSectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + addByInvoiceSectionName(billingAccountName: string, invoiceSectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + invoiceSectionName, + options + }, + addByInvoiceSectionNameOperationSpec, + 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 + */ + listByBillingProfileName(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param callback The callback + */ + listByBillingProfileName(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 + */ + listByBillingProfileName(billingAccountName: string, billingProfileName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingProfileName(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + options + }, + listByBillingProfileNameOperationSpec, + 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 [options] The optional parameters + * @returns Promise + */ + addByBillingProfileName(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param callback The callback + */ + addByBillingProfileName(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 + */ + addByBillingProfileName(billingAccountName: string, billingProfileName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + addByBillingProfileName(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + options + }, + addByBillingProfileNameOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getByBillingAccountOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/providers/Microsoft.Billing/billingRoleAssignments/{billingRoleAssignmentName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingRoleAssignmentName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingRoleAssignment + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const deleteByBillingAccountNameOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/providers/Microsoft.Billing/billingRoleAssignments/{billingRoleAssignmentName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingRoleAssignmentName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingRoleAssignment + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getByInvoiceSectionNameOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoiceSections/{invoiceSectionName}/providers/Microsoft.Billing/billingRoleAssignments/{billingRoleAssignmentName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.invoiceSectionName, + Parameters.billingRoleAssignmentName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingRoleAssignment + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const deleteByInvoiceSectionNameOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoiceSections/{invoiceSectionName}/providers/Microsoft.Billing/billingRoleAssignments/{billingRoleAssignmentName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.invoiceSectionName, + Parameters.billingRoleAssignmentName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingRoleAssignment + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getByBillingProfileNameOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/providers/Microsoft.Billing/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 deleteByBillingProfileNameOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/providers/Microsoft.Billing/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 listByBillingAccountNameOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/providers/Microsoft.Billing/billingRoleAssignments", + urlParameters: [ + Parameters.billingAccountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingRoleAssignmentListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const addByBillingAccountNameOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/providers/Microsoft.Billing/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 listByInvoiceSectionNameOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoiceSections/{invoiceSectionName}/providers/Microsoft.Billing/billingRoleAssignments", + urlParameters: [ + Parameters.billingAccountName, + Parameters.invoiceSectionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingRoleAssignmentListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const addByInvoiceSectionNameOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoiceSections/{invoiceSectionName}/providers/Microsoft.Billing/createBillingRoleAssignment", + urlParameters: [ + Parameters.billingAccountName, + 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 listByBillingProfileNameOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/providers/Microsoft.Billing/billingRoleAssignments", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingRoleAssignmentListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const addByBillingProfileNameOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/providers/Microsoft.Billing/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..7d4e1d74ce5c --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/billingRoleDefinitions.ts @@ -0,0 +1,371 @@ +/* + * 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 + */ + getByBillingAccountName(billingAccountName: string, billingRoleDefinitionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingRoleDefinitionName role definition id. + * @param callback The callback + */ + getByBillingAccountName(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 + */ + getByBillingAccountName(billingAccountName: string, billingRoleDefinitionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getByBillingAccountName(billingAccountName: string, billingRoleDefinitionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingRoleDefinitionName, + options + }, + getByBillingAccountNameOperationSpec, + callback) as Promise; + } + + /** + * Gets the role definition for a role + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param billingRoleDefinitionName role definition id. + * @param [options] The optional parameters + * @returns Promise + */ + getByInvoiceSectionName(billingAccountName: string, invoiceSectionName: string, billingRoleDefinitionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param billingRoleDefinitionName role definition id. + * @param callback The callback + */ + getByInvoiceSectionName(billingAccountName: string, invoiceSectionName: string, billingRoleDefinitionName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param billingRoleDefinitionName role definition id. + * @param options The optional parameters + * @param callback The callback + */ + getByInvoiceSectionName(billingAccountName: string, invoiceSectionName: string, billingRoleDefinitionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getByInvoiceSectionName(billingAccountName: string, invoiceSectionName: string, billingRoleDefinitionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + invoiceSectionName, + billingRoleDefinitionName, + options + }, + getByInvoiceSectionNameOperationSpec, + 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 + */ + getByBillingProfileName(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 + */ + getByBillingProfileName(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 + */ + getByBillingProfileName(billingAccountName: string, billingProfileName: string, billingRoleDefinitionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getByBillingProfileName(billingAccountName: string, billingProfileName: string, billingRoleDefinitionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + billingRoleDefinitionName, + options + }, + getByBillingProfileNameOperationSpec, + callback) as Promise; + } + + /** + * Lists the role definition for a billing account + * @param billingAccountName billing Account Id. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingAccountName(billingAccountName: string, options?: msRest.RequestOptionsBase): 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: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingAccountName(billingAccountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + options + }, + listByBillingAccountNameOperationSpec, + callback) as Promise; + } + + /** + * Lists the role definition for an invoice Section + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param [options] The optional parameters + * @returns Promise + */ + listByInvoiceSectionName(billingAccountName: string, invoiceSectionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param callback The callback + */ + listByInvoiceSectionName(billingAccountName: string, invoiceSectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param options The optional parameters + * @param callback The callback + */ + listByInvoiceSectionName(billingAccountName: string, invoiceSectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByInvoiceSectionName(billingAccountName: string, invoiceSectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + invoiceSectionName, + options + }, + listByInvoiceSectionNameOperationSpec, + 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 + */ + listByBillingProfileName(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param callback The callback + */ + listByBillingProfileName(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 + */ + listByBillingProfileName(billingAccountName: string, billingProfileName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingProfileName(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + options + }, + listByBillingProfileNameOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getByBillingAccountNameOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/providers/Microsoft.Billing/billingRoleDefinitions/{billingRoleDefinitionName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingRoleDefinitionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingRoleDefinition + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getByInvoiceSectionNameOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoiceSections/{invoiceSectionName}/providers/Microsoft.Billing/billingRoleDefinitions/{billingRoleDefinitionName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.invoiceSectionName, + Parameters.billingRoleDefinitionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingRoleDefinition + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getByBillingProfileNameOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/providers/Microsoft.Billing/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 listByBillingAccountNameOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/providers/Microsoft.Billing/billingRoleDefinitions", + urlParameters: [ + Parameters.billingAccountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingRoleDefinitionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByInvoiceSectionNameOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoiceSections/{invoiceSectionName}/providers/Microsoft.Billing/billingRoleDefinitions", + urlParameters: [ + Parameters.billingAccountName, + Parameters.invoiceSectionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingRoleDefinitionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingProfileNameOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/providers/Microsoft.Billing/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..cdf8379cb0a4 --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/billingSubscriptions.ts @@ -0,0 +1,375 @@ +/* + * 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 subscriptions by billing account name. + * @param billingAccountName billing Account Id. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingAccountName(billingAccountName: string, options?: msRest.RequestOptionsBase): 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: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingAccountName(billingAccountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + options + }, + listByBillingAccountNameOperationSpec, + 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 + */ + listByBillingProfileName(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param callback The callback + */ + listByBillingProfileName(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 + */ + listByBillingProfileName(billingAccountName: string, billingProfileName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingProfileName(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + options + }, + listByBillingProfileNameOperationSpec, + callback) as Promise; + } + + /** + * Lists billing subscription by invoice section name. + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param [options] The optional parameters + * @returns Promise + */ + listByInvoiceSectionName(billingAccountName: string, invoiceSectionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param callback The callback + */ + listByInvoiceSectionName(billingAccountName: string, invoiceSectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param options The optional parameters + * @param callback The callback + */ + listByInvoiceSectionName(billingAccountName: string, invoiceSectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByInvoiceSectionName(billingAccountName: string, invoiceSectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + invoiceSectionName, + options + }, + listByInvoiceSectionNameOperationSpec, + callback) as Promise; + } + + /** + * Get a single billing subscription by name. + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param billingSubscriptionName Billing Subscription Id. + * @param [options] The optional parameters + * @returns Promise + */ + get(billingAccountName: string, invoiceSectionName: string, billingSubscriptionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param billingSubscriptionName Billing Subscription Id. + * @param callback The callback + */ + get(billingAccountName: string, invoiceSectionName: string, billingSubscriptionName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param billingSubscriptionName Billing Subscription Id. + * @param options The optional parameters + * @param callback The callback + */ + get(billingAccountName: string, invoiceSectionName: string, billingSubscriptionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(billingAccountName: string, invoiceSectionName: string, billingSubscriptionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + 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 invoiceSectionName InvoiceSection Id. + * @param billingSubscriptionName Billing Subscription Id. + * @param [options] The optional parameters + * @returns Promise + */ + transfer(billingAccountName: string, invoiceSectionName: string, billingSubscriptionName: string, options?: Models.BillingSubscriptionsTransferOptionalParams): Promise { + return this.beginTransfer(billingAccountName,invoiceSectionName,billingSubscriptionName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Transfers the subscription from one invoice section to another within a billing account. + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param billingSubscriptionName Billing Subscription Id. + * @param [options] The optional parameters + * @returns Promise + */ + beginTransfer(billingAccountName: string, invoiceSectionName: string, billingSubscriptionName: string, options?: Models.BillingSubscriptionsBeginTransferOptionalParams): Promise { + return this.client.sendLRORequest( + { + billingAccountName, + invoiceSectionName, + billingSubscriptionName, + options + }, + beginTransferOperationSpec, + options); + } + + /** + * 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 + */ + listByBillingAccountNameNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByBillingAccountNameNext(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 + */ + listByBillingAccountNameNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingAccountNameNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByBillingAccountNameNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByBillingAccountNameOperationSpec: 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 listByBillingProfileNameOperationSpec: 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 listByInvoiceSectionNameOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoiceSections/{invoiceSectionName}/billingSubscriptions", + urlParameters: [ + Parameters.billingAccountName, + 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}/invoiceSections/{invoiceSectionName}/billingSubscriptions/{billingSubscriptionName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.invoiceSectionName, + Parameters.billingSubscriptionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingSubscriptionSummary + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginTransferOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoiceSections/{invoiceSectionName}/billingSubscriptions/{billingSubscriptionName}/transfer", + urlParameters: [ + Parameters.billingAccountName, + Parameters.invoiceSectionName, + Parameters.billingSubscriptionName + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + destinationInvoiceSectionId: [ + "options", + "destinationInvoiceSectionId" + ] + }, + mapper: { + ...Mappers.TransferBillingSubscriptionRequestProperties, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.TransferBillingSubscriptionResult, + headersMapper: Mappers.BillingSubscriptionsTransferHeaders + }, + 202: { + headersMapper: Mappers.BillingSubscriptionsTransferHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingAccountNameNextOperationSpec: 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/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..82021ae0e19d 100644 --- a/sdk/billing/arm-billing/src/operations/index.ts +++ b/sdk/billing/arm-billing/src/operations/index.ts @@ -8,7 +8,25 @@ * regenerated. */ +export * from "./billingAccounts"; +export * from "./paymentMethods"; +export * from "./billingAccountsValidateAddress"; +export * from "./availableBalances"; +export * from "./billingProfiles"; +export * from "./invoiceSections"; +export * from "./departments"; export * from "./enrollmentAccounts"; -export * from "./billingPeriods"; export * from "./invoices"; +export * from "./priceSheet"; +export * from "./billingSubscriptions"; +export * from "./products"; +export * from "./transactions"; +export * from "./policies"; +export * from "./billingPropertyOperations"; +export * from "./transfers"; +export * from "./recipientTransfers"; export * from "./operations"; +export * from "./billingPermissions"; +export * from "./billingRoleDefinitions"; +export * from "./billingRoleAssignments"; +export * from "./agreements"; 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..7d56840f4d44 --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/invoiceSections.ts @@ -0,0 +1,431 @@ +/* + * 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 [options] The optional parameters + * @returns Promise + */ + listByBillingAccountName(billingAccountName: string, options?: Models.InvoiceSectionsListByBillingAccountNameOptionalParams): 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.InvoiceSectionsListByBillingAccountNameOptionalParams, callback: msRest.ServiceCallback): void; + listByBillingAccountName(billingAccountName: string, options?: Models.InvoiceSectionsListByBillingAccountNameOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + options + }, + listByBillingAccountNameOperationSpec, + callback) as Promise; + } + + /** + * The operation to create a InvoiceSection. + * @param billingAccountName billing Account Id. + * @param parameters Parameters supplied to the Create InvoiceSection operation. + * @param [options] The optional parameters + * @returns Promise + */ + create(billingAccountName: string, parameters: Models.InvoiceSectionProperties, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreate(billingAccountName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Lists all invoice sections under a billing profile 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 + */ + listByBillingProfileName(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param callback The callback + */ + listByBillingProfileName(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 + */ + listByBillingProfileName(billingAccountName: string, billingProfileName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingProfileName(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + options + }, + listByBillingProfileNameOperationSpec, + callback) as Promise; + } + + /** + * Lists all invoiceSections with create subscription permission for a user. + * @param billingAccountName billing Account Id. + * @param [options] The optional parameters + * @returns Promise + */ + listByCreateSubscriptionPermission(billingAccountName: string, options?: Models.InvoiceSectionsListByCreateSubscriptionPermissionOptionalParams): Promise; + /** + * @param billingAccountName billing Account Id. + * @param callback The callback + */ + listByCreateSubscriptionPermission(billingAccountName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param options The optional parameters + * @param callback The callback + */ + listByCreateSubscriptionPermission(billingAccountName: string, options: Models.InvoiceSectionsListByCreateSubscriptionPermissionOptionalParams, callback: msRest.ServiceCallback): void; + listByCreateSubscriptionPermission(billingAccountName: string, options?: Models.InvoiceSectionsListByCreateSubscriptionPermissionOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + options + }, + listByCreateSubscriptionPermissionOperationSpec, + callback) as Promise; + } + + /** + * Get the InvoiceSection by id. + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param [options] The optional parameters + * @returns Promise + */ + get(billingAccountName: string, invoiceSectionName: string, options?: Models.InvoiceSectionsGetOptionalParams): Promise; + /** + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param callback The callback + */ + get(billingAccountName: string, invoiceSectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param options The optional parameters + * @param callback The callback + */ + get(billingAccountName: string, invoiceSectionName: string, options: Models.InvoiceSectionsGetOptionalParams, callback: msRest.ServiceCallback): void; + get(billingAccountName: string, invoiceSectionName: string, options?: Models.InvoiceSectionsGetOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + invoiceSectionName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * The operation to update a InvoiceSection. + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param parameters Parameters supplied to the Create InvoiceSection operation. + * @param [options] The optional parameters + * @returns Promise + */ + update(billingAccountName: string, invoiceSectionName: string, parameters: Models.InvoiceSection, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(billingAccountName,invoiceSectionName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Elevates the caller's access to match their billing profile access. + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param [options] The optional parameters + * @returns Promise + */ + elevateToBillingProfile(billingAccountName: string, invoiceSectionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param callback The callback + */ + elevateToBillingProfile(billingAccountName: string, invoiceSectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param options The optional parameters + * @param callback The callback + */ + elevateToBillingProfile(billingAccountName: string, invoiceSectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + elevateToBillingProfile(billingAccountName: string, invoiceSectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + invoiceSectionName, + options + }, + elevateToBillingProfileOperationSpec, + callback); + } + + /** + * The operation to create a InvoiceSection. + * @param billingAccountName billing Account Id. + * @param parameters Parameters supplied to the Create InvoiceSection operation. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreate(billingAccountName: string, parameters: Models.InvoiceSectionProperties, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + billingAccountName, + parameters, + options + }, + beginCreateOperationSpec, + options); + } + + /** + * The operation to update a InvoiceSection. + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param parameters Parameters supplied to the Create InvoiceSection operation. + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdate(billingAccountName: string, invoiceSectionName: string, parameters: Models.InvoiceSection, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + billingAccountName, + invoiceSectionName, + parameters, + options + }, + beginUpdateOperationSpec, + options); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByBillingAccountNameOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoiceSections", + urlParameters: [ + Parameters.billingAccountName + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.expand + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.InvoiceSectionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingProfileNameOperationSpec: 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 listByCreateSubscriptionPermissionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/listInvoiceSectionsWithCreateSubscriptionPermission", + urlParameters: [ + Parameters.billingAccountName + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.expand + ], + 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}/invoiceSections/{invoiceSectionName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.invoiceSectionName + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.expand + ], + 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}/invoiceSections/{invoiceSectionName}/elevate", + urlParameters: [ + Parameters.billingAccountName, + Parameters.invoiceSectionName + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginCreateOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoiceSections", + urlParameters: [ + Parameters.billingAccountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.InvoiceSectionProperties, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.InvoiceSection, + headersMapper: Mappers.InvoiceSectionsCreateHeaders + }, + 202: { + headersMapper: Mappers.InvoiceSectionsCreateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoiceSections/{invoiceSectionName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.invoiceSectionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + 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..90d49276e6db 100644 --- a/sdk/billing/arm-billing/src/operations/invoices.ts +++ b/sdk/billing/arm-billing/src/operations/invoices.ts @@ -27,145 +27,137 @@ 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; + listByBillingAccountName(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; + listByBillingAccountName(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 { + listByBillingAccountName(billingAccountName: string, periodStartDate: string, periodEndDate: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingAccountName(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; + listByBillingAccountNameOperationSpec, + 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 + * @returns Promise */ - get(invoiceName: string, options?: msRest.RequestOptionsBase): Promise; + listByBillingProfile(billingAccountName: string, billingProfileName: string, periodStartDate: string, periodEndDate: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param invoiceName The name of an invoice resource. + * @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 */ - get(invoiceName: string, callback: msRest.ServiceCallback): void; + listByBillingProfile(billingAccountName: string, billingProfileName: string, periodStartDate: string, periodEndDate: string, callback: msRest.ServiceCallback): void; /** - * @param invoiceName The name of an invoice resource. + * @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 */ - get(invoiceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(invoiceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + 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( { - invoiceName, + billingAccountName, + billingProfileName, + periodStartDate, + periodEndDate, options }, - getOperationSpec, - callback) as Promise; + listByBillingProfileOperationSpec, + callback) as Promise; } /** - * 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. + * 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 - */ - getLatest(options?: msRest.RequestOptionsBase): Promise; - /** - * @param callback The callback - */ - getLatest(callback: msRest.ServiceCallback): void; - /** - * @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 { - return this.client.sendOperationRequest( - { - options - }, - getLatestOperationSpec, - 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. - * @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; + get(billingAccountName: string, billingProfileName: string, invoiceName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceName Invoice Id. * @param callback The callback */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + get(billingAccountName: string, billingProfileName: string, invoiceName: string, callback: msRest.ServiceCallback): void; /** - * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceName Invoice Id. * @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 { + 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( { - nextPageLink, + billingAccountName, + billingProfileName, + invoiceName, options }, - listNextOperationSpec, - callback) as Promise; + getOperationSpec, + callback) as Promise; } } // Operation Specifications const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { +const listByBillingAccountNameOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Billing/invoices", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices", urlParameters: [ - Parameters.subscriptionId + Parameters.billingAccountName ], queryParameters: [ Parameters.apiVersion, - Parameters.expand, - Parameters.filter, - Parameters.skiptoken, - Parameters.top + Parameters.periodStartDate, + Parameters.periodEndDate ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { - bodyMapper: Mappers.InvoicesListResult + bodyMapper: Mappers.InvoiceListResult }, default: { bodyMapper: Mappers.ErrorResponse @@ -174,22 +166,24 @@ const listOperationSpec: msRest.OperationSpec = { serializer }; -const getOperationSpec: msRest.OperationSpec = { +const listByBillingProfileOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Billing/invoices/{invoiceName}", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoices", urlParameters: [ - Parameters.subscriptionId, - Parameters.invoiceName + Parameters.billingAccountName, + Parameters.billingProfileName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion, + Parameters.periodStartDate, + Parameters.periodEndDate ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { - bodyMapper: Mappers.Invoice + bodyMapper: Mappers.InvoiceListResult }, default: { bodyMapper: Mappers.ErrorResponse @@ -198,11 +192,13 @@ const getOperationSpec: msRest.OperationSpec = { serializer }; -const getLatestOperationSpec: msRest.OperationSpec = { +const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Billing/invoices/latest", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoices/{invoiceName}", urlParameters: [ - Parameters.subscriptionId + Parameters.billingAccountName, + Parameters.billingProfileName, + Parameters.invoiceName ], queryParameters: [ Parameters.apiVersion @@ -212,28 +208,7 @@ const getLatestOperationSpec: msRest.OperationSpec = { ], responses: { 200: { - bodyMapper: Mappers.Invoice - }, - 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.InvoicesListResult + bodyMapper: Mappers.InvoiceSummary }, default: { bodyMapper: Mappers.ErrorResponse 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..5d689109ffaf --- /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 + */ + listByBillingAccountName(billingAccountName: string, options?: msRest.RequestOptionsBase): 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: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingAccountName(billingAccountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + options + }, + listByBillingAccountNameOperationSpec, + 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 + */ + listByBillingProfileName(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param callback The callback + */ + listByBillingProfileName(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 + */ + listByBillingProfileName(billingAccountName: string, billingProfileName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingProfileName(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + options + }, + listByBillingProfileNameOperationSpec, + 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 + */ + listByBillingAccountNameNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByBillingAccountNameNext(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 + */ + listByBillingAccountNameNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingAccountNameNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByBillingAccountNameNextOperationSpec, + 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 + */ + listByBillingProfileNameNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByBillingProfileNameNext(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 + */ + listByBillingProfileNameNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingProfileNameNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByBillingProfileNameNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByBillingAccountNameOperationSpec: 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 listByBillingProfileNameOperationSpec: 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 listByBillingAccountNameNextOperationSpec: 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 listByBillingProfileNameNextOperationSpec: 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..cfc99114177c --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/policies.ts @@ -0,0 +1,153 @@ +/* + * 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 + */ + getByBillingProfileName(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param callback The callback + */ + getByBillingProfileName(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 + */ + getByBillingProfileName(billingAccountName: string, billingProfileName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getByBillingProfileName(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + options + }, + getByBillingProfileNameOperationSpec, + 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; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getByBillingProfileNameOperationSpec: 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 +}; 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..c4373fade492 --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/priceSheet.ts @@ -0,0 +1,89 @@ +/* + * 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 Azure Billing Account ID. + * @param invoiceName The name of an invoice resource. + * @param [options] The optional parameters + * @returns Promise + */ + download(billingAccountName: string, invoiceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDownload(billingAccountName,invoiceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Download price sheet for an invoice. + * @param billingAccountName Azure Billing Account ID. + * @param invoiceName The name of an invoice resource. + * @param [options] The optional parameters + * @returns Promise + */ + beginDownload(billingAccountName: string, invoiceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + billingAccountName, + invoiceName, + options + }, + beginDownloadOperationSpec, + options); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const beginDownloadOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}/pricesheet/default/download", + urlParameters: [ + Parameters.billingAccountName, + 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 +}; 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..c2e6b3e8dbea --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/products.ts @@ -0,0 +1,467 @@ +/* + * 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 billing account name. + * @param billingAccountName billing Account Id. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingAccountName(billingAccountName: string, options?: Models.ProductsListByBillingAccountNameOptionalParams): 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.ProductsListByBillingAccountNameOptionalParams, callback: msRest.ServiceCallback): void; + listByBillingAccountName(billingAccountName: string, options?: Models.ProductsListByBillingAccountNameOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + options + }, + listByBillingAccountNameOperationSpec, + callback) as Promise; + } + + /** + * Lists products by invoice section name. + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param [options] The optional parameters + * @returns Promise + */ + listByInvoiceSectionName(billingAccountName: string, invoiceSectionName: string, options?: Models.ProductsListByInvoiceSectionNameOptionalParams): Promise; + /** + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param callback The callback + */ + listByInvoiceSectionName(billingAccountName: string, invoiceSectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param options The optional parameters + * @param callback The callback + */ + listByInvoiceSectionName(billingAccountName: string, invoiceSectionName: string, options: Models.ProductsListByInvoiceSectionNameOptionalParams, callback: msRest.ServiceCallback): void; + listByInvoiceSectionName(billingAccountName: string, invoiceSectionName: string, options?: Models.ProductsListByInvoiceSectionNameOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + invoiceSectionName, + options + }, + listByInvoiceSectionNameOperationSpec, + callback) as Promise; + } + + /** + * Get a single product by name. + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param productName Invoice Id. + * @param [options] The optional parameters + * @returns Promise + */ + get(billingAccountName: string, invoiceSectionName: string, productName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param productName Invoice Id. + * @param callback The callback + */ + get(billingAccountName: string, invoiceSectionName: string, productName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param productName Invoice Id. + * @param options The optional parameters + * @param callback The callback + */ + get(billingAccountName: string, invoiceSectionName: string, productName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(billingAccountName: string, invoiceSectionName: string, productName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + invoiceSectionName, + productName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * The operation to transfer a Product to another invoice section. + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param productName Invoice Id. + * @param [options] The optional parameters + * @returns Promise + */ + transfer(billingAccountName: string, invoiceSectionName: string, productName: string, options?: Models.ProductsTransferOptionalParams): Promise; + /** + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param productName Invoice Id. + * @param callback The callback + */ + transfer(billingAccountName: string, invoiceSectionName: string, productName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param productName Invoice Id. + * @param options The optional parameters + * @param callback The callback + */ + transfer(billingAccountName: string, invoiceSectionName: string, productName: string, options: Models.ProductsTransferOptionalParams, callback: msRest.ServiceCallback): void; + transfer(billingAccountName: string, invoiceSectionName: string, productName: string, options?: Models.ProductsTransferOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + invoiceSectionName, + productName, + options + }, + transferOperationSpec, + callback) as Promise; + } + + /** + * Cancel auto renew for product by product id and billing account name + * @param billingAccountName billing Account Id. + * @param productName Invoice Id. + * @param [options] The optional parameters + * @returns Promise + */ + updateAutoRenewByBillingAccountName(billingAccountName: string, productName: string, options?: Models.ProductsUpdateAutoRenewByBillingAccountNameOptionalParams): Promise; + /** + * @param billingAccountName billing Account Id. + * @param productName Invoice Id. + * @param callback The callback + */ + updateAutoRenewByBillingAccountName(billingAccountName: string, productName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param productName Invoice Id. + * @param options The optional parameters + * @param callback The callback + */ + updateAutoRenewByBillingAccountName(billingAccountName: string, productName: string, options: Models.ProductsUpdateAutoRenewByBillingAccountNameOptionalParams, callback: msRest.ServiceCallback): void; + updateAutoRenewByBillingAccountName(billingAccountName: string, productName: string, options?: Models.ProductsUpdateAutoRenewByBillingAccountNameOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + productName, + options + }, + updateAutoRenewByBillingAccountNameOperationSpec, + callback) as Promise; + } + + /** + * Cancel auto renew for product by product id and invoice section name + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param productName Invoice Id. + * @param [options] The optional parameters + * @returns Promise + */ + updateAutoRenewByInvoiceSectionName(billingAccountName: string, invoiceSectionName: string, productName: string, options?: Models.ProductsUpdateAutoRenewByInvoiceSectionNameOptionalParams): Promise; + /** + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param productName Invoice Id. + * @param callback The callback + */ + updateAutoRenewByInvoiceSectionName(billingAccountName: string, invoiceSectionName: string, productName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param productName Invoice Id. + * @param options The optional parameters + * @param callback The callback + */ + updateAutoRenewByInvoiceSectionName(billingAccountName: string, invoiceSectionName: string, productName: string, options: Models.ProductsUpdateAutoRenewByInvoiceSectionNameOptionalParams, callback: msRest.ServiceCallback): void; + updateAutoRenewByInvoiceSectionName(billingAccountName: string, invoiceSectionName: string, productName: string, options?: Models.ProductsUpdateAutoRenewByInvoiceSectionNameOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + invoiceSectionName, + productName, + options + }, + updateAutoRenewByInvoiceSectionNameOperationSpec, + 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 + */ + listByBillingAccountNameNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByBillingAccountNameNext(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 + */ + listByBillingAccountNameNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingAccountNameNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByBillingAccountNameNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByBillingAccountNameOperationSpec: 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 listByInvoiceSectionNameOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoiceSections/{invoiceSectionName}/products", + urlParameters: [ + Parameters.billingAccountName, + 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}/invoiceSections/{invoiceSectionName}/products/{productName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.invoiceSectionName, + Parameters.productName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ProductSummary + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const transferOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoiceSections/{invoiceSectionName}/products/{productName}/transfer", + urlParameters: [ + Parameters.billingAccountName, + Parameters.invoiceSectionName, + Parameters.productName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + destinationInvoiceSectionId: [ + "options", + "destinationInvoiceSectionId" + ] + }, + mapper: { + ...Mappers.TransferProductRequestProperties, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ProductSummary, + headersMapper: Mappers.ProductsTransferHeaders + }, + 202: { + headersMapper: Mappers.ProductsTransferHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const updateAutoRenewByBillingAccountNameOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/products/{productName}/updateAutoRenew", + urlParameters: [ + Parameters.billingAccountName, + Parameters.productName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + autoRenew: [ + "options", + "autoRenew" + ] + }, + mapper: { + ...Mappers.UpdateAutoRenewRequest, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.UpdateAutoRenewOperationSummary + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const updateAutoRenewByInvoiceSectionNameOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoiceSections/{invoiceSectionName}/products/{productName}/updateAutoRenew", + urlParameters: [ + Parameters.billingAccountName, + Parameters.invoiceSectionName, + Parameters.productName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + autoRenew: [ + "options", + "autoRenew" + ] + }, + mapper: { + ...Mappers.UpdateAutoRenewRequest, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.UpdateAutoRenewOperationSummary + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingAccountNameNextOperationSpec: 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..ceacc47f428c --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/recipientTransfers.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 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 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 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..b2767cf568a9 --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/transactions.ts @@ -0,0 +1,275 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/transactionsMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a Transactions. */ +export class Transactions { + private readonly client: BillingManagementClientContext; + + /** + * Create a Transactions. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * Lists the transactions by billing account name for given start and end date. + * @param billingAccountName billing Account Id. + * @param startDate Start date + * @param endDate End date + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingAccountName(billingAccountName: string, startDate: string, endDate: string, options?: Models.TransactionsListByBillingAccountNameOptionalParams): Promise; + /** + * @param billingAccountName billing Account Id. + * @param startDate Start date + * @param endDate End date + * @param callback The callback + */ + listByBillingAccountName(billingAccountName: string, startDate: string, endDate: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param startDate Start date + * @param endDate End date + * @param options The optional parameters + * @param callback The callback + */ + listByBillingAccountName(billingAccountName: string, startDate: string, endDate: string, options: Models.TransactionsListByBillingAccountNameOptionalParams, callback: msRest.ServiceCallback): void; + listByBillingAccountName(billingAccountName: string, startDate: string, endDate: string, options?: Models.TransactionsListByBillingAccountNameOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + startDate, + endDate, + options + }, + listByBillingAccountNameOperationSpec, + callback) as Promise; + } + + /** + * Lists the transactions by billing profile name for given start date and end date. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param startDate Start date + * @param endDate End date + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingProfileName(billingAccountName: string, billingProfileName: string, startDate: string, endDate: string, options?: Models.TransactionsListByBillingProfileNameOptionalParams): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param startDate Start date + * @param endDate End date + * @param callback The callback + */ + listByBillingProfileName(billingAccountName: string, billingProfileName: string, startDate: string, endDate: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param startDate Start date + * @param endDate End date + * @param options The optional parameters + * @param callback The callback + */ + listByBillingProfileName(billingAccountName: string, billingProfileName: string, startDate: string, endDate: string, options: Models.TransactionsListByBillingProfileNameOptionalParams, callback: msRest.ServiceCallback): void; + listByBillingProfileName(billingAccountName: string, billingProfileName: string, startDate: string, endDate: string, options?: Models.TransactionsListByBillingProfileNameOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + startDate, + endDate, + options + }, + listByBillingProfileNameOperationSpec, + callback) as Promise; + } + + /** + * Lists the transactions by invoice section name for given start date and end date. + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param startDate Start date + * @param endDate End date + * @param [options] The optional parameters + * @returns Promise + */ + listByInvoiceSectionName(billingAccountName: string, invoiceSectionName: string, startDate: string, endDate: string, options?: Models.TransactionsListByInvoiceSectionNameOptionalParams): Promise; + /** + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param startDate Start date + * @param endDate End date + * @param callback The callback + */ + listByInvoiceSectionName(billingAccountName: string, invoiceSectionName: string, startDate: string, endDate: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param startDate Start date + * @param endDate End date + * @param options The optional parameters + * @param callback The callback + */ + listByInvoiceSectionName(billingAccountName: string, invoiceSectionName: string, startDate: string, endDate: string, options: Models.TransactionsListByInvoiceSectionNameOptionalParams, callback: msRest.ServiceCallback): void; + listByInvoiceSectionName(billingAccountName: string, invoiceSectionName: string, startDate: string, endDate: string, options?: Models.TransactionsListByInvoiceSectionNameOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + invoiceSectionName, + startDate, + endDate, + options + }, + listByInvoiceSectionNameOperationSpec, + callback) as Promise; + } + + /** + * Lists the transactions by billing account name for given start and end date. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingAccountNameNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByBillingAccountNameNext(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 + */ + listByBillingAccountNameNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingAccountNameNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByBillingAccountNameNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByBillingAccountNameOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/transactions", + urlParameters: [ + Parameters.billingAccountName + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.startDate, + Parameters.endDate, + Parameters.filter + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.TransactionsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingProfileNameOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/transactions", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.startDate, + Parameters.endDate, + Parameters.filter + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.TransactionsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByInvoiceSectionNameOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoiceSections/{invoiceSectionName}/transactions", + urlParameters: [ + Parameters.billingAccountName, + Parameters.invoiceSectionName + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.startDate, + Parameters.endDate, + Parameters.filter + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.TransactionsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingAccountNameNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.TransactionsListResult + }, + 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..bf7d19074264 --- /dev/null +++ b/sdk/billing/arm-billing/src/operations/transfers.ts @@ -0,0 +1,312 @@ +/* + * 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 invoiceSectionName InvoiceSection Id. + * @param body Initiate transfer parameters. + * @param [options] The optional parameters + * @returns Promise + */ + initiate(billingAccountName: string, invoiceSectionName: string, body: Models.InitiateTransferRequest, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param body Initiate transfer parameters. + * @param callback The callback + */ + initiate(billingAccountName: string, invoiceSectionName: string, body: Models.InitiateTransferRequest, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param body Initiate transfer parameters. + * @param options The optional parameters + * @param callback The callback + */ + initiate(billingAccountName: string, invoiceSectionName: string, body: Models.InitiateTransferRequest, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + initiate(billingAccountName: string, invoiceSectionName: string, body: Models.InitiateTransferRequest, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + invoiceSectionName, + body, + options + }, + initiateOperationSpec, + callback) as Promise; + } + + /** + * Gets the transfer details for given transfer Id. + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param transferName Transfer Name. + * @param [options] The optional parameters + * @returns Promise + */ + get(billingAccountName: string, invoiceSectionName: string, transferName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param transferName Transfer Name. + * @param callback The callback + */ + get(billingAccountName: string, invoiceSectionName: string, transferName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param transferName Transfer Name. + * @param options The optional parameters + * @param callback The callback + */ + get(billingAccountName: string, invoiceSectionName: string, transferName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(billingAccountName: string, invoiceSectionName: string, transferName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + invoiceSectionName, + transferName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Cancels the transfer for given transfer Id. + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param transferName Transfer Name. + * @param [options] The optional parameters + * @returns Promise + */ + cancel(billingAccountName: string, invoiceSectionName: string, transferName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param transferName Transfer Name. + * @param callback The callback + */ + cancel(billingAccountName: string, invoiceSectionName: string, transferName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param transferName Transfer Name. + * @param options The optional parameters + * @param callback The callback + */ + cancel(billingAccountName: string, invoiceSectionName: string, transferName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + cancel(billingAccountName: string, invoiceSectionName: string, transferName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + invoiceSectionName, + transferName, + options + }, + cancelOperationSpec, + callback) as Promise; + } + + /** + * Lists all transfer's details initiated from given invoice section. + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param [options] The optional parameters + * @returns Promise + */ + list(billingAccountName: string, invoiceSectionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param callback The callback + */ + list(billingAccountName: string, invoiceSectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param options The optional parameters + * @param callback The callback + */ + list(billingAccountName: string, invoiceSectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(billingAccountName: string, invoiceSectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + 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}/invoiceSections/{invoiceSectionName}/initiateTransfer", + urlParameters: [ + Parameters.billingAccountName, + Parameters.invoiceSectionName + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "body", + 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}/invoiceSections/{invoiceSectionName}/transfers/{transferName}", + urlParameters: [ + Parameters.billingAccountName, + 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}/invoiceSections/{invoiceSectionName}/transfers/{transferName}", + urlParameters: [ + Parameters.billingAccountName, + 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}/invoiceSections/{invoiceSectionName}/transfers", + urlParameters: [ + Parameters.billingAccountName, + 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 +};