diff --git a/packages/@azure/arm-billing/LICENSE.txt b/packages/@azure/arm-billing/LICENSE.txt index a70e8cf66038..8f3d856145c5 100644 --- a/packages/@azure/arm-billing/LICENSE.txt +++ b/packages/@azure/arm-billing/LICENSE.txt @@ -1,21 +1,21 @@ -The MIT License (MIT) - -Copyright (c) 2018 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 -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +The MIT License (MIT) + +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 +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/@azure/arm-billing/README.md b/packages/@azure/arm-billing/README.md index dba2372ac204..f3f38ad770f2 100644 --- a/packages/@azure/arm-billing/README.md +++ b/packages/@azure/arm-billing/README.md @@ -1,99 +1,98 @@ -## Azure BillingManagementClient SDK for JavaScript - -This package contains an isomorphic SDK for BillingManagementClient. - -### Currently supported environments - -- Node.js version 6.x.x or higher -- Browser JavaScript - -### How to Install - -``` -npm install @azure/arm-billing -``` - -### How to use - -#### nodejs - Authentication, client creation and list enrollmentAccounts as an example written in TypeScript. - -##### Install @azure/ms-rest-nodeauth - -``` -npm install @azure/ms-rest-nodeauth -``` - -##### Sample code - -```ts -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { BillingManagementClient, BillingManagementModels, BillingManagementMappers } from "@azure/arm-billing"; -const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; - -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new BillingManagementClient(creds, subscriptionId); - client.enrollmentAccounts.list().then((result) => { - console.log("The result is:"); - console.log(result); - }); -}).catch((err) => { - console.error(err); -}); -``` - -#### browser - Authentication, client creation and list enrollmentAccounts as an example written in JavaScript. - -##### Install @azure/ms-rest-browserauth - -``` -npm install @azure/ms-rest-browserauth -``` - -##### Sample code - -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - -- index.html -```html - - - - @azure/arm-billing sample - - - - - - - - -``` - -## 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%2Fpackages%2F%40azure%2Farm-billing%2FREADME.png) +## Azure BillingManagementClient SDK for JavaScript + +This package contains an isomorphic SDK for BillingManagementClient. + +### Currently supported environments + +- Node.js version 6.x.x or higher +- Browser JavaScript + +### How to Install + +```bash +npm install @azure/arm-billing +``` + +### How to use + +#### 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 + +```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"; +import { BillingManagementClient, BillingManagementModels, BillingManagementMappers } from "@azure/arm-billing"; +const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; + +msRestNodeAuth.interactiveLogin().then((creds) => { + const client = new BillingManagementClient(creds, subscriptionId); + const expand = "testexpand"; + client.billingAccounts.list(expand).then((result) => { + console.log("The result is:"); + console.log(result); + }); +}).catch((err) => { + console.error(err); +}); +``` + +#### 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 +``` + +##### Sample code + +See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. + +- index.html +```html + + + + @azure/arm-billing sample + + + + + + + + +``` + +## Related projects + +- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) diff --git a/packages/@azure/arm-billing/lib/billingManagementClient.ts b/packages/@azure/arm-billing/lib/billingManagementClient.ts index 171fe7188b39..a8ffdaa89d19 100644 --- a/packages/@azure/arm-billing/lib/billingManagementClient.ts +++ b/packages/@azure/arm-billing/lib/billingManagementClient.ts @@ -11,16 +11,55 @@ import * as msRest from "@azure/ms-rest-js"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; +import * as Parameters from "./models/parameters"; import * as operations from "./operations"; import { BillingManagementClientContext } from "./billingManagementClientContext"; class BillingManagementClient extends BillingManagementClientContext { // Operation groups + billingAccounts: operations.BillingAccounts; + billingAccountsWithCreateInvoiceSectionPermission: operations.BillingAccountsWithCreateInvoiceSectionPermission; + availableBalanceByBillingProfile: operations.AvailableBalanceByBillingProfile; + paymentMethodsByBillingProfile: operations.PaymentMethodsByBillingProfile; + billingProfilesByBillingAccountName: operations.BillingProfilesByBillingAccountName; + billingProfiles: operations.BillingProfiles; + invoiceSectionsByBillingAccountName: operations.InvoiceSectionsByBillingAccountName; + invoiceSections: operations.InvoiceSections; + invoiceSectionsWithCreateSubscriptionPermission: operations.InvoiceSectionsWithCreateSubscriptionPermission; + departmentsByBillingAccountName: operations.DepartmentsByBillingAccountName; + departments: operations.Departments; + enrollmentAccountsByBillingAccountName: operations.EnrollmentAccountsByBillingAccountName; enrollmentAccounts: operations.EnrollmentAccounts; - billingPeriods: operations.BillingPeriods; - invoices: operations.Invoices; + invoicesByBillingAccount: operations.InvoicesByBillingAccount; + invoicePricesheet: operations.InvoicePricesheet; + invoicesByBillingProfile: operations.InvoicesByBillingProfile; + invoice: operations.Invoice; + productsByBillingSubscriptions: operations.ProductsByBillingSubscriptions; + billingSubscriptionsByBillingProfile: operations.BillingSubscriptionsByBillingProfile; + billingSubscriptionsByInvoiceSection: operations.BillingSubscriptionsByInvoiceSection; + billingSubscription: operations.BillingSubscription; + productsByBillingAccount: operations.ProductsByBillingAccount; + productsByInvoiceSection: operations.ProductsByInvoiceSection; + products: operations.Products; + transactionsByBillingAccount: operations.TransactionsByBillingAccount; + transactionsByBillingProfile: operations.TransactionsByBillingProfile; + transactionsByInvoiceSection: operations.TransactionsByInvoiceSection; + policy: operations.PolicyOperations; + billingProperty: operations.BillingPropertyOperations; + transfers: operations.Transfers; + recipientTransfers: operations.RecipientTransfers; operations: operations.Operations; + billingAccountBillingPermissions: operations.BillingAccountBillingPermissions; + invoiceSectionsBillingPermissions: operations.InvoiceSectionsBillingPermissions; + billingProfileBillingPermissions: operations.BillingProfileBillingPermissions; + billingAccountBillingRoleDefinition: operations.BillingAccountBillingRoleDefinition; + invoiceSectionBillingRoleDefinition: operations.InvoiceSectionBillingRoleDefinition; + billingProfileBillingRoleDefinition: operations.BillingProfileBillingRoleDefinition; + billingAccountBillingRoleAssignment: operations.BillingAccountBillingRoleAssignment; + invoiceSectionBillingRoleAssignment: operations.InvoiceSectionBillingRoleAssignment; + billingProfileBillingRoleAssignment: operations.BillingProfileBillingRoleAssignment; + agreements: operations.Agreements; /** * Initializes a new instance of the BillingManagementClient class. @@ -30,14 +69,193 @@ class BillingManagementClient extends BillingManagementClientContext { */ constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.BillingManagementClientOptions) { super(credentials, subscriptionId, options); + this.billingAccounts = new operations.BillingAccounts(this); + this.billingAccountsWithCreateInvoiceSectionPermission = new operations.BillingAccountsWithCreateInvoiceSectionPermission(this); + this.availableBalanceByBillingProfile = new operations.AvailableBalanceByBillingProfile(this); + this.paymentMethodsByBillingProfile = new operations.PaymentMethodsByBillingProfile(this); + this.billingProfilesByBillingAccountName = new operations.BillingProfilesByBillingAccountName(this); + this.billingProfiles = new operations.BillingProfiles(this); + this.invoiceSectionsByBillingAccountName = new operations.InvoiceSectionsByBillingAccountName(this); + this.invoiceSections = new operations.InvoiceSections(this); + this.invoiceSectionsWithCreateSubscriptionPermission = new operations.InvoiceSectionsWithCreateSubscriptionPermission(this); + this.departmentsByBillingAccountName = new operations.DepartmentsByBillingAccountName(this); + this.departments = new operations.Departments(this); + this.enrollmentAccountsByBillingAccountName = new operations.EnrollmentAccountsByBillingAccountName(this); this.enrollmentAccounts = new operations.EnrollmentAccounts(this); - this.billingPeriods = new operations.BillingPeriods(this); - this.invoices = new operations.Invoices(this); + this.invoicesByBillingAccount = new operations.InvoicesByBillingAccount(this); + this.invoicePricesheet = new operations.InvoicePricesheet(this); + this.invoicesByBillingProfile = new operations.InvoicesByBillingProfile(this); + this.invoice = new operations.Invoice(this); + this.productsByBillingSubscriptions = new operations.ProductsByBillingSubscriptions(this); + this.billingSubscriptionsByBillingProfile = new operations.BillingSubscriptionsByBillingProfile(this); + this.billingSubscriptionsByInvoiceSection = new operations.BillingSubscriptionsByInvoiceSection(this); + this.billingSubscription = new operations.BillingSubscription(this); + this.productsByBillingAccount = new operations.ProductsByBillingAccount(this); + this.productsByInvoiceSection = new operations.ProductsByInvoiceSection(this); + this.products = new operations.Products(this); + this.transactionsByBillingAccount = new operations.TransactionsByBillingAccount(this); + this.transactionsByBillingProfile = new operations.TransactionsByBillingProfile(this); + this.transactionsByInvoiceSection = new operations.TransactionsByInvoiceSection(this); + this.policy = new operations.PolicyOperations(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.billingAccountBillingPermissions = new operations.BillingAccountBillingPermissions(this); + this.invoiceSectionsBillingPermissions = new operations.InvoiceSectionsBillingPermissions(this); + this.billingProfileBillingPermissions = new operations.BillingProfileBillingPermissions(this); + this.billingAccountBillingRoleDefinition = new operations.BillingAccountBillingRoleDefinition(this); + this.invoiceSectionBillingRoleDefinition = new operations.InvoiceSectionBillingRoleDefinition(this); + this.billingProfileBillingRoleDefinition = new operations.BillingProfileBillingRoleDefinition(this); + this.billingAccountBillingRoleAssignment = new operations.BillingAccountBillingRoleAssignment(this); + this.invoiceSectionBillingRoleAssignment = new operations.InvoiceSectionBillingRoleAssignment(this); + this.billingProfileBillingRoleAssignment = new operations.BillingProfileBillingRoleAssignment(this); + this.agreements = new operations.Agreements(this); + } + + /** + * Cancel product by product id + * @param billingAccountName billing Account Id. + * @param productName Invoice Id. + * @param [options] The optional parameters + * @returns Promise + */ + updateAutoRenewForBillingAccount(billingAccountName: string, productName: string, options?: Models.BillingManagementClientUpdateAutoRenewForBillingAccountOptionalParams): Promise; + /** + * @param billingAccountName billing Account Id. + * @param productName Invoice Id. + * @param callback The callback + */ + updateAutoRenewForBillingAccount(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 + */ + updateAutoRenewForBillingAccount(billingAccountName: string, productName: string, options: Models.BillingManagementClientUpdateAutoRenewForBillingAccountOptionalParams, callback: msRest.ServiceCallback): void; + updateAutoRenewForBillingAccount(billingAccountName: string, productName: string, options?: Models.BillingManagementClientUpdateAutoRenewForBillingAccountOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.sendOperationRequest( + { + billingAccountName, + productName, + options + }, + updateAutoRenewForBillingAccountOperationSpec, + callback) as Promise; + } + + /** + * Cancel auto renew for product by product id + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param productName Invoice Id. + * @param [options] The optional parameters + * @returns Promise + */ + updateAutoRenewForInvoiceSection(billingAccountName: string, invoiceSectionName: string, productName: string, options?: Models.BillingManagementClientUpdateAutoRenewForInvoiceSectionOptionalParams): Promise; + /** + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param productName Invoice Id. + * @param callback The callback + */ + updateAutoRenewForInvoiceSection(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 + */ + updateAutoRenewForInvoiceSection(billingAccountName: string, invoiceSectionName: string, productName: string, options: Models.BillingManagementClientUpdateAutoRenewForInvoiceSectionOptionalParams, callback: msRest.ServiceCallback): void; + updateAutoRenewForInvoiceSection(billingAccountName: string, invoiceSectionName: string, productName: string, options?: Models.BillingManagementClientUpdateAutoRenewForInvoiceSectionOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.sendOperationRequest( + { + billingAccountName, + invoiceSectionName, + productName, + options + }, + updateAutoRenewForInvoiceSectionOperationSpec, + callback) as Promise; } } // Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const updateAutoRenewForBillingAccountOperationSpec: 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 updateAutoRenewForInvoiceSectionOperationSpec: 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 +}; export { BillingManagementClient, diff --git a/packages/@azure/arm-billing/lib/billingManagementClientContext.ts b/packages/@azure/arm-billing/lib/billingManagementClientContext.ts index 3501b4ba6e55..9be11d0cc4cc 100644 --- a/packages/@azure/arm-billing/lib/billingManagementClientContext.ts +++ b/packages/@azure/arm-billing/lib/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/packages/@azure/arm-billing/lib/models/agreementsMappers.ts b/packages/@azure/arm-billing/lib/models/agreementsMappers.ts new file mode 100644 index 000000000000..c08c53d2eb8e --- /dev/null +++ b/packages/@azure/arm-billing/lib/models/agreementsMappers.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 { + AgreementListResult, + Agreement, + Resource, + BaseResource, + Participants, + ErrorResponse, + ErrorDetails, + BillingProfile, + Address, + EnabledAzureSKUs, + InvoiceSection, + EnrollmentAccount, + Department, + BillingAccount, + Enrollment, + EnrollmentPolicies, + InvoiceSummary, + Amount, + DownloadProperties, + PaymentProperties, + ProductSummary, + BillingSubscriptionSummary, + EnrollmentAccountContext, + TransactionsSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleAssignment, + BillingRoleDefinition, + BillingPermissions +} from "../models/mappers"; + diff --git a/packages/@azure/arm-billing/lib/models/availableBalanceByBillingProfileMappers.ts b/packages/@azure/arm-billing/lib/models/availableBalanceByBillingProfileMappers.ts new file mode 100644 index 000000000000..c36a12423635 --- /dev/null +++ b/packages/@azure/arm-billing/lib/models/availableBalanceByBillingProfileMappers.ts @@ -0,0 +1,42 @@ +/* + * 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 { + AvailableBalance, + Resource, + BaseResource, + Amount, + ErrorResponse, + ErrorDetails, + BillingProfile, + Address, + EnabledAzureSKUs, + InvoiceSection, + EnrollmentAccount, + Department, + BillingAccount, + Enrollment, + EnrollmentPolicies, + InvoiceSummary, + DownloadProperties, + PaymentProperties, + ProductSummary, + BillingSubscriptionSummary, + EnrollmentAccountContext, + TransactionsSummary, + Policy, + PaymentMethod, + BillingRoleAssignment, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/packages/@azure/arm-billing/lib/models/billingAccountBillingPermissionsMappers.ts b/packages/@azure/arm-billing/lib/models/billingAccountBillingPermissionsMappers.ts new file mode 100644 index 000000000000..d0184f6b57d5 --- /dev/null +++ b/packages/@azure/arm-billing/lib/models/billingAccountBillingPermissionsMappers.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 { + BillingPermissionsListResult, + BillingPermissions, + ErrorResponse, + ErrorDetails +} from "../models/mappers"; + diff --git a/packages/@azure/arm-billing/lib/models/billingAccountBillingRoleAssignmentMappers.ts b/packages/@azure/arm-billing/lib/models/billingAccountBillingRoleAssignmentMappers.ts new file mode 100644 index 000000000000..e7eaae301072 --- /dev/null +++ b/packages/@azure/arm-billing/lib/models/billingAccountBillingRoleAssignmentMappers.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 { + BillingRoleAssignment, + Resource, + BaseResource, + ErrorResponse, + ErrorDetails, + BillingRoleAssignmentListResult, + BillingRoleAssignmentPayload, + BillingProfile, + Address, + EnabledAzureSKUs, + InvoiceSection, + EnrollmentAccount, + Department, + BillingAccount, + Enrollment, + EnrollmentPolicies, + InvoiceSummary, + Amount, + DownloadProperties, + PaymentProperties, + ProductSummary, + BillingSubscriptionSummary, + EnrollmentAccountContext, + TransactionsSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/packages/@azure/arm-billing/lib/models/billingAccountBillingRoleDefinitionMappers.ts b/packages/@azure/arm-billing/lib/models/billingAccountBillingRoleDefinitionMappers.ts new file mode 100644 index 000000000000..bece5e8a4a88 --- /dev/null +++ b/packages/@azure/arm-billing/lib/models/billingAccountBillingRoleDefinitionMappers.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 { + BillingRoleDefinition, + Resource, + BaseResource, + BillingPermissions, + ErrorResponse, + ErrorDetails, + BillingRoleDefinitionListResult, + BillingProfile, + Address, + EnabledAzureSKUs, + InvoiceSection, + EnrollmentAccount, + Department, + BillingAccount, + Enrollment, + EnrollmentPolicies, + InvoiceSummary, + Amount, + DownloadProperties, + PaymentProperties, + ProductSummary, + BillingSubscriptionSummary, + EnrollmentAccountContext, + TransactionsSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleAssignment, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/packages/@azure/arm-billing/lib/models/billingAccountsMappers.ts b/packages/@azure/arm-billing/lib/models/billingAccountsMappers.ts new file mode 100644 index 000000000000..e978a3252f5e --- /dev/null +++ b/packages/@azure/arm-billing/lib/models/billingAccountsMappers.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 { + BillingAccountListResult, + BillingAccount, + Resource, + BaseResource, + Address, + InvoiceSection, + BillingProfile, + EnabledAzureSKUs, + Enrollment, + EnrollmentPolicies, + Department, + EnrollmentAccount, + ErrorResponse, + ErrorDetails, + InvoiceSummary, + Amount, + DownloadProperties, + PaymentProperties, + ProductSummary, + BillingSubscriptionSummary, + EnrollmentAccountContext, + TransactionsSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleAssignment, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/packages/@azure/arm-billing/lib/models/billingAccountsWithCreateInvoiceSectionPermissionMappers.ts b/packages/@azure/arm-billing/lib/models/billingAccountsWithCreateInvoiceSectionPermissionMappers.ts new file mode 100644 index 000000000000..e978a3252f5e --- /dev/null +++ b/packages/@azure/arm-billing/lib/models/billingAccountsWithCreateInvoiceSectionPermissionMappers.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 { + BillingAccountListResult, + BillingAccount, + Resource, + BaseResource, + Address, + InvoiceSection, + BillingProfile, + EnabledAzureSKUs, + Enrollment, + EnrollmentPolicies, + Department, + EnrollmentAccount, + ErrorResponse, + ErrorDetails, + InvoiceSummary, + Amount, + DownloadProperties, + PaymentProperties, + ProductSummary, + BillingSubscriptionSummary, + EnrollmentAccountContext, + TransactionsSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleAssignment, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/packages/@azure/arm-billing/lib/models/billingProfileBillingPermissionsMappers.ts b/packages/@azure/arm-billing/lib/models/billingProfileBillingPermissionsMappers.ts new file mode 100644 index 000000000000..d0184f6b57d5 --- /dev/null +++ b/packages/@azure/arm-billing/lib/models/billingProfileBillingPermissionsMappers.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 { + BillingPermissionsListResult, + BillingPermissions, + ErrorResponse, + ErrorDetails +} from "../models/mappers"; + diff --git a/packages/@azure/arm-billing/lib/models/billingProfileBillingRoleAssignmentMappers.ts b/packages/@azure/arm-billing/lib/models/billingProfileBillingRoleAssignmentMappers.ts new file mode 100644 index 000000000000..e7eaae301072 --- /dev/null +++ b/packages/@azure/arm-billing/lib/models/billingProfileBillingRoleAssignmentMappers.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 { + BillingRoleAssignment, + Resource, + BaseResource, + ErrorResponse, + ErrorDetails, + BillingRoleAssignmentListResult, + BillingRoleAssignmentPayload, + BillingProfile, + Address, + EnabledAzureSKUs, + InvoiceSection, + EnrollmentAccount, + Department, + BillingAccount, + Enrollment, + EnrollmentPolicies, + InvoiceSummary, + Amount, + DownloadProperties, + PaymentProperties, + ProductSummary, + BillingSubscriptionSummary, + EnrollmentAccountContext, + TransactionsSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/packages/@azure/arm-billing/lib/models/billingProfileBillingRoleDefinitionMappers.ts b/packages/@azure/arm-billing/lib/models/billingProfileBillingRoleDefinitionMappers.ts new file mode 100644 index 000000000000..bece5e8a4a88 --- /dev/null +++ b/packages/@azure/arm-billing/lib/models/billingProfileBillingRoleDefinitionMappers.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 { + BillingRoleDefinition, + Resource, + BaseResource, + BillingPermissions, + ErrorResponse, + ErrorDetails, + BillingRoleDefinitionListResult, + BillingProfile, + Address, + EnabledAzureSKUs, + InvoiceSection, + EnrollmentAccount, + Department, + BillingAccount, + Enrollment, + EnrollmentPolicies, + InvoiceSummary, + Amount, + DownloadProperties, + PaymentProperties, + ProductSummary, + BillingSubscriptionSummary, + EnrollmentAccountContext, + TransactionsSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleAssignment, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/packages/@azure/arm-billing/lib/models/billingProfilesByBillingAccountNameMappers.ts b/packages/@azure/arm-billing/lib/models/billingProfilesByBillingAccountNameMappers.ts new file mode 100644 index 000000000000..9e661c492d72 --- /dev/null +++ b/packages/@azure/arm-billing/lib/models/billingProfilesByBillingAccountNameMappers.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 { + BillingProfileListResult, + BillingProfile, + Resource, + BaseResource, + Address, + EnabledAzureSKUs, + InvoiceSection, + ErrorResponse, + ErrorDetails, + EnrollmentAccount, + Department, + BillingAccount, + Enrollment, + EnrollmentPolicies, + InvoiceSummary, + Amount, + DownloadProperties, + PaymentProperties, + ProductSummary, + BillingSubscriptionSummary, + EnrollmentAccountContext, + TransactionsSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleAssignment, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/packages/@azure/arm-billing/lib/models/billingProfilesMappers.ts b/packages/@azure/arm-billing/lib/models/billingProfilesMappers.ts new file mode 100644 index 000000000000..c0d221b07229 --- /dev/null +++ b/packages/@azure/arm-billing/lib/models/billingProfilesMappers.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 { + BillingProfile, + Resource, + BaseResource, + Address, + EnabledAzureSKUs, + InvoiceSection, + ErrorResponse, + ErrorDetails, + BillingProfilesUpdateHeaders, + EnrollmentAccount, + Department, + BillingAccount, + Enrollment, + EnrollmentPolicies, + InvoiceSummary, + Amount, + DownloadProperties, + PaymentProperties, + ProductSummary, + BillingSubscriptionSummary, + EnrollmentAccountContext, + TransactionsSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleAssignment, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/packages/@azure/arm-billing/lib/models/billingPropertyOperationsMappers.ts b/packages/@azure/arm-billing/lib/models/billingPropertyOperationsMappers.ts new file mode 100644 index 000000000000..543d5bd69450 --- /dev/null +++ b/packages/@azure/arm-billing/lib/models/billingPropertyOperationsMappers.ts @@ -0,0 +1,16 @@ +/* + * 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 { + BillingProperty, + ErrorResponse, + ErrorDetails +} from "../models/mappers"; + diff --git a/packages/@azure/arm-billing/lib/models/billingSubscriptionMappers.ts b/packages/@azure/arm-billing/lib/models/billingSubscriptionMappers.ts new file mode 100644 index 000000000000..cf719066254b --- /dev/null +++ b/packages/@azure/arm-billing/lib/models/billingSubscriptionMappers.ts @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + BillingSubscriptionSummary, + Resource, + BaseResource, + Amount, + EnrollmentAccountContext, + ErrorResponse, + ErrorDetails, + TransferBillingSubscriptionRequestProperties, + TransferBillingSubscriptionResult, + BillingSubscriptionTransferHeaders, + BillingProfile, + Address, + EnabledAzureSKUs, + InvoiceSection, + EnrollmentAccount, + Department, + BillingAccount, + Enrollment, + EnrollmentPolicies, + InvoiceSummary, + DownloadProperties, + PaymentProperties, + ProductSummary, + TransactionsSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleAssignment, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/packages/@azure/arm-billing/lib/models/billingSubscriptionsByBillingProfileMappers.ts b/packages/@azure/arm-billing/lib/models/billingSubscriptionsByBillingProfileMappers.ts new file mode 100644 index 000000000000..f7f19c67866a --- /dev/null +++ b/packages/@azure/arm-billing/lib/models/billingSubscriptionsByBillingProfileMappers.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 { + BillingSubscriptionsListResult, + BillingSubscriptionSummary, + Resource, + BaseResource, + Amount, + EnrollmentAccountContext, + ErrorResponse, + ErrorDetails, + BillingProfile, + Address, + EnabledAzureSKUs, + InvoiceSection, + EnrollmentAccount, + Department, + BillingAccount, + Enrollment, + EnrollmentPolicies, + InvoiceSummary, + DownloadProperties, + PaymentProperties, + ProductSummary, + TransactionsSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleAssignment, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/packages/@azure/arm-billing/lib/models/billingSubscriptionsByInvoiceSectionMappers.ts b/packages/@azure/arm-billing/lib/models/billingSubscriptionsByInvoiceSectionMappers.ts new file mode 100644 index 000000000000..f7f19c67866a --- /dev/null +++ b/packages/@azure/arm-billing/lib/models/billingSubscriptionsByInvoiceSectionMappers.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 { + BillingSubscriptionsListResult, + BillingSubscriptionSummary, + Resource, + BaseResource, + Amount, + EnrollmentAccountContext, + ErrorResponse, + ErrorDetails, + BillingProfile, + Address, + EnabledAzureSKUs, + InvoiceSection, + EnrollmentAccount, + Department, + BillingAccount, + Enrollment, + EnrollmentPolicies, + InvoiceSummary, + DownloadProperties, + PaymentProperties, + ProductSummary, + TransactionsSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleAssignment, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/packages/@azure/arm-billing/lib/models/departmentsByBillingAccountNameMappers.ts b/packages/@azure/arm-billing/lib/models/departmentsByBillingAccountNameMappers.ts new file mode 100644 index 000000000000..ba60dea227ec --- /dev/null +++ b/packages/@azure/arm-billing/lib/models/departmentsByBillingAccountNameMappers.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 { + DepartmentListResult, + Department, + Resource, + BaseResource, + EnrollmentAccount, + ErrorResponse, + ErrorDetails, + BillingProfile, + Address, + EnabledAzureSKUs, + InvoiceSection, + BillingAccount, + Enrollment, + EnrollmentPolicies, + InvoiceSummary, + Amount, + DownloadProperties, + PaymentProperties, + ProductSummary, + BillingSubscriptionSummary, + EnrollmentAccountContext, + TransactionsSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleAssignment, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/packages/@azure/arm-billing/lib/models/departmentsMappers.ts b/packages/@azure/arm-billing/lib/models/departmentsMappers.ts new file mode 100644 index 000000000000..45962ef839f1 --- /dev/null +++ b/packages/@azure/arm-billing/lib/models/departmentsMappers.ts @@ -0,0 +1,42 @@ +/* + * 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 { + Department, + Resource, + BaseResource, + EnrollmentAccount, + ErrorResponse, + ErrorDetails, + BillingProfile, + Address, + EnabledAzureSKUs, + InvoiceSection, + BillingAccount, + Enrollment, + EnrollmentPolicies, + InvoiceSummary, + Amount, + DownloadProperties, + PaymentProperties, + ProductSummary, + BillingSubscriptionSummary, + EnrollmentAccountContext, + TransactionsSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleAssignment, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/packages/@azure/arm-billing/lib/models/enrollmentAccountsByBillingAccountNameMappers.ts b/packages/@azure/arm-billing/lib/models/enrollmentAccountsByBillingAccountNameMappers.ts new file mode 100644 index 000000000000..1ba8a06548b1 --- /dev/null +++ b/packages/@azure/arm-billing/lib/models/enrollmentAccountsByBillingAccountNameMappers.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 { + EnrollmentAccountListResult, + EnrollmentAccount, + Resource, + BaseResource, + Department, + ErrorResponse, + ErrorDetails, + BillingProfile, + Address, + EnabledAzureSKUs, + InvoiceSection, + BillingAccount, + Enrollment, + EnrollmentPolicies, + InvoiceSummary, + Amount, + DownloadProperties, + PaymentProperties, + ProductSummary, + BillingSubscriptionSummary, + EnrollmentAccountContext, + TransactionsSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleAssignment, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/packages/@azure/arm-billing/lib/models/enrollmentAccountsMappers.ts b/packages/@azure/arm-billing/lib/models/enrollmentAccountsMappers.ts index c6eb15ea27c6..eca2717404b3 100644 --- a/packages/@azure/arm-billing/lib/models/enrollmentAccountsMappers.ts +++ b/packages/@azure/arm-billing/lib/models/enrollmentAccountsMappers.ts @@ -9,14 +9,34 @@ */ export { - EnrollmentAccountListResult, EnrollmentAccount, Resource, BaseResource, + Department, ErrorResponse, ErrorDetails, - BillingPeriod, - Invoice, - DownloadUrl + BillingProfile, + Address, + EnabledAzureSKUs, + InvoiceSection, + BillingAccount, + Enrollment, + EnrollmentPolicies, + InvoiceSummary, + Amount, + DownloadProperties, + PaymentProperties, + ProductSummary, + BillingSubscriptionSummary, + EnrollmentAccountContext, + TransactionsSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleAssignment, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants } from "../models/mappers"; diff --git a/packages/@azure/arm-billing/lib/models/index.ts b/packages/@azure/arm-billing/lib/models/index.ts index 43c00d84b805..19ba9975b377 100644 --- a/packages/@azure/arm-billing/lib/models/index.ts +++ b/packages/@azure/arm-billing/lib/models/index.ts @@ -16,378 +16,3966 @@ export { BaseResource, CloudError }; /** * @interface - * An interface representing Resource. - * The Resource model definition. + * An interface representing InitiateTransferRequest. + * Request parameters to initiate transfer. * - * @extends BaseResource */ -export interface Resource extends BaseResource { +export interface InitiateTransferRequest { /** - * @member {string} [id] Resource Id. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * @member {string} [billingProfileId] Target Usage context for devTest + * subscriptions. */ - readonly id?: string; + billingProfileId?: string; /** - * @member {string} [name] Resource name. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * @member {string} [recipientEmailId] Email Id of recipient for transfer. */ - readonly name?: string; + recipientEmailId?: string; +} + +/** + * @interface + * An interface representing ProductDetails. + * Details of the product to be transferred. + * + */ +export interface ProductDetails { /** - * @member {string} [type] Resource type. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * @member {ProductType} [productType] Type of the product to be transferred. + * Possible values include: 'AzureSubscription', 'AzureReservation' */ - readonly type?: string; + productType?: ProductType; + /** + * @member {string} [productId] Id of product to be transferred. + */ + productId?: string; } /** * @interface - * An interface representing EnrollmentAccount. - * An enrollment account resource. + * An interface representing AcceptTransferRequest. + * Request parameters to accept transfer. * - * @extends Resource */ -export interface EnrollmentAccount extends Resource { +export interface AcceptTransferRequest { + /** + * @member {ProductDetails[]} [productDetails] Request parameters to accept + * transfer. + */ + productDetails?: ProductDetails[]; +} + +/** + * @interface + * An interface representing ErrorModel. + * Error details for transfer execution. + * + */ +export interface ErrorModel { + /** + * @member {string} [errorCode] Error code. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly errorCode?: string; /** - * @member {string} [principalName] The account owner's principal name. + * @member {string} [errorMessage] Error message. * **NOTE: This property will not be serialized. It can only be populated by * the server.** */ - readonly principalName?: string; + readonly errorMessage?: string; } /** * @interface - * An interface representing BillingPeriod. - * A billing period resource. + * An interface representing DetailedTransferStatus. + * Detailed transfer status. * - * @extends Resource */ -export interface BillingPeriod extends Resource { +export interface DetailedTransferStatus { /** - * @member {Date} [billingPeriodStartDate] The start of the date range - * covered by the billing period. + * @member {ProductType} [productType] 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 billingPeriodStartDate?: Date; + readonly productType?: ProductType; /** - * @member {Date} [billingPeriodEndDate] The end of the date range covered by - * the billing period. + * @member {string} [productId] Id of product being transferred. * **NOTE: This property will not be serialized. It can only be populated by * the server.** */ - readonly billingPeriodEndDate?: Date; + readonly productId?: string; /** - * @member {string[]} [invoiceIds] Array of invoice ids that associated with. + * @member {ProductTransferStatus} [transferStatus] 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 invoiceIds?: string[]; + readonly transferStatus?: ProductTransferStatus; + /** + * @member {ErrorModel} [errorDetails] Error details for transfer execution. + */ + errorDetails?: ErrorModel; } /** * @interface - * An interface representing DownloadUrl. - * A secure URL that can be used to download a PDF invoice until the URL - * expires. + * An interface representing TransferDetails. + * Details of the transfer. * */ -export interface DownloadUrl { +export interface TransferDetails { /** - * @member {Date} [expiryTime] The time in UTC at which this download URL - * will expire. + * @member {Date} [creationTime] Transfer creation time. * **NOTE: This property will not be serialized. It can only be populated by * the server.** */ - readonly expiryTime?: Date; + readonly creationTime?: Date; /** - * @member {string} [url] The URL to the PDF file. + * @member {Date} [expirationTime] Transfer expiration time. * **NOTE: This property will not be serialized. It can only be populated by * the server.** */ - readonly url?: string; + readonly expirationTime?: Date; + /** + * @member {string} [invoiceSectionId] Target invoice section Id. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly invoiceSectionId?: string; + /** + * @member {string} [billingAccountId] Target billing account Id. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly billingAccountId?: string; + /** + * @member {TransferStatus} [transferStatus] 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; + /** + * @member {string} [recipientEmailId] Email Id of recipient of transfer. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly recipientEmailId?: string; + /** + * @member {string} [initiatorEmailId] Email Id of initiator of transfer. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly initiatorEmailId?: string; + /** + * @member {string} [canceledBy] 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; + /** + * @member {Date} [lastModifiedTime] Transfer last modification time. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly lastModifiedTime?: Date; + /** + * @member {DetailedTransferStatus[]} [detailedTransferStatus] Detailed + * transfer status. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly detailedTransferStatus?: DetailedTransferStatus[]; } /** * @interface - * An interface representing ErrorDetails. - * The details of the error. + * An interface representing RecipientTransferDetails. + * Details of the transfer. * */ -export interface ErrorDetails { +export interface RecipientTransferDetails { /** - * @member {string} [code] Error code. + * @member {Date} [creationTime] Transfer creation time. * **NOTE: This property will not be serialized. It can only be populated by * the server.** */ - readonly code?: string; + readonly creationTime?: Date; /** - * @member {string} [message] Error message indicating why the operation - * failed. + * @member {Date} [expirationTime] Transfer expiration time. * **NOTE: This property will not be serialized. It can only be populated by * the server.** */ - readonly message?: string; + readonly expirationTime?: Date; /** - * @member {string} [target] The target of the particular error. + * @member {EligibleProductType[]} [allowedProductType] Type of subscriptions + * that can be transferred. * **NOTE: This property will not be serialized. It can only be populated by * the server.** */ - readonly target?: string; + readonly allowedProductType?: EligibleProductType[]; + /** + * @member {TransferStatus} [transferStatus] 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; + /** + * @member {string} [recipientEmailId] Email Id of recipient of transfer. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly recipientEmailId?: string; + /** + * @member {string} [initiatorEmailId] Email Id of initiator of transfer. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly initiatorEmailId?: string; + /** + * @member {string} [canceledBy] 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; + /** + * @member {Date} [lastModifiedTime] Transfer last modification time. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly lastModifiedTime?: Date; + /** + * @member {DetailedTransferStatus[]} [detailedTransferStatus] Detailed + * transfer status. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly detailedTransferStatus?: DetailedTransferStatus[]; } /** * @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. + * An interface representing TransferProductRequestProperties. + * The properties of the product to initiate a transfer. * */ -export interface ErrorResponse { +export interface TransferProductRequestProperties { /** - * @member {ErrorDetails} [error] The details of the error. + * @member {string} [destinationInvoiceSectionName] Destination invoice + * section id. */ - error?: ErrorDetails; + destinationInvoiceSectionName?: string; } /** * @interface - * An interface representing Invoice. - * An invoice resource can be used download a PDF version of an invoice. + * An interface representing TransferBillingSubscriptionResult. + * Request parameters to transfer billing subscription. + * + */ +export interface TransferBillingSubscriptionResult { + /** + * @member {string} [billingSubscriptionName] The destination billing + * subscription id. + */ + billingSubscriptionName?: string; +} + +/** + * @interface + * An interface representing TransferBillingSubscriptionRequestProperties. + * Request parameters to transfer billing subscription. + * + */ +export interface TransferBillingSubscriptionRequestProperties { + /** + * @member {string} [destinationInvoiceSectionName] The destination + * invoiceSectionName. + */ + destinationInvoiceSectionName?: string; +} + +/** + * @interface + * An interface representing TransferBillingSubscriptionRequest. + * Request parameters to transfer billing subscription. + * + */ +export interface TransferBillingSubscriptionRequest { + /** + * @member {string} [destinationInvoiceSectionName] The destination + * invoiceSectionName. + */ + destinationInvoiceSectionName?: string; +} + +/** + * @interface + * An interface representing UpdateAutoRenewOperationSummary. + * Summary of cancel product operation + * + */ +export interface UpdateAutoRenewOperationSummary { + /** + * @member {Date} [endDate] The end date of this asset + */ + endDate?: Date; +} + +/** + * @interface + * An interface representing Address. + * Address details. + * + */ +export interface Address { + /** + * @member {string} [firstName] First Name. + */ + firstName?: string; + /** + * @member {string} [lastName] Last Name. + */ + lastName?: string; + /** + * @member {string} [companyName] Company Name. + */ + companyName?: string; + /** + * @member {string} [addressLine1] Address Line1. + */ + addressLine1?: string; + /** + * @member {string} [addressLine2] Address Line2. + */ + addressLine2?: string; + /** + * @member {string} [addressLine3] Address Line3. + */ + addressLine3?: string; + /** + * @member {string} [city] Address City. + */ + city?: string; + /** + * @member {string} [region] Address Region. + */ + region?: string; + /** + * @member {string} [country] Country code uses ISO2, 2-digit format. + */ + country?: string; + /** + * @member {string} [postalCode] Address Postal Code. + */ + postalCode?: string; +} + +/** + * @interface + * An interface representing EnabledAzureSKUs. + * Details about the product. * - * @extends Resource */ -export interface Invoice extends Resource { +export interface EnabledAzureSKUs { /** - * @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. + * @member {string} [skuId] The sku id. */ - downloadUrl?: DownloadUrl; + skuId?: string; /** - * @member {Date} [invoicePeriodStartDate] The start of the date range - * covered by the invoice. + * @member {string} [skuDescription] The sku description. * **NOTE: This property will not be serialized. It can only be populated by * the server.** */ - readonly invoicePeriodStartDate?: Date; + 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.** + */ + readonly id?: string; /** - * @member {Date} [invoicePeriodEndDate] The end of the date range covered by - * the invoice. + * @member {string} [name] Resource name. * **NOTE: This property will not be serialized. It can only be populated by * the server.** */ - readonly invoicePeriodEndDate?: Date; + readonly name?: string; /** - * @member {string[]} [billingPeriodIds] Array of billing perdiod ids that - * the invoice is attributed to. + * @member {string} [type] Resource type. * **NOTE: This property will not be serialized. It can only be populated by * the server.** */ - readonly billingPeriodIds?: string[]; + readonly type?: string; } /** * @interface - * An interface representing OperationDisplay. - * The object that represents the operation. + * An interface representing BillingProfile. + * A billing profile resource. * + * @extends Resource */ -export interface OperationDisplay { +export interface BillingProfile extends Resource { /** - * @member {string} [provider] Service provider: Microsoft.Billing. + * @member {string} [displayName] The billing profile name. + */ + displayName?: string; + /** + * @member {string} [poNumber] Purchase order number. + */ + poNumber?: string; + /** + * @member {Address} [billingAddress] Billing address. + */ + billingAddress?: Address; + /** + * @member {boolean} [invoiceEmailOptIn] 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 provider?: string; + readonly invoiceEmailOptIn?: boolean; /** - * @member {string} [resource] Resource on which the operation is performed: - * Invoice, etc. + * @member {boolean} [isClassic] Is OMS bootstrapped billing profile. * **NOTE: This property will not be serialized. It can only be populated by * the server.** */ - readonly resource?: string; + readonly isClassic?: boolean; /** - * @member {string} [operation] Operation type: Read, write, delete, etc. + * @member {number} [invoiceDay] Invoice day. * **NOTE: This property will not be serialized. It can only be populated by * the server.** */ - readonly operation?: string; + readonly invoiceDay?: number; + /** + * @member {string} [currency] The currency associated with the billing + * profile. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly currency?: string; + /** + * @member {EnabledAzureSKUs[]} [enabledAzureSKUs] Information about the + * product. + */ + enabledAzureSKUs?: EnabledAzureSKUs[]; + /** + * @member {InvoiceSection[]} [invoiceSections] The invoice sections + * associated to the billing profile. + */ + invoiceSections?: InvoiceSection[]; +} + +/** + * @interface + * An interface representing InvoiceSectionProperties. + * The properties of an InvoiceSection. + * + */ +export interface InvoiceSectionProperties { + /** + * @member {string} [displayName] The name of the InvoiceSection. + */ + displayName?: string; + /** + * @member {BillingProfile[]} [billingProfiles] The billing profiles + * associated to the billing account. + */ + billingProfiles?: BillingProfile[]; +} + +/** + * @interface + * An interface representing InvoiceSection. + * An InvoiceSection resource. + * + * @extends Resource + */ +export interface InvoiceSection extends Resource { + /** + * @member {string} [displayName] The name of the InvoiceSection. + */ + displayName?: string; + /** + * @member {BillingProfile[]} [billingProfiles] The billing profiles + * associated to the billing account. + */ + billingProfiles?: BillingProfile[]; } /** - * @interface - * An interface representing Operation. - * A Billing REST API operation. - * + * @interface + * An interface representing EnrollmentPolicies. + * The attributes associated with legacy enrollment + * + */ +export interface EnrollmentPolicies { + /** + * @member {boolean} [accountOwnerViewCharges] The accountOwnerViewCharges + * flag for Enrollment + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly accountOwnerViewCharges?: boolean; + /** + * @member {boolean} [departmentAdminViewCharges] The + * departmentAdminViewCharges flag for Enrollment + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly departmentAdminViewCharges?: boolean; + /** + * @member {boolean} [marketplacesEnabled] The marketplaces flag for + * Enrollment + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly marketplacesEnabled?: boolean; + /** + * @member {boolean} [reservedInstancesEnabled] 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 Enrollment. + * Current entity level details + * + */ +export interface Enrollment { + /** + * @member {Date} [startDate] Enrollment Start Date + */ + startDate?: Date; + /** + * @member {Date} [endDate] Enrollment End Date + */ + endDate?: Date; + /** + * @member {string} [currency] The currency associated with enrollment + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly currency?: string; + /** + * @member {string} [channel] The channel for Enrollment + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly channel?: string; + /** + * @member {EnrollmentPolicies} [policies] The attributes associated with + * legacy enrollment. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly policies?: EnrollmentPolicies; + /** + * @member {string} [language] The language for Enrollment + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly language?: string; + /** + * @member {string} [countryCode] The countryCode for Enrollment + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly countryCode?: string; + /** + * @member {string} [status] Enrollment status + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly status?: string; + /** + * @member {string} [billingCycle] Enrollment billing cycle + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly billingCycle?: string; +} + +/** + * @interface + * An interface representing EnrollmentAccount. + * An account resource. + * + * @extends Resource + */ +export interface EnrollmentAccount extends Resource { + /** + * @member {string} [accountName] The account name. + */ + accountName?: string; + /** + * @member {string} [costCenter] The cost center name. + */ + costCenter?: string; + /** + * @member {string} [accountOwner] The account owner + */ + accountOwner?: string; + /** + * @member {string} [status] The status for account. + */ + status?: string; + /** + * @member {Date} [startDate] Account Start Date + */ + startDate?: Date; + /** + * @member {Date} [endDate] Account End Date + */ + endDate?: Date; + /** + * @member {Department} [department] Associated department. By default this + * is not populated, unless it's specified in $expand. + */ + department?: Department; +} + +/** + * @interface + * An interface representing Department. + * A department resource. + * + * @extends Resource + */ +export interface Department extends Resource { + /** + * @member {string} [departmentName] The name for department. + */ + departmentName?: string; + /** + * @member {string} [costCenter] The cost center name. + */ + costCenter?: string; + /** + * @member {string} [status] The status for department. + */ + status?: string; + /** + * @member {EnrollmentAccount[]} [enrollmentAccounts] Associated enrollment + * accounts. By default this is not populated, unless it's specified in + * $expand. + */ + enrollmentAccounts?: EnrollmentAccount[]; +} + +/** + * @interface + * An interface representing BillingAccount. + * A billing account resource. + * + * @extends Resource + */ +export interface BillingAccount extends Resource { + /** + * @member {string} [displayName] The billing account name. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly displayName?: string; + /** + * @member {string} [company] The Company this billing account belongs to. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly company?: string; + /** + * @member {AccountType} [accountType] 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; + /** + * @member {Address} [address] The address associated with billing account. + */ + address?: Address; + /** + * @member {string} [country] The country associated with billing account.. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly country?: string; + /** + * @member {InvoiceSection[]} [invoiceSections] The invoice sections + * associated to the billing account. + */ + invoiceSections?: InvoiceSection[]; + /** + * @member {BillingProfile[]} [billingProfiles] The billing profiles + * associated to the billing account. + */ + billingProfiles?: BillingProfile[]; + /** + * @member {Enrollment} [enrollmentDetails] 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; + /** + * @member {Department[]} [departments] The departments associated to the + * enrollment. + */ + departments?: Department[]; + /** + * @member {EnrollmentAccount[]} [enrollmentAccounts] The accounts associated + * to the enrollment. + */ + enrollmentAccounts?: EnrollmentAccount[]; +} + +/** + * @interface + * An interface representing BillingAccountListResult. + * Result of listing billing accounts. + * + */ +export interface BillingAccountListResult { + /** + * @member {BillingAccount[]} [value] The list of billing accounts. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly value?: BillingAccount[]; + /** + * @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.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing BillingProperty. + * The billing property. + * + */ +export interface BillingProperty { + /** + * @member {string} [productId] Product Id. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly productId?: string; + /** + * @member {string} [billingTenantId] Billing tenant Id. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly billingTenantId?: string; + /** + * @member {string} [billingAccountId] Billing account Id. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly billingAccountId?: string; + /** + * @member {string} [billingAccountName] Billing account name. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly billingAccountName?: string; + /** + * @member {string} [billingProfileId] Billing profile Id. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly billingProfileId?: string; + /** + * @member {string} [billingProfileName] Billing profile name. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly billingProfileName?: string; + /** + * @member {string} [invoiceSectionId] Invoice Section Id. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly invoiceSectionId?: string; + /** + * @member {string} [invoiceSectionName] Invoice Section name. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly invoiceSectionName?: string; + /** + * @member {string} [skuId] SKU Id. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly skuId?: string; + /** + * @member {string} [skuDescription] SKU description. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly skuDescription?: string; +} + +/** + * @interface + * An interface representing DepartmentListResult. + * Result of listing departments. + * + */ +export interface DepartmentListResult { + /** + * @member {Department[]} [value] The list of departments. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly value?: Department[]; + /** + * @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.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing EnrollmentAccountListResult. + * Result of listing enrollment accounts. + * + */ +export interface EnrollmentAccountListResult { + /** + * @member {EnrollmentAccount[]} [value] The list of enrollment accounts. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly value?: EnrollmentAccount[]; + /** + * @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.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing BillingProfileListResult. + * Result of listing billing profiles. + * + */ +export interface BillingProfileListResult { + /** + * @member {BillingProfile[]} [value] The list of billing profiles. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly value?: BillingProfile[]; + /** + * @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.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing InvoiceSectionListResult. + * Result of listing invoice sections. + * + */ +export interface InvoiceSectionListResult { + /** + * @member {InvoiceSection[]} [value] The list of invoice sections. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly value?: InvoiceSection[]; + /** + * @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.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing OperationStatus. + * status of the Billing POST/PUT operation. + * + */ +export interface OperationStatus { + /** + * @member {string} [id] The operation Id. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {string} [status] Status of the pending operation + */ + status?: string; + /** + * @member {string} [statusDetail] Status Detail of the pending operation + */ + statusDetail?: string; +} + +/** + * @interface + * An interface representing DownloadUrl. + * A secure URL that can be used to download a an entity until the URL expires. + * + */ +export interface DownloadUrl { + /** + * @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.** + */ + readonly expiryTime?: Date; + /** + * @member {string} [url] The URL to the PDF file. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly url?: string; +} + +/** + * @interface + * An interface representing ErrorDetails. + * The details of the error. + * + */ +export interface ErrorDetails { + /** + * @member {string} [code] Error code. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly code?: string; + /** + * @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.** + */ + readonly message?: string; + /** + * @member {string} [target] The target of the particular error. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly target?: string; +} + +/** + * @interface + * An interface representing ErrorResponse. + * Error response indicates that the service is not able to process the + * incoming request. The reason is provided in the error message. + * + */ +export interface ErrorResponse { + /** + * @member {ErrorDetails} [error] The details of the error. + */ + error?: ErrorDetails; +} + +/** + * @interface + * An interface representing Amount. + * The Amount. + * + */ +export interface Amount { + /** + * @member {string} [currency] The currency for the amount value. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly currency?: string; + /** + * @member {number} [value] Amount value. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly value?: number; +} + +/** + * @interface + * An interface representing DownloadProperties. + * The properties of the invoice download. + * + */ +export interface DownloadProperties { + /** + * @member {Kind} [kind] 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; + /** + * @member {string} [url] Document URL. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly url?: string; +} + +/** + * @interface + * An interface representing PaymentProperties. + * The properties of the payment. + * + */ +export interface PaymentProperties { + /** + * @member {string} [paymentType] The type of payment. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly paymentType?: string; + /** + * @member {Amount} [amount] The paid amount. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly amount?: Amount; + /** + * @member {Date} [date] The date of the payment. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly date?: Date; +} + +/** + * @interface + * An interface representing InvoiceSummary. + * An invoice resource. + * + * @extends Resource + */ +export interface InvoiceSummary extends Resource { + /** + * @member {Date} [dueDate] The due date for invoice. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly dueDate?: Date; + /** + * @member {Date} [invoiceDate] The date when invoice was created. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly invoiceDate?: Date; + /** + * @member {Status} [status] 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; + /** + * @member {Amount} [amountDue] Amount due. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly amountDue?: Amount; + /** + * @member {Amount} [billedAmount] Amount billed. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly billedAmount?: Amount; + /** + * @member {Date} [invoicePeriodStartDate] 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; + /** + * @member {Date} [invoicePeriodEndDate] 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; + /** + * @member {string} [billingProfile] The profile id which invoice belongs to. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly billingProfile?: string; + /** + * @member {string} [billingProfileName] The profile name which invoice + * belongs to. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly billingProfileName?: string; + /** + * @member {string} [purchaseOrderNumber] The purchase identifier for the + * invoice. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly purchaseOrderNumber?: string; + /** + * @member {DownloadProperties[]} [documentUrls] 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[]; + /** + * @member {PaymentProperties[]} [payments] List of payments. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly payments?: PaymentProperties[]; +} + +/** + * @interface + * An interface representing InvoiceListResult. + * Result of listing invoices. + * + */ +export interface InvoiceListResult { + /** + * @member {InvoiceSummary[]} [value] The list of invoices. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly value?: InvoiceSummary[]; + /** + * @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.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing ProductSummary. + * A product summary resource. + * + * @extends Resource + */ +export interface ProductSummary extends Resource { + /** + * @member {string} [displayName] The display name of the product. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly displayName?: string; + /** + * @member {Date} [purchaseDate] The date of purchase. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly purchaseDate?: Date; + /** + * @member {string} [productTypeId] The product type id. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly productTypeId?: string; + /** + * @member {string} [productType] The type of product. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly productType?: string; + /** + * @member {ProductStatusType} [status] Product status. Possible values + * include: 'Active', 'Inactive', 'PastDue', 'Expiring', 'Expired', + * 'Disabled', 'Cancelled', 'AutoRenew' + */ + status?: ProductStatusType; + /** + * @member {Date} [endDate] end date. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly endDate?: Date; + /** + * @member {BillingFrequency} [billingFrequency] Billing frequency. Possible + * values include: 'OneTime', 'Monthly', 'UsageBased' + */ + billingFrequency?: BillingFrequency; + /** + * @member {Amount} [lastCharge] Last month charges. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly lastCharge?: Amount; + /** + * @member {Date} [lastChargeDate] The date of the last charge. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly lastChargeDate?: Date; + /** + * @member {number} [quantity] The purchased product quantity. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly quantity?: number; + /** + * @member {string} [skuId] Sku Id. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly skuId?: string; + /** + * @member {string} [skuDescription] Sku description. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly skuDescription?: string; + /** + * @member {string} [availabilityId] Availability Id. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly availabilityId?: string; + /** + * @member {string} [parentProductId] Parent Product Id. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly parentProductId?: string; + /** + * @member {string} [invoiceSectionId] 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; + /** + * @member {string} [invoiceSectionName] 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; + /** + * @member {string} [billingProfileId] 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; + /** + * @member {string} [billingProfileName] 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; +} + +/** + * @interface + * An interface representing EnrollmentAccountContext. + * The rating context. + * + */ +export interface EnrollmentAccountContext { + /** + * @member {string} [costCenter] The cost center name. + */ + costCenter?: string; + /** + * @member {Date} [startDate] Account Start Date + */ + startDate?: Date; + /** + * @member {Date} [endDate] Account End Date + */ + endDate?: Date; + /** + * @member {string} [enrollmentAccountName] The enrollment account id. + */ + enrollmentAccountName?: string; +} + +/** + * @interface + * An interface representing BillingSubscriptionSummary. + * A billing Subscription summary resource. + * + * @extends Resource + */ +export interface BillingSubscriptionSummary extends Resource { + /** + * @member {string} [displayName] display name. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly displayName?: string; + /** + * @member {string} [subscriptionId] Subscription Id. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly subscriptionId?: string; + /** + * @member {BillingSubscriptionStatusType} [subscriptionBillingStatus] + * Subscription billing status. Possible values include: 'Active', + * 'Inactive', 'Abandoned', 'Deleted', 'Warning' + */ + subscriptionBillingStatus?: BillingSubscriptionStatusType; + /** + * @member {Amount} [lastMonthCharges] Last month charges. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly lastMonthCharges?: Amount; + /** + * @member {Amount} [monthToDateCharges] Month to date charges. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly monthToDateCharges?: Amount; + /** + * @member {EnrollmentAccountContext} [enrollmentAccountContext] The + * enrollment account context. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly enrollmentAccountContext?: EnrollmentAccountContext; + /** + * @member {string} [billingProfileId] 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; + /** + * @member {string} [billingProfileName] 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; + /** + * @member {string} [skuId] The sku id. + */ + skuId?: string; + /** + * @member {string} [skuDescription] 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 TransactionsSummary. + * A reservation transaction summary resource. + * + * @extends Resource + */ +export interface TransactionsSummary extends Resource { + /** + * @member {TransactionTypeKind} [kind] The kind of transaction. Choices are + * all and reservation. Possible values include: 'all', 'reservation' + */ + kind?: TransactionTypeKind; + /** + * @member {Date} [date] The date of reservation transaction. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly date?: Date; + /** + * @member {string} [invoice] 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; + /** + * @member {string} [orderId] The reservation order id. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly orderId?: string; + /** + * @member {string} [orderName] The reservation order name. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly orderName?: string; + /** + * @member {string} [productTypeId] The product type id. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly productTypeId?: string; + /** + * @member {string} [productType] The type of product. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly productType?: string; + /** + * @member {string} [productDescription] Product description. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly productDescription?: string; + /** + * @member {ReservationType} [transactionType] Transaction types. Possible + * values include: 'Purchase', 'Usage Charge' + */ + transactionType?: ReservationType; + /** + * @member {Amount} [transactionAmount] Last charge associated with the + * purchase. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly transactionAmount?: Amount; + /** + * @member {number} [quantity] Purchase quantity. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly quantity?: number; + /** + * @member {string} [invoiceSectionId] 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; + /** + * @member {string} [invoiceSectionName] 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; + /** + * @member {string} [billingProfileId] 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; + /** + * @member {string} [billingProfileName] 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; + /** + * @member {string} [subscriptionId] The subscription id. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly subscriptionId?: string; + /** + * @member {string} [subscriptionName] The subscription name. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly subscriptionName?: string; +} + +/** + * @interface + * An interface representing Policy. + * The Policy. + * + * @extends Resource + */ +export interface Policy extends Resource { + /** + * @member {boolean} [reservationPurchasesAllowed] The + * reservationPurchasesAllowed flag. + */ + reservationPurchasesAllowed?: boolean; + /** + * @member {boolean} [marketplacePurchasesAllowed] The + * marketplacePurchasesAllowed flag. + */ + marketplacePurchasesAllowed?: boolean; +} + +/** + * @interface + * An interface representing AvailableBalance. + * Latest available balance on Monetary Credit PI. + * + * @extends Resource + */ +export interface AvailableBalance extends Resource { + /** + * @member {Amount} [amount] Balance Amount. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly amount?: Amount; +} + +/** + * @interface + * An interface representing PaymentMethod. + * A payment method resource. + * + * @extends Resource + */ +export interface PaymentMethod extends Resource { + /** + * @member {PaymentMethodType} [methodType] Payment method type. Possible + * values include: 'Credits', 'ChequeWire' + */ + methodType?: PaymentMethodType; + /** + * @member {string} [details] Details about the payment method. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly details?: string; + /** + * @member {Date} [expiration] Expiration date. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly expiration?: Date; + /** + * @member {string} [currency] 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; +} + +/** + * @interface + * An interface representing UpdateAutoRenewRequest. + * Request parameters to update auto renew for support product. + * + */ +export interface UpdateAutoRenewRequest { + /** + * @member {UpdateAutoRenew} [autoRenew] Request parameters to update auto + * renew policy a product. Possible values include: 'true', 'false' + */ + autoRenew?: UpdateAutoRenew; +} + +/** + * @interface + * An interface representing OperationDisplay. + * The object that represents the operation. + * + */ +export interface OperationDisplay { + /** + * @member {string} [provider] Service provider: Microsoft.Billing. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly provider?: string; + /** + * @member {string} [resource] Resource on which the operation is performed: + * Invoice, etc. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly resource?: string; + /** + * @member {string} [operation] Operation type: Read, write, delete, etc. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly operation?: string; +} + +/** + * @interface + * An interface representing Operation. + * A Billing REST API operation. + * + */ +export interface Operation { + /** + * @member {string} [name] Operation name: {provider}/{resource}/{operation}. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {OperationDisplay} [display] The object that represents the + * operation. + */ + display?: OperationDisplay; +} + +/** + * @interface + * An interface representing BillingRoleAssignmentPayload. + * The payload use to update role assignment on a scope + * + */ +export interface BillingRoleAssignmentPayload { + /** + * @member {string} [principalId] 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; + /** + * @member {string} [billingRoleDefinitionName] The role definition id + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly billingRoleDefinitionName?: string; +} + +/** + * @interface + * An interface representing BillingRoleAssignment. + * a role assignment + * + * @extends Resource + */ +export interface BillingRoleAssignment extends Resource { + /** + * @member {string} [createdOn] 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; + /** + * @member {string} [createdByPrincipalTenantId] the creator's tenant Id + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly createdByPrincipalTenantId?: string; + /** + * @member {string} [createdByPrincipalId] the creator's principal Id + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly createdByPrincipalId?: string; + /** + * @member {string} [billingRoleAssignmentName] the name of the role + * assignment + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly billingRoleAssignmentName?: string; + /** + * @member {string} [principalId] 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; + /** + * @member {string} [roleDefinitionName] The role definition id + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly roleDefinitionName?: string; + /** + * @member {string} [scope] 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; +} + +/** + * @interface + * An interface representing BillingRoleAssignmentListResult. + * Result of get list of role assignments + * + */ +export interface BillingRoleAssignmentListResult { + /** + * @member {BillingRoleAssignment[]} [value] The list role assignments + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly value?: BillingRoleAssignment[]; +} + +/** + * @interface + * An interface representing BillingPermissions. + * The set of allowed action and not allowed actions a caller has on a billing + * account + * + */ +export interface BillingPermissions { + /** + * @member {string[]} [actions] 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[]; + /** + * @member {string[]} [notActions] 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[]; +} + +/** + * @interface + * An interface representing BillingPermissionsListResult. + * Result of list billingPermissions a caller has on a billing account. + * + */ +export interface BillingPermissionsListResult { + /** + * @member {BillingPermissions[]} [value] 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?: BillingPermissions[]; +} + +/** + * @interface + * An interface representing BillingRoleDefinition. + * Result of get role definition for a role. + * + * @extends Resource + */ +export interface BillingRoleDefinition extends Resource { + /** + * @member {string} [description] The role description + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly description?: string; + /** + * @member {BillingPermissions[]} [value] 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?: BillingPermissions[]; + /** + * @member {string} [roleName] The name of the role + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly roleName?: string; +} + +/** + * @interface + * An interface representing BillingRoleDefinitionListResult. + * list the role definitions. + * + */ +export interface BillingRoleDefinitionListResult { + /** + * @member {BillingRoleDefinition[]} [value] The list of role definitions. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly value?: BillingRoleDefinition[]; +} + +/** + * @interface + * An interface representing Participants. + * Details about the participant or signer. + * + */ +export interface Participants { + /** + * @member {string} [status] The signing status + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly status?: string; + /** + * @member {Date} [statusDate] The date when status got changed. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly statusDate?: Date; + /** + * @member {string} [email] 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; +} + +/** + * @interface + * An interface representing Agreement. + * An agreement resource. + * + * @extends Resource + */ +export interface Agreement extends Resource { + /** + * @member {string} [agreementLink] The link to the agreement. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly agreementLink?: string; + /** + * @member {Date} [effectiveDate] Effective date. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly effectiveDate?: Date; + /** + * @member {Date} [expirationDate] Expiration date. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly expirationDate?: Date; + /** + * @member {Participants[]} [participants] Participants or signer of the + * agreement. + */ + participants?: Participants[]; + /** + * @member {string} [status] The agreement status + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly status?: string; +} + +/** + * @interface + * An interface representing AgreementListResult. + * Result of listing agreements. + * + */ +export interface AgreementListResult { + /** + * @member {Agreement[]} [value] The list of agreements. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly value?: Agreement[]; + /** + * @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.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing BillingAccountsListOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface BillingAccountsListOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {string} [expand] May be used to expand the invoiceSections and + * billingProfiles. + */ + expand?: string; +} + +/** + * @interface + * An interface representing BillingAccountsGetOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface BillingAccountsGetOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {string} [expand] May be used to expand the invoiceSections and + * billingProfiles. + */ + expand?: string; +} + +/** + * @interface + * An interface representing BillingAccountsWithCreateInvoiceSectionPermissionListOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface BillingAccountsWithCreateInvoiceSectionPermissionListOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {string} [expand] May be used to expand the invoiceSections and + * billingProfiles. + */ + expand?: string; +} + +/** + * @interface + * An interface representing BillingProfilesByBillingAccountNameListOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface BillingProfilesByBillingAccountNameListOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {string} [expand] May be used to expand the invoiceSections. + */ + expand?: string; +} + +/** + * @interface + * An interface representing BillingProfilesGetOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface BillingProfilesGetOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {string} [expand] May be used to expand the invoiceSections. + */ + expand?: string; +} + +/** + * @interface + * An interface representing InvoiceSectionsByBillingAccountNameListOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface InvoiceSectionsByBillingAccountNameListOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {string} [expand] May be used to expand the billingProfiles. + */ + expand?: string; +} + +/** + * @interface + * An interface representing InvoiceSectionsGetOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface InvoiceSectionsGetOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {string} [expand] May be used to expand the billingProfiles. + */ + expand?: string; +} + +/** + * @interface + * An interface representing InvoiceSectionsWithCreateSubscriptionPermissionListOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface InvoiceSectionsWithCreateSubscriptionPermissionListOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {string} [expand] May be used to expand the billingProfiles. + */ + expand?: string; +} + +/** + * @interface + * An interface representing DepartmentsByBillingAccountNameListOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface DepartmentsByBillingAccountNameListOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {string} [expand] May be used to expand the enrollmentAccounts. + */ + expand?: string; + /** + * @member {string} [filter] 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; +} + +/** + * @interface + * An interface representing DepartmentsGetOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface DepartmentsGetOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {string} [expand] May be used to expand the enrollmentAccounts. + */ + expand?: string; + /** + * @member {string} [filter] 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; +} + +/** + * @interface + * An interface representing EnrollmentAccountsByBillingAccountNameListOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface EnrollmentAccountsByBillingAccountNameListOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {string} [expand] May be used to expand the department. + */ + expand?: string; + /** + * @member {string} [filter] 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; +} + +/** + * @interface + * An interface representing EnrollmentAccountsGetByEnrollmentAccountAccountIdOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface EnrollmentAccountsGetByEnrollmentAccountAccountIdOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {string} [expand] May be used to expand the Department. + */ + expand?: string; + /** + * @member {string} [filter] 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; +} + +/** + * @interface + * An interface representing BillingSubscriptionTransferOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface BillingSubscriptionTransferOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {string} [destinationInvoiceSectionName] The destination + * invoiceSectionName. + */ + destinationInvoiceSectionName?: string; +} + +/** + * @interface + * An interface representing BillingSubscriptionBeginTransferOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface BillingSubscriptionBeginTransferOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {string} [destinationInvoiceSectionName] The destination + * invoiceSectionName. + */ + destinationInvoiceSectionName?: string; +} + +/** + * @interface + * An interface representing ProductsByBillingAccountListOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface ProductsByBillingAccountListOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {string} [filter] 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; +} + +/** + * @interface + * An interface representing ProductsByInvoiceSectionListOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface ProductsByInvoiceSectionListOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {string} [filter] 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; +} + +/** + * @interface + * An interface representing ProductsTransferOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface ProductsTransferOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {string} [destinationInvoiceSectionName] Destination invoice + * section id. + */ + destinationInvoiceSectionName?: string; +} + +/** + * @interface + * An interface representing TransactionsByBillingAccountListOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface TransactionsByBillingAccountListOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {string} [filter] 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; +} + +/** + * @interface + * An interface representing TransactionsByBillingProfileListOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface TransactionsByBillingProfileListOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {string} [filter] 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; +} + +/** + * @interface + * An interface representing TransactionsByInvoiceSectionListOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface TransactionsByInvoiceSectionListOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {string} [filter] 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; +} + +/** + * @interface + * An interface representing BillingManagementClientUpdateAutoRenewForBillingAccountOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface BillingManagementClientUpdateAutoRenewForBillingAccountOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {UpdateAutoRenew} [autoRenew] Request parameters to update auto + * renew policy a product. Possible values include: 'true', 'false' + */ + autoRenew?: UpdateAutoRenew; +} + +/** + * @interface + * An interface representing BillingManagementClientUpdateAutoRenewForInvoiceSectionOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface BillingManagementClientUpdateAutoRenewForInvoiceSectionOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {UpdateAutoRenew} [autoRenew] Request parameters to update auto + * renew policy a product. Possible values include: 'true', 'false' + */ + autoRenew?: UpdateAutoRenew; +} + +/** + * @interface + * An interface representing RecipientTransfersAcceptOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface RecipientTransfersAcceptOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {ProductDetails[]} [productDetails] Request parameters to accept + * transfer. + */ + productDetails?: ProductDetails[]; +} + +/** + * @interface + * An interface representing AgreementsListByBillingAccountNameOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface AgreementsListByBillingAccountNameOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {string} [expand] May be used to expand the participants. + */ + expand?: string; +} + +/** + * @interface + * An interface representing AgreementsGetOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface AgreementsGetOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {string} [expand] May be used to expand the participants. + */ + expand?: string; +} + +/** + * @interface + * An interface representing BillingManagementClientOptions. + * @extends AzureServiceClientOptions + */ +export interface BillingManagementClientOptions extends AzureServiceClientOptions { + /** + * @member {string} [baseUri] + */ + baseUri?: string; +} + +/** + * @interface + * An interface representing BillingProfilesUpdateHeaders. + * Defines headers for Update operation. + * + */ +export interface BillingProfilesUpdateHeaders { + /** + * @member {string} [location] GET this URL to retrieve the status of the + * asynchronous operation. + */ + location: string; + /** + * @member {string} [retryAfter] The amount of delay to use while the status + * of the operation is checked. The value is expressed in seconds. + */ + retryAfter: string; +} + +/** + * @interface + * An interface representing InvoiceSectionsCreateHeaders. + * Defines headers for Create operation. + * + */ +export interface InvoiceSectionsCreateHeaders { + /** + * @member {string} [location] Location URI to poll for result + */ + location: string; + /** + * @member {number} [retryAfter] Recommends the retryable time after + * receiving this. + */ + retryAfter: number; + /** + * @member {string} [azureAsyncOperation] URI to poll for the operation + * status + */ + azureAsyncOperation: string; +} + +/** + * @interface + * An interface representing InvoiceSectionsUpdateHeaders. + * Defines headers for Update operation. + * + */ +export interface InvoiceSectionsUpdateHeaders { + /** + * @member {string} [location] GET this URL to retrieve the status of the + * asynchronous operation. + */ + location: string; + /** + * @member {string} [retryAfter] The amount of delay to use while the status + * of the operation is checked. The value is expressed in seconds. + */ + retryAfter: string; +} + +/** + * @interface + * An interface representing InvoicePricesheetDownloadHeaders. + * Defines headers for Download operation. + * + */ +export interface InvoicePricesheetDownloadHeaders { + /** + * @member {string} [location] GET this URL to retrieve the status of the + * asynchronous operation. + */ + location: string; + /** + * @member {string} [retryAfter] The amount of delay to use while the status + * of the operation is checked. The value is expressed in seconds. + */ + retryAfter: string; + /** + * @member {string} [azureAsyncOperation] To get the progress of the + * operation, call GET operation on the URL in Azure-AsyncOperation header + * field. + */ + azureAsyncOperation: string; + /** + * @member {string} [oDataEntityId] The operation entity Id GUID. + */ + oDataEntityId: string; +} + +/** + * @interface + * An interface representing BillingSubscriptionTransferHeaders. + * Defines headers for Transfer operation. + * + */ +export interface BillingSubscriptionTransferHeaders { + /** + * @member {string} [location] Location URI to poll for result. + */ + location: string; + /** + * @member {number} [retryAfter] Recommends the retryable time after + * receiving this. + */ + retryAfter: number; + /** + * @member {string} [azureAsyncOperation] URI to poll for the operation + * status + */ + azureAsyncOperation: string; +} + +/** + * @interface + * An interface representing ProductsTransferHeaders. + * Defines headers for Transfer operation. + * + */ +export interface ProductsTransferHeaders { + /** + * @member {string} [location] Location URI to poll for result + */ + location: string; + /** + * @member {number} [retryAfter] Recommends the retryable time after + * receiving this. + */ + retryAfter: number; + /** + * @member {string} [azureAsyncOperation] URI to poll for the operation + * status + */ + azureAsyncOperation: string; +} + + +/** + * @interface + * An interface representing the PaymentMethodsListResult. + * Result of listing payment methods. + * + * @extends Array + */ +export interface PaymentMethodsListResult extends Array { + /** + * @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.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the BillingSubscriptionsListResult. + * Result of listing billing subscriptions summary. + * + * @extends Array + */ +export interface BillingSubscriptionsListResult extends Array { + /** + * @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.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the ProductsListResult. + * 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 { + /** + * @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.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the TransactionsListResult. + * Result of listing reservation transactions summary. + * + * @extends Array + */ +export interface TransactionsListResult extends Array { + /** + * @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.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the TransferDetailsListResult. + * Result of listing details of the transfer initiated by caller. + * + * @extends Array + */ +export interface TransferDetailsListResult extends Array { + /** + * @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.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the RecipientTransferDetailsListResult. + * Result of listing details of the transfer received by caller. + * + * @extends Array + */ +export interface RecipientTransferDetailsListResult extends Array { + /** + * @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.** + */ + readonly nextLink?: string; +} + +/** + * @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 + */ +export interface OperationListResult extends Array { + /** + * @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.** + */ + readonly nextLink?: string; +} + +/** + * 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 list operation. + */ +export type BillingAccountsWithCreateInvoiceSectionPermissionListResponse = 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 AvailableBalanceByBillingProfileGetResponse = 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 list operation. + */ +export type PaymentMethodsByBillingProfileListResponse = 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 listNext operation. + */ +export type PaymentMethodsByBillingProfileListNextResponse = 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 list operation. + */ +export type BillingProfilesByBillingAccountNameListResponse = 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 list operation. + */ +export type InvoiceSectionsByBillingAccountNameListResponse = 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 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 list operation. + */ +export type InvoiceSectionsWithCreateSubscriptionPermissionListResponse = 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 list operation. + */ +export type DepartmentsByBillingAccountNameListResponse = 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 list operation. + */ +export type EnrollmentAccountsByBillingAccountNameListResponse = 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 getByEnrollmentAccountAccountId operation. + */ +export type EnrollmentAccountsGetByEnrollmentAccountAccountIdResponse = 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 list operation. + */ +export type InvoicesByBillingAccountListResponse = InvoiceListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: InvoiceListResult; + }; +}; + +/** + * Contains response data for the download operation. + */ +export type InvoicePricesheetDownloadResponse = DownloadUrl & InvoicePricesheetDownloadHeaders & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: InvoicePricesheetDownloadHeaders; + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DownloadUrl; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type InvoicesByBillingProfileListResponse = 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 InvoiceGetResponse = 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 list operation. + */ +export type ProductsByBillingSubscriptionsListResponse = 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 listNext operation. + */ +export type ProductsByBillingSubscriptionsListNextResponse = 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 list operation. + */ +export type BillingSubscriptionsByBillingProfileListResponse = 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 list operation. + */ +export type BillingSubscriptionsByInvoiceSectionListResponse = 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 BillingSubscriptionGetResponse = 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 BillingSubscriptionTransferResponse = TransferBillingSubscriptionResult & BillingSubscriptionTransferHeaders & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: BillingSubscriptionTransferHeaders; + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: TransferBillingSubscriptionResult; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type ProductsByBillingAccountListResponse = 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 listNext operation. + */ +export type ProductsByBillingAccountListNextResponse = 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 list operation. + */ +export type ProductsByInvoiceSectionListResponse = 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 list operation. + */ +export type TransactionsByBillingAccountListResponse = 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 listNext operation. + */ +export type TransactionsByBillingAccountListNextResponse = 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 list operation. + */ +export type TransactionsByBillingProfileListResponse = 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 list operation. + */ +export type TransactionsByInvoiceSectionListResponse = 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 getByBillingProfile operation. + */ +export type PolicyGetByBillingProfileResponse = 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 PolicyUpdateResponse = 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 updateAutoRenewForBillingAccount operation. + */ +export type UpdateAutoRenewForBillingAccountResponse = 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 updateAutoRenewForInvoiceSection operation. + */ +export type UpdateAutoRenewForInvoiceSectionResponse = 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 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 interface Operation { - /** - * @member {string} [name] Operation name: {provider}/{resource}/{operation}. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly name?: string; +export type OperationsListNextResponse = OperationListResult & { /** - * @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: OperationListResult; + }; +}; /** - * @interface - * An interface representing BillingPeriodsListOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * Contains response data for the list 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; +export type BillingAccountBillingPermissionsListResponse = BillingPermissionsListResult & { /** - * @member {string} [skiptoken] Skiptoken is only used if a previous - * operation returned a partial result. If a previous response contains a - * nextLink element, the value of the nextLink element will include a - * skiptoken parameter that specifies a starting point to use for subsequent - * calls. + * The underlying HTTP response. */ - skiptoken?: string; + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingPermissionsListResult; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type InvoiceSectionsBillingPermissionsListResponse = BillingPermissionsListResult & { /** - * @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: BillingPermissionsListResult; + }; +}; /** - * @interface - * An interface representing InvoicesListOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * Contains response data for the list operation. */ -export interface InvoicesListOptionalParams extends msRest.RequestOptionsBase { +export type BillingProfileBillingPermissionsListResponse = BillingPermissionsListResult & { /** - * @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. + * The underlying HTTP response. */ - expand?: string; + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingPermissionsListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type BillingAccountBillingRoleDefinitionGetResponse = BillingRoleDefinition & { /** - * @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'. + * The underlying HTTP response. */ - filter?: string; + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingRoleDefinition; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type BillingAccountBillingRoleDefinitionListResponse = BillingRoleDefinitionListResult & { /** - * @member {string} [skiptoken] Skiptoken is only used if a previous - * operation returned a partial result. If a previous response contains a - * nextLink element, the value of the nextLink element will include a - * skiptoken parameter that specifies a starting point to use for subsequent - * calls. + * The underlying HTTP response. */ - skiptoken?: string; + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingRoleDefinitionListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type InvoiceSectionBillingRoleDefinitionGetResponse = 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 list operation. */ -export interface BillingManagementClientOptions extends AzureServiceClientOptions { +export type InvoiceSectionBillingRoleDefinitionListResponse = 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 get operation. */ -export interface EnrollmentAccountListResult extends Array { +export type BillingProfileBillingRoleDefinitionGetResponse = BillingRoleDefinition & { /** - * @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: BillingRoleDefinition; + }; +}; /** - * @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 list operation. */ -export interface BillingPeriodsListResult extends Array { +export type BillingProfileBillingRoleDefinitionListResponse = 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 get operation. */ -export interface InvoicesListResult extends Array { +export type BillingAccountBillingRoleAssignmentGetResponse = 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 deleteMethod operation. */ -export interface OperationListResult extends Array { +export type BillingAccountBillingRoleAssignmentDeleteMethodResponse = 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. */ -export type EnrollmentAccountsListResponse = EnrollmentAccountListResult & { +export type BillingAccountBillingRoleAssignmentListResponse = BillingRoleAssignmentListResult & { /** * The underlying HTTP response. */ @@ -399,14 +3987,14 @@ export type EnrollmentAccountsListResponse = EnrollmentAccountListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: EnrollmentAccountListResult; + parsedBody: BillingRoleAssignmentListResult; }; }; /** - * Contains response data for the get operation. + * Contains response data for the add operation. */ -export type EnrollmentAccountsGetResponse = EnrollmentAccount & { +export type BillingAccountBillingRoleAssignmentAddResponse = BillingRoleAssignmentListResult & { /** * The underlying HTTP response. */ @@ -418,14 +4006,14 @@ export type EnrollmentAccountsGetResponse = EnrollmentAccount & { /** * The response body as parsed JSON or XML */ - parsedBody: EnrollmentAccount; + parsedBody: BillingRoleAssignmentListResult; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the get operation. */ -export type EnrollmentAccountsListNextResponse = EnrollmentAccountListResult & { +export type InvoiceSectionBillingRoleAssignmentGetResponse = BillingRoleAssignment & { /** * The underlying HTTP response. */ @@ -437,14 +4025,14 @@ export type EnrollmentAccountsListNextResponse = EnrollmentAccountListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: EnrollmentAccountListResult; + parsedBody: BillingRoleAssignment; }; }; /** - * Contains response data for the list operation. + * Contains response data for the deleteMethod operation. */ -export type BillingPeriodsListResponse = BillingPeriodsListResult & { +export type InvoiceSectionBillingRoleAssignmentDeleteMethodResponse = BillingRoleAssignment & { /** * The underlying HTTP response. */ @@ -456,14 +4044,14 @@ export type BillingPeriodsListResponse = BillingPeriodsListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: BillingPeriodsListResult; + parsedBody: BillingRoleAssignment; }; }; /** - * Contains response data for the get operation. + * Contains response data for the list operation. */ -export type BillingPeriodsGetResponse = BillingPeriod & { +export type InvoiceSectionBillingRoleAssignmentListResponse = BillingRoleAssignmentListResult & { /** * The underlying HTTP response. */ @@ -475,14 +4063,14 @@ export type BillingPeriodsGetResponse = BillingPeriod & { /** * The response body as parsed JSON or XML */ - parsedBody: BillingPeriod; + parsedBody: BillingRoleAssignmentListResult; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the add operation. */ -export type BillingPeriodsListNextResponse = BillingPeriodsListResult & { +export type InvoiceSectionBillingRoleAssignmentAddResponse = BillingRoleAssignmentListResult & { /** * The underlying HTTP response. */ @@ -494,14 +4082,14 @@ export type BillingPeriodsListNextResponse = BillingPeriodsListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: BillingPeriodsListResult; + parsedBody: BillingRoleAssignmentListResult; }; }; /** - * Contains response data for the list operation. + * Contains response data for the get operation. */ -export type InvoicesListResponse = InvoicesListResult & { +export type BillingProfileBillingRoleAssignmentGetResponse = BillingRoleAssignment & { /** * The underlying HTTP response. */ @@ -513,14 +4101,14 @@ export type InvoicesListResponse = InvoicesListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: InvoicesListResult; + parsedBody: BillingRoleAssignment; }; }; /** - * Contains response data for the get operation. + * Contains response data for the deleteMethod operation. */ -export type InvoicesGetResponse = Invoice & { +export type BillingProfileBillingRoleAssignmentDeleteMethodResponse = BillingRoleAssignment & { /** * The underlying HTTP response. */ @@ -532,14 +4120,14 @@ export type InvoicesGetResponse = Invoice & { /** * The response body as parsed JSON or XML */ - parsedBody: Invoice; + parsedBody: BillingRoleAssignment; }; }; /** - * Contains response data for the getLatest operation. + * Contains response data for the list operation. */ -export type InvoicesGetLatestResponse = Invoice & { +export type BillingProfileBillingRoleAssignmentListResponse = BillingRoleAssignmentListResult & { /** * The underlying HTTP response. */ @@ -551,14 +4139,14 @@ export type InvoicesGetLatestResponse = Invoice & { /** * The response body as parsed JSON or XML */ - parsedBody: Invoice; + parsedBody: BillingRoleAssignmentListResult; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the add operation. */ -export type InvoicesListNextResponse = InvoicesListResult & { +export type BillingProfileBillingRoleAssignmentAddResponse = BillingRoleAssignmentListResult & { /** * The underlying HTTP response. */ @@ -570,14 +4158,14 @@ export type InvoicesListNextResponse = InvoicesListResult & { /** * 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. */ @@ -589,14 +4177,14 @@ export type OperationsListResponse = OperationListResult & { /** * 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. */ @@ -608,6 +4196,6 @@ export type OperationsListNextResponse = OperationListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: OperationListResult; + parsedBody: Agreement; }; }; diff --git a/packages/@azure/arm-billing/lib/models/invoiceMappers.ts b/packages/@azure/arm-billing/lib/models/invoiceMappers.ts new file mode 100644 index 000000000000..2964ad17d5b7 --- /dev/null +++ b/packages/@azure/arm-billing/lib/models/invoiceMappers.ts @@ -0,0 +1,42 @@ +/* + * 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 { + InvoiceSummary, + Resource, + BaseResource, + Amount, + DownloadProperties, + PaymentProperties, + ErrorResponse, + ErrorDetails, + BillingProfile, + Address, + EnabledAzureSKUs, + InvoiceSection, + EnrollmentAccount, + Department, + BillingAccount, + Enrollment, + EnrollmentPolicies, + ProductSummary, + BillingSubscriptionSummary, + EnrollmentAccountContext, + TransactionsSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleAssignment, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/packages/@azure/arm-billing/lib/models/invoicePricesheetMappers.ts b/packages/@azure/arm-billing/lib/models/invoicePricesheetMappers.ts new file mode 100644 index 000000000000..2e1e53aa3f8b --- /dev/null +++ b/packages/@azure/arm-billing/lib/models/invoicePricesheetMappers.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 { + DownloadUrl, + InvoicePricesheetDownloadHeaders, + ErrorResponse, + ErrorDetails +} from "../models/mappers"; + diff --git a/packages/@azure/arm-billing/lib/models/invoiceSectionBillingRoleAssignmentMappers.ts b/packages/@azure/arm-billing/lib/models/invoiceSectionBillingRoleAssignmentMappers.ts new file mode 100644 index 000000000000..e7eaae301072 --- /dev/null +++ b/packages/@azure/arm-billing/lib/models/invoiceSectionBillingRoleAssignmentMappers.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 { + BillingRoleAssignment, + Resource, + BaseResource, + ErrorResponse, + ErrorDetails, + BillingRoleAssignmentListResult, + BillingRoleAssignmentPayload, + BillingProfile, + Address, + EnabledAzureSKUs, + InvoiceSection, + EnrollmentAccount, + Department, + BillingAccount, + Enrollment, + EnrollmentPolicies, + InvoiceSummary, + Amount, + DownloadProperties, + PaymentProperties, + ProductSummary, + BillingSubscriptionSummary, + EnrollmentAccountContext, + TransactionsSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/packages/@azure/arm-billing/lib/models/invoiceSectionBillingRoleDefinitionMappers.ts b/packages/@azure/arm-billing/lib/models/invoiceSectionBillingRoleDefinitionMappers.ts new file mode 100644 index 000000000000..bece5e8a4a88 --- /dev/null +++ b/packages/@azure/arm-billing/lib/models/invoiceSectionBillingRoleDefinitionMappers.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 { + BillingRoleDefinition, + Resource, + BaseResource, + BillingPermissions, + ErrorResponse, + ErrorDetails, + BillingRoleDefinitionListResult, + BillingProfile, + Address, + EnabledAzureSKUs, + InvoiceSection, + EnrollmentAccount, + Department, + BillingAccount, + Enrollment, + EnrollmentPolicies, + InvoiceSummary, + Amount, + DownloadProperties, + PaymentProperties, + ProductSummary, + BillingSubscriptionSummary, + EnrollmentAccountContext, + TransactionsSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleAssignment, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/packages/@azure/arm-billing/lib/models/invoiceSectionsBillingPermissionsMappers.ts b/packages/@azure/arm-billing/lib/models/invoiceSectionsBillingPermissionsMappers.ts new file mode 100644 index 000000000000..d0184f6b57d5 --- /dev/null +++ b/packages/@azure/arm-billing/lib/models/invoiceSectionsBillingPermissionsMappers.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 { + BillingPermissionsListResult, + BillingPermissions, + ErrorResponse, + ErrorDetails +} from "../models/mappers"; + diff --git a/packages/@azure/arm-billing/lib/models/invoiceSectionsByBillingAccountNameMappers.ts b/packages/@azure/arm-billing/lib/models/invoiceSectionsByBillingAccountNameMappers.ts new file mode 100644 index 000000000000..5e7edcdcab1d --- /dev/null +++ b/packages/@azure/arm-billing/lib/models/invoiceSectionsByBillingAccountNameMappers.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 { + InvoiceSectionListResult, + InvoiceSection, + Resource, + BaseResource, + BillingProfile, + Address, + EnabledAzureSKUs, + ErrorResponse, + ErrorDetails, + EnrollmentAccount, + Department, + BillingAccount, + Enrollment, + EnrollmentPolicies, + InvoiceSummary, + Amount, + DownloadProperties, + PaymentProperties, + ProductSummary, + BillingSubscriptionSummary, + EnrollmentAccountContext, + TransactionsSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleAssignment, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/packages/@azure/arm-billing/lib/models/invoiceSectionsMappers.ts b/packages/@azure/arm-billing/lib/models/invoiceSectionsMappers.ts new file mode 100644 index 000000000000..21108004ceea --- /dev/null +++ b/packages/@azure/arm-billing/lib/models/invoiceSectionsMappers.ts @@ -0,0 +1,46 @@ +/* + * 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 { + InvoiceSectionProperties, + BillingProfile, + Resource, + BaseResource, + Address, + EnabledAzureSKUs, + InvoiceSection, + InvoiceSectionsCreateHeaders, + ErrorResponse, + ErrorDetails, + InvoiceSectionListResult, + InvoiceSectionsUpdateHeaders, + EnrollmentAccount, + Department, + BillingAccount, + Enrollment, + EnrollmentPolicies, + InvoiceSummary, + Amount, + DownloadProperties, + PaymentProperties, + ProductSummary, + BillingSubscriptionSummary, + EnrollmentAccountContext, + TransactionsSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleAssignment, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/packages/@azure/arm-billing/lib/models/invoiceSectionsWithCreateSubscriptionPermissionMappers.ts b/packages/@azure/arm-billing/lib/models/invoiceSectionsWithCreateSubscriptionPermissionMappers.ts new file mode 100644 index 000000000000..5e7edcdcab1d --- /dev/null +++ b/packages/@azure/arm-billing/lib/models/invoiceSectionsWithCreateSubscriptionPermissionMappers.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 { + InvoiceSectionListResult, + InvoiceSection, + Resource, + BaseResource, + BillingProfile, + Address, + EnabledAzureSKUs, + ErrorResponse, + ErrorDetails, + EnrollmentAccount, + Department, + BillingAccount, + Enrollment, + EnrollmentPolicies, + InvoiceSummary, + Amount, + DownloadProperties, + PaymentProperties, + ProductSummary, + BillingSubscriptionSummary, + EnrollmentAccountContext, + TransactionsSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleAssignment, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/packages/@azure/arm-billing/lib/models/invoicesByBillingAccountMappers.ts b/packages/@azure/arm-billing/lib/models/invoicesByBillingAccountMappers.ts new file mode 100644 index 000000000000..5cdc39b9b1a9 --- /dev/null +++ b/packages/@azure/arm-billing/lib/models/invoicesByBillingAccountMappers.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 { + InvoiceListResult, + InvoiceSummary, + Resource, + BaseResource, + Amount, + DownloadProperties, + PaymentProperties, + ErrorResponse, + ErrorDetails, + BillingProfile, + Address, + EnabledAzureSKUs, + InvoiceSection, + EnrollmentAccount, + Department, + BillingAccount, + Enrollment, + EnrollmentPolicies, + ProductSummary, + BillingSubscriptionSummary, + EnrollmentAccountContext, + TransactionsSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleAssignment, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/packages/@azure/arm-billing/lib/models/invoicesByBillingProfileMappers.ts b/packages/@azure/arm-billing/lib/models/invoicesByBillingProfileMappers.ts new file mode 100644 index 000000000000..5cdc39b9b1a9 --- /dev/null +++ b/packages/@azure/arm-billing/lib/models/invoicesByBillingProfileMappers.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 { + InvoiceListResult, + InvoiceSummary, + Resource, + BaseResource, + Amount, + DownloadProperties, + PaymentProperties, + ErrorResponse, + ErrorDetails, + BillingProfile, + Address, + EnabledAzureSKUs, + InvoiceSection, + EnrollmentAccount, + Department, + BillingAccount, + Enrollment, + EnrollmentPolicies, + ProductSummary, + BillingSubscriptionSummary, + EnrollmentAccountContext, + TransactionsSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleAssignment, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/packages/@azure/arm-billing/lib/models/mappers.ts b/packages/@azure/arm-billing/lib/models/mappers.ts index 7a43d33d35f4..c6e0a1761d59 100644 --- a/packages/@azure/arm-billing/lib/models/mappers.ts +++ b/packages/@azure/arm-billing/lib/models/mappers.ts @@ -14,29 +14,2230 @@ 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 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: { + destinationInvoiceSectionName: { + serializedName: "destinationInvoiceSectionName", + 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: { + destinationInvoiceSectionName: { + serializedName: "destinationInvoiceSectionName", + type: { + name: "String" + } + } + } + } +}; + +export const TransferBillingSubscriptionRequest: msRest.CompositeMapper = { + serializedName: "TransferBillingSubscriptionRequest", + type: { + name: "Composite", + className: "TransferBillingSubscriptionRequest", + modelProperties: { + destinationInvoiceSectionName: { + serializedName: "properties.destinationInvoiceSectionName", + 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 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 EnabledAzureSKUs: msRest.CompositeMapper = { + serializedName: "EnabledAzureSKUs", + type: { + name: "Composite", + className: "EnabledAzureSKUs", + modelProperties: { + skuId: { + 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" + } + }, + billingAddress: { + serializedName: "properties.billingAddress", + 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" + } + }, + company: { + readOnly: true, + serializedName: "properties.company", + type: { + name: "String" + } + }, + accountType: { + readOnly: true, + serializedName: "properties.accountType", + type: { + name: "String" + } + }, + address: { + serializedName: "properties.address", + type: { + name: "Composite", + className: "Address" + } + }, + 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" + } + } + } + } + } + } +}; + +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: { + productId: { + readOnly: true, + serializedName: "productId", + type: { + name: "String" + } + }, + billingTenantId: { + readOnly: true, + serializedName: "billingTenantId", + type: { + name: "String" + } + }, + billingAccountId: { + readOnly: true, + serializedName: "billingAccountId", + type: { + name: "String" + } + }, + billingAccountName: { + readOnly: true, + serializedName: "billingAccountName", + type: { + name: "String" + } + }, + billingProfileId: { + readOnly: true, + serializedName: "billingProfileId", + type: { + name: "String" + } + }, + billingProfileName: { + readOnly: true, + serializedName: "billingProfileName", + type: { + name: "String" + } + }, + invoiceSectionId: { + readOnly: true, + serializedName: "invoiceSectionId", + type: { + name: "String" + } + }, + invoiceSectionName: { + readOnly: true, + serializedName: "invoiceSectionName", + type: { + name: "String" + } + }, + skuId: { + readOnly: true, + serializedName: "skuId", + type: { + name: "String" + } + }, + skuDescription: { + readOnly: true, + serializedName: "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" + } + }, + billingProfile: { + readOnly: true, + serializedName: "properties.billingProfile", + 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 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 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" + } + }, + enrollmentAccountContext: { + readOnly: true, + serializedName: "properties.enrollmentAccountContext", + type: { + name: "Composite", + className: "EnrollmentAccountContext" + } + }, + billingProfileId: { + readOnly: true, + serializedName: "properties.billingProfileId", + type: { + name: "String" + } + }, + billingProfileName: { + readOnly: true, + serializedName: "properties.billingProfileName", + type: { + name: "String" + } + }, + skuId: { + serializedName: "properties.skuId", + type: { + name: "String" + } + }, + skuDescription: { + readOnly: true, + serializedName: "properties.skuDescription", + 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" + } + }, + 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, + reservationPurchasesAllowed: { + serializedName: "properties.reservationPurchasesAllowed", + type: { + name: "Boolean" + } + }, + marketplacePurchasesAllowed: { + serializedName: "properties.marketplacePurchasesAllowed", + 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, + methodType: { + serializedName: "properties.methodType", + 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 BillingPermissions: msRest.CompositeMapper = { + serializedName: "BillingPermissions", + type: { + name: "Composite", + className: "BillingPermissions", + 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: "BillingPermissions" + } + } + } + } + } + } +}; + +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: "BillingPermissions" + } + } } }, - type: { + roleName: { readOnly: true, - serializedName: "type", + serializedName: "properties.roleName", type: { name: "String" } @@ -45,16 +2246,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 +2300,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 +2381,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 +2431,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 InvoicePricesheetDownloadHeaders: msRest.CompositeMapper = { + serializedName: "invoicepricesheet-download-headers", type: { name: "Composite", - className: "Invoice", + className: "InvoicePricesheetDownloadHeaders", 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 BillingSubscriptionTransferHeaders: msRest.CompositeMapper = { + serializedName: "billingsubscription-transfer-headers", + type: { + name: "Composite", + className: "BillingSubscriptionTransferHeaders", + 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 +2603,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 +2647,7 @@ export const EnrollmentAccountListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "EnrollmentAccount" + className: "TransactionsSummary" } } } @@ -301,11 +2663,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 +2677,7 @@ export const BillingPeriodsListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "BillingPeriod" + className: "TransferDetails" } } } @@ -331,11 +2693,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 +2707,7 @@ export const InvoicesListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "Invoice" + className: "RecipientTransferDetails" } } } diff --git a/packages/@azure/arm-billing/lib/models/parameters.ts b/packages/@azure/arm-billing/lib/models/parameters.ts index b8826d672899..3ee079a125b8 100644 --- a/packages/@azure/arm-billing/lib/models/parameters.ts +++ b/packages/@azure/arm-billing/lib/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/packages/@azure/arm-billing/lib/models/paymentMethodsByBillingProfileMappers.ts b/packages/@azure/arm-billing/lib/models/paymentMethodsByBillingProfileMappers.ts new file mode 100644 index 000000000000..0ab68bb3a334 --- /dev/null +++ b/packages/@azure/arm-billing/lib/models/paymentMethodsByBillingProfileMappers.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 { + PaymentMethodsListResult, + PaymentMethod, + Resource, + BaseResource, + ErrorResponse, + ErrorDetails, + BillingProfile, + Address, + EnabledAzureSKUs, + InvoiceSection, + EnrollmentAccount, + Department, + BillingAccount, + Enrollment, + EnrollmentPolicies, + InvoiceSummary, + Amount, + DownloadProperties, + PaymentProperties, + ProductSummary, + BillingSubscriptionSummary, + EnrollmentAccountContext, + TransactionsSummary, + Policy, + AvailableBalance, + BillingRoleAssignment, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/packages/@azure/arm-billing/lib/models/policyOperationsMappers.ts b/packages/@azure/arm-billing/lib/models/policyOperationsMappers.ts new file mode 100644 index 000000000000..d2cb6c01da68 --- /dev/null +++ b/packages/@azure/arm-billing/lib/models/policyOperationsMappers.ts @@ -0,0 +1,42 @@ +/* + * 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 { + Policy, + Resource, + BaseResource, + ErrorResponse, + ErrorDetails, + BillingProfile, + Address, + EnabledAzureSKUs, + InvoiceSection, + EnrollmentAccount, + Department, + BillingAccount, + Enrollment, + EnrollmentPolicies, + InvoiceSummary, + Amount, + DownloadProperties, + PaymentProperties, + ProductSummary, + BillingSubscriptionSummary, + EnrollmentAccountContext, + TransactionsSummary, + AvailableBalance, + PaymentMethod, + BillingRoleAssignment, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/packages/@azure/arm-billing/lib/models/productsByBillingAccountMappers.ts b/packages/@azure/arm-billing/lib/models/productsByBillingAccountMappers.ts new file mode 100644 index 000000000000..e59566b0e8d2 --- /dev/null +++ b/packages/@azure/arm-billing/lib/models/productsByBillingAccountMappers.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 { + ProductsListResult, + ProductSummary, + Resource, + BaseResource, + Amount, + ErrorResponse, + ErrorDetails, + BillingProfile, + Address, + EnabledAzureSKUs, + InvoiceSection, + EnrollmentAccount, + Department, + BillingAccount, + Enrollment, + EnrollmentPolicies, + InvoiceSummary, + DownloadProperties, + PaymentProperties, + BillingSubscriptionSummary, + EnrollmentAccountContext, + TransactionsSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleAssignment, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/packages/@azure/arm-billing/lib/models/productsByBillingSubscriptionsMappers.ts b/packages/@azure/arm-billing/lib/models/productsByBillingSubscriptionsMappers.ts new file mode 100644 index 000000000000..f7f19c67866a --- /dev/null +++ b/packages/@azure/arm-billing/lib/models/productsByBillingSubscriptionsMappers.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 { + BillingSubscriptionsListResult, + BillingSubscriptionSummary, + Resource, + BaseResource, + Amount, + EnrollmentAccountContext, + ErrorResponse, + ErrorDetails, + BillingProfile, + Address, + EnabledAzureSKUs, + InvoiceSection, + EnrollmentAccount, + Department, + BillingAccount, + Enrollment, + EnrollmentPolicies, + InvoiceSummary, + DownloadProperties, + PaymentProperties, + ProductSummary, + TransactionsSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleAssignment, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/packages/@azure/arm-billing/lib/models/productsByInvoiceSectionMappers.ts b/packages/@azure/arm-billing/lib/models/productsByInvoiceSectionMappers.ts new file mode 100644 index 000000000000..e59566b0e8d2 --- /dev/null +++ b/packages/@azure/arm-billing/lib/models/productsByInvoiceSectionMappers.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 { + ProductsListResult, + ProductSummary, + Resource, + BaseResource, + Amount, + ErrorResponse, + ErrorDetails, + BillingProfile, + Address, + EnabledAzureSKUs, + InvoiceSection, + EnrollmentAccount, + Department, + BillingAccount, + Enrollment, + EnrollmentPolicies, + InvoiceSummary, + DownloadProperties, + PaymentProperties, + BillingSubscriptionSummary, + EnrollmentAccountContext, + TransactionsSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleAssignment, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/packages/@azure/arm-billing/lib/models/productsMappers.ts b/packages/@azure/arm-billing/lib/models/productsMappers.ts new file mode 100644 index 000000000000..cfae899eedee --- /dev/null +++ b/packages/@azure/arm-billing/lib/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 { + ProductSummary, + Resource, + BaseResource, + Amount, + ErrorResponse, + ErrorDetails, + TransferProductRequestProperties, + ProductsTransferHeaders, + BillingProfile, + Address, + EnabledAzureSKUs, + InvoiceSection, + EnrollmentAccount, + Department, + BillingAccount, + Enrollment, + EnrollmentPolicies, + InvoiceSummary, + DownloadProperties, + PaymentProperties, + BillingSubscriptionSummary, + EnrollmentAccountContext, + TransactionsSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleAssignment, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/packages/@azure/arm-billing/lib/models/recipientTransfersMappers.ts b/packages/@azure/arm-billing/lib/models/recipientTransfersMappers.ts new file mode 100644 index 000000000000..e82e7a6b653a --- /dev/null +++ b/packages/@azure/arm-billing/lib/models/recipientTransfersMappers.ts @@ -0,0 +1,21 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + AcceptTransferRequest, + ProductDetails, + RecipientTransferDetails, + DetailedTransferStatus, + ErrorModel, + ErrorResponse, + ErrorDetails, + RecipientTransferDetailsListResult +} from "../models/mappers"; + diff --git a/packages/@azure/arm-billing/lib/models/transactionsByBillingAccountMappers.ts b/packages/@azure/arm-billing/lib/models/transactionsByBillingAccountMappers.ts new file mode 100644 index 000000000000..48e5cdf5b222 --- /dev/null +++ b/packages/@azure/arm-billing/lib/models/transactionsByBillingAccountMappers.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 { + TransactionsListResult, + TransactionsSummary, + Resource, + BaseResource, + Amount, + ErrorResponse, + ErrorDetails, + BillingProfile, + Address, + EnabledAzureSKUs, + InvoiceSection, + EnrollmentAccount, + Department, + BillingAccount, + Enrollment, + EnrollmentPolicies, + InvoiceSummary, + DownloadProperties, + PaymentProperties, + ProductSummary, + BillingSubscriptionSummary, + EnrollmentAccountContext, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleAssignment, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/packages/@azure/arm-billing/lib/models/transactionsByBillingProfileMappers.ts b/packages/@azure/arm-billing/lib/models/transactionsByBillingProfileMappers.ts new file mode 100644 index 000000000000..48e5cdf5b222 --- /dev/null +++ b/packages/@azure/arm-billing/lib/models/transactionsByBillingProfileMappers.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 { + TransactionsListResult, + TransactionsSummary, + Resource, + BaseResource, + Amount, + ErrorResponse, + ErrorDetails, + BillingProfile, + Address, + EnabledAzureSKUs, + InvoiceSection, + EnrollmentAccount, + Department, + BillingAccount, + Enrollment, + EnrollmentPolicies, + InvoiceSummary, + DownloadProperties, + PaymentProperties, + ProductSummary, + BillingSubscriptionSummary, + EnrollmentAccountContext, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleAssignment, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/packages/@azure/arm-billing/lib/models/transactionsByInvoiceSectionMappers.ts b/packages/@azure/arm-billing/lib/models/transactionsByInvoiceSectionMappers.ts new file mode 100644 index 000000000000..48e5cdf5b222 --- /dev/null +++ b/packages/@azure/arm-billing/lib/models/transactionsByInvoiceSectionMappers.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 { + TransactionsListResult, + TransactionsSummary, + Resource, + BaseResource, + Amount, + ErrorResponse, + ErrorDetails, + BillingProfile, + Address, + EnabledAzureSKUs, + InvoiceSection, + EnrollmentAccount, + Department, + BillingAccount, + Enrollment, + EnrollmentPolicies, + InvoiceSummary, + DownloadProperties, + PaymentProperties, + ProductSummary, + BillingSubscriptionSummary, + EnrollmentAccountContext, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleAssignment, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/packages/@azure/arm-billing/lib/models/transfersMappers.ts b/packages/@azure/arm-billing/lib/models/transfersMappers.ts new file mode 100644 index 000000000000..28829cd4f4a5 --- /dev/null +++ b/packages/@azure/arm-billing/lib/models/transfersMappers.ts @@ -0,0 +1,20 @@ +/* + * 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 { + InitiateTransferRequest, + TransferDetails, + DetailedTransferStatus, + ErrorModel, + ErrorResponse, + ErrorDetails, + TransferDetailsListResult +} from "../models/mappers"; + diff --git a/packages/@azure/arm-billing/lib/operations/agreements.ts b/packages/@azure/arm-billing/lib/operations/agreements.ts new file mode 100644 index 000000000000..5720473ce9e3 --- /dev/null +++ b/packages/@azure/arm-billing/lib/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/packages/@azure/arm-billing/lib/operations/availableBalanceByBillingProfile.ts b/packages/@azure/arm-billing/lib/operations/availableBalanceByBillingProfile.ts new file mode 100644 index 000000000000..28757a549921 --- /dev/null +++ b/packages/@azure/arm-billing/lib/operations/availableBalanceByBillingProfile.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/availableBalanceByBillingProfileMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a AvailableBalanceByBillingProfile. */ +export class AvailableBalanceByBillingProfile { + private readonly client: BillingManagementClientContext; + + /** + * Create a AvailableBalanceByBillingProfile. + * @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 + */ + get(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase): 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: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + options + }, + getOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/availableBalance/default", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AvailableBalance + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/packages/@azure/arm-billing/lib/operations/billingAccountBillingPermissions.ts b/packages/@azure/arm-billing/lib/operations/billingAccountBillingPermissions.ts new file mode 100644 index 000000000000..955eef929cff --- /dev/null +++ b/packages/@azure/arm-billing/lib/operations/billingAccountBillingPermissions.ts @@ -0,0 +1,81 @@ +/* + * 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/billingAccountBillingPermissionsMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a BillingAccountBillingPermissions. */ +export class BillingAccountBillingPermissions { + private readonly client: BillingManagementClientContext; + + /** + * Create a BillingAccountBillingPermissions. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * Lists all billingPermissions for the caller has for a billing account. + * @param billingAccountName billing Account Id. + * @param [options] The optional parameters + * @returns Promise + */ + list(billingAccountName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param callback The callback + */ + list(billingAccountName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param options The optional parameters + * @param callback The callback + */ + list(billingAccountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(billingAccountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + options + }, + listOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: 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 +}; diff --git a/packages/@azure/arm-billing/lib/operations/billingAccountBillingRoleAssignment.ts b/packages/@azure/arm-billing/lib/operations/billingAccountBillingRoleAssignment.ts new file mode 100644 index 000000000000..37180c0869c0 --- /dev/null +++ b/packages/@azure/arm-billing/lib/operations/billingAccountBillingRoleAssignment.ts @@ -0,0 +1,251 @@ +/* + * 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/billingAccountBillingRoleAssignmentMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a BillingAccountBillingRoleAssignment. */ +export class BillingAccountBillingRoleAssignment { + private readonly client: BillingManagementClientContext; + + /** + * Create a BillingAccountBillingRoleAssignment. + * @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 + */ + get(billingAccountName: string, billingRoleAssignmentName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingRoleAssignmentName role assignment id. + * @param callback The callback + */ + get(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 + */ + get(billingAccountName: string, billingRoleAssignmentName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(billingAccountName: string, billingRoleAssignmentName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingRoleAssignmentName, + options + }, + getOperationSpec, + 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 + */ + deleteMethod(billingAccountName: string, billingRoleAssignmentName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingRoleAssignmentName role assignment id. + * @param callback The callback + */ + deleteMethod(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 + */ + deleteMethod(billingAccountName: string, billingRoleAssignmentName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(billingAccountName: string, billingRoleAssignmentName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingRoleAssignmentName, + options + }, + deleteMethodOperationSpec, + callback) as Promise; + } + + /** + * Get the role assignments on the Billing Account + * @param billingAccountName billing Account Id. + * @param [options] The optional parameters + * @returns Promise + */ + list(billingAccountName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param callback The callback + */ + list(billingAccountName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param options The optional parameters + * @param callback The callback + */ + list(billingAccountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(billingAccountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + options + }, + listOperationSpec, + 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 + */ + add(billingAccountName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param callback The callback + */ + add(billingAccountName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param options The optional parameters + * @param callback The callback + */ + add(billingAccountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + add(billingAccountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + options + }, + addOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: 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 deleteMethodOperationSpec: 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 listOperationSpec: 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 addOperationSpec: 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 +}; diff --git a/packages/@azure/arm-billing/lib/operations/billingAccountBillingRoleDefinition.ts b/packages/@azure/arm-billing/lib/operations/billingAccountBillingRoleDefinition.ts new file mode 100644 index 000000000000..ce9f42e25726 --- /dev/null +++ b/packages/@azure/arm-billing/lib/operations/billingAccountBillingRoleDefinition.ts @@ -0,0 +1,137 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/billingAccountBillingRoleDefinitionMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a BillingAccountBillingRoleDefinition. */ +export class BillingAccountBillingRoleDefinition { + private readonly client: BillingManagementClientContext; + + /** + * Create a BillingAccountBillingRoleDefinition. + * @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 + */ + get(billingAccountName: string, billingRoleDefinitionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingRoleDefinitionName role definition id. + * @param callback The callback + */ + get(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 + */ + get(billingAccountName: string, billingRoleDefinitionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(billingAccountName: string, billingRoleDefinitionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingRoleDefinitionName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Lists the role definition for a billing account + * @param billingAccountName billing Account Id. + * @param [options] The optional parameters + * @returns Promise + */ + list(billingAccountName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param callback The callback + */ + list(billingAccountName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param options The optional parameters + * @param callback The callback + */ + list(billingAccountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(billingAccountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + options + }, + listOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: 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 listOperationSpec: 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 +}; diff --git a/packages/@azure/arm-billing/lib/operations/billingAccounts.ts b/packages/@azure/arm-billing/lib/operations/billingAccounts.ts new file mode 100644 index 000000000000..014594f2eadd --- /dev/null +++ b/packages/@azure/arm-billing/lib/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/packages/@azure/arm-billing/lib/operations/billingAccountsWithCreateInvoiceSectionPermission.ts b/packages/@azure/arm-billing/lib/operations/billingAccountsWithCreateInvoiceSectionPermission.ts new file mode 100644 index 000000000000..4d297a9c2ecf --- /dev/null +++ b/packages/@azure/arm-billing/lib/operations/billingAccountsWithCreateInvoiceSectionPermission.ts @@ -0,0 +1,75 @@ +/* + * 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/billingAccountsWithCreateInvoiceSectionPermissionMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a BillingAccountsWithCreateInvoiceSectionPermission. */ +export class BillingAccountsWithCreateInvoiceSectionPermission { + private readonly client: BillingManagementClientContext; + + /** + * Create a BillingAccountsWithCreateInvoiceSectionPermission. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * Lists all billing accounts with create invoiceSection permission for a user. + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: Models.BillingAccountsWithCreateInvoiceSectionPermissionListOptionalParams): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: Models.BillingAccountsWithCreateInvoiceSectionPermissionListOptionalParams, callback: msRest.ServiceCallback): void; + list(options?: Models.BillingAccountsWithCreateInvoiceSectionPermissionListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/listBillingAccountsWithCreateInvoiceSectionPermission", + queryParameters: [ + Parameters.apiVersion, + Parameters.expand + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingAccountListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/packages/@azure/arm-billing/lib/operations/billingProfileBillingPermissions.ts b/packages/@azure/arm-billing/lib/operations/billingProfileBillingPermissions.ts new file mode 100644 index 000000000000..cbefe7652a91 --- /dev/null +++ b/packages/@azure/arm-billing/lib/operations/billingProfileBillingPermissions.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/billingProfileBillingPermissionsMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a BillingProfileBillingPermissions. */ +export class BillingProfileBillingPermissions { + private readonly client: BillingManagementClientContext; + + /** + * Create a BillingProfileBillingPermissions. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * 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 + */ + list(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param callback The callback + */ + list(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 + */ + list(billingAccountName: string, billingProfileName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + options + }, + listOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: 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/packages/@azure/arm-billing/lib/operations/billingProfileBillingRoleAssignment.ts b/packages/@azure/arm-billing/lib/operations/billingProfileBillingRoleAssignment.ts new file mode 100644 index 000000000000..68106f58b8a3 --- /dev/null +++ b/packages/@azure/arm-billing/lib/operations/billingProfileBillingRoleAssignment.ts @@ -0,0 +1,271 @@ +/* + * 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/billingProfileBillingRoleAssignmentMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a BillingProfileBillingRoleAssignment. */ +export class BillingProfileBillingRoleAssignment { + private readonly client: BillingManagementClientContext; + + /** + * Create a BillingProfileBillingRoleAssignment. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * 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 + */ + get(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 + */ + get(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 + */ + get(billingAccountName: string, billingProfileName: string, billingRoleAssignmentName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(billingAccountName: string, billingProfileName: string, billingRoleAssignmentName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + billingRoleAssignmentName, + options + }, + getOperationSpec, + 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 + */ + deleteMethod(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 + */ + deleteMethod(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 + */ + deleteMethod(billingAccountName: string, billingProfileName: string, billingRoleAssignmentName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(billingAccountName: string, billingProfileName: string, billingRoleAssignmentName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + billingRoleAssignmentName, + options + }, + deleteMethodOperationSpec, + 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 + */ + list(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param callback The callback + */ + list(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 + */ + list(billingAccountName: string, billingProfileName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + options + }, + listOperationSpec, + 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 + */ + add(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param callback The callback + */ + add(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 + */ + add(billingAccountName: string, billingProfileName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + add(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + options + }, + addOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/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 deleteMethodOperationSpec: 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 listOperationSpec: 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 addOperationSpec: 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/packages/@azure/arm-billing/lib/operations/billingProfileBillingRoleDefinition.ts b/packages/@azure/arm-billing/lib/operations/billingProfileBillingRoleDefinition.ts new file mode 100644 index 000000000000..1bc8d25a1b62 --- /dev/null +++ b/packages/@azure/arm-billing/lib/operations/billingProfileBillingRoleDefinition.ts @@ -0,0 +1,147 @@ +/* + * 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/billingProfileBillingRoleDefinitionMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a BillingProfileBillingRoleDefinition. */ +export class BillingProfileBillingRoleDefinition { + private readonly client: BillingManagementClientContext; + + /** + * Create a BillingProfileBillingRoleDefinition. + * @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 billingProfileName Billing Profile Id. + * @param billingRoleDefinitionName role definition id. + * @param [options] The optional parameters + * @returns Promise + */ + get(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 + */ + get(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 + */ + get(billingAccountName: string, billingProfileName: string, billingRoleDefinitionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(billingAccountName: string, billingProfileName: string, billingRoleDefinitionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + billingRoleDefinitionName, + options + }, + getOperationSpec, + 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 + */ + list(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param callback The callback + */ + list(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 + */ + list(billingAccountName: string, billingProfileName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + options + }, + listOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/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 listOperationSpec: 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/packages/@azure/arm-billing/lib/operations/billingProfiles.ts b/packages/@azure/arm-billing/lib/operations/billingProfiles.ts new file mode 100644 index 000000000000..51d99eff1986 --- /dev/null +++ b/packages/@azure/arm-billing/lib/operations/billingProfiles.ts @@ -0,0 +1,156 @@ +/* + * 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; + } + + /** + * 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 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/packages/@azure/arm-billing/lib/operations/billingProfilesByBillingAccountName.ts b/packages/@azure/arm-billing/lib/operations/billingProfilesByBillingAccountName.ts new file mode 100644 index 000000000000..74a1a4d4bf67 --- /dev/null +++ b/packages/@azure/arm-billing/lib/operations/billingProfilesByBillingAccountName.ts @@ -0,0 +1,82 @@ +/* + * 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/billingProfilesByBillingAccountNameMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a BillingProfilesByBillingAccountName. */ +export class BillingProfilesByBillingAccountName { + private readonly client: BillingManagementClientContext; + + /** + * Create a BillingProfilesByBillingAccountName. + * @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 + */ + list(billingAccountName: string, options?: Models.BillingProfilesByBillingAccountNameListOptionalParams): Promise; + /** + * @param billingAccountName billing Account Id. + * @param callback The callback + */ + list(billingAccountName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param options The optional parameters + * @param callback The callback + */ + list(billingAccountName: string, options: Models.BillingProfilesByBillingAccountNameListOptionalParams, callback: msRest.ServiceCallback): void; + list(billingAccountName: string, options?: Models.BillingProfilesByBillingAccountNameListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + options + }, + listOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: 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 +}; diff --git a/packages/@azure/arm-billing/lib/operations/billingPropertyOperations.ts b/packages/@azure/arm-billing/lib/operations/billingPropertyOperations.ts new file mode 100644 index 000000000000..7c8adf3a902a --- /dev/null +++ b/packages/@azure/arm-billing/lib/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/packages/@azure/arm-billing/lib/operations/billingSubscription.ts b/packages/@azure/arm-billing/lib/operations/billingSubscription.ts new file mode 100644 index 000000000000..697e4b39b5d0 --- /dev/null +++ b/packages/@azure/arm-billing/lib/operations/billingSubscription.ts @@ -0,0 +1,163 @@ +/* + * 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/billingSubscriptionMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a BillingSubscription. */ +export class BillingSubscription { + private readonly client: BillingManagementClientContext; + + /** + * Create a BillingSubscription. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * 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 GTM 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.BillingSubscriptionTransferOptionalParams): Promise { + return this.beginTransfer(billingAccountName,invoiceSectionName,billingSubscriptionName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Transfers the GTM 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.BillingSubscriptionBeginTransferOptionalParams): Promise { + return this.client.sendLRORequest( + { + billingAccountName, + invoiceSectionName, + billingSubscriptionName, + options + }, + beginTransferOperationSpec, + options); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +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: { + destinationInvoiceSectionName: [ + "options", + "destinationInvoiceSectionName" + ] + }, + mapper: { + ...Mappers.TransferBillingSubscriptionRequestProperties, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.TransferBillingSubscriptionResult, + headersMapper: Mappers.BillingSubscriptionTransferHeaders + }, + 202: { + headersMapper: Mappers.BillingSubscriptionTransferHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/packages/@azure/arm-billing/lib/operations/billingSubscriptionsByBillingProfile.ts b/packages/@azure/arm-billing/lib/operations/billingSubscriptionsByBillingProfile.ts new file mode 100644 index 000000000000..fa334deea7c8 --- /dev/null +++ b/packages/@azure/arm-billing/lib/operations/billingSubscriptionsByBillingProfile.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/billingSubscriptionsByBillingProfileMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a BillingSubscriptionsByBillingProfile. */ +export class BillingSubscriptionsByBillingProfile { + private readonly client: BillingManagementClientContext; + + /** + * Create a BillingSubscriptionsByBillingProfile. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * Lists billing subscriptions by billingProfileName. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param [options] The optional parameters + * @returns Promise + */ + list(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param callback The callback + */ + list(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 + */ + list(billingAccountName: string, billingProfileName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + options + }, + listOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfile/{billingProfileName}/billingSubscriptions", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingSubscriptionsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/packages/@azure/arm-billing/lib/operations/billingSubscriptionsByInvoiceSection.ts b/packages/@azure/arm-billing/lib/operations/billingSubscriptionsByInvoiceSection.ts new file mode 100644 index 000000000000..325c542fc956 --- /dev/null +++ b/packages/@azure/arm-billing/lib/operations/billingSubscriptionsByInvoiceSection.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/billingSubscriptionsByInvoiceSectionMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a BillingSubscriptionsByInvoiceSection. */ +export class BillingSubscriptionsByInvoiceSection { + private readonly client: BillingManagementClientContext; + + /** + * Create a BillingSubscriptionsByInvoiceSection. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * Lists billing subscription by invoiceSectionName. + * @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; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: 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 +}; diff --git a/packages/@azure/arm-billing/lib/operations/departments.ts b/packages/@azure/arm-billing/lib/operations/departments.ts new file mode 100644 index 000000000000..c2327b0cface --- /dev/null +++ b/packages/@azure/arm-billing/lib/operations/departments.ts @@ -0,0 +1,88 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/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; + } + + /** + * 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 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/packages/@azure/arm-billing/lib/operations/departmentsByBillingAccountName.ts b/packages/@azure/arm-billing/lib/operations/departmentsByBillingAccountName.ts new file mode 100644 index 000000000000..d43f12d9e096 --- /dev/null +++ b/packages/@azure/arm-billing/lib/operations/departmentsByBillingAccountName.ts @@ -0,0 +1,83 @@ +/* + * 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/departmentsByBillingAccountNameMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a DepartmentsByBillingAccountName. */ +export class DepartmentsByBillingAccountName { + private readonly client: BillingManagementClientContext; + + /** + * Create a DepartmentsByBillingAccountName. + * @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 + */ + list(billingAccountName: string, options?: Models.DepartmentsByBillingAccountNameListOptionalParams): Promise; + /** + * @param billingAccountName billing Account Id. + * @param callback The callback + */ + list(billingAccountName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param options The optional parameters + * @param callback The callback + */ + list(billingAccountName: string, options: Models.DepartmentsByBillingAccountNameListOptionalParams, callback: msRest.ServiceCallback): void; + list(billingAccountName: string, options?: Models.DepartmentsByBillingAccountNameListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + options + }, + listOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: 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 +}; diff --git a/packages/@azure/arm-billing/lib/operations/enrollmentAccounts.ts b/packages/@azure/arm-billing/lib/operations/enrollmentAccounts.ts index c3309045d357..b538827ab58a 100644 --- a/packages/@azure/arm-billing/lib/operations/enrollmentAccounts.ts +++ b/packages/@azure/arm-billing/lib/operations/enrollmentAccounts.ts @@ -27,116 +27,51 @@ export class EnrollmentAccounts { } /** - * Lists the enrollment accounts the caller has access to. + * 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 */ - list(options?: msRest.RequestOptionsBase): Promise; + getByEnrollmentAccountAccountId(billingAccountName: string, enrollmentAccountName: string, options?: Models.EnrollmentAccountsGetByEnrollmentAccountAccountIdOptionalParams): Promise; /** + * @param billingAccountName billing Account Id. + * @param enrollmentAccountName Enrollment Account Id. * @param callback The callback */ - list(callback: msRest.ServiceCallback): void; + getByEnrollmentAccountAccountId(billingAccountName: string, enrollmentAccountName: string, callback: msRest.ServiceCallback): void; /** + * @param billingAccountName billing Account Id. + * @param enrollmentAccountName Enrollment 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 { + getByEnrollmentAccountAccountId(billingAccountName: string, enrollmentAccountName: string, options: Models.EnrollmentAccountsGetByEnrollmentAccountAccountIdOptionalParams, callback: msRest.ServiceCallback): void; + getByEnrollmentAccountAccountId(billingAccountName: string, enrollmentAccountName: string, options?: Models.EnrollmentAccountsGetByEnrollmentAccountAccountIdOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { + billingAccountName, + enrollmentAccountName, options }, - listOperationSpec, - callback) as Promise; - } - - /** - * Gets a enrollment account by name. - * @param name Enrollment Account name. - * @param [options] The optional parameters - * @returns Promise - */ - get(name: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param name Enrollment Account name. - * @param callback The callback - */ - get(name: string, callback: msRest.ServiceCallback): void; - /** - * @param name Enrollment Account name. - * @param options The optional parameters - * @param callback The callback - */ - get(name: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(name: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - name, - 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; + getByEnrollmentAccountAccountIdOperationSpec, + callback) as Promise; } } // Operation Specifications const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { +const getByEnrollmentAccountAccountIdOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "providers/Microsoft.Billing/enrollmentAccounts", - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.EnrollmentAccountListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const getOperationSpec: 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 +86,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/packages/@azure/arm-billing/lib/operations/enrollmentAccountsByBillingAccountName.ts b/packages/@azure/arm-billing/lib/operations/enrollmentAccountsByBillingAccountName.ts new file mode 100644 index 000000000000..73160f9fcf16 --- /dev/null +++ b/packages/@azure/arm-billing/lib/operations/enrollmentAccountsByBillingAccountName.ts @@ -0,0 +1,83 @@ +/* + * 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/enrollmentAccountsByBillingAccountNameMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a EnrollmentAccountsByBillingAccountName. */ +export class EnrollmentAccountsByBillingAccountName { + private readonly client: BillingManagementClientContext; + + /** + * Create a EnrollmentAccountsByBillingAccountName. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * Lists all Enrollment Accounts for a user which he has access to. + * @param billingAccountName billing Account Id. + * @param [options] The optional parameters + * @returns Promise + */ + list(billingAccountName: string, options?: Models.EnrollmentAccountsByBillingAccountNameListOptionalParams): Promise; + /** + * @param billingAccountName billing Account Id. + * @param callback The callback + */ + list(billingAccountName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param options The optional parameters + * @param callback The callback + */ + list(billingAccountName: string, options: Models.EnrollmentAccountsByBillingAccountNameListOptionalParams, callback: msRest.ServiceCallback): void; + list(billingAccountName: string, options?: Models.EnrollmentAccountsByBillingAccountNameListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + options + }, + listOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/enrollmentAccounts", + urlParameters: [ + Parameters.billingAccountName + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.expand, + Parameters.filter + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.EnrollmentAccountListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/packages/@azure/arm-billing/lib/operations/index.ts b/packages/@azure/arm-billing/lib/operations/index.ts index cfc488e846ba..b6b601b89bf8 100644 --- a/packages/@azure/arm-billing/lib/operations/index.ts +++ b/packages/@azure/arm-billing/lib/operations/index.ts @@ -8,7 +8,45 @@ * regenerated. */ +export * from "./billingAccounts"; +export * from "./billingAccountsWithCreateInvoiceSectionPermission"; +export * from "./availableBalanceByBillingProfile"; +export * from "./paymentMethodsByBillingProfile"; +export * from "./billingProfilesByBillingAccountName"; +export * from "./billingProfiles"; +export * from "./invoiceSectionsByBillingAccountName"; +export * from "./invoiceSections"; +export * from "./invoiceSectionsWithCreateSubscriptionPermission"; +export * from "./departmentsByBillingAccountName"; +export * from "./departments"; +export * from "./enrollmentAccountsByBillingAccountName"; export * from "./enrollmentAccounts"; -export * from "./billingPeriods"; -export * from "./invoices"; +export * from "./invoicesByBillingAccount"; +export * from "./invoicePricesheet"; +export * from "./invoicesByBillingProfile"; +export * from "./invoice"; +export * from "./productsByBillingSubscriptions"; +export * from "./billingSubscriptionsByBillingProfile"; +export * from "./billingSubscriptionsByInvoiceSection"; +export * from "./billingSubscription"; +export * from "./productsByBillingAccount"; +export * from "./productsByInvoiceSection"; +export * from "./products"; +export * from "./transactionsByBillingAccount"; +export * from "./transactionsByBillingProfile"; +export * from "./transactionsByInvoiceSection"; +export * from "./policyOperations"; +export * from "./billingPropertyOperations"; +export * from "./transfers"; +export * from "./recipientTransfers"; export * from "./operations"; +export * from "./billingAccountBillingPermissions"; +export * from "./invoiceSectionsBillingPermissions"; +export * from "./billingProfileBillingPermissions"; +export * from "./billingAccountBillingRoleDefinition"; +export * from "./invoiceSectionBillingRoleDefinition"; +export * from "./billingProfileBillingRoleDefinition"; +export * from "./billingAccountBillingRoleAssignment"; +export * from "./invoiceSectionBillingRoleAssignment"; +export * from "./billingProfileBillingRoleAssignment"; +export * from "./agreements"; diff --git a/packages/@azure/arm-billing/lib/operations/invoice.ts b/packages/@azure/arm-billing/lib/operations/invoice.ts new file mode 100644 index 000000000000..6a2d26f96e24 --- /dev/null +++ b/packages/@azure/arm-billing/lib/operations/invoice.ts @@ -0,0 +1,91 @@ +/* + * 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/invoiceMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a Invoice. */ +export class Invoice { + private readonly client: BillingManagementClientContext; + + /** + * Create a Invoice. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * Get the invoice by id. + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceName Invoice Id. + * @param [options] The optional parameters + * @returns Promise + */ + get(billingAccountName: string, billingProfileName: string, invoiceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceName Invoice Id. + * @param callback The callback + */ + get(billingAccountName: string, billingProfileName: string, invoiceName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param invoiceName Invoice Id. + * @param options The optional parameters + * @param callback The callback + */ + get(billingAccountName: string, billingProfileName: string, invoiceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(billingAccountName: string, billingProfileName: string, invoiceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + invoiceName, + options + }, + getOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoices/{invoiceName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName, + Parameters.invoiceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.InvoiceSummary + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/packages/@azure/arm-billing/lib/operations/invoicePricesheet.ts b/packages/@azure/arm-billing/lib/operations/invoicePricesheet.ts new file mode 100644 index 000000000000..0eb61e1a2093 --- /dev/null +++ b/packages/@azure/arm-billing/lib/operations/invoicePricesheet.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/invoicePricesheetMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a InvoicePricesheet. */ +export class InvoicePricesheet { + private readonly client: BillingManagementClientContext; + + /** + * Create a InvoicePricesheet. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * Get pricesheet data for invoice id (invoiceName). + * @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; + } + + /** + * Get pricesheet data for invoice id (invoiceName). + * @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.InvoicePricesheetDownloadHeaders + }, + 202: { + headersMapper: Mappers.InvoicePricesheetDownloadHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/packages/@azure/arm-billing/lib/operations/invoiceSectionBillingRoleAssignment.ts b/packages/@azure/arm-billing/lib/operations/invoiceSectionBillingRoleAssignment.ts new file mode 100644 index 000000000000..e195299a3f8d --- /dev/null +++ b/packages/@azure/arm-billing/lib/operations/invoiceSectionBillingRoleAssignment.ts @@ -0,0 +1,271 @@ +/* + * 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/invoiceSectionBillingRoleAssignmentMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a InvoiceSectionBillingRoleAssignment. */ +export class InvoiceSectionBillingRoleAssignment { + private readonly client: BillingManagementClientContext; + + /** + * Create a InvoiceSectionBillingRoleAssignment. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * 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 + */ + get(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 + */ + get(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 + */ + get(billingAccountName: string, invoiceSectionName: string, billingRoleAssignmentName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(billingAccountName: string, invoiceSectionName: string, billingRoleAssignmentName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + invoiceSectionName, + billingRoleAssignmentName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Delete the role assignment on this invoice Section + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param billingRoleAssignmentName role assignment id. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(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 + */ + deleteMethod(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 + */ + deleteMethod(billingAccountName: string, invoiceSectionName: string, billingRoleAssignmentName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(billingAccountName: string, invoiceSectionName: string, billingRoleAssignmentName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + invoiceSectionName, + billingRoleAssignmentName, + options + }, + deleteMethodOperationSpec, + 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 + */ + 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; + } + + /** + * 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 + */ + add(billingAccountName: string, invoiceSectionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param callback The callback + */ + add(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 + */ + add(billingAccountName: string, invoiceSectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + add(billingAccountName: string, invoiceSectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + invoiceSectionName, + options + }, + addOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: 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 deleteMethodOperationSpec: 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 listOperationSpec: 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 addOperationSpec: 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 +}; diff --git a/packages/@azure/arm-billing/lib/operations/invoiceSectionBillingRoleDefinition.ts b/packages/@azure/arm-billing/lib/operations/invoiceSectionBillingRoleDefinition.ts new file mode 100644 index 000000000000..4eb080887ccb --- /dev/null +++ b/packages/@azure/arm-billing/lib/operations/invoiceSectionBillingRoleDefinition.ts @@ -0,0 +1,147 @@ +/* + * 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/invoiceSectionBillingRoleDefinitionMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a InvoiceSectionBillingRoleDefinition. */ +export class InvoiceSectionBillingRoleDefinition { + private readonly client: BillingManagementClientContext; + + /** + * Create a InvoiceSectionBillingRoleDefinition. + * @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 invoiceSectionName InvoiceSection Id. + * @param billingRoleDefinitionName role definition id. + * @param [options] The optional parameters + * @returns Promise + */ + get(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 + */ + get(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 + */ + get(billingAccountName: string, invoiceSectionName: string, billingRoleDefinitionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(billingAccountName: string, invoiceSectionName: string, billingRoleDefinitionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + invoiceSectionName, + billingRoleDefinitionName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Lists the role definition for a 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; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: 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 listOperationSpec: 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 +}; diff --git a/packages/@azure/arm-billing/lib/operations/invoiceSections.ts b/packages/@azure/arm-billing/lib/operations/invoiceSections.ts new file mode 100644 index 000000000000..0ce9b72aa7a1 --- /dev/null +++ b/packages/@azure/arm-billing/lib/operations/invoiceSections.ts @@ -0,0 +1,327 @@ +/* + * 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; + } + + /** + * 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; + } + + /** + * 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 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 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/packages/@azure/arm-billing/lib/operations/invoiceSectionsBillingPermissions.ts b/packages/@azure/arm-billing/lib/operations/invoiceSectionsBillingPermissions.ts new file mode 100644 index 000000000000..cc925b808a9e --- /dev/null +++ b/packages/@azure/arm-billing/lib/operations/invoiceSectionsBillingPermissions.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/invoiceSectionsBillingPermissionsMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a InvoiceSectionsBillingPermissions. */ +export class InvoiceSectionsBillingPermissions { + private readonly client: BillingManagementClientContext; + + /** + * Create a InvoiceSectionsBillingPermissions. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * Lists all billingPermissions for the caller has for a 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; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: 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 +}; diff --git a/packages/@azure/arm-billing/lib/operations/invoiceSectionsByBillingAccountName.ts b/packages/@azure/arm-billing/lib/operations/invoiceSectionsByBillingAccountName.ts new file mode 100644 index 000000000000..89447ce6ac32 --- /dev/null +++ b/packages/@azure/arm-billing/lib/operations/invoiceSectionsByBillingAccountName.ts @@ -0,0 +1,82 @@ +/* + * 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/invoiceSectionsByBillingAccountNameMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a InvoiceSectionsByBillingAccountName. */ +export class InvoiceSectionsByBillingAccountName { + private readonly client: BillingManagementClientContext; + + /** + * Create a InvoiceSectionsByBillingAccountName. + * @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 + */ + list(billingAccountName: string, options?: Models.InvoiceSectionsByBillingAccountNameListOptionalParams): Promise; + /** + * @param billingAccountName billing Account Id. + * @param callback The callback + */ + list(billingAccountName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param options The optional parameters + * @param callback The callback + */ + list(billingAccountName: string, options: Models.InvoiceSectionsByBillingAccountNameListOptionalParams, callback: msRest.ServiceCallback): void; + list(billingAccountName: string, options?: Models.InvoiceSectionsByBillingAccountNameListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + options + }, + listOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: 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 +}; diff --git a/packages/@azure/arm-billing/lib/operations/invoiceSectionsWithCreateSubscriptionPermission.ts b/packages/@azure/arm-billing/lib/operations/invoiceSectionsWithCreateSubscriptionPermission.ts new file mode 100644 index 000000000000..b1e19c2fa997 --- /dev/null +++ b/packages/@azure/arm-billing/lib/operations/invoiceSectionsWithCreateSubscriptionPermission.ts @@ -0,0 +1,82 @@ +/* + * 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/invoiceSectionsWithCreateSubscriptionPermissionMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a InvoiceSectionsWithCreateSubscriptionPermission. */ +export class InvoiceSectionsWithCreateSubscriptionPermission { + private readonly client: BillingManagementClientContext; + + /** + * Create a InvoiceSectionsWithCreateSubscriptionPermission. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * Lists all invoiceSections with create subscription permission for a user. + * @param billingAccountName billing Account Id. + * @param [options] The optional parameters + * @returns Promise + */ + list(billingAccountName: string, options?: Models.InvoiceSectionsWithCreateSubscriptionPermissionListOptionalParams): Promise; + /** + * @param billingAccountName billing Account Id. + * @param callback The callback + */ + list(billingAccountName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param options The optional parameters + * @param callback The callback + */ + list(billingAccountName: string, options: Models.InvoiceSectionsWithCreateSubscriptionPermissionListOptionalParams, callback: msRest.ServiceCallback): void; + list(billingAccountName: string, options?: Models.InvoiceSectionsWithCreateSubscriptionPermissionListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + options + }, + listOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: 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 +}; diff --git a/packages/@azure/arm-billing/lib/operations/invoicesByBillingAccount.ts b/packages/@azure/arm-billing/lib/operations/invoicesByBillingAccount.ts new file mode 100644 index 000000000000..9151cb928baa --- /dev/null +++ b/packages/@azure/arm-billing/lib/operations/invoicesByBillingAccount.ts @@ -0,0 +1,91 @@ +/* + * 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/invoicesByBillingAccountMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a InvoicesByBillingAccount. */ +export class InvoicesByBillingAccount { + private readonly client: BillingManagementClientContext; + + /** + * Create a InvoicesByBillingAccount. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * 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 + */ + list(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(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(billingAccountName: string, periodStartDate: string, periodEndDate: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(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; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices", + urlParameters: [ + Parameters.billingAccountName + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.periodStartDate, + Parameters.periodEndDate + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.InvoiceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/packages/@azure/arm-billing/lib/operations/invoicesByBillingProfile.ts b/packages/@azure/arm-billing/lib/operations/invoicesByBillingProfile.ts new file mode 100644 index 000000000000..cc682635d12f --- /dev/null +++ b/packages/@azure/arm-billing/lib/operations/invoicesByBillingProfile.ts @@ -0,0 +1,96 @@ +/* + * 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/invoicesByBillingProfileMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a InvoicesByBillingProfile. */ +export class InvoicesByBillingProfile { + private readonly client: BillingManagementClientContext; + + /** + * Create a InvoicesByBillingProfile. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * 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 + */ + list(billingAccountName: string, billingProfileName: string, periodStartDate: string, periodEndDate: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param periodStartDate Invoice period start date. + * @param periodEndDate Invoice period end date. + * @param callback The callback + */ + list(billingAccountName: string, billingProfileName: string, periodStartDate: string, periodEndDate: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param periodStartDate Invoice period start date. + * @param periodEndDate Invoice period end date. + * @param options The optional parameters + * @param callback The callback + */ + list(billingAccountName: string, billingProfileName: string, periodStartDate: string, periodEndDate: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(billingAccountName: string, billingProfileName: string, periodStartDate: string, periodEndDate: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + periodStartDate, + periodEndDate, + options + }, + listOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoices", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.periodStartDate, + Parameters.periodEndDate + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.InvoiceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/packages/@azure/arm-billing/lib/operations/paymentMethodsByBillingProfile.ts b/packages/@azure/arm-billing/lib/operations/paymentMethodsByBillingProfile.ts new file mode 100644 index 000000000000..a3148a2a8416 --- /dev/null +++ b/packages/@azure/arm-billing/lib/operations/paymentMethodsByBillingProfile.ts @@ -0,0 +1,135 @@ +/* + * 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/paymentMethodsByBillingProfileMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a PaymentMethodsByBillingProfile. */ +export class PaymentMethodsByBillingProfile { + private readonly client: BillingManagementClientContext; + + /** + * Create a PaymentMethodsByBillingProfile. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * 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 + */ + list(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param callback The callback + */ + list(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 + */ + list(billingAccountName: string, billingProfileName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(billingAccountName: string, billingProfileName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + options + }, + listOperationSpec, + 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 + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{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 listNextOperationSpec: 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/packages/@azure/arm-billing/lib/operations/policyOperations.ts b/packages/@azure/arm-billing/lib/operations/policyOperations.ts new file mode 100644 index 000000000000..8c8468da935d --- /dev/null +++ b/packages/@azure/arm-billing/lib/operations/policyOperations.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/policyOperationsMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a PolicyOperations. */ +export class PolicyOperations { + private readonly client: BillingManagementClientContext; + + /** + * Create a PolicyOperations. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * The policy 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; + } + + /** + * 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 getByBillingProfileOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/policies/default", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Policy + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/policies/default", + urlParameters: [ + Parameters.billingAccountName, + Parameters.billingProfileName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.Policy, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Policy + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/packages/@azure/arm-billing/lib/operations/products.ts b/packages/@azure/arm-billing/lib/operations/products.ts new file mode 100644 index 000000000000..d9ea2d5cece0 --- /dev/null +++ b/packages/@azure/arm-billing/lib/operations/products.ts @@ -0,0 +1,168 @@ +/* + * 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; + } + + /** + * 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 InvoiceSection. + * @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; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +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: { + destinationInvoiceSectionName: [ + "options", + "destinationInvoiceSectionName" + ] + }, + mapper: { + ...Mappers.TransferProductRequestProperties, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ProductSummary, + headersMapper: Mappers.ProductsTransferHeaders + }, + 202: { + headersMapper: Mappers.ProductsTransferHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/packages/@azure/arm-billing/lib/operations/productsByBillingAccount.ts b/packages/@azure/arm-billing/lib/operations/productsByBillingAccount.ts new file mode 100644 index 000000000000..27357a3e6720 --- /dev/null +++ b/packages/@azure/arm-billing/lib/operations/productsByBillingAccount.ts @@ -0,0 +1,131 @@ +/* + * 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/productsByBillingAccountMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a ProductsByBillingAccount. */ +export class ProductsByBillingAccount { + private readonly client: BillingManagementClientContext; + + /** + * Create a ProductsByBillingAccount. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * Lists products by billingAccountName. + * @param billingAccountName billing Account Id. + * @param [options] The optional parameters + * @returns Promise + */ + list(billingAccountName: string, options?: Models.ProductsByBillingAccountListOptionalParams): Promise; + /** + * @param billingAccountName billing Account Id. + * @param callback The callback + */ + list(billingAccountName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param options The optional parameters + * @param callback The callback + */ + list(billingAccountName: string, options: Models.ProductsByBillingAccountListOptionalParams, callback: msRest.ServiceCallback): void; + list(billingAccountName: string, options?: Models.ProductsByBillingAccountListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Lists products by billingAccountName. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/products", + urlParameters: [ + Parameters.billingAccountName + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.filter + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ProductsListResult + }, + 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.ProductsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/packages/@azure/arm-billing/lib/operations/productsByBillingSubscriptions.ts b/packages/@azure/arm-billing/lib/operations/productsByBillingSubscriptions.ts new file mode 100644 index 000000000000..8625f396e3a0 --- /dev/null +++ b/packages/@azure/arm-billing/lib/operations/productsByBillingSubscriptions.ts @@ -0,0 +1,130 @@ +/* + * 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/productsByBillingSubscriptionsMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a ProductsByBillingSubscriptions. */ +export class ProductsByBillingSubscriptions { + private readonly client: BillingManagementClientContext; + + /** + * Create a ProductsByBillingSubscriptions. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * Lists billing subscriptions by billingAccountName. + * @param billingAccountName billing Account Id. + * @param [options] The optional parameters + * @returns Promise + */ + list(billingAccountName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param billingAccountName billing Account Id. + * @param callback The callback + */ + list(billingAccountName: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountName billing Account Id. + * @param options The optional parameters + * @param callback The callback + */ + list(billingAccountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(billingAccountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Lists billing subscriptions by billingAccountName. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions", + urlParameters: [ + Parameters.billingAccountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingSubscriptionsListResult + }, + 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.BillingSubscriptionsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/packages/@azure/arm-billing/lib/operations/productsByInvoiceSection.ts b/packages/@azure/arm-billing/lib/operations/productsByInvoiceSection.ts new file mode 100644 index 000000000000..f7615a1ae217 --- /dev/null +++ b/packages/@azure/arm-billing/lib/operations/productsByInvoiceSection.ts @@ -0,0 +1,87 @@ +/* + * 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/productsByInvoiceSectionMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a ProductsByInvoiceSection. */ +export class ProductsByInvoiceSection { + private readonly client: BillingManagementClientContext; + + /** + * Create a ProductsByInvoiceSection. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * Lists products by invoiceSectionName. + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param [options] The optional parameters + * @returns Promise + */ + list(billingAccountName: string, invoiceSectionName: string, options?: Models.ProductsByInvoiceSectionListOptionalParams): 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: Models.ProductsByInvoiceSectionListOptionalParams, callback: msRest.ServiceCallback): void; + list(billingAccountName: string, invoiceSectionName: string, options?: Models.ProductsByInvoiceSectionListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + invoiceSectionName, + options + }, + listOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: 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 +}; diff --git a/packages/@azure/arm-billing/lib/operations/recipientTransfers.ts b/packages/@azure/arm-billing/lib/operations/recipientTransfers.ts new file mode 100644 index 000000000000..ceacc47f428c --- /dev/null +++ b/packages/@azure/arm-billing/lib/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/packages/@azure/arm-billing/lib/operations/transactionsByBillingAccount.ts b/packages/@azure/arm-billing/lib/operations/transactionsByBillingAccount.ts new file mode 100644 index 000000000000..c9fd05171565 --- /dev/null +++ b/packages/@azure/arm-billing/lib/operations/transactionsByBillingAccount.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/transactionsByBillingAccountMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a TransactionsByBillingAccount. */ +export class TransactionsByBillingAccount { + private readonly client: BillingManagementClientContext; + + /** + * Create a TransactionsByBillingAccount. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * Lists the transactions by billingAccountName 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 + */ + list(billingAccountName: string, startDate: string, endDate: string, options?: Models.TransactionsByBillingAccountListOptionalParams): Promise; + /** + * @param billingAccountName billing Account Id. + * @param startDate Start date + * @param endDate End date + * @param callback The callback + */ + list(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 + */ + list(billingAccountName: string, startDate: string, endDate: string, options: Models.TransactionsByBillingAccountListOptionalParams, callback: msRest.ServiceCallback): void; + list(billingAccountName: string, startDate: string, endDate: string, options?: Models.TransactionsByBillingAccountListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + startDate, + endDate, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Lists the transactions by billingAccountName 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 + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{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 listNextOperationSpec: 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/packages/@azure/arm-billing/lib/operations/transactionsByBillingProfile.ts b/packages/@azure/arm-billing/lib/operations/transactionsByBillingProfile.ts new file mode 100644 index 000000000000..741ab8e4f4b8 --- /dev/null +++ b/packages/@azure/arm-billing/lib/operations/transactionsByBillingProfile.ts @@ -0,0 +1,97 @@ +/* + * 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/transactionsByBillingProfileMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a TransactionsByBillingProfile. */ +export class TransactionsByBillingProfile { + private readonly client: BillingManagementClientContext; + + /** + * Create a TransactionsByBillingProfile. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * Lists the transactions by billingProfileName 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 + */ + list(billingAccountName: string, billingProfileName: string, startDate: string, endDate: string, options?: Models.TransactionsByBillingProfileListOptionalParams): Promise; + /** + * @param billingAccountName billing Account Id. + * @param billingProfileName Billing Profile Id. + * @param startDate Start date + * @param endDate End date + * @param callback The callback + */ + list(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 + */ + list(billingAccountName: string, billingProfileName: string, startDate: string, endDate: string, options: Models.TransactionsByBillingProfileListOptionalParams, callback: msRest.ServiceCallback): void; + list(billingAccountName: string, billingProfileName: string, startDate: string, endDate: string, options?: Models.TransactionsByBillingProfileListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + billingProfileName, + startDate, + endDate, + options + }, + listOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: 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 +}; diff --git a/packages/@azure/arm-billing/lib/operations/transactionsByInvoiceSection.ts b/packages/@azure/arm-billing/lib/operations/transactionsByInvoiceSection.ts new file mode 100644 index 000000000000..2a364fc2739a --- /dev/null +++ b/packages/@azure/arm-billing/lib/operations/transactionsByInvoiceSection.ts @@ -0,0 +1,97 @@ +/* + * 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/transactionsByInvoiceSectionMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a TransactionsByInvoiceSection. */ +export class TransactionsByInvoiceSection { + private readonly client: BillingManagementClientContext; + + /** + * Create a TransactionsByInvoiceSection. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * Lists the transactions by invoiceSectionName 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 + */ + list(billingAccountName: string, invoiceSectionName: string, startDate: string, endDate: string, options?: Models.TransactionsByInvoiceSectionListOptionalParams): Promise; + /** + * @param billingAccountName billing Account Id. + * @param invoiceSectionName InvoiceSection Id. + * @param startDate Start date + * @param endDate End date + * @param callback The callback + */ + list(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 + */ + list(billingAccountName: string, invoiceSectionName: string, startDate: string, endDate: string, options: Models.TransactionsByInvoiceSectionListOptionalParams, callback: msRest.ServiceCallback): void; + list(billingAccountName: string, invoiceSectionName: string, startDate: string, endDate: string, options?: Models.TransactionsByInvoiceSectionListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountName, + invoiceSectionName, + startDate, + endDate, + options + }, + listOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: 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 +}; diff --git a/packages/@azure/arm-billing/lib/operations/transfers.ts b/packages/@azure/arm-billing/lib/operations/transfers.ts new file mode 100644 index 000000000000..e7acf7626c2b --- /dev/null +++ b/packages/@azure/arm-billing/lib/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 GTM or legacy subscriptions or RIs to GTM. + * @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 +}; diff --git a/packages/@azure/arm-billing/package.json b/packages/@azure/arm-billing/package.json index b3747378d079..165c7a5511c7 100644 --- a/packages/@azure/arm-billing/package.json +++ b/packages/@azure/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.2.0", + "@azure/ms-rest-js": "^1.2.0", "tslib": "^1.9.3" }, "keywords": [ @@ -23,6 +23,7 @@ "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/packages/@azure/arm-billing", @@ -51,6 +52,5 @@ "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/arm-billing.js.map'\" -o ./dist/arm-billing.min.js ./dist/arm-billing.js", "prepack": "npm install && npm run build" }, - "sideEffects": false, - "authPublish": true + "sideEffects": false } diff --git a/packages/@azure/arm-billing/rollup.config.js b/packages/@azure/arm-billing/rollup.config.js index ae6725122752..75249006e750 100644 --- a/packages/@azure/arm-billing/rollup.config.js +++ b/packages/@azure/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;