/* 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.
 */


import type { Configuration } from '../configuration';
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
import globalAxios from 'axios';
// Some imports not used depending on template conditions
// @ts-ignore
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
// @ts-ignore
import type { APIErrorResponse } from '../models';
// @ts-ignore
import type { Engine } from '../models';
// @ts-ignore
import type { EngineLicenseList } from '../models';
// @ts-ignore
import type { EngineNetworkModeSupported } from '../models';
// @ts-ignore
import type { EngineSchedulingPolicy } from '../models';
// @ts-ignore
import type { EngineServiceVersions } from '../models';
// @ts-ignore
import type { EngineTypeList } from '../models';
// @ts-ignore
import type { ResourceConstraintList } from '../models';
/**
 * EngineApi - axios parameter creator
 * @export
 */
export const EngineApiAxiosParamCreator = function (configuration?: 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: string, engineName: string, mode: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'environmentName' is not null or undefined
            assertParamExists('getEngineNetworkModeSupported', 'environmentName', environmentName)
            // verify required parameter 'engineName' is not null or undefined
            assertParamExists('getEngineNetworkModeSupported', 'engineName', engineName)
            // verify required parameter 'mode' is not null or undefined
            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, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication BearerToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

            // authentication DigestAuth required
            await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)

            if (engineName !== undefined) {
                localVarQueryParameter['engineName'] = engineName;
            }

            if (mode !== undefined) {
                localVarQueryParameter['mode'] = mode;
            }


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: 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?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/api/v1/engineLicenses`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication BearerToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

            // authentication DigestAuth required
            await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)

            if (engineName !== undefined) {
                localVarQueryParameter['engineName'] = engineName;
            }


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: 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?: string, mode?: string, component?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/api/v1/engines/resourceConstraints`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication BearerToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

            // authentication DigestAuth required
            await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)

            if (engine !== undefined) {
                localVarQueryParameter['engine'] = engine;
            }

            if (mode !== undefined) {
                localVarQueryParameter['mode'] = mode;
            }

            if (component !== undefined) {
                localVarQueryParameter['component'] = component;
            }


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: 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: string, engineMode?: string, env?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'engineName' is not null or undefined
            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, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication BearerToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

            // authentication DigestAuth required
            await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)

            if (engineMode !== undefined) {
                localVarQueryParameter['engineMode'] = engineMode;
            }

            if (env !== undefined) {
                localVarQueryParameter['env'] = env;
            }


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary List engine types
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listEngineTypes: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/api/v1/engineTypes`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication BearerToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

            // authentication DigestAuth required
            await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: 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: string, name?: string, type?: string, version?: string, provider?: string, all?: boolean, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'environmentName' is not null or undefined
            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, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication BearerToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

            // authentication DigestAuth required
            await 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;
            }


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: 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: string, engineName: string, engineMode: string, engineVersion: string, component?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'environmentName' is not null or undefined
            assertParamExists('listServiceVersion', 'environmentName', environmentName)
            // verify required parameter 'engineName' is not null or undefined
            assertParamExists('listServiceVersion', 'engineName', engineName)
            // verify required parameter 'engineMode' is not null or undefined
            assertParamExists('listServiceVersion', 'engineMode', engineMode)
            // verify required parameter 'engineVersion' is not null or undefined
            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, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication BearerToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

            // authentication DigestAuth required
            await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)

            if (engineMode !== undefined) {
                localVarQueryParameter['engineMode'] = engineMode;
            }

            if (engineVersion !== undefined) {
                localVarQueryParameter['engineVersion'] = engineVersion;
            }

            if (component !== undefined) {
                localVarQueryParameter['component'] = component;
            }


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: 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: string, orgName: string, component: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'clusterName' is not null or undefined
            assertParamExists('listUpgradeableServiceVersion', 'clusterName', clusterName)
            // verify required parameter 'orgName' is not null or undefined
            assertParamExists('listUpgradeableServiceVersion', 'orgName', orgName)
            // verify required parameter 'component' is not null or undefined
            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, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;

            // authentication BearerToken required
            // http bearer authentication required
            await setBearerAuthToObject(localVarHeaderParameter, configuration)

            // authentication DigestAuth required
            await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)

            if (component !== undefined) {
                localVarQueryParameter['component'] = component;
            }


    
            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
    }
};

/**
 * EngineApi - functional programming interface
 * @export
 */
export const EngineApiFp = function(configuration?: Configuration) {
    const localVarAxiosParamCreator = 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: string, engineName: string, mode: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EngineNetworkModeSupported>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.getEngineNetworkModeSupported(environmentName, engineName, mode, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['EngineApi.getEngineNetworkModeSupported']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, 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?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EngineLicenseList>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.listEngineLicenses(engineName, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['EngineApi.listEngineLicenses']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, 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?: string, mode?: string, component?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ResourceConstraintList>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.listEngineResourceConstraints(engine, mode, component, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['EngineApi.listEngineResourceConstraints']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, 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: string, engineMode?: string, env?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<EngineSchedulingPolicy>>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.listEngineSchedulingPolicies(engineName, engineMode, env, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['EngineApi.listEngineSchedulingPolicies']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * 
         * @summary List engine types
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listEngineTypes(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EngineTypeList>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.listEngineTypes(options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['EngineApi.listEngineTypes']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, 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: string, name?: string, type?: string, version?: string, provider?: string, all?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Engine>>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.listEnginesInEnv(environmentName, name, type, version, provider, all, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['EngineApi.listEnginesInEnv']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, 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: string, engineName: string, engineMode: string, engineVersion: string, component?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EngineServiceVersions>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.listServiceVersion(environmentName, engineName, engineMode, engineVersion, component, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['EngineApi.listServiceVersion']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, 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: string, orgName: string, component: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EngineServiceVersions>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.listUpgradeableServiceVersion(clusterName, orgName, component, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['EngineApi.listUpgradeableServiceVersion']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
    }
};

/**
 * EngineApi - factory interface
 * @export
 */
export const EngineApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
    const localVarFp = 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: EngineApiGetEngineNetworkModeSupportedRequest, options?: RawAxiosRequestConfig): AxiosPromise<EngineNetworkModeSupported> {
            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: EngineApiListEngineLicensesRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<EngineLicenseList> {
            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: EngineApiListEngineResourceConstraintsRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<ResourceConstraintList> {
            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: EngineApiListEngineSchedulingPoliciesRequest, options?: RawAxiosRequestConfig): AxiosPromise<Array<EngineSchedulingPolicy>> {
            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?: RawAxiosRequestConfig): AxiosPromise<EngineTypeList> {
            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: EngineApiListEnginesInEnvRequest, options?: RawAxiosRequestConfig): AxiosPromise<Array<Engine>> {
            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: EngineApiListServiceVersionRequest, options?: RawAxiosRequestConfig): AxiosPromise<EngineServiceVersions> {
            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: EngineApiListUpgradeableServiceVersionRequest, options?: RawAxiosRequestConfig): AxiosPromise<EngineServiceVersions> {
            return localVarFp.listUpgradeableServiceVersion(requestParameters.clusterName, requestParameters.orgName, requestParameters.component, options).then((request) => request(axios, basePath));
        },
    };
};

/**
 * EngineApi - interface
 * @export
 * @interface EngineApi
 */
export interface EngineApiInterface {
    /**
     * 
     * @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 EngineApiInterface
     */
    getEngineNetworkModeSupported(requestParameters: EngineApiGetEngineNetworkModeSupportedRequest, options?: RawAxiosRequestConfig): AxiosPromise<EngineNetworkModeSupported>;

    /**
     * list all engineLicenses
     * @summary List all engineLicenses
     * @param {EngineApiListEngineLicensesRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof EngineApiInterface
     */
    listEngineLicenses(requestParameters?: EngineApiListEngineLicensesRequest, options?: RawAxiosRequestConfig): AxiosPromise<EngineLicenseList>;

    /**
     * 
     * @summary List engine resource constraints
     * @param {EngineApiListEngineResourceConstraintsRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof EngineApiInterface
     */
    listEngineResourceConstraints(requestParameters?: EngineApiListEngineResourceConstraintsRequest, options?: RawAxiosRequestConfig): AxiosPromise<ResourceConstraintList>;

    /**
     * 
     * @summary List engine scheduling policies
     * @param {EngineApiListEngineSchedulingPoliciesRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof EngineApiInterface
     */
    listEngineSchedulingPolicies(requestParameters: EngineApiListEngineSchedulingPoliciesRequest, options?: RawAxiosRequestConfig): AxiosPromise<Array<EngineSchedulingPolicy>>;

    /**
     * 
     * @summary List engine types
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof EngineApiInterface
     */
    listEngineTypes(options?: RawAxiosRequestConfig): AxiosPromise<EngineTypeList>;

    /**
     * 
     * @summary List engines in environment
     * @param {EngineApiListEnginesInEnvRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof EngineApiInterface
     */
    listEnginesInEnv(requestParameters: EngineApiListEnginesInEnvRequest, options?: RawAxiosRequestConfig): AxiosPromise<Array<Engine>>;

    /**
     * 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 EngineApiInterface
     */
    listServiceVersion(requestParameters: EngineApiListServiceVersionRequest, options?: RawAxiosRequestConfig): AxiosPromise<EngineServiceVersions>;

    /**
     * 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 EngineApiInterface
     */
    listUpgradeableServiceVersion(requestParameters: EngineApiListUpgradeableServiceVersionRequest, options?: RawAxiosRequestConfig): AxiosPromise<EngineServiceVersions>;

}

/**
 * Request parameters for getEngineNetworkModeSupported operation in EngineApi.
 * @export
 * @interface EngineApiGetEngineNetworkModeSupportedRequest
 */
export interface EngineApiGetEngineNetworkModeSupportedRequest {
    /**
     * environment name
     * @type {string}
     * @memberof EngineApiGetEngineNetworkModeSupported
     */
    readonly environmentName: string

    /**
     * engine name
     * @type {string}
     * @memberof EngineApiGetEngineNetworkModeSupported
     */
    readonly engineName: string

    /**
     * engine mode
     * @type {string}
     * @memberof EngineApiGetEngineNetworkModeSupported
     */
    readonly mode: string
}

/**
 * Request parameters for listEngineLicenses operation in EngineApi.
 * @export
 * @interface EngineApiListEngineLicensesRequest
 */
export interface EngineApiListEngineLicensesRequest {
    /**
     * engine name
     * @type {string}
     * @memberof EngineApiListEngineLicenses
     */
    readonly engineName?: string
}

/**
 * Request parameters for listEngineResourceConstraints operation in EngineApi.
 * @export
 * @interface EngineApiListEngineResourceConstraintsRequest
 */
export interface EngineApiListEngineResourceConstraintsRequest {
    /**
     * engine name
     * @type {string}
     * @memberof EngineApiListEngineResourceConstraints
     */
    readonly engine?: string

    /**
     * engine mode
     * @type {string}
     * @memberof EngineApiListEngineResourceConstraints
     */
    readonly mode?: string

    /**
     * engine component
     * @type {string}
     * @memberof EngineApiListEngineResourceConstraints
     */
    readonly component?: string
}

/**
 * Request parameters for listEngineSchedulingPolicies operation in EngineApi.
 * @export
 * @interface EngineApiListEngineSchedulingPoliciesRequest
 */
export interface EngineApiListEngineSchedulingPoliciesRequest {
    /**
     * engine name
     * @type {string}
     * @memberof EngineApiListEngineSchedulingPolicies
     */
    readonly engineName: string

    /**
     * engine mode
     * @type {string}
     * @memberof EngineApiListEngineSchedulingPolicies
     */
    readonly engineMode?: string

    /**
     * environment name
     * @type {string}
     * @memberof EngineApiListEngineSchedulingPolicies
     */
    readonly env?: string
}

/**
 * Request parameters for listEnginesInEnv operation in EngineApi.
 * @export
 * @interface EngineApiListEnginesInEnvRequest
 */
export interface EngineApiListEnginesInEnvRequest {
    /**
     * name of the EnvironmentName
     * @type {string}
     * @memberof EngineApiListEnginesInEnv
     */
    readonly environmentName: string

    /**
     * engine name
     * @type {string}
     * @memberof EngineApiListEnginesInEnv
     */
    readonly name?: string

    /**
     * engine Type
     * @type {string}
     * @memberof EngineApiListEnginesInEnv
     */
    readonly type?: string

    /**
     * engine version
     * @type {string}
     * @memberof EngineApiListEnginesInEnv
     */
    readonly version?: string

    /**
     * engine provider
     * @type {string}
     * @memberof EngineApiListEnginesInEnv
     */
    readonly provider?: string

    /**
     * list all engines include uninstall engines
     * @type {boolean}
     * @memberof EngineApiListEnginesInEnv
     */
    readonly all?: boolean
}

/**
 * Request parameters for listServiceVersion operation in EngineApi.
 * @export
 * @interface EngineApiListServiceVersionRequest
 */
export interface EngineApiListServiceVersionRequest {
    /**
     * environment name
     * @type {string}
     * @memberof EngineApiListServiceVersion
     */
    readonly environmentName: string

    /**
     * Name of the engine
     * @type {string}
     * @memberof EngineApiListServiceVersion
     */
    readonly engineName: string

    /**
     * engine mode
     * @type {string}
     * @memberof EngineApiListServiceVersion
     */
    readonly engineMode: string

    /**
     * engine version
     * @type {string}
     * @memberof EngineApiListServiceVersion
     */
    readonly engineVersion: string

    /**
     * component type, refer to componentDef and support NamePrefix
     * @type {string}
     * @memberof EngineApiListServiceVersion
     */
    readonly component?: string
}

/**
 * Request parameters for listUpgradeableServiceVersion operation in EngineApi.
 * @export
 * @interface EngineApiListUpgradeableServiceVersionRequest
 */
export interface EngineApiListUpgradeableServiceVersionRequest {
    /**
     * Name of the cluster
     * @type {string}
     * @memberof EngineApiListUpgradeableServiceVersion
     */
    readonly clusterName: string

    /**
     * organization name
     * @type {string}
     * @memberof EngineApiListUpgradeableServiceVersion
     */
    readonly orgName: string

    /**
     * component type
     * @type {string}
     * @memberof EngineApiListUpgradeableServiceVersion
     */
    readonly component: string
}

/**
 * EngineApi - object-oriented interface
 * @export
 * @class EngineApi
 * @extends {BaseAPI}
 */
export class EngineApi extends BaseAPI implements EngineApiInterface {
    /**
     * 
     * @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
     */
    public getEngineNetworkModeSupported(requestParameters: EngineApiGetEngineNetworkModeSupportedRequest, options?: RawAxiosRequestConfig) {
        return 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
     */
    public listEngineLicenses(requestParameters: EngineApiListEngineLicensesRequest = {}, options?: RawAxiosRequestConfig) {
        return 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
     */
    public listEngineResourceConstraints(requestParameters: EngineApiListEngineResourceConstraintsRequest = {}, options?: RawAxiosRequestConfig) {
        return 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
     */
    public listEngineSchedulingPolicies(requestParameters: EngineApiListEngineSchedulingPoliciesRequest, options?: RawAxiosRequestConfig) {
        return 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
     */
    public listEngineTypes(options?: RawAxiosRequestConfig) {
        return 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
     */
    public listEnginesInEnv(requestParameters: EngineApiListEnginesInEnvRequest, options?: RawAxiosRequestConfig) {
        return 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
     */
    public listServiceVersion(requestParameters: EngineApiListServiceVersionRequest, options?: RawAxiosRequestConfig) {
        return 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
     */
    public listUpgradeableServiceVersion(requestParameters: EngineApiListUpgradeableServiceVersionRequest, options?: RawAxiosRequestConfig) {
        return EngineApiFp(this.configuration).listUpgradeableServiceVersion(requestParameters.clusterName, requestParameters.orgName, requestParameters.component, options).then((request) => request(this.axios, this.basePath));
    }
}

