"use strict";
/* tslint:disable */
/* eslint-disable */
/**
 * Admin API
 * The Admin API is used to manage the ApeCloud platform.
 *
 * The version of the OpenAPI document: 1.0.0
 * Contact: support@apecloud.com
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.DatabaseApi = exports.DatabaseApiFactory = exports.DatabaseApiFp = exports.DatabaseApiAxiosParamCreator = 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");
/**
 * DatabaseApi - axios parameter creator
 * @export
 */
const DatabaseApiAxiosParamCreator = function (configuration) {
    return {
        /**
         * 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 = `/admin/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 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 = `/admin/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,
            };
        },
        /**
         * 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 = `/admin/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,
            };
        },
        /**
         * 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 = `/admin/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,
            };
        },
        /**
         * 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 = `/admin/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.DatabaseApiAxiosParamCreator = DatabaseApiAxiosParamCreator;
/**
 * DatabaseApi - functional programming interface
 * @export
 */
const DatabaseApiFp = function (configuration) {
    const localVarAxiosParamCreator = (0, exports.DatabaseApiAxiosParamCreator)(configuration);
    return {
        /**
         * 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['DatabaseApi.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 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['DatabaseApi.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);
        },
        /**
         * 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['DatabaseApi.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);
        },
        /**
         * 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['DatabaseApi.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);
        },
        /**
         * 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['DatabaseApi.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.DatabaseApiFp = DatabaseApiFp;
/**
 * DatabaseApi - factory interface
 * @export
 */
const DatabaseApiFactory = function (configuration, basePath, axios) {
    const localVarFp = (0, exports.DatabaseApiFp)(configuration);
    return {
        /**
         * create a database in cluster
         * @summary Create cluster database
         * @param {DatabaseApiCreateDatabaseRequest} 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 a database in cluster
         * @summary Delete cluster database
         * @param {DatabaseApiDeleteDatabaseRequest} 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));
        },
        /**
         * get a database info in cluster
         * @param {DatabaseApiGetDatabaseRequest} 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));
        },
        /**
         * list databases for rdbms engine cluster
         * @summary List cluster databases
         * @param {DatabaseApiListDatabasesRequest} 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));
        },
        /**
         * update a database config in cluster
         * @summary update database config
         * @param {DatabaseApiUpdateDatabaseConfigRequest} 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.DatabaseApiFactory = DatabaseApiFactory;
/**
 * DatabaseApi - object-oriented interface
 * @export
 * @class DatabaseApi
 * @extends {BaseAPI}
 */
class DatabaseApi extends base_1.BaseAPI {
    /**
     * create a database in cluster
     * @summary Create cluster database
     * @param {DatabaseApiCreateDatabaseRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DatabaseApi
     */
    createDatabase(requestParameters, options) {
        return (0, exports.DatabaseApiFp)(this.configuration).createDatabase(requestParameters.engineName, requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     * delete a database in cluster
     * @summary Delete cluster database
     * @param {DatabaseApiDeleteDatabaseRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DatabaseApi
     */
    deleteDatabase(requestParameters, options) {
        return (0, exports.DatabaseApiFp)(this.configuration).deleteDatabase(requestParameters.engineName, requestParameters.orgName, requestParameters.clusterName, requestParameters.databaseName, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     * get a database info in cluster
     * @param {DatabaseApiGetDatabaseRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DatabaseApi
     */
    getDatabase(requestParameters, options) {
        return (0, exports.DatabaseApiFp)(this.configuration).getDatabase(requestParameters.engineName, requestParameters.orgName, requestParameters.clusterName, requestParameters.databaseName, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     * list databases for rdbms engine cluster
     * @summary List cluster databases
     * @param {DatabaseApiListDatabasesRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DatabaseApi
     */
    listDatabases(requestParameters, options) {
        return (0, exports.DatabaseApiFp)(this.configuration).listDatabases(requestParameters.engineName, requestParameters.orgName, requestParameters.clusterName, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     * update a database config in cluster
     * @summary update database config
     * @param {DatabaseApiUpdateDatabaseConfigRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DatabaseApi
     */
    updateDatabaseConfig(requestParameters, options) {
        return (0, exports.DatabaseApiFp)(this.configuration).updateDatabaseConfig(requestParameters.engineName, requestParameters.orgName, requestParameters.clusterName, requestParameters.databaseName, requestParameters.requestBody, options).then((request) => request(this.axios, this.basePath));
    }
}
exports.DatabaseApi = DatabaseApi;
//# sourceMappingURL=database-api.js.map