/* tslint:disable */
/* eslint-disable */
/**
 * Admin API
 * The Admin API is used to manage the ApeCloud platform. 
 *
 * 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 { EngineOption } from '../models';
// @ts-ignore
import type { EngineOptionHistoryList } from '../models';
// @ts-ignore
import type { EngineOptionList } from '../models';
// @ts-ignore
import type { EngineOptionVersion } from '../models';
/**
 * EngineOptionApi - axios parameter creator
 * @export
 */
export const EngineOptionApiAxiosParamCreator = function (configuration?: Configuration) {
    return {
        /**
         * Create a new engineOption
         * @summary Create engineOption
         * @param {EngineOption} body 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createEngineOption: async (body: EngineOption, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'body' is not null or undefined
            assertParamExists('createEngineOption', 'body', body)
            const localVarPath = `/admin/v1/engineOptions`;
            // 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: 'POST', ...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)


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Delete a engineOption
         * @summary Delete engineOption
         * @param {string} engineName Name of the engine
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteEngineOption: async (engineName: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'engineName' is not null or undefined
            assertParamExists('deleteEngineOption', 'engineName', engineName)
            const localVarPath = `/admin/v1/engineOptions/{engineName}`
                .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: 'DELETE', ...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,
            };
        },
        /**
         * Get a engineOption detail
         * @summary Get engineOption
         * @param {string} engineName Name of the engine
         * @param {EngineOptionVersion} [version] The version of the engineOption to query, &#x60;current&#x60; from potentially modified data, &#x60;original&#x60; from the json files of the apiserver
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getEngineOption: async (engineName: string, version?: EngineOptionVersion, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'engineName' is not null or undefined
            assertParamExists('getEngineOption', 'engineName', engineName)
            const localVarPath = `/admin/v1/engineOptions/{engineName}`
                .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 (version !== undefined) {
                localVarQueryParameter['version'] = version;
            }


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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * List a engineOption histories of a engine
         * @summary List engineOption history
         * @param {string} engineName Name of the engine
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listEngineOptionHistory: async (engineName: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'engineName' is not null or undefined
            assertParamExists('listEngineOptionHistory', 'engineName', engineName)
            const localVarPath = `/admin/v1/engineOptionHistories`;
            // 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,
            };
        },
        /**
         * list all engineOptions
         * @summary List all engineOptions
         * @param {EngineOptionVersion} [version] The version of the engineOption to query, &#x60;current&#x60; from potentially modified data, &#x60;original&#x60; from the json files of the apiserver
         * @param {boolean} [filterLoadBackupFromOfflineInstance] Whether to filter load backup from offline instance
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listEngineOptions: async (version?: EngineOptionVersion, filterLoadBackupFromOfflineInstance?: boolean, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/admin/v1/engineOptions`;
            // 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 (version !== undefined) {
                localVarQueryParameter['version'] = version;
            }

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


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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Release a engineOption
         * @summary Release engineOption
         * @param {string} engineName Name of the engineOption
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        releaseEngineOption: async (engineName: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'engineName' is not null or undefined
            assertParamExists('releaseEngineOption', 'engineName', engineName)
            const localVarPath = `/admin/v1/engineOptions/{engineName}/release`
                .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: 'POST', ...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,
            };
        },
        /**
         * Update a engineOption
         * @summary Update engineOption
         * @param {string} engineName Name of the engine
         * @param {EngineOption} body 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateEngineOption: async (engineName: string, body: EngineOption, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'engineName' is not null or undefined
            assertParamExists('updateEngineOption', 'engineName', engineName)
            // verify required parameter 'body' is not null or undefined
            assertParamExists('updateEngineOption', 'body', body)
            const localVarPath = `/admin/v1/engineOptions/{engineName}`
                .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: 'PUT', ...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)


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

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

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

/**
 * EngineOptionApi - functional programming interface
 * @export
 */
export const EngineOptionApiFp = function(configuration?: Configuration) {
    const localVarAxiosParamCreator = EngineOptionApiAxiosParamCreator(configuration)
    return {
        /**
         * Create a new engineOption
         * @summary Create engineOption
         * @param {EngineOption} body 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createEngineOption(body: EngineOption, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EngineOption>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.createEngineOption(body, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['EngineOptionApi.createEngineOption']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Delete a engineOption
         * @summary Delete engineOption
         * @param {string} engineName Name of the engine
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deleteEngineOption(engineName: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.deleteEngineOption(engineName, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['EngineOptionApi.deleteEngineOption']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Get a engineOption detail
         * @summary Get engineOption
         * @param {string} engineName Name of the engine
         * @param {EngineOptionVersion} [version] The version of the engineOption to query, &#x60;current&#x60; from potentially modified data, &#x60;original&#x60; from the json files of the apiserver
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getEngineOption(engineName: string, version?: EngineOptionVersion, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EngineOption>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.getEngineOption(engineName, version, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['EngineOptionApi.getEngineOption']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * List a engineOption histories of a engine
         * @summary List engineOption history
         * @param {string} engineName Name of the engine
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listEngineOptionHistory(engineName: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EngineOptionHistoryList>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.listEngineOptionHistory(engineName, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['EngineOptionApi.listEngineOptionHistory']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * list all engineOptions
         * @summary List all engineOptions
         * @param {EngineOptionVersion} [version] The version of the engineOption to query, &#x60;current&#x60; from potentially modified data, &#x60;original&#x60; from the json files of the apiserver
         * @param {boolean} [filterLoadBackupFromOfflineInstance] Whether to filter load backup from offline instance
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listEngineOptions(version?: EngineOptionVersion, filterLoadBackupFromOfflineInstance?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EngineOptionList>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.listEngineOptions(version, filterLoadBackupFromOfflineInstance, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['EngineOptionApi.listEngineOptions']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Release a engineOption
         * @summary Release engineOption
         * @param {string} engineName Name of the engineOption
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async releaseEngineOption(engineName: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EngineOption>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.releaseEngineOption(engineName, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['EngineOptionApi.releaseEngineOption']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
        /**
         * Update a engineOption
         * @summary Update engineOption
         * @param {string} engineName Name of the engine
         * @param {EngineOption} body 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async updateEngineOption(engineName: string, body: EngineOption, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EngineOption>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.updateEngineOption(engineName, body, options);
            const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
            const localVarOperationServerBasePath = operationServerMap['EngineOptionApi.updateEngineOption']?.[localVarOperationServerIndex]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
        },
    }
};

/**
 * EngineOptionApi - factory interface
 * @export
 */
export const EngineOptionApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
    const localVarFp = EngineOptionApiFp(configuration)
    return {
        /**
         * Create a new engineOption
         * @summary Create engineOption
         * @param {EngineOptionApiCreateEngineOptionRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createEngineOption(requestParameters: EngineOptionApiCreateEngineOptionRequest, options?: RawAxiosRequestConfig): AxiosPromise<EngineOption> {
            return localVarFp.createEngineOption(requestParameters.body, options).then((request) => request(axios, basePath));
        },
        /**
         * Delete a engineOption
         * @summary Delete engineOption
         * @param {EngineOptionApiDeleteEngineOptionRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteEngineOption(requestParameters: EngineOptionApiDeleteEngineOptionRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.deleteEngineOption(requestParameters.engineName, options).then((request) => request(axios, basePath));
        },
        /**
         * Get a engineOption detail
         * @summary Get engineOption
         * @param {EngineOptionApiGetEngineOptionRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getEngineOption(requestParameters: EngineOptionApiGetEngineOptionRequest, options?: RawAxiosRequestConfig): AxiosPromise<EngineOption> {
            return localVarFp.getEngineOption(requestParameters.engineName, requestParameters.version, options).then((request) => request(axios, basePath));
        },
        /**
         * List a engineOption histories of a engine
         * @summary List engineOption history
         * @param {EngineOptionApiListEngineOptionHistoryRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listEngineOptionHistory(requestParameters: EngineOptionApiListEngineOptionHistoryRequest, options?: RawAxiosRequestConfig): AxiosPromise<EngineOptionHistoryList> {
            return localVarFp.listEngineOptionHistory(requestParameters.engineName, options).then((request) => request(axios, basePath));
        },
        /**
         * list all engineOptions
         * @summary List all engineOptions
         * @param {EngineOptionApiListEngineOptionsRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listEngineOptions(requestParameters: EngineOptionApiListEngineOptionsRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<EngineOptionList> {
            return localVarFp.listEngineOptions(requestParameters.version, requestParameters.filterLoadBackupFromOfflineInstance, options).then((request) => request(axios, basePath));
        },
        /**
         * Release a engineOption
         * @summary Release engineOption
         * @param {EngineOptionApiReleaseEngineOptionRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        releaseEngineOption(requestParameters: EngineOptionApiReleaseEngineOptionRequest, options?: RawAxiosRequestConfig): AxiosPromise<EngineOption> {
            return localVarFp.releaseEngineOption(requestParameters.engineName, options).then((request) => request(axios, basePath));
        },
        /**
         * Update a engineOption
         * @summary Update engineOption
         * @param {EngineOptionApiUpdateEngineOptionRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateEngineOption(requestParameters: EngineOptionApiUpdateEngineOptionRequest, options?: RawAxiosRequestConfig): AxiosPromise<EngineOption> {
            return localVarFp.updateEngineOption(requestParameters.engineName, requestParameters.body, options).then((request) => request(axios, basePath));
        },
    };
};

/**
 * EngineOptionApi - interface
 * @export
 * @interface EngineOptionApi
 */
export interface EngineOptionApiInterface {
    /**
     * Create a new engineOption
     * @summary Create engineOption
     * @param {EngineOptionApiCreateEngineOptionRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof EngineOptionApiInterface
     */
    createEngineOption(requestParameters: EngineOptionApiCreateEngineOptionRequest, options?: RawAxiosRequestConfig): AxiosPromise<EngineOption>;

    /**
     * Delete a engineOption
     * @summary Delete engineOption
     * @param {EngineOptionApiDeleteEngineOptionRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof EngineOptionApiInterface
     */
    deleteEngineOption(requestParameters: EngineOptionApiDeleteEngineOptionRequest, options?: RawAxiosRequestConfig): AxiosPromise<void>;

    /**
     * Get a engineOption detail
     * @summary Get engineOption
     * @param {EngineOptionApiGetEngineOptionRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof EngineOptionApiInterface
     */
    getEngineOption(requestParameters: EngineOptionApiGetEngineOptionRequest, options?: RawAxiosRequestConfig): AxiosPromise<EngineOption>;

    /**
     * List a engineOption histories of a engine
     * @summary List engineOption history
     * @param {EngineOptionApiListEngineOptionHistoryRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof EngineOptionApiInterface
     */
    listEngineOptionHistory(requestParameters: EngineOptionApiListEngineOptionHistoryRequest, options?: RawAxiosRequestConfig): AxiosPromise<EngineOptionHistoryList>;

    /**
     * list all engineOptions
     * @summary List all engineOptions
     * @param {EngineOptionApiListEngineOptionsRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof EngineOptionApiInterface
     */
    listEngineOptions(requestParameters?: EngineOptionApiListEngineOptionsRequest, options?: RawAxiosRequestConfig): AxiosPromise<EngineOptionList>;

    /**
     * Release a engineOption
     * @summary Release engineOption
     * @param {EngineOptionApiReleaseEngineOptionRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof EngineOptionApiInterface
     */
    releaseEngineOption(requestParameters: EngineOptionApiReleaseEngineOptionRequest, options?: RawAxiosRequestConfig): AxiosPromise<EngineOption>;

    /**
     * Update a engineOption
     * @summary Update engineOption
     * @param {EngineOptionApiUpdateEngineOptionRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof EngineOptionApiInterface
     */
    updateEngineOption(requestParameters: EngineOptionApiUpdateEngineOptionRequest, options?: RawAxiosRequestConfig): AxiosPromise<EngineOption>;

}

/**
 * Request parameters for createEngineOption operation in EngineOptionApi.
 * @export
 * @interface EngineOptionApiCreateEngineOptionRequest
 */
export interface EngineOptionApiCreateEngineOptionRequest {
    /**
     * 
     * @type {EngineOption}
     * @memberof EngineOptionApiCreateEngineOption
     */
    readonly body: EngineOption
}

/**
 * Request parameters for deleteEngineOption operation in EngineOptionApi.
 * @export
 * @interface EngineOptionApiDeleteEngineOptionRequest
 */
export interface EngineOptionApiDeleteEngineOptionRequest {
    /**
     * Name of the engine
     * @type {string}
     * @memberof EngineOptionApiDeleteEngineOption
     */
    readonly engineName: string
}

/**
 * Request parameters for getEngineOption operation in EngineOptionApi.
 * @export
 * @interface EngineOptionApiGetEngineOptionRequest
 */
export interface EngineOptionApiGetEngineOptionRequest {
    /**
     * Name of the engine
     * @type {string}
     * @memberof EngineOptionApiGetEngineOption
     */
    readonly engineName: string

    /**
     * The version of the engineOption to query, &#x60;current&#x60; from potentially modified data, &#x60;original&#x60; from the json files of the apiserver
     * @type {EngineOptionVersion}
     * @memberof EngineOptionApiGetEngineOption
     */
    readonly version?: EngineOptionVersion
}

/**
 * Request parameters for listEngineOptionHistory operation in EngineOptionApi.
 * @export
 * @interface EngineOptionApiListEngineOptionHistoryRequest
 */
export interface EngineOptionApiListEngineOptionHistoryRequest {
    /**
     * Name of the engine
     * @type {string}
     * @memberof EngineOptionApiListEngineOptionHistory
     */
    readonly engineName: string
}

/**
 * Request parameters for listEngineOptions operation in EngineOptionApi.
 * @export
 * @interface EngineOptionApiListEngineOptionsRequest
 */
export interface EngineOptionApiListEngineOptionsRequest {
    /**
     * The version of the engineOption to query, &#x60;current&#x60; from potentially modified data, &#x60;original&#x60; from the json files of the apiserver
     * @type {EngineOptionVersion}
     * @memberof EngineOptionApiListEngineOptions
     */
    readonly version?: EngineOptionVersion

    /**
     * Whether to filter load backup from offline instance
     * @type {boolean}
     * @memberof EngineOptionApiListEngineOptions
     */
    readonly filterLoadBackupFromOfflineInstance?: boolean
}

/**
 * Request parameters for releaseEngineOption operation in EngineOptionApi.
 * @export
 * @interface EngineOptionApiReleaseEngineOptionRequest
 */
export interface EngineOptionApiReleaseEngineOptionRequest {
    /**
     * Name of the engineOption
     * @type {string}
     * @memberof EngineOptionApiReleaseEngineOption
     */
    readonly engineName: string
}

/**
 * Request parameters for updateEngineOption operation in EngineOptionApi.
 * @export
 * @interface EngineOptionApiUpdateEngineOptionRequest
 */
export interface EngineOptionApiUpdateEngineOptionRequest {
    /**
     * Name of the engine
     * @type {string}
     * @memberof EngineOptionApiUpdateEngineOption
     */
    readonly engineName: string

    /**
     * 
     * @type {EngineOption}
     * @memberof EngineOptionApiUpdateEngineOption
     */
    readonly body: EngineOption
}

/**
 * EngineOptionApi - object-oriented interface
 * @export
 * @class EngineOptionApi
 * @extends {BaseAPI}
 */
export class EngineOptionApi extends BaseAPI implements EngineOptionApiInterface {
    /**
     * Create a new engineOption
     * @summary Create engineOption
     * @param {EngineOptionApiCreateEngineOptionRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof EngineOptionApi
     */
    public createEngineOption(requestParameters: EngineOptionApiCreateEngineOptionRequest, options?: RawAxiosRequestConfig) {
        return EngineOptionApiFp(this.configuration).createEngineOption(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Delete a engineOption
     * @summary Delete engineOption
     * @param {EngineOptionApiDeleteEngineOptionRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof EngineOptionApi
     */
    public deleteEngineOption(requestParameters: EngineOptionApiDeleteEngineOptionRequest, options?: RawAxiosRequestConfig) {
        return EngineOptionApiFp(this.configuration).deleteEngineOption(requestParameters.engineName, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Get a engineOption detail
     * @summary Get engineOption
     * @param {EngineOptionApiGetEngineOptionRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof EngineOptionApi
     */
    public getEngineOption(requestParameters: EngineOptionApiGetEngineOptionRequest, options?: RawAxiosRequestConfig) {
        return EngineOptionApiFp(this.configuration).getEngineOption(requestParameters.engineName, requestParameters.version, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * List a engineOption histories of a engine
     * @summary List engineOption history
     * @param {EngineOptionApiListEngineOptionHistoryRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof EngineOptionApi
     */
    public listEngineOptionHistory(requestParameters: EngineOptionApiListEngineOptionHistoryRequest, options?: RawAxiosRequestConfig) {
        return EngineOptionApiFp(this.configuration).listEngineOptionHistory(requestParameters.engineName, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * list all engineOptions
     * @summary List all engineOptions
     * @param {EngineOptionApiListEngineOptionsRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof EngineOptionApi
     */
    public listEngineOptions(requestParameters: EngineOptionApiListEngineOptionsRequest = {}, options?: RawAxiosRequestConfig) {
        return EngineOptionApiFp(this.configuration).listEngineOptions(requestParameters.version, requestParameters.filterLoadBackupFromOfflineInstance, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Release a engineOption
     * @summary Release engineOption
     * @param {EngineOptionApiReleaseEngineOptionRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof EngineOptionApi
     */
    public releaseEngineOption(requestParameters: EngineOptionApiReleaseEngineOptionRequest, options?: RawAxiosRequestConfig) {
        return EngineOptionApiFp(this.configuration).releaseEngineOption(requestParameters.engineName, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Update a engineOption
     * @summary Update engineOption
     * @param {EngineOptionApiUpdateEngineOptionRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof EngineOptionApi
     */
    public updateEngineOption(requestParameters: EngineOptionApiUpdateEngineOptionRequest, options?: RawAxiosRequestConfig) {
        return EngineOptionApiFp(this.configuration).updateEngineOption(requestParameters.engineName, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
    }
}

