"use strict";
/* tslint:disable */
/* eslint-disable */
/**
 * KubeBlocks Cloud Internal API
 * The Internal API is using for interaction of ApeCloud platform microservices.
 *
 * The version of the OpenAPI document: 1.0.0
 *
 *
 * 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.ClusterApi = exports.ClusterApiFactory = exports.ClusterApiFp = exports.ClusterApiAxiosParamCreator = 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");
/**
 * ClusterApi - axios parameter creator
 * @export
 */
const ClusterApiAxiosParamCreator = function (configuration) {
    return {
        /**
         *
         * @summary Create new cluster
         * @param {string} orgName name of the Org
         * @param {Cluster} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createCluster: async (orgName, body, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('createCluster', 'orgName', orgName);
            // verify required parameter 'body' is not null or undefined
            (0, common_1.assertParamExists)('createCluster', 'body', body);
            const localVarPath = `/internal/v1/organizations/{orgName}/clusters`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BasicAuth required
            // http basic authentication required
            (0, common_1.setBasicAuthToObject)(localVarRequestOptions, 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 Environment Minio Cluster
         * @param {string} environmentName name of the environment
         * @param {EnvironmentStorage} [environmentStorage]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createMinioCluster: async (environmentName, environmentStorage, options = {}) => {
            // verify required parameter 'environmentName' is not null or undefined
            (0, common_1.assertParamExists)('createMinioCluster', 'environmentName', environmentName);
            const localVarPath = `/internal/v1/environments/{environmentName}/minio`
                .replace(`{${"environmentName"}}`, encodeURIComponent(String(environmentName)));
            // 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 BasicAuth required
            // http basic authentication required
            (0, common_1.setBasicAuthToObject)(localVarRequestOptions, 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)(environmentStorage, localVarRequestOptions, configuration);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         *
         * @summary Delete cluster
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {boolean} [force] if it is true, the cluster will be deleted no matter what the termination policy is, and will not be moved to the recycle bin.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteCluster: async (orgName, clusterName, force, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('deleteCluster', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('deleteCluster', 'clusterName', clusterName);
            const localVarPath = `/internal/v1/organizations/{orgName}/clusters/{clusterName}`
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)))
                .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BasicAuth required
            // http basic authentication required
            (0, common_1.setBasicAuthToObject)(localVarRequestOptions, configuration);
            if (force !== undefined) {
                localVarQueryParameter['force'] = force;
            }
            (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 Environment Storage Resource
         * @param {string} environmentName name of the environment
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteEnvironmentStorage: async (environmentName, options = {}) => {
            // verify required parameter 'environmentName' is not null or undefined
            (0, common_1.assertParamExists)('deleteEnvironmentStorage', 'environmentName', environmentName);
            const localVarPath = `/internal/v1/environments/{environmentName}/storages`
                .replace(`{${"environmentName"}}`, encodeURIComponent(String(environmentName)));
            // 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 BasicAuth required
            // http basic authentication required
            (0, common_1.setBasicAuthToObject)(localVarRequestOptions, 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 Environment Minio Cluster
         * @param {string} environmentName name of the environment
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteMinioCluster: async (environmentName, options = {}) => {
            // verify required parameter 'environmentName' is not null or undefined
            (0, common_1.assertParamExists)('deleteMinioCluster', 'environmentName', environmentName);
            const localVarPath = `/internal/v1/environments/{environmentName}/minio`
                .replace(`{${"environmentName"}}`, encodeURIComponent(String(environmentName)));
            // 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 BasicAuth required
            // http basic authentication required
            (0, common_1.setBasicAuthToObject)(localVarRequestOptions, 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 Environment VictoriaMetrics Cluster
         * @param {string} environmentName name of the environment
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteVictoriaMetricsCluster: async (environmentName, options = {}) => {
            // verify required parameter 'environmentName' is not null or undefined
            (0, common_1.assertParamExists)('deleteVictoriaMetricsCluster', 'environmentName', environmentName);
            const localVarPath = `/internal/v1/environments/{environmentName}/victoriaMetricsCluster`
                .replace(`{${"environmentName"}}`, encodeURIComponent(String(environmentName)));
            // 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 BasicAuth required
            // http basic authentication required
            (0, common_1.setBasicAuthToObject)(localVarRequestOptions, configuration);
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         *
         * @summary Get cluster details
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getCluster: async (orgName, clusterName, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('getCluster', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('getCluster', 'clusterName', clusterName);
            const localVarPath = `/internal/v1/organizations/{orgName}/clusters/{clusterName}`
                .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 BasicAuth required
            // http basic authentication required
            (0, common_1.setBasicAuthToObject)(localVarRequestOptions, configuration);
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         *
         * @summary List clusters in the Org
         * @param {string} orgName name of the Org
         * @param {string} [clusterDefinition] The clusterDefinition in the List request
         * @param {string} [environmentName] Environment Type
         * @param {EnvironmentType} [environmentType] Environment Type
         * @param {string} [tagKey] Tag key
         * @param {string} [tagValue] Tag value
         * @param {Array<string>} [tagKeys] A list of tags\&#39; keys
         * @param {Array<string>} [tagValues] A list of tags\&#39; values corresponding to the tagKeys
         * @param {number} [licenseId] license id
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listCluster: async (orgName, clusterDefinition, environmentName, environmentType, tagKey, tagValue, tagKeys, tagValues, licenseId, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('listCluster', 'orgName', orgName);
            const localVarPath = `/internal/v1/organizations/{orgName}/clusters`
                .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 BasicAuth required
            // http basic authentication required
            (0, common_1.setBasicAuthToObject)(localVarRequestOptions, configuration);
            if (clusterDefinition !== undefined) {
                localVarQueryParameter['clusterDefinition'] = clusterDefinition;
            }
            if (environmentName !== undefined) {
                localVarQueryParameter['environmentName'] = environmentName;
            }
            if (environmentType !== undefined) {
                localVarQueryParameter['environmentType'] = environmentType;
            }
            if (tagKey !== undefined) {
                localVarQueryParameter['tagKey'] = tagKey;
            }
            if (tagValue !== undefined) {
                localVarQueryParameter['tagValue'] = tagValue;
            }
            if (tagKeys) {
                localVarQueryParameter['tagKeys'] = tagKeys;
            }
            if (tagValues) {
                localVarQueryParameter['tagValues'] = tagValues;
            }
            if (licenseId !== undefined) {
                localVarQueryParameter['licenseId'] = licenseId;
            }
            (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 cluster endpoints
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {number} [nodePortHostCount] count of the NodePort host
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listEndpoints: async (orgName, clusterName, nodePortHostCount, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('listEndpoints', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('listEndpoints', 'clusterName', clusterName);
            const localVarPath = `/internal/v1/organizations/{orgName}/clusters/{clusterName}/endpoints`
                .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 BasicAuth required
            // http basic authentication required
            (0, common_1.setBasicAuthToObject)(localVarRequestOptions, configuration);
            if (nodePortHostCount !== undefined) {
                localVarQueryParameter['nodePortHostCount'] = nodePortHostCount;
            }
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Update the specified Cluster
         * @summary Update cluster specified fields
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {ClusterUpdate} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        patchCluster: async (orgName, clusterName, body, options = {}) => {
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('patchCluster', 'orgName', orgName);
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('patchCluster', 'clusterName', clusterName);
            // verify required parameter 'body' is not null or undefined
            (0, common_1.assertParamExists)('patchCluster', 'body', body);
            const localVarPath = `/internal/v1/organizations/{orgName}/clusters/{clusterName}`
                .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 BasicAuth required
            // http basic authentication required
            (0, common_1.setBasicAuthToObject)(localVarRequestOptions, 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.ClusterApiAxiosParamCreator = ClusterApiAxiosParamCreator;
/**
 * ClusterApi - functional programming interface
 * @export
 */
const ClusterApiFp = function (configuration) {
    const localVarAxiosParamCreator = (0, exports.ClusterApiAxiosParamCreator)(configuration);
    return {
        /**
         *
         * @summary Create new cluster
         * @param {string} orgName name of the Org
         * @param {Cluster} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createCluster(orgName, body, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.createCluster(orgName, body, options);
            const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
            const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ClusterApi.createCluster']) === 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 Environment Minio Cluster
         * @param {string} environmentName name of the environment
         * @param {EnvironmentStorage} [environmentStorage]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createMinioCluster(environmentName, environmentStorage, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.createMinioCluster(environmentName, environmentStorage, 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['ClusterApi.createMinioCluster']) === 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 cluster
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {boolean} [force] if it is true, the cluster will be deleted no matter what the termination policy is, and will not be moved to the recycle bin.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deleteCluster(orgName, clusterName, force, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.deleteCluster(orgName, clusterName, force, 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['ClusterApi.deleteCluster']) === 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 Environment Storage Resource
         * @param {string} environmentName name of the environment
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deleteEnvironmentStorage(environmentName, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.deleteEnvironmentStorage(environmentName, 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['ClusterApi.deleteEnvironmentStorage']) === 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 Environment Minio Cluster
         * @param {string} environmentName name of the environment
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deleteMinioCluster(environmentName, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.deleteMinioCluster(environmentName, 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['ClusterApi.deleteMinioCluster']) === 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 Environment VictoriaMetrics Cluster
         * @param {string} environmentName name of the environment
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deleteVictoriaMetricsCluster(environmentName, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.deleteVictoriaMetricsCluster(environmentName, 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['ClusterApi.deleteVictoriaMetricsCluster']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         *
         * @summary Get cluster details
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getCluster(orgName, clusterName, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.getCluster(orgName, clusterName, options);
            const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
            const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ClusterApi.getCluster']) === 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 clusters in the Org
         * @param {string} orgName name of the Org
         * @param {string} [clusterDefinition] The clusterDefinition in the List request
         * @param {string} [environmentName] Environment Type
         * @param {EnvironmentType} [environmentType] Environment Type
         * @param {string} [tagKey] Tag key
         * @param {string} [tagValue] Tag value
         * @param {Array<string>} [tagKeys] A list of tags\&#39; keys
         * @param {Array<string>} [tagValues] A list of tags\&#39; values corresponding to the tagKeys
         * @param {number} [licenseId] license id
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listCluster(orgName, clusterDefinition, environmentName, environmentType, tagKey, tagValue, tagKeys, tagValues, licenseId, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.listCluster(orgName, clusterDefinition, environmentName, environmentType, tagKey, tagValue, tagKeys, tagValues, licenseId, 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['ClusterApi.listCluster']) === 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 cluster endpoints
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {number} [nodePortHostCount] count of the NodePort host
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listEndpoints(orgName, clusterName, nodePortHostCount, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.listEndpoints(orgName, clusterName, nodePortHostCount, 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['ClusterApi.listEndpoints']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
            return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Update the specified Cluster
         * @summary Update cluster specified fields
         * @param {string} orgName name of the Org
         * @param {string} clusterName name of the KubeBlocks cluster
         * @param {ClusterUpdate} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async patchCluster(orgName, clusterName, body, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.patchCluster(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['ClusterApi.patchCluster']) === 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.ClusterApiFp = ClusterApiFp;
/**
 * ClusterApi - factory interface
 * @export
 */
const ClusterApiFactory = function (configuration, basePath, axios) {
    const localVarFp = (0, exports.ClusterApiFp)(configuration);
    return {
        /**
         *
         * @summary Create new cluster
         * @param {ClusterApiCreateClusterRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createCluster(requestParameters, options) {
            return localVarFp.createCluster(requestParameters.orgName, requestParameters.body, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Create Environment Minio Cluster
         * @param {ClusterApiCreateMinioClusterRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createMinioCluster(requestParameters, options) {
            return localVarFp.createMinioCluster(requestParameters.environmentName, requestParameters.environmentStorage, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Delete cluster
         * @param {ClusterApiDeleteClusterRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteCluster(requestParameters, options) {
            return localVarFp.deleteCluster(requestParameters.orgName, requestParameters.clusterName, requestParameters.force, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Delete Environment Storage Resource
         * @param {ClusterApiDeleteEnvironmentStorageRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteEnvironmentStorage(requestParameters, options) {
            return localVarFp.deleteEnvironmentStorage(requestParameters.environmentName, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Delete Environment Minio Cluster
         * @param {ClusterApiDeleteMinioClusterRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteMinioCluster(requestParameters, options) {
            return localVarFp.deleteMinioCluster(requestParameters.environmentName, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Delete Environment VictoriaMetrics Cluster
         * @param {ClusterApiDeleteVictoriaMetricsClusterRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteVictoriaMetricsCluster(requestParameters, options) {
            return localVarFp.deleteVictoriaMetricsCluster(requestParameters.environmentName, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Get cluster details
         * @param {ClusterApiGetClusterRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getCluster(requestParameters, options) {
            return localVarFp.getCluster(requestParameters.orgName, requestParameters.clusterName, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary List clusters in the Org
         * @param {ClusterApiListClusterRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listCluster(requestParameters, options) {
            return localVarFp.listCluster(requestParameters.orgName, requestParameters.clusterDefinition, requestParameters.environmentName, requestParameters.environmentType, requestParameters.tagKey, requestParameters.tagValue, requestParameters.tagKeys, requestParameters.tagValues, requestParameters.licenseId, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary List cluster endpoints
         * @param {ClusterApiListEndpointsRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listEndpoints(requestParameters, options) {
            return localVarFp.listEndpoints(requestParameters.orgName, requestParameters.clusterName, requestParameters.nodePortHostCount, options).then((request) => request(axios, basePath));
        },
        /**
         * Update the specified Cluster
         * @summary Update cluster specified fields
         * @param {ClusterApiPatchClusterRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        patchCluster(requestParameters, options) {
            return localVarFp.patchCluster(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(axios, basePath));
        },
    };
};
exports.ClusterApiFactory = ClusterApiFactory;
/**
 * ClusterApi - object-oriented interface
 * @export
 * @class ClusterApi
 * @extends {BaseAPI}
 */
class ClusterApi extends base_1.BaseAPI {
    /**
     *
     * @summary Create new cluster
     * @param {ClusterApiCreateClusterRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ClusterApi
     */
    createCluster(requestParameters, options) {
        return (0, exports.ClusterApiFp)(this.configuration).createCluster(requestParameters.orgName, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Create Environment Minio Cluster
     * @param {ClusterApiCreateMinioClusterRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ClusterApi
     */
    createMinioCluster(requestParameters, options) {
        return (0, exports.ClusterApiFp)(this.configuration).createMinioCluster(requestParameters.environmentName, requestParameters.environmentStorage, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Delete cluster
     * @param {ClusterApiDeleteClusterRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ClusterApi
     */
    deleteCluster(requestParameters, options) {
        return (0, exports.ClusterApiFp)(this.configuration).deleteCluster(requestParameters.orgName, requestParameters.clusterName, requestParameters.force, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Delete Environment Storage Resource
     * @param {ClusterApiDeleteEnvironmentStorageRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ClusterApi
     */
    deleteEnvironmentStorage(requestParameters, options) {
        return (0, exports.ClusterApiFp)(this.configuration).deleteEnvironmentStorage(requestParameters.environmentName, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Delete Environment Minio Cluster
     * @param {ClusterApiDeleteMinioClusterRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ClusterApi
     */
    deleteMinioCluster(requestParameters, options) {
        return (0, exports.ClusterApiFp)(this.configuration).deleteMinioCluster(requestParameters.environmentName, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Delete Environment VictoriaMetrics Cluster
     * @param {ClusterApiDeleteVictoriaMetricsClusterRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ClusterApi
     */
    deleteVictoriaMetricsCluster(requestParameters, options) {
        return (0, exports.ClusterApiFp)(this.configuration).deleteVictoriaMetricsCluster(requestParameters.environmentName, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Get cluster details
     * @param {ClusterApiGetClusterRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ClusterApi
     */
    getCluster(requestParameters, options) {
        return (0, exports.ClusterApiFp)(this.configuration).getCluster(requestParameters.orgName, requestParameters.clusterName, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary List clusters in the Org
     * @param {ClusterApiListClusterRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ClusterApi
     */
    listCluster(requestParameters, options) {
        return (0, exports.ClusterApiFp)(this.configuration).listCluster(requestParameters.orgName, requestParameters.clusterDefinition, requestParameters.environmentName, requestParameters.environmentType, requestParameters.tagKey, requestParameters.tagValue, requestParameters.tagKeys, requestParameters.tagValues, requestParameters.licenseId, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary List cluster endpoints
     * @param {ClusterApiListEndpointsRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ClusterApi
     */
    listEndpoints(requestParameters, options) {
        return (0, exports.ClusterApiFp)(this.configuration).listEndpoints(requestParameters.orgName, requestParameters.clusterName, requestParameters.nodePortHostCount, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     * Update the specified Cluster
     * @summary Update cluster specified fields
     * @param {ClusterApiPatchClusterRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ClusterApi
     */
    patchCluster(requestParameters, options) {
        return (0, exports.ClusterApiFp)(this.configuration).patchCluster(requestParameters.orgName, requestParameters.clusterName, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
    }
}
exports.ClusterApi = ClusterApi;
//# sourceMappingURL=cluster-api.js.map