"use strict";
/* tslint:disable */
/* eslint-disable */
/**
 * KubeBlocks Cloud API
 * KubeBlocks Cloud API is a RESTful API for managing KubeBlocks Cloud resources.  The API is organized around REST.  Our API has predictable resource-oriented URLs, accepts `JSON-encoded` request bodies, returns `JSON-encoded` responses, and uses standard HTTP response codes, authentication, and verbs.  We use standard HTTP authentication and provide API keys to identify who you are. Your API keys carry many privileges, so be sure to keep them secret! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.
 *
 * 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.RdbmsApi = exports.RdbmsApiFactory = exports.RdbmsApiFp = exports.RdbmsApiAxiosParamCreator = 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");
/**
 * RdbmsApi - axios parameter creator
 * @export
 */
const RdbmsApiAxiosParamCreator = 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 = `/api/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 a database in cluster
         * @summary Create cluster database
         * @param {string} engineName name of the engine
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the Cluster
         * @param {Database} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createDatabase: async (engineName, orgName, clusterName, body, options = {}) => {
            // verify required parameter 'engineName' is not null or undefined
            (0, common_1.assertParamExists)('createDatabase', 'engineName', engineName);
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('createDatabase', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('createDatabase', 'clusterName', clusterName);
            // verify required parameter 'body' is not null or undefined
            (0, common_1.assertParamExists)('createDatabase', 'body', body);
            const localVarPath = `/api/v1/data/{engineName}/organizations/{orgName}/clusters/{clusterName}/databases`
                .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,
            };
        },
        /**
         * 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 = `/api/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 a database in cluster
         * @summary Delete cluster database
         * @param {string} engineName name of the engine
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the Cluster
         * @param {string} databaseName name of database
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteDatabase: async (engineName, orgName, clusterName, databaseName, options = {}) => {
            // verify required parameter 'engineName' is not null or undefined
            (0, common_1.assertParamExists)('deleteDatabase', 'engineName', engineName);
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('deleteDatabase', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('deleteDatabase', 'clusterName', clusterName);
            // verify required parameter 'databaseName' is not null or undefined
            (0, common_1.assertParamExists)('deleteDatabase', 'databaseName', databaseName);
            const localVarPath = `/api/v1/data/{engineName}/organizations/{orgName}/clusters/{clusterName}/databases/{databaseName}`
                .replace(`{${"engineName"}}`, encodeURIComponent(String(engineName)))
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)))
                .replace(`{${"databaseName"}}`, encodeURIComponent(String(databaseName)));
            // 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,
            };
        },
        /**
         * generate demo data
         * @summary generate demo data
         * @param {string} engineName name of the engine
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the Cluster
         * @param {string} accountName acccount name which owns the database to generate demo data
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        generateDemoData: async (engineName, orgName, clusterName, accountName, options = {}) => {
            // verify required parameter 'engineName' is not null or undefined
            (0, common_1.assertParamExists)('generateDemoData', 'engineName', engineName);
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('generateDemoData', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('generateDemoData', 'clusterName', clusterName);
            // verify required parameter 'accountName' is not null or undefined
            (0, common_1.assertParamExists)('generateDemoData', 'accountName', accountName);
            const localVarPath = `/api/v1/data/{engineName}/organizations/{orgName}/clusters/{clusterName}/demo`
                .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);
            if (accountName !== undefined) {
                localVarQueryParameter['accountName'] = accountName;
            }
            (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 a database info in cluster
         * @param {string} engineName name of the engine
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the Cluster
         * @param {string} databaseName name of database
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getDatabase: async (engineName, orgName, clusterName, databaseName, options = {}) => {
            // verify required parameter 'engineName' is not null or undefined
            (0, common_1.assertParamExists)('getDatabase', 'engineName', engineName);
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('getDatabase', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('getDatabase', 'clusterName', clusterName);
            // verify required parameter 'databaseName' is not null or undefined
            (0, common_1.assertParamExists)('getDatabase', 'databaseName', databaseName);
            const localVarPath = `/api/v1/data/{engineName}/organizations/{orgName}/clusters/{clusterName}/databases/{databaseName}`
                .replace(`{${"engineName"}}`, encodeURIComponent(String(engineName)))
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)))
                .replace(`{${"databaseName"}}`, encodeURIComponent(String(databaseName)));
            // 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,
            };
        },
        /**
         * get available options for creating database
         * @summary get database options
         * @param {string} engineName name of the engine
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the Cluster
         * @param {string} type option type
         * @param {string} [charset] specified charset
         * @param {string} [filter] filter keyword
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getDatabaseOptions: async (engineName, orgName, clusterName, type, charset, filter, options = {}) => {
            // verify required parameter 'engineName' is not null or undefined
            (0, common_1.assertParamExists)('getDatabaseOptions', 'engineName', engineName);
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('getDatabaseOptions', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('getDatabaseOptions', 'clusterName', clusterName);
            // verify required parameter 'type' is not null or undefined
            (0, common_1.assertParamExists)('getDatabaseOptions', 'type', type);
            const localVarPath = `/api/v1/data/{engineName}/organizations/{orgName}/clusters/{clusterName}/dboptions`
                .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 (type !== undefined) {
                localVarQueryParameter['type'] = type;
            }
            if (charset !== undefined) {
                localVarQueryParameter['charset'] = charset;
            }
            if (filter !== undefined) {
                localVarQueryParameter['filter'] = filter;
            }
            (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,
            };
        },
        /**
         * kill a session in cluster
         * @summary Kill cluster session
         * @param {string} engineName name of the engine
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the Cluster
         * @param {string} session session id
         * @param {boolean} [keep] if keep is true, the session will not be killed but only closed
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        killSession: async (engineName, orgName, clusterName, session, keep, options = {}) => {
            // verify required parameter 'engineName' is not null or undefined
            (0, common_1.assertParamExists)('killSession', 'engineName', engineName);
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('killSession', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('killSession', 'clusterName', clusterName);
            // verify required parameter 'session' is not null or undefined
            (0, common_1.assertParamExists)('killSession', 'session', session);
            const localVarPath = `/api/v1/data/{engineName}/organizations/{orgName}/clusters/{clusterName}/sessions/{session}`
                .replace(`{${"engineName"}}`, encodeURIComponent(String(engineName)))
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)))
                .replace(`{${"session"}}`, encodeURIComponent(String(session)));
            // 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 (keep !== undefined) {
                localVarQueryParameter['keep'] = keep;
            }
            (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 = `/api/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 databases for rdbms engine cluster
         * @summary List cluster databases
         * @param {string} engineName name of the engine
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the Cluster
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listDatabases: async (engineName, orgName, clusterName, options = {}) => {
            // verify required parameter 'engineName' is not null or undefined
            (0, common_1.assertParamExists)('listDatabases', 'engineName', engineName);
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('listDatabases', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('listDatabases', 'clusterName', clusterName);
            const localVarPath = `/api/v1/data/{engineName}/organizations/{orgName}/clusters/{clusterName}/databases`
                .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 sessions in cluster
         * @summary List cluster sessions
         * @param {string} engineName name of the engine
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the Cluster
         * @param {boolean} [all] whether list all session includes sleep
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listSessions: async (engineName, orgName, clusterName, all, options = {}) => {
            // verify required parameter 'engineName' is not null or undefined
            (0, common_1.assertParamExists)('listSessions', 'engineName', engineName);
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('listSessions', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('listSessions', 'clusterName', clusterName);
            const localVarPath = `/api/v1/data/{engineName}/organizations/{orgName}/clusters/{clusterName}/sessions`
                .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 (all !== undefined) {
                localVarQueryParameter['all'] = all;
            }
            (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 = `/api/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 = `/api/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 = `/api/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 = `/api/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,
            };
        },
        /**
         * update a database config in cluster
         * @summary update database config
         * @param {string} engineName name of the engine
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the Cluster
         * @param {string} databaseName name of database
         * @param {{ [key: string]: string; }} [requestBody]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateDatabaseConfig: async (engineName, orgName, clusterName, databaseName, requestBody, options = {}) => {
            // verify required parameter 'engineName' is not null or undefined
            (0, common_1.assertParamExists)('updateDatabaseConfig', 'engineName', engineName);
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('updateDatabaseConfig', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('updateDatabaseConfig', 'clusterName', clusterName);
            // verify required parameter 'databaseName' is not null or undefined
            (0, common_1.assertParamExists)('updateDatabaseConfig', 'databaseName', databaseName);
            const localVarPath = `/api/v1/data/{engineName}/organizations/{orgName}/clusters/{clusterName}/databases/{databaseName}`
                .replace(`{${"engineName"}}`, encodeURIComponent(String(engineName)))
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)))
                .replace(`{${"databaseName"}}`, encodeURIComponent(String(databaseName)));
            // 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)(requestBody, localVarRequestOptions, configuration);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
    };
};
exports.RdbmsApiAxiosParamCreator = RdbmsApiAxiosParamCreator;
/**
 * RdbmsApi - functional programming interface
 * @export
 */
const RdbmsApiFp = function (configuration) {
    const localVarAxiosParamCreator = (0, exports.RdbmsApiAxiosParamCreator)(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['RdbmsApi.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 a database in cluster
         * @summary Create cluster database
         * @param {string} engineName name of the engine
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the Cluster
         * @param {Database} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createDatabase(engineName, orgName, clusterName, body, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.createDatabase(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['RdbmsApi.createDatabase']) === 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['RdbmsApi.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 a database in cluster
         * @summary Delete cluster database
         * @param {string} engineName name of the engine
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the Cluster
         * @param {string} databaseName name of database
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deleteDatabase(engineName, orgName, clusterName, databaseName, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.deleteDatabase(engineName, orgName, clusterName, databaseName, 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['RdbmsApi.deleteDatabase']) === 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);
        },
        /**
         * generate demo data
         * @summary generate demo data
         * @param {string} engineName name of the engine
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the Cluster
         * @param {string} accountName acccount name which owns the database to generate demo data
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async generateDemoData(engineName, orgName, clusterName, accountName, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.generateDemoData(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['RdbmsApi.generateDemoData']) === 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 a database info in cluster
         * @param {string} engineName name of the engine
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the Cluster
         * @param {string} databaseName name of database
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getDatabase(engineName, orgName, clusterName, databaseName, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.getDatabase(engineName, orgName, clusterName, databaseName, 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['RdbmsApi.getDatabase']) === 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 available options for creating database
         * @summary get database options
         * @param {string} engineName name of the engine
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the Cluster
         * @param {string} type option type
         * @param {string} [charset] specified charset
         * @param {string} [filter] filter keyword
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getDatabaseOptions(engineName, orgName, clusterName, type, charset, filter, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.getDatabaseOptions(engineName, orgName, clusterName, type, charset, filter, 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['RdbmsApi.getDatabaseOptions']) === 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);
        },
        /**
         * kill a session in cluster
         * @summary Kill cluster session
         * @param {string} engineName name of the engine
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the Cluster
         * @param {string} session session id
         * @param {boolean} [keep] if keep is true, the session will not be killed but only closed
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async killSession(engineName, orgName, clusterName, session, keep, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.killSession(engineName, orgName, clusterName, session, keep, 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['RdbmsApi.killSession']) === 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['RdbmsApi.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 databases for rdbms engine cluster
         * @summary List cluster databases
         * @param {string} engineName name of the engine
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the Cluster
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listDatabases(engineName, orgName, clusterName, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.listDatabases(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['RdbmsApi.listDatabases']) === 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 sessions in cluster
         * @summary List cluster sessions
         * @param {string} engineName name of the engine
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the Cluster
         * @param {boolean} [all] whether list all session includes sleep
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listSessions(engineName, orgName, clusterName, all, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.listSessions(engineName, orgName, clusterName, all, 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['RdbmsApi.listSessions']) === 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['RdbmsApi.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['RdbmsApi.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['RdbmsApi.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['RdbmsApi.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);
        },
        /**
         * update a database config in cluster
         * @summary update database config
         * @param {string} engineName name of the engine
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the Cluster
         * @param {string} databaseName name of database
         * @param {{ [key: string]: string; }} [requestBody]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async updateDatabaseConfig(engineName, orgName, clusterName, databaseName, requestBody, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.updateDatabaseConfig(engineName, orgName, clusterName, databaseName, requestBody, 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['RdbmsApi.updateDatabaseConfig']) === 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.RdbmsApiFp = RdbmsApiFp;
/**
 * RdbmsApi - factory interface
 * @export
 */
const RdbmsApiFactory = function (configuration, basePath, axios) {
    const localVarFp = (0, exports.RdbmsApiFp)(configuration);
    return {
        /**
         * create an account in cluster
         * @summary Create cluster account
         * @param {RdbmsApiCreateAccountRequest} 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 a database in cluster
         * @summary Create cluster database
         * @param {RdbmsApiCreateDatabaseRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createDatabase(requestParameters, options) {
            return localVarFp.createDatabase(requestParameters.engineName, requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(axios, basePath));
        },
        /**
         * delete an account in cluster
         * @summary Delete cluster account
         * @param {RdbmsApiDeleteAccountRequest} 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 a database in cluster
         * @summary Delete cluster database
         * @param {RdbmsApiDeleteDatabaseRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteDatabase(requestParameters, options) {
            return localVarFp.deleteDatabase(requestParameters.engineName, requestParameters.orgName, requestParameters.clusterName, requestParameters.databaseName, options).then((request) => request(axios, basePath));
        },
        /**
         * generate demo data
         * @summary generate demo data
         * @param {RdbmsApiGenerateDemoDataRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        generateDemoData(requestParameters, options) {
            return localVarFp.generateDemoData(requestParameters.engineName, requestParameters.orgName, requestParameters.clusterName, requestParameters.accountName, options).then((request) => request(axios, basePath));
        },
        /**
         * get a database info in cluster
         * @param {RdbmsApiGetDatabaseRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getDatabase(requestParameters, options) {
            return localVarFp.getDatabase(requestParameters.engineName, requestParameters.orgName, requestParameters.clusterName, requestParameters.databaseName, options).then((request) => request(axios, basePath));
        },
        /**
         * get available options for creating database
         * @summary get database options
         * @param {RdbmsApiGetDatabaseOptionsRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getDatabaseOptions(requestParameters, options) {
            return localVarFp.getDatabaseOptions(requestParameters.engineName, requestParameters.orgName, requestParameters.clusterName, requestParameters.type, requestParameters.charset, requestParameters.filter, options).then((request) => request(axios, basePath));
        },
        /**
         * kill a session in cluster
         * @summary Kill cluster session
         * @param {RdbmsApiKillSessionRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        killSession(requestParameters, options) {
            return localVarFp.killSession(requestParameters.engineName, requestParameters.orgName, requestParameters.clusterName, requestParameters.session, requestParameters.keep, options).then((request) => request(axios, basePath));
        },
        /**
         * list accounts in cluster
         * @summary List cluster accounts
         * @param {RdbmsApiListAccountsRequest} 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 databases for rdbms engine cluster
         * @summary List cluster databases
         * @param {RdbmsApiListDatabasesRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listDatabases(requestParameters, options) {
            return localVarFp.listDatabases(requestParameters.engineName, requestParameters.orgName, requestParameters.clusterName, options).then((request) => request(axios, basePath));
        },
        /**
         * list sessions in cluster
         * @summary List cluster sessions
         * @param {RdbmsApiListSessionsRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listSessions(requestParameters, options) {
            return localVarFp.listSessions(requestParameters.engineName, requestParameters.orgName, requestParameters.clusterName, requestParameters.all, options).then((request) => request(axios, basePath));
        },
        /**
         * lock an account in cluster
         * @summary Lock cluster account
         * @param {RdbmsApiLockAccountRequest} 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 {RdbmsApiUnlockAccountRequest} 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 {RdbmsApiUpdateAccountRequest} 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 {RdbmsApiUpdateAccountPrivilegesRequest} 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));
        },
        /**
         * update a database config in cluster
         * @summary update database config
         * @param {RdbmsApiUpdateDatabaseConfigRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateDatabaseConfig(requestParameters, options) {
            return localVarFp.updateDatabaseConfig(requestParameters.engineName, requestParameters.orgName, requestParameters.clusterName, requestParameters.databaseName, requestParameters.requestBody, options).then((request) => request(axios, basePath));
        },
    };
};
exports.RdbmsApiFactory = RdbmsApiFactory;
/**
 * RdbmsApi - object-oriented interface
 * @export
 * @class RdbmsApi
 * @extends {BaseAPI}
 */
class RdbmsApi extends base_1.BaseAPI {
    /**
     * create an account in cluster
     * @summary Create cluster account
     * @param {RdbmsApiCreateAccountRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof RdbmsApi
     */
    createAccount(requestParameters, options) {
        return (0, exports.RdbmsApiFp)(this.configuration).createAccount(requestParameters.engineName, requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     * create a database in cluster
     * @summary Create cluster database
     * @param {RdbmsApiCreateDatabaseRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof RdbmsApi
     */
    createDatabase(requestParameters, options) {
        return (0, exports.RdbmsApiFp)(this.configuration).createDatabase(requestParameters.engineName, requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     * delete an account in cluster
     * @summary Delete cluster account
     * @param {RdbmsApiDeleteAccountRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof RdbmsApi
     */
    deleteAccount(requestParameters, options) {
        return (0, exports.RdbmsApiFp)(this.configuration).deleteAccount(requestParameters.engineName, requestParameters.orgName, requestParameters.clusterName, requestParameters.accountName, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     * delete a database in cluster
     * @summary Delete cluster database
     * @param {RdbmsApiDeleteDatabaseRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof RdbmsApi
     */
    deleteDatabase(requestParameters, options) {
        return (0, exports.RdbmsApiFp)(this.configuration).deleteDatabase(requestParameters.engineName, requestParameters.orgName, requestParameters.clusterName, requestParameters.databaseName, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     * generate demo data
     * @summary generate demo data
     * @param {RdbmsApiGenerateDemoDataRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof RdbmsApi
     */
    generateDemoData(requestParameters, options) {
        return (0, exports.RdbmsApiFp)(this.configuration).generateDemoData(requestParameters.engineName, requestParameters.orgName, requestParameters.clusterName, requestParameters.accountName, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     * get a database info in cluster
     * @param {RdbmsApiGetDatabaseRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof RdbmsApi
     */
    getDatabase(requestParameters, options) {
        return (0, exports.RdbmsApiFp)(this.configuration).getDatabase(requestParameters.engineName, requestParameters.orgName, requestParameters.clusterName, requestParameters.databaseName, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     * get available options for creating database
     * @summary get database options
     * @param {RdbmsApiGetDatabaseOptionsRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof RdbmsApi
     */
    getDatabaseOptions(requestParameters, options) {
        return (0, exports.RdbmsApiFp)(this.configuration).getDatabaseOptions(requestParameters.engineName, requestParameters.orgName, requestParameters.clusterName, requestParameters.type, requestParameters.charset, requestParameters.filter, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     * kill a session in cluster
     * @summary Kill cluster session
     * @param {RdbmsApiKillSessionRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof RdbmsApi
     */
    killSession(requestParameters, options) {
        return (0, exports.RdbmsApiFp)(this.configuration).killSession(requestParameters.engineName, requestParameters.orgName, requestParameters.clusterName, requestParameters.session, requestParameters.keep, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     * list accounts in cluster
     * @summary List cluster accounts
     * @param {RdbmsApiListAccountsRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof RdbmsApi
     */
    listAccounts(requestParameters, options) {
        return (0, exports.RdbmsApiFp)(this.configuration).listAccounts(requestParameters.engineName, requestParameters.orgName, requestParameters.clusterName, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     * list databases for rdbms engine cluster
     * @summary List cluster databases
     * @param {RdbmsApiListDatabasesRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof RdbmsApi
     */
    listDatabases(requestParameters, options) {
        return (0, exports.RdbmsApiFp)(this.configuration).listDatabases(requestParameters.engineName, requestParameters.orgName, requestParameters.clusterName, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     * list sessions in cluster
     * @summary List cluster sessions
     * @param {RdbmsApiListSessionsRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof RdbmsApi
     */
    listSessions(requestParameters, options) {
        return (0, exports.RdbmsApiFp)(this.configuration).listSessions(requestParameters.engineName, requestParameters.orgName, requestParameters.clusterName, requestParameters.all, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     * lock an account in cluster
     * @summary Lock cluster account
     * @param {RdbmsApiLockAccountRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof RdbmsApi
     */
    lockAccount(requestParameters, options) {
        return (0, exports.RdbmsApiFp)(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 {RdbmsApiUnlockAccountRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof RdbmsApi
     */
    unlockAccount(requestParameters, options) {
        return (0, exports.RdbmsApiFp)(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 {RdbmsApiUpdateAccountRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof RdbmsApi
     */
    updateAccount(requestParameters, options) {
        return (0, exports.RdbmsApiFp)(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 {RdbmsApiUpdateAccountPrivilegesRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof RdbmsApi
     */
    updateAccountPrivileges(requestParameters, options) {
        return (0, exports.RdbmsApiFp)(this.configuration).updateAccountPrivileges(requestParameters.engineName, requestParameters.orgName, requestParameters.clusterName, requestParameters.accountName, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     * update a database config in cluster
     * @summary update database config
     * @param {RdbmsApiUpdateDatabaseConfigRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof RdbmsApi
     */
    updateDatabaseConfig(requestParameters, options) {
        return (0, exports.RdbmsApiFp)(this.configuration).updateDatabaseConfig(requestParameters.engineName, requestParameters.orgName, requestParameters.clusterName, requestParameters.databaseName, requestParameters.requestBody, options).then((request) => request(this.axios, this.basePath));
    }
}
exports.RdbmsApi = RdbmsApi;
//# sourceMappingURL=rdbms-api.js.map