"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.BackupApi = exports.BackupApiFactory = exports.BackupApiFp = exports.BackupApiAxiosParamCreator = 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");
/**
 * BackupApi - axios parameter creator
 * @export
 */
const BackupApiAxiosParamCreator = function (configuration) {
    return {
        /**
         *
         * @summary build backup object with a existing backup directory
         * @param {string} orgName name of the Org
         * @param {string} environmentName name of the environment
         * @param {string} engineName name of the engine
         * @param {BuildBackupObjRequest} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        buildBackupObj: async (orgName, environmentName, engineName, body, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('buildBackupObj', 'orgName', orgName);
            // verify required parameter 'environmentName' is not null or undefined
            (0, common_1.assertParamExists)('buildBackupObj', 'environmentName', environmentName);
            // verify required parameter 'engineName' is not null or undefined
            (0, common_1.assertParamExists)('buildBackupObj', 'engineName', engineName);
            // verify required parameter 'body' is not null or undefined
            (0, common_1.assertParamExists)('buildBackupObj', 'body', body);
            const localVarPath = `/api/v1/environments/{environmentName}/organizations/{orgName}/engines/{engineName}/buildBackup`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"environmentName"}}`, encodeURIComponent(String(environmentName)))
                .replace(`{${"engineName"}}`, encodeURIComponent(String(engineName)));
            // 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 Create backup schedule
         * @param {string} orgName name of the org
         * @param {string} clusterName name of the cluster
         * @param {BackupScheduleCreate} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createBackupSchedule: async (orgName, clusterName, body, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('createBackupSchedule', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('createBackupSchedule', 'clusterName', clusterName);
            // verify required parameter 'body' is not null or undefined
            (0, common_1.assertParamExists)('createBackupSchedule', 'body', body);
            const localVarPath = `/api/v1/organizations/{orgName}/clusters/{clusterName}/backupSchedules`
                .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 Create backup
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {BackupCreate} body
         * @param {string} [component] name of the component
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createClusterBackup: async (orgName, clusterName, body, component, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('createClusterBackup', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('createClusterBackup', 'clusterName', clusterName);
            // verify required parameter 'body' is not null or undefined
            (0, common_1.assertParamExists)('createClusterBackup', 'body', body);
            const localVarPath = `/api/v1/organizations/{orgName}/clusters/{clusterName}/backups`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            if (component !== undefined) {
                localVarQueryParameter['component'] = component;
            }
            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 Delete backup
         * @param {string} orgName name of the Org
         * @param {string} backupId id of the Backup
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteBackup: async (orgName, backupId, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('deleteBackup', 'orgName', orgName);
            // verify required parameter 'backupId' is not null or undefined
            (0, common_1.assertParamExists)('deleteBackup', 'backupId', backupId);
            const localVarPath = `/api/v1/organizations/{orgName}/backups/{backupId}`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"backupId"}}`, encodeURIComponent(String(backupId)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         *
         * @summary Delete backup schedule
         * @param {string} orgName name of the org
         * @param {string} clusterName name of the cluster
         * @param {string} scheduleName name of the backup schedule
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteBackupSchedule: async (orgName, clusterName, scheduleName, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('deleteBackupSchedule', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('deleteBackupSchedule', 'clusterName', clusterName);
            // verify required parameter 'scheduleName' is not null or undefined
            (0, common_1.assertParamExists)('deleteBackupSchedule', 'scheduleName', scheduleName);
            const localVarPath = `/api/v1/organizations/{orgName}/clusters/{clusterName}/backupSchedules/{scheduleName}`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)))
                .replace(`{${"scheduleName"}}`, encodeURIComponent(String(scheduleName)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         *
         * @summary Download full backup
         * @param {string} orgName name of the org
         * @param {string} backupId the id of backup
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        downloadBackup: async (orgName, backupId, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('downloadBackup', 'orgName', orgName);
            // verify required parameter 'backupId' is not null or undefined
            (0, common_1.assertParamExists)('downloadBackup', 'backupId', backupId);
            const localVarPath = `/api/v1/organizations/{orgName}/backups/{backupId}/download`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"backupId"}}`, encodeURIComponent(String(backupId)));
            // 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 Download multiple backup files
         * @param {string} orgName name of the org
         * @param {string} backupId the id of backup
         * @param {BackupDownload} backupDownload
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        downloadMultipleBackups: async (orgName, backupId, backupDownload, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('downloadMultipleBackups', 'orgName', orgName);
            // verify required parameter 'backupId' is not null or undefined
            (0, common_1.assertParamExists)('downloadMultipleBackups', 'backupId', backupId);
            // verify required parameter 'backupDownload' is not null or undefined
            (0, common_1.assertParamExists)('downloadMultipleBackups', 'backupDownload', backupDownload);
            const localVarPath = `/api/v1/organizations/{orgName}/backups/{backupId}/download`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"backupId"}}`, encodeURIComponent(String(backupId)));
            // 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)(backupDownload, localVarRequestOptions, configuration);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         *
         * @summary Get backup
         * @param {string} orgName name of the Org
         * @param {string} backupId id of the Backup
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getBackup: async (orgName, backupId, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('getBackup', 'orgName', orgName);
            // verify required parameter 'backupId' is not null or undefined
            (0, common_1.assertParamExists)('getBackup', 'backupId', backupId);
            const localVarPath = `/api/v1/organizations/{orgName}/backups/{backupId}`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"backupId"}}`, encodeURIComponent(String(backupId)));
            // 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 backup log
         * @param {string} orgName name of the Org
         * @param {string} backupId id of the Backup
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getBackupLog: async (orgName, backupId, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('getBackupLog', 'orgName', orgName);
            // verify required parameter 'backupId' is not null or undefined
            (0, common_1.assertParamExists)('getBackupLog', 'backupId', backupId);
            const localVarPath = `/api/v1/organizations/{orgName}/backups/{backupId}/logs`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"backupId"}}`, encodeURIComponent(String(backupId)));
            // 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 backup statistics
         * @param {string} orgName name of the Org
         * @param {string} [clusterID] id of the Cluster
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getBackupStats: async (orgName, clusterID, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('getBackupStats', 'orgName', orgName);
            const localVarPath = `/api/v1/organizations/{orgName}/backupStats`
                .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 Get backup policy
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {boolean} [useVolumeSnapshot] use volume snapshot to back up
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getClusterBackupPolicy: async (orgName, clusterName, useVolumeSnapshot, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('getClusterBackupPolicy', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('getClusterBackupPolicy', 'clusterName', clusterName);
            const localVarPath = `/api/v1/organizations/{orgName}/clusters/{clusterName}/backupPolicy`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            if (useVolumeSnapshot !== undefined) {
                localVarQueryParameter['useVolumeSnapshot'] = useVolumeSnapshot;
            }
            (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 backup schedules
         * @param {string} orgName name of the org
         * @param {string} clusterName name of the cluster
         * @param {string} [backupMethod] filter by backup method
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listBackupSchedules: async (orgName, clusterName, backupMethod, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('listBackupSchedules', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('listBackupSchedules', 'clusterName', clusterName);
            const localVarPath = `/api/v1/organizations/{orgName}/clusters/{clusterName}/backupSchedules`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            if (backupMethod !== undefined) {
                localVarQueryParameter['backupMethod'] = backupMethod;
            }
            (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 backups
         * @param {string} orgName name of the Org
         * @param {string} [clusterName] cluster name of the Backup
         * @param {string} [clusterID] cluster ID of the Backup
         * @param {string} [backupRepo] backup repo of the Backup
         * @param {boolean} [fetchWithDeletedCluster] defined whether to search for deleted clusters. if not set, returns all backups
         * @param {boolean} [withDeletedBackups] defined whether to search for deleted backups. if not set, only return backups that are not deleted
         * @param {boolean} [withRestoreCluster] defined whether to search for restore backups.
         * @param {string} [backupType] type of the backup
         * @param {boolean} [withRebuildInstance] defined whether to search for rebuilding instance.
         * @param {boolean} [withHScale] defined whether to search for hScale instance.
         * @param {string} [componentName] get the backups belong to the component
         * @param {number} [page] page number
         * @param {number} [pageSize] page size
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listBackups: async (orgName, clusterName, clusterID, backupRepo, fetchWithDeletedCluster, withDeletedBackups, withRestoreCluster, backupType, withRebuildInstance, withHScale, componentName, page, pageSize, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('listBackups', 'orgName', orgName);
            const localVarPath = `/api/v1/organizations/{orgName}/backups`
                .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 (clusterName !== undefined) {
                localVarQueryParameter['clusterName'] = clusterName;
            }
            if (clusterID !== undefined) {
                localVarQueryParameter['clusterID'] = clusterID;
            }
            if (backupRepo !== undefined) {
                localVarQueryParameter['backupRepo'] = backupRepo;
            }
            if (fetchWithDeletedCluster !== undefined) {
                localVarQueryParameter['fetchWithDeletedCluster'] = fetchWithDeletedCluster;
            }
            if (withDeletedBackups !== undefined) {
                localVarQueryParameter['withDeletedBackups'] = withDeletedBackups;
            }
            if (withRestoreCluster !== undefined) {
                localVarQueryParameter['withRestoreCluster'] = withRestoreCluster;
            }
            if (backupType !== undefined) {
                localVarQueryParameter['backupType'] = backupType;
            }
            if (withRebuildInstance !== undefined) {
                localVarQueryParameter['withRebuildInstance'] = withRebuildInstance;
            }
            if (withHScale !== undefined) {
                localVarQueryParameter['withHScale'] = withHScale;
            }
            if (componentName !== undefined) {
                localVarQueryParameter['componentName'] = componentName;
            }
            if (page !== undefined) {
                localVarQueryParameter['page'] = page;
            }
            if (pageSize !== undefined) {
                localVarQueryParameter['pageSize'] = pageSize;
            }
            (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 objects tree for selective backup
         * @param {string} orgName name of the org
         * @param {string} clusterName name of the cluster
         * @param {string} [database] database name
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listObjectsTreeForSelectiveBackup: async (orgName, clusterName, database, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('listObjectsTreeForSelectiveBackup', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('listObjectsTreeForSelectiveBackup', 'clusterName', clusterName);
            const localVarPath = `/api/v1/organizations/{orgName}/clusters/{clusterName}/listObjectsForSelectiveBackup`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            if (database !== undefined) {
                localVarQueryParameter['database'] = database;
            }
            (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,
            };
        },
        /**
         * partially update the specified Backup Policy
         * @summary Update backup policy
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {BackupPolicy} body
         * @param {boolean} [useVolumeSnapshot] use volume snapshot to back up
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateBackupPolicy: async (orgName, clusterName, body, useVolumeSnapshot, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('updateBackupPolicy', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('updateBackupPolicy', 'clusterName', clusterName);
            // verify required parameter 'body' is not null or undefined
            (0, common_1.assertParamExists)('updateBackupPolicy', 'body', body);
            const localVarPath = `/api/v1/organizations/{orgName}/clusters/{clusterName}/backupPolicy`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            if (useVolumeSnapshot !== undefined) {
                localVarQueryParameter['useVolumeSnapshot'] = useVolumeSnapshot;
            }
            localVarHeaderParameter['Content-Type'] = 'application/json';
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         *
         * @summary Update backup schedule
         * @param {string} orgName name of the org
         * @param {string} clusterName name of the cluster
         * @param {string} scheduleName name of the backup schedule
         * @param {BackupScheduleUpdate} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateBackupSchedule: async (orgName, clusterName, scheduleName, body, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('updateBackupSchedule', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('updateBackupSchedule', 'clusterName', clusterName);
            // verify required parameter 'scheduleName' is not null or undefined
            (0, common_1.assertParamExists)('updateBackupSchedule', 'scheduleName', scheduleName);
            // verify required parameter 'body' is not null or undefined
            (0, common_1.assertParamExists)('updateBackupSchedule', 'body', body);
            const localVarPath = `/api/v1/organizations/{orgName}/clusters/{clusterName}/backupSchedules/{scheduleName}`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)))
                .replace(`{${"scheduleName"}}`, encodeURIComponent(String(scheduleName)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            localVarHeaderParameter['Content-Type'] = 'application/json';
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         *
         * @summary view backup info
         * @param {string} orgName name of the org
         * @param {string} backupId the id of backup
         * @param {BackupView} [backupView]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        viewBackup: async (orgName, backupId, backupView, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('viewBackup', 'orgName', orgName);
            // verify required parameter 'backupId' is not null or undefined
            (0, common_1.assertParamExists)('viewBackup', 'backupId', backupId);
            const localVarPath = `/api/v1/organizations/{orgName}/backups/{backupId}/view`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"backupId"}}`, encodeURIComponent(String(backupId)));
            // 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)(backupView, localVarRequestOptions, configuration);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
    };
};
exports.BackupApiAxiosParamCreator = BackupApiAxiosParamCreator;
/**
 * BackupApi - functional programming interface
 * @export
 */
const BackupApiFp = function (configuration) {
    const localVarAxiosParamCreator = (0, exports.BackupApiAxiosParamCreator)(configuration);
    return {
        /**
         *
         * @summary build backup object with a existing backup directory
         * @param {string} orgName name of the Org
         * @param {string} environmentName name of the environment
         * @param {string} engineName name of the engine
         * @param {BuildBackupObjRequest} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async buildBackupObj(orgName, environmentName, engineName, body, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.buildBackupObj(orgName, environmentName, engineName, 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['BackupApi.buildBackupObj']) === 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 Create backup schedule
         * @param {string} orgName name of the org
         * @param {string} clusterName name of the cluster
         * @param {BackupScheduleCreate} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createBackupSchedule(orgName, clusterName, body, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.createBackupSchedule(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['BackupApi.createBackupSchedule']) === 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 Create backup
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {BackupCreate} body
         * @param {string} [component] name of the component
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createClusterBackup(orgName, clusterName, body, component, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.createClusterBackup(orgName, clusterName, body, component, options);
            const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
            const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['BackupApi.createClusterBackup']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         *
         * @summary Delete backup
         * @param {string} orgName name of the Org
         * @param {string} backupId id of the Backup
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deleteBackup(orgName, backupId, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.deleteBackup(orgName, backupId, 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['BackupApi.deleteBackup']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         *
         * @summary Delete backup schedule
         * @param {string} orgName name of the org
         * @param {string} clusterName name of the cluster
         * @param {string} scheduleName name of the backup schedule
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deleteBackupSchedule(orgName, clusterName, scheduleName, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.deleteBackupSchedule(orgName, clusterName, scheduleName, 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['BackupApi.deleteBackupSchedule']) === 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 Download full backup
         * @param {string} orgName name of the org
         * @param {string} backupId the id of backup
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async downloadBackup(orgName, backupId, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.downloadBackup(orgName, backupId, 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['BackupApi.downloadBackup']) === 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 Download multiple backup files
         * @param {string} orgName name of the org
         * @param {string} backupId the id of backup
         * @param {BackupDownload} backupDownload
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async downloadMultipleBackups(orgName, backupId, backupDownload, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.downloadMultipleBackups(orgName, backupId, backupDownload, 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['BackupApi.downloadMultipleBackups']) === 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 backup
         * @param {string} orgName name of the Org
         * @param {string} backupId id of the Backup
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getBackup(orgName, backupId, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.getBackup(orgName, backupId, 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['BackupApi.getBackup']) === 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 backup log
         * @param {string} orgName name of the Org
         * @param {string} backupId id of the Backup
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getBackupLog(orgName, backupId, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.getBackupLog(orgName, backupId, 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['BackupApi.getBackupLog']) === 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 backup statistics
         * @param {string} orgName name of the Org
         * @param {string} [clusterID] id of the Cluster
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getBackupStats(orgName, clusterID, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.getBackupStats(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['BackupApi.getBackupStats']) === 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 backup policy
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {boolean} [useVolumeSnapshot] use volume snapshot to back up
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getClusterBackupPolicy(orgName, clusterName, useVolumeSnapshot, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.getClusterBackupPolicy(orgName, clusterName, useVolumeSnapshot, 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['BackupApi.getClusterBackupPolicy']) === 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 backup schedules
         * @param {string} orgName name of the org
         * @param {string} clusterName name of the cluster
         * @param {string} [backupMethod] filter by backup method
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listBackupSchedules(orgName, clusterName, backupMethod, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.listBackupSchedules(orgName, clusterName, backupMethod, 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['BackupApi.listBackupSchedules']) === 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 backups
         * @param {string} orgName name of the Org
         * @param {string} [clusterName] cluster name of the Backup
         * @param {string} [clusterID] cluster ID of the Backup
         * @param {string} [backupRepo] backup repo of the Backup
         * @param {boolean} [fetchWithDeletedCluster] defined whether to search for deleted clusters. if not set, returns all backups
         * @param {boolean} [withDeletedBackups] defined whether to search for deleted backups. if not set, only return backups that are not deleted
         * @param {boolean} [withRestoreCluster] defined whether to search for restore backups.
         * @param {string} [backupType] type of the backup
         * @param {boolean} [withRebuildInstance] defined whether to search for rebuilding instance.
         * @param {boolean} [withHScale] defined whether to search for hScale instance.
         * @param {string} [componentName] get the backups belong to the component
         * @param {number} [page] page number
         * @param {number} [pageSize] page size
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listBackups(orgName, clusterName, clusterID, backupRepo, fetchWithDeletedCluster, withDeletedBackups, withRestoreCluster, backupType, withRebuildInstance, withHScale, componentName, page, pageSize, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.listBackups(orgName, clusterName, clusterID, backupRepo, fetchWithDeletedCluster, withDeletedBackups, withRestoreCluster, backupType, withRebuildInstance, withHScale, componentName, page, pageSize, 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['BackupApi.listBackups']) === 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 objects tree for selective backup
         * @param {string} orgName name of the org
         * @param {string} clusterName name of the cluster
         * @param {string} [database] database name
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listObjectsTreeForSelectiveBackup(orgName, clusterName, database, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.listObjectsTreeForSelectiveBackup(orgName, clusterName, database, 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['BackupApi.listObjectsTreeForSelectiveBackup']) === 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);
        },
        /**
         * partially update the specified Backup Policy
         * @summary Update backup policy
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {BackupPolicy} body
         * @param {boolean} [useVolumeSnapshot] use volume snapshot to back up
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async updateBackupPolicy(orgName, clusterName, body, useVolumeSnapshot, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.updateBackupPolicy(orgName, clusterName, body, useVolumeSnapshot, 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['BackupApi.updateBackupPolicy']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         *
         * @summary Update backup schedule
         * @param {string} orgName name of the org
         * @param {string} clusterName name of the cluster
         * @param {string} scheduleName name of the backup schedule
         * @param {BackupScheduleUpdate} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async updateBackupSchedule(orgName, clusterName, scheduleName, body, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.updateBackupSchedule(orgName, clusterName, scheduleName, 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['BackupApi.updateBackupSchedule']) === 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 view backup info
         * @param {string} orgName name of the org
         * @param {string} backupId the id of backup
         * @param {BackupView} [backupView]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async viewBackup(orgName, backupId, backupView, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.viewBackup(orgName, backupId, backupView, 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['BackupApi.viewBackup']) === 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.BackupApiFp = BackupApiFp;
/**
 * BackupApi - factory interface
 * @export
 */
const BackupApiFactory = function (configuration, basePath, axios) {
    const localVarFp = (0, exports.BackupApiFp)(configuration);
    return {
        /**
         *
         * @summary build backup object with a existing backup directory
         * @param {BackupApiBuildBackupObjRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        buildBackupObj(requestParameters, options) {
            return localVarFp.buildBackupObj(requestParameters.orgName, requestParameters.environmentName, requestParameters.engineName, requestParameters.body, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Create backup schedule
         * @param {BackupApiCreateBackupScheduleRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createBackupSchedule(requestParameters, options) {
            return localVarFp.createBackupSchedule(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Create backup
         * @param {BackupApiCreateClusterBackupRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createClusterBackup(requestParameters, options) {
            return localVarFp.createClusterBackup(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, requestParameters.component, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Delete backup
         * @param {BackupApiDeleteBackupRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteBackup(requestParameters, options) {
            return localVarFp.deleteBackup(requestParameters.orgName, requestParameters.backupId, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Delete backup schedule
         * @param {BackupApiDeleteBackupScheduleRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteBackupSchedule(requestParameters, options) {
            return localVarFp.deleteBackupSchedule(requestParameters.orgName, requestParameters.clusterName, requestParameters.scheduleName, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Download full backup
         * @param {BackupApiDownloadBackupRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        downloadBackup(requestParameters, options) {
            return localVarFp.downloadBackup(requestParameters.orgName, requestParameters.backupId, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Download multiple backup files
         * @param {BackupApiDownloadMultipleBackupsRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        downloadMultipleBackups(requestParameters, options) {
            return localVarFp.downloadMultipleBackups(requestParameters.orgName, requestParameters.backupId, requestParameters.backupDownload, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Get backup
         * @param {BackupApiGetBackupRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getBackup(requestParameters, options) {
            return localVarFp.getBackup(requestParameters.orgName, requestParameters.backupId, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Get backup log
         * @param {BackupApiGetBackupLogRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getBackupLog(requestParameters, options) {
            return localVarFp.getBackupLog(requestParameters.orgName, requestParameters.backupId, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Get backup statistics
         * @param {BackupApiGetBackupStatsRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getBackupStats(requestParameters, options) {
            return localVarFp.getBackupStats(requestParameters.orgName, requestParameters.clusterID, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Get backup policy
         * @param {BackupApiGetClusterBackupPolicyRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getClusterBackupPolicy(requestParameters, options) {
            return localVarFp.getClusterBackupPolicy(requestParameters.orgName, requestParameters.clusterName, requestParameters.useVolumeSnapshot, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary List backup schedules
         * @param {BackupApiListBackupSchedulesRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listBackupSchedules(requestParameters, options) {
            return localVarFp.listBackupSchedules(requestParameters.orgName, requestParameters.clusterName, requestParameters.backupMethod, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary List backups
         * @param {BackupApiListBackupsRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listBackups(requestParameters, options) {
            return localVarFp.listBackups(requestParameters.orgName, requestParameters.clusterName, requestParameters.clusterID, requestParameters.backupRepo, requestParameters.fetchWithDeletedCluster, requestParameters.withDeletedBackups, requestParameters.withRestoreCluster, requestParameters.backupType, requestParameters.withRebuildInstance, requestParameters.withHScale, requestParameters.componentName, requestParameters.page, requestParameters.pageSize, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary List objects tree for selective backup
         * @param {BackupApiListObjectsTreeForSelectiveBackupRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listObjectsTreeForSelectiveBackup(requestParameters, options) {
            return localVarFp.listObjectsTreeForSelectiveBackup(requestParameters.orgName, requestParameters.clusterName, requestParameters.database, options).then((request) => request(axios, basePath));
        },
        /**
         * partially update the specified Backup Policy
         * @summary Update backup policy
         * @param {BackupApiUpdateBackupPolicyRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateBackupPolicy(requestParameters, options) {
            return localVarFp.updateBackupPolicy(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, requestParameters.useVolumeSnapshot, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Update backup schedule
         * @param {BackupApiUpdateBackupScheduleRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateBackupSchedule(requestParameters, options) {
            return localVarFp.updateBackupSchedule(requestParameters.orgName, requestParameters.clusterName, requestParameters.scheduleName, requestParameters.body, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary view backup info
         * @param {BackupApiViewBackupRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        viewBackup(requestParameters, options) {
            return localVarFp.viewBackup(requestParameters.orgName, requestParameters.backupId, requestParameters.backupView, options).then((request) => request(axios, basePath));
        },
    };
};
exports.BackupApiFactory = BackupApiFactory;
/**
 * BackupApi - object-oriented interface
 * @export
 * @class BackupApi
 * @extends {BaseAPI}
 */
class BackupApi extends base_1.BaseAPI {
    /**
     *
     * @summary build backup object with a existing backup directory
     * @param {BackupApiBuildBackupObjRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof BackupApi
     */
    buildBackupObj(requestParameters, options) {
        return (0, exports.BackupApiFp)(this.configuration).buildBackupObj(requestParameters.orgName, requestParameters.environmentName, requestParameters.engineName, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Create backup schedule
     * @param {BackupApiCreateBackupScheduleRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof BackupApi
     */
    createBackupSchedule(requestParameters, options) {
        return (0, exports.BackupApiFp)(this.configuration).createBackupSchedule(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Create backup
     * @param {BackupApiCreateClusterBackupRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof BackupApi
     */
    createClusterBackup(requestParameters, options) {
        return (0, exports.BackupApiFp)(this.configuration).createClusterBackup(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, requestParameters.component, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Delete backup
     * @param {BackupApiDeleteBackupRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof BackupApi
     */
    deleteBackup(requestParameters, options) {
        return (0, exports.BackupApiFp)(this.configuration).deleteBackup(requestParameters.orgName, requestParameters.backupId, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Delete backup schedule
     * @param {BackupApiDeleteBackupScheduleRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof BackupApi
     */
    deleteBackupSchedule(requestParameters, options) {
        return (0, exports.BackupApiFp)(this.configuration).deleteBackupSchedule(requestParameters.orgName, requestParameters.clusterName, requestParameters.scheduleName, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Download full backup
     * @param {BackupApiDownloadBackupRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof BackupApi
     */
    downloadBackup(requestParameters, options) {
        return (0, exports.BackupApiFp)(this.configuration).downloadBackup(requestParameters.orgName, requestParameters.backupId, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Download multiple backup files
     * @param {BackupApiDownloadMultipleBackupsRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof BackupApi
     */
    downloadMultipleBackups(requestParameters, options) {
        return (0, exports.BackupApiFp)(this.configuration).downloadMultipleBackups(requestParameters.orgName, requestParameters.backupId, requestParameters.backupDownload, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Get backup
     * @param {BackupApiGetBackupRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof BackupApi
     */
    getBackup(requestParameters, options) {
        return (0, exports.BackupApiFp)(this.configuration).getBackup(requestParameters.orgName, requestParameters.backupId, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Get backup log
     * @param {BackupApiGetBackupLogRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof BackupApi
     */
    getBackupLog(requestParameters, options) {
        return (0, exports.BackupApiFp)(this.configuration).getBackupLog(requestParameters.orgName, requestParameters.backupId, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Get backup statistics
     * @param {BackupApiGetBackupStatsRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof BackupApi
     */
    getBackupStats(requestParameters, options) {
        return (0, exports.BackupApiFp)(this.configuration).getBackupStats(requestParameters.orgName, requestParameters.clusterID, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Get backup policy
     * @param {BackupApiGetClusterBackupPolicyRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof BackupApi
     */
    getClusterBackupPolicy(requestParameters, options) {
        return (0, exports.BackupApiFp)(this.configuration).getClusterBackupPolicy(requestParameters.orgName, requestParameters.clusterName, requestParameters.useVolumeSnapshot, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary List backup schedules
     * @param {BackupApiListBackupSchedulesRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof BackupApi
     */
    listBackupSchedules(requestParameters, options) {
        return (0, exports.BackupApiFp)(this.configuration).listBackupSchedules(requestParameters.orgName, requestParameters.clusterName, requestParameters.backupMethod, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary List backups
     * @param {BackupApiListBackupsRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof BackupApi
     */
    listBackups(requestParameters, options) {
        return (0, exports.BackupApiFp)(this.configuration).listBackups(requestParameters.orgName, requestParameters.clusterName, requestParameters.clusterID, requestParameters.backupRepo, requestParameters.fetchWithDeletedCluster, requestParameters.withDeletedBackups, requestParameters.withRestoreCluster, requestParameters.backupType, requestParameters.withRebuildInstance, requestParameters.withHScale, requestParameters.componentName, requestParameters.page, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary List objects tree for selective backup
     * @param {BackupApiListObjectsTreeForSelectiveBackupRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof BackupApi
     */
    listObjectsTreeForSelectiveBackup(requestParameters, options) {
        return (0, exports.BackupApiFp)(this.configuration).listObjectsTreeForSelectiveBackup(requestParameters.orgName, requestParameters.clusterName, requestParameters.database, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     * partially update the specified Backup Policy
     * @summary Update backup policy
     * @param {BackupApiUpdateBackupPolicyRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof BackupApi
     */
    updateBackupPolicy(requestParameters, options) {
        return (0, exports.BackupApiFp)(this.configuration).updateBackupPolicy(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, requestParameters.useVolumeSnapshot, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Update backup schedule
     * @param {BackupApiUpdateBackupScheduleRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof BackupApi
     */
    updateBackupSchedule(requestParameters, options) {
        return (0, exports.BackupApiFp)(this.configuration).updateBackupSchedule(requestParameters.orgName, requestParameters.clusterName, requestParameters.scheduleName, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary view backup info
     * @param {BackupApiViewBackupRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof BackupApi
     */
    viewBackup(requestParameters, options) {
        return (0, exports.BackupApiFp)(this.configuration).viewBackup(requestParameters.orgName, requestParameters.backupId, requestParameters.backupView, options).then((request) => request(this.axios, this.basePath));
    }
}
exports.BackupApi = BackupApi;
//# sourceMappingURL=backup-api.js.map