diff --git a/sdk/billing/arm-billing/LICENSE.txt b/sdk/billing/arm-billing/LICENSE.txt index a70e8cf66038..b73b4a1293c3 100644 --- a/sdk/billing/arm-billing/LICENSE.txt +++ b/sdk/billing/arm-billing/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2018 Microsoft +Copyright (c) 2019 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/billing/arm-billing/README.md b/sdk/billing/arm-billing/README.md index e3c358bd1102..d0445dac16e3 100644 --- a/sdk/billing/arm-billing/README.md +++ b/sdk/billing/arm-billing/README.md @@ -9,23 +9,23 @@ This package contains an isomorphic SDK for BillingManagementClient. ### How to Install -``` +```bash npm install @azure/arm-billing ``` ### How to use -#### nodejs - Authentication, client creation and list enrollmentAccounts as an example written in TypeScript. +#### nodejs - Authentication, client creation and list billingAccounts as an example written in TypeScript. ##### Install @azure/ms-rest-nodeauth -``` +```bash npm install @azure/ms-rest-nodeauth ``` ##### Sample code -```ts +```typescript import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; @@ -34,7 +34,8 @@ const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; msRestNodeAuth.interactiveLogin().then((creds) => { const client = new BillingManagementClient(creds, subscriptionId); - client.enrollmentAccounts.list().then((result) => { + const expand = "testexpand"; + client.billingAccounts.list(expand).then((result) => { console.log("The result is:"); console.log(result); }); @@ -43,11 +44,11 @@ msRestNodeAuth.interactiveLogin().then((creds) => { }); ``` -#### browser - Authentication, client creation and list enrollmentAccounts as an example written in JavaScript. +#### browser - Authentication, client creation and list billingAccounts as an example written in JavaScript. ##### Install @azure/ms-rest-browserauth -``` +```bash npm install @azure/ms-rest-browserauth ``` @@ -77,7 +78,8 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to authManager.login(); } const client = new Azure.ArmBilling.BillingManagementClient(res.creds, subscriptionId); - client.enrollmentAccounts.list().then((result) => { + const expand = "testexpand"; + client.billingAccounts.list(expand).then((result) => { console.log("The result is:"); console.log(result); }).catch((err) => { @@ -94,6 +96,3 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to ## Related projects - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/billing/arm-billing/README.png) diff --git a/sdk/billing/arm-billing/lib/billingManagementClient.ts b/sdk/billing/arm-billing/lib/billingManagementClient.ts new file mode 100644 index 000000000000..07cb6c33df34 --- /dev/null +++ b/sdk/billing/arm-billing/lib/billingManagementClient.ts @@ -0,0 +1,264 @@ +/* + * 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/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; + 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; + 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. + * @param credentials Credentials needed for the client to connect to Azure. + * @param subscriptionId Azure Subscription ID. + * @param [options] The parameter options + */ + constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.BillingManagementClientOptions) { + super(credentials, subscriptionId, options); + this.billingAccounts = new operations.BillingAccounts(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.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, + BillingManagementClientContext, + Models as BillingManagementModels, + Mappers as BillingManagementMappers +}; +export * from "./operations"; diff --git a/sdk/billing/arm-billing/lib/billingManagementClientContext.ts b/sdk/billing/arm-billing/lib/billingManagementClientContext.ts new file mode 100644 index 000000000000..9be11d0cc4cc --- /dev/null +++ b/sdk/billing/arm-billing/lib/billingManagementClientContext.ts @@ -0,0 +1,62 @@ +/* + * 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 Models from "./models"; +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; + +const packageName = "@azure/arm-billing"; +const packageVersion = "2.2.0"; + +export class BillingManagementClientContext extends msRestAzure.AzureServiceClient { + credentials: msRest.ServiceClientCredentials; + apiVersion?: string; + subscriptionId: string; + + /** + * Initializes a new instance of the BillingManagementClient class. + * @param credentials Credentials needed for the client to connect to Azure. + * @param subscriptionId Azure Subscription ID. + * @param [options] The parameter options + */ + constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.BillingManagementClientOptions) { + if (credentials == undefined) { + throw new Error('\'credentials\' cannot be null.'); + } + if (subscriptionId == undefined) { + throw new Error('\'subscriptionId\' cannot be null.'); + } + + if (!options) { + options = {}; + } + if(!options.userAgent) { + const defaultUserAgent = msRestAzure.getDefaultUserAgentValue(); + options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; + } + + super(credentials, options); + + this.apiVersion = '2018-11-01-preview'; + this.acceptLanguage = 'en-US'; + this.longRunningOperationRetryTimeout = 30; + this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; + this.requestContentType = "application/json; charset=utf-8"; + this.credentials = credentials; + this.subscriptionId = subscriptionId; + + if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) { + this.acceptLanguage = options.acceptLanguage; + } + if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { + this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; + } + } +} diff --git a/sdk/billing/arm-billing/lib/models/agreementsMappers.ts b/sdk/billing/arm-billing/lib/models/agreementsMappers.ts new file mode 100644 index 000000000000..5f924145e982 --- /dev/null +++ b/sdk/billing/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, + BillingProperty, + InvoiceSummary, + Amount, + DownloadProperties, + PaymentProperties, + ProductSummary, + BillingSubscriptionSummary, + TransactionsSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleAssignment, + BillingRoleDefinition, + BillingPermissions +} from "../models/mappers"; + diff --git a/sdk/billing/arm-billing/lib/models/availableBalanceByBillingProfileMappers.ts b/sdk/billing/arm-billing/lib/models/availableBalanceByBillingProfileMappers.ts new file mode 100644 index 000000000000..61d9240e91b1 --- /dev/null +++ b/sdk/billing/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, + BillingProperty, + InvoiceSummary, + DownloadProperties, + PaymentProperties, + ProductSummary, + BillingSubscriptionSummary, + TransactionsSummary, + Policy, + PaymentMethod, + BillingRoleAssignment, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/sdk/billing/arm-billing/lib/models/billingAccountBillingPermissionsMappers.ts b/sdk/billing/arm-billing/lib/models/billingAccountBillingPermissionsMappers.ts new file mode 100644 index 000000000000..d0184f6b57d5 --- /dev/null +++ b/sdk/billing/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/sdk/billing/arm-billing/lib/models/billingAccountBillingRoleAssignmentMappers.ts b/sdk/billing/arm-billing/lib/models/billingAccountBillingRoleAssignmentMappers.ts new file mode 100644 index 000000000000..3d9c6a0fec7a --- /dev/null +++ b/sdk/billing/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, + BillingProperty, + InvoiceSummary, + Amount, + DownloadProperties, + PaymentProperties, + ProductSummary, + BillingSubscriptionSummary, + TransactionsSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/sdk/billing/arm-billing/lib/models/billingAccountBillingRoleDefinitionMappers.ts b/sdk/billing/arm-billing/lib/models/billingAccountBillingRoleDefinitionMappers.ts new file mode 100644 index 000000000000..4174ebee73e6 --- /dev/null +++ b/sdk/billing/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, + BillingProperty, + InvoiceSummary, + Amount, + DownloadProperties, + PaymentProperties, + ProductSummary, + BillingSubscriptionSummary, + TransactionsSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleAssignment, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/sdk/billing/arm-billing/lib/models/billingAccountsMappers.ts b/sdk/billing/arm-billing/lib/models/billingAccountsMappers.ts new file mode 100644 index 000000000000..f802cbcb20c3 --- /dev/null +++ b/sdk/billing/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, + BillingProperty, + InvoiceSummary, + Amount, + DownloadProperties, + PaymentProperties, + ProductSummary, + BillingSubscriptionSummary, + TransactionsSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleAssignment, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/sdk/billing/arm-billing/lib/models/billingProfileBillingPermissionsMappers.ts b/sdk/billing/arm-billing/lib/models/billingProfileBillingPermissionsMappers.ts new file mode 100644 index 000000000000..d0184f6b57d5 --- /dev/null +++ b/sdk/billing/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/sdk/billing/arm-billing/lib/models/billingProfileBillingRoleAssignmentMappers.ts b/sdk/billing/arm-billing/lib/models/billingProfileBillingRoleAssignmentMappers.ts new file mode 100644 index 000000000000..3d9c6a0fec7a --- /dev/null +++ b/sdk/billing/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, + BillingProperty, + InvoiceSummary, + Amount, + DownloadProperties, + PaymentProperties, + ProductSummary, + BillingSubscriptionSummary, + TransactionsSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/sdk/billing/arm-billing/lib/models/billingProfileBillingRoleDefinitionMappers.ts b/sdk/billing/arm-billing/lib/models/billingProfileBillingRoleDefinitionMappers.ts new file mode 100644 index 000000000000..4174ebee73e6 --- /dev/null +++ b/sdk/billing/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, + BillingProperty, + InvoiceSummary, + Amount, + DownloadProperties, + PaymentProperties, + ProductSummary, + BillingSubscriptionSummary, + TransactionsSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleAssignment, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/sdk/billing/arm-billing/lib/models/billingProfilesByBillingAccountNameMappers.ts b/sdk/billing/arm-billing/lib/models/billingProfilesByBillingAccountNameMappers.ts new file mode 100644 index 000000000000..19e6df0fd359 --- /dev/null +++ b/sdk/billing/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, + BillingProperty, + InvoiceSummary, + Amount, + DownloadProperties, + PaymentProperties, + ProductSummary, + BillingSubscriptionSummary, + TransactionsSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleAssignment, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/sdk/billing/arm-billing/lib/models/billingProfilesMappers.ts b/sdk/billing/arm-billing/lib/models/billingProfilesMappers.ts new file mode 100644 index 000000000000..7e1cfd610a35 --- /dev/null +++ b/sdk/billing/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, + BillingProperty, + InvoiceSummary, + Amount, + DownloadProperties, + PaymentProperties, + ProductSummary, + BillingSubscriptionSummary, + TransactionsSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleAssignment, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/sdk/billing/arm-billing/lib/models/billingPropertyOperationsMappers.ts b/sdk/billing/arm-billing/lib/models/billingPropertyOperationsMappers.ts new file mode 100644 index 000000000000..ad28f086a3bb --- /dev/null +++ b/sdk/billing/arm-billing/lib/models/billingPropertyOperationsMappers.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 { + BillingProperty, + Resource, + BaseResource, + ErrorResponse, + ErrorDetails, + BillingProfile, + Address, + EnabledAzureSKUs, + InvoiceSection, + EnrollmentAccount, + Department, + BillingAccount, + Enrollment, + EnrollmentPolicies, + InvoiceSummary, + Amount, + DownloadProperties, + PaymentProperties, + ProductSummary, + BillingSubscriptionSummary, + TransactionsSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleAssignment, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/sdk/billing/arm-billing/lib/models/billingSubscriptionMappers.ts b/sdk/billing/arm-billing/lib/models/billingSubscriptionMappers.ts new file mode 100644 index 000000000000..177328092342 --- /dev/null +++ b/sdk/billing/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, + ErrorResponse, + ErrorDetails, + TransferBillingSubscriptionRequestProperties, + TransferBillingSubscriptionResult, + BillingSubscriptionTransferHeaders, + BillingProfile, + Address, + EnabledAzureSKUs, + InvoiceSection, + EnrollmentAccount, + Department, + BillingAccount, + Enrollment, + EnrollmentPolicies, + BillingProperty, + InvoiceSummary, + DownloadProperties, + PaymentProperties, + ProductSummary, + TransactionsSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleAssignment, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/sdk/billing/arm-billing/lib/models/billingSubscriptionsByBillingProfileMappers.ts b/sdk/billing/arm-billing/lib/models/billingSubscriptionsByBillingProfileMappers.ts new file mode 100644 index 000000000000..a9f318b83be1 --- /dev/null +++ b/sdk/billing/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, + ErrorResponse, + ErrorDetails, + BillingProfile, + Address, + EnabledAzureSKUs, + InvoiceSection, + EnrollmentAccount, + Department, + BillingAccount, + Enrollment, + EnrollmentPolicies, + BillingProperty, + InvoiceSummary, + DownloadProperties, + PaymentProperties, + ProductSummary, + TransactionsSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleAssignment, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/sdk/billing/arm-billing/lib/models/billingSubscriptionsByInvoiceSectionMappers.ts b/sdk/billing/arm-billing/lib/models/billingSubscriptionsByInvoiceSectionMappers.ts new file mode 100644 index 000000000000..a9f318b83be1 --- /dev/null +++ b/sdk/billing/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, + ErrorResponse, + ErrorDetails, + BillingProfile, + Address, + EnabledAzureSKUs, + InvoiceSection, + EnrollmentAccount, + Department, + BillingAccount, + Enrollment, + EnrollmentPolicies, + BillingProperty, + InvoiceSummary, + DownloadProperties, + PaymentProperties, + ProductSummary, + TransactionsSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleAssignment, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/sdk/billing/arm-billing/lib/models/departmentsByBillingAccountNameMappers.ts b/sdk/billing/arm-billing/lib/models/departmentsByBillingAccountNameMappers.ts new file mode 100644 index 000000000000..d46cf6e30a05 --- /dev/null +++ b/sdk/billing/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, + BillingProperty, + InvoiceSummary, + Amount, + DownloadProperties, + PaymentProperties, + ProductSummary, + BillingSubscriptionSummary, + TransactionsSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleAssignment, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/sdk/billing/arm-billing/lib/models/departmentsMappers.ts b/sdk/billing/arm-billing/lib/models/departmentsMappers.ts new file mode 100644 index 000000000000..e7862eddf76f --- /dev/null +++ b/sdk/billing/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, + BillingProperty, + InvoiceSummary, + Amount, + DownloadProperties, + PaymentProperties, + ProductSummary, + BillingSubscriptionSummary, + TransactionsSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleAssignment, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/sdk/billing/arm-billing/lib/models/enrollmentAccountsByBillingAccountNameMappers.ts b/sdk/billing/arm-billing/lib/models/enrollmentAccountsByBillingAccountNameMappers.ts new file mode 100644 index 000000000000..9701af146302 --- /dev/null +++ b/sdk/billing/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, + BillingProperty, + InvoiceSummary, + Amount, + DownloadProperties, + PaymentProperties, + ProductSummary, + BillingSubscriptionSummary, + TransactionsSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleAssignment, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/sdk/billing/arm-billing/lib/models/enrollmentAccountsMappers.ts b/sdk/billing/arm-billing/lib/models/enrollmentAccountsMappers.ts new file mode 100644 index 000000000000..b7543e7a8db5 --- /dev/null +++ b/sdk/billing/arm-billing/lib/models/enrollmentAccountsMappers.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 { + EnrollmentAccount, + Resource, + BaseResource, + Department, + ErrorResponse, + ErrorDetails, + BillingProfile, + Address, + EnabledAzureSKUs, + InvoiceSection, + BillingAccount, + Enrollment, + EnrollmentPolicies, + BillingProperty, + InvoiceSummary, + Amount, + DownloadProperties, + PaymentProperties, + ProductSummary, + BillingSubscriptionSummary, + TransactionsSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleAssignment, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/sdk/billing/arm-billing/lib/models/index.ts b/sdk/billing/arm-billing/lib/models/index.ts new file mode 100644 index 000000000000..4f71b4c3ae8b --- /dev/null +++ b/sdk/billing/arm-billing/lib/models/index.ts @@ -0,0 +1,4210 @@ +/* + * 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 { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js"; +import * as msRest from "@azure/ms-rest-js"; + +export { BaseResource, CloudError }; + + +/** + * @interface + * An interface representing InitiateTransferRequest. + * Request parameters to initiate transfer. + * + */ +export interface InitiateTransferRequest { + /** + * @member {string} [billingProfileId] Target Usage context for devTest + * subscriptions. + */ + billingProfileId?: string; + /** + * @member {string} [recipientEmailId] Email Id of recipient for transfer. + */ + recipientEmailId?: string; +} + +/** + * @interface + * An interface representing ProductDetails. + * Details of the product to be transferred. + * + */ +export interface ProductDetails { + /** + * @member {ProductType} [productType] Type of the product to be transferred. + * Possible values include: 'AzureSubscription', 'AzureReservation' + */ + productType?: ProductType; + /** + * @member {string} [productId] Id of product to be transferred. + */ + productId?: string; +} + +/** + * @interface + * An interface representing AcceptTransferRequest. + * Request parameters to accept transfer. + * + */ +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} [errorMessage] Error message. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly errorMessage?: string; +} + +/** + * @interface + * An interface representing DetailedTransferStatus. + * Detailed transfer status. + * + */ +export interface DetailedTransferStatus { + /** + * @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 productType?: ProductType; + /** + * @member {string} [productId] Id of product being transferred. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly productId?: string; + /** + * @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 transferStatus?: ProductTransferStatus; + /** + * @member {ErrorModel} [errorDetails] Error details for transfer execution. + */ + errorDetails?: ErrorModel; +} + +/** + * @interface + * An interface representing TransferDetails. + * Details of the transfer. + * + */ +export interface TransferDetails { + /** + * @member {Date} [creationTime] Transfer creation time. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly creationTime?: Date; + /** + * @member {Date} [expirationTime] Transfer expiration time. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + 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 RecipientTransferDetails. + * Details of the transfer. + * + */ +export interface RecipientTransferDetails { + /** + * @member {Date} [creationTime] Transfer creation time. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly creationTime?: Date; + /** + * @member {Date} [expirationTime] Transfer expiration time. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly expirationTime?: Date; + /** + * @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 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 TransferProductRequestProperties. + * The properties of the product to initiate a transfer. + * + */ +export interface TransferProductRequestProperties { + /** + * @member {string} [destinationInvoiceSectionName] Destination invoice + * section id. + */ + destinationInvoiceSectionName?: string; +} + +/** + * @interface + * 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 enable azure sku. + * + */ +export interface EnabledAzureSKUs { + /** + * @member {string} [skuId] The sku id. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly 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 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 {string} [name] Resource name. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {string} [type] Resource type. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly type?: string; +} + +/** + * @interface + * An interface representing BillingProfile. + * A billing profile resource. + * + * @extends Resource + */ +export interface BillingProfile extends Resource { + /** + * @member {string} [displayName] The billing profile name. + */ + displayName?: string; + /** + * @member {string} [poNumber] Purchase order number. + */ + poNumber?: string; + /** + * @member {Address} [address] Billing address. + */ + address?: 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 invoiceEmailOptIn?: boolean; + /** + * @member {boolean} [isClassic] Is OMS bootstrapped billing profile. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly isClassic?: boolean; + /** + * @member {number} [invoiceDay] Invoice day. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + 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 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 {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} [company] Company Name. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly company?: string; + /** + * @member {string} [country] Country Name. + * **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. By default this is not populated, + * unless it's specified in $expand. + */ + invoiceSections?: InvoiceSection[]; + /** + * @member {BillingProfile[]} [billingProfiles] The billing profiles + * associated to the billing account. By default this is not populated, + * unless it's specified in $expand. + */ + 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[]; + /** + * @member {boolean} [hasReadAccess] Specifies whether the user has read + * access on billing account. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly hasReadAccess?: boolean; +} + +/** + * @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. + * A billing property resource. + * + * @extends Resource + */ +export interface BillingProperty extends Resource { + /** + * @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} [costCenter] Cost center name. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly costCenter?: 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} [productId] Product Id. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly productId?: string; + /** + * @member {string} [productName] Product name. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly productName?: 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} [billingProfileId] The billing profile id this invoice + * belongs to. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly billingProfileId?: string; + /** + * @member {string} [billingProfileName] The profile name this invoice + * belongs to. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly billingProfileName?: string; + /** + * @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 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 {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} [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} [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 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 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} [productFamily] The product family. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly productFamily?: 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} [marketplacePurchasesAllowed] The + * marketplacePurchasesAllowed flag. + */ + marketplacePurchasesAllowed?: boolean; + /** + * @member {boolean} [reservationPurchasesAllowed] The + * reservationPurchasesAllowed flag. + */ + reservationPurchasesAllowed?: boolean; + /** + * @member {boolean} [subscriptionOwnerCanViewCharges] The + * subscriptionOwnerCanViewCharges flag. + */ + subscriptionOwnerCanViewCharges?: 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} [paymentMethodType] Payment method type. + * Possible values include: 'Credits', 'ChequeWire' + */ + paymentMethodType?: 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 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 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 type OperationsListNextResponse = OperationListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationListResult; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type BillingAccountBillingPermissionsListResponse = BillingPermissionsListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingPermissionsListResult; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type InvoiceSectionsBillingPermissionsListResponse = BillingPermissionsListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingPermissionsListResult; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type BillingProfileBillingPermissionsListResponse = BillingPermissionsListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingPermissionsListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type BillingAccountBillingRoleDefinitionGetResponse = BillingRoleDefinition & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingRoleDefinition; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type BillingAccountBillingRoleDefinitionListResponse = BillingRoleDefinitionListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingRoleDefinitionListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type InvoiceSectionBillingRoleDefinitionGetResponse = BillingRoleDefinition & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingRoleDefinition; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type InvoiceSectionBillingRoleDefinitionListResponse = BillingRoleDefinitionListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingRoleDefinitionListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type BillingProfileBillingRoleDefinitionGetResponse = BillingRoleDefinition & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingRoleDefinition; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type BillingProfileBillingRoleDefinitionListResponse = BillingRoleDefinitionListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingRoleDefinitionListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type BillingAccountBillingRoleAssignmentGetResponse = BillingRoleAssignment & { + /** + * The underlying HTTP response. + */ + _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 deleteMethod operation. + */ +export type BillingAccountBillingRoleAssignmentDeleteMethodResponse = BillingRoleAssignment & { + /** + * The underlying HTTP response. + */ + _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 BillingAccountBillingRoleAssignmentListResponse = BillingRoleAssignmentListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingRoleAssignmentListResult; + }; +}; + +/** + * Contains response data for the add operation. + */ +export type BillingAccountBillingRoleAssignmentAddResponse = BillingRoleAssignmentListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingRoleAssignmentListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type InvoiceSectionBillingRoleAssignmentGetResponse = BillingRoleAssignment & { + /** + * The underlying HTTP response. + */ + _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 deleteMethod operation. + */ +export type InvoiceSectionBillingRoleAssignmentDeleteMethodResponse = BillingRoleAssignment & { + /** + * The underlying HTTP response. + */ + _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 InvoiceSectionBillingRoleAssignmentListResponse = BillingRoleAssignmentListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingRoleAssignmentListResult; + }; +}; + +/** + * Contains response data for the add operation. + */ +export type InvoiceSectionBillingRoleAssignmentAddResponse = BillingRoleAssignmentListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingRoleAssignmentListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type BillingProfileBillingRoleAssignmentGetResponse = BillingRoleAssignment & { + /** + * The underlying HTTP response. + */ + _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 deleteMethod operation. + */ +export type BillingProfileBillingRoleAssignmentDeleteMethodResponse = BillingRoleAssignment & { + /** + * The underlying HTTP response. + */ + _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 BillingProfileBillingRoleAssignmentListResponse = BillingRoleAssignmentListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingRoleAssignmentListResult; + }; +}; + +/** + * Contains response data for the add operation. + */ +export type BillingProfileBillingRoleAssignmentAddResponse = BillingRoleAssignmentListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: BillingRoleAssignmentListResult; + }; +}; + +/** + * Contains response data for the listByBillingAccountName operation. + */ +export type AgreementsListByBillingAccountNameResponse = AgreementListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: AgreementListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type AgreementsGetResponse = Agreement & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: Agreement; + }; +}; diff --git a/sdk/billing/arm-billing/lib/models/invoiceMappers.ts b/sdk/billing/arm-billing/lib/models/invoiceMappers.ts new file mode 100644 index 000000000000..0d075e600218 --- /dev/null +++ b/sdk/billing/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, + BillingProperty, + ProductSummary, + BillingSubscriptionSummary, + TransactionsSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleAssignment, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/sdk/billing/arm-billing/lib/models/invoicePricesheetMappers.ts b/sdk/billing/arm-billing/lib/models/invoicePricesheetMappers.ts new file mode 100644 index 000000000000..2e1e53aa3f8b --- /dev/null +++ b/sdk/billing/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/sdk/billing/arm-billing/lib/models/invoiceSectionBillingRoleAssignmentMappers.ts b/sdk/billing/arm-billing/lib/models/invoiceSectionBillingRoleAssignmentMappers.ts new file mode 100644 index 000000000000..3d9c6a0fec7a --- /dev/null +++ b/sdk/billing/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, + BillingProperty, + InvoiceSummary, + Amount, + DownloadProperties, + PaymentProperties, + ProductSummary, + BillingSubscriptionSummary, + TransactionsSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/sdk/billing/arm-billing/lib/models/invoiceSectionBillingRoleDefinitionMappers.ts b/sdk/billing/arm-billing/lib/models/invoiceSectionBillingRoleDefinitionMappers.ts new file mode 100644 index 000000000000..4174ebee73e6 --- /dev/null +++ b/sdk/billing/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, + BillingProperty, + InvoiceSummary, + Amount, + DownloadProperties, + PaymentProperties, + ProductSummary, + BillingSubscriptionSummary, + TransactionsSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleAssignment, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/sdk/billing/arm-billing/lib/models/invoiceSectionsBillingPermissionsMappers.ts b/sdk/billing/arm-billing/lib/models/invoiceSectionsBillingPermissionsMappers.ts new file mode 100644 index 000000000000..d0184f6b57d5 --- /dev/null +++ b/sdk/billing/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/sdk/billing/arm-billing/lib/models/invoiceSectionsByBillingAccountNameMappers.ts b/sdk/billing/arm-billing/lib/models/invoiceSectionsByBillingAccountNameMappers.ts new file mode 100644 index 000000000000..cbb5a3847fce --- /dev/null +++ b/sdk/billing/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, + BillingProperty, + InvoiceSummary, + Amount, + DownloadProperties, + PaymentProperties, + ProductSummary, + BillingSubscriptionSummary, + TransactionsSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleAssignment, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/sdk/billing/arm-billing/lib/models/invoiceSectionsMappers.ts b/sdk/billing/arm-billing/lib/models/invoiceSectionsMappers.ts new file mode 100644 index 000000000000..4bcbef572db3 --- /dev/null +++ b/sdk/billing/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, + BillingProperty, + InvoiceSummary, + Amount, + DownloadProperties, + PaymentProperties, + ProductSummary, + BillingSubscriptionSummary, + TransactionsSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleAssignment, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/sdk/billing/arm-billing/lib/models/invoiceSectionsWithCreateSubscriptionPermissionMappers.ts b/sdk/billing/arm-billing/lib/models/invoiceSectionsWithCreateSubscriptionPermissionMappers.ts new file mode 100644 index 000000000000..cbb5a3847fce --- /dev/null +++ b/sdk/billing/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, + BillingProperty, + InvoiceSummary, + Amount, + DownloadProperties, + PaymentProperties, + ProductSummary, + BillingSubscriptionSummary, + TransactionsSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleAssignment, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/sdk/billing/arm-billing/lib/models/invoicesByBillingAccountMappers.ts b/sdk/billing/arm-billing/lib/models/invoicesByBillingAccountMappers.ts new file mode 100644 index 000000000000..d3363e1a03e3 --- /dev/null +++ b/sdk/billing/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, + BillingProperty, + ProductSummary, + BillingSubscriptionSummary, + TransactionsSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleAssignment, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/sdk/billing/arm-billing/lib/models/invoicesByBillingProfileMappers.ts b/sdk/billing/arm-billing/lib/models/invoicesByBillingProfileMappers.ts new file mode 100644 index 000000000000..d3363e1a03e3 --- /dev/null +++ b/sdk/billing/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, + BillingProperty, + ProductSummary, + BillingSubscriptionSummary, + TransactionsSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleAssignment, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/sdk/billing/arm-billing/lib/models/mappers.ts b/sdk/billing/arm-billing/lib/models/mappers.ts new file mode 100644 index 000000000000..8593d5badfa2 --- /dev/null +++ b/sdk/billing/arm-billing/lib/models/mappers.ts @@ -0,0 +1,2796 @@ +/* + * 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 { CloudErrorMapper, BaseResourceMapper } from "@azure/ms-rest-azure-js"; +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: { + readOnly: true, + serializedName: "skuId", + type: { + name: "String" + } + }, + skuDescription: { + readOnly: true, + serializedName: "skuDescription", + type: { + name: "String" + } + } + } + } +}; + +export const Resource: msRest.CompositeMapper = { + serializedName: "Resource", + type: { + name: "Composite", + className: "Resource", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const BillingProfile: msRest.CompositeMapper = { + serializedName: "BillingProfile", + type: { + name: "Composite", + className: "BillingProfile", + modelProperties: { + ...Resource.type.modelProperties, + displayName: { + serializedName: "properties.displayName", + type: { + name: "String" + } + }, + poNumber: { + serializedName: "properties.poNumber", + type: { + name: "String" + } + }, + address: { + serializedName: "properties.address", + type: { + name: "Composite", + className: "Address" + } + }, + invoiceEmailOptIn: { + readOnly: true, + serializedName: "properties.invoiceEmailOptIn", + type: { + name: "Boolean" + } + }, + isClassic: { + readOnly: true, + serializedName: "properties.isClassic", + type: { + name: "Boolean" + } + }, + invoiceDay: { + readOnly: true, + serializedName: "properties.invoiceDay", + type: { + name: "Number" + } + }, + currency: { + readOnly: true, + serializedName: "properties.currency", + type: { + name: "String" + } + }, + enabledAzureSKUs: { + serializedName: "properties.enabledAzureSKUs", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EnabledAzureSKUs" + } + } + } + }, + invoiceSections: { + serializedName: "properties.invoiceSections", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "InvoiceSection" + } + } + } + } + } + } +}; + +export const InvoiceSectionProperties: msRest.CompositeMapper = { + serializedName: "InvoiceSectionProperties", + type: { + name: "Composite", + className: "InvoiceSectionProperties", + modelProperties: { + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + billingProfiles: { + serializedName: "billingProfiles", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BillingProfile" + } + } + } + } + } + } +}; + +export const InvoiceSection: msRest.CompositeMapper = { + serializedName: "InvoiceSection", + type: { + name: "Composite", + className: "InvoiceSection", + modelProperties: { + ...Resource.type.modelProperties, + displayName: { + serializedName: "properties.displayName", + type: { + name: "String" + } + }, + billingProfiles: { + serializedName: "properties.billingProfiles", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BillingProfile" + } + } + } + } + } + } +}; + +export const EnrollmentPolicies: msRest.CompositeMapper = { + serializedName: "EnrollmentPolicies", + type: { + name: "Composite", + className: "EnrollmentPolicies", + modelProperties: { + accountOwnerViewCharges: { + readOnly: true, + serializedName: "accountOwnerViewCharges", + type: { + name: "Boolean" + } + }, + departmentAdminViewCharges: { + readOnly: true, + serializedName: "departmentAdminViewCharges", + type: { + name: "Boolean" + } + }, + marketplacesEnabled: { + readOnly: true, + serializedName: "marketplacesEnabled", + type: { + name: "Boolean" + } + }, + reservedInstancesEnabled: { + readOnly: true, + serializedName: "reservedInstancesEnabled", + type: { + name: "Boolean" + } + } + } + } +}; + +export const Enrollment: msRest.CompositeMapper = { + serializedName: "Enrollment", + type: { + name: "Composite", + className: "Enrollment", + modelProperties: { + startDate: { + serializedName: "startDate", + type: { + name: "DateTime" + } + }, + endDate: { + serializedName: "endDate", + type: { + name: "DateTime" + } + }, + currency: { + readOnly: true, + serializedName: "currency", + type: { + name: "String" + } + }, + channel: { + readOnly: true, + serializedName: "channel", + type: { + name: "String" + } + }, + policies: { + readOnly: true, + serializedName: "policies", + type: { + name: "Composite", + className: "EnrollmentPolicies" + } + }, + language: { + readOnly: true, + serializedName: "language", + type: { + name: "String" + } + }, + countryCode: { + readOnly: true, + serializedName: "countryCode", + type: { + name: "String" + } + }, + status: { + readOnly: true, + serializedName: "status", + type: { + name: "String" + } + }, + billingCycle: { + readOnly: true, + serializedName: "billingCycle", + type: { + name: "String" + } + } + } + } +}; + +export const EnrollmentAccount: msRest.CompositeMapper = { + serializedName: "EnrollmentAccount", + type: { + name: "Composite", + className: "EnrollmentAccount", + modelProperties: { + ...Resource.type.modelProperties, + accountName: { + serializedName: "properties.accountName", + type: { + name: "String" + } + }, + costCenter: { + serializedName: "properties.costCenter", + type: { + name: "String" + } + }, + accountOwner: { + serializedName: "properties.accountOwner", + type: { + name: "String" + } + }, + status: { + serializedName: "properties.status", + type: { + name: "String" + } + }, + startDate: { + serializedName: "properties.startDate", + type: { + name: "DateTime" + } + }, + endDate: { + serializedName: "properties.endDate", + type: { + name: "DateTime" + } + }, + department: { + serializedName: "properties.department", + type: { + name: "Composite", + className: "Department" + } + } + } + } +}; + +export const Department: msRest.CompositeMapper = { + serializedName: "Department", + type: { + name: "Composite", + className: "Department", + modelProperties: { + ...Resource.type.modelProperties, + departmentName: { + serializedName: "properties.departmentName", + type: { + name: "String" + } + }, + costCenter: { + serializedName: "properties.costCenter", + type: { + name: "String" + } + }, + status: { + serializedName: "properties.status", + type: { + name: "String" + } + }, + enrollmentAccounts: { + serializedName: "properties.enrollmentAccounts", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EnrollmentAccount" + } + } + } + } + } + } +}; + +export const BillingAccount: msRest.CompositeMapper = { + serializedName: "BillingAccount", + type: { + name: "Composite", + className: "BillingAccount", + modelProperties: { + ...Resource.type.modelProperties, + displayName: { + readOnly: true, + serializedName: "properties.displayName", + type: { + name: "String" + } + }, + accountType: { + readOnly: true, + serializedName: "properties.accountType", + type: { + name: "String" + } + }, + address: { + serializedName: "properties.address", + type: { + name: "Composite", + className: "Address" + } + }, + company: { + readOnly: true, + serializedName: "properties.company", + type: { + name: "String" + } + }, + country: { + readOnly: true, + serializedName: "properties.country", + type: { + name: "String" + } + }, + invoiceSections: { + serializedName: "properties.invoiceSections", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "InvoiceSection" + } + } + } + }, + billingProfiles: { + serializedName: "properties.billingProfiles", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BillingProfile" + } + } + } + }, + enrollmentDetails: { + readOnly: true, + serializedName: "properties.enrollmentDetails", + type: { + name: "Composite", + className: "Enrollment" + } + }, + departments: { + serializedName: "properties.departments", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Department" + } + } + } + }, + enrollmentAccounts: { + serializedName: "properties.enrollmentAccounts", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EnrollmentAccount" + } + } + } + }, + hasReadAccess: { + readOnly: true, + serializedName: "properties.hasReadAccess", + type: { + name: "Boolean" + } + } + } + } +}; + +export const BillingAccountListResult: msRest.CompositeMapper = { + serializedName: "BillingAccountListResult", + type: { + name: "Composite", + className: "BillingAccountListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BillingAccount" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const BillingProperty: msRest.CompositeMapper = { + serializedName: "BillingProperty", + type: { + name: "Composite", + className: "BillingProperty", + modelProperties: { + ...Resource.type.modelProperties, + billingTenantId: { + readOnly: true, + serializedName: "properties.billingTenantId", + type: { + name: "String" + } + }, + billingAccountId: { + readOnly: true, + serializedName: "properties.billingAccountId", + type: { + name: "String" + } + }, + billingAccountName: { + readOnly: true, + serializedName: "properties.billingAccountName", + type: { + name: "String" + } + }, + billingProfileId: { + readOnly: true, + serializedName: "properties.billingProfileId", + type: { + name: "String" + } + }, + billingProfileName: { + readOnly: true, + serializedName: "properties.billingProfileName", + type: { + name: "String" + } + }, + costCenter: { + readOnly: true, + serializedName: "properties.costCenter", + type: { + name: "String" + } + }, + invoiceSectionId: { + readOnly: true, + serializedName: "properties.invoiceSectionId", + type: { + name: "String" + } + }, + invoiceSectionName: { + readOnly: true, + serializedName: "properties.invoiceSectionName", + type: { + name: "String" + } + }, + productId: { + readOnly: true, + serializedName: "properties.productId", + type: { + name: "String" + } + }, + productName: { + readOnly: true, + serializedName: "properties.productName", + type: { + name: "String" + } + }, + skuId: { + readOnly: true, + serializedName: "properties.skuId", + type: { + name: "String" + } + }, + skuDescription: { + readOnly: true, + serializedName: "properties.skuDescription", + type: { + name: "String" + } + } + } + } +}; + +export const DepartmentListResult: msRest.CompositeMapper = { + serializedName: "DepartmentListResult", + type: { + name: "Composite", + className: "DepartmentListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Department" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const EnrollmentAccountListResult: msRest.CompositeMapper = { + serializedName: "EnrollmentAccountListResult", + type: { + name: "Composite", + className: "EnrollmentAccountListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EnrollmentAccount" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const BillingProfileListResult: msRest.CompositeMapper = { + serializedName: "BillingProfileListResult", + type: { + name: "Composite", + className: "BillingProfileListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BillingProfile" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const InvoiceSectionListResult: msRest.CompositeMapper = { + serializedName: "InvoiceSectionListResult", + type: { + name: "Composite", + className: "InvoiceSectionListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "InvoiceSection" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const OperationStatus: msRest.CompositeMapper = { + serializedName: "OperationStatus", + type: { + name: "Composite", + className: "OperationStatus", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + }, + statusDetail: { + serializedName: "statusDetail", + type: { + name: "String" + } + } + } + } +}; + +export const DownloadUrl: msRest.CompositeMapper = { + serializedName: "DownloadUrl", + type: { + name: "Composite", + className: "DownloadUrl", + modelProperties: { + expiryTime: { + readOnly: true, + serializedName: "expiryTime", + type: { + name: "DateTime" + } + }, + url: { + readOnly: true, + serializedName: "url", + type: { + name: "String" + } + } + } + } +}; + +export const ErrorDetails: msRest.CompositeMapper = { + serializedName: "ErrorDetails", + type: { + name: "Composite", + className: "ErrorDetails", + modelProperties: { + code: { + readOnly: true, + serializedName: "code", + type: { + name: "String" + } + }, + message: { + readOnly: true, + serializedName: "message", + type: { + name: "String" + } + }, + target: { + readOnly: true, + serializedName: "target", + type: { + name: "String" + } + } + } + } +}; + +export const ErrorResponse: msRest.CompositeMapper = { + serializedName: "ErrorResponse", + type: { + name: "Composite", + className: "ErrorResponse", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorDetails" + } + } + } + } +}; + +export const Amount: msRest.CompositeMapper = { + serializedName: "Amount", + type: { + name: "Composite", + className: "Amount", + modelProperties: { + currency: { + readOnly: true, + serializedName: "currency", + type: { + name: "String" + } + }, + value: { + readOnly: true, + serializedName: "value", + type: { + name: "Number" + } + } + } + } +}; + +export const DownloadProperties: msRest.CompositeMapper = { + serializedName: "DownloadProperties", + type: { + name: "Composite", + className: "DownloadProperties", + modelProperties: { + kind: { + readOnly: true, + serializedName: "kind", + type: { + name: "String" + } + }, + url: { + readOnly: true, + serializedName: "url", + type: { + name: "String" + } + } + } + } +}; + +export const PaymentProperties: msRest.CompositeMapper = { + serializedName: "PaymentProperties", + type: { + name: "Composite", + className: "PaymentProperties", + modelProperties: { + paymentType: { + readOnly: true, + serializedName: "paymentType", + type: { + name: "String" + } + }, + amount: { + readOnly: true, + serializedName: "amount", + type: { + name: "Composite", + className: "Amount" + } + }, + date: { + readOnly: true, + serializedName: "date", + type: { + name: "DateTime" + } + } + } + } +}; + +export const InvoiceSummary: msRest.CompositeMapper = { + serializedName: "InvoiceSummary", + type: { + name: "Composite", + className: "InvoiceSummary", + modelProperties: { + ...Resource.type.modelProperties, + dueDate: { + readOnly: true, + serializedName: "properties.dueDate", + type: { + name: "DateTime" + } + }, + invoiceDate: { + readOnly: true, + serializedName: "properties.invoiceDate", + type: { + name: "DateTime" + } + }, + status: { + readOnly: true, + serializedName: "properties.status", + type: { + name: "String" + } + }, + amountDue: { + readOnly: true, + serializedName: "properties.amountDue", + type: { + name: "Composite", + className: "Amount" + } + }, + billedAmount: { + readOnly: true, + serializedName: "properties.billedAmount", + type: { + name: "Composite", + className: "Amount" + } + }, + invoicePeriodStartDate: { + readOnly: true, + serializedName: "properties.invoicePeriodStartDate", + type: { + name: "DateTime" + } + }, + invoicePeriodEndDate: { + readOnly: true, + serializedName: "properties.invoicePeriodEndDate", + type: { + name: "DateTime" + } + }, + billingProfileId: { + readOnly: true, + serializedName: "properties.billingProfileId", + type: { + name: "String" + } + }, + billingProfileName: { + readOnly: true, + serializedName: "properties.billingProfileName", + type: { + name: "String" + } + }, + purchaseOrderNumber: { + readOnly: true, + serializedName: "properties.purchaseOrderNumber", + type: { + name: "String" + } + }, + documentUrls: { + readOnly: true, + serializedName: "properties.documentUrls", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DownloadProperties" + } + } + } + }, + payments: { + readOnly: true, + serializedName: "properties.payments", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PaymentProperties" + } + } + } + } + } + } +}; + +export const InvoiceListResult: msRest.CompositeMapper = { + serializedName: "InvoiceListResult", + type: { + name: "Composite", + className: "InvoiceListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "InvoiceSummary" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ProductSummary: msRest.CompositeMapper = { + serializedName: "ProductSummary", + type: { + name: "Composite", + className: "ProductSummary", + modelProperties: { + ...Resource.type.modelProperties, + displayName: { + readOnly: true, + serializedName: "properties.displayName", + type: { + name: "String" + } + }, + purchaseDate: { + readOnly: true, + serializedName: "properties.purchaseDate", + type: { + name: "DateTime" + } + }, + productTypeId: { + readOnly: true, + serializedName: "properties.productTypeId", + type: { + name: "String" + } + }, + productType: { + readOnly: true, + serializedName: "properties.productType", + type: { + name: "String" + } + }, + status: { + serializedName: "properties.status", + type: { + name: "String" + } + }, + endDate: { + readOnly: true, + serializedName: "properties.endDate", + type: { + name: "DateTime" + } + }, + billingFrequency: { + serializedName: "properties.billingFrequency", + type: { + name: "String" + } + }, + lastCharge: { + readOnly: true, + serializedName: "properties.lastCharge", + type: { + name: "Composite", + className: "Amount" + } + }, + lastChargeDate: { + readOnly: true, + serializedName: "properties.lastChargeDate", + type: { + name: "DateTime" + } + }, + quantity: { + readOnly: true, + serializedName: "properties.quantity", + type: { + name: "Number" + } + }, + skuId: { + readOnly: true, + serializedName: "properties.skuId", + type: { + name: "String" + } + }, + skuDescription: { + readOnly: true, + serializedName: "properties.skuDescription", + type: { + name: "String" + } + }, + availabilityId: { + readOnly: true, + serializedName: "properties.availabilityId", + type: { + name: "String" + } + }, + parentProductId: { + readOnly: true, + serializedName: "properties.parentProductId", + type: { + name: "String" + } + }, + invoiceSectionId: { + readOnly: true, + serializedName: "properties.invoiceSectionId", + type: { + name: "String" + } + }, + invoiceSectionName: { + readOnly: true, + serializedName: "properties.invoiceSectionName", + type: { + name: "String" + } + }, + billingProfileId: { + readOnly: true, + serializedName: "properties.billingProfileId", + type: { + name: "String" + } + }, + billingProfileName: { + readOnly: true, + serializedName: "properties.billingProfileName", + type: { + name: "String" + } + } + } + } +}; + +export const BillingSubscriptionSummary: msRest.CompositeMapper = { + serializedName: "BillingSubscriptionSummary", + type: { + name: "Composite", + className: "BillingSubscriptionSummary", + modelProperties: { + ...Resource.type.modelProperties, + displayName: { + readOnly: true, + serializedName: "properties.displayName", + type: { + name: "String" + } + }, + subscriptionId: { + readOnly: true, + serializedName: "properties.subscriptionId", + type: { + name: "Uuid" + } + }, + subscriptionBillingStatus: { + serializedName: "properties.subscriptionBillingStatus", + type: { + name: "String" + } + }, + lastMonthCharges: { + readOnly: true, + serializedName: "properties.lastMonthCharges", + type: { + name: "Composite", + className: "Amount" + } + }, + monthToDateCharges: { + readOnly: true, + serializedName: "properties.monthToDateCharges", + type: { + name: "Composite", + className: "Amount" + } + }, + billingProfileId: { + readOnly: true, + serializedName: "properties.billingProfileId", + type: { + name: "String" + } + }, + billingProfileName: { + readOnly: true, + serializedName: "properties.billingProfileName", + type: { + name: "String" + } + }, + invoiceSectionId: { + readOnly: true, + serializedName: "properties.invoiceSectionId", + type: { + name: "String" + } + }, + invoiceSectionName: { + readOnly: true, + serializedName: "properties.invoiceSectionName", + type: { + name: "String" + } + }, + skuId: { + serializedName: "properties.skuId", + type: { + name: "String" + } + }, + skuDescription: { + readOnly: true, + serializedName: "properties.skuDescription", + type: { + name: "String" + } + } + } + } +}; + +export const EnrollmentAccountContext: msRest.CompositeMapper = { + serializedName: "EnrollmentAccountContext", + type: { + name: "Composite", + className: "EnrollmentAccountContext", + modelProperties: { + costCenter: { + serializedName: "costCenter", + type: { + name: "String" + } + }, + startDate: { + serializedName: "startDate", + type: { + name: "DateTime" + } + }, + endDate: { + serializedName: "endDate", + type: { + name: "DateTime" + } + }, + enrollmentAccountName: { + serializedName: "enrollmentAccountName", + type: { + name: "String" + } + } + } + } +}; + +export const TransactionsSummary: msRest.CompositeMapper = { + serializedName: "TransactionsSummary", + type: { + name: "Composite", + className: "TransactionsSummary", + modelProperties: { + ...Resource.type.modelProperties, + kind: { + serializedName: "properties.kind", + type: { + name: "String" + } + }, + date: { + readOnly: true, + serializedName: "properties.date", + type: { + name: "DateTime" + } + }, + invoice: { + readOnly: true, + serializedName: "properties.invoice", + type: { + name: "String" + } + }, + orderId: { + readOnly: true, + serializedName: "properties.orderId", + type: { + name: "String" + } + }, + orderName: { + readOnly: true, + serializedName: "properties.orderName", + type: { + name: "String" + } + }, + productFamily: { + readOnly: true, + serializedName: "properties.productFamily", + type: { + name: "String" + } + }, + productTypeId: { + readOnly: true, + serializedName: "properties.productTypeId", + type: { + name: "String" + } + }, + productType: { + readOnly: true, + serializedName: "properties.productType", + type: { + name: "String" + } + }, + productDescription: { + readOnly: true, + serializedName: "properties.productDescription", + type: { + name: "String" + } + }, + transactionType: { + serializedName: "properties.transactionType", + type: { + name: "String" + } + }, + transactionAmount: { + readOnly: true, + serializedName: "properties.transactionAmount", + type: { + name: "Composite", + className: "Amount" + } + }, + quantity: { + readOnly: true, + serializedName: "properties.quantity", + type: { + name: "Number" + } + }, + invoiceSectionId: { + readOnly: true, + serializedName: "properties.invoiceSectionId", + type: { + name: "String" + } + }, + invoiceSectionName: { + readOnly: true, + serializedName: "properties.invoiceSectionName", + type: { + name: "String" + } + }, + billingProfileId: { + readOnly: true, + serializedName: "properties.billingProfileId", + type: { + name: "String" + } + }, + billingProfileName: { + readOnly: true, + serializedName: "properties.billingProfileName", + type: { + name: "String" + } + }, + subscriptionId: { + readOnly: true, + serializedName: "properties.subscriptionId", + type: { + name: "String" + } + }, + subscriptionName: { + readOnly: true, + serializedName: "properties.subscriptionName", + type: { + name: "String" + } + } + } + } +}; + +export const Policy: msRest.CompositeMapper = { + serializedName: "Policy", + type: { + name: "Composite", + className: "Policy", + modelProperties: { + ...Resource.type.modelProperties, + marketplacePurchasesAllowed: { + serializedName: "properties.marketplacePurchasesAllowed", + type: { + name: "Boolean" + } + }, + reservationPurchasesAllowed: { + serializedName: "properties.reservationPurchasesAllowed", + type: { + name: "Boolean" + } + }, + subscriptionOwnerCanViewCharges: { + serializedName: "properties.subscriptionOwnerCanViewCharges", + type: { + name: "Boolean" + } + } + } + } +}; + +export const AvailableBalance: msRest.CompositeMapper = { + serializedName: "AvailableBalance", + type: { + name: "Composite", + className: "AvailableBalance", + modelProperties: { + ...Resource.type.modelProperties, + amount: { + readOnly: true, + serializedName: "properties.amount", + type: { + name: "Composite", + className: "Amount" + } + } + } + } +}; + +export const PaymentMethod: msRest.CompositeMapper = { + serializedName: "PaymentMethod", + type: { + name: "Composite", + className: "PaymentMethod", + modelProperties: { + ...Resource.type.modelProperties, + paymentMethodType: { + serializedName: "properties.paymentMethodType", + type: { + name: "String" + } + }, + details: { + readOnly: true, + serializedName: "properties.details", + type: { + name: "String" + } + }, + expiration: { + readOnly: true, + serializedName: "properties.expiration", + type: { + name: "DateTime" + } + }, + currency: { + readOnly: true, + serializedName: "properties.currency", + type: { + name: "String" + } + } + } + } +}; + +export const UpdateAutoRenewRequest: msRest.CompositeMapper = { + serializedName: "UpdateAutoRenewRequest", + type: { + name: "Composite", + className: "UpdateAutoRenewRequest", + modelProperties: { + autoRenew: { + serializedName: "autoRenew", + type: { + name: "String" + } + } + } + } +}; + +export const OperationDisplay: msRest.CompositeMapper = { + serializedName: "Operation_display", + type: { + name: "Composite", + className: "OperationDisplay", + modelProperties: { + provider: { + readOnly: true, + serializedName: "provider", + type: { + name: "String" + } + }, + resource: { + readOnly: true, + serializedName: "resource", + type: { + name: "String" + } + }, + operation: { + readOnly: true, + serializedName: "operation", + type: { + name: "String" + } + } + } + } +}; + +export const Operation: msRest.CompositeMapper = { + serializedName: "Operation", + type: { + name: "Composite", + className: "Operation", + modelProperties: { + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + display: { + serializedName: "display", + type: { + name: "Composite", + className: "OperationDisplay" + } + } + } + } +}; + +export const BillingRoleAssignmentPayload: msRest.CompositeMapper = { + serializedName: "BillingRoleAssignmentPayload", + type: { + name: "Composite", + className: "BillingRoleAssignmentPayload", + modelProperties: { + principalId: { + readOnly: true, + serializedName: "principalId", + type: { + name: "String" + } + }, + billingRoleDefinitionName: { + readOnly: true, + serializedName: "billingRoleDefinitionName", + type: { + name: "String" + } + } + } + } +}; + +export const BillingRoleAssignment: msRest.CompositeMapper = { + serializedName: "BillingRoleAssignment", + type: { + name: "Composite", + className: "BillingRoleAssignment", + modelProperties: { + ...Resource.type.modelProperties, + createdOn: { + readOnly: true, + serializedName: "properties.createdOn", + type: { + name: "String" + } + }, + createdByPrincipalTenantId: { + readOnly: true, + serializedName: "properties.createdByPrincipalTenantId", + type: { + name: "String" + } + }, + createdByPrincipalId: { + readOnly: true, + serializedName: "properties.createdByPrincipalId", + type: { + name: "String" + } + }, + billingRoleAssignmentName: { + readOnly: true, + serializedName: "properties.name", + type: { + name: "String" + } + }, + principalId: { + readOnly: true, + serializedName: "properties.principalId", + type: { + name: "String" + } + }, + roleDefinitionName: { + readOnly: true, + serializedName: "properties.roleDefinitionName", + type: { + name: "String" + } + }, + scope: { + readOnly: true, + serializedName: "properties.scope", + type: { + name: "String" + } + } + } + } +}; + +export const BillingRoleAssignmentListResult: msRest.CompositeMapper = { + serializedName: "BillingRoleAssignmentListResult", + type: { + name: "Composite", + className: "BillingRoleAssignmentListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BillingRoleAssignment" + } + } + } + } + } + } +}; + +export const 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: { + value: { + readOnly: true, + 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" + } + }, + value: { + readOnly: true, + serializedName: "properties.permissions.value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BillingPermissions" + } + } + } + }, + roleName: { + readOnly: true, + serializedName: "properties.roleName", + type: { + name: "String" + } + } + } + } +}; + +export const BillingRoleDefinitionListResult: msRest.CompositeMapper = { + serializedName: "BillingRoleDefinitionListResult", + type: { + name: "Composite", + className: "BillingRoleDefinitionListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BillingRoleDefinition" + } + } + } + } + } + } +}; + +export const Participants: msRest.CompositeMapper = { + serializedName: "Participants", + type: { + name: "Composite", + className: "Participants", + modelProperties: { + status: { + readOnly: true, + serializedName: "status", + type: { + name: "String" + } + }, + statusDate: { + readOnly: true, + serializedName: "statusDate", + type: { + name: "DateTime" + } + }, + email: { + readOnly: true, + serializedName: "email", + type: { + name: "String" + } + } + } + } +}; + +export const Agreement: msRest.CompositeMapper = { + serializedName: "Agreement", + type: { + name: "Composite", + className: "Agreement", + modelProperties: { + ...Resource.type.modelProperties, + agreementLink: { + readOnly: true, + serializedName: "properties.agreementLink", + type: { + name: "String" + } + }, + effectiveDate: { + readOnly: true, + serializedName: "properties.effectiveDate", + type: { + name: "DateTime" + } + }, + expirationDate: { + readOnly: true, + serializedName: "properties.expirationDate", + type: { + name: "DateTime" + } + }, + participants: { + serializedName: "properties.participants", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Participants" + } + } + } + }, + status: { + readOnly: true, + serializedName: "properties.status", + type: { + name: "String" + } + } + } + } +}; + +export const AgreementListResult: msRest.CompositeMapper = { + serializedName: "AgreementListResult", + type: { + name: "Composite", + className: "AgreementListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Agreement" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const BillingProfilesUpdateHeaders: msRest.CompositeMapper = { + serializedName: "billingprofiles-update-headers", + type: { + name: "Composite", + className: "BillingProfilesUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + 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" + } + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number" + } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const InvoiceSectionsUpdateHeaders: msRest.CompositeMapper = { + serializedName: "invoicesections-update-headers", + type: { + name: "Composite", + className: "InvoiceSectionsUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "String" + } + } + } + } +}; + +export const InvoicePricesheetDownloadHeaders: msRest.CompositeMapper = { + serializedName: "invoicepricesheet-download-headers", + type: { + name: "Composite", + className: "InvoicePricesheetDownloadHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "String" + } + }, + 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: "Number" + } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const PaymentMethodsListResult: msRest.CompositeMapper = { + serializedName: "PaymentMethodsListResult", + type: { + name: "Composite", + className: "PaymentMethodsListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PaymentMethod" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const BillingSubscriptionsListResult: msRest.CompositeMapper = { + serializedName: "BillingSubscriptionsListResult", + type: { + name: "Composite", + className: "BillingSubscriptionsListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BillingSubscriptionSummary" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ProductsListResult: msRest.CompositeMapper = { + serializedName: "ProductsListResult", + type: { + name: "Composite", + className: "ProductsListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ProductSummary" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const TransactionsListResult: msRest.CompositeMapper = { + serializedName: "TransactionsListResult", + type: { + name: "Composite", + className: "TransactionsListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TransactionsSummary" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const TransferDetailsListResult: msRest.CompositeMapper = { + serializedName: "TransferDetailsListResult", + type: { + name: "Composite", + className: "TransferDetailsListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TransferDetails" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const RecipientTransferDetailsListResult: msRest.CompositeMapper = { + serializedName: "RecipientTransferDetailsListResult", + type: { + name: "Composite", + className: "RecipientTransferDetailsListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RecipientTransferDetails" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const OperationListResult: msRest.CompositeMapper = { + serializedName: "OperationListResult", + type: { + name: "Composite", + className: "OperationListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Operation" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; diff --git a/sdk/billing/arm-billing/lib/models/operationsMappers.ts b/sdk/billing/arm-billing/lib/models/operationsMappers.ts new file mode 100644 index 000000000000..22478f5be09f --- /dev/null +++ b/sdk/billing/arm-billing/lib/models/operationsMappers.ts @@ -0,0 +1,18 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + OperationListResult, + Operation, + OperationDisplay, + ErrorResponse, + ErrorDetails +} from "../models/mappers"; + diff --git a/sdk/billing/arm-billing/lib/models/parameters.ts b/sdk/billing/arm-billing/lib/models/parameters.ts new file mode 100644 index 000000000000..3ee079a125b8 --- /dev/null +++ b/sdk/billing/arm-billing/lib/models/parameters.ts @@ -0,0 +1,237 @@ +/* + * 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"; + +export const acceptLanguage: msRest.OperationParameter = { + parameterPath: "acceptLanguage", + mapper: { + serializedName: "accept-language", + defaultValue: 'en-US', + type: { + name: "String" + } + } +}; +export const agreementName: msRest.OperationURLParameter = { + parameterPath: "agreementName", + mapper: { + required: true, + serializedName: "agreementName", + type: { + name: "String" + } + } +}; +export const apiVersion: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + serializedName: "api-version", + type: { + name: "String" + } + } +}; +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: "enrollmentAccountName", + type: { + name: "String" + } + } +}; +export const expand: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "expand" + ], + mapper: { + serializedName: "$expand", + type: { + name: "String" + } + } +}; +export const filter: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "filter" + ], + mapper: { + serializedName: "$filter", + type: { + name: "String" + } + } +}; +export const invoiceName: msRest.OperationURLParameter = { + parameterPath: "invoiceName", + mapper: { + required: true, + serializedName: "invoiceName", + type: { + name: "String" + } + } +}; +export const invoiceSectionName: msRest.OperationURLParameter = { + parameterPath: "invoiceSectionName", + mapper: { + required: true, + serializedName: "invoiceSectionName", + type: { + name: "String" + } + } +}; +export const nextPageLink: msRest.OperationURLParameter = { + parameterPath: "nextPageLink", + mapper: { + required: true, + serializedName: "nextLink", + type: { + name: "String" + } + }, + skipEncoding: true +}; +export const periodEndDate: msRest.OperationQueryParameter = { + parameterPath: "periodEndDate", + mapper: { + required: true, + serializedName: "periodEndDate", + type: { + name: "String" + } + } +}; +export const periodStartDate: msRest.OperationQueryParameter = { + parameterPath: "periodStartDate", + mapper: { + required: true, + serializedName: "periodStartDate", + type: { + name: "String" + } + } +}; +export const productName: msRest.OperationURLParameter = { + parameterPath: "productName", + mapper: { + required: true, + serializedName: "productName", + type: { + name: "String" + } + } +}; +export const startDate: msRest.OperationQueryParameter = { + parameterPath: "startDate", + mapper: { + required: true, + serializedName: "startDate", + type: { + name: "String" + } + } +}; +export const subscriptionId: msRest.OperationURLParameter = { + parameterPath: "subscriptionId", + mapper: { + required: true, + serializedName: "subscriptionId", + type: { + name: "String" + } + } +}; +export const transferName: msRest.OperationURLParameter = { + parameterPath: "transferName", + mapper: { + required: true, + serializedName: "transferName", + type: { + name: "String" + } + } +}; diff --git a/sdk/billing/arm-billing/lib/models/paymentMethodsByBillingProfileMappers.ts b/sdk/billing/arm-billing/lib/models/paymentMethodsByBillingProfileMappers.ts new file mode 100644 index 000000000000..7e06d77f964c --- /dev/null +++ b/sdk/billing/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, + BillingProperty, + InvoiceSummary, + Amount, + DownloadProperties, + PaymentProperties, + ProductSummary, + BillingSubscriptionSummary, + TransactionsSummary, + Policy, + AvailableBalance, + BillingRoleAssignment, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/sdk/billing/arm-billing/lib/models/policyOperationsMappers.ts b/sdk/billing/arm-billing/lib/models/policyOperationsMappers.ts new file mode 100644 index 000000000000..d3512faba8d0 --- /dev/null +++ b/sdk/billing/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, + BillingProperty, + InvoiceSummary, + Amount, + DownloadProperties, + PaymentProperties, + ProductSummary, + BillingSubscriptionSummary, + TransactionsSummary, + AvailableBalance, + PaymentMethod, + BillingRoleAssignment, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/sdk/billing/arm-billing/lib/models/productsByBillingAccountMappers.ts b/sdk/billing/arm-billing/lib/models/productsByBillingAccountMappers.ts new file mode 100644 index 000000000000..2d9283701ce9 --- /dev/null +++ b/sdk/billing/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, + BillingProperty, + InvoiceSummary, + DownloadProperties, + PaymentProperties, + BillingSubscriptionSummary, + TransactionsSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleAssignment, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/sdk/billing/arm-billing/lib/models/productsByBillingSubscriptionsMappers.ts b/sdk/billing/arm-billing/lib/models/productsByBillingSubscriptionsMappers.ts new file mode 100644 index 000000000000..a9f318b83be1 --- /dev/null +++ b/sdk/billing/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, + ErrorResponse, + ErrorDetails, + BillingProfile, + Address, + EnabledAzureSKUs, + InvoiceSection, + EnrollmentAccount, + Department, + BillingAccount, + Enrollment, + EnrollmentPolicies, + BillingProperty, + InvoiceSummary, + DownloadProperties, + PaymentProperties, + ProductSummary, + TransactionsSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleAssignment, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/sdk/billing/arm-billing/lib/models/productsByInvoiceSectionMappers.ts b/sdk/billing/arm-billing/lib/models/productsByInvoiceSectionMappers.ts new file mode 100644 index 000000000000..2d9283701ce9 --- /dev/null +++ b/sdk/billing/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, + BillingProperty, + InvoiceSummary, + DownloadProperties, + PaymentProperties, + BillingSubscriptionSummary, + TransactionsSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleAssignment, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/sdk/billing/arm-billing/lib/models/productsMappers.ts b/sdk/billing/arm-billing/lib/models/productsMappers.ts new file mode 100644 index 000000000000..1a77d60c5443 --- /dev/null +++ b/sdk/billing/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, + BillingProperty, + InvoiceSummary, + DownloadProperties, + PaymentProperties, + BillingSubscriptionSummary, + TransactionsSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleAssignment, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/sdk/billing/arm-billing/lib/models/recipientTransfersMappers.ts b/sdk/billing/arm-billing/lib/models/recipientTransfersMappers.ts new file mode 100644 index 000000000000..e82e7a6b653a --- /dev/null +++ b/sdk/billing/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/sdk/billing/arm-billing/lib/models/transactionsByBillingAccountMappers.ts b/sdk/billing/arm-billing/lib/models/transactionsByBillingAccountMappers.ts new file mode 100644 index 000000000000..6f28a1f70567 --- /dev/null +++ b/sdk/billing/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, + BillingProperty, + InvoiceSummary, + DownloadProperties, + PaymentProperties, + ProductSummary, + BillingSubscriptionSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleAssignment, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/sdk/billing/arm-billing/lib/models/transactionsByBillingProfileMappers.ts b/sdk/billing/arm-billing/lib/models/transactionsByBillingProfileMappers.ts new file mode 100644 index 000000000000..6f28a1f70567 --- /dev/null +++ b/sdk/billing/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, + BillingProperty, + InvoiceSummary, + DownloadProperties, + PaymentProperties, + ProductSummary, + BillingSubscriptionSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleAssignment, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/sdk/billing/arm-billing/lib/models/transactionsByInvoiceSectionMappers.ts b/sdk/billing/arm-billing/lib/models/transactionsByInvoiceSectionMappers.ts new file mode 100644 index 000000000000..6f28a1f70567 --- /dev/null +++ b/sdk/billing/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, + BillingProperty, + InvoiceSummary, + DownloadProperties, + PaymentProperties, + ProductSummary, + BillingSubscriptionSummary, + Policy, + AvailableBalance, + PaymentMethod, + BillingRoleAssignment, + BillingRoleDefinition, + BillingPermissions, + Agreement, + Participants +} from "../models/mappers"; + diff --git a/sdk/billing/arm-billing/lib/models/transfersMappers.ts b/sdk/billing/arm-billing/lib/models/transfersMappers.ts new file mode 100644 index 000000000000..28829cd4f4a5 --- /dev/null +++ b/sdk/billing/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/sdk/billing/arm-billing/lib/operations/agreements.ts b/sdk/billing/arm-billing/lib/operations/agreements.ts new file mode 100644 index 000000000000..5720473ce9e3 --- /dev/null +++ b/sdk/billing/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/sdk/billing/arm-billing/lib/operations/availableBalanceByBillingProfile.ts b/sdk/billing/arm-billing/lib/operations/availableBalanceByBillingProfile.ts new file mode 100644 index 000000000000..28757a549921 --- /dev/null +++ b/sdk/billing/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/sdk/billing/arm-billing/lib/operations/billingAccountBillingPermissions.ts b/sdk/billing/arm-billing/lib/operations/billingAccountBillingPermissions.ts new file mode 100644 index 000000000000..955eef929cff --- /dev/null +++ b/sdk/billing/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/sdk/billing/arm-billing/lib/operations/billingAccountBillingRoleAssignment.ts b/sdk/billing/arm-billing/lib/operations/billingAccountBillingRoleAssignment.ts new file mode 100644 index 000000000000..37180c0869c0 --- /dev/null +++ b/sdk/billing/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/sdk/billing/arm-billing/lib/operations/billingAccountBillingRoleDefinition.ts b/sdk/billing/arm-billing/lib/operations/billingAccountBillingRoleDefinition.ts new file mode 100644 index 000000000000..ce9f42e25726 --- /dev/null +++ b/sdk/billing/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/sdk/billing/arm-billing/lib/operations/billingAccounts.ts b/sdk/billing/arm-billing/lib/operations/billingAccounts.ts new file mode 100644 index 000000000000..014594f2eadd --- /dev/null +++ b/sdk/billing/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/sdk/billing/arm-billing/lib/operations/billingProfileBillingPermissions.ts b/sdk/billing/arm-billing/lib/operations/billingProfileBillingPermissions.ts new file mode 100644 index 000000000000..cbefe7652a91 --- /dev/null +++ b/sdk/billing/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/sdk/billing/arm-billing/lib/operations/billingProfileBillingRoleAssignment.ts b/sdk/billing/arm-billing/lib/operations/billingProfileBillingRoleAssignment.ts new file mode 100644 index 000000000000..68106f58b8a3 --- /dev/null +++ b/sdk/billing/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/sdk/billing/arm-billing/lib/operations/billingProfileBillingRoleDefinition.ts b/sdk/billing/arm-billing/lib/operations/billingProfileBillingRoleDefinition.ts new file mode 100644 index 000000000000..1bc8d25a1b62 --- /dev/null +++ b/sdk/billing/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/sdk/billing/arm-billing/lib/operations/billingProfiles.ts b/sdk/billing/arm-billing/lib/operations/billingProfiles.ts new file mode 100644 index 000000000000..51d99eff1986 --- /dev/null +++ b/sdk/billing/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/sdk/billing/arm-billing/lib/operations/billingProfilesByBillingAccountName.ts b/sdk/billing/arm-billing/lib/operations/billingProfilesByBillingAccountName.ts new file mode 100644 index 000000000000..74a1a4d4bf67 --- /dev/null +++ b/sdk/billing/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/sdk/billing/arm-billing/lib/operations/billingPropertyOperations.ts b/sdk/billing/arm-billing/lib/operations/billingPropertyOperations.ts new file mode 100644 index 000000000000..7c8adf3a902a --- /dev/null +++ b/sdk/billing/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/sdk/billing/arm-billing/lib/operations/billingSubscription.ts b/sdk/billing/arm-billing/lib/operations/billingSubscription.ts new file mode 100644 index 000000000000..697e4b39b5d0 --- /dev/null +++ b/sdk/billing/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/sdk/billing/arm-billing/lib/operations/billingSubscriptionsByBillingProfile.ts b/sdk/billing/arm-billing/lib/operations/billingSubscriptionsByBillingProfile.ts new file mode 100644 index 000000000000..f950bc2e3dcd --- /dev/null +++ b/sdk/billing/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}/billingProfiles/{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/sdk/billing/arm-billing/lib/operations/billingSubscriptionsByInvoiceSection.ts b/sdk/billing/arm-billing/lib/operations/billingSubscriptionsByInvoiceSection.ts new file mode 100644 index 000000000000..325c542fc956 --- /dev/null +++ b/sdk/billing/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/sdk/billing/arm-billing/lib/operations/departments.ts b/sdk/billing/arm-billing/lib/operations/departments.ts new file mode 100644 index 000000000000..c2327b0cface --- /dev/null +++ b/sdk/billing/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/sdk/billing/arm-billing/lib/operations/departmentsByBillingAccountName.ts b/sdk/billing/arm-billing/lib/operations/departmentsByBillingAccountName.ts new file mode 100644 index 000000000000..d43f12d9e096 --- /dev/null +++ b/sdk/billing/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/sdk/billing/arm-billing/lib/operations/enrollmentAccounts.ts b/sdk/billing/arm-billing/lib/operations/enrollmentAccounts.ts new file mode 100644 index 000000000000..b538827ab58a --- /dev/null +++ b/sdk/billing/arm-billing/lib/operations/enrollmentAccounts.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/enrollmentAccountsMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a EnrollmentAccounts. */ +export class EnrollmentAccounts { + private readonly client: BillingManagementClientContext; + + /** + * Create a EnrollmentAccounts. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * Get the enrollment account by id. + * @param billingAccountName billing Account Id. + * @param enrollmentAccountName Enrollment Account Id. + * @param [options] The optional parameters + * @returns Promise + */ + getByEnrollmentAccountAccountId(billingAccountName: string, enrollmentAccountName: string, options?: Models.EnrollmentAccountsGetByEnrollmentAccountAccountIdOptionalParams): Promise; + /** + * @param billingAccountName billing Account Id. + * @param enrollmentAccountName Enrollment Account Id. + * @param callback The callback + */ + 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 + */ + 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 + }, + getByEnrollmentAccountAccountIdOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getByEnrollmentAccountAccountIdOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/enrollmentAccounts/{enrollmentAccountName}", + urlParameters: [ + Parameters.billingAccountName, + Parameters.enrollmentAccountName + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.expand, + Parameters.filter + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.EnrollmentAccount + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/billing/arm-billing/lib/operations/enrollmentAccountsByBillingAccountName.ts b/sdk/billing/arm-billing/lib/operations/enrollmentAccountsByBillingAccountName.ts new file mode 100644 index 000000000000..73160f9fcf16 --- /dev/null +++ b/sdk/billing/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/sdk/billing/arm-billing/lib/operations/index.ts b/sdk/billing/arm-billing/lib/operations/index.ts new file mode 100644 index 000000000000..2d3bef625f93 --- /dev/null +++ b/sdk/billing/arm-billing/lib/operations/index.ts @@ -0,0 +1,51 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export * from "./billingAccounts"; +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 "./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/sdk/billing/arm-billing/lib/operations/invoice.ts b/sdk/billing/arm-billing/lib/operations/invoice.ts new file mode 100644 index 000000000000..6a2d26f96e24 --- /dev/null +++ b/sdk/billing/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/sdk/billing/arm-billing/lib/operations/invoicePricesheet.ts b/sdk/billing/arm-billing/lib/operations/invoicePricesheet.ts new file mode 100644 index 000000000000..0eb61e1a2093 --- /dev/null +++ b/sdk/billing/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/sdk/billing/arm-billing/lib/operations/invoiceSectionBillingRoleAssignment.ts b/sdk/billing/arm-billing/lib/operations/invoiceSectionBillingRoleAssignment.ts new file mode 100644 index 000000000000..e195299a3f8d --- /dev/null +++ b/sdk/billing/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/sdk/billing/arm-billing/lib/operations/invoiceSectionBillingRoleDefinition.ts b/sdk/billing/arm-billing/lib/operations/invoiceSectionBillingRoleDefinition.ts new file mode 100644 index 000000000000..4eb080887ccb --- /dev/null +++ b/sdk/billing/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/sdk/billing/arm-billing/lib/operations/invoiceSections.ts b/sdk/billing/arm-billing/lib/operations/invoiceSections.ts new file mode 100644 index 000000000000..0ce9b72aa7a1 --- /dev/null +++ b/sdk/billing/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/sdk/billing/arm-billing/lib/operations/invoiceSectionsBillingPermissions.ts b/sdk/billing/arm-billing/lib/operations/invoiceSectionsBillingPermissions.ts new file mode 100644 index 000000000000..cc925b808a9e --- /dev/null +++ b/sdk/billing/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/sdk/billing/arm-billing/lib/operations/invoiceSectionsByBillingAccountName.ts b/sdk/billing/arm-billing/lib/operations/invoiceSectionsByBillingAccountName.ts new file mode 100644 index 000000000000..89447ce6ac32 --- /dev/null +++ b/sdk/billing/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/sdk/billing/arm-billing/lib/operations/invoiceSectionsWithCreateSubscriptionPermission.ts b/sdk/billing/arm-billing/lib/operations/invoiceSectionsWithCreateSubscriptionPermission.ts new file mode 100644 index 000000000000..b1e19c2fa997 --- /dev/null +++ b/sdk/billing/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/sdk/billing/arm-billing/lib/operations/invoicesByBillingAccount.ts b/sdk/billing/arm-billing/lib/operations/invoicesByBillingAccount.ts new file mode 100644 index 000000000000..9151cb928baa --- /dev/null +++ b/sdk/billing/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/sdk/billing/arm-billing/lib/operations/invoicesByBillingProfile.ts b/sdk/billing/arm-billing/lib/operations/invoicesByBillingProfile.ts new file mode 100644 index 000000000000..cc682635d12f --- /dev/null +++ b/sdk/billing/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/sdk/billing/arm-billing/lib/operations/operations.ts b/sdk/billing/arm-billing/lib/operations/operations.ts new file mode 100644 index 000000000000..c146d47b7560 --- /dev/null +++ b/sdk/billing/arm-billing/lib/operations/operations.ts @@ -0,0 +1,123 @@ +/* + * 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/operationsMappers"; +import * as Parameters from "../models/parameters"; +import { BillingManagementClientContext } from "../billingManagementClientContext"; + +/** Class representing a Operations. */ +export class Operations { + private readonly client: BillingManagementClientContext; + + /** + * Create a Operations. + * @param {BillingManagementClientContext} client Reference to the service client. + */ + constructor(client: BillingManagementClientContext) { + this.client = client; + } + + /** + * Lists all of the available billing REST API operations. + * @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; + } + + /** + * Lists all of the available billing REST API operations. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + 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/operations", + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.OperationListResult + }, + 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.OperationListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/billing/arm-billing/lib/operations/paymentMethodsByBillingProfile.ts b/sdk/billing/arm-billing/lib/operations/paymentMethodsByBillingProfile.ts new file mode 100644 index 000000000000..a3148a2a8416 --- /dev/null +++ b/sdk/billing/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/sdk/billing/arm-billing/lib/operations/policyOperations.ts b/sdk/billing/arm-billing/lib/operations/policyOperations.ts new file mode 100644 index 000000000000..8c8468da935d --- /dev/null +++ b/sdk/billing/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/sdk/billing/arm-billing/lib/operations/products.ts b/sdk/billing/arm-billing/lib/operations/products.ts new file mode 100644 index 000000000000..d9ea2d5cece0 --- /dev/null +++ b/sdk/billing/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/sdk/billing/arm-billing/lib/operations/productsByBillingAccount.ts b/sdk/billing/arm-billing/lib/operations/productsByBillingAccount.ts new file mode 100644 index 000000000000..27357a3e6720 --- /dev/null +++ b/sdk/billing/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/sdk/billing/arm-billing/lib/operations/productsByBillingSubscriptions.ts b/sdk/billing/arm-billing/lib/operations/productsByBillingSubscriptions.ts new file mode 100644 index 000000000000..8625f396e3a0 --- /dev/null +++ b/sdk/billing/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/sdk/billing/arm-billing/lib/operations/productsByInvoiceSection.ts b/sdk/billing/arm-billing/lib/operations/productsByInvoiceSection.ts new file mode 100644 index 000000000000..f7615a1ae217 --- /dev/null +++ b/sdk/billing/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/sdk/billing/arm-billing/lib/operations/recipientTransfers.ts b/sdk/billing/arm-billing/lib/operations/recipientTransfers.ts new file mode 100644 index 000000000000..ceacc47f428c --- /dev/null +++ b/sdk/billing/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/sdk/billing/arm-billing/lib/operations/transactionsByBillingAccount.ts b/sdk/billing/arm-billing/lib/operations/transactionsByBillingAccount.ts new file mode 100644 index 000000000000..c9fd05171565 --- /dev/null +++ b/sdk/billing/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/sdk/billing/arm-billing/lib/operations/transactionsByBillingProfile.ts b/sdk/billing/arm-billing/lib/operations/transactionsByBillingProfile.ts new file mode 100644 index 000000000000..741ab8e4f4b8 --- /dev/null +++ b/sdk/billing/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/sdk/billing/arm-billing/lib/operations/transactionsByInvoiceSection.ts b/sdk/billing/arm-billing/lib/operations/transactionsByInvoiceSection.ts new file mode 100644 index 000000000000..2a364fc2739a --- /dev/null +++ b/sdk/billing/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/sdk/billing/arm-billing/lib/operations/transfers.ts b/sdk/billing/arm-billing/lib/operations/transfers.ts new file mode 100644 index 000000000000..e7acf7626c2b --- /dev/null +++ b/sdk/billing/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/sdk/billing/arm-billing/package.json b/sdk/billing/arm-billing/package.json index 4c2a277cba40..e1af0902b7fe 100644 --- a/sdk/billing/arm-billing/package.json +++ b/sdk/billing/arm-billing/package.json @@ -4,8 +4,8 @@ "description": "BillingManagementClient Library with typescript type definitions for node.js and browser.", "version": "2.2.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.1.0", - "@azure/ms-rest-js": "^1.1.0", + "@azure/ms-rest-azure-js": "^1.2.0", + "@azure/ms-rest-js": "^1.2.0", "tslib": "^1.9.3" }, "keywords": [ @@ -23,9 +23,10 @@ "typescript": "^3.1.1", "rollup": "^0.66.2", "rollup-plugin-node-resolve": "^3.4.0", + "rollup-plugin-sourcemaps": "^0.4.2", "uglify-js": "^3.4.9" }, - "homepage": "https://github.com/azure/azure-sdk-for-js/tree/master/sdk/billing/arm-billing", + "homepage": "https://github.com/azure/azure-sdk-for-js", "repository": { "type": "git", "url": "https://github.com/azure/azure-sdk-for-js.git" @@ -42,7 +43,7 @@ "esm/**/*.js.map", "esm/**/*.d.ts", "esm/**/*.d.ts.map", - "src/**/*.ts", + "lib/**/*.ts", "rollup.config.js", "tsconfig.json" ], @@ -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/sdk/billing/arm-billing/rollup.config.js b/sdk/billing/arm-billing/rollup.config.js index ae6725122752..75249006e750 100644 --- a/sdk/billing/arm-billing/rollup.config.js +++ b/sdk/billing/arm-billing/rollup.config.js @@ -1,10 +1,16 @@ +import rollup from "rollup"; import nodeResolve from "rollup-plugin-node-resolve"; +import sourcemaps from "rollup-plugin-sourcemaps"; + /** - * @type {import('rollup').RollupFileOptions} + * @type {rollup.RollupFileOptions} */ const config = { - input: './esm/billingManagementClient.js', - external: ["@azure/ms-rest-js", "@azure/ms-rest-azure-js"], + input: "./esm/billingManagementClient.js", + external: [ + "@azure/ms-rest-js", + "@azure/ms-rest-azure-js" + ], output: { file: "./dist/arm-billing.js", format: "umd", @@ -16,16 +22,16 @@ const config = { }, banner: `/* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */` }, plugins: [ - nodeResolve({ module: true }) + nodeResolve({ module: true }), + sourcemaps() ] }; + export default config; diff --git a/sdk/billing/arm-billing/tsconfig.json b/sdk/billing/arm-billing/tsconfig.json index 87bbf5b5fa49..51ea90961ce5 100644 --- a/sdk/billing/arm-billing/tsconfig.json +++ b/sdk/billing/arm-billing/tsconfig.json @@ -14,6 +14,6 @@ "outDir": "./esm", "importHelpers": true }, - "include": ["./src/**/*.ts"], + "include": ["./lib/**/*.ts"], "exclude": ["node_modules"] }