"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.EngineApi = exports.EngineApiFactory = exports.EngineApiFp = exports.EngineApiAxiosParamCreator = 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");
/**
 * EngineApi - axios parameter creator
 * @export
 */
const EngineApiAxiosParamCreator = function (configuration) {
    return {
        /**
         *
         * @summary Get supported network modes for engine+mode from engineOption config
         * @param {string} environmentName environment name
         * @param {string} engineName engine name
         * @param {string} mode engine mode
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getEngineNetworkModeSupported: async (environmentName, engineName, mode, options = {}) => {
            // verify required parameter 'environmentName' is not null or undefined
            (0, common_1.assertParamExists)('getEngineNetworkModeSupported', 'environmentName', environmentName);
            // verify required parameter 'engineName' is not null or undefined
            (0, common_1.assertParamExists)('getEngineNetworkModeSupported', 'engineName', engineName);
            // verify required parameter 'mode' is not null or undefined
            (0, common_1.assertParamExists)('getEngineNetworkModeSupported', 'mode', mode);
            const localVarPath = `/api/v1/environments/{environmentName}/engineNetworkModes/supported`
                .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: '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 (engineName !== undefined) {
                localVarQueryParameter['engineName'] = engineName;
            }
            if (mode !== undefined) {
                localVarQueryParameter['mode'] = mode;
            }
            (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,
            };
        },
        /**
         * list all engineLicenses
         * @summary List all engineLicenses
         * @param {string} [engineName] engine name
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listEngineLicenses: async (engineName, options = {}) => {
            const localVarPath = `/api/v1/engineLicenses`;
            // 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 (engineName !== undefined) {
                localVarQueryParameter['engineName'] = engineName;
            }
            (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 engine resource constraints
         * @param {string} [engine] engine name
         * @param {string} [mode] engine mode
         * @param {string} [component] engine component
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listEngineResourceConstraints: async (engine, mode, component, options = {}) => {
            const localVarPath = `/api/v1/engines/resourceConstraints`;
            // 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 (engine !== undefined) {
                localVarQueryParameter['engine'] = engine;
            }
            if (mode !== undefined) {
                localVarQueryParameter['mode'] = mode;
            }
            if (component !== undefined) {
                localVarQueryParameter['component'] = component;
            }
            (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 engine scheduling policies
         * @param {string} engineName engine name
         * @param {string} [engineMode] engine mode
         * @param {string} [env] environment name
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listEngineSchedulingPolicies: async (engineName, engineMode, env, options = {}) => {
            // verify required parameter 'engineName' is not null or undefined
            (0, common_1.assertParamExists)('listEngineSchedulingPolicies', 'engineName', engineName);
            const localVarPath = `/api/v1/engines/{engineName}/schedulingPolicies`
                .replace(`{${"engineName"}}`, encodeURIComponent(String(engineName)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: '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 (engineMode !== undefined) {
                localVarQueryParameter['engineMode'] = engineMode;
            }
            if (env !== undefined) {
                localVarQueryParameter['env'] = env;
            }
            (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 engine types
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listEngineTypes: async (options = {}) => {
            const localVarPath = `/api/v1/engineTypes`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         *
         * @summary List engines in environment
         * @param {string} environmentName name of the EnvironmentName
         * @param {string} [name] engine name
         * @param {string} [type] engine Type
         * @param {string} [version] engine version
         * @param {string} [provider] engine provider
         * @param {boolean} [all] list all engines include uninstall engines
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listEnginesInEnv: async (environmentName, name, type, version, provider, all, options = {}) => {
            // verify required parameter 'environmentName' is not null or undefined
            (0, common_1.assertParamExists)('listEnginesInEnv', 'environmentName', environmentName);
            const localVarPath = `/api/v1/environments/{environmentName}/engines`
                .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: '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;
            }
            if (type !== undefined) {
                localVarQueryParameter['type'] = type;
            }
            if (version !== undefined) {
                localVarQueryParameter['version'] = version;
            }
            if (provider !== undefined) {
                localVarQueryParameter['provider'] = provider;
            }
            if (all !== undefined) {
                localVarQueryParameter['all'] = all;
            }
            (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,
            };
        },
        /**
         * list the service version of the engine
         * @summary list the service version of the engine
         * @param {string} environmentName environment name
         * @param {string} engineName Name of the engine
         * @param {string} engineMode engine mode
         * @param {string} engineVersion engine version
         * @param {string} [component] component type, refer to componentDef and support NamePrefix
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listServiceVersion: async (environmentName, engineName, engineMode, engineVersion, component, options = {}) => {
            // verify required parameter 'environmentName' is not null or undefined
            (0, common_1.assertParamExists)('listServiceVersion', 'environmentName', environmentName);
            // verify required parameter 'engineName' is not null or undefined
            (0, common_1.assertParamExists)('listServiceVersion', 'engineName', engineName);
            // verify required parameter 'engineMode' is not null or undefined
            (0, common_1.assertParamExists)('listServiceVersion', 'engineMode', engineMode);
            // verify required parameter 'engineVersion' is not null or undefined
            (0, common_1.assertParamExists)('listServiceVersion', 'engineVersion', engineVersion);
            const localVarPath = `/api/v1/environments/{environmentName}/engines/{engineName}/serviceVersion`
                .replace(`{${"environmentName"}}`, encodeURIComponent(String(environmentName)))
                .replace(`{${"engineName"}}`, encodeURIComponent(String(engineName)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: '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 (engineMode !== undefined) {
                localVarQueryParameter['engineMode'] = engineMode;
            }
            if (engineVersion !== undefined) {
                localVarQueryParameter['engineVersion'] = engineVersion;
            }
            if (component !== undefined) {
                localVarQueryParameter['component'] = component;
            }
            (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,
            };
        },
        /**
         * list upgraded service version of the component
         * @summary list upgraded service version of the component
         * @param {string} clusterName Name of the cluster
         * @param {string} orgName organization name
         * @param {string} component component type
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listUpgradeableServiceVersion: async (clusterName, orgName, component, options = {}) => {
            // verify required parameter 'clusterName' is not null or undefined
            (0, common_1.assertParamExists)('listUpgradeableServiceVersion', 'clusterName', clusterName);
            // verify required parameter 'orgName' is not null or undefined
            (0, common_1.assertParamExists)('listUpgradeableServiceVersion', 'orgName', orgName);
            // verify required parameter 'component' is not null or undefined
            (0, common_1.assertParamExists)('listUpgradeableServiceVersion', 'component', component);
            const localVarPath = `/api/v1/organizations/{orgName}/clusters/{clusterName}/upgradeableServiceVersion`
                .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName)))
                .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication BearerToken required
            // http bearer authentication required
            await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
            // authentication DigestAuth required
            await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
            if (component !== undefined) {
                localVarQueryParameter['component'] = component;
            }
            (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,
            };
        },
    };
};
exports.EngineApiAxiosParamCreator = EngineApiAxiosParamCreator;
/**
 * EngineApi - functional programming interface
 * @export
 */
const EngineApiFp = function (configuration) {
    const localVarAxiosParamCreator = (0, exports.EngineApiAxiosParamCreator)(configuration);
    return {
        /**
         *
         * @summary Get supported network modes for engine+mode from engineOption config
         * @param {string} environmentName environment name
         * @param {string} engineName engine name
         * @param {string} mode engine mode
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getEngineNetworkModeSupported(environmentName, engineName, mode, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.getEngineNetworkModeSupported(environmentName, engineName, mode, 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['EngineApi.getEngineNetworkModeSupported']) === 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);
        },
        /**
         * list all engineLicenses
         * @summary List all engineLicenses
         * @param {string} [engineName] engine name
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listEngineLicenses(engineName, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.listEngineLicenses(engineName, 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['EngineApi.listEngineLicenses']) === 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 engine resource constraints
         * @param {string} [engine] engine name
         * @param {string} [mode] engine mode
         * @param {string} [component] engine component
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listEngineResourceConstraints(engine, mode, component, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.listEngineResourceConstraints(engine, mode, component, options);
            const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
            const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['EngineApi.listEngineResourceConstraints']) === 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 engine scheduling policies
         * @param {string} engineName engine name
         * @param {string} [engineMode] engine mode
         * @param {string} [env] environment name
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listEngineSchedulingPolicies(engineName, engineMode, env, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.listEngineSchedulingPolicies(engineName, engineMode, env, 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['EngineApi.listEngineSchedulingPolicies']) === 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 engine types
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listEngineTypes(options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.listEngineTypes(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['EngineApi.listEngineTypes']) === 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 engines in environment
         * @param {string} environmentName name of the EnvironmentName
         * @param {string} [name] engine name
         * @param {string} [type] engine Type
         * @param {string} [version] engine version
         * @param {string} [provider] engine provider
         * @param {boolean} [all] list all engines include uninstall engines
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listEnginesInEnv(environmentName, name, type, version, provider, all, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.listEnginesInEnv(environmentName, name, type, version, provider, all, 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['EngineApi.listEnginesInEnv']) === 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);
        },
        /**
         * list the service version of the engine
         * @summary list the service version of the engine
         * @param {string} environmentName environment name
         * @param {string} engineName Name of the engine
         * @param {string} engineMode engine mode
         * @param {string} engineVersion engine version
         * @param {string} [component] component type, refer to componentDef and support NamePrefix
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listServiceVersion(environmentName, engineName, engineMode, engineVersion, component, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.listServiceVersion(environmentName, engineName, engineMode, engineVersion, component, options);
            const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
            const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['EngineApi.listServiceVersion']) === 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);
        },
        /**
         * list upgraded service version of the component
         * @summary list upgraded service version of the component
         * @param {string} clusterName Name of the cluster
         * @param {string} orgName organization name
         * @param {string} component component type
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listUpgradeableServiceVersion(clusterName, orgName, component, options) {
            var _a, _b, _c;
            const localVarAxiosArgs = await localVarAxiosParamCreator.listUpgradeableServiceVersion(clusterName, orgName, component, options);
            const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
            const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['EngineApi.listUpgradeableServiceVersion']) === 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.EngineApiFp = EngineApiFp;
/**
 * EngineApi - factory interface
 * @export
 */
const EngineApiFactory = function (configuration, basePath, axios) {
    const localVarFp = (0, exports.EngineApiFp)(configuration);
    return {
        /**
         *
         * @summary Get supported network modes for engine+mode from engineOption config
         * @param {EngineApiGetEngineNetworkModeSupportedRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getEngineNetworkModeSupported(requestParameters, options) {
            return localVarFp.getEngineNetworkModeSupported(requestParameters.environmentName, requestParameters.engineName, requestParameters.mode, options).then((request) => request(axios, basePath));
        },
        /**
         * list all engineLicenses
         * @summary List all engineLicenses
         * @param {EngineApiListEngineLicensesRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listEngineLicenses(requestParameters = {}, options) {
            return localVarFp.listEngineLicenses(requestParameters.engineName, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary List engine resource constraints
         * @param {EngineApiListEngineResourceConstraintsRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listEngineResourceConstraints(requestParameters = {}, options) {
            return localVarFp.listEngineResourceConstraints(requestParameters.engine, requestParameters.mode, requestParameters.component, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary List engine scheduling policies
         * @param {EngineApiListEngineSchedulingPoliciesRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listEngineSchedulingPolicies(requestParameters, options) {
            return localVarFp.listEngineSchedulingPolicies(requestParameters.engineName, requestParameters.engineMode, requestParameters.env, options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary List engine types
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listEngineTypes(options) {
            return localVarFp.listEngineTypes(options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary List engines in environment
         * @param {EngineApiListEnginesInEnvRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listEnginesInEnv(requestParameters, options) {
            return localVarFp.listEnginesInEnv(requestParameters.environmentName, requestParameters.name, requestParameters.type, requestParameters.version, requestParameters.provider, requestParameters.all, options).then((request) => request(axios, basePath));
        },
        /**
         * list the service version of the engine
         * @summary list the service version of the engine
         * @param {EngineApiListServiceVersionRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listServiceVersion(requestParameters, options) {
            return localVarFp.listServiceVersion(requestParameters.environmentName, requestParameters.engineName, requestParameters.engineMode, requestParameters.engineVersion, requestParameters.component, options).then((request) => request(axios, basePath));
        },
        /**
         * list upgraded service version of the component
         * @summary list upgraded service version of the component
         * @param {EngineApiListUpgradeableServiceVersionRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listUpgradeableServiceVersion(requestParameters, options) {
            return localVarFp.listUpgradeableServiceVersion(requestParameters.clusterName, requestParameters.orgName, requestParameters.component, options).then((request) => request(axios, basePath));
        },
    };
};
exports.EngineApiFactory = EngineApiFactory;
/**
 * EngineApi - object-oriented interface
 * @export
 * @class EngineApi
 * @extends {BaseAPI}
 */
class EngineApi extends base_1.BaseAPI {
    /**
     *
     * @summary Get supported network modes for engine+mode from engineOption config
     * @param {EngineApiGetEngineNetworkModeSupportedRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof EngineApi
     */
    getEngineNetworkModeSupported(requestParameters, options) {
        return (0, exports.EngineApiFp)(this.configuration).getEngineNetworkModeSupported(requestParameters.environmentName, requestParameters.engineName, requestParameters.mode, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     * list all engineLicenses
     * @summary List all engineLicenses
     * @param {EngineApiListEngineLicensesRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof EngineApi
     */
    listEngineLicenses(requestParameters = {}, options) {
        return (0, exports.EngineApiFp)(this.configuration).listEngineLicenses(requestParameters.engineName, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary List engine resource constraints
     * @param {EngineApiListEngineResourceConstraintsRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof EngineApi
     */
    listEngineResourceConstraints(requestParameters = {}, options) {
        return (0, exports.EngineApiFp)(this.configuration).listEngineResourceConstraints(requestParameters.engine, requestParameters.mode, requestParameters.component, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary List engine scheduling policies
     * @param {EngineApiListEngineSchedulingPoliciesRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof EngineApi
     */
    listEngineSchedulingPolicies(requestParameters, options) {
        return (0, exports.EngineApiFp)(this.configuration).listEngineSchedulingPolicies(requestParameters.engineName, requestParameters.engineMode, requestParameters.env, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary List engine types
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof EngineApi
     */
    listEngineTypes(options) {
        return (0, exports.EngineApiFp)(this.configuration).listEngineTypes(options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary List engines in environment
     * @param {EngineApiListEnginesInEnvRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof EngineApi
     */
    listEnginesInEnv(requestParameters, options) {
        return (0, exports.EngineApiFp)(this.configuration).listEnginesInEnv(requestParameters.environmentName, requestParameters.name, requestParameters.type, requestParameters.version, requestParameters.provider, requestParameters.all, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     * list the service version of the engine
     * @summary list the service version of the engine
     * @param {EngineApiListServiceVersionRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof EngineApi
     */
    listServiceVersion(requestParameters, options) {
        return (0, exports.EngineApiFp)(this.configuration).listServiceVersion(requestParameters.environmentName, requestParameters.engineName, requestParameters.engineMode, requestParameters.engineVersion, requestParameters.component, options).then((request) => request(this.axios, this.basePath));
    }
    /**
     * list upgraded service version of the component
     * @summary list upgraded service version of the component
     * @param {EngineApiListUpgradeableServiceVersionRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof EngineApi
     */
    listUpgradeableServiceVersion(requestParameters, options) {
        return (0, exports.EngineApiFp)(this.configuration).listUpgradeableServiceVersion(requestParameters.clusterName, requestParameters.orgName, requestParameters.component, options).then((request) => request(this.axios, this.basePath));
    }
}
exports.EngineApi = EngineApi;
//# sourceMappingURL=engine-api.js.map