"use strict";
/* tslint:disable */
/* eslint-disable */
/**
 * Admin API
 * The Admin API is used to manage the ApeCloud platform.
 *
 * The version of the OpenAPI document: 1.0.0
 * Contact: support@apecloud.com
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.AccountApi = exports.AccountApiFactory = exports.AccountApiFp = exports.AccountApiAxiosParamCreator = void 0;
const axios_1 = __importDefault(require("axios"));
// Some imports not used depending on template conditions
// @ts-ignore
const common_1 = require("../common");
// @ts-ignore
const base_1 = require("../base");
/**
 * AccountApi - axios parameter creator
 * @export
 */
const AccountApiAxiosParamCreator = function (configuration) {
    return {
        /**
         * create an account in cluster
         * @summary Create cluster account
         * @param {string} engineName name of the engine
         * @param {string} orgName name of the organization
         * @param {string} clusterName name of the cluster
         * @param {Account} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createAccount: async (engineName, orgName, clusterName, body, options = {}) => {
            // verify required parameter 'engineName' is not null or undefined
            (0, common_1.assertParamExists)('createAccount', 'engineName', engineName);
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('createAccount', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('createAccount', 'clusterName', clusterName);
            // verify required parameter 'body' is not null or undefined
            (0, common_1.assertParamExists)('createAccount', 'body', body);
            const localVarPath = `/admin/v1/data/{engineName}/organizations/{orgName}/clusters/{clusterName}/accounts`
                .replace(`{${"engineName"}}`, encodeURIComponent(String(engineName)))
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            localVarHeaderParameter['Content-Type'] = 'application/json';
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * create an account in mongodb
         * @summary Create mongodb account
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the Cluster
         * @param {Account} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createMongoDBAccount: async (orgName, clusterName, body, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('createMongoDBAccount', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('createMongoDBAccount', 'clusterName', clusterName);
            // verify required parameter 'body' is not null or undefined
            (0, common_1.assertParamExists)('createMongoDBAccount', 'body', body);
            const localVarPath = `/admin/v1/data/mongodb/organizations/{orgName}/clusters/{clusterName}/accounts`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            localVarHeaderParameter['Content-Type'] = 'application/json';
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Create a new RabbitMQ account
         * @summary Create RabbitMQ account
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the Cluster
         * @param {RbmqAccountRequest} rbmqAccountRequest
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createRabbitAccount: async (orgName, clusterName, rbmqAccountRequest, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('createRabbitAccount', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('createRabbitAccount', 'clusterName', clusterName);
            // verify required parameter 'rbmqAccountRequest' is not null or undefined
            (0, common_1.assertParamExists)('createRabbitAccount', 'rbmqAccountRequest', rbmqAccountRequest);
            const localVarPath = `/admin/v1/data/rabbitmq/organizations/{orgName}/clusters/{clusterName}/accounts`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            localVarHeaderParameter['Content-Type'] = 'application/json';
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(rbmqAccountRequest, localVarRequestOptions, configuration);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * delete an account in cluster
         * @summary Delete cluster account
         * @param {string} engineName name of the engine
         * @param {string} orgName name of the organization
         * @param {string} clusterName name of the cluster
         * @param {string} accountName name of the account
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteAccount: async (engineName, orgName, clusterName, accountName, options = {}) => {
            // verify required parameter 'engineName' is not null or undefined
            (0, common_1.assertParamExists)('deleteAccount', 'engineName', engineName);
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('deleteAccount', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('deleteAccount', 'clusterName', clusterName);
            // verify required parameter 'accountName' is not null or undefined
            (0, common_1.assertParamExists)('deleteAccount', 'accountName', accountName);
            const localVarPath = `/admin/v1/data/{engineName}/organizations/{orgName}/clusters/{clusterName}/accounts/{accountName}`
                .replace(`{${"engineName"}}`, encodeURIComponent(String(engineName)))
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)))
                .replace(`{${"accountName"}}`, encodeURIComponent(String(accountName)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * delete an account in mongodb
         * @summary Delete mongodb account
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the Cluster
         * @param {string} accountName name of the Cluster
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteMongoDBAccount: async (orgName, clusterName, accountName, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('deleteMongoDBAccount', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('deleteMongoDBAccount', 'clusterName', clusterName);
            // verify required parameter 'accountName' is not null or undefined
            (0, common_1.assertParamExists)('deleteMongoDBAccount', 'accountName', accountName);
            const localVarPath = `/admin/v1/data/mongodb/organizations/{orgName}/clusters/{clusterName}/accounts/{accountName}`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)))
                .replace(`{${"accountName"}}`, encodeURIComponent(String(accountName)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         *
         * @summary delete mssql account compatible with windows account
         * @param {string} orgName name of the organization
         * @param {string} clusterName name of the cluster
         * @param {string} account name of the account
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteMssqlAccount: async (orgName, clusterName, account, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('deleteMssqlAccount', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('deleteMssqlAccount', 'clusterName', clusterName);
            // verify required parameter 'account' is not null or undefined
            (0, common_1.assertParamExists)('deleteMssqlAccount', 'account', account);
            const localVarPath = `/admin/v1/data/mssql/organizations/{orgName}/clusters/{clusterName}/accounts`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            if (account !== undefined) {
                localVarQueryParameter['account'] = account;
            }
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Delete a RabbitMQ account
         * @summary Delete RabbitMQ account
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the Cluster
         * @param {string} accountName name of the Account
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteRabbitAccount: async (orgName, clusterName, accountName, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('deleteRabbitAccount', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('deleteRabbitAccount', 'clusterName', clusterName);
            // verify required parameter 'accountName' is not null or undefined
            (0, common_1.assertParamExists)('deleteRabbitAccount', 'accountName', accountName);
            const localVarPath = `/admin/v1/data/rabbitmq/organizations/{orgName}/clusters/{clusterName}/accounts/{accountName}`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)))
                .replace(`{${"accountName"}}`, encodeURIComponent(String(accountName)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * get root account password
         * @summary get root account password
         * @param {string} engineName name of the engine
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the Cluster
         * @param {string} accountName name of the account
         * @param {string} [component] name of the component
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getRootAccountPassword: async (engineName, orgName, clusterName, accountName, component, options = {}) => {
            // verify required parameter 'engineName' is not null or undefined
            (0, common_1.assertParamExists)('getRootAccountPassword', 'engineName', engineName);
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('getRootAccountPassword', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('getRootAccountPassword', 'clusterName', clusterName);
            // verify required parameter 'accountName' is not null or undefined
            (0, common_1.assertParamExists)('getRootAccountPassword', 'accountName', accountName);
            const localVarPath = `/admin/v1/data/{engineName}/organizations/{orgName}/clusters/{clusterName}/root-password`
                .replace(`{${"engineName"}}`, encodeURIComponent(String(engineName)))
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            if (accountName !== undefined) {
                localVarQueryParameter['accountName'] = accountName;
            }
            if (component !== undefined) {
                localVarQueryParameter['component'] = component;
            }
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * list accounts in cluster
         * @summary List cluster accounts
         * @param {string} engineName name of the engine
         * @param {string} orgName name of the organization
         * @param {string} clusterName name of the cluster
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listAccounts: async (engineName, orgName, clusterName, options = {}) => {
            // verify required parameter 'engineName' is not null or undefined
            (0, common_1.assertParamExists)('listAccounts', 'engineName', engineName);
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('listAccounts', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('listAccounts', 'clusterName', clusterName);
            const localVarPath = `/admin/v1/data/{engineName}/organizations/{orgName}/clusters/{clusterName}/accounts`
                .replace(`{${"engineName"}}`, encodeURIComponent(String(engineName)))
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * list accounts in mongodb
         * @summary List mongodb accounts
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the Cluster
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listMongoDBAccounts: async (orgName, clusterName, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('listMongoDBAccounts', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('listMongoDBAccounts', 'clusterName', clusterName);
            const localVarPath = `/admin/v1/data/mongodb/organizations/{orgName}/clusters/{clusterName}/accounts`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * List all RabbitMQ accounts
         * @summary List RabbitMQ accounts
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the Cluster
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listRabbitAccounts: async (orgName, clusterName, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('listRabbitAccounts', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('listRabbitAccounts', 'clusterName', clusterName);
            const localVarPath = `/admin/v1/data/rabbitmq/organizations/{orgName}/clusters/{clusterName}/accounts`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * lock an account in cluster
         * @summary Lock cluster account
         * @param {string} engineName name of the engine
         * @param {string} orgName name of the organization
         * @param {string} clusterName name of the cluster
         * @param {string} accountName name of the account
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        lockAccount: async (engineName, orgName, clusterName, accountName, options = {}) => {
            // verify required parameter 'engineName' is not null or undefined
            (0, common_1.assertParamExists)('lockAccount', 'engineName', engineName);
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('lockAccount', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('lockAccount', 'clusterName', clusterName);
            // verify required parameter 'accountName' is not null or undefined
            (0, common_1.assertParamExists)('lockAccount', 'accountName', accountName);
            const localVarPath = `/admin/v1/data/{engineName}/organizations/{orgName}/clusters/{clusterName}/accounts/{accountName}/lock`
                .replace(`{${"engineName"}}`, encodeURIComponent(String(engineName)))
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)))
                .replace(`{${"accountName"}}`, encodeURIComponent(String(accountName)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * unlock an account in cluster
         * @summary Unlock cluster account
         * @param {string} engineName name of the engine
         * @param {string} orgName name of the organization
         * @param {string} clusterName name of the cluster
         * @param {string} accountName name of the account
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        unlockAccount: async (engineName, orgName, clusterName, accountName, options = {}) => {
            // verify required parameter 'engineName' is not null or undefined
            (0, common_1.assertParamExists)('unlockAccount', 'engineName', engineName);
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('unlockAccount', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('unlockAccount', 'clusterName', clusterName);
            // verify required parameter 'accountName' is not null or undefined
            (0, common_1.assertParamExists)('unlockAccount', 'accountName', accountName);
            const localVarPath = `/admin/v1/data/{engineName}/organizations/{orgName}/clusters/{clusterName}/accounts/{accountName}/unlock`
                .replace(`{${"engineName"}}`, encodeURIComponent(String(engineName)))
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)))
                .replace(`{${"accountName"}}`, encodeURIComponent(String(accountName)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * update an account in cluster
         * @summary update cluster account
         * @param {string} engineName name of the engine
         * @param {string} orgName name of the organization
         * @param {string} clusterName name of the cluster
         * @param {string} accountName name of the account
         * @param {Account} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateAccount: async (engineName, orgName, clusterName, accountName, body, options = {}) => {
            // verify required parameter 'engineName' is not null or undefined
            (0, common_1.assertParamExists)('updateAccount', 'engineName', engineName);
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('updateAccount', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('updateAccount', 'clusterName', clusterName);
            // verify required parameter 'accountName' is not null or undefined
            (0, common_1.assertParamExists)('updateAccount', 'accountName', accountName);
            // verify required parameter 'body' is not null or undefined
            (0, common_1.assertParamExists)('updateAccount', 'body', body);
            const localVarPath = `/admin/v1/data/{engineName}/organizations/{orgName}/clusters/{clusterName}/accounts/{accountName}`
                .replace(`{${"engineName"}}`, encodeURIComponent(String(engineName)))
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)))
                .replace(`{${"accountName"}}`, encodeURIComponent(String(accountName)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            localVarHeaderParameter['Content-Type'] = 'application/json';
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * update account privileges for rdbms engine
         * @summary update account privileges
         * @param {string} engineName name of the engine
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the Cluster
         * @param {string} accountName name of the account
         * @param {Array<PrivilegeListItem>} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateAccountPrivileges: async (engineName, orgName, clusterName, accountName, body, options = {}) => {
            // verify required parameter 'engineName' is not null or undefined
            (0, common_1.assertParamExists)('updateAccountPrivileges', 'engineName', engineName);
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('updateAccountPrivileges', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('updateAccountPrivileges', 'clusterName', clusterName);
            // verify required parameter 'accountName' is not null or undefined
            (0, common_1.assertParamExists)('updateAccountPrivileges', 'accountName', accountName);
            // verify required parameter 'body' is not null or undefined
            (0, common_1.assertParamExists)('updateAccountPrivileges', 'body', body);
            const localVarPath = `/admin/v1/data/{engineName}/organizations/{orgName}/clusters/{clusterName}/accounts/{accountName}/privileges`
                .replace(`{${"engineName"}}`, encodeURIComponent(String(engineName)))
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)))
                .replace(`{${"accountName"}}`, encodeURIComponent(String(accountName)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            localVarHeaderParameter['Content-Type'] = 'application/json';
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         *
         * @summary update mssql account compatible with windows account
         * @param {string} orgName name of the organization
         * @param {string} clusterName name of the cluster
         * @param {Account} [account]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateMssqlAccount: async (orgName, clusterName, account, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('updateMssqlAccount', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('updateMssqlAccount', 'clusterName', clusterName);
            const localVarPath = `/admin/v1/data/mssql/organizations/{orgName}/clusters/{clusterName}/accounts`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            localVarHeaderParameter['Content-Type'] = 'application/json';
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(account, localVarRequestOptions, configuration);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Update a RabbitMQ account password
         * @summary Update RabbitMQ account password
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the Cluster
         * @param {string} accountName name of the Account
         * @param {RbmqUser} rbmqUser
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateRabbitAccountPassword: async (orgName, clusterName, accountName, rbmqUser, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('updateRabbitAccountPassword', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('updateRabbitAccountPassword', 'clusterName', clusterName);
            // verify required parameter 'accountName' is not null or undefined
            (0, common_1.assertParamExists)('updateRabbitAccountPassword', 'accountName', accountName);
            // verify required parameter 'rbmqUser' is not null or undefined
            (0, common_1.assertParamExists)('updateRabbitAccountPassword', 'rbmqUser', rbmqUser);
            const localVarPath = `/admin/v1/data/rabbitmq/organizations/{orgName}/clusters/{clusterName}/accounts/{accountName}`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)))
                .replace(`{${"accountName"}}`, encodeURIComponent(String(accountName)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            localVarHeaderParameter['Content-Type'] = 'application/json';
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(rbmqUser, localVarRequestOptions, configuration);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Update a RabbitMQ account privileges
         * @summary Update RabbitMQ account privileges
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the Cluster
         * @param {string} accountName name of the Account
         * @param {RbmqPermission} rbmqPermission
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateRabbitAccountPrivileges: async (orgName, clusterName, accountName, rbmqPermission, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('updateRabbitAccountPrivileges', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('updateRabbitAccountPrivileges', 'clusterName', clusterName);
            // verify required parameter 'accountName' is not null or undefined
            (0, common_1.assertParamExists)('updateRabbitAccountPrivileges', 'accountName', accountName);
            // verify required parameter 'rbmqPermission' is not null or undefined
            (0, common_1.assertParamExists)('updateRabbitAccountPrivileges', 'rbmqPermission', rbmqPermission);
            const localVarPath = `/admin/v1/data/rabbitmq/organizations/{orgName}/clusters/{clusterName}/accounts/{accountName}/privileges`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)))
                .replace(`{${"accountName"}}`, encodeURIComponent(String(accountName)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            localVarHeaderParameter['Content-Type'] = 'application/json';
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(rbmqPermission, localVarRequestOptions, configuration);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
    };
};
exports.AccountApiAxiosParamCreator = AccountApiAxiosParamCreator;
/**
 * AccountApi - functional programming interface
 * @export
 */
const AccountApiFp = function (configuration) {
    const localVarAxiosParamCreator = (0, exports.AccountApiAxiosParamCreator)(configuration);
    return {
        /**
         * create an account in cluster
         * @summary Create cluster account
         * @param {string} engineName name of the engine
         * @param {string} orgName name of the organization
         * @param {string} clusterName name of the cluster
         * @param {Account} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createAccount(engineName, orgName, clusterName, body, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.createAccount(engineName, orgName, clusterName, body, options);
            const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
            const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AccountApi.createAccount']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * create an account in mongodb
         * @summary Create mongodb account
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the Cluster
         * @param {Account} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createMongoDBAccount(orgName, clusterName, body, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.createMongoDBAccount(orgName, clusterName, body, options);
            const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
            const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AccountApi.createMongoDBAccount']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Create a new RabbitMQ account
         * @summary Create RabbitMQ account
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the Cluster
         * @param {RbmqAccountRequest} rbmqAccountRequest
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createRabbitAccount(orgName, clusterName, rbmqAccountRequest, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.createRabbitAccount(orgName, clusterName, rbmqAccountRequest, options);
            const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
            const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AccountApi.createRabbitAccount']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * delete an account in cluster
         * @summary Delete cluster account
         * @param {string} engineName name of the engine
         * @param {string} orgName name of the organization
         * @param {string} clusterName name of the cluster
         * @param {string} accountName name of the account
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deleteAccount(engineName, orgName, clusterName, accountName, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.deleteAccount(engineName, orgName, clusterName, accountName, options);
            const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
            const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AccountApi.deleteAccount']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * delete an account in mongodb
         * @summary Delete mongodb account
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the Cluster
         * @param {string} accountName name of the Cluster
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deleteMongoDBAccount(orgName, clusterName, accountName, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.deleteMongoDBAccount(orgName, clusterName, accountName, options);
            const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
            const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AccountApi.deleteMongoDBAccount']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         *
         * @summary delete mssql account compatible with windows account
         * @param {string} orgName name of the organization
         * @param {string} clusterName name of the cluster
         * @param {string} account name of the account
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deleteMssqlAccount(orgName, clusterName, account, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.deleteMssqlAccount(orgName, clusterName, account, options);
            const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
            const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AccountApi.deleteMssqlAccount']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Delete a RabbitMQ account
         * @summary Delete RabbitMQ account
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the Cluster
         * @param {string} accountName name of the Account
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deleteRabbitAccount(orgName, clusterName, accountName, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.deleteRabbitAccount(orgName, clusterName, accountName, options);
            const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
            const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AccountApi.deleteRabbitAccount']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * get root account password
         * @summary get root account password
         * @param {string} engineName name of the engine
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the Cluster
         * @param {string} accountName name of the account
         * @param {string} [component] name of the component
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getRootAccountPassword(engineName, orgName, clusterName, accountName, component, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.getRootAccountPassword(engineName, orgName, clusterName, accountName, component, options);
            const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
            const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AccountApi.getRootAccountPassword']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * list accounts in cluster
         * @summary List cluster accounts
         * @param {string} engineName name of the engine
         * @param {string} orgName name of the organization
         * @param {string} clusterName name of the cluster
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listAccounts(engineName, orgName, clusterName, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.listAccounts(engineName, orgName, clusterName, options);
            const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
            const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AccountApi.listAccounts']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * list accounts in mongodb
         * @summary List mongodb accounts
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the Cluster
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listMongoDBAccounts(orgName, clusterName, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.listMongoDBAccounts(orgName, clusterName, options);
            const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
            const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AccountApi.listMongoDBAccounts']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * List all RabbitMQ accounts
         * @summary List RabbitMQ accounts
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the Cluster
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listRabbitAccounts(orgName, clusterName, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.listRabbitAccounts(orgName, clusterName, options);
            const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
            const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AccountApi.listRabbitAccounts']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * lock an account in cluster
         * @summary Lock cluster account
         * @param {string} engineName name of the engine
         * @param {string} orgName name of the organization
         * @param {string} clusterName name of the cluster
         * @param {string} accountName name of the account
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async lockAccount(engineName, orgName, clusterName, accountName, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.lockAccount(engineName, orgName, clusterName, accountName, options);
            const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
            const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AccountApi.lockAccount']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * unlock an account in cluster
         * @summary Unlock cluster account
         * @param {string} engineName name of the engine
         * @param {string} orgName name of the organization
         * @param {string} clusterName name of the cluster
         * @param {string} accountName name of the account
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async unlockAccount(engineName, orgName, clusterName, accountName, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.unlockAccount(engineName, orgName, clusterName, accountName, options);
            const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
            const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AccountApi.unlockAccount']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * update an account in cluster
         * @summary update cluster account
         * @param {string} engineName name of the engine
         * @param {string} orgName name of the organization
         * @param {string} clusterName name of the cluster
         * @param {string} accountName name of the account
         * @param {Account} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async updateAccount(engineName, orgName, clusterName, accountName, body, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.updateAccount(engineName, orgName, clusterName, accountName, body, options);
            const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
            const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AccountApi.updateAccount']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * update account privileges for rdbms engine
         * @summary update account privileges
         * @param {string} engineName name of the engine
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the Cluster
         * @param {string} accountName name of the account
         * @param {Array<PrivilegeListItem>} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async updateAccountPrivileges(engineName, orgName, clusterName, accountName, body, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.updateAccountPrivileges(engineName, orgName, clusterName, accountName, body, options);
            const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
            const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AccountApi.updateAccountPrivileges']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         *
         * @summary update mssql account compatible with windows account
         * @param {string} orgName name of the organization
         * @param {string} clusterName name of the cluster
         * @param {Account} [account]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async updateMssqlAccount(orgName, clusterName, account, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.updateMssqlAccount(orgName, clusterName, account, options);
            const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
            const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AccountApi.updateMssqlAccount']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Update a RabbitMQ account password
         * @summary Update RabbitMQ account password
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the Cluster
         * @param {string} accountName name of the Account
         * @param {RbmqUser} rbmqUser
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async updateRabbitAccountPassword(orgName, clusterName, accountName, rbmqUser, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.updateRabbitAccountPassword(orgName, clusterName, accountName, rbmqUser, options);
            const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
            const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AccountApi.updateRabbitAccountPassword']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Update a RabbitMQ account privileges
         * @summary Update RabbitMQ account privileges
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the Cluster
         * @param {string} accountName name of the Account
         * @param {RbmqPermission} rbmqPermission
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async updateRabbitAccountPrivileges(orgName, clusterName, accountName, rbmqPermission, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.updateRabbitAccountPrivileges(orgName, clusterName, accountName, rbmqPermission, options);
            const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
            const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AccountApi.updateRabbitAccountPrivileges']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
    };
};
exports.AccountApiFp = AccountApiFp;
/**
 * AccountApi - factory interface
 * @export
 */
const AccountApiFactory = function (configuration, basePath, axios) {
    const localVarFp = (0, exports.AccountApiFp)(configuration);
    return {
        /**
         * create an account in cluster
         * @summary Create cluster account
         * @param {AccountApiCreateAccountRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createAccount(requestParameters, options) {
            return localVarFp.createAccount(requestParameters.engineName, requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(axios, basePath));
        },
        /**
         * create an account in mongodb
         * @summary Create mongodb account
         * @param {AccountApiCreateMongoDBAccountRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createMongoDBAccount(requestParameters, options) {
            return localVarFp.createMongoDBAccount(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(axios, basePath));
        },
        /**
         * Create a new RabbitMQ account
         * @summary Create RabbitMQ account
         * @param {AccountApiCreateRabbitAccountRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createRabbitAccount(requestParameters, options) {
            return localVarFp.createRabbitAccount(requestParameters.orgName, requestParameters.clusterName, requestParameters.rbmqAccountRequest, options).then((request) => request(axios, basePath));
        },
        /**
         * delete an account in cluster
         * @summary Delete cluster account
         * @param {AccountApiDeleteAccountRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteAccount(requestParameters, options) {
            return localVarFp.deleteAccount(requestParameters.engineName, requestParameters.orgName, requestParameters.clusterName, requestParameters.accountName, options).then((request) => request(axios, basePath));
        },
        /**
         * delete an account in mongodb
         * @summary Delete mongodb account
         * @param {AccountApiDeleteMongoDBAccountRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteMongoDBAccount(requestParameters, options) {
            return localVarFp.deleteMongoDBAccount(requestParameters.orgName, requestParameters.clusterName, requestParameters.accountName, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary delete mssql account compatible with windows account
         * @param {AccountApiDeleteMssqlAccountRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteMssqlAccount(requestParameters, options) {
            return localVarFp.deleteMssqlAccount(requestParameters.orgName, requestParameters.clusterName, requestParameters.account, options).then((request) => request(axios, basePath));
        },
        /**
         * Delete a RabbitMQ account
         * @summary Delete RabbitMQ account
         * @param {AccountApiDeleteRabbitAccountRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteRabbitAccount(requestParameters, options) {
            return localVarFp.deleteRabbitAccount(requestParameters.orgName, requestParameters.clusterName, requestParameters.accountName, options).then((request) => request(axios, basePath));
        },
        /**
         * get root account password
         * @summary get root account password
         * @param {AccountApiGetRootAccountPasswordRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getRootAccountPassword(requestParameters, options) {
            return localVarFp.getRootAccountPassword(requestParameters.engineName, requestParameters.orgName, requestParameters.clusterName, requestParameters.accountName, requestParameters.component, options).then((request) => request(axios, basePath));
        },
        /**
         * list accounts in cluster
         * @summary List cluster accounts
         * @param {AccountApiListAccountsRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listAccounts(requestParameters, options) {
            return localVarFp.listAccounts(requestParameters.engineName, requestParameters.orgName, requestParameters.clusterName, options).then((request) => request(axios, basePath));
        },
        /**
         * list accounts in mongodb
         * @summary List mongodb accounts
         * @param {AccountApiListMongoDBAccountsRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listMongoDBAccounts(requestParameters, options) {
            return localVarFp.listMongoDBAccounts(requestParameters.orgName, requestParameters.clusterName, options).then((request) => request(axios, basePath));
        },
        /**
         * List all RabbitMQ accounts
         * @summary List RabbitMQ accounts
         * @param {AccountApiListRabbitAccountsRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listRabbitAccounts(requestParameters, options) {
            return localVarFp.listRabbitAccounts(requestParameters.orgName, requestParameters.clusterName, options).then((request) => request(axios, basePath));
        },
        /**
         * lock an account in cluster
         * @summary Lock cluster account
         * @param {AccountApiLockAccountRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        lockAccount(requestParameters, options) {
            return localVarFp.lockAccount(requestParameters.engineName, requestParameters.orgName, requestParameters.clusterName, requestParameters.accountName, options).then((request) => request(axios, basePath));
        },
        /**
         * unlock an account in cluster
         * @summary Unlock cluster account
         * @param {AccountApiUnlockAccountRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        unlockAccount(requestParameters, options) {
            return localVarFp.unlockAccount(requestParameters.engineName, requestParameters.orgName, requestParameters.clusterName, requestParameters.accountName, options).then((request) => request(axios, basePath));
        },
        /**
         * update an account in cluster
         * @summary update cluster account
         * @param {AccountApiUpdateAccountRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateAccount(requestParameters, options) {
            return localVarFp.updateAccount(requestParameters.engineName, requestParameters.orgName, requestParameters.clusterName, requestParameters.accountName, requestParameters.body, options).then((request) => request(axios, basePath));
        },
        /**
         * update account privileges for rdbms engine
         * @summary update account privileges
         * @param {AccountApiUpdateAccountPrivilegesRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateAccountPrivileges(requestParameters, options) {
            return localVarFp.updateAccountPrivileges(requestParameters.engineName, requestParameters.orgName, requestParameters.clusterName, requestParameters.accountName, requestParameters.body, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary update mssql account compatible with windows account
         * @param {AccountApiUpdateMssqlAccountRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateMssqlAccount(requestParameters, options) {
            return localVarFp.updateMssqlAccount(requestParameters.orgName, requestParameters.clusterName, requestParameters.account, options).then((request) => request(axios, basePath));
        },
        /**
         * Update a RabbitMQ account password
         * @summary Update RabbitMQ account password
         * @param {AccountApiUpdateRabbitAccountPasswordRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateRabbitAccountPassword(requestParameters, options) {
            return localVarFp.updateRabbitAccountPassword(requestParameters.orgName, requestParameters.clusterName, requestParameters.accountName, requestParameters.rbmqUser, options).then((request) => request(axios, basePath));
        },
        /**
         * Update a RabbitMQ account privileges
         * @summary Update RabbitMQ account privileges
         * @param {AccountApiUpdateRabbitAccountPrivilegesRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateRabbitAccountPrivileges(requestParameters, options) {
            return localVarFp.updateRabbitAccountPrivileges(requestParameters.orgName, requestParameters.clusterName, requestParameters.accountName, requestParameters.rbmqPermission, options).then((request) => request(axios, basePath));
        },
    };
};
exports.AccountApiFactory = AccountApiFactory;
/**
 * AccountApi - object-oriented interface
 * @export
 * @class AccountApi
 * @extends {BaseAPI}
 */
class AccountApi extends base_1.BaseAPI {
    /**
     * create an account in cluster
     * @summary Create cluster account
     * @param {AccountApiCreateAccountRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AccountApi
     */
    createAccount(requestParameters, options) {
        return (0, exports.AccountApiFp)(this.configuration).createAccount(requestParameters.engineName, requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     * create an account in mongodb
     * @summary Create mongodb account
     * @param {AccountApiCreateMongoDBAccountRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AccountApi
     */
    createMongoDBAccount(requestParameters, options) {
        return (0, exports.AccountApiFp)(this.configuration).createMongoDBAccount(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     * Create a new RabbitMQ account
     * @summary Create RabbitMQ account
     * @param {AccountApiCreateRabbitAccountRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AccountApi
     */
    createRabbitAccount(requestParameters, options) {
        return (0, exports.AccountApiFp)(this.configuration).createRabbitAccount(requestParameters.orgName, requestParameters.clusterName, requestParameters.rbmqAccountRequest, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     * delete an account in cluster
     * @summary Delete cluster account
     * @param {AccountApiDeleteAccountRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AccountApi
     */
    deleteAccount(requestParameters, options) {
        return (0, exports.AccountApiFp)(this.configuration).deleteAccount(requestParameters.engineName, requestParameters.orgName, requestParameters.clusterName, requestParameters.accountName, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     * delete an account in mongodb
     * @summary Delete mongodb account
     * @param {AccountApiDeleteMongoDBAccountRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AccountApi
     */
    deleteMongoDBAccount(requestParameters, options) {
        return (0, exports.AccountApiFp)(this.configuration).deleteMongoDBAccount(requestParameters.orgName, requestParameters.clusterName, requestParameters.accountName, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary delete mssql account compatible with windows account
     * @param {AccountApiDeleteMssqlAccountRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AccountApi
     */
    deleteMssqlAccount(requestParameters, options) {
        return (0, exports.AccountApiFp)(this.configuration).deleteMssqlAccount(requestParameters.orgName, requestParameters.clusterName, requestParameters.account, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     * Delete a RabbitMQ account
     * @summary Delete RabbitMQ account
     * @param {AccountApiDeleteRabbitAccountRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AccountApi
     */
    deleteRabbitAccount(requestParameters, options) {
        return (0, exports.AccountApiFp)(this.configuration).deleteRabbitAccount(requestParameters.orgName, requestParameters.clusterName, requestParameters.accountName, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     * get root account password
     * @summary get root account password
     * @param {AccountApiGetRootAccountPasswordRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AccountApi
     */
    getRootAccountPassword(requestParameters, options) {
        return (0, exports.AccountApiFp)(this.configuration).getRootAccountPassword(requestParameters.engineName, requestParameters.orgName, requestParameters.clusterName, requestParameters.accountName, requestParameters.component, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     * list accounts in cluster
     * @summary List cluster accounts
     * @param {AccountApiListAccountsRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AccountApi
     */
    listAccounts(requestParameters, options) {
        return (0, exports.AccountApiFp)(this.configuration).listAccounts(requestParameters.engineName, requestParameters.orgName, requestParameters.clusterName, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     * list accounts in mongodb
     * @summary List mongodb accounts
     * @param {AccountApiListMongoDBAccountsRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AccountApi
     */
    listMongoDBAccounts(requestParameters, options) {
        return (0, exports.AccountApiFp)(this.configuration).listMongoDBAccounts(requestParameters.orgName, requestParameters.clusterName, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     * List all RabbitMQ accounts
     * @summary List RabbitMQ accounts
     * @param {AccountApiListRabbitAccountsRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AccountApi
     */
    listRabbitAccounts(requestParameters, options) {
        return (0, exports.AccountApiFp)(this.configuration).listRabbitAccounts(requestParameters.orgName, requestParameters.clusterName, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     * lock an account in cluster
     * @summary Lock cluster account
     * @param {AccountApiLockAccountRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AccountApi
     */
    lockAccount(requestParameters, options) {
        return (0, exports.AccountApiFp)(this.configuration).lockAccount(requestParameters.engineName, requestParameters.orgName, requestParameters.clusterName, requestParameters.accountName, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     * unlock an account in cluster
     * @summary Unlock cluster account
     * @param {AccountApiUnlockAccountRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AccountApi
     */
    unlockAccount(requestParameters, options) {
        return (0, exports.AccountApiFp)(this.configuration).unlockAccount(requestParameters.engineName, requestParameters.orgName, requestParameters.clusterName, requestParameters.accountName, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     * update an account in cluster
     * @summary update cluster account
     * @param {AccountApiUpdateAccountRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AccountApi
     */
    updateAccount(requestParameters, options) {
        return (0, exports.AccountApiFp)(this.configuration).updateAccount(requestParameters.engineName, requestParameters.orgName, requestParameters.clusterName, requestParameters.accountName, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     * update account privileges for rdbms engine
     * @summary update account privileges
     * @param {AccountApiUpdateAccountPrivilegesRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AccountApi
     */
    updateAccountPrivileges(requestParameters, options) {
        return (0, exports.AccountApiFp)(this.configuration).updateAccountPrivileges(requestParameters.engineName, requestParameters.orgName, requestParameters.clusterName, requestParameters.accountName, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary update mssql account compatible with windows account
     * @param {AccountApiUpdateMssqlAccountRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AccountApi
     */
    updateMssqlAccount(requestParameters, options) {
        return (0, exports.AccountApiFp)(this.configuration).updateMssqlAccount(requestParameters.orgName, requestParameters.clusterName, requestParameters.account, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     * Update a RabbitMQ account password
     * @summary Update RabbitMQ account password
     * @param {AccountApiUpdateRabbitAccountPasswordRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AccountApi
     */
    updateRabbitAccountPassword(requestParameters, options) {
        return (0, exports.AccountApiFp)(this.configuration).updateRabbitAccountPassword(requestParameters.orgName, requestParameters.clusterName, requestParameters.accountName, requestParameters.rbmqUser, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     * Update a RabbitMQ account privileges
     * @summary Update RabbitMQ account privileges
     * @param {AccountApiUpdateRabbitAccountPrivilegesRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AccountApi
     */
    updateRabbitAccountPrivileges(requestParameters, options) {
        return (0, exports.AccountApiFp)(this.configuration).updateRabbitAccountPrivileges(requestParameters.orgName, requestParameters.clusterName, requestParameters.accountName, requestParameters.rbmqPermission, options).then((request) => request(this.axios, this.basePath));
    }
}
exports.AccountApi = AccountApi;
//# sourceMappingURL=account-api.js.map