"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.OpsrequestApi = exports.OpsrequestApiFactory = exports.OpsrequestApiFp = exports.OpsrequestApiAxiosParamCreator = 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");
/**
 * OpsrequestApi - axios parameter creator
 * @export
 */
const OpsrequestApiAxiosParamCreator = function (configuration) {
    return {
        /**
         *
         * @summary Expand cluster volume size
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {OpsVolumeExpand} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        clusterVolumeExpand: async (orgName, clusterName, body, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('clusterVolumeExpand', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('clusterVolumeExpand', 'clusterName', clusterName);
            // verify required parameter 'body' is not null or undefined
            (0, common_1.assertParamExists)('clusterVolumeExpand', 'body', body);
            const localVarPath = `/api/v1/organizations/{orgName}/clusters/{clusterName}/volume-expand`
                .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 custom OpsRequest
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {OpsCustom} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        customOps: async (orgName, clusterName, body, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('customOps', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('customOps', 'clusterName', clusterName);
            // verify required parameter 'body' is not null or undefined
            (0, common_1.assertParamExists)('customOps', 'body', body);
            const localVarPath = `/api/v1/organizations/{orgName}/clusters/{clusterName}/custom-ops`
                .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 Expose cluster loadbalancer endpoint
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {OpsExpose} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        exposeCluster: async (orgName, clusterName, body, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('exposeCluster', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('exposeCluster', 'clusterName', clusterName);
            // verify required parameter 'body' is not null or undefined
            (0, common_1.assertParamExists)('exposeCluster', 'body', body);
            const localVarPath = `/api/v1/organizations/{orgName}/clusters/{clusterName}/expose`
                .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 Horizontal scale cluster
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {OpsHScale} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        horizontalScaleCluster: async (orgName, clusterName, body, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('horizontalScaleCluster', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('horizontalScaleCluster', 'clusterName', clusterName);
            // verify required parameter 'body' is not null or undefined
            (0, common_1.assertParamExists)('horizontalScaleCluster', 'body', body);
            const localVarPath = `/api/v1/organizations/{orgName}/clusters/{clusterName}/hscale`
                .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 List available nodes for rebuilding instance
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {string} name name of the instance to be rebuilt
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listAvailableNodes: async (orgName, clusterName, name, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('listAvailableNodes', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('listAvailableNodes', 'clusterName', clusterName);
            // verify required parameter 'name' is not null or undefined
            (0, common_1.assertParamExists)('listAvailableNodes', 'name', name);
            const localVarPath = `/api/v1/organizations/{orgName}/clusters/{clusterName}/rebuildInstance/availableNodes`
                .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 (name !== undefined) {
                localVarQueryParameter['name'] = name;
            }
            (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 Promote cluster intance to primary
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {OpsPromote} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        promoteCluster: async (orgName, clusterName, body, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('promoteCluster', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('promoteCluster', 'clusterName', clusterName);
            // verify required parameter 'body' is not null or undefined
            (0, common_1.assertParamExists)('promoteCluster', 'body', body);
            const localVarPath = `/api/v1/organizations/{orgName}/clusters/{clusterName}/promote`
                .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 rebuild the instance
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {OpsRebuildInstance} opsRebuildInstance
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        rebuildInstance: async (orgName, clusterName, opsRebuildInstance, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('rebuildInstance', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('rebuildInstance', 'clusterName', clusterName);
            // verify required parameter 'opsRebuildInstance' is not null or undefined
            (0, common_1.assertParamExists)('rebuildInstance', 'opsRebuildInstance', opsRebuildInstance);
            const localVarPath = `/api/v1/organizations/{orgName}/clusters/{clusterName}/rebuildInstance`
                .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)(opsRebuildInstance, localVarRequestOptions, configuration);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         *
         * @summary Update cluster configuration
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {ReconfigureCreate} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        reconfigureCluster: async (orgName, clusterName, body, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('reconfigureCluster', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('reconfigureCluster', 'clusterName', clusterName);
            // verify required parameter 'body' is not null or undefined
            (0, common_1.assertParamExists)('reconfigureCluster', 'body', body);
            const localVarPath = `/api/v1/organizations/{orgName}/clusters/{clusterName}/reconfigure`
                .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 Restart cluster
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {OpsRestart} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        restartCluster: async (orgName, clusterName, body, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('restartCluster', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('restartCluster', 'clusterName', clusterName);
            // verify required parameter 'body' is not null or undefined
            (0, common_1.assertParamExists)('restartCluster', 'body', body);
            const localVarPath = `/api/v1/organizations/{orgName}/clusters/{clusterName}/restart`
                .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 Specify IOPS and BPS of cluster volumes
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {OpsIoQuotas} opsIoQuotas
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        specifyClusterIOQuotas: async (orgName, clusterName, opsIoQuotas, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('specifyClusterIOQuotas', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('specifyClusterIOQuotas', 'clusterName', clusterName);
            // verify required parameter 'opsIoQuotas' is not null or undefined
            (0, common_1.assertParamExists)('specifyClusterIOQuotas', 'opsIoQuotas', opsIoQuotas);
            const localVarPath = `/api/v1/organizations/{orgName}/clusters/{clusterName}/volumes/io-quotas`
                .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)(opsIoQuotas, localVarRequestOptions, configuration);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         *
         * @summary Start cluster
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {OpsStart} [opsStart]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        startCluster: async (orgName, clusterName, opsStart, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('startCluster', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('startCluster', 'clusterName', clusterName);
            const localVarPath = `/api/v1/organizations/{orgName}/clusters/{clusterName}/start`
                .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)(opsStart, localVarRequestOptions, configuration);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         *
         * @summary Stop cluster
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {OpsStop} [opsStop]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        stopCluster: async (orgName, clusterName, opsStop, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('stopCluster', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('stopCluster', 'clusterName', clusterName);
            const localVarPath = `/api/v1/organizations/{orgName}/clusters/{clusterName}/stop`
                .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)(opsStop, localVarRequestOptions, configuration);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         *
         * @summary Update the cluster license
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {OpsLicense} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateClusterLicense: async (orgName, clusterName, body, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('updateClusterLicense', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('updateClusterLicense', 'clusterName', clusterName);
            // verify required parameter 'body' is not null or undefined
            (0, common_1.assertParamExists)('updateClusterLicense', 'body', body);
            const localVarPath = `/api/v1/organizations/{orgName}/clusters/{clusterName}/updateLicense`
                .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 Upgrade cluster version
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {OpsUpgrade} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        upgradeCluster: async (orgName, clusterName, body, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('upgradeCluster', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('upgradeCluster', 'clusterName', clusterName);
            // verify required parameter 'body' is not null or undefined
            (0, common_1.assertParamExists)('upgradeCluster', 'body', body);
            const localVarPath = `/api/v1/organizations/{orgName}/clusters/{clusterName}/upgrade`
                .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 Vertical scale cluster
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {OpsVScale} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        verticalScaleCluster: async (orgName, clusterName, body, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('verticalScaleCluster', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('verticalScaleCluster', 'clusterName', clusterName);
            // verify required parameter 'body' is not null or undefined
            (0, common_1.assertParamExists)('verticalScaleCluster', 'body', body);
            const localVarPath = `/api/v1/organizations/{orgName}/clusters/{clusterName}/vscale`
                .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,
            };
        },
    };
};
exports.OpsrequestApiAxiosParamCreator = OpsrequestApiAxiosParamCreator;
/**
 * OpsrequestApi - functional programming interface
 * @export
 */
const OpsrequestApiFp = function (configuration) {
    const localVarAxiosParamCreator = (0, exports.OpsrequestApiAxiosParamCreator)(configuration);
    return {
        /**
         *
         * @summary Expand cluster volume size
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {OpsVolumeExpand} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async clusterVolumeExpand(orgName, clusterName, body, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.clusterVolumeExpand(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['OpsrequestApi.clusterVolumeExpand']) === 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 custom OpsRequest
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {OpsCustom} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async customOps(orgName, clusterName, body, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.customOps(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['OpsrequestApi.customOps']) === 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 Expose cluster loadbalancer endpoint
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {OpsExpose} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async exposeCluster(orgName, clusterName, body, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.exposeCluster(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['OpsrequestApi.exposeCluster']) === 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 Horizontal scale cluster
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {OpsHScale} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async horizontalScaleCluster(orgName, clusterName, body, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.horizontalScaleCluster(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['OpsrequestApi.horizontalScaleCluster']) === 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 available nodes for rebuilding instance
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {string} name name of the instance to be rebuilt
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listAvailableNodes(orgName, clusterName, name, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.listAvailableNodes(orgName, clusterName, name, 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['OpsrequestApi.listAvailableNodes']) === 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 Promote cluster intance to primary
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {OpsPromote} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async promoteCluster(orgName, clusterName, body, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.promoteCluster(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['OpsrequestApi.promoteCluster']) === 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 rebuild the instance
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {OpsRebuildInstance} opsRebuildInstance
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async rebuildInstance(orgName, clusterName, opsRebuildInstance, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.rebuildInstance(orgName, clusterName, opsRebuildInstance, 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['OpsrequestApi.rebuildInstance']) === 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 cluster configuration
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {ReconfigureCreate} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async reconfigureCluster(orgName, clusterName, body, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.reconfigureCluster(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['OpsrequestApi.reconfigureCluster']) === 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 Restart cluster
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {OpsRestart} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async restartCluster(orgName, clusterName, body, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.restartCluster(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['OpsrequestApi.restartCluster']) === 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 Specify IOPS and BPS of cluster volumes
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {OpsIoQuotas} opsIoQuotas
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async specifyClusterIOQuotas(orgName, clusterName, opsIoQuotas, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.specifyClusterIOQuotas(orgName, clusterName, opsIoQuotas, 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['OpsrequestApi.specifyClusterIOQuotas']) === 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 Start cluster
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {OpsStart} [opsStart]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async startCluster(orgName, clusterName, opsStart, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.startCluster(orgName, clusterName, opsStart, 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['OpsrequestApi.startCluster']) === 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 Stop cluster
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {OpsStop} [opsStop]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async stopCluster(orgName, clusterName, opsStop, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.stopCluster(orgName, clusterName, opsStop, 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['OpsrequestApi.stopCluster']) === 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 the cluster license
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {OpsLicense} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async updateClusterLicense(orgName, clusterName, body, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.updateClusterLicense(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['OpsrequestApi.updateClusterLicense']) === 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 Upgrade cluster version
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {OpsUpgrade} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async upgradeCluster(orgName, clusterName, body, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.upgradeCluster(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['OpsrequestApi.upgradeCluster']) === 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 Vertical scale cluster
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {OpsVScale} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async verticalScaleCluster(orgName, clusterName, body, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.verticalScaleCluster(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['OpsrequestApi.verticalScaleCluster']) === 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.OpsrequestApiFp = OpsrequestApiFp;
/**
 * OpsrequestApi - factory interface
 * @export
 */
const OpsrequestApiFactory = function (configuration, basePath, axios) {
    const localVarFp = (0, exports.OpsrequestApiFp)(configuration);
    return {
        /**
         *
         * @summary Expand cluster volume size
         * @param {OpsrequestApiClusterVolumeExpandRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        clusterVolumeExpand(requestParameters, options) {
            return localVarFp.clusterVolumeExpand(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Create custom OpsRequest
         * @param {OpsrequestApiCustomOpsRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        customOps(requestParameters, options) {
            return localVarFp.customOps(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Expose cluster loadbalancer endpoint
         * @param {OpsrequestApiExposeClusterRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        exposeCluster(requestParameters, options) {
            return localVarFp.exposeCluster(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Horizontal scale cluster
         * @param {OpsrequestApiHorizontalScaleClusterRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        horizontalScaleCluster(requestParameters, options) {
            return localVarFp.horizontalScaleCluster(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary List available nodes for rebuilding instance
         * @param {OpsrequestApiListAvailableNodesRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listAvailableNodes(requestParameters, options) {
            return localVarFp.listAvailableNodes(requestParameters.orgName, requestParameters.clusterName, requestParameters.name, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Promote cluster intance to primary
         * @param {OpsrequestApiPromoteClusterRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        promoteCluster(requestParameters, options) {
            return localVarFp.promoteCluster(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary rebuild the instance
         * @param {OpsrequestApiRebuildInstanceRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        rebuildInstance(requestParameters, options) {
            return localVarFp.rebuildInstance(requestParameters.orgName, requestParameters.clusterName, requestParameters.opsRebuildInstance, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Update cluster configuration
         * @param {OpsrequestApiReconfigureClusterRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        reconfigureCluster(requestParameters, options) {
            return localVarFp.reconfigureCluster(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Restart cluster
         * @param {OpsrequestApiRestartClusterRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        restartCluster(requestParameters, options) {
            return localVarFp.restartCluster(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Specify IOPS and BPS of cluster volumes
         * @param {OpsrequestApiSpecifyClusterIOQuotasRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        specifyClusterIOQuotas(requestParameters, options) {
            return localVarFp.specifyClusterIOQuotas(requestParameters.orgName, requestParameters.clusterName, requestParameters.opsIoQuotas, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Start cluster
         * @param {OpsrequestApiStartClusterRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        startCluster(requestParameters, options) {
            return localVarFp.startCluster(requestParameters.orgName, requestParameters.clusterName, requestParameters.opsStart, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Stop cluster
         * @param {OpsrequestApiStopClusterRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        stopCluster(requestParameters, options) {
            return localVarFp.stopCluster(requestParameters.orgName, requestParameters.clusterName, requestParameters.opsStop, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Update the cluster license
         * @param {OpsrequestApiUpdateClusterLicenseRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateClusterLicense(requestParameters, options) {
            return localVarFp.updateClusterLicense(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Upgrade cluster version
         * @param {OpsrequestApiUpgradeClusterRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        upgradeCluster(requestParameters, options) {
            return localVarFp.upgradeCluster(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Vertical scale cluster
         * @param {OpsrequestApiVerticalScaleClusterRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        verticalScaleCluster(requestParameters, options) {
            return localVarFp.verticalScaleCluster(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(axios, basePath));
        },
    };
};
exports.OpsrequestApiFactory = OpsrequestApiFactory;
/**
 * OpsrequestApi - object-oriented interface
 * @export
 * @class OpsrequestApi
 * @extends {BaseAPI}
 */
class OpsrequestApi extends base_1.BaseAPI {
    /**
     *
     * @summary Expand cluster volume size
     * @param {OpsrequestApiClusterVolumeExpandRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OpsrequestApi
     */
    clusterVolumeExpand(requestParameters, options) {
        return (0, exports.OpsrequestApiFp)(this.configuration).clusterVolumeExpand(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Create custom OpsRequest
     * @param {OpsrequestApiCustomOpsRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OpsrequestApi
     */
    customOps(requestParameters, options) {
        return (0, exports.OpsrequestApiFp)(this.configuration).customOps(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Expose cluster loadbalancer endpoint
     * @param {OpsrequestApiExposeClusterRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OpsrequestApi
     */
    exposeCluster(requestParameters, options) {
        return (0, exports.OpsrequestApiFp)(this.configuration).exposeCluster(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Horizontal scale cluster
     * @param {OpsrequestApiHorizontalScaleClusterRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OpsrequestApi
     */
    horizontalScaleCluster(requestParameters, options) {
        return (0, exports.OpsrequestApiFp)(this.configuration).horizontalScaleCluster(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary List available nodes for rebuilding instance
     * @param {OpsrequestApiListAvailableNodesRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OpsrequestApi
     */
    listAvailableNodes(requestParameters, options) {
        return (0, exports.OpsrequestApiFp)(this.configuration).listAvailableNodes(requestParameters.orgName, requestParameters.clusterName, requestParameters.name, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Promote cluster intance to primary
     * @param {OpsrequestApiPromoteClusterRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OpsrequestApi
     */
    promoteCluster(requestParameters, options) {
        return (0, exports.OpsrequestApiFp)(this.configuration).promoteCluster(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary rebuild the instance
     * @param {OpsrequestApiRebuildInstanceRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OpsrequestApi
     */
    rebuildInstance(requestParameters, options) {
        return (0, exports.OpsrequestApiFp)(this.configuration).rebuildInstance(requestParameters.orgName, requestParameters.clusterName, requestParameters.opsRebuildInstance, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Update cluster configuration
     * @param {OpsrequestApiReconfigureClusterRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OpsrequestApi
     */
    reconfigureCluster(requestParameters, options) {
        return (0, exports.OpsrequestApiFp)(this.configuration).reconfigureCluster(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Restart cluster
     * @param {OpsrequestApiRestartClusterRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OpsrequestApi
     */
    restartCluster(requestParameters, options) {
        return (0, exports.OpsrequestApiFp)(this.configuration).restartCluster(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Specify IOPS and BPS of cluster volumes
     * @param {OpsrequestApiSpecifyClusterIOQuotasRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OpsrequestApi
     */
    specifyClusterIOQuotas(requestParameters, options) {
        return (0, exports.OpsrequestApiFp)(this.configuration).specifyClusterIOQuotas(requestParameters.orgName, requestParameters.clusterName, requestParameters.opsIoQuotas, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Start cluster
     * @param {OpsrequestApiStartClusterRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OpsrequestApi
     */
    startCluster(requestParameters, options) {
        return (0, exports.OpsrequestApiFp)(this.configuration).startCluster(requestParameters.orgName, requestParameters.clusterName, requestParameters.opsStart, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Stop cluster
     * @param {OpsrequestApiStopClusterRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OpsrequestApi
     */
    stopCluster(requestParameters, options) {
        return (0, exports.OpsrequestApiFp)(this.configuration).stopCluster(requestParameters.orgName, requestParameters.clusterName, requestParameters.opsStop, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Update the cluster license
     * @param {OpsrequestApiUpdateClusterLicenseRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OpsrequestApi
     */
    updateClusterLicense(requestParameters, options) {
        return (0, exports.OpsrequestApiFp)(this.configuration).updateClusterLicense(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Upgrade cluster version
     * @param {OpsrequestApiUpgradeClusterRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OpsrequestApi
     */
    upgradeCluster(requestParameters, options) {
        return (0, exports.OpsrequestApiFp)(this.configuration).upgradeCluster(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Vertical scale cluster
     * @param {OpsrequestApiVerticalScaleClusterRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OpsrequestApi
     */
    verticalScaleCluster(requestParameters, options) {
        return (0, exports.OpsrequestApiFp)(this.configuration).verticalScaleCluster(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
    }
}
exports.OpsrequestApi = OpsrequestApi;
//# sourceMappingURL=opsrequest-api.js.map