"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.DisasterRecoveryApi = exports.DisasterRecoveryApiFactory = exports.DisasterRecoveryApiFp = exports.DisasterRecoveryApiAxiosParamCreator = 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");
/**
 * DisasterRecoveryApi - axios parameter creator
 * @export
 */
const DisasterRecoveryApiAxiosParamCreator = function (configuration) {
    return {
        /**
         * Create a new disaster recovery instance for a database cluster.
         * @summary Create a new disaster recovery instance
         * @param {string} parentClusterID The ID of the parent database cluster
         * @param {string} orgName name of the org
         * @param {DisasterRecoveryCreate} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createDisasterRecovery: async (parentClusterID, orgName, body, options = {}) => {
            // verify required parameter 'parentClusterID' is not null or undefined
            (0, common_1.assertParamExists)('createDisasterRecovery', 'parentClusterID', parentClusterID);
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('createDisasterRecovery', 'orgName', orgName);
            // verify required parameter 'body' is not null or undefined
            (0, common_1.assertParamExists)('createDisasterRecovery', 'body', body);
            const localVarPath = `/api/v1/organizations/{orgName}/parent/{parentClusterID}/disasterRecovery`
                .replace(`{${"parentClusterID"}}`, encodeURIComponent(String(parentClusterID)))
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)));
            // 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 specific disaster recovery instance
         * @summary Delete a disaster recovery instance
         * @param {string} orgName name of the org
         * @param {string} [logicalInstanceID] The ID of the disaster recovery logical instance
         * @param {string} [clusterID] The ID of the disaster recovery cluster
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteDisasterRecovery: async (orgName, logicalInstanceID, clusterID, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('deleteDisasterRecovery', 'orgName', orgName);
            const localVarPath = `/api/v1/organizations/{orgName}/disasterRecovery`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)));
            // 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 (logicalInstanceID !== undefined) {
                localVarQueryParameter['logicalInstanceID'] = logicalInstanceID;
            }
            if (clusterID !== undefined) {
                localVarQueryParameter['clusterID'] = clusterID;
            }
            (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,
            };
        },
        /**
         * Retrieve the history of failover and failback operations for a specific disaster recovery instance.
         * @summary Get switch history of a disaster recovery instance
         * @param {string} clusterID The ID of the disaster recovery instance
         * @param {string} orgName name of the org
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getDisasterRecoveryHistory: async (clusterID, orgName, options = {}) => {
            // verify required parameter 'clusterID' is not null or undefined
            (0, common_1.assertParamExists)('getDisasterRecoveryHistory', 'clusterID', clusterID);
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('getDisasterRecoveryHistory', 'orgName', orgName);
            const localVarPath = `/api/v1/organizations/{orgName}/disasterRecovery/{clusterID}/switchHistory`
                .replace(`{${"clusterID"}}`, encodeURIComponent(String(clusterID)))
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)));
            // 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 detailed information about the status of a specific disaster recovery instance, including delay and current replication point.
         * @summary Retrieve Disaster Recovery Instance Status
         * @param {string} clusterID Unique identifier of the disaster recovery instance
         * @param {string} orgName Name of the organization
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getDisasterRecoveryStatus: async (clusterID, orgName, options = {}) => {
            // verify required parameter 'clusterID' is not null or undefined
            (0, common_1.assertParamExists)('getDisasterRecoveryStatus', 'clusterID', clusterID);
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('getDisasterRecoveryStatus', 'orgName', orgName);
            const localVarPath = `/api/v1/organizations/{orgName}/disasterRecovery/{clusterID}/status`
                .replace(`{${"clusterID"}}`, encodeURIComponent(String(clusterID)))
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)));
            // 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,
            };
        },
        /**
         * Retrieve a list of disaster recovery instances for a specific database cluster.
         * @summary List Disaster Recovery instances under the main cluster
         * @param {string} parentClusterID The ID of the parent database cluster
         * @param {string} orgName name of the org
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listDisasterRecovery: async (parentClusterID, orgName, options = {}) => {
            // verify required parameter 'parentClusterID' is not null or undefined
            (0, common_1.assertParamExists)('listDisasterRecovery', 'parentClusterID', parentClusterID);
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('listDisasterRecovery', 'orgName', orgName);
            const localVarPath = `/api/v1/organizations/{orgName}/parent/{parentClusterID}/disasterRecovery`
                .replace(`{${"parentClusterID"}}`, encodeURIComponent(String(parentClusterID)))
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)));
            // 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,
            };
        },
        /**
         * Promote the disaster recovery instance to the primary database instance.
         * @summary Promote a disaster recovery instance to the main instance
         * @param {string} clusterID The ID of the disaster recovery instance
         * @param {string} orgName name of the org
         * @param {DisasterRecoveryPromote} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        promoteDisasterRecovery: async (clusterID, orgName, body, options = {}) => {
            // verify required parameter 'clusterID' is not null or undefined
            (0, common_1.assertParamExists)('promoteDisasterRecovery', 'clusterID', clusterID);
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('promoteDisasterRecovery', 'orgName', orgName);
            // verify required parameter 'body' is not null or undefined
            (0, common_1.assertParamExists)('promoteDisasterRecovery', 'body', body);
            const localVarPath = `/api/v1/organizations/{orgName}/disasterRecovery/{clusterID}/promote`
                .replace(`{${"clusterID"}}`, encodeURIComponent(String(clusterID)))
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)));
            // 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,
            };
        },
    };
};
exports.DisasterRecoveryApiAxiosParamCreator = DisasterRecoveryApiAxiosParamCreator;
/**
 * DisasterRecoveryApi - functional programming interface
 * @export
 */
const DisasterRecoveryApiFp = function (configuration) {
    const localVarAxiosParamCreator = (0, exports.DisasterRecoveryApiAxiosParamCreator)(configuration);
    return {
        /**
         * Create a new disaster recovery instance for a database cluster.
         * @summary Create a new disaster recovery instance
         * @param {string} parentClusterID The ID of the parent database cluster
         * @param {string} orgName name of the org
         * @param {DisasterRecoveryCreate} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createDisasterRecovery(parentClusterID, orgName, body, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.createDisasterRecovery(parentClusterID, orgName, 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['DisasterRecoveryApi.createDisasterRecovery']) === 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 specific disaster recovery instance
         * @summary Delete a disaster recovery instance
         * @param {string} orgName name of the org
         * @param {string} [logicalInstanceID] The ID of the disaster recovery logical instance
         * @param {string} [clusterID] The ID of the disaster recovery cluster
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deleteDisasterRecovery(orgName, logicalInstanceID, clusterID, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.deleteDisasterRecovery(orgName, logicalInstanceID, clusterID, 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['DisasterRecoveryApi.deleteDisasterRecovery']) === 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);
        },
        /**
         * Retrieve the history of failover and failback operations for a specific disaster recovery instance.
         * @summary Get switch history of a disaster recovery instance
         * @param {string} clusterID The ID of the disaster recovery instance
         * @param {string} orgName name of the org
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getDisasterRecoveryHistory(clusterID, orgName, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.getDisasterRecoveryHistory(clusterID, orgName, 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['DisasterRecoveryApi.getDisasterRecoveryHistory']) === 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 detailed information about the status of a specific disaster recovery instance, including delay and current replication point.
         * @summary Retrieve Disaster Recovery Instance Status
         * @param {string} clusterID Unique identifier of the disaster recovery instance
         * @param {string} orgName Name of the organization
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getDisasterRecoveryStatus(clusterID, orgName, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.getDisasterRecoveryStatus(clusterID, orgName, 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['DisasterRecoveryApi.getDisasterRecoveryStatus']) === 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);
        },
        /**
         * Retrieve a list of disaster recovery instances for a specific database cluster.
         * @summary List Disaster Recovery instances under the main cluster
         * @param {string} parentClusterID The ID of the parent database cluster
         * @param {string} orgName name of the org
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listDisasterRecovery(parentClusterID, orgName, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.listDisasterRecovery(parentClusterID, orgName, 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['DisasterRecoveryApi.listDisasterRecovery']) === 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);
        },
        /**
         * Promote the disaster recovery instance to the primary database instance.
         * @summary Promote a disaster recovery instance to the main instance
         * @param {string} clusterID The ID of the disaster recovery instance
         * @param {string} orgName name of the org
         * @param {DisasterRecoveryPromote} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async promoteDisasterRecovery(clusterID, orgName, body, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.promoteDisasterRecovery(clusterID, orgName, 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['DisasterRecoveryApi.promoteDisasterRecovery']) === 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.DisasterRecoveryApiFp = DisasterRecoveryApiFp;
/**
 * DisasterRecoveryApi - factory interface
 * @export
 */
const DisasterRecoveryApiFactory = function (configuration, basePath, axios) {
    const localVarFp = (0, exports.DisasterRecoveryApiFp)(configuration);
    return {
        /**
         * Create a new disaster recovery instance for a database cluster.
         * @summary Create a new disaster recovery instance
         * @param {DisasterRecoveryApiCreateDisasterRecoveryRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createDisasterRecovery(requestParameters, options) {
            return localVarFp.createDisasterRecovery(requestParameters.parentClusterID, requestParameters.orgName, requestParameters.body, options).then((request) => request(axios, basePath));
        },
        /**
         * Delete a specific disaster recovery instance
         * @summary Delete a disaster recovery instance
         * @param {DisasterRecoveryApiDeleteDisasterRecoveryRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteDisasterRecovery(requestParameters, options) {
            return localVarFp.deleteDisasterRecovery(requestParameters.orgName, requestParameters.logicalInstanceID, requestParameters.clusterID, options).then((request) => request(axios, basePath));
        },
        /**
         * Retrieve the history of failover and failback operations for a specific disaster recovery instance.
         * @summary Get switch history of a disaster recovery instance
         * @param {DisasterRecoveryApiGetDisasterRecoveryHistoryRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getDisasterRecoveryHistory(requestParameters, options) {
            return localVarFp.getDisasterRecoveryHistory(requestParameters.clusterID, requestParameters.orgName, options).then((request) => request(axios, basePath));
        },
        /**
         * Get detailed information about the status of a specific disaster recovery instance, including delay and current replication point.
         * @summary Retrieve Disaster Recovery Instance Status
         * @param {DisasterRecoveryApiGetDisasterRecoveryStatusRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getDisasterRecoveryStatus(requestParameters, options) {
            return localVarFp.getDisasterRecoveryStatus(requestParameters.clusterID, requestParameters.orgName, options).then((request) => request(axios, basePath));
        },
        /**
         * Retrieve a list of disaster recovery instances for a specific database cluster.
         * @summary List Disaster Recovery instances under the main cluster
         * @param {DisasterRecoveryApiListDisasterRecoveryRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listDisasterRecovery(requestParameters, options) {
            return localVarFp.listDisasterRecovery(requestParameters.parentClusterID, requestParameters.orgName, options).then((request) => request(axios, basePath));
        },
        /**
         * Promote the disaster recovery instance to the primary database instance.
         * @summary Promote a disaster recovery instance to the main instance
         * @param {DisasterRecoveryApiPromoteDisasterRecoveryRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        promoteDisasterRecovery(requestParameters, options) {
            return localVarFp.promoteDisasterRecovery(requestParameters.clusterID, requestParameters.orgName, requestParameters.body, options).then((request) => request(axios, basePath));
        },
    };
};
exports.DisasterRecoveryApiFactory = DisasterRecoveryApiFactory;
/**
 * DisasterRecoveryApi - object-oriented interface
 * @export
 * @class DisasterRecoveryApi
 * @extends {BaseAPI}
 */
class DisasterRecoveryApi extends base_1.BaseAPI {
    /**
     * Create a new disaster recovery instance for a database cluster.
     * @summary Create a new disaster recovery instance
     * @param {DisasterRecoveryApiCreateDisasterRecoveryRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DisasterRecoveryApi
     */
    createDisasterRecovery(requestParameters, options) {
        return (0, exports.DisasterRecoveryApiFp)(this.configuration).createDisasterRecovery(requestParameters.parentClusterID, requestParameters.orgName, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     * Delete a specific disaster recovery instance
     * @summary Delete a disaster recovery instance
     * @param {DisasterRecoveryApiDeleteDisasterRecoveryRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DisasterRecoveryApi
     */
    deleteDisasterRecovery(requestParameters, options) {
        return (0, exports.DisasterRecoveryApiFp)(this.configuration).deleteDisasterRecovery(requestParameters.orgName, requestParameters.logicalInstanceID, requestParameters.clusterID, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     * Retrieve the history of failover and failback operations for a specific disaster recovery instance.
     * @summary Get switch history of a disaster recovery instance
     * @param {DisasterRecoveryApiGetDisasterRecoveryHistoryRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DisasterRecoveryApi
     */
    getDisasterRecoveryHistory(requestParameters, options) {
        return (0, exports.DisasterRecoveryApiFp)(this.configuration).getDisasterRecoveryHistory(requestParameters.clusterID, requestParameters.orgName, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     * Get detailed information about the status of a specific disaster recovery instance, including delay and current replication point.
     * @summary Retrieve Disaster Recovery Instance Status
     * @param {DisasterRecoveryApiGetDisasterRecoveryStatusRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DisasterRecoveryApi
     */
    getDisasterRecoveryStatus(requestParameters, options) {
        return (0, exports.DisasterRecoveryApiFp)(this.configuration).getDisasterRecoveryStatus(requestParameters.clusterID, requestParameters.orgName, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     * Retrieve a list of disaster recovery instances for a specific database cluster.
     * @summary List Disaster Recovery instances under the main cluster
     * @param {DisasterRecoveryApiListDisasterRecoveryRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DisasterRecoveryApi
     */
    listDisasterRecovery(requestParameters, options) {
        return (0, exports.DisasterRecoveryApiFp)(this.configuration).listDisasterRecovery(requestParameters.parentClusterID, requestParameters.orgName, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     * Promote the disaster recovery instance to the primary database instance.
     * @summary Promote a disaster recovery instance to the main instance
     * @param {DisasterRecoveryApiPromoteDisasterRecoveryRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DisasterRecoveryApi
     */
    promoteDisasterRecovery(requestParameters, options) {
        return (0, exports.DisasterRecoveryApiFp)(this.configuration).promoteDisasterRecovery(requestParameters.clusterID, requestParameters.orgName, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
    }
}
exports.DisasterRecoveryApi = DisasterRecoveryApi;
//# sourceMappingURL=disaster-recovery-api.js.map