"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.RestoreApi = exports.RestoreApiFactory = exports.RestoreApiFp = exports.RestoreApiAxiosParamCreator = 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");
/**
 * RestoreApi - axios parameter creator
 * @export
 */
const RestoreApiAxiosParamCreator = function (configuration) {
    return {
        /**
         *
         * @summary Delete restore task
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {string} restoreName name of the restore
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteRestoreObject: async (orgName, clusterName, restoreName, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('deleteRestoreObject', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('deleteRestoreObject', 'clusterName', clusterName);
            // verify required parameter 'restoreName' is not null or undefined
            (0, common_1.assertParamExists)('deleteRestoreObject', 'restoreName', restoreName);
            const localVarPath = `/admin/v1/organizations/{orgName}/clusters/{clusterName}/restore`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            if (restoreName !== undefined) {
                localVarQueryParameter['restoreName'] = restoreName;
            }
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         *
         * @summary Restore current cluster or instance
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {Restore} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        doRestore: async (orgName, clusterName, body, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('doRestore', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('doRestore', 'clusterName', clusterName);
            // verify required parameter 'body' is not null or undefined
            (0, common_1.assertParamExists)('doRestore', 'body', body);
            const localVarPath = `/admin/v1/organizations/{orgName}/clusters/{clusterName}/restore`
                .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,
            };
        },
        /**
         *
         * @summary get restore workload logs of the cluster
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {string} restoreId id of the restore
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getRestoreLog: async (orgName, clusterName, restoreId, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('getRestoreLog', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('getRestoreLog', 'clusterName', clusterName);
            // verify required parameter 'restoreId' is not null or undefined
            (0, common_1.assertParamExists)('getRestoreLog', 'restoreId', restoreId);
            const localVarPath = `/admin/v1/organizations/{orgName}/clusters/{clusterName}/restore/{restoreId}/logs`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)))
                .replace(`{${"restoreId"}}`, encodeURIComponent(String(restoreId)));
            // 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,
            };
        },
        /**
         *
         * @summary Get cluster restore time ragne
         * @param {string} orgName name of the Org
         * @param {string} clusterID ID of the KubeBlocks cluster
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getRestoreTimeRange: async (orgName, clusterID, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('getRestoreTimeRange', 'orgName', orgName);
            // verify required parameter 'clusterID' is not null or undefined
            (0, common_1.assertParamExists)('getRestoreTimeRange', 'clusterID', clusterID);
            const localVarPath = `/admin/v1/organizations/{orgName}/clustersWithDelete/restoreTimeRange`
                .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);
            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,
            };
        },
        /**
         *
         * @summary List restore tasks
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listClusterRestore: async (orgName, clusterName, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('listClusterRestore', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('listClusterRestore', 'clusterName', clusterName);
            const localVarPath = `/admin/v1/organizations/{orgName}/clusters/{clusterName}/restore`
                .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,
            };
        },
        /**
         *
         * @summary List restore tasks
         * @param {string} [orgName] name of the Org
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listRestores: async (orgName, options = {}) => {
            const localVarPath = `/admin/v1/restoreTasks`;
            // 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 (orgName !== undefined) {
                localVarQueryParameter['orgName'] = orgName;
            }
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         *
         * @summary Restore new cluster
         * @param {string} orgName name of the Org
         * @param {RestoreCreate} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        restoreCluster: async (orgName, body, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('restoreCluster', 'orgName', orgName);
            // verify required parameter 'body' is not null or undefined
            (0, common_1.assertParamExists)('restoreCluster', 'body', body);
            const localVarPath = `/admin/v1/organizations/{orgName}/restore`
                .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.RestoreApiAxiosParamCreator = RestoreApiAxiosParamCreator;
/**
 * RestoreApi - functional programming interface
 * @export
 */
const RestoreApiFp = function (configuration) {
    const localVarAxiosParamCreator = (0, exports.RestoreApiAxiosParamCreator)(configuration);
    return {
        /**
         *
         * @summary Delete restore task
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {string} restoreName name of the restore
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deleteRestoreObject(orgName, clusterName, restoreName, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.deleteRestoreObject(orgName, clusterName, restoreName, 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['RestoreApi.deleteRestoreObject']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         *
         * @summary Restore current cluster or instance
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {Restore} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async doRestore(orgName, clusterName, body, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.doRestore(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['RestoreApi.doRestore']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         *
         * @summary get restore workload logs of the cluster
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {string} restoreId id of the restore
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getRestoreLog(orgName, clusterName, restoreId, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.getRestoreLog(orgName, clusterName, restoreId, 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['RestoreApi.getRestoreLog']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         *
         * @summary Get cluster restore time ragne
         * @param {string} orgName name of the Org
         * @param {string} clusterID ID of the KubeBlocks cluster
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getRestoreTimeRange(orgName, clusterID, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.getRestoreTimeRange(orgName, 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['RestoreApi.getRestoreTimeRange']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         *
         * @summary List restore tasks
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listClusterRestore(orgName, clusterName, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.listClusterRestore(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['RestoreApi.listClusterRestore']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         *
         * @summary List restore tasks
         * @param {string} [orgName] name of the Org
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listRestores(orgName, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.listRestores(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['RestoreApi.listRestores']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         *
         * @summary Restore new cluster
         * @param {string} orgName name of the Org
         * @param {RestoreCreate} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async restoreCluster(orgName, body, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.restoreCluster(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['RestoreApi.restoreCluster']) === 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.RestoreApiFp = RestoreApiFp;
/**
 * RestoreApi - factory interface
 * @export
 */
const RestoreApiFactory = function (configuration, basePath, axios) {
    const localVarFp = (0, exports.RestoreApiFp)(configuration);
    return {
        /**
         *
         * @summary Delete restore task
         * @param {RestoreApiDeleteRestoreObjectRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteRestoreObject(requestParameters, options) {
            return localVarFp.deleteRestoreObject(requestParameters.orgName, requestParameters.clusterName, requestParameters.restoreName, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Restore current cluster or instance
         * @param {RestoreApiDoRestoreRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        doRestore(requestParameters, options) {
            return localVarFp.doRestore(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary get restore workload logs of the cluster
         * @param {RestoreApiGetRestoreLogRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getRestoreLog(requestParameters, options) {
            return localVarFp.getRestoreLog(requestParameters.orgName, requestParameters.clusterName, requestParameters.restoreId, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Get cluster restore time ragne
         * @param {RestoreApiGetRestoreTimeRangeRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getRestoreTimeRange(requestParameters, options) {
            return localVarFp.getRestoreTimeRange(requestParameters.orgName, requestParameters.clusterID, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary List restore tasks
         * @param {RestoreApiListClusterRestoreRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listClusterRestore(requestParameters, options) {
            return localVarFp.listClusterRestore(requestParameters.orgName, requestParameters.clusterName, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary List restore tasks
         * @param {RestoreApiListRestoresRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listRestores(requestParameters = {}, options) {
            return localVarFp.listRestores(requestParameters.orgName, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Restore new cluster
         * @param {RestoreApiRestoreClusterRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        restoreCluster(requestParameters, options) {
            return localVarFp.restoreCluster(requestParameters.orgName, requestParameters.body, options).then((request) => request(axios, basePath));
        },
    };
};
exports.RestoreApiFactory = RestoreApiFactory;
/**
 * RestoreApi - object-oriented interface
 * @export
 * @class RestoreApi
 * @extends {BaseAPI}
 */
class RestoreApi extends base_1.BaseAPI {
    /**
     *
     * @summary Delete restore task
     * @param {RestoreApiDeleteRestoreObjectRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof RestoreApi
     */
    deleteRestoreObject(requestParameters, options) {
        return (0, exports.RestoreApiFp)(this.configuration).deleteRestoreObject(requestParameters.orgName, requestParameters.clusterName, requestParameters.restoreName, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Restore current cluster or instance
     * @param {RestoreApiDoRestoreRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof RestoreApi
     */
    doRestore(requestParameters, options) {
        return (0, exports.RestoreApiFp)(this.configuration).doRestore(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary get restore workload logs of the cluster
     * @param {RestoreApiGetRestoreLogRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof RestoreApi
     */
    getRestoreLog(requestParameters, options) {
        return (0, exports.RestoreApiFp)(this.configuration).getRestoreLog(requestParameters.orgName, requestParameters.clusterName, requestParameters.restoreId, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Get cluster restore time ragne
     * @param {RestoreApiGetRestoreTimeRangeRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof RestoreApi
     */
    getRestoreTimeRange(requestParameters, options) {
        return (0, exports.RestoreApiFp)(this.configuration).getRestoreTimeRange(requestParameters.orgName, requestParameters.clusterID, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary List restore tasks
     * @param {RestoreApiListClusterRestoreRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof RestoreApi
     */
    listClusterRestore(requestParameters, options) {
        return (0, exports.RestoreApiFp)(this.configuration).listClusterRestore(requestParameters.orgName, requestParameters.clusterName, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary List restore tasks
     * @param {RestoreApiListRestoresRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof RestoreApi
     */
    listRestores(requestParameters = {}, options) {
        return (0, exports.RestoreApiFp)(this.configuration).listRestores(requestParameters.orgName, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Restore new cluster
     * @param {RestoreApiRestoreClusterRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof RestoreApi
     */
    restoreCluster(requestParameters, options) {
        return (0, exports.RestoreApiFp)(this.configuration).restoreCluster(requestParameters.orgName, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
    }
}
exports.RestoreApi = RestoreApi;
//# sourceMappingURL=restore-api.js.map